text
stringlengths
957
885k
from ._base import TableMixin __all__ = ['HRTEMP', 'HRTCPR', 'PRTMST', 'PRTECN'] import datetime class HRTEMP(TableMixin): TABLE_NAME = 'HRTEMP' HRTEMPID = ('INT', 18) STATUSCODE = ('CHAR', 1) SRCCNCID = ('INT', 18) COMPANYNO = ('DEC', 2) DIVISIONNO = ('DEC', 3) CHGCNCID = ('INT', 18) ...
"""Tests for extractors module.""" import unittest import numpy as np from sklearn.pipeline import Pipeline from nvdlib.nvd import NVD from toolkit.pipelines.pipelines import get_preprocessing_pipeline from toolkit.transformers import FeatureExtractor, Hook # noinspection PyProtectedMember from toolkit.transformers...
# -*- coding: utf-8 -*- from parser_redeye import * if __name__ == "__main__": # This is some sort of parser test. subscribe_args = ( ("m", "message", True, u"Subscribe to message."), ("u", "user", True, u"Subscribe to user."), ("t", "tag", True, u"Subscribe to tag."), ("c", "c...
import os import KratosMultiphysics as Kratos from KratosMultiphysics import Logger Logger.GetDefaultOutput().SetSeverity(Logger.Severity.WARNING) import KratosMultiphysics.KratosUnittest as KratosUnittest import KratosMultiphysics.DEMApplication.DEM_analysis_stage import KratosMultiphysics.kratos_utilities as kratos_...
<gh_stars>1-10 import os.path import numpy as np try: np.random.bit_generator = np.random._bit_generator print("rename numpy.random._bit_generator") except: print("numpy.random.bit_generator exists") import cv2 from glob import glob import imgaug.augmenters as iaa def to_categorical(mask, num_classes, cha...
<reponame>stage-right/santiago from cmd import Cmd from sys import argv import santiago def make_droplet(name, size, image, region, ssh_key_ids=None, virtio=True, private_networking=False, backups_enabled=False, user_data=None, ipv6=False): droplet = { 'name': str(name), ...
#!/usr/bin/env python """ Take a set of residue-frequency files generated by `get-resfreqs.py`, group them into a single table file by matching residue pair ids, and plot them as a clustered heat-map. """ from __future__ import division import sys import argparse import numpy as np from contact_calc.flare import compo...
import os import glob import fire from finetune_vs_scratch.preprocessing import special_tokens from finetune_vs_scratch.tokenizer import tokenizer_special_tokens from tokenizers import SentencePieceBPETokenizer, normalizers, Regex from transformers import PreTrainedTokenizerFast from tokenizers.processors import Robert...
<filename>sagemaker-debugger/tensorflow_profiling/entry_point/tf-TensorLike.py # Standard Library import argparse import time # Third Party import numpy as np import tensorflow.compat.v2 as tf from tensorflow.keras.applications.resnet50 import ResNet50 from tensorflow.keras.datasets import cifar10 from tensorflow.kera...
<reponame>scopatz/pymoab from pymoab import core from pymoab import types from subprocess import call import numpy as np import os def test_write_mesh(): mb = core.Core() mb.create_vertices(np.ones(3)) mb.write_file("outfile.h5m") assert os.path.isfile("outfile.h5m") def test_integer_tag(): mb = c...
# copyright (c) 2018 Larz60+ import ScraperPaths import GetPage import CIA_ScanTools from bs4 import BeautifulSoup import sys import os class CIA_UsersGuide: def __init__(self): self.spath = ScraperPaths.ScraperPaths() self.gp = GetPage.GetPage() self.getpage = self.gp.get_page se...
#!/usr/bin/python # -*- coding: utf-8 -*- from django.core.cache import cache from django.test import TestCase from django.utils.encoding import force_text from rest_framework.test import APIClient from drf_cache.redis_connection import RedisConn from drf_cache.seed import update_seed_version # @override_settings(R...
""" A parser for .ASC files. """ import re import os from datetime import datetime from math import sqrt from typing import Optional, Dict, List, Tuple from mypy_extensions import TypedDict from sideeye.data import Fixation, Point, Trial, Item, Experiment from sideeye.config import Configuration, ASCParsingConfig from...
<filename>IQA_v9.py import argparse import sys import time import torch.nn.functional as F from scipy import stats from torch import nn from torch.optim import lr_scheduler from data import * from models.modules.architecture import resnet50_backbone, resnet34_backbone from models.modules.attns import Multi...
# -*- coding: UTF-8 -*- """Plot OSIRIS-generated data.""" from __future__ import print_function from __future__ import division from glob import glob import os import re from math import floor import h5py import numpy as np import matplotlib.pyplot as plt from matplotlib import ticker import matplotlib.colors as col...
<gh_stars>1-10 #!/usr/bin/env python3 # Standard lib import unittest # 3rd party import numpy as np import h5py # Our own imports from ..helpers import FileSystemTestCase from deep_hipsc_tracking.stats import grid_db, _grid_db from deep_hipsc_tracking.tracking import Link # Constants LINK1 = Link.from_arrays( ...
<reponame>jose-turintech/mlflow-turing-scoring-server """ This module implements and instantiates the common configuration class used in the project. """ # ────────────────────────────────────────── imports ────────────────────────────────────────── # import sys import tempfile from pathlib import Path from typing impo...
<reponame>k-koech/password_locker #!/usr/bin/env python3.6 from os import system import random import string from user import User from credentials import Credentials from time import sleep def create_user(username,password): ''' Function to create a new contact ''' new_user = User(username, password)...
import datetime import json import logging import urllib.request from typing import List import boto3 from contrail.configuration import config from contrail.crawler.providers import aws_ec2 from contrail.crawler.providers import BaseProvider, register_provider logger_all_regions = logging.getLogger('contrail.crawle...
from .basic_callbacks import Callback, CancelTrainException from ..hook import Hooks from ..utils import ToolBox as tbox import torch import torch.nn as nn import math from functools import partial import matplotlib.pyplot as plt class LR_Find(Callback): _order = 1 def __init__(self, max_iter=100, min_lr=1e-...
#! /usr/bin/python __author__="<NAME>" __date__ ="$Jun 13, 2014 12:33:33 PM$" import time import os from elasticsearch.transport import Transport from elasticsearch import (Elasticsearch, RoundRobinSelector, ImproperlyConfigured, ElasticsearchException, SerializationError, TransportError, NotFoundError, Conflict...
import logging from collections import defaultdict from dataclasses import dataclass from datetime import datetime from enum import unique from typing import ClassVar, Collection, Dict, Iterable, Optional, Set, Union from asn1crypto import cms, core, keys, x509 from pyhanko_certvalidator import CertificateValidator fr...
#!/usr/bin/env python3 from __future__ import annotations import math import os import random import unittest import torch import linear_operator from linear_operator import settings from linear_operator.test.utils import approx_equal from linear_operator.utils import pivoted_cholesky def rbf_kernel(x1, x2=None):...
from nose.tools import istest, assert_equal from mammoth.html_generation import HtmlGenerator, satisfy_html_path from mammoth import html_paths @istest def generates_empty_string_when_newly_created(): generator = HtmlGenerator() assert_equal("", generator.html_string()) @istest def html_escapes_text(): ...
<filename>dsgrid/dataformat/enumeration.py import datetime as dt import copy from enum import Enum import os import logging import pytz import re import numpy as np import pandas as pd from dsgrid import DSGridRuntimeError, DSGridValueError from dsgrid.dataformat import ENCODING, get_str logger = logging.getLogger(_...
<filename>src/python/Sailing/simple_crawler/crawler.py # -*- coding: gbk -*- """ HTTP Client http://www.hzfc365.com/house_search/search_prj.jsp?lpid=1374 """ import sys, os, logging, re from http_client import HTTPClient class SimpleCrawler(object): def __init__(self): self.http = HTTPClient() ...
import json import re from moto.core.responses import BaseResponse from .exceptions import InvalidParameterValueException from .models import dax_backends class DAXResponse(BaseResponse): @property def dax_backend(self): return dax_backends[self.region] def create_cluster(self): params =...
<reponame>joy13975/covidprof_submission # Entry point for the COVID Professor main app import logging import re import sys from time import time import RAKE from multiprocessing.pool import ThreadPool from adapter.elastic_search import ElasticSearchAdapter as SearchEngine from adapter.twitter import TwitterAd...
<reponame>jmikeowen/Spheral import mpi from Spheral2d import * from MultiScaleMedialGenerator import * from SpheralTestUtilities import * from VoronoiDistributeNodes import distributeNodes2d as distributeNodes from siloPointmeshDump import * commandLine(ncore = 2000, rhocore0 = 10.0, rho...
from __future__ import absolute_import, division, print_function, unicode_literals from echomesh.Cechomesh import cechomesh from echomesh.util.TestCase import TestCase class ScrollTest(TestCase): def setUp(self): self.data = cechomesh.ColorList( ['red', 'green', 'blue', 'yellow', 'be...
"""Helper functions""" import numpy as np import os import pandas as pd def TNTP_to_pandas(net_file, node_file, trips_file, flow_file=None): """ Converts a set of TNTP files to panda dataframes. https://github.com/bstabler/TransportationNetworks Parameters ---------- file : TNTP file {}_n...
# !/usr/bin/env python # -*- coding: utf-8 -*- import pandas as pd import urllib.request # from tqdm import tqdm # from pandas.util._validators import validate_bool_kwarg from sklearn.model_selection import train_test_split import warnings warnings.filterwarnings("ignore") # paso imports from paso.base import pasoF...
# Copyright (c) 2003-2013 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Author: <NAME> # # Description: # [MS-DTYP] Interface mini implementation # import random from stru...
# USAGE # python server.py --prototxt MobileNetSSD_deploy.prototxt --model MobileNetSSD_deploy.caffemodel --montageW 2 --montageH 2 # import the necessary packages from imutils import build_montages from datetime import datetime import numpy as np import imagezmq import argparse import imutils import cv2 # construct ...
<reponame>swghosh/machine-config-operator<filename>hack/get-mcd-nodes.py #!/usr/bin/env python3 # This is a simple script that grabs all the cluster nodes and associates them # with a given MCD pod and outputs their roles. There is probably an easier way # to do this that I am too naïve to be aware of :). Running this...
# -*- coding: utf-8 -*- #from pyramid.arima import auto_arima import numpy as np import logging import sys from statsmodels.tsa.api import ExponentialSmoothing, SimpleExpSmoothing, Holt from statsmodels.tsa.arima_model import ARIMA import statsmodels.api as sm import matplotlib.pyplot as plt from statsmodels.tsa.statto...
import networkx as nx import copy import nltk import subprocess import sys def single_cluster_modularityOV(graph, Clusters, f, nCluster):#, resultPosition): E_in = 0 E_out = 0 E = 0 for e in graph.edges(): E += graph[e[0]][e[1]]['weight'] for v in Clusters[nCluster]: for e in grap...
<gh_stars>0 import os import pickle import tempfile import zipfile from contextlib import contextmanager import pytest import fsspec from fsspec.core import ( OpenFile, OpenFiles, _expand_paths, get_compression, open_files, open_local, ) @contextmanager def tempzip(data={}): f = tempfile...
#!/usr/bin/env python3 # Copyright 2021 Google LLC # # 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...
<filename>attackz.py import os import re from typing import List import click import dnnlib import numpy as np import PIL.Image import torch import torch.nn as nn import legacy # Attack import sys sys.path.append('../boosted-implicit-models') from experimental import AttackExperiment import torch.optim as optim impor...
<reponame>qbilius/psychopy_ext<gh_stars>10-100 # Part of the psychopy_ext library # Copyright 2010-2014 <NAME> # The program is distributed under the terms of the GNU General Public License, # either version 3 of the License, or (at your option) any later version. """ A library of helper functions for creating and run...
<reponame>zeou1/maggot_models #%% Imports from operator import itemgetter import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from graspy.cluster import GaussianCluster, KMeansCluster from graspy.embed import AdjacencySpectralEmbed, LaplacianSpectralEmbed, OmnibusEmbed from gra...
import os from ekorpkit import eKonf def test_compose_config(): cfg = eKonf.compose() cfg = eKonf.to_dict(cfg) assert type(cfg) == dict def test_about(): from ekorpkit.cli import about cfg = eKonf.compose() about(**cfg) assert True def test_mecab_cfg(): config_group = "preprocesso...
#!/usr/bin/python # ./grading-script.py <test-dir> import os,re,sys,shutil,random,subprocess,threading test_dir = 'tests' if len(sys.argv) > 1: test_dir=sys.argv[1] # Set up scratch space for grading dir="grading" try: shutil.rmtree(dir) except: pass os.mkdir(dir) os.mkdir(dir + '/src') re_cp=re.compile(...
<filename>sitePjt/accounts/views.py from django.shortcuts import render, redirect from django.db.models import Q from django.conf import settings from django.contrib.auth.decorators import login_required from rest_framework.decorators import api_view, permission_classes from rest_framework.response import Response from...
from datetime import datetime, timedelta from agagd_core.json_response import JsonResponse from agagd_core.models import Game, Member from django.db.models import Avg, Count from django.db.models.functions import TruncMonth, TruncWeek from django.http import HttpResponse from django.views import View class ApiStatus...
<gh_stars>10-100 from connect import netmiko_connect import re SHOW_IP_ROUTE = "ip route" SHOW_ARP = "arp" SHOW_INT_DESCRIPTION = "int description" SHOW_INT_BRIEF = "int brief" SHOW_VERSION = "version" IOS = "ios" NXOS = "nxos" IOSXR = "iosxr" commands = {SHOW_IP_ROUTE: {IOS: "show ip route", ...
import matplotlib as mpl # Allow matplotlib plots to be rendered without active window manager mpl.use('agg') from readCPython import load_C_output from getXi1 import find_root import matplotlib.pyplot as plt import numpy as np import os import argparse def set_style(usetex=False): """ set a proffesional look...
<gh_stars>1-10 import logging import re import requests from redash.query_runner import * from redash.utils import json_dumps, json_loads logger = logging.getLogger(__name__) class ClickHouse(BaseSQLQueryRunner): noop_query = "SELECT 1" @classmethod def configuration_schema(cls): return { ...
<reponame>bdmbdsm/openprocurement.client.python<filename>openprocurement_client/client.py<gh_stars>1-10 import logging from functools import wraps from io import FileIO from os import path from urlparse import parse_qs, urlparse from iso8601 import parse_date from munch import munchify from restkit import BasicAuth,...
<filename>src/visitpy/visit_flow/flow/tests/test_generator.py # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt # Project developers. See the top-level LICENSE file for dates and other # details. No copyright assignment is required to contribute to VisIt. """ file: test_parser.py author: <N...
import numpy as np import pandas as pd from TACT.computation.adjustments import Adjustments, empirical_stdAdjustment from TACT.computation.ml import machine_learning_TI def perform_SS_LTERRA_ML_adjustment(inputdata): inputdata_test_result = pd.DataFrame() results = pd.DataFrame( columns=[ ...
<gh_stars>0 import os os.environ['OMP_NUM_THREADS'] = '1' os.environ['MKL_NUM_THREADS'] = '1' import sys import pandas as pd import numpy as np from tqdm import tqdm from sklearn.metrics import roc_auc_score, confusion_matrix from sklearn.preprocessing import OneHotEncoder sys.path.append('src') from mappings import M...
#!/usr/bin/env python3 import os import argparse import pandas as pd from skbio.diversity import beta_diversity from skbio.stats.ordination import pcoa from skbio.stats.distance import anosim import matplotlib.pyplot as plt import warnings #How to use: #Standalone: # navigate '/media/nls/Storage/HomeBU/Python...
## Core App # holds all of the central code that is important to the rest of the sub apps that we create in our system # creates anything that is shared between 1 or more apps so things like the migrations and the database. (All in One Place) # A universally unique identifier (UUID) is a 128-bit "Encrypted" la...
from __future__ import print_function, absolute_import, division, unicode_literals import os from setuptools import find_packages, setup _HERE = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(_HERE, 'README.md'), 'r') as f: long_desc = f.read() setup( name='hyp3lib', use_scm_version=T...
<reponame>JonasZehn/ntopo import os import math import json import jsonpickle import numpy as np import tensorflow as tf import tensorflow.keras.backend as K from tensorflow.keras import Model, Sequential, Input from tensorflow.keras.layers import Layer, Dense, Concatenate, BatchNormalization, LeakyReLU from tensorfl...
<reponame>ledomone/kurs_django """ Django settings for biblio project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ from configurations import Configuration # ...
<reponame>LB-JakubSkorupka/o3de """ Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ import copy from typing import (Dict, List) from unittest import TestCase from ...
""" This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOU...
from typing import ( TYPE_CHECKING, Any, Callable, Coroutine, ) from eth_utils.toolz import ( assoc, ) from web3.exceptions import ( InvalidTransaction, TransactionTypeMismatch, ) from web3.types import ( BlockData, RPCEndpoint, RPCResponse, TxParams, Wei, ) if TYPE_CH...
<filename>Segment/performance.py import os import time import math import pathlib import cv2 as cv import numpy as np import pandas as pd from tqdm import tqdm from functools import reduce import matplotlib.pyplot as plt from collections import Counter def get_path(file_dir): """获取当前目录下,文件的绝对路径以及文件名...
<gh_stars>1-10 from tkinter import * from tkinter import messagebox from tkinter import ttk import random import time from bubblesort import bubble_sort from selectionsort import selection_sort from insertionsort import insertion_sort from mergesort import merge_sort from quicksort import quick_sort root ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # Copyright (c) <NAME> 2016. All Rights Reserved. # slipy/spectrum/spectrum.py """Spectrum class interface.""" from algorithms import * from calibration import * from core import * from etc import * from gui import * from measurement import * from operat...
#!/usr/bin/env python # encoding: utf-8 # Copyright (c) 2016-2017, <NAME> (www.karlsruhe.de) # # 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 limitati...
<gh_stars>1-10 import asyncio import aiohttp import async_timeout import copy class tdCall(object): """ Prepares arguments for making HTTP calls to TDAmeritrade API. Gets data from TDAmeritrade API. Processes the result from TDAmeritrade. """ base_url = "https://api.tdameritrade.com/v1/" de...
<filename>src/interface/BaseHardwareInterface.py from monotonic import monotonic ENTER_AT_PEAK_MARGIN = 5 # closest that captured enter-at level can be to node peak RSSI class BaseHardwareInterface(object): LAP_SOURCE_REALTIME = 0 LAP_SOURCE_MANUAL = 1 LAP_SOURCE_RECALC = 2 RACE_STATUS_READY = 0 ...
<filename>onefile-example_douyin.py # from ytb_up import * from ytb_up.douyin import DouyinUpload from datetime import datetime,date,timedelta import asyncio import json profilepath = '' CHANNEL_COOKIES='assets/douyin-cookie.json' videopath = 'assets/hello.mp4' tags = ['ba,baaa,bababa'] publish_date = '' # if you use s...
<reponame>JosephGarrone/uqcsbot-1 from typing import List import re from datetime import date, datetime, timedelta from calendar import month_name, month_abbr, day_abbr from icalendar import Calendar import requests from pytz import timezone, utc from typing import Tuple, Optional from uqcsbot import bot, Command from ...
# Copyright 2019 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<filename>src/data/bgg_weekly_crawler.py from bs4 import BeautifulSoup import requests import pandas as pd import json from requests.compat import urljoin from datetime import datetime import re def game_data(): xml_bs = "https://www.boardgamegeek.com/xmlapi2/thing?type=boardgame&stats=1&ratingcomments=...
<reponame>compomics/rescore """Interface to MaxQuant msms.txt files.""" import logging import os import re from functools import cmp_to_key from typing import Dict, List, Optional, Tuple, Type, Union import click import numpy as np import pandas as pd from ms2rescore.peptide_record import PeptideRecord from ms2resco...
#!/usr/bin/env python3 from sys import stderr,exit,argv import json,yaml,os,ipaddress,random,pynetbox import requests as req from pprint import pprint from uuid import uuid4 # display error & bail out def fail(*messages): print(*messages, file=stderr) exit(1) def generate_mac(): prefix = [0x52, 0x54, 0x00] ...
<reponame>PLM912/Keter import time import discord import psutil import os from datetime import datetime from discord.ext import commands from evs import default class Information_ja(commands.Cog): def __init__(self, bot): self.bot = bot self.config = default.get("config.json") self.process...
import numpy as np import tensorflow as tf from matplotlib import pyplot as plt from sklearn.manifold import TSNE from tensorflow.keras.layers import Dense, Flatten, Conv2D, Conv2DTranspose, \ Reshape from tensorflow.keras import Model LATENT_DIM = 10 train_loss_autoencoder = tf.keras.metrics.Mean(name='train_los...
#!/usr/bin/env python # # Set it up so we can painless run the python nose tests against the localhost 8983. # Summary: # # ./run_solr_for_unit_tests.py [--debug] [--debug-port=9999] [--port=8983] # # Add the argument "--debug" to start the Jetty server in debug mode. Specify the port with "--debug-port=XXXX". # Assu...
<filename>python/histogram.py #!/usr/bin/python ###################################### # @file histogram.py # @author <NAME> # @date 5/29/07 # @brief outputs a histogram in lc format given input lc format & bin structure ###################################### from optparse import OptionParser import os import re impor...
from PIL import Image, ImageDraw, ImageFont import math from gauge import Gauge class RPM(Gauge): def __init__(self, fontfile='Roboto-Regular.ttf', size=256): self.size = size self.fontfile = fontfile self.fontbig = ImageFont.truetype(self.fontfile, size=int(self.size/4)) s...
<reponame>peichman-umd/plastron<filename>plastron/handlers/ndnp.py """ Classes for interpreting and loading metadata and files stored according to the NDNP specification. """ import csv import logging import lxml from lxml.etree import parse, XMLSyntaxError import os from plastron import pcdm from plastron.excepti...
# 6.00 Problem Set 8 # # Name: # Collaborators: # Time: import numpy import random import matplotlib.pyplot as plt from ps7 import * # # PROBLEM 1 # class ResistantVirus(SimpleVirus): """ Representation of a virus which can have drug resistance. """ def __init__(self, maxBirthProb, clearProb...
_base_ = [ '../_base_/datasets/dota.py', '../_base_/schedules/schedule_1x.py', '../../_base_/default_runtime.py' ] model = dict( type='OrientedRCNN', backbone=dict( type='SwinTransformer', embed_dims=96, depths=[2, 2, 6, 2], num_heads=[3, 6, 12, 24], windo...
<gh_stars>0 # MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # 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...
# Copyright 2013-2021 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) class BerkeleyDb(AutotoolsPackage): """Oracle Berkeley DB""" homepage = "https://www.oracle.com/database/technol...
<reponame>agucova/cs42 import check50 @check50.check() def muro_0(): """muro_0""" check50.run("python3 costear.py").stdin("V--V----V--P--VV---V------V--P--V--V", prompt=False).stdout("60", regex=False).exit(0) @check50.check() def muro_1(): """muro_1""" check50.run("python3 costear.py").stdin("V--P--V...
# Copyright 2021, <NAME>, mailto:<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 law or agreed to in w...
<gh_stars>1-10 from app.api.services.game_services.action_handlers.action_handler import ( ActionHandler ) from app.schemas import game_schema from app.schemas.game_schema import VoteCard, State, Positions class VoteActionHandler(ActionHandler): @property def activity_text(self): return f"{self.pl...
<filename>django_inventory/apps/inventory/__init__.py<gh_stars>0 from __future__ import absolute_import from django.utils.translation import ugettext_lazy as _ from common.api import register_links, register_menu from .models import Location, ItemTemplate, Inventory, InventoryTransaction, Supplier inventory_list = ...
# # This file is part of CasADi. # # CasADi -- A symbolic framework for dynamic optimization. # Copyright (C) 2010-2014 <NAME>, <NAME>, <NAME>, # <NAME>. All rights reserved. # Copyright (C) 2011-2014 <NAME> # # CasADi is free software; you can redistribute it and/or # ...
<filename>src/unregulated_genes/models.py import math import random import numpy import pandas from scipy.integrate import odeint """ This models the ODE of an unregulated genetic expression of a prokaryotic cell k0 is the rate at which mRNA is being generated k1 is the rate at which proteins are being dm and dp are ...
<gh_stars>0 import numpy as np import cv2 import pickle nx = 9 # Num of corners per row ny = 6 # Num of corners per column def abs_sobel_threshold(img, orient, sobel_kernel, thresh): """ :param img: :param orient: :param sobel_kernel: :param thresh: :return: """ gray = cv2.cvtColor(i...
<gh_stars>100-1000 import torch from torch.nn.functional import softmax from .generator.jacobian import Jacobian from .layercollection import LayerCollection def FIM_MonteCarlo(model, loader, representation, variant='classif_logits', trials=1...
<filename>program/program/CalibrationResults.py<gh_stars>1-10 import json import os from datetime import datetime import numpy def get_current_time(): return datetime.now().strftime("%Y-%m-%d-at-%H-%M") class CalibrationImportError(RuntimeError): pass def import_json(target, json_file): '''Maps impor...
<gh_stars>1-10 #!/usr/bin/env python3 # Copyright (C) 2020, 2021 University of Rochester # # 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 # ...
from .testcase import DatatableViewTestCase from .test_app import models from .. import utils def get_structure(columns, opts): return utils.get_datatable_structure('/', dict(opts, columns=columns), model=models.ExampleModel) class UtilsTests(DatatableViewTestCase): def test_get_first_orm_bit(self): ...
# # Copyright (c) 2016 Nutanix Inc. All rights reserved. # # # Steps included in experimental are for internal experimental use only. # import logging import os import subprocess import requests from curie.exception import CurieTestException from curie.steps._base_step import BaseStep log = logging.getLogger(__name_...
<filename>soundspaces/tasks/nav.py # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import pickle from typing import Any, Type, Union import logging import numpy as np impor...
<reponame>steemfans/steem-lightdb<filename>transfer/user_relation.py #!/usr/bin/python3 #encoding:UTF-8 import json, os, sys, time import utils.TransferTasks as tasks import utils.utils as utils from utils.BlockProcess import BlockProcess as BlockProcess import asyncio, aiomysql from multiprocessing import Pool from co...
# Unless explicitly stated otherwise all files in this repository are licensed # under the Apache License Version 2.0. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2018 Datadog, Inc. from datetime import datetime import json import logging import os import sys import...
import torch torch.backends.cudnn.benchmark = True from trainer.base_audio_trainer import BaseAudioTrainer from logger.new_callbacks import Callbacks from torch.utils.data import DataLoader from dataloader.audio_dataset import AudioDataset from torch.optim.lr_scheduler import CosineAnnealingLR from models.audio_mode...
<reponame>seth586/lndmanage<filename>lndmanage/lib/report.py """ Creates reports for forwardings, channel opens/closings, onchain activity. """ import logging from datetime import datetime from lndmanage.lib.ln_utilities import ( convert_channel_id_to_short_channel_id, height_to_timestamp ) logger = logging.ge...