text stringlengths 6.04k 39.5k |
|---|
from contextlib import contextmanager
import os
import sys
import subprocess
import threading
import time
import logging
import omero
import omero.cli
from omero.gateway import BlitzGateway
from omero import sys as om_sys
from omero import rtypes
from omero import model
# OMERO_SERVER = 'demo.openmicroscopy.org'
# OM... |
# -*- coding:utf-8 -*-
import argparse
import sys
import time
from time import clock
from datetime import *
import logging
import urllib.request
import re
import tushare as ts
from nsnqtlib.servers import serverlist
from nsnqtlib.db import mongodb
from nsnqtlib.utils import WindQuote
from nsnqtlib.db.fields import *
f... |
# Copyright 2017 Rackspace
#
# 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, sof... |
from __future__ import print_function
import os
import pickle
import argparse
import numpy as np
import tensorflow as tf
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.mlab as mlab
from matplotlib import animation
#import seaborn
from collections imp... |
import fractions
import re
import mpmath
import pytest
from diofant import (Add, Float, Function, I, Integer, Lambda, Matrix, Mul, Or,
Poly, Pow, Range, Rational, Symbol, SympifyError, Tuple,
Xor, evaluate, exp, false, pi, sin, sqrt, sympify, true)
from diofant.abc import _cl... |
#!/apps/well/python/2.7.8/bin/python
"""
Usage: hlmm_chr.py
This script fits heteroskedastic linear models or heteroskedastic linear mixed models to a sequence of genetic variants
contained in a .bed file. You need to specify the genotypes.bed file, which also has genotypes.bim and genotypes.fam in
the same directory,... |
import os
import sys
import ast
from flask import current_app
from pprint import pprint
from jinja2 import Environment, FileSystemLoader, meta, visitor
class TemplateParser:
def __init__(self, path=None):
self.output = {}
self.roots = []
self.htmlFiles = []
if path:
se... |
# -*- coding: utf-8 -*-
from __future__ import division
from collections import namedtuple
import numpy as np
import torch
import time
Transition = namedtuple('Transition', ('timestep', 'state', 'action', 'reward', 'nonterminal'))
# blank_trans = Transition(0, torch.zeros(84, 84, dtype=torch.uint8), None, 0, False)
... |
from inspect import getfullargspec
from typing import (
TYPE_CHECKING,
Callable,
Mapping,
Optional,
Sequence,
Tuple,
Union,
Hashable
)
import numpy as np
import xarray as xr
from scipy.optimize import leastsq, curve_fit
from .utils import da_filter, gen_coord_combo, gen_sim_da
from .... |
"""Module containing local database functions."""
import os
from pathlib import Path
import shutil
import math
import zipfile
from datetime import datetime
from typing import List
from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
import requests
import pandas as pd
import numpy as np
from . import ... |
#!/usr/bin/python3
import argparse
import os
import sys
import webbrowser
from datetime import timedelta
import numpy as np
import pandas as pd
import pandas_datareader.data as web
import requests_cache
from plotly import graph_objs as go
from plotly.subplots import make_subplots
from tqdm import tqdm
from finance_be... |
# Copyright 2022 TerraPower, 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 agreed to in writi... |
# -*- coding: utf-8 -*-
import random
import numpy as np
import matplotlib.pyplot as plt
import scipy.integrate
#set line width
plt.rcParams['lines.linewidth'] = 4
#set font size for titles
plt.rcParams['axes.titlesize'] = 18
#set font size for labels on axes
plt.rcParams['axes.labelsize'] = 18
#set size of numbers ... |
# %%
from nilearn import surface
from nilearn import datasets
from nilearn import plotting
from nilearn import image
from nilearn import regions
from nilearn.surface import load_surf_mesh
import os
import pylab as plt
import numpy as np
from matplotlib import colors as clr
import matplotlib.patches as mpatches
import ... |
# -*- coding: utf8 -*-
# Program to process the features from GATE annotation export files
# Requires the following files in the current working directory:
# _raw.txt
# _toc.txt
# _rel.txt
# TODO Add support for more than one set of files in cwd
import os
import csv
import re
import json
from collections i... |
import copy
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
from torch.nn.init import xavier_uniform_, constant_, normal_
from models.attention import SingleHeadSiameseAttention
from models.ops.modules import MSDeformAttn
from util.misc import inverse_sigmoid
class DeformableTra... |
import arrow
import re
import time
import random
import pytz
import json
import uuid
from boto3.dynamodb.conditions import Key, Attr
from util import (
slack_command,
send_message,
slack_block_action,
slack_view_submission,
update_message,
open_view,
db_table,
update_view,
DATABASE_I... |
import tensorflow as tf
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics.classification import accuracy_score
from Stock_Prediction_Base import base_model
# from Stock_Prediction_Data_Processing import get_all_stocks_label_possibility_data, preprocessing_d... |
from typing import List, Tuple
from graphscale import check
from graphscale.utils import to_snake_case
from .code_writer import CodeWriter
from .parser import (
DeletePentData, EdgeToStoredIdData, FieldVarietal, GrappleDocument, GrappleField,
GrappleFieldArgument, GrappleTypeDef, TypeRefVarietal, GrappleTypeR... |
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator})
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ---------------------------------------... |
# Copyright 2019-2020 Xanadu Quantum Technologies 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 applicabl... |
import datetime
import random
import time
from typing import Optional, Union
import re
import aiohttp
import json
from os import environ
from discord import (
utils, Embed, Colour, NotFound, Activity, ActivityType, Forbidden, TextChannel, Webhook, AsyncWebhookAdapter
)
from discord.ext import commands, tasks
from ... |
import json
from lxml import etree
from django.db import models, transaction
from django.core.exceptions import ValidationError
from django.contrib.contenttypes.fields import GenericRelation
from mezzanine.pages.page_processors import processor_for
from dominate.tags import legend, table, tbody, tr, td, th, h4, div,... |
#!/usr/bin/env python
"""Utility functions and classes for creating mixture models"""
########################################################################
# File: mixture_model.py
#
# Author: <NAME>
# History: 1/7/19 Created
########################################################################
import os
import... |
"""
CorpusKorea
TEAM KNUAI
python evaluation.py --task_name BoolQ --device cuda:1 --state_file 4_BoolQ_KNUAI_v3_model_save --test_file ./corpus/SKT_BoolQ_Test.tsv --output_dir ./json
"""
from transformers import AdamW
from transformers import ElectraTokenizer, ElectraModel, ElectraForSequenceClassification
from torch... |
import numpy as np
import egt.species as sp
import egt.individual as indi
import matplotlib.pyplot as plt
import seaborn as sns
from matplotlib.colors import ListedColormap
import os
import glob
import imageio
class game:
def __init__(self,payoffMatrix,rowPlayerTypes,colPlayerTypes = None):
self.rowPlayer... |
from modules.top_header import top_header
from modules.load_config import load_config
from modules.load_files import load_files
from modules.load_stations import load_stations_03
from dependecies import *
from modules.quali.config import *
from pathlib import Path
### DQC LEVELS METEOROLOGICAL
from modules.quali.dqc_m... |
import os
from argparse import ArgumentParser
import numpy as np
import pandas as pd
from PIL import Image
from matplotlib import pyplot as plt
from scipy.ndimage.measurements import label
import operator
def calc_avg_classif(results_dict: dict, thresholds, output_file):
avg = pd.DataFrame(columns=["Thr", "TP", "... |
import py
import sympy as g
from sympy import *
from sympy.utilities.pytest import XFAIL
from sympy import O
def testseries1():
x = Symbol("x")
e = sin(x)
assert e.series(x,0) != 0
assert e.series(x,0) == O(1, x)
assert e.series(x,1) == O(x, x)
assert e.series(x,2) == x + O(x**2, x)
assert ... |
import torch
from torch.autograd import Function
from torch.nn import functional as F
from torch.nn.modules.utils import _pair
from torch import Tensor
from cupy_layers.utils import Dtype, Stream, load_kernel
CUDA_NUM_THREADS = 1024
kernel_loop = '''
#define CUDA_KERNEL_LOOP(i, n) \
for (int ... |
#!/usr/bin/env python
from __future__ import print_function
from optparse import OptionParser
import os
import subprocess
import sys
import h5py
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
sns.set(style="ticks")
from sklearn.decomposition import PCA
... |
#!/usr/bin/env python
# CSN annotation
#######################################################################################################################
import core
# Class representing a CSN annotation
class CSNAnnot():
# Constructor
def __init__(self, coord1, intr1, coord2, intr2, dna, protein, coo... |
from __future__ import print_function, absolute_import, unicode_literals
import codecs
import sys
import itertools
import string
import nltk
import torch
import json
import nltk
import re
import pickle
import csv
import os
from pathlib import Path
from collections import defaultdict
import math, random
import ipdb
impo... |
# This script generates a Python interface for an Apple Macintosh Manager.
# It uses the "bgen" package to generate C code.
# The function specifications are generated by scanning the mamager's header file,
# using the "scantools" package (customized for this particular manager).
import string
# Declarations that cha... |
import os
import hashlib
import tempfile
import shutil
import string
import subprocess
import sys
from collections import namedtuple
from random import randint, choice, shuffle
from os.path import dirname, abspath, isfile, join, isdir, basename
try:
from http.client import OK, BAD_REQUEST
except ImportError:
#... |
"""
Copyright (c) 2015-2022 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
import platform
import random
import time
from copy import deepcopy
from datetime import datetime
from typing import Dict, Any
import k... |
import glob
import logging
import os
import time
from collections import defaultdict
from itertools import groupby
from operator import itemgetter
import numpy as np
from detectron2.data import MetadataCatalog
from pycocotools.coco import COCO
from pycocotools.cocoeval import COCOeval
from uo.utils import aspectize, l... |
import yaml
import json
import sys
import os.path
from openpyxl import load_workbook
import re
import requests
import unicodedata
from collections import Counter
import time
import pandas as pd
# assumptions about the xlsx structure:
# [Concepts][ site name 1 ][ site name 2 ]...
# [ ][... |
import math
import sys
import pygame
import tools
import world
from text_sprite import TextSprite
# Pre-compute often used multiples
p = 64
p2 = int(p / 2)
p4 = int(p / 4)
p4x3 = p4 * 3
p8 = int(p / 8)
p16 = int(p / 16)
# tile height difference
ph = 8
class TileSprite(pygame.sprite.Sprite):
"""Ground tiles"""... |
import itertools
from typing import Any, Callable, Collection, Dict, List
import numpy as np
from active_reward_learning.envs import TabularMDP
from active_reward_learning.reward_models.basic_gp_reward_model import (
BasicGPRewardModel,
)
from active_reward_learning.reward_models.query import ComparisonQueryLinea... |
import keras
import keras.backend as K
import tensorflow as tf
import numpy as np
import random
np.random.seed(42)
tf.set_random_seed(42)
random.seed(42)
from osgeo import gdal, gdalconst
import os
from sklearn.model_selection import train_test_split
import skimage.io
import skimage.transform
from osgeo import... |
from __future__ import print_function
import glob
import sys
sys.path.append(glob.glob('C:\CARLA\CARLA_0.9.11\PythonAPI\carla\dist\carla-0.9.11-py3.7-win-amd64.egg')[0])
import carla
from carla import ColorConverter as cc
import pygame
import collections
import math
import re
import weakref
import numpy as np
def ... |
#this file is just a tank of utilities for ploting stuff mainly.
#It creates the figures and the plots
import os
import pickle#5 as pickle
#import pickle5
import matplotlib.pyplot as plt
from matplotlib import gridspec
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.linear_model imp... |
'''
AUTHORS: <NAME> and <NAME>
DATE: March 22, 2019
COPYRIGHT MARCH 22, 2019 <NAME> AND <NAME>
'''
from __future__ import print_function
'''
This module should be organized as follows:
Main function:
chi_estimate() = returns chi_n, chi_b
- calls:
wealth.get_wealth_data() - returns data moments on wealth... |
import os
import sys
import datetime
import numpy as np
import scipy.signal
import pandas as pd
import yfinance as yf
from contextlib import contextmanager
from src.utils_date import add_days
from src.utils_date import prev_weekday
#from pandas_datareader.nasdaq_trader import get_nasdaq_symbols
ERROR_NO_MINUTE_DATA_YT... |
"""
Functions for ecommerce
"""
from base64 import b64encode
from collections import namedtuple
import csv
from datetime import datetime, timedelta
from decimal import Decimal
import hashlib
import hmac
import logging
import re
import uuid
from dateutil.parser import parse as parse_datetime
from django.core.management... |
import numpy as np
from ...external.qt.QtGui import (QAction, QLabel, QCursor, QMainWindow,
QToolButton, QIcon, QMessageBox,
QMdiSubWindow)
from ...external.qt.QtCore import Qt, QRect
from .data_viewer import DataViewer
from ... import core
from ...... |
import re
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
from .utils import get_seq
class DatasetBlock(object):
"""
By default, the data sequences block generated is NEXUS and we use BioPython
tools to convert it to other formats such as FASTA.
... |
"""Base class git action manager (subclasses will accommodate each type)"""
from peyotl.utility.str_util import is_str_type
from peyotl.nexson_syntax import write_as_json
from peyotl.utility import get_logger
import os
# noinspection PyUnresolvedReferences
from sh import git # pylint: disable=E0611
import shutil
impor... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: GPL-3.0
#
# GNU Radio Python Flow Graph
# Title: NOAA APT Decoder
# Author: <NAME>, <NAME>
# Description: A NOAA APT Decoder with automatic image synchronization
# GNU Radio version: 3.8.1.0
from gnuradio import analog
from gnuradio import bl... |
from taylorDiagram import plot_Taylor_graph
import matplotlib.pyplot as plt
from PyEMD import EEMD
from hht import hht
from hht import plot_imfs
from hht import plot_frequency
import waipy
from scipy.stats import norm
import numpy as np
# from matplotlib.ticker import FuncFormatter
def millions(x, pos):
'The two a... |
""" WASI API.
These are some of the WASI api functions implemented in python.
See also: https://wasi.dev
"""
import time
import os
import logging
import stat
import struct
from ... import ir
ESUCCESS = 0
E2BIG = 1
EACCES = 2
EADDRINUSE = 3
EADDRNOTAVAIL = 4
EAFNOSUPPORT = 5
EAGAIN = 6
EALREADY = 7
EBADF = 8
EBADMS... |
"""Tests for the mask.py script."""
import pytest
import numpy as np
import xarray as xr
from deltametrics import cube
from deltametrics import strat
from deltametrics.sample_data import _get_golf_path
golf_path = _get_golf_path()
golfcube = cube.DataCube(golf_path)
class TestComputeBoxyStratigraphyVolume:
e... |
"""
GRUB configuration files
=======================================================================
This parser reads the configuration of the GRand Unified Bootloader, versions
1 or 2.
This is currently a fairly simple parsing process. Data read from the file
is put into roughly three categories:
* **configs**: l... |
import glfw
from OpenGL.GL import *
from OpenGL.GL.shaders import *
from ctypes import *
import numpy as np
from math import *
from imgui import *
from numpy.core.numeric import cross, normalize_axis_index
vertexSource = """
#version 410 core
layout (location = 0) in vec2 aPos;
layout (location = 1) in vec2 aTexcoor... |
# encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
"""
Sales module objects.
"""
from django.db import models
from treeio.core.models import Object, User, ModuleSetting
from treeio.identities.models import Contact
from treeio.finance.models import Transacti... |
import pytest
from uri.qso import QSO, SENTINEL, Bucket
EXAMPLES = [
# Abstract
('', (), {}),
('foo=bar', (), {'foo': 'bar'}),
# Multiple Arguments
('foo&bar&baz&diz', ('foo', 'bar', 'baz', 'diz'), {}),
# From Wikipedia - https://en.wikipedia.org/wiki/Query_string
('name=ferret', (), {'name': 'fer... |
# -*- coding: utf-8 -*-
'''
scenario.py -- holds ``Scenario`` and ``ScenarioSeries`` classes for PRMS
managing parameter-based model scenarios that may be used for hypotheses
testing.
'''
import inspect
import json
import multiprocessing as mp
import os
import shutil
import uuid
from datetime import datetime
from .p... |
'''
Batched refer360 environment
The main structure is similar to https://github.com/peteanderson80/Matterport3DSimulator/blob/master/tasks/R2R/env.py
'''
from dict import Dictionary
from utils import load_datasets
from model_utils import smoothed_gaussian
from model_utils import gaussian_target
from utils import rad2d... |
import matplotlib.pyplot as plt
import numpy as np
from scipy.ndimage import gaussian_filter
import scipy.stats as st
def whist(x, smooth=True, kde_n=512, kde_range=None, bins='auto', plot=None,
kde_kwargs=None, hist_kwargs=None, **kwargs):
"""
Turn an array of samples, x, into an estimate of pro... |
import lief
import json
import os
import sys
import array
import struct # byte manipulations
import random
import tempfile
import subprocess
import logging
import functools
import signal
import pdb
import traceback
import hashlib
# NOTE: I didn't write the majority of this file, taken from Hyrum's gym-malware repo
... |
#!/usr/bin/env python
import torch
import torch.nn as nn
import math
import torchvision.transforms as transforms
import torchvision.models as models
from torch.utils.data import DataLoader
from load_utils import load_state_dict_from_url
from cub_voc import CUB_VOC
import os
from tqdm import tqdm
import shutil
from util... |
"""
API for Uniswap v3 distributed exchange (uniswap.exchange)
- price info is pulled from the smart contract via uniswap-python library
- volume is pulled manually via eth.getLogs
- liquidity is pulled manually via erc20 balance checks on the pair contract
"""
import logging
from web3 import Web3
import time
import re... |
import os
import shutil
import sys
import argparse
import numpy as np
import torch
from torch import nn
from torch.autograd import Variable
from torch.optim.lr_scheduler import ReduceLROnPlateau
sys.path.append('./viz')
import modelZoo
sys.path.append("./utils")
from constants import *
from load_save_utils import *
... |
# Copyright 2016-2019 The <NAME> at the California Institute of
# Technology (Caltech), with support from the Paul Allen Family Foundation,
# Google, & National Institutes of Health (NIH) under Grant U24CA224309-01.
# All rights reserved.
#
# Licensed under a modified Apache License, Version 2.0 (the "License");
# you ... |
#!/usr/bin/env python3
'''
(C) Copyright 2020-2022 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
'''
import os
import yaml
from storage_estimator.dfs_sb import VOS_SIZE, get_dfs_sb_obj
from storage_estimator.vos_size import MetaOverhead
from storage_estimator.vos_structures import Containers
... |
import math
import random
import pytorch_lightning as pl
import torch
import os
import pickle
import cv2
import numpy as np
from torch.utils import data
from datasets.init_dataset import get_dataset
from ACT_utils.ACT_utils import tubelet_in_out_tubes, tubelet_has_gt
from MOC_utils.gaussian_hm import gaussian_radius,... |
#!/usr/bin/python3
import os
import sys
# we capture the globals before importing our stuff
vars = dict(globals())
vars.update(locals())
import code
import traceback
import prompt_toolkit
from prompt_toolkit.filters import HasSelection, Condition
from prompt_toolkit.key_binding import KeyBindings
from prompt_toolkit... |
# coding=utf-8
# Copyright 2018 The Google AI Language Team 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 ... |
import os
import tempfile
import logging
import argparse
import numpy as np
from obiwan import setup_logging,BaseCatalog,SimCatalog,BrickCatalog,RunCatalog,get_randoms_id,find_file,utils
from obiwan.catalog import Versions,Stages,ListStages
setup_logging(logging.DEBUG)
def test_base():
cat = BaseCatalog()
... |
#!/usr3/bustaff/jwa/anaconda_envs/py3/bin/python
## enhance_bib_records_with_linked_data_sourcces.py
## <NAME>
## January 10, 2017
## run this from a working directory
## multi threaded version
## import required modules
from urllib.request import Request, urlopen
from urllib.parse import urlencode, quote_plus
impor... |
from copy import deepcopy
from typing import TYPE_CHECKING, List, NamedTuple, Optional
from arcade import (
Sprite,
SpriteList,
View,
check_for_collision_with_list,
set_background_color,
set_viewport,
start_render,
)
from arcade.color import RED
from arcade.key import LEFT, RIGHT, UP, A, D,... |
# Copyright 2020 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... |
from __future__ import annotations
from dataclasses import dataclass, field
from fractions import Fraction
from typing import List, Union, Iterable
import numpy as np
import pandas as pd
from reamber.base.RAConst import RAConst
MAX_DENOMINATOR = 100
@dataclass
class BpmChangeSnap:
bpm: float
measure: int
... |
########################################################################
# Copyright 2017 FireEye 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/L... |
import json
import logging
import os
import re
import shutil
import uuid
from .utilities import condor_str, run
from .write_htcondor_job import write_htcondor_job
# Get an instance of a logger
logger = logging.getLogger(__name__)
def create_dir_structure(base_dir, num, total):
"""
"""
return base_dir
de... |
import json
import os
from tests import base
from bson import ObjectId
from girder.utility.path import lookUpPath
def setUpModule():
base.enabledPlugins.append('wholetale')
base.startServer()
def tearDownModule():
base.stopServer()
DATA_PATH = os.path.join(
os.path.dirname(os.environ['GIRDER_TEST_... |
# some common functions, maybe getNextPositionState and run_flat should be somewhere else... in PVAgent, actually so small so no reimplememention
# Programming <EMAIL>
# v1.0.0.1 20190305
# v1.0.0.2 20190307 eod
# v1.0.1.0 20190310 Start of
##############################
# own ad: For NinjaTrader related stuff: check ... |
__author__ = 'Tarsier'
try:
from Tkinter import *
import ttk
import tkFileDialog
except:
from tkinter import *
from tkinter import ttk
from tkinter import filedialog
from tkinter import simpledialog
from tkinter import messagebox
try:
import configparser
except:
from six.moves i... |
# from pathlib import Path
import json, pdb, os, numpy as np, cv2, threading, math #collections, random
# import pickle, sys, itertools, string, sys, re, datetime, time, shutil, copy
from urllib.request import urlopen
# from tempfile import NamedTemporaryFile
import torch
from torch import nn, cuda, backends, FloatTen... |
#!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2010-2011 OpenStack, 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/lice... |
#!/usr/bin/env python3
import os
import io
import numpy
import random
import re
import hashlib
import math
import array
import wget
import shutil
import statistics
import subprocess
import requests
from functools import reduce
from shutil import copyfile
from os.path import expanduser
from pathlib import Path
from pyd... |
"""Obtain important information from merge report of merging short and long read RTDs. Create venn diagrams based on this. Getting an idea of how both datasets compare so that filtering can be decided."""
#from python_modules import TSS_functions as f
from upsetplot import from_memberships
from upsetplot import pl... |
"""
The module is designed by team Robokit of <NAME>um and team Starkit
of MIPT under mentorship of <NAME>
with paticipation of junior student <NAME>
and team coach <NAME>.
The module is designed for creating strategy matrix of "forward" player.
Strategy is defined by direction and power of kick in selected segment ... |
import argparse
from utils import checkattr
##-------------------------------------------------------------------------------------------------------------------##
####################
## Define options ##
####################
def define_args(filename, description):
parser = argparse.ArgumentParser('./{}.py'.fo... |
from functools import wraps
from flask import request, escape, render_template, redirect, flash, url_for, jsonify, current_app, g
from app.main import bp
from flask_login import current_user, login_required
import json
import html
from datetime import datetime
from time import time
import re
from app.auth.models im... |
'''
// Copyright 2017 <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, distribute, subli... |
# -*- coding: utf-8 -*-
import json
import traceback
import os.path
#import re
from flask import Flask, request, Response, jsonify, g, session
from werkzeug.exceptions import BadRequest
from sqlalchemy import exc
from sqlalchemy.orm import lazyload, joinedload, subqueryload, contains_eager
from sqlalchemy.orm import ... |
from openapidocs.common import Format
from blacksheep.server.openapi.exceptions import (
DuplicatedContentTypeDocsException,
UnsupportedUnionTypeException,
)
import inspect
from dataclasses import fields, is_dataclass
from datetime import date, datetime
from enum import Enum, IntEnum
from typing import Any, Dic... |
#===============================================================================
# Copyright 2007 <NAME>
#
# 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/... |
"""
mcpython - a minecraft clone written in python licenced under the MIT-licence
(https://github.com/mcpython4-coding/core)
Contributors: uuk, xkcdjerry (inactive)
Based on the game of fogleman (https://github.com/fogleman/Minecraft), licenced under the MIT-licence
Original game "minecraft" by Mojang Studios (www.m... |
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
from statsmodels.nonparametric.smoothers_lowess import lowess
from matplotlib.collections import LineCollection
import re
from . import colors
color_styles = colors.color_styles
plt.style.use('fivethirtyeight')
def _bin_da... |
import re
import numpy as np
from itertools import cycle
classic_tempos = {
"grave": 32,
"largoassai": 40,
"largo": 50,
"pocolargo": 60,
"adagio": 71,
"pocoadagio": 76,
"andante": 92,
"andantino": 100,
"menuetto": 112,
"moderato": 114,
"pocoallegretto": 116,
"allegretto... |
from .utils import *
from ._sgRNA import sgRNA
# import _sgRNA
# import utils
# import imp
# imp.reload(utils)
# imp.reload(_sgRNA)
# from utils import *
# from _sgRNA import sgRNA
"""
'nick_to_pegRNA', 'target_to_pegRNA', 'target_to_RTT5','aln_ref_alt_mis', 'aln_ref_alt_del', 'aln_ref_alt_ins', 'PBS_G... |
"""
https://raw.githubusercontent.com/acrosson/nlp/master/subject_extraction/subject_extraction.py
"""
import h5py
import json
import os
import re
import pickle
import nltk
import numpy as np
nltk.download('stopwords')
nltk.download('maxent_ne_chunker')
nltk.download('words')
nltk.download('brown')
nltk.download('con... |
"""Run functions by provided a name with arguments.
Author: <NAME>
Date: 2020-04-19
"""
import sys
import os
import stat
import gzip
from ilus import utils
from ilus.modules.ngsaligner import bwa
from ilus.modules.variants import gatk
from ilus.modules.vcf import bcftools
from ilus.modules.summary import bam
IS_RM_... |
"""P3D, implemented in Gluon. https://arxiv.org/abs/1711.10305.
Code partially borrowed from https://github.com/qijiezhao/pseudo-3d-pytorch."""
# pylint: disable=arguments-differ,unused-argument,line-too-long
__all__ = ['P3D', 'p3d_resnet50_kinetics400']
from mxnet import init
from mxnet.context import cpu
from mxnet... |
"""
Module for methods reading from and writing to the file system
"""
import os
import logging
from pathlib import PurePath
from ractl_cmds import (
get_server_info,
get_reserved_ids,
attach_image,
detach_all,
list_devices,
reserve_scsi_ids,
)
from pi_cmds import run_async
from socket_cmds im... |
# rambutan.py
# Contact: <NAME>
# <EMAIL>
import os, numpy, pandas
try:
from sklearn.metrics import roc_auc_score
except:
roc_auc_score = 'acc'
from joblib import Parallel, delayed
from .io import TrainingGenerator, ValidationGenerator
from .utils import bedgraph_to_dense, fasta_to_dense
from .utils impo... |
import random
from fuzz.builtin import BuiltIn
from fuzz.id_map import ID_HARNESS_MAP
from fuzz.resolve_bug import error
from fuzz.symbol import JSType
from fuzz.symbol import Symbol
from utils import get_node_type
from utils import is_single_node
from utils import is_node_list
from utils.node import PROP_DICT
from ut... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.