text
stringlengths
957
885k
from pathlib import Path from skimage import io import tensorflow as tf from datetime import datetime from tqdm import tqdm from dataset.datasetbase import DatasetBase from models.base import Model import numpy as np import logging def get_num_of_parameters(): total_parameters = 0 for variable in tf.traina...
<gh_stars>10-100 # -*- coding: utf-8 -*- """ Tests for pmutt.io.thermdat module Created on Fri Jul 7 12:31:00 2018 """ import unittest import pmutt.io.thermdat as thermdat import numpy as np class TestThermdat(unittest.TestCase): def test__get_fields(self): lines = [ ' test 200 ## %^& test1...
<reponame>nfahlgren/hsi_toolkit_py #function [SpecDist] = PlotSpectraDistribution(Spectra, WaveLengths,SampStuff, FigNum); ### ###################################################################### ### A FUNCTION THAT CREATES & DISPLAYS SPECTRA AS A 2D HISTOGRAM ### ### SPECTRA ARE ASSUMED REFLECTANCES OR EMIS...
import typing import struct from .basic import Message _IE_HEADER_STRUCT = struct.Struct(">BH") """ Структура заголовка IEI""" _MESSAGE_HEADER_STRUCT = struct.Struct(">BH") """ Структура заголовка сообщения """ _PROTOCOL_VERSION = 1 """ Идентификатор протокола иридиума """ class MessageParser: """ Парсилка соо...
import os import sys import random import pinyin import jieba from xpinyin import Pinyin import re sys.path.insert(0, "../") lj_speech = [ ("data/css10", "metadata.txt") ] comvoi = [ ("data/comvoi_clean", "all.txt") ] css10 = [ ("data/css10", "train.txt"), ("data/css10", "val.txt...
import time import io from datetime import datetime import pavilion.series_util from pavilion import arguments from pavilion import commands from pavilion import plugins from pavilion import series from pavilion.unittest import PavTestCase class SeriesFileTests(PavTestCase): def setUp(self): plugins.ini...
<filename>app/api/random_positions.py import random def get_block_square_positions(currentlyoccupiedpositions): positions = [] square_orientation_dic = [ "UpperLeft", "UpperRight", "LowerLeft", "LowerRight" ] block_square_not_positioned = True list_of_block_square...
<reponame>delfick/bespin from bespin.errors import StackDoesntExist, BadStack, Throttled from bespin.amazon.mixin import AmazonMixin from bespin import helpers as hp import botocore import boto3 import datetime import logging import pytz import time import six import os log = logging.getLogger("bespin.amazon.cloudfor...
<reponame>Luapulu/How-To-Document-Data-Science-Projects def experiment_03(): """ **Model and Set-up** An educational and detailed tutorial addressing the training of a machine learning model to solve the MNIST classification Model can be found `here`_. For the simple one-layer neural network, we ac...
################################################################################################ # # # # This code is FREE to use and change at any moment, this code has no CopyRights and # # anything like that, the only thing that i ask you is to report any erros on my github # # ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import numpy as np import cvxpy as cp import matplotlib.pyplot as plt import seaborn as sns from sklearn.covariance import GraphicalLasso, GraphicalLassoCV from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_test_split f...
import clodius.array as ct import math import numpy as np def get_tileset_info(hdf_file): """ Get information about the tileset. :param hdf_file: A file handle for an HDF5 file (h5py.File('...')) """ d = hdf_file["meta"] if "min-pos" in d.attrs: min_pos = d.attrs["min-pos"] else:...
import smart_imports smart_imports.all() class PostponedChangeCredentialsTaskTests(utils_testcase.TestCase): def setUp(self): super(PostponedChangeCredentialsTaskTests, self).setUp() game_logic.create_test_map() self.account = self.accounts_factory.create_account() self.task =...
<reponame>TugberkArkose/MLScheduler power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power ...
<filename>PythonScraper/RedditScraper.py import praw import csv import re import json import requests from textblob import TextBlob import nltk # Download VADER, if not downloaded # nltk.download('vader_lexicon') from nltk.sentiment.vader import SentimentIntensityAnalyzer sia = SentimentIntensityAnalyzer() client_i...
''' <NAME> 03-13-2020 Tenable WebRootPoC LPE/MemoryLeak ''' import socket import json import sys, getopt import struct import shutil import os import time HOST = '10.0.2.5' # Webroot Service IP PORT = 27019 # Webroot Service Port class UnencodableByte(Exception): pass ''' Represents address and data found at...
# Copyright (c) 2021 <NAME>. # Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT """ Test the functions that extract content from configuration files. The fixtures (arguments to the test functions) are defined in conftest.py """ import pytest from ..parsers import ( get_pyproject_toml...
<filename>fiat/stages.py """ base: <NAME> <<EMAIL>> Copyright 2020-2021, <NAME> License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0) Contents: """ from __future__ import annotations import collections.abc import copy import dataclasses import itertools from types import ModuleType from typing import (Any...
<reponame>mdx-dev/client-py #!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/ImagingStudy) on 2019-01-22. # 2019, SMART Health IT. from . import domainresource class ImagingStudy(domainresource.DomainResource): """ A s ...
<filename>core/portscan.py #------------------------------------------------------------------------------- # Name: RPTR Portscan # Purpose: Portscanning # # Author: <NAME> # # Created: 03-10-2016 # Copyright: <NAME> (c) # Version: 1.0 #---------------------------------------------------------...
<reponame>nathancarter/geo-py import unittest import time import logging import math import geo.sphere as sphere import geo._sphere as _sphere import geo.ellipsoid as ellipsoid import geo._ellipsoid as _ellipsoid import geo._sphere as csphere logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger() p_mi...
<reponame>sns-sdks/python-workweixin """ 消息加密与解密 """ import base64 import logging import random import socket import struct from Crypto.Cipher import AES from pywework.error import ErrorCode from .padding import PKCS7Padding logger = logging.getLogger(__name__) class MsgCrypto: """ 数据消息的加密与解密 """ ...
<reponame>yapanliu/ashrae-ob-database ''' This code will clean the OB datasets and combine all the cleaned data into one Dataset name: O-62-Zoltan Nagy _ June Young Park 1. occupancy data 2. light switch data 3. indoor illuminance data 4. four different rooms in an academic office bulding 5. different time ranges Dat...
from typing import Any, Dict, List, Optional, Text, Union from rasa_sdk import Tracker from rasa_sdk.events import EventType, SlotSet from rasa_sdk.executor import CollectingDispatcher from rasa_sdk.forms import REQUESTED_SLOT, FormAction from covidflow.constants import ( FEEL_WORSE_SLOT, HAS_COUGH_SLOT, ...
<reponame>bckohan/django-static-templates<filename>render_static/engine.py # pylint: disable=C0114 import os from collections import Counter, namedtuple from pathlib import Path from typing import Callable, Dict, Generator, List, Optional, Union from django.conf import settings from django.core.exceptions import Impr...
try: import unzip_requirements except ImportError: pass import asyncio from asyncio.subprocess import PIPE from asyncio import create_subprocess_exec import json, os, sys, subprocess from time import monotonic from functools import wraps from tempfile import mkdtemp from azure.storage.blob import BlobServiceCli...
<reponame>18970738669/opencv_demo import cv2 import os import json import numpy as np from numpy.linalg import norm SZ = 20 def deskew(img): m = cv2.moments(img) if abs(m['mu02']) < 1e-2: return img.copy() skew = m['mu11'] / m['mu02'] M = np.float32([[1, skew, -0.5 * SZ * skew], [0, 1, 0]]) ...
import torch import torch.nn as nn import numpy as np # NYU14_name_list = ['Unknown', 'Bed', 'Books', 'Ceiling', 'Chair', # 'Floor', 'Furniture', 'Objects', 'Picture', # 'Sofa', 'Table', 'TV', 'Wall', 'Window' # ] # Label11_name_list = ["None", "Ceiling", "Floor",...
<filename>py4syn/epics/LakeShore331Class.py """LakeShore 331 Class Python Class for EPICS LakeShore 331 :platform: Unix :synopsis: Python Class for EPICS LakeShore 331 .. moduleauthor:: <NAME> <<EMAIL>> .. note:: 06/07/2015 [douglas.beniz] first version released """ from epics import Device from enum import En...
from __future__ import absolute_import from __future__ import print_function import numpy as np import random import os from cv2 import imread from keras.layers import Input,Conv2D,MaxPooling2D,Flatten,Dense,Dropout,Lambda,LSTM,BatchNormalization,LeakyReLU,PReLU from keras import Sequential from keras.datasets import ...
import sass import markdown import shutil import jinja2 from pathlib import Path import logging import dateutil.parser as dt_parser from urllib.parse import urljoin # pip install mdx_truly_sane_lists # required pip install markdown-captions, pip install markdown-checklist # pip install pymdown-extensions def verify_te...
<filename>obsolete/map_momentum.py import clusters_retriever as extract from visualisation import map_plot_parameters as plotpar import cluster_profiler as profile from obsolete import map_synthetizer as mapgen import numpy as np from matplotlib import pyplot as plt from mpl_toolkits.axes_grid1.axes_divider import mak...
<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- import tkinter as tk from tkinter.filedialog import askopenfilename, askdirectory from PIL import ImageTk, Image from shutil import copyfile from distutils.dir_util import copy_tree from scipy.optimize import curve_fit from random import uniform from scipy imp...
import logging from pathlib import Path from datetime import datetime, timedelta from trough import config from trough import _download, _tec, _arb, _omni, _trough logger = logging.getLogger(__name__) def download_tec(start_date, end_date): user_data = [config.madrigal_user_name, config.madrigal_user_email, co...
<reponame>khang06/winnie<filename>forklib/gen_csrss_offsets.py # This tool generates csrss_offsets.py by downloading and # parsing symbols from the Microsoft symbol server. # Requirements: construct, pefile # Run with python2, NOT PYTHON3! import sys, os if not (sys.maxsize > 2**32) and os.name == 'nt': print('So...
import pickle from optparse import OptionParser import networkx as nx import matplotlib.pyplot as plt import numpy as np from numpy.core.fromnumeric import mean import pandas as pd import torch import torch.optim as optim import torch.nn as nn from sklearn.preprocessing import StandardScaler from symp_extract.consts i...
import sys from random import shuffle from heapq import heappush, heappop, heapify cin = sys.stdin cout = sys.stdout def find_schedule(graph, p, ls): schedule = [[] for i in range(p)] child = succ parent = pred # n = len(time) done = [False]*n end_time = [-1]*n donect=0 heap = [(0,i) for i in range(p)] heap...
from collections import defaultdict from functools import reduce from typing import Any, Dict, List from ....services.datastore.commands import GetManyRequest from ....shared.exceptions import ActionException from ....shared.filters import FilterOperator from ....shared.patterns import Collection, FullQualifiedId from...
import django.db.models from goflow.workflow.models import * DEBUG = True def log(section, variable): if DEBUG: print('adding [%s] %s' % (section, variable)) else: pass # ------------------------------------------------------------------------------------ # a class based Process Bui...
<gh_stars>0 ## @file vmotion.py ## @brief VMotion operations ## ## Detailed description (for Doxygen goes here) """ VMotion operations Detailed description (for [e]pydoc goes here) """ import os from pyVmomi import Vim from pyVmomi import Vmodl from pyVmomi import vmodl from pyVim.task import WaitForTask from pyVim.h...
<filename>studies/MultiBoomSparMass_v2/sweep.py """ This script generates data used to estimate spar mass as a function of lift force (i.e. total weight) and span. """ ### Imports from aerosandbox.structures.beams import * import copy ### Set up sweep variables # n_booms = 1 # n_booms = 2 # load_location_fraction = ...
<reponame>harshal-choudhari/books-python-wrappers #$Id$# from books.util.ZohoHttpClient import ZohoHttpClient from books.parser.ExpensesParser import ExpensesParser from os.path import basename from books.api.Api import Api from json import dumps base_url = Api().base_url + 'expenses/' parser = ExpensesParser() zoho_...
<reponame>javadch2021/pyfeats # -*- coding: utf-8 -*- """ ============================================================================== @author: <NAME> @author: <NAME>, @author: <NAME> @author: <NAME> @reference: Murray, An AM-FM model for Motion Estimation in Atherosclerotic Plaque Videos Murray, ...
<reponame>tech-sketch/SeqAL import math import random from collections import defaultdict from typing import Dict, List, Optional, Tuple import numpy as np import torch from flair.data import Sentence from sklearn.base import BaseEstimator from sklearn.cluster import KMeans from sklearn.preprocessing import MinMaxScal...
""" This module provides functions for upgrading scripts from pymel 0.9 to 1.0. It fixes two types non-compatible code: - pymel.all is now the main entry-point for loading all pymel modules - import pymel --> import pymel.all as pymel - import pymel as pm --> import pymel.all as pm ...
<reponame>yigitcanustek/blm2010 #Yeşim Şekerciler-140401067 import math def gauss(r): lenrow = len(r) lencol = len(r[0]) m = lenrow-1 k = 0 z = 0 for j in range(lenrow): m = lenrow-1 k = j z = j for i1 in range(lenrow-1): if (r[j][k]==0): continue coe...
<gh_stars>1-10 """ Module containing functions for clustering and cluster indices generation from samples of data """ import logging import numpy as np import tqdm from .utils import read_bag_file, extract_bag_index from .internal_indices import InternalIndices, INTERNAL_INDICES_METHOD_NAMES_DICT from .external_indic...
""" Product API Service Test Suite Test cases can be run with the following: nosetests -v --with-spec --spec-color coverage report -m """ import os import logging from unittest import TestCase from unittest.mock import patch from flask_api import status # HTTP Status Codes from service.models import db from servi...
<reponame>LPirch/tagvet import re import argparse import pickle import xml.etree.ElementTree as ET from collections import Counter from tqdm import tqdm import joblib from features import get_ref_hashes, _filter_xml_iter, get_tokens from build_vocab import load_yaml RE_DELIM = re.compile(r'(\W+)') PAD_DIM = 1 PLACE...
from datetime import ( datetime, timedelta, ) from core import constants from core.issues import issue_utils from core.searchtools import ( FileSearcher, SearchDef, ) from core.log import log from core.ycheck import ( YDefsLoader, YDefsSection, AutoChecksBase, YAMLDefInput, YAMLDefE...
from .server_base import ServerBase import copy import torch.optim as optim import torch.nn.functional as F import torch import torch.nn as nn from torch.utils.data import DataLoader from ..models.models import create_model from ..datasets.dataset_student import StudentData import numpy as np import sys class FedEdSer...
import argparse def parse_args(): parser = argparse.ArgumentParser(description='test recommender') # common settings # python main.py --algo_name mf --dataset ml-100k --epochs 10 --gce parser.add_argument('--seed', type=int, default=1234, help='tuning epochs') parser.add_argument('--printall', ac...
import unittest import torch import os import heat as ht from .test_suites.basic_test import TestCase class TestOperations(TestCase): def test___binary_bit_op_broadcast(self): # broadcast without split left_tensor = ht.ones((4, 1), dtype=ht.int32) right_tensor = ht.ones((1, 2), dtype=ht....
<filename>day_ok/schedule/views/teachers.py from typing import Dict, Any from django.shortcuts import render, redirect, Http404 from django.http import HttpRequest from django.forms.models import model_to_dict from ..middleware import authenticated from ..forms.teachers import ( TeacherLessonsColorForm, Teacher...
<filename>anime_downloader/extractors/kwik_token_extractor.py from js2py.pyjs import * # setting scope var = Scope(JS_BUILTINS) set_global_object(var) # Code follows: var.registers(['extract_data', '_0xe12c']) @Js def PyJsHoisted__0xe12c_(d, e, f, this, arguments, var=var): var = Scope({'d': d, 'e': e, 'f': f, ...
<reponame>raydan4/grr # Lint as: python3 # -*- encoding: utf-8 -*- """Tests for JSON instant output plugin.""" import os import zipfile from absl import app import json from grr_response_core.lib.rdfvalues import client as rdf_client from grr_response_core.lib.rdfvalues import client_fs as rdf_client_fs from grr_res...
<reponame>Phill240/chrome-remote-interface-py """This is an auto-generated file. Modify at your own risk""" from typing import Awaitable, Any, Callable, Dict, List, Optional, Union, TYPE_CHECKING if TYPE_CHECKING: from cripy import ConnectionType, SessionType __all__ = ["Fetch"] class Fetch: """ A domai...
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urlparse, ) from ..utils import ( parse_duration, unified_strdate, ) class RaiIE(InfoExtractor): _VALID_URL = r'(?P<url>(?P<host>http://(?:.+?\.)?(?:rai\.it|rai\...
<reponame>Emilie-Thome/Multi-Agent-RL import numpy as np import random import sys from rllab.misc import logger from rllab.misc.overrides import overrides from rllab.algos.batch_polopt import BatchPolopt from rllab.algos.agent import Agent from rllab.optimizers.first_order_optimizer import FirstOrderOptimizer from rlla...
<reponame>danderwald/s4u2p ''' Created on 22.05.2012 @author: norman ''' from requests.auth import AuthBase from requests.compat import urlparse from requests import get as reqget from requests import session import kerberos as k import s4u2p import re import logging def getLogger(): log = logging.getLogger("http...
# # Copyright 2015 LinkedIn Corp. 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 law or ...
<gh_stars>0 # This script uses an AR1 autoregressive model to forecast aggregated subsector level emissions of GHG in the US # Importing required modules import numpy as np import pandas as pd import statsmodels.api as stats import matplotlib.pyplot as plt from scipy.stats import norm # Declaring filepaths...
from table import Table from data import Data import pygame class Algorithm: def __init__(self, algo, win=None): self.algo = algo self.win = win def run(self, table): if self.algo == "Insertion Sort": return self.insertion_sort(table) if self.algo == "Quick Sort": ...
# Copyright 2015-2106 F5 Networks 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 ...
<gh_stars>1-10 import argparse import sys import os import subprocess import numpy as np import pandas as pd import torch from fastgc.dataset.img_data import load_dataset from fastgc.dataset.text_data import load_imdb from fastgc.activation import act_func_list def check_gpu_memory(): """ Computes the size of...
<gh_stars>1-10 import sys, weakref from rpython.rtyper.lltypesystem import lltype, llmemory, rstr, rffi from rpython.rtyper.ootypesystem import ootype from rpython.rtyper.annlowlevel import hlstr, cast_base_ptr_to_instance from rpython.rtyper.annlowlevel import cast_object_to_ptr from rpython.rlib.objectmodel import sp...
#/usr/bin/env python # Setup Jet-H analysis # Derived from the setup.py in aliBuild and Overwatch # and based on: https://python-packaging.readthedocs.io/en/latest/index.html # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open im...
import collectd import os LOG_FILE_PATH = '/var/log/containers/stdouts/collectd_pacemaker.out' PIPE_FILE_PATH = '/collectd_pipe' INTERVAL = 15 def config_func(config): log_file_path_set = False for node in config.children: key = node.key.lower() if key == 'interval': global INTER...
<gh_stars>0 #! coding:utf-8 """ compiler tests. These tests are among the very first that were written when SQLAlchemy began in 2005. As a result the testing style here is very dense; it's an ongoing job to break these into much smaller tests with correct pep8 styling and coherent test organization. """ import dec...
# Copyright (c) 2003-2016 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:<EMAIL> # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING """Unittest for the type checker.""" import unittest from astroid impor...
<filename>tests/integration_tests/tests/agentless_tests/test_depends_on_lifecycle_operation.py ######## # Copyright (c) 2019 Cloudify Platform Ltd. 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 ...
<reponame>oshadajay/CeyMo<gh_stars>10-100 ''' Evaluation script for the CeyMo Road Marking Dataset gt_dir should contain the ground truth json files and pred_dir should contain prediction json files respectively. The file system should follow the following order. home_directory/ |___ gt_dir/ | |___001.json | ...
<filename>robot2cam_calibration/track_grid.py """A function to track a grid and display its origin on the screen """ # The MIT License (MIT) # # Copyright (c) 2016 GTRC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software...
from emd_with_classes.utils import Iterator from matplotlib import pyplot as plt import cv2 import numpy as np from matplotlib.patches import Polygon from .dataset import Dataset class Visualizer: def __init__(self, dataset_coco: Dataset): self.dataset = dataset_coco def visualize_annotations(s...
<reponame>jvegreg/ESMValCore from esmvalcore._data_finder import select_files def test_select_files(): files = [ "pr_Amon_MPI-ESM1-2-HR_historical_r1i1p1f1_gn_195501-195912.nc", "pr_Amon_MPI-ESM1-2-HR_historical_r1i1p1f1_gn_196001-196412.nc", "pr_Amon_MPI-ESM1-2-HR_historical_r1i1p1f1_gn_...
<filename>test.py import unittest import geom from geom import P, L, B, Pg, Co, ML, MPg class TestPoint(unittest.TestCase): def test_point_eq(self): self.assertEqual(P((1, 1)), P((1.0, 1.0))) self.assertNotEqual(P((1, 1)), P((1.0001, 1.0))) class TestLine(unittest.TestCase): def assertPoint...
import asyncio import datetime as dt import json import os import logging import pydest import aiohttp logger = logging.getLogger("d2util") def str_to_datetime(date_time: str): return dt.datetime.fromisoformat(date_time) def get_bungie_name(group_member: dict) -> str: if group_member["destinyUserInfo"]["...
<filename>script/path_check.py #!/usr/bin/python3 ####################################################################### ################### Check the AIX system disk path! ################### ####################################################################### import os class PathCheck(): # Check the disable p...
# Copyright (c) 2020, <NAME>, Honda Research Institute Europe GmbH, and # Technical University of Darmstadt. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code mus...
<filename>Crime_Chicago_Prediction_Final.py #!/usr/bin/env python # coding: utf-8 # In[2]: import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from sklearn.metrics import mean_squared_error, r2_score from sklearn.linear_model import LinearRegression from sklearn.model_selecti...
import torch import util.image_visualization __author__ = "<NAME>" __copyright__ = "Copyright 2019, <NAME>" __credits__ = ["<NAME>"] __license__ = "Apache License 2.0" class TensorUtils: @staticmethod def tensors_are_equal(tensor_one, tensor_two): # https://stackoverflow.com/questions/32996281/how-to...
<reponame>kota7/wordleai-sql<gh_stars>0 # -*- coding: utf-8 -*- """ SQLite backend. Tables are named by the following convention: {vocabname}_words : contains all words {vocabname}_judges : contains judge results for all word pairs """ import os import sys import sqlite3 import math import random from contextlib...
import asyncio from collections import Counter import time import pytest from falcon import runs_sync from falcon import testing from falcon.asgi import App def test_multiple(): class SomeResource: def __init__(self): self.counter = Counter() async def on_get(self, req, resp): ...
<filename>entities.py import numpy as np import finmath_calculations # MATHEMATICAL FUNCTIONS ############################################################################################### class coef_function1d(object): ''' 1-dimensional coeffitient function. It depends on only 1 argument. Contains its ...
from pyvisdk.base.managed_object_types import ManagedObjectTypes from pyvisdk.base.base_entity import BaseEntity import logging ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) class SearchIndex(BaseEntity):...
<gh_stars>1-10 r"""@package motsfinder.metric.discrete.numerical Numerical low-level computations and helpers. These are used by e.g. the .patch.DataPatch classes to perform their interpolation and differentiation on grids of data. """ import itertools from operator import add import numpy as np from scipy.interpol...
from serenity.data.batch.load_sharadar_tickers import LoadSharadarTickersTask from serenity.data.batch.utils import LoadSharadarTableTask, ExportQuandlTableTask from serenity.data.sharadar_api import clean_nulls, yes_no_to_bool from serenity.data.sharadar_holdings import FormType, SecurityAdType, TransactionType, Secur...
<reponame>kokron/velocileptors import numpy as np import time from scipy.interpolate import interp1d from velocileptors.Utils.loginterp import loginterp from velocileptors.Utils.spherical_bessel_transform_fftw import SphericalBesselTransform from velocileptors.Utils.qfuncfft import QFuncFFT from velocileptors.LPT....
#!/usr/bin/env python3 # Copyright (c) 2021, NVIDIA CORPORATION. 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 ...
<reponame>elifesciences-publications/genomic-features-survival<gh_stars>10-100 #!/usr/bin/env python # encoding: utf-8 ''' Created by <NAME> on 2018-2-12. Given the copy-number-change sizes files generated from the sister script, calculate z-scores first excluding broad mutations, then excluding focal mutations. Cop...
<gh_stars>1-10 import hmac import random from collections import namedtuple Point = namedtuple('Point', ['x', 'y']) class EllipticCurveBase: """ A generic class for elliptic curves and operations on them. The curves must be of the form: y^2 = x^3 + a*x + b. """ def __init__(self, hash_function)...
<filename>modal_connection.py __author__ = 'Tarsier' import os import tkinter as tk from tkinter import * from tkinter import ttk from tkinter import simpledialog from settings import Settings import serial.tools.list_ports class ConnectionDialog(simpledialog.Dialog): def body(self, master): self.p...
<filename>models/base.py<gh_stars>1-10 from sqlalchemy import orm class QueryProperty(object): """ """ def __init__(self, session): self.session = session def __get__(self, model, Model): mapper = orm.class_mapper(Model) if mapper: if not getattr(Model, 'query_class', ...
""" registries: classes and functions for registration <NAME> <<EMAIL>> Copyright 2021, <NAME> License: Apache-2.0 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.apa...
""" owtf.interface.reporter ~~~~~~~~~~~~~~~~~~~~~~~ The reporter module is in charge of producing the HTML Report as well as provide plugins with common HTML Rendering functions .note:: This is being deprecated. """ import cgi from tornado.template import Loader from owtf.http.requester import requester from o...
<gh_stars>0 # -*- coding: utf-8 -*- import calendar, logging, pprint from django.conf import settings as project_settings from django.core.cache import cache from django.core.urlresolvers import reverse from tech_services_reports.models import Accession, CatEdit log = logging.getLogger("webapp") class DateMaker(ob...
from har_models import har_data_from_dict, Entry from typing import Set, List, Tuple, Dict from datetime import datetime import json import logging import copy logging.basicConfig( level=logging.DEBUG, format="[%(asctime)s] %(levelname)-12s|process:%(process)-5s|thread:%(thread)-5s|funcName:%(funcName)s|messag...
import sys import os import re import time import logging import string from NullHandler import NullHandler import help from vlogTemplate import vlogTemplate from incTemplate import incTemplate """ Reads in a Graphviz .dot file and generates a Verilog state machine based on some simple rules. 1) Only one state trans...
<gh_stars>0 from datetime import datetime import copy import pandas as pd import pytest import sqlalchemy_utils.functions as sql_utils import provenance as p import provenance._commonstore as cs import provenance.blobstores as bs import provenance.repos as r from conftest import artifact_record def test_inputs_json...
import networkx as nx import numpy as np from itertools import repeat from tqdm.auto import tqdm import time from multiprocessing.dummy import Pool from qtensor.optimisation.TensorNet import QtreeTensorNet from qtensor.optimisation.Optimizer import OrderingOptimizer, TamakiOptimizer, WithoutOptimizer, TamakiTrimSlicin...