text
stringlengths
28
881k
""" fprime version handling and reporting """NEWLINEimport osNEWLINEfrom setuptools_scm import get_versionNEWLINENEWLINEROOT_PARENT_COUNT = 5NEWLINENEWLINENEWLINEdef get_fprime_version():NEWLINE """Gets the fprime version using setuptools_scm"""NEWLINE # First try to read the SCM versionNEWLINE try:NEWLINE ...
# Generated by Django 3.2.3 on 2021-07-09 11:22NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('core', '0001_initial'),NEWLINE ]NEWLINENEWLINE operations = [NEWLINE migrations.AlterField(NEWLI...
from __future__ import annotationsNEWLINENEWLINEfrom typing import (NEWLINE TYPE_CHECKING,NEWLINE Callable,NEWLINE Dict,NEWLINE Hashable,NEWLINE List,NEWLINE Optional,NEWLINE Sequence,NEWLINE Set,NEWLINE Tuple,NEWLINE Union,NEWLINE cast,NEWLINE)NEWLINENEWLINEimport numpy as npNEWLINENEW...
# -*- coding: utf-8 -*-NEWLINE"""NEWLINEPreprocessors.NEWLINE"""NEWLINEimport reNEWLINENEWLINEimport numpy as npNEWLINEfrom allennlp.modules.elmo import Elmo, batch_to_idsNEWLINEfrom sklearn.base import BaseEstimator, TransformerMixinNEWLINEfrom sklearn.externals import joblibNEWLINEfrom keras.utils.np_utils import to_...
from flask import Flask, request, Response, abort, redirectNEWLINEimport osNEWLINEimport requestsNEWLINEimport loggingNEWLINEimport jsonNEWLINEimport reNEWLINEimport sysNEWLINEfrom time import sleepNEWLINENEWLINEapp = Flask(__name__)NEWLINEformat_string = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'NEWLINElog...
from rlkit.core import loggerNEWLINEfrom rlkit.core.timer import timerNEWLINEfrom rlkit.data_management.online_vae_replay_buffer import \NEWLINE OnlineVaeRelabelingBufferNEWLINEfrom rlkit.data_management.shared_obs_dict_replay_buffer \NEWLINE import SharedObsDictRelabelingBufferNEWLINEimport rlkit.torch.vae.vae_s...
"""Test whether all elements of cls.args are instances of Basic. """NEWLINENEWLINE# NOTE: keep tests sorted by (module, class name) key. If a class can'tNEWLINE# be instantiated, add it here anyway with @SKIP("abstract class) (seeNEWLINE# e.g. Function).NEWLINENEWLINEimport osNEWLINEimport reNEWLINEimport warningsNEWLI...
import setuptoolsNEWLINENEWLINEwith open("README.md", "r", encoding="utf-8") as f:NEWLINE long_description = f.read()NEWLINENEWLINEsetuptools.setup(NEWLINE name="sunnyvale",NEWLINE version="0.0.1",NEWLINE author="Gunhoon Lee",NEWLINE author_email="gunhoon@gmail.com",NEWLINE description="A small exampl...
from test_common import get_sample_layer, get_opsNEWLINEfrom nose.tools import assert_raisesNEWLINEimport tvmNEWLINENEWLINEdef test_set_tiling_wrong_inputs():NEWLINE layer = get_sample_layer()NEWLINE with assert_raises(Exception):NEWLINE # wrong iv nameNEWLINE layer.set_tiling("n", [4, 1, 1, 1])NEWL...
import audiovisuaaliNEWLINEfrom urllib.request import quoteNEWLINEfrom requests import get as rgetNEWLINEfrom json import loadsNEWLINENEWLINE# trumpNEWLINEasync def trump(message, client, arguments):NEWLINENEWLINE #Starting to fetch a CatfactNEWLINE query = "https://api.tronalddump.io/search/quote?query={}".forma...
from __future__ import unicode_literalsNEWLINENEWLINEfrom prompt_toolkit.buffer import BufferNEWLINEfrom prompt_toolkit.cache import SimpleCacheNEWLINEfrom prompt_toolkit.clipboard import Clipboard, InMemoryClipboardNEWLINEfrom prompt_toolkit.enums import EditingModeNEWLINEfrom prompt_toolkit.eventloop import get_event...
import csvNEWLINEimport jsonNEWLINEimport numpy as npNEWLINEimport osNEWLINEimport pandas as pdNEWLINEimport pickleNEWLINENEWLINEdef get_paths():NEWLINE paths = json.loads(open("Settings.json").read())NEWLINE for key in paths:NEWLINE paths[key] = os.path.expandvars(paths[key])NEWLINE return pathsNEWLINE...
#!/usr/bin/env python2NEWLINEimport numpy as npNEWLINEimport path_parserNEWLINEfrom mpl_toolkits.mplot3d import Axes3DNEWLINEimport matplotlib.pyplot as pltNEWLINEfrom matplotlib import cmNEWLINEfrom matplotlib.ticker import LinearLocator, FormatStrFormatterNEWLINEfrom scipy.spatial import KDTreeNEWLINEruta='sample_map...
# Generated by Django 3.2.5 on 2021-07-18 23:06NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('login', '0001_initial'),NEWLINE ]NEWLINENEWLINE operations = [NEWLINE migrations.AlterField(NEWL...
import numpy as npNEWLINEimport unittestNEWLINEimport sysNEWLINEsys.path.append("tests/python")NEWLINE# Don't import the test class, otherwise they will run twice.NEWLINEimport test_interaction_constraints as test_icNEWLINErng = np.random.RandomState(1994)NEWLINENEWLINENEWLINEclass TestGPUInteractionConstraints(unittes...
import open3d as o3dNEWLINENEWLINENEWLINEFilterScope=o3d.geometry.FilterScopeNEWLINENEWLINEdef removePCDOutlier(pcd,voxel_size=0.001,nb_points=32,radius=0.004):NEWLINE '''NEWLINE 尝试除去点云离群点NEWLINE '''NEWLINE downpcd=pcd.voxel_down_sample(voxel_size=voxel_size)NEWLINE inlierPcd,idxs=downpcd.remove_radi...
import timeNEWLINEimport jsonNEWLINEimport datetimeNEWLINEimport reNEWLINEimport randomNEWLINEimport csvNEWLINEimport osNEWLINEimport subprocessNEWLINEimport requestsNEWLINENEWLINEfrom django.shortcuts import render, get_object_or_404NEWLINEfrom django.db.models import Count, Q, SumNEWLINEfrom django.http import HttpRe...
"""Gets the next song in the playlistNEWLINENEWLINERun with --help for more info.NEWLINE"""NEWLINENEWLINEfrom nextsong.cli import nextsongNEWLINENEWLINEnextsong()NEWLINE
""" fprime version handling and reporting """NEWLINEimport osNEWLINEfrom setuptools_scm import get_versionNEWLINENEWLINEROOT_PARENT_COUNT = 5NEWLINENEWLINENEWLINEdef get_fprime_version():NEWLINE """Gets the fprime version using setuptools_scm"""NEWLINE # First try to read the SCM versionNEWLINE try:NEWLINE ...
from __future__ import divisionNEWLINEfrom features import mfccNEWLINEfrom operator import addNEWLINEimport scipy.io.wavfile as wavNEWLINEimport numpy as npNEWLINENEWLINEwords = ['apple','banana','kiwi','lime','orange']NEWLINENEWLINENEWLINEfor x in range(len(words)):NEWLINE fileString = words[x]+"_mfcc"NEWLINE data = [...
#!/usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE"""NEWLINEIn this example, we are going to make a dark code editor widget and make it show visualNEWLINEwhitespaces.NEWLINENEWLINE"""NEWLINEimport sysNEWLINEimport osNEWLINEos.environ['QT_API'] = 'pyside2'NEWLINE# os.environ['QT_API'] = 'pyqt5'NEWLINEfrom pyqode...
from .mnist_LeNet import MNIST_LeNet, MNIST_LeNet_Autoencoder, MNIST_Discriminator_L, MNIST_Discriminator_S, MNIST_GeneratorNEWLINEfrom .fmnist_LeNet import FashionMNIST_LeNet, FashionMNIST_LeNet_Autoencoder, FashionMNIST_Discriminator_L, FashionMNIST_Discriminator_SNEWLINEfrom .cifar10_LeNet import CIFAR10_LeNet, CIFA...
# Generated by Django 2.0.2 on 2018-03-14 19:54NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('course_api', '0007_course_simple_name'),NEWLINE ]NEWLINENEWLINE operations = [NEWLINE migrations...
# -*- coding: utf-8 -*-NEWLINE# Copyright 2020 Green Valley Belgium NVNEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licens...
# -------------------------------------------------------------------------NEWLINE# Copyright (c) Microsoft Corporation. All rights reserved.NEWLINE# Licensed under the MIT License. See License.txt in the project root forNEWLINE# license information.NEWLINE# -------------------------------------------------------------...
# -*- coding: utf-8 -*-NEWLINENEWLINE"""Utilities for PyBEL testing."""NEWLINENEWLINEimport itertools as ittNEWLINEimport randomNEWLINENEWLINEfrom .utils import nNEWLINEfrom ..dsl import proteinNEWLINEfrom ..struct import BELGraphNEWLINENEWLINE__all__ = [NEWLINE 'generate_random_graph',NEWLINE]NEWLINENEWLINENEWLINEd...
import sysNEWLINEimport numpy as npNEWLINEimport pandas as pdNEWLINEimport networkx as nxNEWLINENEWLINEimport hypercomparison.utilsNEWLINEimport hypercomparison.networksNEWLINEimport hypercomparison.embedding_centeredNEWLINEfrom hypercomparison.link_prediction import LinkPredictionTaskNEWLINEfrom hypercomparison.networ...
"""NEWLINESync Media to S3NEWLINE================NEWLINENEWLINEDjango command that scans all files in your settings.MEDIA_ROOT andNEWLINEsettings.STATIC_ROOT folders and uploads them to S3 with the same directoryNEWLINEstructure.NEWLINENEWLINEThis command can optionally do the following but it is off by default:NEWLINE...
# =============================================================================== #NEWLINE# #NEWLINE# This file has been generated automatically!! Do not change this manually! #NEWLINE# ...
# Copyright (C) 2021 Intel CorporationNEWLINE#NEWLINE# SPDX-License-Identifier: MITNEWLINENEWLINEimport osNEWLINEimport base64NEWLINEimport uuidNEWLINENEWLINEfrom django.conf import settingsNEWLINEfrom django.core.cache import cacheNEWLINEfrom rest_framework import statusNEWLINEfrom rest_framework.response import Respo...
import operatorNEWLINENEWLINENEWLINEdef parse(data):NEWLINE return [NEWLINE tuple(tuple(int(c) for c in l.split(",")) for l in s.split("\n")[1:])NEWLINE for s in data.split("\n\n")NEWLINE ]NEWLINENEWLINENEWLINEdef rot_x(cords):NEWLINE return tuple((x, z, -y) for x, y, z in cords)NEWLINENEWLINENEW...
#!/usr/bin/env pythonNEWLINE#NEWLINE# __COPYRIGHT__NEWLINE#NEWLINE# Permission is hereby granted, free of charge, to any person obtainingNEWLINE# a copy of this software and associated documentation files (theNEWLINE# "Software"), to deal in the Software without restriction, includingNEWLINE# without limitation the rig...
#!/usr/bin/env pythonNEWLINE# Jonas Schnelli, 2013NEWLINE# make sure the Lissomcoin-Qt.app contains the right plist (including the right version)NEWLINE# fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267)NEWLINENEWLINEfrom string import TemplateNEWLINEfrom dateti...
from __future__ import print_functionNEWLINE# Copyright (c) 2012 Google Inc. All rights reserved.NEWLINE# Use of this source code is governed by a BSD-style license that can beNEWLINE# found in the LICENSE file.NEWLINENEWLINEimport filecmpNEWLINEimport gyp.commonNEWLINEimport gyp.xcodeproj_fileNEWLINEimport gyp.xcode_n...
from lib.base import BaseJiraActionNEWLINEfrom lib.formatters import to_attachment_dictNEWLINENEWLINE__all__ = [NEWLINE 'GetJiraIssueAttachmentsAction'NEWLINE]NEWLINENEWLINENEWLINEclass GetJiraIssueAttachmentsAction(BaseJiraAction):NEWLINE def run(self, issue_key):NEWLINE issue = self._client.issue(issue_k...
from django.contrib.contenttypes.models import ContentTypeNEWLINEimport jsonNEWLINENEWLINEfrom django.http import Http404, HttpResponseNEWLINEfrom django.contrib import messagesNEWLINEfrom django.contrib.auth import get_user_modelNEWLINEfrom django.contrib.auth.decorators import login_required, user_passes_testNEWLINEf...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License").NEWLINE# You may not use this file except in compliance with the License.NEWLINE# A copy of the License is located atNEWLINE#NEWLINE# http://www.apache.org/license...
#!python3NEWLINE#encoding: utf-8NEWLINEimport requestsNEWLINEfrom bs4 import BeautifulSoupNEWLINEimport os.pathNEWLINE"""NEWLINEBeautifulSoupでは擬似クラスはnth-of-typeしか実装されていないらしい。NEWLINENotImplementedError: Only the following pseudo-classes are implemented: nth-of-type.NEWLINEここではその代わりとなる関数を実装する。NEWLINE"""NEWLINEclass CssPs...
#!/usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE# @Time : 2018/7/31 12:28NEWLINE# @Author : Ma xiaoquanNEWLINE# @Email : xiaoquan.ma@nokia-sbell.comNEWLINE# @Site :NEWLINE# @File : pydbsync.pyNEWLINE# @desc:NEWLINENEWLINEimport MySQLdb as mdbNEWLINEimport reNEWLINEimport sysNEWLINEimport os.pathNEWLINEfrom da...
# -*- coding: utf-8 -*-NEWLINEfrom __future__ import print_functionNEWLINEfrom time import timeNEWLINEimport osNEWLINENEWLINEimport numpy as npNEWLINEfrom pylab import *NEWLINEnp.set_printoptions(threshold=np.nan)NEWLINEnp.set_printoptions(linewidth=150)NEWLINENEWLINEfrom sklearn import preprocessingNEWLINEfrom sklearn...
# Lint as: python3NEWLINENEWLINE# Copyright 2020 Google LLC.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENS...
"""NEWLINE Copyright (c) 2019-2020 Intel CorporationNEWLINE Licensed under the Apache License, Version 2.0 (the "License");NEWLINE you may not use this file except in compliance with the License.NEWLINE You may obtain a copy of the License atNEWLINE http://www.apache.org/licenses/LICENSE-2.0NEWLINE Unless required...
"""Script to calculate and save teams data for all seasons on file"""NEWLINENEWLINEimport loggingNEWLINENEWLINEfrom pynba import (NEWLINE seasons_on_file,NEWLINE halfgames_from_file,NEWLINE teams_from_halfgames,NEWLINE save_teams,NEWLINE save_team_plots,NEWLINE use_blackontrans_style,NEWLINE)NEWLINENE...
from abc import ABCNEWLINEimport loggingNEWLINENEWLINEimport ci_sdrNEWLINEimport fast_bss_evalNEWLINEimport torchNEWLINENEWLINENEWLINEfrom espnet2.enh.loss.criterions.abs_loss import AbsEnhLossNEWLINENEWLINENEWLINEclass TimeDomainLoss(AbsEnhLoss, ABC):NEWLINE """Base class for all time-domain Enhancement loss module...
import itertoolsNEWLINEimport mathNEWLINEimport stringNEWLINEimport sysNEWLINEfrom bisect import bisect_left as bi_lNEWLINEfrom bisect import bisect_right as bi_rNEWLINEfrom collections import Counter, defaultdict, dequeNEWLINEfrom functools import lru_cache, reduceNEWLINEfrom heapq import heapify, heappop, heappushNEW...
# coding=utf-8NEWLINE# --------------------------------------------------------------------------NEWLINE# Copyright (c) Microsoft Corporation. All rights reserved.NEWLINE# Licensed under the MIT License. See License.txt in the project root forNEWLINE# license information.NEWLINE#NEWLINE# Code generated by Microsoft (R)...
import torchNEWLINENEWLINEfrom .resnet import NormalizationNEWLINEfrom .preact_resnet import preact_resnetNEWLINEfrom .resnet import resnetNEWLINEfrom .wideresnet import wideresnetNEWLINENEWLINEfrom .preact_resnetwithswish import preact_resnetwithswishNEWLINEfrom .wideresnetwithswish import wideresnetwithswishNEWLINENE...
#!/usr/bin/env pythonNEWLINE# Copyright (c) 2011 Google Inc. All rights reserved.NEWLINE#NEWLINE# Redistribution and use in source and binary forms, with or withoutNEWLINE# modification, are permitted provided that the following conditions areNEWLINE# met:NEWLINE#NEWLINE# * Redistributions of source code must retai...
words =[ "aback","abaft","abandoned","abashed","aberrant","abhorrent","abiding","abject","ablaze","able","abnormal","aboard","aboriginal","abortive","abounding","abrasive","abrupt","absent","absorbed","absorbing","abstracted","absurd","abundant","abusive","accept","acceptable","accessible","accidental","account","accur...
from typing import OptionalNEWLINENEWLINEtry:NEWLINE from .tree_node import NodeNEWLINEexcept ImportError:NEWLINE from tree_node import NodeNEWLINENEWLINENEWLINE# auto-balanced-binary-search-tree (AVL tree) implemented by Xanonymous.NEWLINE# worst case: O(log n)NEWLINENEWLINEclass AVLTree:NEWLINE def __init__(...
#MenuTitle: Build Circled GlyphsNEWLINE# -*- coding: utf-8 -*-NEWLINEfrom __future__ import division, print_function, unicode_literalsNEWLINE__doc__="""NEWLINEBuilds circled numbers and letters (U+24B6...24EA and U+2460...2473) from _part.circle and the letters and figures.NEWLINE"""NEWLINENEWLINEfrom Foundation import...
import importlibNEWLINEimport inspectNEWLINEimport mathNEWLINENEWLINEimport numpy as npNEWLINEimport pytestNEWLINENEWLINEfrom river import optimNEWLINENEWLINENEWLINE@pytest.mark.parametrize(NEWLINE "loss",NEWLINE [NEWLINE pytest.param(loss(), id=name)NEWLINE for name, loss in inspect.getmembers(NEWL...
# pylint: disable=too-many-linesNEWLINE# coding=utf-8NEWLINE# --------------------------------------------------------------------------NEWLINE# Copyright (c) Microsoft Corporation. All rights reserved.NEWLINE# Licensed under the MIT License. See License.txt in the project root for license information.NEWLINE# Code gen...
"""!NEWLINE@brief Improved Experiment Argument Parser for SudoRmRfNEWLINENEWLINE@author Efthymios Tzinis {etzinis2@illinois.edu}NEWLINE@copyright University of Illinois at Urbana-ChampaignNEWLINE"""NEWLINENEWLINEimport argparseNEWLINENEWLINENEWLINEdef get_args():NEWLINE """! Command line parser """NEWLINE parser ...
import audiovisuaaliNEWLINEfrom urllib.request import quoteNEWLINEfrom requests import get as rgetNEWLINEfrom json import loadsNEWLINENEWLINE# trumpNEWLINEasync def trump(message, client, arguments):NEWLINENEWLINE #Starting to fetch a CatfactNEWLINE query = "https://api.tronalddump.io/search/quote?query={}".forma...
"""NEWLINEThe tsnet.postprocessing.time_history module contains functionsNEWLINEto plot the time history of head and velocity at the start andNEWLINEend point of a pipeNEWLINE"""NEWLINEfrom __future__ import print_functionNEWLINEimport matplotlib.pyplot as pltNEWLINENEWLINEdef plot_head_history(pipe,H,wn,tt):NEWLINE ...
import argparseNEWLINENEWLINEimport torchNEWLINEfrom torch_geometric.nn import Node2VecNEWLINEfrom torch_geometric.utils import to_undirectedNEWLINENEWLINEfrom ogb.nodeproppred import PygNodePropPredDatasetNEWLINENEWLINENEWLINEdef save_embedding(model):NEWLINE torch.save(model.embedding.weight.data.cpu(), 'embedding...
from __future__ import absolute_import, divisionNEWLINE__author__ = 'katharine'NEWLINENEWLINEfrom six import indexbytesNEWLINEfrom six.moves import rangeNEWLINENEWLINEfrom libpebble2.events.mixin import EventSourceMixinNEWLINEfrom libpebble2.exceptions import ScreenshotErrorNEWLINEfrom libpebble2.protocol.screenshots i...
from qrandom.qrandom import QRandom
# -*- coding: utf-8 -*-NEWLINE"""Chemical Engineering Design Library (ChEDL). Utilities for process modeling.NEWLINECopyright (C) 2016, 2017, 2018, 2020 Caleb Bell <Caleb.Andrew.Bell@gmail.com>NEWLINENEWLINEPermission is hereby granted, free of charge, to any person obtaining a copyNEWLINEof this software and associate...
from io import BytesIONEWLINENEWLINEfrom PIL import ImageNEWLINEfrom flask import send_fileNEWLINENEWLINEfrom utils import httpNEWLINEfrom utils.endpoint import Endpoint, setupNEWLINENEWLINENEWLINE@setupNEWLINEclass Rip(Endpoint):NEWLINE params = ['avatar0']NEWLINENEWLINE def generate(self, avatars, text, usernam...
text = """NEWLINE//------------------------------------------------------------------------------NEWLINE// Explicit instantiation.NEWLINE//------------------------------------------------------------------------------NEWLINE#include "Mesh/MeshPolicy.cc"NEWLINE#include "Geometry/Dimension.hh"NEWLINENEWLINEnamespace Sphe...
#!/usr/bin/env python2NEWLINE#NEWLINE# Distributed under the MIT/X11 software license, see the accompanyingNEWLINE# file COPYING or http://www.opensource.org/licenses/mit-license.php.NEWLINE#NEWLINENEWLINEfrom test_framework.mininode import *NEWLINEfrom test_framework.test_framework import BitcoinTestFrameworkNEWLINEfr...
# -*- coding: utf-8 -*-NEWLINEfrom __future__ import unicode_literalsNEWLINENEWLINEfrom django.db import migrations, modelsNEWLINEimport core.utilsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('questions', '0007_auto_20151209_1526'),NEWLINE ]NEWLINENEWLI...
import itertoolsNEWLINEimport mathNEWLINEimport stringNEWLINEimport sysNEWLINEfrom bisect import bisect_left as bi_lNEWLINEfrom bisect import bisect_right as bi_rNEWLINEfrom collections import Counter, defaultdict, dequeNEWLINEfrom functools import lru_cache, reduceNEWLINEfrom heapq import heapify, heappop, heappushNEW...
import sysNEWLINEimport osNEWLINEimport gzipNEWLINEimport numpy as npNEWLINEimport pickleNEWLINEimport scipy.io as sioNEWLINEimport h5pyNEWLINENEWLINENEWLINEdef to_one_hot(x, depth):NEWLINE ret = np.zeros((x.shape[0], depth), dtype=np.int32)NEWLINE ret[np.arange(x.shape[0]), x] = 1NEWLINE return retNEWLINENEWL...
WINDOW_TITLE = "ElectriPy"NEWLINEHEIGHT = 750NEWLINEWIDTH = 750NEWLINERESIZABLE = TrueNEWLINEFPS = 40NEWLINEDEFAULT_FORCE_VECTOR_SCALE_FACTOR = 22e32NEWLINEDEFAULT_EF_VECTOR_SCALE_FACTOR = 2e14NEWLINEDEFAULT_EF_BRIGHTNESS = 105NEWLINEDEFAULT_SPACE_BETWEEN_EF_VECTORS = 20NEWLINEMINIMUM_FORCE_VECTOR_NORM = 10NEWLINEMINIM...
# coding: utf-8NEWLINENEWLINEimport copyNEWLINEimport jsonNEWLINEimport loggingNEWLINEimport osNEWLINEimport uuidNEWLINEfrom io import BytesIONEWLINEfrom unittest.mock import patchNEWLINENEWLINEfrom django.contrib.auth import get_user_modelNEWLINEfrom django.contrib.auth.models import PermissionNEWLINEfrom django.contr...
from __future__ import absolute_importNEWLINEfrom __future__ import divisionNEWLINEfrom __future__ import print_functionNEWLINENEWLINEimport cv2NEWLINEfrom IPython import displayNEWLINEfrom PIL import ImageNEWLINENEWLINENEWLINEdef cv2_imshow(a):NEWLINE """A replacement for cv2.imshow() for use in Jupyter notebooks.N...
# BGP SP Topology APIsNEWLINE# Author: Naveena Suvarna (naveen.suvarna@broadcom.com)NEWLINENEWLINEimport copyNEWLINENEWLINEfrom spytest import st, utils, putilsNEWLINEfrom spytest.dicts import SpyTestDictNEWLINEimport apis.routing.ip as ipapiNEWLINEimport apis.routing.bgp as bgpapiNEWLINEimport apis.system.interfac...
#-NEWLINE# Copyright (c) 2013 Michael RoeNEWLINE# All rights reserved.NEWLINE#NEWLINE# This software was developed by SRI International and the University ofNEWLINE# Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237NEWLINE# ("CTSRD"), as part of the DARPA CRASH research programme.NEWLINE#NEWLINE#...
import rlpNEWLINENEWLINEfrom bxutils.logging.log_level import LogLevelNEWLINENEWLINEfrom bxgateway.messages.eth.protocol.eth_protocol_message import EthProtocolMessageNEWLINEfrom bxgateway.messages.eth.protocol.eth_protocol_message_type import EthProtocolMessageTypeNEWLINEfrom bxgateway.messages.eth.serializers.block_h...
from msgflow.service import TwitterSampleStreamServiceNEWLINEfrom msgflow.service.twitter_service import TwitterConfigNEWLINEfrom msgflow.bot import BotNEWLINENEWLINENEWLINEclass MockTwitterApi:NEWLINE def get_sample_stream(self):NEWLINE tweets = [NEWLINE {"id": "0", "text": "test0", "lang": "ja"},...
import binasciiNEWLINEimport datetimeNEWLINENEWLINEfrom django.db.backends.base.schema import (NEWLINE BaseDatabaseSchemaEditor,NEWLINE _is_relevant_relation,NEWLINE _related_non_m2m_objects,NEWLINE logger,NEWLINE)NEWLINEfrom django.db.backends.ddl_references import (NEWLINE Columns,NEWLINE IndexName,...
import pytestNEWLINEimport torchNEWLINENEWLINEfrom pytorch_toolbelt.modules import HFF, GlobalKMaxPool2d, ResidualDeconvolutionUpsample2dNEWLINENEWLINEskip_if_no_cuda = pytest.mark.skipif(not torch.cuda.is_available(), reason="Cuda is not available")NEWLINENEWLINENEWLINEdef test_hff_dynamic_size():NEWLINE feature_ma...
import jsonNEWLINEimport randomNEWLINEimport reNEWLINENEWLINEimport discordNEWLINEfrom redbot.core import checksNEWLINEfrom redbot.core import commandsNEWLINEfrom redbot.core.bot import RedNEWLINEfrom redbot.core.utils.chat_formatting import inline, boxNEWLINENEWLINEfrom rpadutils import CogSettings, clean_global_menti...
from django.core.files.base import ContentFileNEWLINENEWLINEfrom readable.models import DocumentsNEWLINENEWLINEfrom .utils import TestCaseNEWLINENEWLINENEWLINEclass TestDocuments(TestCase):NEWLINE def setUp(self) -> None:NEWLINE super(TestDocuments, self).setUp()NEWLINE self.user = self.create_user("st...
import operatorNEWLINENEWLINENEWLINEdef parse(data):NEWLINE return [NEWLINE tuple(tuple(int(c) for c in l.split(",")) for l in s.split("\n")[1:])NEWLINE for s in data.split("\n\n")NEWLINE ]NEWLINENEWLINENEWLINEdef rot_x(cords):NEWLINE return tuple((x, z, -y) for x, y, z in cords)NEWLINENEWLINENEW...
#!/usr/bin/env pythonNEWLINE# encoding: utf-8NEWLINENEWLINEname = "Intra_R_Add_Exo_scission/training"NEWLINEshortDesc = "Kinetics used to train group additivity values"NEWLINElongDesc = """NEWLINEPut kinetic parameters for reactions to use as a training set for fittingNEWLINEgroup additivity values in this file.NEWLINE...
# coding=utf-8NEWLINE# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***NEWLINE# *** Do not edit by hand unless you're certain you know what you are doing! ***NEWLINENEWLINEimport warningsNEWLINEimport pulumiNEWLINEimport pulumi.runtimeNEWLINEfrom typing import UnionNEWLINEfrom .. im...
"""CL device arrays."""NEWLINENEWLINEfrom __future__ import divisionNEWLINENEWLINE__copyright__ = "Copyright (C) 2009 Andreas Kloeckner"NEWLINENEWLINE__license__ = """NEWLINEPermission is hereby granted, free of charge, to any personNEWLINEobtaining a copy of this software and associated documentationNEWLINEfiles (the ...
from __future__ import print_functionNEWLINENEWLINEimport osNEWLINEimport astNEWLINEimport jsonNEWLINEimport globNEWLINEimport reNEWLINEimport sysNEWLINEimport demisto_clientNEWLINEfrom threading import Thread, LockNEWLINEfrom demisto_client.demisto_api.rest import ApiExceptionNEWLINEfrom demisto_sdk.commands.common.to...
# coding=utf-8NEWLINE# Copyright 2018 The TF-Agents Authors.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE...
from kivy.uix.boxlayout import BoxLayoutNEWLINEfrom kivy.app import AppNEWLINEfrom kivy.uix.button import ButtonNEWLINEfrom kivy.uix.gridlayout import GridLayoutNEWLINEfrom kivy.uix.label import LabelNEWLINEfrom kivy.uix.textinput import TextInputNEWLINEfrom kivy.uix.carousel import CarouselNEWLINENEWLINENEWLINEclass M...
#!/usr/bin/env python3NEWLINENEWLINE"""NEWLINEbotshot.py 0.2 - Mass Web Screenshot Command Line ScriptNEWLINECopyright (c) 2017-2020 Marco Ivaldi <raptor@0xdeadbeef.info>NEWLINENEWLINE"The Other Way to Pen-Test" --HD Moore & ValsmithNEWLINENEWLINEBotshot is a Python script that captures screenshots ofNEWLINEwebsites fr...
import jsonNEWLINENEWLINEfrom django.template.loader import render_to_stringNEWLINEfrom django.urls import reverseNEWLINEfrom django.utils.translation import ugettext_lazy as _NEWLINEfrom wagtail.admin.widgets import AdminChooserNEWLINENEWLINENEWLINEclass AdminModelChooser(AdminChooser):NEWLINE show_edit_link = Fals...
#!/usr/bin/env python3NEWLINE# -*- coding: utf-8 -*-NEWLINE"""NEWLINECreated on Mon Mar 18 14:28:47 2019NEWLINENEWLINE@author: smrakNEWLINE"""NEWLINEimport osNEWLINEimport numpy as npNEWLINEimport madrigalWeb.madrigalWebNEWLINEimport subprocessNEWLINE#from dateutil import parserNEWLINEfrom datetime import datetimeNEWLI...
from struct import unpackNEWLINENEWLINENEWLINEclass FloatLookup:NEWLINE def __init__(self, data): # data: Tuple[float]NEWLINE self.data = dataNEWLINE self.range_ = len(data)NEWLINENEWLINE @staticmethodNEWLINE def get_lookup_from_double(file) -> 'FloatLookup':NEWLINE range_, = unpack('>i',...
# Copyright 2021 NVIDIA CorporationNEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLINE# Unle...
NEWLINEimport loggingNEWLINEfrom deep_lyric_visualizer.helpers import setup_logger, _extract_name_from_pathNEWLINEfrom deep_lyric_visualizer.generator.generation_environment import (GenerationEnvironment,NEWLINE WikipediaBigGANGenerationEnviornment)NEWL...
# coding=utf-8NEWLINE# --------------------------------------------------------------------------------------------NEWLINE# Copyright (c) Microsoft Corporation. All rights reserved.NEWLINE# Licensed under the MIT License. See License.txt in the project root for license information.NEWLINE# -----------------------------...
# This file helps to compute a version number in source trees obtained fromNEWLINE# git-archive tarball (such as those provided by githubs download-from-tagNEWLINE# feature). Distribution tarballs (built by setup.py sdist) and buildNEWLINE# directories (produced by setup.py build) will contain a much shorter fileNEWLIN...
WINDOW_TITLE = "ElectriPy"NEWLINEHEIGHT = 750NEWLINEWIDTH = 750NEWLINERESIZABLE = TrueNEWLINEFPS = 40NEWLINEDEFAULT_FORCE_VECTOR_SCALE_FACTOR = 22e32NEWLINEDEFAULT_EF_VECTOR_SCALE_FACTOR = 2e14NEWLINEDEFAULT_EF_BRIGHTNESS = 105NEWLINEDEFAULT_SPACE_BETWEEN_EF_VECTORS = 20NEWLINEMINIMUM_FORCE_VECTOR_NORM = 10NEWLINEMINIM...
from __future__ import absolute_importNEWLINEfrom __future__ import divisionNEWLINEfrom __future__ import print_functionNEWLINENEWLINEimport tensorflow as tfNEWLINENEWLINEfrom ray.rllib.models.model import ModelNEWLINEfrom ray.rllib.models.fcnet import FullyConnectedNetworkNEWLINEfrom ray.rllib.models.action_dist impor...
#!/usr/bin/env python3NEWLINE# -*- coding: utf-8 -*-NEWLINEimport sysNEWLINENEWLINEif __name__ == '__main__':NEWLINE X1 = int(input('Введите x1 '))NEWLINE Y1 = int(input('Введите y1 '))NEWLINE X2 = int(input('Введите x2 '))NEWLINE Y2 = int(input('Введите y2 '))NEWLINENEWLINE if X1 == -X2 and Y1 == -Y2:NE...
"""NEWLINECopyright (c) 2018-2020 Intel CorporationNEWLINENEWLINELicensed under the Apache License, Version 2.0 (the "License");NEWLINEyou may not use this file except in compliance with the License.NEWLINEYou may obtain a copy of the License atNEWLINENEWLINE http://www.apache.org/licenses/LICENSE-2.0NEWLINENEWLIN...
#!/usr/bin/python3NEWLINENEWLINEimport os, sys, logging, timeNEWLINEimport requests, struct, jsonNEWLINEfrom base64 import b64decode,b64encodeNEWLINEfrom datetime import datetime,timezoneNEWLINEimport paho.mqtt.client as mqttNEWLINEfrom datetime import datetimeNEWLINEfrom yawigle import clientNEWLINENEWLINE## Import lo...
# -*- coding: utf-8 -*-NEWLINE# Copyright (c) Facebook, Inc. and its affiliates. All Rights ReservedNEWLINEimport loggingNEWLINEimport copyNEWLINEimport torchNEWLINEimport torchvisionNEWLINEimport numpy as npNEWLINEimport cv2NEWLINEfrom PIL import ImageNEWLINEfrom fvcore.common.file_io import PathManagerNEWLINEfrom fvc...
# drawFace.pywNEWLINE# A program which draws facesNEWLINE"""Write and test a function to meet this specification.NEWLINENEWLINEdrawFace(center, size, win) center is a Point, size is an int, and win is aNEWLINEGraphWin. Draws a simple face of the given size in win.NEWLINENEWLINEYour function can draw a simple smiley (or...
[ ## this file was manually modified by jtNEWLINE {NEWLINE 'functor' : {NEWLINE 'arity' : '1',NEWLINE 'call_types' : [],NEWLINE 'ret_arity' : '0',NEWLINE 'rturn' : {NEWLINE 'default' : 'T',NEWLINE },NEWLINE 'simd_types' : [],NEWLINE 'special'...