text
stringlengths
6.04k
39.5k
# 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 time, os, sys, torch, copy, numbers from pathlib import Path import numpy as np # private lib from xvision import E...
"""Library for processing screen contents using OCR.""" import numpy as np from PIL import Image, ImageDraw, ImageGrab, ImageOps from rapidfuzz import fuzz from skimage import filters, morphology, transform from . import _base # Optional packages. try: from . import _tesseract except (ImportError, SyntaxError): ...
# -*- coding: utf-8 -*- import calendar import time import uuid from urllib import urlencode from django.db import connection from django.conf import settings import jwt import M2Crypto import mock from browserid.errors import ExpiredSignatureError from nose.tools import eq_, ok_ from services import utils, verify fr...
import logging import math from datetime import MINYEAR, MAXYEAR from typing import Dict, Optional, Type, List from django.db import models from django.db.models import QuerySet, Sum, Manager, F, OuterRef, Subquery from django.utils import timezone from polymorphic.models import PolymorphicModel from census_data.mode...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: © 2019- d3p Developers and their Assignees # 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...
import re import urllib2 import datetime import json import itertools from collections import defaultdict from django.http import HttpResponse from billy.core import db from billy.models import Bill from billy.core import settings from billy.utils import find_bill, parse_param_dt, fix_bill_id import pymongo from pi...
#!/usr/bin/env python3 import telegram #Libreria general de telegram from telegram import ReplyKeyboardMarkup, ReplyKeyboardRemove, InlineKeyboardButton, InlineKeyboardMarkup #Librerias particulares from telegram.ext import Updater, InlineQueryHandler, CommandHandler, CallbackQueryHandler #Librerias del bot1 from teleg...
import torch import torch.nn as nn from functools import partial from collections import OrderedDict from model.snl_block import ImprovedSNL def drop_path(x, drop_prob: float = 0., training: bool = False): if drop_prob == 0. or not training: return x keep_prob = 1 - drop_prob shape = (x...
"""Module providing high level PhaseI and PhaseII classes which drive the solver""" from typing import Dict, Tuple, Any, Sequence, Optional import time from collections import OrderedDict import collections.abc from pulp import PulpSolverError # type: ignore from .lpsolver import MallooviaLp, MallooviaLpMaximizeTimes...
import pdb,time import tempfile,os,datetime import numpy as np import matplotlib.pyplot as plt import requests from mayavi import mlab from tvtk.api import tvtk # python wrappers for the C++ vtk ecosystem def solar_position_approx(dt,degrees=False): """ This is from github.com/lkilcommons/geospacepy-lite, in ...
import argparse import configparser from helpers.database import DatabaseManager import discord import sys import asyncio import sqlite3 from ast import literal_eval import logging import datetime import time import requests import platform import pathlib client = discord.Client() our_platform = platform.platform() ...
""" Heterogenous lists/contents are difficult to query properly since unions are not easily made. """ from sqlalchemy import literal from sqlalchemy import sql from sqlalchemy import asc, desc from sqlalchemy import true, false from sqlalchemy import func from sqlalchemy.orm import eagerload from sqlalchemy.orm import...
import os, sys sys.path.append(os.path.dirname(os.path.abspath(__file__))) from core.networks.model_depth_pose import Model_depth_pose from core.networks.model_flow import Model_flow from visualizer import * from profiler import Profiler import torch import torch.nn as nn import torch.nn.functional as F import numpy as...
import math import numpy as np from pycompss.api.api import compss_delete_object from pycompss.api.constraint import constraint from pycompss.api.parameter import COLLECTION_OUT, Type, COLLECTION_IN, Depth from pycompss.api.task import task from scipy.sparse import issparse, vstack from sklearn.model_selection import ...
import pandas as pd import numpy as np import json # base class for all agents, random agent class agent(): def initial_step(self): return np.random.randint(3) def history_step(self, history): return np.random.randint(3) def step(self, history): if len(history) == 0: ...
# Create your views here. import json import os import random import traceback import requests from django.http import JsonResponse from django.shortcuts import render, redirect from django.views.decorators.csrf import csrf_exempt from rest_framework.decorators import api_view, permission_classes from rest_framework.p...
# <NAME> # 2016-02-17 """Dplyr-style operations on top of pandas DataFrame.""" import itertools import operator import sys import types import warnings warnings.simplefilter("once") import six from six.moves import range import numpy as np import pandas from pandas import DataFrame __version__ = "0.0.4" # TODOs...
# coding: utf-8 import sys from txn_make.gen_keypair import sizeof sys.path.append('.') from gen_keypair import * import opcodes import binascii import ecdsa import requests import time import socket def der_encode(r, s): """ DER-encodes a signed tx. https://bitcoin.stackexchange.com/questions/12554/why-the-...
from SSD_pytorch.data import * from SSD_pytorch.utils.augmentations import SSDAugmentation from SSD_pytorch.models.modules import MultiBoxLoss from SSD_pytorch.models.ssd import build_ssd from SSD_pytorch.models.modules.init_weights import weights_init from SSD_pytorch.data import VOC_CLASSES as VOC_CLASSES import torc...
import argparse import asyncio import filecmp import inspect import multiprocessing import os import re import signal import sys import threading import traceback import warnings from .ansible import ( TCPClass, UDPRecvClass, UDPSendClass, FieldControlServer, run_field_control_server, ) from . impo...
import numpy as np import pandas as pd import matplotlib.pyplot as plt from mpl_toolkits import mplot3d from matplotlib.ticker import LinearLocator, FormatStrFormatter from matplotlib.colors import Normalize plt.switch_backend('agg') import seaborn as sns import os import random import argparse import torch import tor...
from enum import Enum import re import numpy as np import itertools from collections import defaultdict import gzip import os import copy from .genome import Interval from . import cn_tools from . import common from . import duplication as duplication_ from .. import __version__ class SinglePosition: def __init_...
#Import the needed modules import random import math #A function that checks if the system the game is running on is a calculator or #a PC. Due to the lack of enums in CASIO's Python interpreter, constant values #are used instead. CASIO = 0 PYTHON = 1 def GetSystemType(): #Try to import a module that isn't available ...
import numpy as np from distutils.version import LooseVersion import warnings import keras import keras.backend as K from keras.layers import * from keras.models import Model from keras.optimizers import Adam from keras.callbacks import ReduceLROnPlateau, TensorBoard from csbdeep.utils import _raise, axes_check_and_n...
from __future__ import print_function import argparse import collections import logging import json import math import os import random import pickle from tqdm import tqdm, trange import re import numpy as np import torch from torch import nn from pytorch_pretrained_bert.modeling import BertPreTrainedModel, BertModel...
""" Algorithm for computing the largest common tree embeddings (also known as a minor) shared by two trees. See :func:`maximum_common_ordered_subtree_embedding` for more details. """ from netharn.initializers._nx_ext_v2 import balanced_sequence from netharn.initializers._nx_ext_v2 import balanced_embedding __all__ = [...
#################################################################################################### ## ## Project: Embedded Learning Library (ELL) ## File: darknet_to_ell.py (importers) ## Authors: <NAME> ## ## Requires: Python 3.x ## ##########################################################################...
# Copyright (c) 2020 FSMLP Authors. All Rights Reserved. import os import sys import math import time import copy import tqdm __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) import predict.predict_utility as utility logger = ...
# Copyright 2020 University of Groningen # # 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 i...
"""Sparse Equations and Least Squares. The original Fortran code was written by <NAME> and <NAME> as described in <NAME> and <NAME>, LSQR: An algorithm for sparse linear equations and sparse least squares, TOMS 8(1), 43--71 (1982). <NAME> and <NAME>, Algorithm 583; LSQR: Sparse linear equations and least-squares pro...
from sympy import symbols, cos, sin, pi, simplify, pprint, tan, expand_trig, sqrt, trigsimp, atan2 from sympy.matrices import Matrix from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import time import numpy as np def pose(theta, alpha, a, d): # returns the pose T of one joint frame i...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from builtins import str import collections import io import os import sys import tomlkit from past.builtins import xrange from castervoice.lib import printer from castervoice.lib import version from castervoice.lib.util import guidance from appdirs im...
from pathlib import Path import numpy as np from astropy.io import ascii from astropy.coordinates import SkyCoord from astropy.table import vstack, MaskedColumn import astropy.units as u from .auxiliary import search_table, Distance basedir = Path(__file__).parent.parent.parent def string_to_ra(string): '''c...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Author: <NAME> # Date: 2017/06/21 import tkinter as tk from tkinter import filedialog from tkinter import messagebox from tkinter.font import Font import os import glob import numpy as np import time import h5py import matplotlib.pyplot as plt from matp...
####Please do not remove lines below#### from lmfit import Parameters import numpy as np import sys import os sys.path.append(os.path.abspath('.')) sys.path.append(os.path.abspath('./Functions')) sys.path.append(os.path.abspath('./Fortran_routines')) from functools import lru_cache ####Please do not remove lines above#...
"""Classes to run experiments in a consistent manner.""" import os import json from datetime import datetime from itertools import product from collections import OrderedDict import numpy as np from .lib.logger import Logger from .lib.metrics import kl_div, rev_kl_div, cosine_diff, frobenius from .lib.utils import ...
#!/usr/bin/env python3 import numpy as np import argparse import os import isce import isceobj import copy import logging import scipy.signal as SS from isceobj.Util.ImageUtil import ImageLib as IML import s1a_isce_utils as ut def createParser(): parser = argparse.ArgumentParser( description='Generate offset fie...
import ast import copy import inspect import logging import sys import tempfile import textwrap import warnings import astor from miniutils.opt_decorator import optional_argument_decorator from miniutils import magic_contract from .stack import DictStack from .resolve import resolve_literal, resolve_iterable, resolve...
"""Train the SpeedySpeech spectrogram synthesis student model usage: speedyspeech.py [-h] [--batch_size BATCH_SIZE] [--epochs EPOCHS] [--grad_clip GRAD_CLIP] [--adam_lr ADAM_LR] [--standardize STANDARDIZE] [--name NAME] [--durations_filename DURATION...
# -*- coding: utf-8 -*- """ Created on Thu Apr 9 18:28:54 2020 @author: <NAME>, <NAME>, <NAME> """ import numpy as np import pandas as pd from scipy import signal import matplotlib.pyplot as plt import os plt.rcParams.update({'font.size':22}) plt.close("all") os.chdir("./") # Funktionen # ...
# Copyright 2019 Canonical Ltd # # 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, s...
from Jumpscale import j from Jumpscale.tools.bash.Profile import Profile from functools import wraps import inspect import os from .JSBase import JSBase class builder_method: """A Decorator to be used in all builder methods this will provide: 1- State check to make sure not to do one action multiple time...
""" prospect.scripts.specview_cmx_frames =================================== Write static html files from "[s/c/..]frame" files in CMX data Don't know if this will be used for SV (once frames are superseeded by spectra) """ import os, sys, glob import argparse import numpy as np import desispec.io from desiutil.log ...
import csv,os,sys import numpy as np import pandas as pd from pandas.core.algorithms import isin from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import train_test_split import datetime from pykrige.rk import RegressionKriging from sklearn.svm import SVR from sklearn.linear_model...
# -*- encoding: utf-8 -*- # # Copyright © 2021 Mergify SAS # # 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 applicabl...
import os import json import datetime import re import discord import messages class CommandError(Exception): pass # 1日は3凸まで ATTACK_MAX = 3 # クラン最大人数 30人 MEMBER_MAX = 30 # ボス5匹 BOSS_MAX = 5 LAP_CURRENT = -1 LAP_NEXT = -2 ATTACK_MAIN = -1 ATTACK_CARRY_OVER = -2 # メッセージ消去時間 REPLY_DI...
""" GraphQL input types. """ import functools import inspect from datetime import date, datetime, time, timedelta from decimal import Decimal from typing import Callable, List, Optional import strawberry from strawberry.annotation import StrawberryAnnotation from strawberry.arguments import StrawberryArgument, UNSET fr...
""" +-----------------------------------------------------------------------+ | ONCOGENE | | Author: f0lg0 | | Version: 0.5.0 | | Last update: 1...
# stdlib imports import argparse import inspect import os.path # from multiprocessing import Pool import concurrent.futures as cf import copy import json # third party from configobj import ConfigObj from mapio.geodict import GeoDict from mapio.grid2d import Grid2D import numpy as np from scipy.interpolate import grid...
from sys import exit # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # class inventory: hairpin=False money=False butterknife=False orange=False diamond=False sword=False butter=False elfID=False cc=False fertilizer=False keys=False cabbage=False heart=Fal...
"""Base classes and function for REST, WMS, and WMF services.""" import contextlib import logging import sys import urllib.parse as urlparse import uuid from dataclasses import dataclass from pathlib import Path from typing import Any, Dict, List, Optional, Tuple, Union import async_retriever as ar import cytoolz as t...
import cv2 import glob import imageio import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import os import shutil import paddle import dataset as dset from paddle.vision import transforms import paddle.distributed as dist from paddle.io import Dataset, DataLoade...
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
import rumps import requests from ConfigParser import SafeConfigParser import sys is_py2app = hasattr(sys, "frozen") pem_path = "lib/python2.7/certifi/cacert.pem" if is_py2app else None class CEX(): title = "CEX" menu_title="CEX.io" def __init__(self): self.api_endpoint = 'https://cex.io/api' ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# format: # # ipython analysis.py data_set reg_or_class n_tree [d_style] [levels] # # for example: # # ipython analysis.py moon class 10 impurity 10 import numpy as np import pandas as pd import sklearn.ensemble import sklearn import progressbar import sklearn.model_selection import sklearn.datasets import pdb import...
import functools import numpy as np from source import plot_data as pd def normalize_2d_vectors(x, y): xy = np.array([x, y]) xy_len = np.linalg.norm(xy, axis=0, keepdims=True) xy_normalized = xy / xy_len return xy_normalized def normalize_3d_vectors(x, y, z): xyz = np.array([x, y, z]) xyz_...
import re from django.db import transaction from preserialize.serialize import serialize from ledger.accounts.models import EmailUser, Document from disturbance.components.proposals.models import ProposalDocument, ProposalUserAction from disturbance.components.proposals.serializers import SaveProposalSerializer import ...
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\world\lot_tuning.py # Compiled at: 2020-04-27 21:48:35 # Size of source mod 2**32: 27675 bytes impor...
from __future__ import annotations import logging from copy import deepcopy from typing import Iterable from typing import List from typing import Set from typing import Type from django.conf import settings from django.utils.functional import classproperty from rest_framework.serializers import ModelSerializer from...
from telethon import events from io import BytesIO from PIL import Image import asyncio import datetime from collections import defaultdict import math import os import requests import zipfile import io import random import textwrap from telethon.errors.rpcerrorlist import YouBlockedUserError from telethon.tl.functions...
""" DIRBS REST-ful IMEI API module. Copyright (c) 2018-2021 Qualcomm Technologies, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: - Redistrib...
"""Shared code between :class:`XarrayMongoDB` and :class:`XarrayMongoDBAsyncIO` """ from collections import defaultdict from functools import partial from itertools import groupby from typing import ( AbstractSet, Collection, DefaultDict, Dict, Hashable, Iterator, List, Optional, Set...
""" :mod:`loopy` helpers. The aim is to keep this module as lean as possible by upstreaming the heavy lifting parts to :mod:`loopy` itself. .. autofunction:: extract_subexpr_of_associative_op_as_subst .. autofunction:: match_t_unit_to_einsum .. autofunction:: match_einsum """ import numpy as np import loopy as lp imp...
import importlib import numpy blocklist = [ "test", "add_docstring", "add_newdoc", "add_newdoc_ufunc", "alen", "alltrue", "compare_chararrays", "fastCopyAndTranspose", "get_array_wrap", "iterable", "recfromcsv", "recfromtxt", "safe_eval", "set_numeric_ops", ...
# This file contains code related to physical properties of the room # Copyright (C) 2015-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...
# -*- coding: utf-8 -*- """ :Module: khoros.liql :Synopsis: Collection of functions and classes to leverage the Community API v2 and LiQL for searches :Usage: ``from khoros import liql`` (Imported by default in :py:mod:`khoros.core` package) :Example: ``query_url = liql.format_...
from typing import ( Iterable, Sequence, Tuple, TYPE_CHECKING, ) from eth_utils import ( denoms, to_tuple, ValidationError, ) from eth_typing import ( Hash32, ) from eth._utils.bitfield import ( get_bitfield_length, has_voted, ) import eth._utils.bls as bls from eth._utils.num...
import os import json import ast import pickle import sys import numpy as np import pandas as pd from sklearn.metrics import matthews_corrcoef as mcc from sklearn.metrics import confusion_matrix, r2_score, make_scorer from sklearn.model_selection import GridSearchCV from sklearn.feature_selection import RFE import k...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from pprint import pprint import pytest from ibm_zos_ims.tests.functional.module_utils.ims_test_gen_utils import ACBInputParameters as ip from ibm_zos_ims.tests.functional.module_utils.ims_test_gen_utils import DBDInputParameters...
#!/usr/bin/env python3 # coding=utf-8 # # Copyright (c) 2020-2021 Huawei Device Co., Ltd. # 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 # #...
#!/usr/bin/env python2 # this is python2/3 compatible, but the following bug breaks us... # https://bugs.launchpad.net/ubuntu/+source/python-launchpadlib/+bug/1425575 # you also might need to $ sudo apt install python-apport import argparse import multiprocessing import os import shutil import subprocess import sys i...
#!/usr/bin/python # -------------------------------------------------------------------------- # diff_index.py - Compare page numbers for each title each book and index source. # WRW 22 Dec 2021 - # -------------------------------------------------------------------...
from hallo.destination import Channel, User from hallo.events import EventMessage import random import time from hallo.inc.commons import Commons from threading import Thread import hallo.modules.games.cards class Game: """ Generic Game object. Stores players and location. """ def __init__(self, pl...
import apiai import json import requests from datetime import datetime, timedelta from DatRet import * from NewsSentiment import * from AI import * from Dict import code_cat CLIENT_ACCESS_TOKEN='ee339c04a181469aba3549870dfeca5e' DR = DatRet() NS = NewsSentiment() a = AI() ##TO DO## #Correct line breaks...
""" This script is used to manipulate dependency trees stored in conllu format """ #!/usr/bin/python # -*- coding: utf-8 -*- #### # Copyright (C) 2009-2017 <NAME> # kim AT gerdes. fr # http://arborator.ilpga.fr/ # # This program is free software; you can redistribute it and/or # modify it under the terms of version ...
import config import sys import os import os.path as Path import git import re import subprocess import requests import shutil from log import Log class Progress(git.remote.RemoteProgress): def update(self, op_code, cur_count, max_count=None, message=''): if len(message) == 0: Log.log('update(...
import numpy as np #Xtrain = np.load('Xpre.npy')[:100]#, dtype='float32', mode='r', shape=(6400, 128, 128, 3))[:100]#np.load('cityXi.npz')['x_train'] #Ytrain = np.load('Ypre.npy')[:100]#, dtype='uint8', mode='r', shape=(6400, 128, 128, 20))[:100]#np.load('cityYi.npz')['y_train'] #Xvalid = np.load('Xvalid.npy')[:100]#, ...
""" Script calculates and plots climatologies of 10 hPa zonal wind at 65N for model experiments and ERAi. Notes ----- Author : <NAME> Date : 2 May 2019 """ ### Import modules import datetime import numpy as np import matplotlib.pyplot as plt import read_MonthlyData as MOM import read_Reanalysis as MOR impo...
# coding: utf-8 # # Monte Carlo simulation to find recurrence interval PDF on a fault # In[1]: #get_ipython().magic(u'pylab inline') #get_ipython().magic(u"config InlineBackend.figure_format = 'retina'") # In[2]: import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import numpy as np import p...
from enum import auto, Flag from functools import wraps import re import mwparserfromhell as mw from helpers import clean_links, Wikilink DISPLAYTITLE = '{{{{DISPLAYTITLE: {{{{item name|{name}}}}}}}}}\n' FUNCTIONS = {} class Function(Flag): CACHE = auto() EXTENDED = auto() def register(*flags): def d...
# ##### BEGIN MIT LICENSE BLOCK ##### # # MIT License # # Copyright (c) 2020 <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 rig...
from .tools import * from .influence import * import numpy as np import pandas as pd from scipy import stats import matplotlib.pyplot as plt import seaborn as sns class PyPlotLm: def __init__(self, reg, X, y, intercept=False): """ regression analysis for a sklearn linear regression model, reproduction o...
#!/usr/bin/env python """ get_PSF.py -- Input fits file, run source extractor and psfex to get the PSF. Outputs psf fits file, and .psf file for input into Source Extractor to do model-based star-galaxy separation using SPREAD_MODEL. Usage: get_PSF.py [-h] [-v] [--debug] [-q] [-s LOC] [--psfex LOC] <fitsfile> Argu...
#!/usr/bin/env python from __future__ import absolute_import import os import contextlib import sys import sqlalchemy as sql from sqlalchemy.orm import mapper, create_session import sqlalchemy from gemini.ped import get_ped_fields def index_variation(cursor): cursor.execute('''create index var_chr_start_idx on...
import os import re import pathlib from collections import defaultdict import xml.etree.ElementTree as ET from zipfile import ZipFile PATH_OUTPUT = 'slots/mame' def _zip_filehandle(filename): zipfile = ZipFile(filename) _filename = zipfile.namelist()[0] filehandle = zipfile.open(_filename) return f...
import netCDF4 as nc import numpy as np from os.path import join, dirname import geokit as gk from reskit.weather.windutil import * from reskit.weather import MerraSource from reskit.util import ResError, Location ## setup some common inputs loc = Location(lat=50.105, lon=6.005) locInAachen = Location(lat=50.763, lon...
from pathlib import Path from abc import ABC, abstractmethod import pandas as pd from dppd import dppd import pysam from .common import reverse_complement, df_to_rows from .gene import Gene, Transcript from mbf_externals.util import lazy_method import weakref import mbf_pandas_msgpack as pandas_msgpack import numpy as ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json import os import shutil import sys import urllib.request import urllib.parse import yaml try: import paramiko check_ssh = True except ModuleNotFoundError: print("\nWARNING: SSH connection can not be checked, install paramiko package first.") c...
import scrapy from scrapy.loader import ItemLoader from ufcStats.items import * from ufcStats.utils import * class FightsSpider(scrapy.Spider): name = 'ufcFights' start_urls = ['http://ufcstats.com/statistics/events/completed?page=all'] custom_settings = { 'ITEM_PIPELINES': { 'ufcStat...
#!/usr/bin/env python3 # coding=utf-8 """ A module containing installers from various sources """ from abc import ABCMeta, abstractmethod from configparser import SectionProxy from contextlib import suppress import logging import os import re import shutil import tarfile import requests from lib import constants, h...
# Hidden Markov Models # # Author: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # API changes: <NAME> <<EMAIL>> # Modifications to create of the HMMLearn module: <NAME> # More API changes: <NAME> <<EMAIL>> # FSHMM code: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # FSHMM algorithm from: # <NAME> & Beling, Peter & <NAME>. (2...
import re import copy import shutil from math import ceil from datetime import datetime, timedelta from colorama import Style from . import const def get_org_files(rcfile): """Get a list of org files from a 'vimrc' file.""" with open(rcfile, 'r') as vimrc: data = vimrc.read() orgfiles = re.search...
import numpy as np from scipy.integrate import quad from scipy.linalg import toeplitz from bayes_drt.utils import rel_round, is_loguniform def get_basis_func(basis): "Generate basis function" # y = ln (tau/tau_m) if basis == 'gaussian': def phi(y, epsilon): return np.exp(-(epsilon * y...
from enum import Enum from queue import PriorityQueue import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy.linalg as LA import numpy as np import random def r_ints(p1, p2): #return the points between the given two points I = [i - j for i,j in zip(p2, p1)] d = np.sqrt(np.sum(...
from molsysmt._private_tools.exceptions import * from molsysmt.forms.common_gets import * from molsysmt import puw import numpy as np from molsysmt.native.molecular_system import molecular_system_components import importlib from copy import deepcopy import sys form_name='mmtf.MMTFDecoder' is_form={ 'mmtf.MMTFDeco...
# This is the implementation of ResNet-18 with both projection layer and bidirectional layer. # To run this script, a GPU is necessary. # This script is modified from DDN ImageNet example # https://github.com/anucvml/ddn/blob/master/apps/classification/image/main.py # # which is developed by # <NAME> <<EMAIL>> # <NAME...
# Copyright 2021 The FedLearner 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...
__author__ = '<NAME>' __email__ = '<EMAIL>' # todo: Clean this up! Make it into a real module import os, sys, itertools import networkx as nx import pandas as pd from statsmodels.tsa.stattools import ccf import matplotlib.pyplot as plt import numpy as np from collections import Counter import matplotlib as mpl mpl.rc...
# ---------------------------------------------------- # Time-Series Autoencoder using Tensorflow 1.0.3 # Created by: <NAME> # Last Modified: Friday, March 9, 2018 # Georgia Institute of Technology # ---------------------------------------------------- import tensorflow as tf import network as net import pandas as pd i...