text
stringlengths
1
927k
from Bio import SeqIO def contig_filter(input_path, filtered_path, min_length): # Inside {username}ContigFilterImpl#run_{username}ContigFilter_max, after you have fetched the fasta file: # Parse the downloaded file in FASTA format parsed_assembly = SeqIO.parse(input_path, 'fasta') min_length = min_len...
# -*- coding: utf-8 -*- """okapi URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home,...
# Copyright 2021. ThingsBoard # # 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 law ...
# CODING-STYLE CHECKS: # pycodestyle test_calculate.py import os import json from io import StringIO import tempfile import copy import six import pytest import numpy as np import pandas as pd from taxcalc import Policy, Records, Calculator, Behavior, Consumption RAWINPUTFILE_FUNITS = 4 RAWINPUTFILE_YEAR = 2015 RAWI...
import requests import re from django import template from django.utils.safestring import mark_safe import markdown as _markdown import bleach from pymdownx import emoji from drafthub.draft.utils import get_data_from_url markdown_kwargs = { 'extensions':[ 'pymdownx.superfences', 'markdown.extensi...
import os import torch import numpy as np import nn.vnn as vnn import collections from torch import nn from torch.nn import functional as F from torch.nn.utils.rnn import pad_sequence, pack_padded_sequence, pad_packed_sequence from model.seq2seq import Module as Base from models.utils.metric import compute_f1, compute_...
# IMPORTATION STANDARD import os # IMPORTATION THIRDPARTY import pandas as pd import pytest # IMPORTATION INTERNAL from gamestonk_terminal.etf.discovery import disc_controller # pylint: disable=E1101 # pylint: disable=W0603 # pylint: disable=E1111 EMPTY_DF = pd.DataFrame() @pytest.mark.vcr(record_mode="none") @py...
import sys from PyQt5 import QtWidgets class game(QtWidgets.QMainWindow): def __init__(self): self.ap = QtWidgets.QApplication(sys.argv) super(game, self).__init__() self.setGeometry(100,100,200,200) self.conts() self.x = 50 self.y = 50 def moving(self): s...
""" Functions for the construction of new models. """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government...
def divide_by_zero_check(func): """ Decorator for checking division by zero from user input """ def inner(value): if value.value == 0: raise ValueError('Cannot divide by zero!') return func(value) return inner
import unittest import numpy as np from spglib import get_symmetry_dataset, get_hall_number_from_symmetry from vasp import read_vasp from os import listdir dirnames = ('cubic', 'hexagonal', 'monoclinic', 'orthorhombic', 'tetragonal', 'triclinic', ...
import pandas as pd import numpy as np from nltk.corpus import words import nltk import re import string from data_processing import DisasterProcessor X = pd.read_csv("emotion_data/tweet_emotions.csv") stop_wrds = nltk.corpus.stopwords.words("english") columns = X.columns columns = ["content"] preprocessor = Disaster...
from collections.abc import MutableMapping, Set import dis from types import CodeType from types import FrameType from sys import version_info from crosshair.core import CrossHairValue from crosshair.core import register_opcode_patch from crosshair.libimpl.builtinslib import SymbolicInt from crosshair.libimpl.builtins...
from linptech.crc8 import crc8 import logging class Packet(object): ''' Base class for Packet. Mainly used for for packet generation and Packet.parse_msg(buf) for parsing message. parse_msg() returns subclass, if one is defined for the data type. ''' def __init__(self, data=None, optional="00"*7): if data i...
from __future__ import annotations import unittest import time import matplotlib.pyplot as plt import numpy as np from typing import List, Tuple, Dict, Set, Callable, Type class Dot(): def __init__(self, position: Tuple[float, float], velocity: Tuple[float, float], acceleration: Tuple[float, float]): self.__posi...
# Copyright (c) OpenMMLab. All rights reserved. from .assign_score import assign_score_withk from .paconv import PAConv, PAConvCUDA __all__ = ['assign_score_withk', 'PAConv', 'PAConvCUDA']
# -*- coding: utf-8 -*- # Copyright (c) 2019, Systematic and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class WiserWebsiteSettings(Document): def on_update(self): from frappe.website.render import c...
# import packages import sys def load_data(data_file): # read in file # clean data # load to database # define features and label arrays return X, y def build_model(): # text processing and model pipeline # define parameters for GridSearchCV # create gridsearch object and...
import unittest from lib.errors.configuration_error import ConfigurationError from tests.helper.voctomix_test import VoctomixTest from lib.audiomix import AudioMix from lib.config import Config # noinspection PyUnusedLocal class AudiomixMultipleSources(VoctomixTest): def test_no_configured_audiosource_sets_first...
__all__ = ['Middleware'] from gevent.queue import Queue # 工作栈 class Middleware: # cache of redis zeus = Queue() # Trash apollo = Queue() theseus = {} # 共享任务队列 poseidon = Queue() hera = Queue() # FIXME # 不明原因bug 使用dict(zip())方案生成的同样的变量, # 在经过同一个函数方案后输出竟然不一样 cach...
# -*- coding: utf-8 -*- import json import random import string import unittest from flask import current_app from config import config from app import create_app, db, redis, add_api_support class BasicsTestCase(unittest.TestCase): def setUp(self): test_app = create_app(config['testing']) test_ap...
#!/usr/bin/python3 IMAGE_SIZE = 1024 NUM_SOURCES = 200 NUM_IMAGES = 1 RA_MIN, RA_MAX = (-50, 50) DEC_MIN, DEC_MAX = (-30, 50) OFFSET_RA = 1.1 # need to fine tune to fit sources into image OFFSET_DEC = 0.7 # # measure bg rms # from astropy.io import fits import numpy as np try: # if there is already a backgroun...
import re # regular expressions import antlr4 from antlr4.Token import CommonToken import antlr4.tree from antlr4.CommonTokenStream import CommonTokenStream from typing import List, Optional from gen.java.JavaParser import JavaParser from gen.java.JavaParserListener import JavaParserListener class Program: def...
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
import multiprocessing as mp from collections import OrderedDict from typing import Any, Callable, List, Optional, Sequence, Tuple, Type, Union import gym import numpy as np from stable_baselines3.common.vec_env.base_vec_env import ( CloudpickleWrapper, VecEnv, VecEnvIndices, VecEnvObs, VecEnvStep...
import json from flask import request, render_template from app.utils.docx.docx import set_sand_docxtpl from config import Config from app.main import main @main.route('/test_report/', methods=['GET', 'POST']) def test_report(): if request.method == 'POST': file_location = Config.SAVE_DOCUMENT_PATH ...
""" XKCD plot generator ------------------- Author: Jake Vanderplas This is a script that will take any matplotlib line diagram, and convert it to an XKCD-style plot. It will work for plots with line & text elements, including axes labels and titles (but not axes tick labels). The idea for this comes from work by Da...
import os import tensorflow as tf from nets.yolo import get_yolo_loss from tqdm import tqdm #------------------------------# # 防止bug #------------------------------# def get_train_step_fn(strategy): @tf.function def train_step(imgs, targets, net, yolo_loss, optimizer): with tf.GradientTape() as tap...
''' Copyright 2017, Fujitsu Network Communications, Inc. 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 law or agreed to in w...
""" Collection of old doppyo functions and useful tidbits for internal dcfp use Authors: Dougie Squire and Thomas Moore Date created: 01/10/2018 Python Version: 3.6 """ # =================================================================================================== # Packages # ===================...
#!/usr/bin/env python3 """ Demo for exponentiated Jensen-Tsallis kernel-1 estimators. Analytical vs estimated value is illustrated for spherical normal random variables. """ from numpy import eye from numpy.random import rand, multivariate_normal, randn from scipy import arange, zeros, ones import matplotlib.pyplot...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('reviews'...
#Simple We Browser using sockets import socket mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) mysock.connect(('data.pr4e.org', 80)) cmd = 'GET http://data.pr4e.org/romeo.txt HTTP/1.0\r\n\r\n'.encode() mysock.send(cmd) while True : data = mysock.recv(512) if len(data) < 1 : break ...
from flask import Flask, jsonify import data4app app = Flask(__name__) @app.route("/") def home(): return "Lets goooo!!!" @app.route("/<var>") def jsonified(var): data = data4app.get_data(var) return jsonify(data) if __name__ == "__main__": app.run(debug=True)
# Copyright 2020 The Tekton 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 required by applicable law or agreed to in wr...
from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/fdtd-2d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/fdtd-2d/tmp_files/144.c') procedure('kernel_fdtd_2d') loop(0) known(' nx > 1 ') known(' ny > 1 ') til...
import pyproctor class TestBase(pyproctor.TestBase): @classmethod def setUpClass(cls): """ This exists to make sure that no matter what, tests will log on stdout. Every call to basicConfig after this point will be a no-op """ # AGI-731 # See...
def test_import_index(): ''' Try to import the indexd package. ''' import indexd
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
import atexit import importlib import logging import requests class ApiClient: def __init__(self, **kwargs): self.kwargs = kwargs self.session = requests.Session() self.libns = self.get_export_url() + "components/library.owl#" self.dcdom = self.get_export_url() + "data/ontology.ow...
import os import shutil import pytest from ramp_utils import read_config from ramp_utils import generate_ramp_config from ramp_utils.testing import database_config_template from ramp_utils.testing import ramp_config_template from ramp_database.utils import setup_db from ramp_database.utils import session_scope fro...
import python.common.middleware as middleware import python.common.actions as actions import python.common.rsi_email as rsi_email import python.common.rest as rest def get_available_time_slots() -> list: """ An application is ready for scheduling when all the payment rules are satisfied plus: - the ap...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_dj-prosftpd ------------ Tests for `dj-prosftpd` models module. """ from django.test import TestCase from dj_prosftpd import models class TestDj_prosftpd(TestCase): def setUp(self): pass def test_something(self): pass def tearDo...
#!/usr/bin/env python from contextlib import contextmanager import argparse import sys import sshtunnel from sqlalchemy import * from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from fermi_blind_search.configuration import get_config from fermi_blind_search import myLoggi...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone import sys from django.db import connection def convert_probe_field_list_to_field(apps, schema_editor): """ For each current Probe, copy field_list[0] into field, and create n...
import numpy as np import os from pathlib import Path import unittest import ray import ray.rllib.agents.marwil as marwil from ray.rllib.evaluation.postprocessing import compute_advantages from ray.rllib.offline import JsonReader from ray.rllib.utils.framework import try_import_tf, try_import_torch from ray.rllib.util...
import os import logging import matplotlib.pyplot as plt logger = logging.getLogger(__name__) path = os.path.dirname(os.path.realpath(__file__)) path = os.path.join(path, 'Data') COLORTEFF_PATH = os.path.join(path, 'ColorTeff') MODATM_PATH = os.path.join(path, 'ModelAtmospheres') ISOCHRONES_PATH = os.path.join...
#!/usr/bin/env python3.8 """ given a number N generate N no of fibonacci numbers """ from memoize import memoize number = 25 fib_list = [None] * (number) def fibonacci(num): """ fibonacci series using iteration """ a, b = 0, 1 for i in range(num-1): fib_list[i], fib_list[i+1] = a, b a, b = b, a+b return a...
__all__ = [] from pydatastructs.linear_data_structures import arrays, linked_lists, algorithms from pydatastructs.linear_data_structures.arrays import OneDimensionalArray, DynamicOneDimensionalArray, \ MultiDimensionalArray from pydatastructs.linear_data_structures.algorithms import merge_sort_parallel, brick_so...
""" WSGI config for Epitome project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTI...
""" Django settings for meiduotest project. Generated by 'django-admin startproject' using Django 1.11.11. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ impor...
import torch import torch.nn as nn from mmcv.runner import ModuleList from ..builder import HEADS from ..utils import ConvUpsample from .base_semantic_head import BaseSemanticHead @HEADS.register_module() class PanopticFPNHead(BaseSemanticHead): """PanopticFPNHead used in Panoptic FPN. Arg: num_clas...
from django.apps import AppConfig import pandas as pd import sys class DashboardConfig(AppConfig): name = 'dashboard' def ready(self): if 'runserver' not in sys.argv: return True from dashboard.models import Case, State, Country
import turtle tortuguita = turtle.Turtle() tortuguita.color('blue') tortuguita.speed(100) for i in range (18): tortuguita.circle(200,100) tortuguita.left(110) tortuguita.up() tortuguita.left(35) tortuguita.forward(160) tortuguita.down() tortuguita.dot(70,"black") tortuguita.left(35) tortuguita.up() tortugui...
# Copyright (c) 2019-2020 SAP SE or an SAP affiliate company. All rights reserved. This file is # licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the L...
from typing import Dict, Optional, Tuple, List import aiosqlite from src.consensus.sub_block_record import SubBlockRecord from src.types.header_block import HeaderBlock from src.util.ints import uint32, uint64 from src.wallet.block_record import HeaderBlockRecord from src.types.sized_bytes import bytes32 class Walle...
#!/usr/bin/python # Copyright (c) 2020, 2022 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
""" Django settings for CodingEasy project. Generated by 'django-admin startproject' using Django 4.0.1. For more information on this file, see https://docs.djangoproject.com/en/4.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/4.0/ref/settings/ """ from path...
#!/usr/bin/env python3 """ Creates full-image tfrecords to use the Bosch Small Traffic Lights Dataset with the Tensorflow Object Detection API. The training set is split into training and validation. Tfrecords are created for a training, validation, and test set. Labels are grouped by their respective colors to simpli...
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unittests for generate_delta_sysroot.""" from __future__ import print_function import os from chromite.lib import cros_build_lib from chromite.l...
""" CH 9.1 Applications/Image Augmentation """ from sklearn import model_selection from keras import datasets import keras assert keras.backend.image_data_format() == 'channels_last' from keraspp import aigen class Machine(aigen.Machine_Generator): def __init__(self): (x_train, y_train), (x_test, y_test)...
class IndexObject: hash: str crc32: int pack_end_offset: int pack_start_offset: int def __init__(self, hash: str, crc32: int, pack_start_offset: int): self.hash = hash self.crc32 = crc32 self.pack_start_offset = pack_start_offset
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Dalwar Hossain' __email__ = 'dalwar.hossain@protonmail.com' from setuptools import setup def readme(): with open('README.md') as f: return f.read() setup(name='pyrainbowterm', version='1.0', description='pyrainbowterm - Smart cu...
# -*- coding: utf-8 -*- # file: text_classifier.py # author: yangheng <yangheng@m.scnu.edu.cn> # Copyright (C) 2020. All Rights Reserved. import json import os import pickle import random import numpy import torch from findfile import find_file from termcolor import colored from torch.utils.data import DataLoader from...
from .tokenizer import Tokenizer from .vocab import Vocab from .doc import Doc from .pointers.doc_pointer import DocPointer from .pipeline import SubPipeline from syft.generic.object import AbstractObject from syft.workers.base import BaseWorker from syft.generic.string import String from syft.generic.pointers.string_...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import frappe.defaults from frappe.desk.notifications import (delete_notification_count_for, clear_notifications) common_default_keys = ["__default", "__global"] ...
import numpy as np import torch from torch.utils.data import Dataset, DataLoader from torchvision import transforms as tfs from PIL import Image import os, cv2, copy, time from config import * # args. image_height, image_width = opt.image_height, opt.image_width intrinsics = opt.intrinsics close_radius, far_radiuses ...
""" This module provides data loaders and transformers for popular vision datasets. """ from .mscoco import COCOSegmentation from .cityscapes import CitySegmentation from .ade import ADE20KSegmentation from .pascal_voc import VOCSegmentation from .pascal_aug import VOCAugSegmentation from .sbu_shadow import SBUSegmenta...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Adrian Böckenkamp # License: BSD (https://opensource.org/licenses/BSD-3-Clause) # Date: 08/06/2020 import rospkg import os import sys import Pyro4 from . import logger class Package: """ Encapsulates a ROS package and its ability to find files in...
""" The Cibin package. """ __version__ = "0.0.1" from .cibin import *
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2014 Jérémie DECOCK (http://www.jdhp.org) # 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 witho...
from shutil import rmtree from subprocess import run from pathlib import Path from itertools import chain from more_itertools import consume dirnames = ['build', 'dist'] paths = map(lambda path: Path(path), dirnames) outputs = chain(paths, Path().glob('*.egg-info')) exists = filter(lambda path: path.exists(), outputs...
import pytz import json from unicodedata import normalize from distutils.version import StrictVersion from django.core.exceptions import ValidationError from rest_framework import serializers as ser from rest_framework import exceptions from api.base.exceptions import Conflict, InvalidModelValueError, JSONAPIException...
from django.db import models class Person(models.Model): name = models.CharField(max_length=200) class Movie(models.Model): title = models.CharField(max_length=200) director = models.ForeignKey(Person, models.CASCADE) class Event(models.Model): pass class Screening(Event): movie = models.For...
""" Tests for line search routines """ from numpy.testing import (assert_, assert_equal, assert_array_almost_equal, assert_array_almost_equal_nulp, assert_warns, suppress_warnings) import scipy.optimize.linesearch as ls import scipy.optimize.nonlin as nl #(LS) from ...
# Copyright 2021 The Bazel Authors. All rights reserved. # # 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 la...
from .exceptions import PSAWException def requires_private_key(method): def wrapper(self, *args, **kwargs): if not self.private_key: raise PSAWException( 'The {} method requires a private key'.format(method.__name__)) return method(self, *args, **kwargs) return wrapp...
import pandas as pd import matplotlib.pyplot as plt from data import games attendance = games.loc[(games['type'] == 'info') & (games['multi2'] == 'attendance'), ['year', 'multi3']] attendance.columns = ['year', 'attendance'] attendance.loc[:, 'attendance'] = pd.to_numeric(attendance.loc[:, 'attendance']) attendance....
import numpy as np from sklearn.model_selection import train_test_split from sklearn.preprocessing import LabelBinarizer from tensorflow.keras.datasets import mnist from tensorflow.keras.layers import * from tensorflow.keras.models import * def load_data(): (X_train, y_train), (X_test, y_test) = mnist.load_data()...
class solution: def oneEditAwayInsert(self,input1,input2): index1 = 0 index2 = 0 while((index2 < len(input2)) and (index1 < len(input1))): if(input1[index1] != input2[index2]): if(index1 != index2): return False index2+=1 ...
# -*- coding: utf-8 -*- from ccxt.async.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError class coinexchange (Exchange): def describe(self): return self.deep_extend(super(coinexchange, self).describe(), { 'id': 'coinexchange', 'name': 'CoinExcha...
l = [] a = '37107287533902102798797998220837590246510135740250\ 46376937677490009712648124896970078050417018260538\ 74324986199524741059474233309513058123726617309629\ 91942213363574161572522430563301811072406154908250\ 23067588207539346171171980310421047513778063246676\ 89261670696623633820136378418383684178734361726...
import re import requests from bs4 import BeautifulSoup from botutils.constants import IS_URL_REGEX def get_ffn_url_from_query(query): ffn_list = [] href = [] url = 'https://www.google.com/search?q=' + \ query+"+fanfiction" page = requests.get(url) soup = BeautifulSoup(page.content, 'h...
""" Copyright 2022 Objectiv B.V. """ import pytest from bach.series.series_json import JsonBigQueryAccessorImpl from tests.unit.bach.util import get_fake_df @pytest.mark.skip_postgres def test_bq_get_slice_partial_expr(dialect): # Here we test the _get_slice_partial_expr function of the BigQuery specific JsonBi...
from abc import ABC, abstractmethod from typing import Dict, Protocol, Tuple import faiss import numpy as np from pupil.types import NDArray2D from sklearn.cluster import AgglomerativeClustering class Clustering(Protocol): n_clusters: int def fit(self, X: NDArray2D): ... def predict(self, X: ND...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # 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 ...
# coding: utf-8 """ Octopus Server API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a Generated by: https://github.com/swagger-api...
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
def validateSubSequence(array, sequence): """ ### Description validateSubSequence -> validates if a sequence of elements is a subsequence of a list. ### Parameters - array: the list where it will validate the subsequence. - sequence: the potential subsequence of elements ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/Address) on 2019-01-25. # 2019, SMART Health IT. ## from . import element class Address(element.Element): """ An address expressed using postal conventions (as opposed to GPS or other...
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="bite", version="0.1", author="Samson Tan", author_email="samson.tan@salesforce.com", description="A tokenizer that splits words into bases and inflections.", long_descriptio...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: mixer/v1/config/client/service.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message f...
''' @author: Daniel Hjertholm Tests for fan-in / -out networks created by the CSA implementation in NEST. ''' import numpy.random as rnd import random import nest import csa from testsuite.fan_test import FanTester class NEST_FanTester(FanTester): ''' Tests for fan-in / -out networks created by the CSA imp...
#!/usr/bin/env python """Tests for `paper_collection` package.""" import unittest from paper_collection import paper_collection import pandas as pd import numpy as np class TestPaper_collection(unittest.TestCase): """Tests for `paper_collection` package.""" def setUp(self): """Set up test fixtur...
import re l = [] with open("functionsthunk.txt", "r") as f: s = f.readlines() for k, m in zip(s[0::2], s[1::2]): if 'non-virtual' not in k: l.append((k, m)) def sfun(a): m = re.search(r"(?:non-virtual thunk to )?(.+?\(.*\)(?: const)?\n.+\n\n)", a) print(a) return m.group(1) with open("functions.tx...
from dataclasses import dataclass from enum import Enum from typing import Optional from common.constants import PATH_TO_LIST_OF_FILES, SPLIT OPERATION_CODES = Enum('OPERATION_CODES', 'AND OR NOT') ALL = '*' @dataclass class DocumentNode: """ Data structure used to implement skip list. Contains a reference ...
from flask import Flask, session, request app = Flask(__name__) @app.route('/upload', methods=['GET', 'POST']) def hello_world(): if request.method == 'POST': session['audio_data'] = request.form['audio_data'] print(session['audio_data']) # abc = vars(request) # for i in abc: ...
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Chrony(AutotoolsPackage): """chrony is a versatile implementation of the Network Time ...