text
stringlengths
6
1.05M
<filename>apps/addons/tests/test_decorators.py from django import http import mock from nose.tools import eq_ import amo.tests from addons import decorators as dec from addons.models import Addon class TestAddonView(amo.tests.TestCase): def setUp(self): super(TestAddonView, self).setUp() self.a...
import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { CoordinatingActivityComponent } from './coordinating-activity/coordinating-activity.component'; import { EditComponent } from './edit/edit.component'; import { CreateRewardComponent } from '../coordinator/create-r...
<reponame>MatejTuray/SourceScraper<gh_stars>10-100 import { SimpleDomScraper } from '../lib'; import { ScraperTester } from 'source-scraper-test-utils'; const urls = ['https://tekeye.uk/html/html5-video-test-page']; ScraperTester.fromStatic(SimpleDomScraper) .testUrlDetection(urls) .testScraping(urls) ...
# -*- coding: utf-8 -*- """ ############################################################################### # # autoPACK Authors: <NAME>, <NAME>, <NAME>, <NAME> # Based on COFFEE Script developed by <NAME> between 2005 and 2010 # with assistance from <NAME> in 2009 and periodic input # from Arthur Olson's Molecul...
<reponame>Joeltronics/audioexperiments #!/usr/bin/env python3 from .filter_base import FilterBase, FilterForm from typing import Tuple from math import pi, sin, cos, sqrt from unit_test.processor_unit_test import FilterUnitTest import numpy as np import scipy.signal from overdrive import overdrive from utils ...
<reponame>tartarini/MAF3<gh_stars>1-10 /* * mafViewManager.cpp * mafResources * * Created by <NAME> on 30/12/09. * Copyright 2011 SCS-B3C. All rights reserved. * * See License at: http://tiny.cc/QXJ4D * */ #include "mafViewManager.h" #include "mafMementoViewManager.h" #include "mafView.h" #include "mafVM...
#!/usr/bin/env python # -*- coding: utf-8 -*- import html2markdown from urllib.request import urlopen from girder import events, logger from girder.constants import AccessType from girder.exceptions import ValidationException from girder.utility.model_importer import ModelImporter from girder.utility.progress import ...
<filename>content/lab/pulumi/azure-native/typescript/app/hello/index.ts module.exports = async function (context) { return { status: 200, body: "You've successfully deployed a Function App!", headers: { "content-type": "text/html", }, }; };
function split(str: string): string { let a: number = 1; let res: string = ''; const parts = (str || '').split('%'); const len: number = parts.length; if (len > 0) { res += parts[0]; } for (let i = 1; i < len; i++) { if (parts[i][0] === 's' || parts[i][0] === 'd') { let value = arguments[...
<filename>sdk/commerce/arm-commerce/src/models/parameters.ts /* * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { OperationParamete...
""" Provides the data structure for numerical integration. The purpose of these data structures is to give access to the quadrature points and weights for several spatial domains. """ import gaussian from .gaussian import GaussQuadSimp
<filename>src/app/organizer/table-types.ts import { DimItem } from 'app/inventory/item-types'; import React from 'react'; export const enum SortDirection { ASC, DESC, } type Value = string | number | boolean | undefined | null; /** * Columns can optionally belong to a column group - if so, they're shown/hidden ...
<gh_stars>0 import tornado.escape import tornado.ioloop import tornado.options import tornado.web import os.path import views from tornado.options import define, options define("port", default=8000, help="run on the given port", type=int) class Application(tornado.web.Application): def __init__(self): ...
<filename>src/logic/calc.logic.ts import { AttendVO } from '../vo/attend.vo'; /** * 勤怠関連のロジック */ export interface CalcLogic { /** * 勤務時間の計算を行う * @param attendVO 勤怠情報 */ calc(attendVO: AttendVO): AttendVO; /** * すべての勤怠情報を取得する */ getAllAttends(): AttendVO[]; /** * 勤怠情報を保存する * @param at...
#include <iostream> #include <string> #include <vector> using namespace std; int main(void) { vector<pair<int, string> > list; int q, s, e, cnt = 0, size; list.push_back(make_pair(1967, "DavidBowie")); list.push_back(make_pair(1969, "SpaceOddity")); list.push_back(make_pair(1970, "TheManWhoSoldTheWorld")); list.p...
<reponame>mjameswh/sdk-typescript /** * Tests that if a signal is delivered while the Worker is processing a Workflow * Task, the Worker picks up a new Workflow Task (including the signal) and * the Workflow library delivers the signal to user code before it starts the * Workflow execution. * * @module */ import...
<gh_stars>1-10 # Empty file from cemc.tools.gsfinder import GSFinder from cemc.tools.free_energy import FreeEnergy from cemc.tools.dataset_averager import DatasetAverager from cemc.tools.phase_boundary_tracker import PhaseBoundaryTracker from cemc.tools.canonical_free_energy import CanonicalFreeEnergy from cemc.tools.c...
<reponame>Faholan/Various<filename>battleship/config.py<gh_stars>1-10 """Battleship configuration.""" # Battleship configuration GRID_SIZE = 10 # Number of rows and columns in the grid CELL_SIZE = 50 # Size (in pixel) of each square SIZES = (5, 4, 3, 3, 2) # Boat sizes SHOW_AI_MISSED = True # Show the hits miss...
<gh_stars>1-10 import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'; import { FirebaseListObservable } from 'angularfire2'; import { ITask } from '../models/task'; @Component({ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'task-list', template: ` ...
<filename>projects/ngx3js/src/lib/shader/shaders/shader.modifier_tessellation.ts import { IShaderType } from '../../ngx-interface'; export const ModifierTessellation: IShaderType = { vertexShader: ` uniform float amplitude; attribute vec3 customColor; attribute vec3 displacement; varying vec3 vNormal; varyi...
<gh_stars>0 import { MysqlConfig } from './MySql.config' import { ValidationPipeOptions, validationOptions } from './ValidationPipeOptions.config' export { MysqlConfig, ValidationPipeOptions, validationOptions }
<filename>synbiochemdev/design/ice_analysis.py ''' synbiochem (c) University of Manchester 2016 synbiochem is licensed under the MIT License. To view a copy of this license, visit <http://opensource.org/licenses/MIT/>. @author: neilswainston ''' import sys from synbiochem.utils.ice_utils import ICEClient from synb...
<reponame>TMarquet/speech_recognition # -*- coding: utf-8 -*- """ Created on Fri Jan 22 11:02:28 2021 @author: kahg8 """ import webrtcvad import os # Helper libraries import numpy as np from scipy.io import wavfile import matplotlib.pyplot as plt labels = ["yes", "no", "up", "down", "left", "right", "on", "off", "st...
import * as React from 'react'; import { StyleSheet, Text, View, ViewStyle } from 'react-native'; import Video from 'react-native-video'; class VideoTest extends React.Component { constructor(props: {}) { super(props); } render(): React.ReactElement<any> { return ( ...
import { Chip, makeStyles, Theme } from '@material-ui/core'; import React from 'react'; type LozengeProps = { appearance: 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success'; label: string; }; const useStyles = makeStyles((theme: Theme) => ({ default: { color: '#42526E', bac...
// Copyright: 2015 <NAME> // Author: <NAME> (<EMAIL>) #include <iostream> #include "quick/debug.hpp" #include "gtest/gtest.h" #include "samples/sample_aparse_grammars.hpp" #include "aparse/aparse_machine_builder_v2.hpp" #include "aparse/core_parser.hpp" #include "aparse/error.hpp" #include "quick/stl_utils.hpp" usi...
<gh_stars>0 export * from './game.utils';
<filename>upgrade/boot_loader/SecondStageToRamLoader.cpp<gh_stars>10-100 #include "upgrade/boot_loader/SecondStageToRamLoader.hpp" #include "upgrade/pack/UpgradePackHeader.hpp" #include <cstring> namespace application { SecondStageToRamLoader::SecondStageToRamLoader(hal::SynchronousFlash& upgradePackFlash, const c...
import re from git import Repo, Commit from code_metrics import utils def get_repo(path): return Repo(path) def get_revision(from_commit, to_commit): revision = "{}..{}".format(from_commit, to_commit) return revision def get_most_recent_tag_names(git_repo=None): git_repo = git_repo or Repo() t...
/* * Copyright (c) 2018-2021, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, p...
import React from 'react' import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Paper, } from '@material-ui/core' interface Header { [key: string]: any text: string value: string } interface TBody { [key: string]: any } interface Props { [key: string]: any header?: Header...
import tensorflow as tf from tensorflow.keras.layers import Input, Dense, Add, Subtract, Lambda from tensorflow.keras.models import Model from tensorflow.keras.optimizers import RMSprop import tensorflow.keras.backend as K c = tf.constant(['a', 'b']) e = tf.math.erf([1.0, -0.5, 3.4, -2.1, 0.0, -6.5]) input = tf.keras...
<filename>src/btop_draw.cpp /* Copyright 2021 Aristocratos (<EMAIL>) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by a...
<gh_stars>1-10 function func() {}
<reponame>xadupre/mlprodict # -*- encoding: utf-8 -*- # pylint: disable=W0611 """ @file @brief Imports runtime operators. """ from ._op import OpRun from .op_abs import Abs from .op_add import Add from .op_and import And from .op_argmax import ArgMax from .op_argmin import ArgMin from .op_array_feature_extractor impor...
<reponame>tsiegleauq/openslides-client<gh_stars>1-10 import { Injectable } from '@angular/core'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { BehaviorSubject } from 'rxjs'; import { OfflineBroadcastService } from '../core-services/offline-broadcast.service'; export interface BannerD...
<filename>engine/src/System.cpp #include "System.h" bool System::Initialize() noexcept { return true; } void System::RunLoop() noexcept { } void System::Release() noexcept { }
<filename>Algorithms/Final_stepik_course/3.1.cpp #include <iostream> #include <limits> #include <vector> #include <cmath> #include <cassert> #include <map> /** * * @tparam T Type of weight * @tparam N Type of vertex */ template <typename T, typename N> class AdjacencyMatrix { public: AdjacencyMatrix() = defaul...
<gh_stars>0 import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { UserService } from '../services/user.service' import { FormBuilder, FormGroup, Validators } from '@angular/forms'; @Component({ selector: 'app-verify-email', templateUrl: './verify-emai...
<reponame>DataStrander/StartUp-Web-Scrapping # -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.4 # kernelspec: # display_name: Python 3 # language: python # name: ...
<gh_stars>0 https://leetcode.com/problems/median-of-two-sorted-arrays/submissions/ Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. Follow up: The overall run time complexity should be O(log (m+n)). Example 1: Input: nums1 = [1,3], nums2 = [2] Outp...
import { Injectable } from '@nestjs/common'; import { Card } from './models/card.model'; import { Ranks } from './types/card.ranks'; @Injectable() export class CribbageService { getHello(): string { return 'Hello Cribbage World!'; } scoreHand(hand: Card[], starter: Card): number { let score = 0; if ...
class Telecom: def __init__(self, contact_db_id, system, value, use, rank, period): self.contact_db_id = contact_db_id self.system = system self.value = value self.use = use self.rank = rank self.period = period def get_contact_db_id(self): return self.contact_db_id def get_system(self): return se...
<reponame>PacktPublishing/Testing-Time-Machines import datetime import pandas as pd # Retrieve the test cases from the csv into a dictionary dataFile = open('testcases.csv', 'r') dataFrame = pd.read_csv('testcases.csv', index_col=0) dataDictionary = dataFrame.transpose().to_dict() # Create a new dictionary to save the...
<gh_stars>1-10 import { SET_FEED_POSTS, SET_OTHER_POSTS, FETCH_POSTS, FETCH_POSTS_SUCCESS, RESET, FILTER_SELECTED, SET_INIT_POSTS, SET_FEED_SCREEN_FILTERS, } from '../constants/constants'; export const setFeedPosts = (posts, scrollPosition = 0) => ({ payload: { posts, scrollPosition, }, t...
import React from 'react'; import { MouseEvent } from 'react'; import { useRouter } from 'next/router'; import { FACEBOOK_APP_ID, SITE_URL } from '../constants/site_data'; import { SnsShareUrl } from '../constants/sns_share_url'; import { FacebookSvg } from './icon/facebook'; import styles from './FacebookLink.module....
import Room from '../../models/room'; import RoomType from './room.interface'; import error, { NotFoundError } from '../../utils/errors/coreError'; /** * Update a room. * @param {String} id - Id of room * @param {RoomType} room - A room object. * @returns {Promise<RoomType>} Resolve with updated room. * @example ...
<reponame>jackykwandesign/fintech-event-cuhk-be import { UserRole } from "../user-role.enum"; export declare class UserDto { name: string; uid: string; role: UserRole; photoURL: string; finishInfo: boolean; email: string; }
#include "GlobalCommandController.hh" #include "Command.hh" #include "Setting.hh" #include "ProxyCommand.hh" #include "ProxySetting.hh" #include "InfoTopic.hh" #include "LocalFileReference.hh" #include "GlobalCliComm.hh" #include "CliConnection.hh" #include "HotKey.hh" #include "Interpreter.hh" #include "InfoCommand.hh...
#include "crossover_uniform.h" #include <assert.h> #include "random_generator.h" using namespace gealib; chromo_ptr xo_uniform::cross(const chromo_ptr a, const chromo_ptr b) const { size_t size = a->size(); assert(size == b->size()); chromo_ptr c = std::make_shared<chromosome>(size); for (size_t i = 0; i < size; ...
import chatPage from './chatPage'; import coinFlipPage from './coinFlipPage'; import complexPage from './complexPage'; import CreateCharPage from './CreateCharPage'; import dashboard from './dashboard'; import galleryPage from './galleryPage'; import profilePage from './profilePage'; import settingsPage from './setting...
# standard imports import os from _unittest.conftest import BasisTest from _unittest.conftest import desktop_version from _unittest.conftest import local_path from pyaedt import Desktop from pyaedt import get_pyaedt_app try: import pytest # noqa: F401 except ImportError: import _unittest_ironpython.conf_unit...
<gh_stars>0 import * as React from 'react'; import { Component } from 'react'; import { filter, ADFEntity } from '@atlaskit/adf-utils'; import { CardAppearance, CardDimensions, Card, CardLoading, CardError, CardOnClickCallback, } from '@atlaskit/media-card'; import { Context, ImageResizeMode, FileIde...
<filename>shared-headers/Defs.hpp #pragma once // ------------------------------------------------------------------------------------- #include <cstdint> #include <iostream> #include <vector> #include <string> #include <csignal> #include <immintrin.h> #include <experimental/source_location> #include <sstream> // -----...
from ctypes import * import math import random import os import cv2 import numpy as np import time import darknet # import threading import ini import datetime import json from Connserver import Connserver #### from time import sleep from threading import Thread ##from pynput import keyboard #wa """ def convertBack2(...
<reponame>umass-amrl/jpp #include <ros/ros.h> #include <message_filters/subscriber.h> #include <message_filters/synchronizer.h> #include <message_filters/sync_policies/approximate_time.h> #include <message_filters/sync_policies/exact_time.h> #include <visualization_msgs/Marker.h> #include <sensor_msgs/Image.h> #include...
<reponame>gujralsanyam22/pyrobot<gh_stars>1000+ # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Example for commanding robot with position control using moveit planner """ from pyrobot i...
import { logger, mongoDatabase } from '@app/core'; import { config } from '@app/config'; import _ from 'lodash'; (async () => { try { await mongoDatabase.startDatabase(config.database.connectionString); const leadRepository = require('../modules/crm').leadRepository; const leads = await leadRepository.fi...
# 2019-02-01 # leap year calculator year = int(input("Enter a year to calculate: ")) leap = False if year % 4 == 0: leap = True if year % 100 == 0: leap = False if year % 400 == 0: leap = True if leap: print("The year", year, "is leap year") else: print("The year", year, "is not leap year") ''...
<reponame>kolyden/uut-engine<gh_stars>0 #include "MemberType.h" namespace uut { UUT_ENUM_IMPLEMENT(MemberType) { RegisterValues( "Constructor", MemberType::Constructor, "Converter", MemberType::Converter, "Event", MemberType::Event, "Method", MemberType::Method, "Property", MemberType::Property); }...
<filename>Projects/Online Workouts/w3resource/Basic - Part-I/print-poem.py #!/usr/bin/env python3 ############################################################################# # # # Program purpose: Prints the poem 'Twinkle Twinkle li...
import { authConstants } from './../common/auth/constants'; import { Injectable } from '@nestjs/common'; import { hash, compare } from 'bcrypt'; @Injectable() export class PasswordService { validatePassword(password: string, hashedPassword: string): Promise<boolean> { return compare(password, hashedPassword); ...
from yadage.controllers import PersistentController from yadage.wflowstate import FileBackedModel from yadage.state_providers import load_provider def test_persistent_controller(tmpdir, local_helloworld_wflow_w_init, foregroundasync_backend): model = FileBackedModel( filename = str(tmpdir.join('wflowstat...
<filename>BILLING.py import sqlite3 import tkinter import tkinter.messagebox conn=sqlite3.connect("MDBA.db") #variables rootB=None def date_up(): global b1,b2 b1 = P_id.get() b2 = dd.get() conn.execute("UPDATE ROOM SET DATE_DISCHARGED=? where PATIENT_ID=?", (b2, b1,)) conn.commit() tkinter.mes...
<filename>media/ffmpeg/ffmpeg_decoding_loop.cc // Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "media/ffmpeg/ffmpeg_decoding_loop.h" #include "base/callback.h" #include "base/logging.h" #includ...
// Copyright 2020 Google Inc. Use of this source code is governed by an // MIT-style license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. import {Observable, Subject} from 'rxjs'; import {mergeMap} from 'rxjs/operators'; import BufferBuilder = require('buffer-builder'); /** * D...
// Copyright © 1996-2018, Valve Corporation, All rights reserved. // // Purpose: The Escort's Shield weapon effect #include "sheetsimulator.h" #include <cassert> #include "collisionutils.h" #include "edict.h" #include "tier0/include/memdbgon.h" #define COLLISION_PLANE_OFFSET 6.0f //---------------------------...
import requests import sys from pingdomlib.check import PingdomCheck from pingdomlib.contact import PingdomContact from pingdomlib.reports import PingdomEmailReport, PingdomSharedReport server_address = 'https://api.pingdom.com' api_version = '2.0' class Pingdom(object): """Main connection object to interact wi...
/** * Addle source code * @file * @copyright Copyright 2020 <NAME> * @copyright Modification and distribution permitted under the terms of the * MIT License. See "LICENSE" for full details. */ #ifndef DOCUMENTLAYERSHELPER_HPP #define DOCUMENTLAYERSHELPER_HPP #include <QtGlobal> #include <QMap> #include <QSet> #...
import {Component, OnInit, ViewChild} from '@angular/core'; import {OrganizationsModal} from './OrganizationsModal'; import {ActivatedRoute, Router} from '@angular/router'; import {OrganizationsService} from '../../services/organizations.service'; import {AffiliatesService} from '../../services/affiliates.service'; imp...
<reponame>ZeyuanWei/backstage /* * Copyright 2020 The Backstage Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
import { EventEmitter } from '@angular/core'; export interface ElementType { type: string; backgroundImage: string; transform: string; } export declare class ImagePickerComponent { prefixCls: string; flexEl: ElementType[][]; private _accept; private _count; private _selectable; priva...
<reponame>Solomon198/notifire describe.skip('Notification Templates Screen', function () { beforeEach(function () { cy.initializeSession().as('session'); }); it('should display notification templates list', function () { cy.visit('/templates'); cy.getByTestId('notifications-template') .find('tb...
#include "common.h" std::deque<int> q; std::mutex mu; std::condition_variable cond; void function_1() { int count = 10; while (count > 0) { std::unique_lock<std::mutex> locker(mu); q.push_front(count); locker.unlock(); // 唤醒前释放锁 cond.notify_one(); // 唤醒 std::this_th...
<reponame>Skycoder42/Syrem<gh_stars>1-10 #include <QApplication> #include <QtMvvmWidgets/WidgetsPresenter> #include <QtMvvmDataSyncWidgets/qtmvvmdatasyncwidgets_global.h> #include <syremapp.h> #include "mainwindow.h" #include "createreminderdialog.h" #include "snoozedialog.h" #include "snoozetimesedit.h" #include "ter...
<filename>src/App.tsx<gh_stars>1-10 import Container from '@material-ui/core/Container'; import CssBaseline from '@material-ui/core/CssBaseline'; import { makeStyles, ThemeProvider } from '@material-ui/core/styles'; import { Router } from '@reach/router'; import classNames from 'classnames'; import React from 'react'; ...
<gh_stars>1-10 #-*- coding: utf-8 -*- __author__ = "<NAME> (Srce Cde)" __license__ = "MIT" __email__ = "<EMAIL>" __maintainer__ = "<NAME> (Srce Cde)" import json import boto3 def lambda_handler(event, context): s3 = boto3.client("s3") translate = boto3.client("translate") if event: file_obj = even...
<reponame>thearsenik/sport-ironcar import numpy as np import bpy from mathutils import Vector, Matrix from pathlib import Path import os import json import time renderedImageFile='D:/dev/ironcar/ironcarAgfa/sport-ironcar/output/outputRenderer/road.jpg' def initializeVoiturePosition(): voiture = bpy.dat...
import React from 'react' interface Props {} interface State { error: { message: string stack?: string componentStack?: string } | null } export default class ErrorAlert extends React.Component<Props, State> { constructor(props: {}) { super(props) this.state = { error: null } } component...
import * as path from 'path' import { ESLintUtils } from '@typescript-eslint/experimental-utils' export const createRule = ESLintUtils.RuleCreator(name => { const dirname = path.relative(__dirname, path.dirname(name)) const basename = path.basename(name, path.extname(name)) return `https://github.com/CyanSalt/es...
/* * @license * Copyright (c) 2019 <NAME>. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. */ /** * ## Numeric Range * Represents a numeric range. */ export class NumericRange { public static DEFAULT = new NumericRange(); public static isArray...
<filename>staging/pera-swarm/modules/coordinate/coordinate.ts /** * @interface CoordinateValueInt */ export interface CoordinateValueInt<TId> { id: TId; heading: number; x: number; y: number; } /** * @class Coordinate */ export class Coordinate<TId> { protected _id: TId; protected _heading:...
<reponame>idamfadilah/belajarpython import matplotlib.pyplot as plt import requests import sqlite3 class dianmarkuci() : def __init__(self, kode, hargatotal, kuota): self.kode = kode self.hargatotal = hargatotal self.kuota = kuota def rental(self): if (self.kode[1]) == ...
<gh_stars>1-10 import { bool, func, objectOf, shape, string } from "prop-types"; export const nosProps = shape({ claimGas: func.isRequired, decrypt: func.isRequired, encrypt: func.isRequired, exists: bool.isRequired, getAddress: func.isRequired, getBalance: func.isRequired, getLastBlock: func.isRequired,...
import os import boto3 from datatime import datetime from lib import assume_role, get_account_list, save_output report = dict() def lambda_handler(event, context): """ Runs through a list of AWS accounts stored in a csv file (created via accounts.py) and generates a dict of Elastic IPs, network interfaces a...
/* eslint-disable no-underscore-dangle */ /* eslint-disable @typescript-eslint/no-explicit-any */ declare global { interface Window { _paq: any; } } export const MatomoScript = () => { window._paq = window._paq ?? []; const paq = window._paq; /* tracker methods like "setCustomDimension" should be calle...
<filename>webmachine/util/const.py<gh_stars>1-10 # -*- coding: utf-8 - # # This file is part of dj-webmachine released under the MIT license. # See the NOTICE for more information. from django.utils.translation import ugettext_lazy as _ VERIFIER_SIZE = 16 KEY_SIZE = 32 SECRET_SIZE = 32 # token types TOKEN_REQUEST ...
<filename>packages/ui-core/src/components/dropdown-list-container/dropdown-list-container.styles.ts import styled, { css } from 'styled-components'; import { transparentize } from 'polished'; import { colors } from '@keen.io/colors'; export const Container = styled.div<{ overflowTop: boolean; overflowBottom: boole...
/********************************************************************** oberror.cpp - Handle error messages. Copyright (C) 2002 by <NAME> Some portions Copyright (C) 2002-2006 by <NAME> This file is part of the Open Babel project. For more information, see <http://openbabel.org/> This program is free software; you c...
import antd from 'ant-design-vue/es/locale-provider/zh_CN' import dayjs from 'dayjs'; import 'dayjs/locale/zh-cn'; import global from './zh-CN/global' import menu from './zh-CN/menu' import setting from './zh-CN/setting' import user from './zh-CN/user' import dashboard from './zh-CN/dashboard' import form from './zh-...
import MiniCssExtractPlugin from 'mini-css-extract-plugin' import CssMinimizerPlugin from 'css-minimizer-webpack-plugin' import TerserPlugin from 'terser-webpack-plugin' import { Configuration } from 'webpack' import commonConfig from './webpack.common' import { merge } from 'webpack-merge' const prodConfig: Configura...
import { Message, MessageFactory, MessageType, DispatchHandler, messageJumpContext, browserSubscribeDispatch, browserSubscribeOnce, } from './communication'; import { send, subscribe, } from './backend/connection'; import {loadOptions, SimpleOptions} from './options'; const scriptInjection = new Se...
<gh_stars>1-10 import json import requests from bitsv.network.meta import Unspent from bitsv.network.transaction import Transaction, TxInput, TxOutput from decimal import Decimal class BitIndex3: """ Implements version 3 of the BitIndex API :param network: select 'main', 'test', or 'stn' :type networ...
################################################################################ # # OccupancyGrid2d class listens for LaserScans and builds an occupancy grid. # ################################################################################ from numpy.testing._private.utils import rand import rospy import tf2_ros im...
<gh_stars>0 import { Chart, ChartProps, Footer, Header, HeaderProps, Navbar, Page, } from '../../../common' import { PageMetadata } from '../../../PageMetadata' import { ProjectDetails, ProjectDetailsProps } from './ProjectDetails' export interface ProjectPageProps { metadata: PageMetadata header: He...
import torch from ignite.metrics import Metric class MeanAveragePrecision(Metric): def __init__(self, num_classes=20, output_transform=lambda x: x): super(MeanAveragePrecision, self).__init__(output_transform=output_transform) self.num_classes = num_classes def reset(self): self._tr...
<filename>types/service_types/OperationsRound.d.ts import bigDecimal = require('js-big-decimal'); export declare class OperationsRound { private static INT_ROUNDING_CONST; private static ZERO; static abs(op: bigDecimal): bigDecimal; static roundToInt(valueDec: bigDecimal): number; static roundUp(val...
/* Starshatter OpenSource Distribution Copyright (c) 1997-2004, Destroyer Studios LLC. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain t...
/** * Copyright 2018 Angus.Fenying <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
import { StyleSheet } from "react-native"; export const styles = StyleSheet.create({ container: { backgroundColor: "#232F40", height: "100%", width: "100%", alignItems: "center", }, couponContainer: { backgroundColor: "#F7F6EE", width: "90%", height: ...