id
stringlengths
3
8
content
stringlengths
100
981k
11585877
import pdb,sys,os __all__=['File','BioUtils','tbsp'] dir_path=os.path.dirname(os.path.realpath(__file__)) sys.path.append(dir_path) for i in __all__: __import__(i)
11585915
import pandas as pd from Address_Format_Funcs import AddressClean_en, AddressClean_fr test=pd.read_csv('example.csv') test=AddressClean_en(test,'street_name','formatted_en') test=AddressClean_fr(test,'street_name','formatted_fr') test.to_csv('example_formatted.csv',index=False)
11585941
from enum import Enum, unique from typing import Dict, List, Optional from pydantic import BaseModel, Field, validator from astrobase.helpers.name import random_name class EKSNodegroupScalingConfig(BaseModel): minSize: int = 1 maxSize: int = 3 desiredSize: int = 1 @unique class EKSNodegroupAmiType(str...
11585945
from pydantic import BaseModel from typing import Optional class Invoice(BaseModel): title: Optional[str] = None description: Optional[str] = None start_parameter: Optional[str] = None currency: Optional[str] = None total_amount: Optional[int] = None
11585948
from __future__ import division from textwrap import dedent import numpy.testing as npt import pandas.util.testing as pdtest import numpy from numpy.testing import assert_equal import pandas import pytest from statsmodels.imputation import ros from statsmodels.compat.python import StringIO if pandas.__version__.sp...
11585958
import os import six import pyblish.api import copy from datetime import datetime from openpype.lib.plugin_tools import prepare_template_data from openpype.lib import OpenPypeMongoConnection class IntegrateSlackAPI(pyblish.api.InstancePlugin): """ Send message notification to a channel. Triggers on insta...
11586000
import pandas as pd import pandas.testing as pdt import pytest from cape_privacy.pandas.transformations import ReversibleTokenizer from cape_privacy.pandas.transformations import Tokenizer from cape_privacy.pandas.transformations import TokenReverser def test_tokenizer(): transform = Tokenizer(key="secret_key") ...
11586022
import sys class Sort: def __new__(self, array, algo, reverse=False): ''' args: :array: (list) : a python list :algo: (str): sorting algorithm type values supported are: 1.bubble 2.merge ...
11586086
import re import logging from os import getenv from copy import deepcopy from random import choice from common.custom_requests import request_triples_wikidata import sentry_sdk logger = logging.getLogger(__name__) sentry_sdk.init(getenv("SENTRY_DSN")) other_skills = { "intent_responder", "dff_program_y_dang...
11586178
import sys import nltk from nltk.stem.porter import * from sklearn.feature_extraction.text import ENGLISH_STOP_WORDS import xml.etree.cElementTree as ET from collections import Counter import string from sklearn.feature_extraction.text import TfidfVectorizer import zipfile import os def gettext(xmltext) -> str: "...
11586214
import options import ocgantestdisjoint opt = options.test_options() text_file = open(opt.dataset + "_progress.txt", "w") for i in range(0,1000,10): opt.epochs = i roc_auc = ocgantestdisjoint.main(opt) print(roc_auc) auc1=roc_auc[0] auc2=roc_auc[1] auc3=roc_auc[2] auc4=roc_auc[3] text_f...
11586250
from collections import namedtuple from typing import Dict import torch import torch.nn as nn import torch.nn.functional as F class Module(nn.Module): def __init__(self, config): super(Module, self).__init__() self.config = config def init_weight(self): raise NotImplementedError() ...
11586267
import logging import os from build_migrator.modules import Parser from build_migrator.parsers._common.command_tokenizer import cmdline_split logger = logging.getLogger(__name__) class ResponseFile(Parser): priority = 5 @staticmethod def add_arguments(arg_parser): pass @staticmethod de...
11586269
from __future__ import division import re from collections import Counter import math import heapq import sys class PhraseMining(object): """ PhraseMining performs frequent pattern mining followed by agglomerative clustering on the input corpus and then stores the results in intermediate files. :param ...
11586272
import numpy as np class DenseOp: def __init__(self, mat): self.mat = mat self.shape = mat.shape def dot(self, v): return self.mat.dot(v) def nearfield_dot(self, v): return self.dot(v) def nearfield_no_correction_dot(self, v): return self.dot(v) def farfi...
11586275
from pymtl3 import * class Reg( Component ): def construct( s, Type ): s.out = OutPort( Type ) s.in_ = InPort( Type ) @update_ff def up_reg(): s.out <<= s.in_ def line_trace( s ): return f"[{s.in_} > {s.out}]" class RegEn( Component ): def construct( s, Type ): s.out = OutPort...
11586294
import re from django.db import models from django.db.models import QuerySet, Q from django.utils import timezone from django.contrib.postgres.fields import ArrayField from dateutil.parser import parse as parse_date from backend.models import PlayerCube, EditableModel INTERVAL_REGEXP = re.compile(r'^((?P<days>-?\d+)...
11586301
import nose.tools as nt import numpy as np import theano import theano.tensor as T import treeano import treeano.nodes as tn fX = theano.config.floatX def test_repeat_n_d_node_serialization(): tn.check_serialization(tn.RepeatNDNode("a")) def test_repeat_n_d_node_serialization(): tn.check_serialization(tn....
11586313
from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver class UserProfile(models.Model): user = models.OneToOneField( User, on_delete=models.CASCADE, related_name='profile', null=True, blank=True ...
11586325
import json from collections import OrderedDict from django.db import models from django.db.models import Count from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from jsonfield import JSONField from model_utils import Choices from model_utils.models import TimeStampedModel from f...
11586344
from .abstract_pop_splitter import AbstractPOPSplitter import random import numpy as np from .entity_splitting import split_entities # assign commodities to subproblems at random class RandomSplitter(AbstractPOPSplitter): def __init__(self, num_subproblems, split_fraction=0.1): super().__init__(num_subprob...
11586357
from django.conf.urls import include, patterns, url from .views import iiif_image_api_info, iiif_image_api urlpatterns = patterns( '', url( r'(?P<identifier_param>.+)/info.json', iiif_image_api_info, name='iiif_image_api_info', ), url( r'(?P<identifier_param>[^/]+)/(?P<...
11586376
from summarizer import Summarizer body = ''' The Chrysler Building, the famous art deco New York skyscraper, will be sold for a small fraction of its previous sales price. The deal, first reported by The Real Deal, was for $150 million, according to a source familiar with the deal. Mubadala, an Abu Dhabi investment fu...
11586409
import os import sys import torch import pickle import datetime import argparse from argparse import Namespace from tools import utils SEM_CITYSCAPES = ['unlabeled', 'ego vehicle', 'rectification border', 'out of roi', 'static', 'dynamic', 'ground', 'road', 'sidewalk', 'parking', 'rail track', 'bui...
11586431
from langid.langid import LanguageIdentifier, model from googletrans import Translator from limpieza import remover_acentos def detectar_lenguaje(texto, devolver_proba=False): """ Identifica el lenguaje en el que está escrito el texto de entrada. :param texto: Texto de entrada. :type texto: str :...
11586505
from etk.timeseries.annotation import block_detector from etk.timeseries.annotation import date_utilities from etk.timeseries.annotation import utility import logging class parsed_table: # we defind a table when we find a time header for that def __init__(self, time_header, parent_sheet): self.time_bl...
11586548
import time import tensorflow as tf import numpy as np from models.base import Model class JointContextModel(Model): """Entity Embeddings and Posterior Calculation""" def __init__(self, num_layers, context_encoded_dim, text_encoded, coherence_encoded, scope_name, device, dropout_keep_prob): ...
11586567
import tensorflow as tf import numpy as np from tensorflow.examples.tutorials.mnist import input_data import pandas as pd '''加载数据''' mnist = pd.read_csv(r'data/train.csv') train_labels = mnist['label'] train_images = mnist.iloc[:,1:] train_images.astype(np.float) train_images = np.multiply(train_images, 1.0/255.0) t...
11586570
def returns(param): if param == 1: return 1 if param == 2: return 2 if param == 2: return 2 if param == 3: return 3 return 0
11586648
import pkgutil import inspect from ._program import * from .art import * from .bcftools import * from .bfast import * from .bowtie import * from .bwa import * from .cmake import * from .curesim import * from .deez import * from .drfast import * from .dwgsim import * from .freec import * from .gem import * from .gnupl...
11586681
from datetime import datetime from functools import reduce import operator from django.contrib.auth.models import Group, Permission from django.db.models import Q from django.urls import reverse from django.utils.crypto import get_random_string from django.utils.http import urlencode from django.test import TestCase, o...
11586685
import shutil import sys from pathlib import Path from typing import Optional, Union import nox THIS_DIR = Path(__file__).parent WINDOWS = sys.platform.startswith("win") SUPPORTED_PYTHONS = ["3.7", "3.8", "3.9", "3.10"] nox.needs_version = ">=2021.10.1" nox.options.error_on_external_run = True def wipe(session: n...
11586705
import numpy as np import scipy as sp import pandas as pd import scipy.sparse import numbers from .helper import SparseTensor from . import wrapper def make_sparse(Y, nnz, shape = None, seed = None): Ytr, Yte = make_train_test(Y, nnz, shape, seed) return Yte def make_train_test(Y, ntest, shape = None, seed...
11586750
import os, sys try: from setuptools import setup from setuptools.command.install import install as _install from setuptools.command.sdist import sdist as _sdist except ImportError: from distutils.core import setup from distutils.command.install import install as _install from distutils.command.s...
11586781
import time from typing import Sequence from rlmolecule.mcts.mcts import MCTS from rlmolecule.mcts.mcts_problem import MCTSProblem from rlmolecule.tree_search.graph_search_state import GraphSearchState from rlmolecule.tree_search.metrics import call_metrics, collect_metrics from rlmolecule.tree_search.reward import Ra...
11586803
import numpy as np from jbdl.rbdl.kinematics import calc_body_to_base_coordinates def calc_whole_body_com(model: dict, q: np.ndarray) -> np.ndarray: """calc_whole_body_com - Calculate whole body's CoM position in world frame Args: model (dict): dictionary of model specification q (np.ndarray)...
11586843
from subprocess import Popen, PIPE import platform import os class LocateBinary(object): """Class implements lookup for chef binaries. """ def locate_binary(self, binary): """Locate full path of a chef binary """ # Try sane paths for base_path in self._sane_paths(): ...
11586882
from scapy.all import * from ccsds_base import CCSDSPacket class SC_HK_TLM_PKT_TlmPkt(Packet): """Housekeeping Packet Structure app = SC command = HK_TLM_PKT msg_id = SC_HK_TLM_MID = 0x08aa = 0x0800 + 0x0aa """ name = "SC_HK_TLM_PKT_TlmPkt" fields_desc = [ # APPEND_ITEM ATS_NUMBER...
11586889
from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from builtins import str as unicode from quark_runtime import * _lazyImport.plug("puse_md.Root") class Root(_QObject): def _init(self): pass def __init__(...
11586891
from __future__ import annotations from typing import List, Text, Dict, Any from rasa.engine.graph import ExecutionContext from rasa.engine.recipes.default_recipe import DefaultV1Recipe from rasa.engine.storage.resource import Resource from rasa.engine.storage.storage import ModelStorage from rasa.nlu.tokenizers.token...
11586899
import st7565 import xglcd_font as font import math import time neato = font.XglcdFont('/home/pi/Pi-ST7565/fonts/Neato5x7.c', 5, 7) glcd = st7565.Glcd(rgb=[21, 20, 16]) glcd.init() x0, y0 = 63, 31 def get_face_xy(angle, radius): """ Get x,y coordinates on face at specified angle and radius """ theta ...
11586903
import sys import yaml def readFile(filepath): with open(filepath, 'r') as f: out = yaml.safe_load(f) return out return [] def main(argv): # create commonServer js file to extract doc from commonServer = readFile('./Packs/Base/Scripts/script-CommonServer.yml') jsScript = commonSe...
11586947
import sifter.grammar __all__ = ('TestNot',) # section 5.8 class TestNot(sifter.grammar.Test): RULE_IDENTIFIER = 'NOT' def __init__(self, arguments=None, tests=None): super(TestNot, self).__init__(arguments, tests) self.validate_arguments() self.validate_tests_size(1) def evalua...
11586986
import argparse import json import os from named_entity_recognition.api_ner.google_api_repository import remote_named_entity_recognition if __name__ == '__main__': arg_parser = argparse.ArgumentParser() arg_parser.add_argument('--data_path', type=str, required=True) arg_parser.add_argument('--output_path'...
11587010
from theano import Op class MyOp(Op): __props__ = () def __init__(self, ...): # set up parameters def make_node(self, ...): # create apply node def make_thunk(self, node, storage_map, compute_map, no_recycling): # return a thunk def infer_shape(self, i...
11587037
from System import IntPtr from System.Runtime.InteropServices import Marshal from Ironclad import HGlobalAllocator, IAllocator def GetAllocatingTestAllocator(allocsList, freesList): class TestAllocator(HGlobalAllocator): def Alloc(self, bytes): ptr = HGlobalAllocator.Alloc(self, bytes) ...
11587045
import torch, torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torchvision.models.inception import Inception3 from warnings import warn from torch.utils.model_zoo import load_url class BeheadedInception3(Inception3): """ Like torchvision.models.inception.Inception3 but the h...
11587053
import logging _LOGGER = logging.getLogger(__name__) def decode(packet): """ https://github.com/telldus/telldus/blob/master/telldus-core/service/ProtocolEverflourish.cpp """ data = packet["data"] house = data & 0xFFFC00 house >>= 10 unit = data & 0x300 unit >>= 8 unit += 1 ...
11587057
import wx import wx.lib.agw.hyperlink as hl import webbrowser from parser_filmow import Parser from utils import delay class Frame(wx.Frame): def __init__(self, *args, **kwargs): super(Frame, self).__init__(*args, **kwargs) self.MyFrame = self self.is_running = False self.panel = wx.Panel( ...
11587068
from typing import Optional from pydantic import BaseModel class Colors(BaseModel): primary: str = "#E58325" accent: str = "#00457A" secondary: str = "#973542" success: str = "#43A047" info: str = "#1976D2" warning: str = "#FF6F00" error: str = "#EF5350" class Config: orm_mod...
11587101
import gfapy import unittest class TestApiGFA2Lines(unittest.TestCase): def test_S(self): fields=["S","1","ACGTCACANNN","RC:i:1232","LN:i:11","ab:Z:abcd", "FC:i:2321","KC:i:1212"] s="\t".join(fields) gfapy.Line(s) # nothing raised self.assertEqual(gfapy.line.segment.GFA1, gfapy.Line(s)._...
11587149
import logging from datetime import datetime from itertools import islice import requests from django.conf import settings as django_settings from django.contrib import auth from django.db.models import Count, F, Prefetch from django_auth_ldap.backend import _LDAPUser from edd import utilities from main import models...
11587202
from jyotisha.panchaanga import temporal from jyotisha.panchaanga.spatio_temporal import City from jyotisha.panchaanga.writer.generation_project import dump_summary def dump_mysore_history(): maisUru = City.get_city_from_db(name="Mysore") # dump_summary(year=1797, city=maisUru) for year in range(1740, 1810): ...
11587209
from unittest import TestCase import numpy as np from SEAL.lib import compute_knot_insertion_matrix class TestComputeKnotInsertionMatrix(TestCase): def test_compute_knot_insertion_matrix(self): """ Given: p = 2 tau = [-1, -1, -1, 0, 1, 1, 1] t = [-1, -1, -1, -...
11587228
from ..broker import Broker class IfGroupMemberBroker(Broker): controller = "if_group_members" def index(self, **kwargs): """Lists the available if group members. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using this m...
11587254
from neo.Utils.VMJSONTestCase import VMJSONTestCase import glob import io import os import json from neo.VM.tests.JsonTester import execute_test class VMTest(VMJSONTestCase): def test_files(self): """ This downloads the *.JSON test files from the NEO-VM repo and runs all tests """ ...
11587265
from pypsi.plugins.history import HistoryCommand, HistoryPlugin from pypsi.shell import Shell class PluginShell(Shell): plugin = HistoryPlugin() class TestHistoryPlugin: def setup(self): self.shell = PluginShell() def teardown(self): self.shell.restore()
11587311
from unittest.mock import MagicMock from cauldron.session.writing import components def test_get_components_unknown(): """Should return an empty component for unknown component name.""" result = components._get_components('foo', MagicMock()) assert not result.files assert not result.includes
11587316
class Solution: def beforeAndAfterPuzzles(self, phrases: List[str]) -> List[str]: hashMap, result = defaultdict(set), set() for i, phrase in enumerate(phrases): parts = phrase.split(' ', 1) hashMap[parts[0]].add((phrase, i)) for i, phrase in enumerate(phrases): ...
11587341
from threading import Thread from traceback import print_exc class MatchComms(Thread): def __init__(self, agent): super().__init__(daemon=True) self.agent = agent self.online = 1 def stop(self): self.online = 0 def run(self): while self.online: try: ...
11587355
from changes.api.serializer import Crumbler, register from changes.models.repository import Repository, RepositoryBackend from changes.vcs.git import GitVcs from changes.vcs.hg import MercurialVcs DEFAULT_BRANCHES = { RepositoryBackend.git: GitVcs.get_default_revision(), RepositoryBackend.hg: MercurialVcs.get...
11587373
import base64 import json import zlib from typing import Any, List import pytest from aws_lambda_powertools.utilities.parser import ValidationError, envelopes, event_parser from aws_lambda_powertools.utilities.parser.models import CloudWatchLogsLogEvent, CloudWatchLogsModel from aws_lambda_powertools.utilities.typing...
11587375
from typing import List, Tuple, Union import torch.nn as nn from core.networks.cnn import CNN from core.networks.mlp import MLP from core.networks.rl_model import RLModel Critic = Union["ContinuousVNetwork", "CNNContinuousVNetwork"] class ContinuousVNetwork(RLModel): """Simple value network with MLP.""" d...
11587398
from .robot import * from .ocp import * from .cost import * from .constraints import * from .solver import * from .mpc import * from . import utils
11587411
import synapse.tests.utils as s_test class TransportTest(s_test.SynTest): async def test_model_transport(self): async with self.getTestCore() as core: craft = (await core.nodes('[ transport:air:craft=* :tailnum=FF023 :type=helicopter :built=202002 :make=boeing :model=747 :serial=1234 :operat...
11587424
from zorro.di import has_dependencies, dependency from .xcb import Core, Rectangle from .commands import CommandDispatcher class Drag(object): start_distance = 5 def __init__(self, win, x, y): self.win = win if self.win.frame: self.win = self.win.frame self.drag_started ...
11587426
from django.db import models class NewsManager(models.Manager): def get_published_news(self): return self.filter(status='published') class CategoryManager(models.Manager): def get_active_category(self): return self.filter(active=True)
11587475
import re from mau.lexers.base_lexer import BaseLexer, TokenTypes class TextLexer(BaseLexer): def _process_whitespace(self): regexp = re.compile(r"\ +") match = regexp.match(self._tail) if not match: return None return self._create_token_and_skip(TokenTypes.TEXT, " ...
11587493
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class FirstOfTagTests(SimpleTestCase): @setup({"firstof01": "{% firstof a b c %}"}) def test_firstof01(self): output = self.engine.render_to_string("firstof01", {"a": 0, "c": 0, "b": 0}) ...
11587512
import hashlib import json import logging import re import pip import pymongo import requests from pymongo import MongoClient from gnews.utils.constants import AVAILABLE_LANGUAGES, AVAILABLE_COUNTRIES, GOOGLE_NEWS_REGEX def lang_mapping(lang): return AVAILABLE_LANGUAGES.get(lang) def country_mapping(country)...
11587519
def %block_name%(bot, update): global answers answers[bot.message.chat_id]["%block_special_name%"] = %function%(%function_args%)
11587528
import torch import torch.nn as nn import os from div.download_from_url import download_from_url try: from torch.hub import _get_torch_home torch_cache_home = _get_torch_home() except ImportError: torch_cache_home = os.path.expanduser( os.getenv('TORCH_HOME', os.path.join( os.getenv('XD...
11587541
import math import sys from magpieparsers.parser_common import * #from helper import positive_id from magpieparsers import error as parsers_error SCOPES = ['module','type','valuetype','struct','union','function','exception','eventtype','component','home', 'MagpieAST'] def getBasicTypenode(typename, ast): returntype...
11587550
from ctypes import CDLL, c_bool, c_wchar_p, c_int, c_ubyte, sizeof, c_void_p from logging import getLogger from os import environ from platform import architecture from sys import maxsize from typing import List, Tuple, Optional from PIL import Image LOG = getLogger(__name__) # LCD types TYPE_MONO = 1 TYPE_COLOR = 2...
11587586
import pytest import os import subprocess import glob import re from shutil import copyfile dynamorio = pytest.mark.skipif('DYNAMORIO_HOME' not in os.environ.keys(), reason="DYNAMORIO_HOME not set") ithemal = pytest.mark.skipif('ITHEMAL_HOME' not in os.environ.keys(), ...
11587613
from Configuration import ExecutionMode from Configuration import Settings from EndToEndTests.oldScripts import mainE2ELegacyTests from DataBase import createSchema from pynvml import nvmlInit from Utils import Execution, init_context, init_comparators, gpuMemory from blazingsql import DataType from Runner import runT...
11587624
import re from abc import abstractmethod, ABCMeta from pycparser import c_ast as a class AstVisitor(object): __metaclass__ = ABCMeta def __init__(self): self.methods = { a.ArrayDecl: self.visit_ArrayDecl, a.ArrayRef: self.visit_ArrayRef, a.Assignment: self.visit_A...
11587630
import sys import argparse import datetime from operator import itemgetter, attrgetter from itertools import groupby from typing import List from humanfriendly import parse_timespan, format_timespan import requests from kubernetes import client, config def parse_args(argv=sys.argv[1:]): p = argparse.ArgumentPars...
11587648
import os import subprocess import linuxcnc import psutil from pyudev.pyqt5 import MonitorObserver from pyudev import Context, Monitor, Devices from qtpy.QtCore import Slot, Property, Signal, QFile, QFileInfo, QDir, QIODevice from qtpy.QtWidgets import QFileSystemModel, QComboBox, QTableView, QMessageBox, \ QAp...
11587708
from abc import ABC from dataclasses import dataclass from typing import List, Dict import torch.nn as nn from torch import Tensor from yacs.config import CfgNode from fandak.core.datasets import GeneralBatch from fandak.utils.torch import GeneralDataClass @dataclass(repr=False) class GeneralLoss(GeneralDataClass):...
11587726
class BACFConfig: cell_size=4 cell_selection_thresh=0.75**2 search_area_shape='square' search_area_scale=5 filter_max_area=50**2 interp_factor=0.015 output_sigma_factor=1./16 interpolate_response=4 newton_iterations=5 number_of_scales=1 scale_step=1.01 admm_iterations=2 ...
11587730
from pytwitcherapi import chat class MyIRCClient(pytwitcherapi.IRCClient): def on_privmsg(self, connection, event): super(MyIRCClient, self).on_privmsg(connection, event) print chat.Message3.from_event(event)
11587731
ESV_API_BASE_URL = 'http://www.esvapi.org/v2/rest' ESV_API_PASSAGE_QUERY_URL = '%s/passageQuery' % ESV_API_BASE_URL
11587762
import matplotlib.pylab as plt convlayer = model.layers[0].get_weights() c1 = convlayer[0].squeeze()[0] c1 = (c1 - c1.min())/(c1.max() - c1.min())
11587780
from __future__ import print_function import csv import distutils import shutil import pandas as pd import os import re from collections import defaultdict import six import sys from Bio import SeqIO from bracerlib.bracer_func import process_chunk, find_possible_alignments, extract_blast_info import glob import pdb...
11587808
import pickle as pkl import gzip import numpy import random import math import pandas as pd from datetime import datetime from datetime import timedelta from scipy import stats def delay(j, day): return (datetime.strptime(j, '%Y-%m-%d') - timedelta(days=day)).strftime('%Y-%m-%d') class TextIterator: """Simp...
11587844
from django import forms __all__ = ('RatingField',) class RatingField(forms.ChoiceField): pass
11587863
class herb_cleaning_config(): SCRIPT_NAME = "HERB CLEANING SCRIPT 0.3v"; BUTTON = [ ]; CHATBOX = [ ]; FUNCTION = [ ]; INTERFACE = [ ".\\resources\\interface\\bank\\close_bank.png", ".\\resources\\interface\\bank\\bank_all.png", ]; ITE...
11587893
from typing import Dict, Tuple from starfish.core.codebook.codebook import Codebook from starfish.core.intensity_table.decoded_intensity_table import DecodedIntensityTable from starfish.core.spots.DecodeSpots.trace_builders import build_traces_sequential from starfish.core.types import Axes, Features, SpotFindingResul...
11587905
from tensorflow.keras.layers import Input from tensorflow.keras.models import Model from tensorflow.keras.optimizers import Adam from flowket.callbacks.monte_carlo import TensorBoardWithGeneratorValidationData, \ default_wave_function_stats_callbacks_factory from flowket.evaluation import evaluate from flowket.lay...
11587932
from PyQt4 import QtCore, QtGui import sys import gettext #Utf-8 Encoding generated from Qt Designer try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 def _translate(context, text, disambig): retur...
11587937
import numpy as np import matplotlib.pyplot as plt import os from math import pi # Define a data type for the simdata structure simdata = np.dtype([('t', np.float64), ('alpha', np.float64), ('beta', np.float64), ('gamma', np.float64), ('w1...
11587971
from typing import Optional, List, Set from figcli.commands.command_context import CommandContext from figcli.models.defaults.defaults import CLIDefaults, CliCommand from figcli.models.role import Role from figgy.models.run_env import RunEnv class HelpContext(CommandContext): """ Contextual information for H...
11587980
from datetime import datetime from sqlalchemy import Column from sqlalchemy import create_engine from sqlalchemy import DateTime from sqlalchemy import Integer from sqlalchemy.orm import Mapped from sqlalchemy.orm import registry from sqlalchemy.orm import Session from sqlalchemy.sql.functions import now mapper_regis...
11587981
import time import pytest # pytest currently explodes with monkeypatching time.time @pytest.mark.xfail(run=False) class TestTimeObject(object): def test_now(self, space, monkeypatch): monkeypatch.setattr(time, "time", lambda: 342.1) w_secs = space.execute("return Time.now.to_f") assert sp...
11587994
import pytest from aao.spiders import SpiderWilliamhill pytestmark = pytest.mark.williamhill COMPETITIONS = [ # country, _country, league, _league, page_name ['england', 'england', 'premier_league', 'English-Premier-League', 'English Premier League'], ['england', 'england', 'efl_championship', 'English-...
11588010
from typing import List from usaspending_api.disaster.v2.views.elasticsearch_base import ( ElasticsearchDisasterBase, ElasticsearchLoansPaginationMixin, ) from usaspending_api.references.models import Cfda from usaspending_api.search.v2.elasticsearch_helper import get_summed_value_as_float class CfdaLoansVie...
11588052
import ALPHA3 import random, re LOCAL_PATH = __path__[0] NOP = { 'eax': chr(0x43), # nop: 43 = INC EBX 'ebx': chr(0x42), # nop: 42 = INC EDX 'ecx': chr(0x43), # nop: 43 = INC EBX 'edx': chr(0x43), # nop: 43 = INC EBX 'esi': chr(0x43), # nop: 43 = INC EBX 'edi': chr(0x43), # nop: 43 = INC EBX }...
11588055
import json from random import sample import os from sklearn.metrics import precision_recall_curve, average_precision_score, accuracy_score from api.batch_processing.postprocessing import load_api_results from data_management.cct_json_utils import CameraTrapJsonUtils from visualization import visualization_utils #%...
11588062
import pickle import argparse from pathlib import Path from rdkit import Chem from molbart.tokeniser import MolEncTokeniser from molbart.data.datasets import Chembl, MolOptDataset MOL_OPT_TOKENS_PATH = "mol_opt_tokens.txt" PROP_PRED_TOKENS_PATH = "prop_pred_tokens.txt" NUM_UNUSED_TOKENS = 200 REGEX = "\[[^\]]+]|Br?|...