text
stringlengths
6.04k
39.5k
#/* # * Copyright 2016 -- 2021 IBM Corporation # * # * 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 applic...
# Copyright © 2017-2019 <NAME> # # 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 use, copy, modify, merge, publish, distribut...
import sqlite3 import pandas import itertools import networkx as nx from gtfspy.gtfs import GTFS from gtfspy.util import timeit from scripts.all_to_all_settings import * def attach_database(conn, other_db_path, name="other"): cur = conn.cursor() cur.execute("ATTACH '%s' AS '%s'" % (str(other_db_path), name)...
""" Subclass of the BaseCredContainer used for reading secrets from bitwarden password manager. This class wraps the bitwarden CLI. See: https://bitwarden.com/help/article/cli/#using-an-api-key Note that only the Enterprise version of bitwarden can (supported) hit the REST API. In contrast, the API key that can be ...
from __future__ import print_function import os import time import numpy as np import tensorrt as trt import pycuda.driver as cuda import pycuda.autoinit import cv2 import mmcv from tqdm import tqdm import pickle as pkl from vis_util import show_corners from tools.model_zoo import model_zoo as zoo TRT_LOGGER = trt.L...
from ROAR.control_module.controller import Controller from ROAR.utilities_module.vehicle_models import VehicleControl, Vehicle from ROAR.utilities_module.data_structures_models import Transform, Location import numpy as np import logging from ROAR.agent_module.agent import Agent from typing import Tuple import json fro...
import numpy as np import pandas as pd from sklearn.metrics import silhouette_samples, silhouette_score from sklearn.metrics import confusion_matrix, accuracy_score, recall_score, precision_score, f1_score,roc_auc_score,roc_curve from sklearn.metrics import mean_squared_error,mean_absolute_error,r2_score import ma...
import logging import math import numpy as np import pyglet import udSDK logger = logging.getLogger(__name__) class Camera(): """ Base camera class for Euclideon udSDK Python Sample This sets the default behaviour for a perspective camera Stores the state of the camera, and provides functions for modifyting ...
import os import numpy as np import torch from tqdm import tqdm from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils from skimage import io, transform from utils.Config import opt from skimage import exposure import matplotlib.pylab as plt from utils import array_tool as at from sk...
# -*- coding: utf-8 -*- """Plotting.py for notebook 05_Preliminary_comparison_of_simulations_AGN_fraction_with_data This python file contains all the functions used for plotting graphs and maps in the 2nd notebook (.ipynb) of the repository: 05. Preliminary comparison of the 𝑓MM between simulation and data Script wr...
""" Support for Shelly smart home devices. For more details about this component, please refer to the documentation at https://home-assistant.io/components/shelly/ """ # pylint: disable=broad-except, bare-except, invalid-name, import-error from datetime import timedelta import logging import time import as...
''' dip @author <NAME> - 1000766739 @brief ee-5323 - project - @date 10/31/21 code based on below YouTube tutorial and Pymotw.com documentation for socket mod. @link https://www.youtube.com/watch?v=3QiPPX-KeSc @link https://pymotw.com/2/socket/tcp.html python socket module documentation @link https://...
from __future__ import absolute_import, division, print_function, unicode_literals import json import logging import math import os import sys from io import open import numpy as np import torch from torch import nn from torch.nn import CrossEntropyLoss, MSELoss from pytorch_transformers import WEIGHTS_NAME, CONFIG_N...
from tensorflow.python.platform import flags from tensorflow.contrib.data.python.ops import batching import tensorflow as tf import json from torch.utils.data import Dataset import pickle import os.path as osp import os import numpy as np import time from scipy.misc import imread, imresize from torchvision.datasets imp...
import pytest from dnaio import Sequence from cutadapt.adapters import ( RemoveAfterMatch, RemoveBeforeMatch, FrontAdapter, BackAdapter, PrefixAdapter, SuffixAdapter, LinkedAdapter, MultipleAdapters, IndexedPrefixAdapters, IndexedSuffixAdapters, ) def test_back_adapter_absolut...
import math import os import tensorflow as tf import numpy as np import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import ops import utils import model_fctd import data import config import visualizations as vis FLAGS = tf.app.flags.FLAGS def test_encode_decode_synth_data(): batch_size = 50...
import discord import asyncio import time import aiohttp import re import pathlib import os import json from bs4 import BeautifulSoup from datetime import datetime from models.UpdatedMessage import UpdatedMessage from models.EmbedTemplate import EmbedTemplate from models.BotMention import BotMention from f...
#Author: <NAME> import sensor, image, time, pyb, ustruct, math, utime def get_gain(): gain_reg_val = sensor.__read_reg(0x00) #print("gain_reg_val: " + str(gain_reg_val)) bitwise_gain_range = (gain_reg_val & 0b11110000) >> 4 #get the highest four bits which correspond to gain range. Depends on the bits set...
# -*- coding: utf-8 -*- import datetime import logging import os from ast import literal_eval import numpy as np import pandas as pd from fooltrader.consts import CHINA_STOCK_INDEX, USA_STOCK_INDEX from fooltrader.contract import data_contract from fooltrader.contract import files_contract from fooltrader.contract.f...
# Copyright 2018 PayTrace, 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 wri...
import os import numpy as np import h5py import tempfile import pytest from keras import backend as K from keras.layers import Input, Convolution3D, concatenate from keras.models import Model from keras.optimizers import Adam import pybel from tfbio.data import Featurizer from kalasanty.net import dice_np, dice,...
# --------------------- from bs4 import BeautifulSoup as bs import requests import urllib3 import urllib from urllib.parse import unquote import re import os import sys import json import time from colorama import Fore, init from pprint import pprint from datetime import datetime import uuid import threading # --------...
import math from collections import OrderedDict import pytest import torch from torch import nn import continual as co from continual.module import TensorPlaceholder torch.manual_seed(42) def test_sequential(): S = 3 long_example_clip = torch.normal(mean=torch.zeros(10 * 3 * 3)).reshape( (1, 1, 10...
# encoding=utf8 import jenkins_job_wrecker.modules.base from jenkins_job_wrecker.helpers import get_bool, Mapper class Triggers(jenkins_job_wrecker.modules.base.Base): component = 'triggers' def gen_yml(self, yml_parent, data): triggers = [] for child in data: object_name = child...
from scipy.sparse import vstack from sklearn.metrics.pairwise import cosine_similarity import numpy as np from sisu.preprocessing.tokenizer import is_relevant_sentence, make_sentences, sanitize_text from gismo.gismo import Gismo, covering_order from gismo.common import auto_k from gismo.parameters import Parameters fr...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Postfix mail log parser and filter. This script filters and parses Postfix logs based on provided filter parameters. Example: To use this script type 'python pfstats.py -h'. Below is an example that filteres postfix log file (even gziped) based on date, se...
#!/usr/bin/env python3 import subprocess as sub import time import simplejson as json import os from sys import stderr import subprocess import platform import sys import stat import pwd import grp import BrewPiUtil as util import brewpiVersion import expandLogMessage from packaging import version from MigrateSettings...
import json from datetime import datetime, timedelta from dateutil import parser as dateparser from django.contrib.auth.decorators import user_passes_test from django.db.models import Q from django.http import HttpResponseNotFound, JsonResponse from django.shortcuts import render from django.utils import timezone fro...
"""cluegame.py -- Classes to track Clue game events and make inferences The board game Clue is also known as Cluedo. This module contains classes that make it possible to record specific knowledge-generating events that a Clue player may observe during the course of a game (such as, for example, that Player A showed ...
import warnings import torch from torch.utils.data.dataloader import DataLoader from torch.optim import lr_scheduler import numpy as np from models import * from dataloader import Aff2CompDataset, SubsetSequentialSampler, SubsetRandomSampler, Prefetcher from tqdm import tqdm import os import time from sklearn.metrics i...
import numpy as np import tensorflow as tf import tensorlayer as tl import datetime from log import LOG_PATH import os import src.visualization as vis from src.config import Config as con import tensorflow.contrib as tfcontrib server_count = con.server_count server_state_dim = con.server_state_dim total_server_state_d...
import pytz import datetime from fixture import DataSet, NamedDataStyle, SQLAlchemyFixture from pmg.models import ( db, House, Committee, CommitteeMeeting, Bill, BillType, Province, Party, CommitteeMeetingAttendance, Member, CallForComment, TabledCommitteeReport, Com...
import json import os import logging from datetime import datetime from django.db.models import Q,Count from django.http import JsonResponse from django.views.generic import View from django.views.decorators.csrf import csrf_exempt from django.utils.decorators import method_decorator from django.conf import settings fr...
import atexit import os import re import shutil from enum import Enum from typing import List, Optional import collections from gitflow import cli, const, repotools, _, utils from gitflow.common import Result from gitflow.const import VersioningScheme from gitflow.properties import PropertyIO from gitflow.repotools i...
#!python3 import contextlib import json import logging import os from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa from dcos_e2e import cluster from dcos_e2e import node from dcos_test_utils impo...
# ! /usr/bin/python # -*- coding: utf-8 -*- # ============================================================================= # Copyright 2020 NVIDIA. 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 obta...
# GUI Application automation and testing library # Copyright (C) 2006 <NAME> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 # of the License, or (at your optio...
# This file has a lot going on in it because really ties the game together, # just like The Dude's rug. You can probably read it start to finish, but # by all means start jumping around from here. # Dependencies for rendering the UI from clubsandwich.ui import ( LabelView, LayoutOptions, UIScene, ) # including s...
""" instructions: blah blah blah settings: tifa: enabled: True unit test by function (bool): Whether to test each function entirely before moving onto the next one, or to first check that all functions have been defined, and then checking their parameters, etc. Defaults to True....
import numpy as np import cv2 import imageio import tensorflow as tf import json import csv import os import sys sys.path.append("object_detection") sys.path.append("object_detection/deep_sort") sys.path.append("action_detection") import argparse import object_detection.object_detector as obj import action_detection...
import argparse import random, os from os.path import join as j from collections import OrderedDict import conllu import torch import pathlib import tempfile import depedit import stanza.models.parser as parser from stanza.models.depparse.data import DataLoader from stanza.models.depparse.trainer import Trainer from s...
#!/usr/bin/env python3 import yoda, sys import h5py import numpy as np def chunkIt(seq, num): avg = len(seq) / float(num) out = [] last = 0.0 while last < len(seq): out.append(seq[int(last):int(last + avg)]) last += avg # Fix size, sometimes there is spillover # TODO: replac...
""" Utilities for (weighted) bootstrap resampling applied to geoscientific point-data. """ import numpy as np import pandas as pd from .meta import subkwargs from .spatial import great_circle_distance, _get_sqare_grid_segment_indicies from .log import Handle logger = Handle(__name__) try: import sklea...
from __future__ import division, print_function, unicode_literals from config import * __all__ = ['Map', 'Vertex', 'Edge', 'State'] class State: FREE = 0 CLOSED = 1 MANDATORY = 2 OPTIONAL = 3 class Square: def __init__(self): self._has_card = False @property ...
# 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 writing, software # d...
import numpy as np import time import matplotlib.pyplot as plt import imageio from scipy.optimize import fsolve from body import Body def get_position_from_Kepler(semimajor_axis, eccentricity, inclination, ascending_node, argument_of_periapsis, mean_anomaly, mass_orbit, G=6.67430 * 10**(-11)): """ Get the pos...
import pyttsx3 import speech_recognition as sr import os import subprocess #from requests import request , session #from pprint import pprint as pp import json import requests import datetime from datetime import date import time import calendar import warnings import random import wikipedia import web...
import time import datetime as dt from pathlib import Path from tkinter import messagebox import re import niq_misc import math import traceback from niq_misc import replace_entry def check_valid_vertex_file(gui): """ Checks user-provided vertex selection file (HTML) for issues that could cause errors wi...
import datetime import logging import os import warnings import matplotlib.pyplot as plt import numpy as np import pandas as pd from logutils import BraceMessage as __ from tqdm import tqdm import simulators from mingle.models.broadcasted_models import inherent_alpha_model from mingle.utilities.chisqr import chi_squa...
"""Utility module for setting up different envs""" import numpy as np import structlog from shapely.geometry import Point from ray.rllib.agents.ppo import DEFAULT_CONFIG from ray.rllib.env.multi_agent_env import MultiAgentEnv from deepcomp.util.constants import SUPPORTED_ENVS, SUPPORTED_AGENTS, SUPPORTED_SHARING, SUPP...
# @Created Date: 2019-12-08 06:46:49 pm # @Filename: api.py # @Email: <EMAIL> # @Author: <NAME> # @Last Modified: 2020-02-16 10:54:32 am # @Copyright (c) 2020 MinghuiGroup, Soochow University from typing import Iterable, Iterator, Optional, Union, Generator, Dict, List from time import perf_counter from numpy import n...
#!/usr/bin/env python from __future__ import print_function from ipywidgets import * from IPython.display import display from getpass import getpass import glob import os import stat import paramiko from string import Template from os.path import expanduser from pkg_resources import resource_string from IPython.core.ma...
# from app.common.utils import * from sqlalchemy import desc from settings import Config from app.models import * from app.extensions import db from app.models.base import _BaseModel from app.common.message import DBError # 获取分页数据 def Pages(_request, _TABLE, _filter=None): page = get_page_value(_request) per...
# My script to process the generated data # The temperature we want to aim for aimTemperature = float(30 + 273) # To halt the script import sys # Numpy matrices import numpy as np #Used to get the epoch time to calculate the time difference dt import datetime import time #Regular expressions import re # Generate rando...
""" setup gban """ # Copyright (C) 2020 by <EMAIL>, < https://github.com/UsergeTeam >. # # This file is part of < https://github.com/UsergeTeam/Userge > project, # and is released under the "GNU v3.0 License Agreement". # Please see < https://github.com/uaudith/Userge/blob/master/LICENSE > # # All rights reserved imp...
# # MythBox for XBMC - http://mythbox.googlecode.com # Copyright (C) 2010 <EMAIL> # # 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 2 # of the License, or (at your option) ...
# -*- coding: utf-8 -*- """ This file contains language-specific implementation for an Afrikaans voice. The idea is that this file contains subclassed Voice and Phoneset implementations. This package ttslab/voices may then also contain speaker specific implementations e.g. "afrikaans_SPEAKER.py" """ fr...
from flask import request, url_for from flask_api import FlaskAPI, status, exceptions from flask_cors import CORS, cross_origin import torch import json import numpy as np import torch from modeling_gptneo import GPTNeoForCausalLM from modeling_gpt2 import GPT2LMHeadModel from transformers import ( GPTNeoConfig...
import matplotlib.pyplot as plt import numpy as np from visHullTwoD import Scene, SegmentType #%% def doubleFaceTest(f): doubleFace = False origHE = f.halfEdge he = f.halfEdge.next while he != origHE: if f.index != he.leftFace.index: doubleFace = True break he =...
#!/usr/bin/env python """ Info: This script performs topic modeling on the clean tweets by <NAME>. The number of topics is estimated by computing coherence values for different number of topics, and an LDA model is constructed with the number of topics with the highest coherence value. Visualizations of the topics are ...
from objects.user.User import User from objects.interface.dbconn import DB from objects.user.Currency import get_currency_symbol from objects.threads.UploadThread import UploadThread import utils.globals as _globals from utils.print import print_message, print_error from utils.enums import Months, SettingsSelection, is...
import base64 import concurrent.futures import json import logging import sys import time import traceback as tb import uuid from google.api_core import retry from google.cloud import pubsub_v1 import octue.exceptions import twined.exceptions from octue.cloud.credentials import GCPCredentialsManager from octue.cloud.p...
from __future__ import division from collections import OrderedDict from sqlalchemy import create_engine, MetaData, func from sqlalchemy.orm import sessionmaker, class_mapper from django.conf import settings from django.db.backends.base.creation import TEST_DATABASE_PREFIX from django.db import connection if settin...
""" The vasprun.xml parser interface. --------------------------------- Contains the parsing interfaces to ``parsevasp`` used to parse ``vasprun.xml`` content. """ # pylint: disable=abstract-method, too-many-public-methods import numpy as np from parsevasp.vasprun import Xml from parsevasp import constants as parseva...
from typing import Union, List import copy import math import numpy as np """ Principles: - geometry objects are defined by the minimum required information - Points are made of coordinates (floats), everything else is based on Points except for Vectors """ class Point: def __init__(self, x: float, y: float, ...
import json import logging from django.core.exceptions import ValidationError from django.db import transaction from django.forms import DateField, CharField import requests import requests.exceptions from . import models from contracts.crawler_forms import EntityForm, ContractForm, \ TenderForm, clean_place, Pr...
import datetime import fnmatch import hashlib import json import time import arrow import os from botocore.exceptions import ClientError from boto.s3.key import Key from security_monkey.alerters import custom_alerter from security_monkey.common.sts_connect import connect from security_monkey import app, db from securi...
# Copyright (c) 2019 PaddlePaddle 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 applic...
import threading import time import pandas as pd import numpy as np import matplotlib.cm as cm import matplotlib.pyplot as plt import os import fnmatch import random import re import getpass import sys from rdflib import Graph from synbiohub_adapter.SynBioHubUtil import * from sbol import * """ This class will...
from __future__ import absolute_import, division, print_function import os from io import StringIO import time import tempfile from libtbx.utils import Sorry from scitbx.array_family import flex from libtbx import adopt_init_args from libtbx import easy_run from cctbx.geometry_restraints.manager import manager as sta...
import numpy as np import logging import itertools from typing import Dict, Optional, List from flaml.tune import Categorical, Float, PolynomialExpansionSet from flaml.tune import Trial from flaml.onlineml import VowpalWabbitTrial from flaml.searcher import CFO logger = logging.getLogger(__name__) class BaseSearcher...
from __future__ import division import os import sys import time import glob import logging from tqdm import tqdm import torch import torch.nn as nn import torch.utils import torch.nn.functional as F import torch.backends.cudnn as cudnn import torchvision.transforms as transforms from torch.utils.data im...
import argparse import torch import os from dassl.utils import setup_logger, set_random_seed, collect_env_info from dassl.config import get_cfg_default from dassl.engine import build_trainer import numpy as np import pandas as pd from torch.utils.data import DataLoader import pytorch_lightning as pl from submission.N...
#!/usr/bin/env python # # 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 # "...
# ============================= # > Command implementations # ============================ import atexit import dataclasses import json import os import shutil import subprocess import sys from contextlib import contextmanager from datetime import datetime, timezone from pathlib import Path from tempfile import Tempor...
#!/usr/bin/env python import re import os import sys import glob # drop support for older python unsupported = None if sys.version_info < (2, 7): unsupported = 'Versions of Python before 2.7 are not supported' elif (3, 0) <= sys.version_info < (3, 6): unsupported = 'Versions of Python before 3.6 are not suppor...
import discord from discord.ext import commands from func import mojang, options, lbFunc, hypFunc class Hypixel(commands.Cog): def __init__(self, bot): self.bot = bot async def statEmbed(self, ctx, out): embed = discord.Embed() embed=discord.Embed(title="Hypixel Stats L...
import unittest import numpy as np from spn.algorithms.Inference import add_node_likelihood, likelihood, log_likelihood from spn.structure.Base import Leaf, get_nodes_by_type, assign_ids def identity_ll(node, data, dtype=np.float64, **kwargs): probs = np.zeros((data.shape[0], 1), dtype=dtype) probs[:] = np....
import json import os from tornado.escape import to_basestring from tornado.web import Application, RequestHandler, authenticated, addslash from jupyterhub.services.auth import HubAuthenticated from .backup import database_from_backup from .config import Config from .emails import send_published_email, validate_token f...
import sys import numpy as np import pandas as pd from pathlib import Path import matplotlib.pyplot as plt # App import methylprep #patching try: # python 3.4+ should use builtin unittest.mock not mock package from unittest.mock import patch except ImportError: from mock import patch #LOCAL = Path('/Volu...
# -*- coding: utf-8 -*- """ Immersion factor calibration. """ # Importation of modules import os import time import h5py import string import deepdish import datetime import numpy as np from scipy import stats import matplotlib import matplotlib.pyplot as plt from refractivesqlite import dboperations as DB # https:/...
import sys, time import numpy as np from numba import jit from math import erf from scipy.spatial import cKDTree # template to replace MPI functionality for single threaded use class MPI_to_serial(): def bcast(self, *args, **kwargs): return args[0] def barrier(self): return 0 # try running in...
import json import bz2 from systemtools.basics import * from systemtools.location import * from systemtools.duration import * from systemtools.file import * from enum import Enum import numpy as np def ndarrayToList(*args, **kwargs): return ndarray2list(*args, **kwargs) def ndarray2list(data): data = list(dat...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
# <pep8-80 compliant> # ##### BEGIN GPL LICENSE BLOCK ##### # # 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 2 # of the License, or (at your option) any later version. # # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE 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/lice...
# Copyright (c) 2015 Orange. # 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 a...
import os import re import json import requests import csv from typing import Union, List, Tuple from streamlit.uploaded_file_manager import UploadedFile from tei_entity_enricher.util.exceptions import MissingDefinition, BadFormat, FileNotFound class FileReader: def __init__( self, file: Union[Upl...
from __future__ import print_function, absolute_import, unicode_literals import os, sys import datetime import inspect import traceback import re from optparse import make_option from .commands import register_command, Command, get_answer, get_input, \ CommandManager, OptionParser, NewOptionParser, NewFormatter fro...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # MIT License # # Copyright (c) 2019, 2020 MACNICA Inc. # # 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 with...
import csv from pathlib import Path from collections import Counter from gender_novels import common from gender_novels.novel import Novel class Corpus(common.FileLoaderMixin): """The corpus class is used to load the metadata and full texts of all novels in a corpus Once loaded, each corpus contains a ...
# -*- coding: utf8 -*- from __future__ import print_function from misc_tools import TimeIt, recursive_map, flatten, memoize, memoize_range @memoize_range(16) def int2_4bits(val): """return the binary value as a tuple of 4 bits""" binval = bin(val)[2:] if len(binval) > 4: raise DESError("binary v...
# https://developer.valvesoftware.com/wiki/Source_BSP_File_Format/Game-Specific#Vindictus """Vindictus. A MMO-RPG build in the Source Engine. Also known as Mabinogi Heroes""" import collections import enum import io import itertools import struct from typing import List from .. import base from .. import shared from ....
# -*- coding: utf-8 -*- """ Created on Fri Nov 27 15:32:42 2020 @author: b308 <NAME> """ import numpy as np import matplotlib.pyplot as plt import os #variable name si = ['TNF', 'TNFR1', 'TNFR1a' , 'TRADD', 'TNFR1a_TRADD', 'TRAF2', 'early_complex', 'RIPK1','early_complex_RIPK1', 'IKK...
# Copyright 2016 Tesora, Inc. # 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 ...
from __future__ import unicode_literals, absolute_import from collections import defaultdict from datetime import date from django.db.models import Q, F, QuerySet import pytest from django.test import RequestFactory from tri_declarative import class_shortcut from tri_form import ( Form, Field, ) from tests.mo...
import os os.environ['PATH'] = r'D:\home\site\wwwroot\cntk\cntk;' + os.environ['PATH'] APP_ROOT = os.path.dirname(os.path.abspath(__file__)) import sys, importlib, random import PARAMETERS import base64 import urllib import numpy as np import cntk from PIL import Image, ImageOps from io import BytesIO from flask impo...
import numpy as np import pandas as pd from collections import namedtuple import galsim from galsim import degrees, arcsec from flux_conversion import npho_dark_sky from galaxy_drawing import select_gals, build_galaxy_composite def draw_exposure(gal_composite_drawer, mean_npho_sky, seed, params): sk...
# -*- coding: utf8 -*- """ ====================================== Project Name: NLP File Name: spn4ner_processor Author: czh Create Date: 2021/11/15 -------------------------------------- Change Activity: ====================================== """ import json import string import logging from pathl...
# Copyright 2016 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...