text stringlengths 8.04k 46.5k |
|---|
## Copyright (c) 2017-2018 Upstream Research, Inc. All Rights Reserved. ##
## Subject to an 'MIT' License. See LICENSE file in top-level directory ##
## This code is based on the csv-tools project source code, also by Upstream Research and available as open source.
## #python-3.x
## python 2 does not work due m... |
from mastermind_import import *
from settings import *
import math
import random
import threading
from time import gmtime, strftime
from time import sleep
ip = "localhost"
port = 6317
def PlayerColour(playerID, col):
bckgd = [0,0,0]
fgd = [255,127,39]
neutral = [127,127,127]
try:
if len(c... |
# Copyright 2015-2016 ARM Limited
# Copyright 2016 Google 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
#
#... |
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import numpy as np
import random as rd
from module.HME import HME
# from configure import args
class Encoder_PCNN(nn.Module):
'''
Zeng 2015 DS PCNN
'''
def ... |
""" This file provides an example tensorflow network used to define a policy. """
import tensorflow as tf
from opentamp.src.policy_hooks.utils.tf_utils import TfMap
import numpy as np
from copy import copy
#def init_weights(shape, name=None):
# return tf.get_variable(name, initializer=tf.random_normal(shape, stdd... |
# -*- coding: utf-8 -*-
import os
import io
import csv
import json
import tarfile
from pathlib import Path
from functools import partial
from .helpers import KILOBYTE, MEGABYTE, GIGABYTE, Interleaved, LenMap
from .audio import (
Sample,
AUDIO_TYPE_PCM,
AUDIO_TYPE_OPUS,
SERIALIZABLE_AUDIO_TYPES,
ge... |
import re
from ashutils import list2dict
def sandhi(inwords):
"""Returns a string with the following replacements performed on the provided one.
- ~s/ \+ ([^\[])/$1/g; replace + and surround spaces with nothing
- replace aa with A
- replace ii with I
- replace uu with U
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright © 2018 <NAME>
""" Supports model ray tracing in terms of relative aperture and field.
.. Created on Mon Sep 17 23:10:59 2018
.. codeauthor: <NAME>
"""
import itertools
import logging
import math
import numpy as np
from numpy.linalg import norm
from scipy.opt... |
""" Calibrated Classifier Model: To calibrate predictions using Platt's scaling, Isotonic Regression or Splines
"""
import copy
import datatable as dt
from h2oaicore.mojo import MojoWriter, MojoFrame
from h2oaicore.systemutils import config
from h2oaicore.models import CustomModel, LightGBMModel
from sklearn.preproces... |
from __future__ import absolute_import, annotations
import textwrap
import typing as t
from abc import ABC, abstractmethod
from dataclasses import dataclass
from enum import Enum
import graphviz as gv
import networkx as nx
import pendulum
from arg_services.graph.v1 import graph_pb2
from arguebuf.models import Userdat... |
import glob
import os
import sys
import time
import numpy as np
from src import utils
import pynd.segutils as pynd_segutils
voxelmorph_labels = [0,
16, # brain stem
10, 49, # thalamus (second entry)
8, 47, # cerebellum cortex
4, ... |
import asyncio
from asyncio import AbstractEventLoop
import sys
import re
import inspect
from functools import partial
from types import FunctionType, MethodType, ModuleType
from typing import Dict, Any, Optional, Callable, Union, TypeVar, List, Type, FrozenSet, Literal, get_args, Tuple, \
Iterable, cast
from arcle... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
from matplotlib import pyplot as plt
from pypython import get_root_name
from pypython.constants import ANGSTROM, C
from pypython.plot import (finish_figure, get_xy_subset, remove_extra_axes, set_axes_scales, subplot_dims)
from pypython.spectrum import S... |
import logging
import re
import signal
from datetime import datetime
from django.core.management import call_command
from django.core.management.base import CommandError
from django.db import transaction
from usaspending_api.accounts.models import AppropriationAccountBalances, TreasuryAppropriationAccount
from usaspen... |
import re
import urllib.parse as url
from asyncio import create_subprocess_shell
from asyncio.subprocess import PIPE
from base64 import b64encode
from datetime import datetime
from io import BytesIO
from random import choice, randint, sample, seed
from time import time
import discord
import pytesseract
imp... |
import re
from funcparserlib.lexer import make_tokenizer, Token
from funcparserlib.parser import some, a, many, maybe, finished, skip, forward_decl
from .ast import *
from .builtin import Nothing, Int, Double, String
def tokenize(s):
tokenizer = make_tokenizer([
('comment', (r'#.*\n',)),
('ne... |
#@+leo-ver=4
#@+node:@file resource.py
#@@language python
#@<< Copyright >>
#@+node:<< Copyright >>
############################################################################
# Copyright (C) 2005, 2006, 2007, 2008 by Reithinger GmbH
# <EMAIL>
#
# This file is part of faces.
#
# faces is free software; you can... |
#!/usr/bin/env python3
from struct import pack, unpack
from datetime import date
from pathlib import Path
from random import shuffle
import os.path
import argparse
import sys
import re
configFilename = 'openmw.cfg'
configPaths = { 'linux': '~/.config/openmw',
'freebsd': '~/.config/openmw',
... |
import hmac
import json
from base64 import b64encode
from datetime import datetime, timedelta
from hashlib import sha256
from json import dumps
import boto3
from botocore.config import Config
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import login_required
... |
# Copyright 2018 The Texar 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 applicable ... |
# -*- coding: latin-1 -*-
# -----------------------------------------------------------------------------
# Copyright 2012, 2017 <NAME> <<EMAIL>>
#
# Licensed under the EUPL, Version 1.1 or - as soon they
# will be approved by the European Commission - subsequent
# versions of the EUPL (the "Licence");
# You may not us... |
import cv2
import random
import colorsys
import numpy as np
import tensorflow as tf
from core.config import cfg
import csv
def load_weights_tiny(model, weights_file):
wf = open(weights_file, 'rb')
major, minor, revision, seen, _ = np.fromfile(wf, dtype=np.int32, count=5)
j = 0
for i in range(13):
... |
from data import IMAGE_ID
import arcade
from constants import *
from itertools import chain
class NormalUI:
"""GameState=Normal時に描画するUI
"""
def __init__(self, engine):
self.engine = engine
self.player = engine.player
self.messages = engine.messages
self.panel_line_width... |
"""Python implementation of MySensors API."""
import calendar
import json
import logging
import os
import pickle
import threading
import time
from collections import deque
# pylint: disable=import-error, no-name-in-module
from distutils.version import LooseVersion as parse_ver
from importlib import import_module
from q... |
from struct import pack, unpack
import binascii
class Thrift(object):
BASE_EXCEPTION = {
'code': 1,
'message': 2,
'metadata': 3
}
def __init__(self):
pass
class TBinaryProtocol(object):
VERSION_MASK = -65536
VERSION_1 = -2147418112
TYP... |
# deep_deterministic_policy_gradient.py
# NOTE: $ mkdir tmp && makdir tmp/ddpg $$ mkdir plots
# NOTE: $ source ~/virtualenv_environments/py38_yolov5_pytorch/bin/activate
# NOTE: $ pip3 install gym Box2D pyglet
# activate with:
# NOTE: $ source ~/virtualenv_environments/py38_yolov5_pytorch/bin/activate
# NOTE: $ cd ~/De... |
import datplot as dp
import datstr as ds
import matplotlib.pyplot as plt
import numpy as np
import scipy.constants as cs
from numpy import pi, sqrt, sin, cos, tan, sinc
from scipy.integrate import quad
from scipy.optimize import brentq
from scipy.signal import find_peaks
## General
print()
fa = lambda a: np.array(... |
import os
import tempfile
import pandas as pd
import pytest
from pandas.util import testing as pdt
from .. import simulation as sim
from ...utils.testing import assert_frames_equal
def setup_function(func):
sim.clear_sim()
sim.enable_cache()
def teardown_function(func):
sim.clear_sim()
sim.enable_... |
##############################################################################
#
# Copyright (c) 2011 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... |
#
# Copyright (c) 2018 <NAME> <<EMAIL>>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL... |
#!/usr/bin/env python
# coding=utf-8
from telegram import Update, ForceReply, BotCommand
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackContext
from configparser import ConfigParser
from Adafruit_Thermal import *
from datetime import datetime, timedelta
from multiprocessing import P... |
# -*- coding: utf-8 -*-
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Wrapper library around ts_mon.
This library provides some wrapper functionality around ts_mon, to make it more
friendly to dev... |
# -*- coding: utf-8 -*
"""Convert ISA-Tab to ISA-JSON"""
import glob
import json
import logging
import os
import re
from enum import Enum
from os.path import join
from uuid import uuid4
from jsonschema import Draft4Validator, RefResolver
import isa.custom_isatab as isatab
from isatools.io.isatab_parser import parse
f... |
# pylint: disable=g-bad-file-header
# Copyright 2020 DeepMind Technologies Limited. 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/... |
#!/usr/bin/env python
"""
This file contains postprocessing methods for the SHEMAT-Suite models, created using the 2-step-conditioning workflow developed in the project Pilot Study Geothermics Aargau.
Methods comprise plotting and calculation of parameters, such as the heatflow.
"""
# import some libraries
from scip... |
"""
**This Neighborhood class builds a standalone affectation model on top of a zoning and an origin-destination volume matrix**
No transport network is required.
The model runs on a Neighborhood graph that is automatically built from the zoning :
* the vertices of this graph are the centroids of the zones;
* the ed... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
plotbase.py - <NAME> (<EMAIL>) - Feb 2016
License: MIT.
Contains various useful functions for plotting light curves and associated data.
'''
#############
## LOGGING ##
#############
import logging
from datetime import datetime
from traceback import format_exc
# s... |
# -*- coding: UTF-8 -*-
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from GEFcom2014 import pv_data, wind_data, load_data, read_file
from GEFcom2014.forecast_value import Planner
from GEFcom2014.utils import dump_file
def res_model(s_model: dict, n_s: int, i: int, prices: dict, s... |
import sys
import os
import functools
import traceback
from PyQt5 import uic
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QCursor
from PyQt5.QtWidgets import (
QMainWindow,
QAction,
QMenu,
QFileDialog,
QAbstractItemView,
QMessageBox,
QInputDialog,
QLineEdit,
QTableWidgetItem,... |
# Author: <NAME> <anoop _at_ sfu.ca>
# Do not distribute this code to anybody
# without permission from the author
# pylint: disable=C0301,C0111,C0103,C0325
# pylint: disable=R1702,R0912,R0902,R0913,R0914,R0915
import sys
import math
import random
from operator import itemgetter
# class Unseen: provides lexical rule... |
import logging
from canvas_sdk.methods.courses import create_new_course, get_single_course_courses, update_course
from canvas_sdk.methods.accounts import get_single_account, create_new_sub_account
from canvas_sdk.methods.sections import create_course_section
from canvas_sdk.methods.enrollments import enroll_user_secti... |
import numpy as np, gym, sys, copy, argparse
from gym import wrappers
import ffmpeg
import random
import os
import matplotlib.pyplot as plt
import math
import tensorflow as tf
from new_start_models import *
class QNetwork( object ):
# This class essentially defines the network architecture.
# The network s... |
#!/usr/bin/env python
# Copyright (c) 2018, <NAME>
#
# This program is free software; you can redistribute and/or modify
# it under the terms of the Apache License, Version 2.0. See the
# accompanying LICENSE file or read the terms at:
# http://www.apache.org/licenses/LICENSE-2.0
from __future__ import division
from... |
# coding:utf-8
import os
import json
import torch
import lib.utils.data as torchdata
import cv2
from torchvision import transforms
from scipy.misc import imread, imresize
import numpy as np
import pickle
import copy
import glob
import csv
import cv2
import time
import os
import numpy as np
import matpl... |
import itertools
from functools import lru_cache
from warnings import warn
from collections import namedtuple
from scipy.stats import norm
from scipy.special import expit as sigmoid
from scipy.special import expit, logit
import numpy as np
import craystack.rans as vrans
import craystack.util as util
Codec = namedtup... |
# -*- coding: utf-8 -*-
# FOGLAMP_BEGIN
# See: http://foglamp.readthedocs.io/
# FOGLAMP_END
import datetime
import re
import uuid
from aiohttp import web
from foglamp.services.core import server
from foglamp.services.core.scheduler.entities import Schedule, StartUpSchedule, TimedSchedule, IntervalSchedule, ManualSche... |
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... |
"""
Created on Jan 19, 2017
@author: andrew
"""
import asyncio
import logging
import re
import traceback
import discord
from discord.ext import commands
from discord.ext.commands.cooldowns import BucketType
from api.avrae.cogs5e.funcs import attackutils, checkutils, targetutils
from api.avrae.cogs5e.funcs.scripting ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# operations.py
#
# Copyright 2020 QuatroPe
#
# This file is part of ProperImage (https://github.com/quatrope/ProperImage)
# License: BSD-3-Clause
# Full Text: https://github.com/quatrope/ProperImage/blob/master/LICENSE.txt
#
"""operations module of ProperImage package... |
import sys
import math
import json
import os.path
import time
from room import Room, Town, Wilderness, Resource
from player import Player
from item import Item, Weapon, Armour, Consumable
from merchant import Merchant, Banker
from monster import Monster
from loot_table import Loot_table
from quests import Quest
#Typ... |
#!/usr/bin/env python3
# coding=utf-8
from rdflib import Graph, Namespace, URIRef, BNode, Literal, RDF
from rdflib.namespace import SKOS, XSD, OWL, DC
from rdflib.namespace import DCTERMS as DCT
import pickle
import os
import argparse
import hashlib
import unicodedata
from configparser import ConfigParser, ... |
"""Questionnaire Bank module"""
from collections import namedtuple
from datetime import MAXYEAR, datetime
from flask import current_app, url_for
from flask_babel import gettext as _
from sqlalchemy import CheckConstraint, UniqueConstraint
from sqlalchemy.dialects.postgresql import ENUM
from ..database import db
from ... |
#!/usr/bin/env python3
import datetime
import os
import random
import requests
import time
import logging
import argparse
from threading import Thread
import board
from influxdb_client import InfluxDBClient, Point
from influxdb_client.client.write_api import SYNCHRONOUS
from prometheus_client import start_http_server,... |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import numpy as np
import tensorflow as tf
from tensorpack.graph_builder import ModelDesc
from tensorpack.models import (
BatchNorm, BNReLU, Conv2D, AvgPooling, MaxPooling,
LinearWrap, GlobalAvgPooling, FullyConnected, regularize_cost,
... |
#!/usr/bin/env python
from collections import defaultdict, OrderedDict
import csv
import fnmatch
from glob import glob
import numpy as np
from optparse import OptionParser
import os
import re
import sys
root = os.path.dirname( os.path.dirname( os.path.abspath( sys.argv[ 0 ] ) ) )
sys.path.append( os.path.join( root, ... |
# coding=utf-8
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
import time
import random
import traceback
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import NoSuchElementException
from bs4 import Bea... |
from flask import Flask, render_template, redirect, url_for, session, send_from_directory, request, Response
import sys, datetime, uuid, os
from json import load, dumps, loads
from requests import get, post, put
from commonmark import commonmark
from importlib import import_module
from pathlib import Path
from copy imp... |
import torch
import torch.nn as nn
import torch.nn.init as init
from libs.GANet.modules.GANet import DisparityRegression, GetCostVolume
from libs.GANet.modules.GANet import MyNormalize
from libs.GANet.modules.GANet import SGA
from libs.GANet.modules.GANet import LGA, LGA2, LGA3
# from libs.sync_bn.modules.sync_bn impor... |
"""
First attempt (train_step_tf2 like) to build geometric trasnformer for outlier detection in tf2
"""
import os
import sys
PROJECT_PATH = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
sys.path.append(PROJECT_PATH)
import tensorflow as tf
from modules.networks.train_step_tf2.wide_residual_netwo... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import simpleaudio
import argparse
import re
import numpy as np
import datetime
from string import Template
from nltk.corpus import cmudict
__author__ = "<NAME>"
__copyright__ = "Copyright 2019"
__license__ = "MIT License Agreement"
__version__ = "1.0.0"
__mainta... |
# Copyright (c) 2018 Cisco and/or its affiliates.
# 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 ag... |
from __future__ import print_function
from copy import deepcopy
from operator import attrgetter
from scipy.optimize import fmin_tnc
from scipy.stats import chisqprob, multivariate_normal
from scipy.linalg import eigvalsh
import numpy as np
from OnePlusOne_ES import OnePlusOne_ES
from CMAES import CMA
from SPSO2011 im... |
import re, collections
import urllib, urllib2
import json
import logging
import random
import time
from datetime import datetime
from xml.dom.minidom import parseString
from django.conf import settings
from django.core.cache import get_cache
from django.utils import encoding
from c2g.util import CacheStat
logger =... |
import argparse
import sys
from os import makedirs
from os.path import isfile, join
from typing import List, Tuple
import joblib
import numpy as np
import pandas as pd
from nltk.corpus import wordnet as wn
from persim import PersistenceImager
from skdim import id as est_ids
from skdim._commonfuncs import GlobalEstimat... |
"""A module for defining and handling courses themselves."""
import csv
from datetime import date, datetime, timedelta
from re import match, split
from subprocess import call, Popen, DEVNULL
import yaml
from unidecode import unidecode
from utilities import *
@dataclass
class Teacher(Strict):
name: Union[str, Li... |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import json
import logging
import uuid
from enum import Enum, unique
from typing import Any, ClassVar, Dict, List, Optional, Set, Tuple, Type, Union, cast
import boto3
from botocore.exceptions import ClientError... |
import matplotlib
matplotlib.use("Agg")
import yaml
import sys
import pele_platform.constants.constants as cs
sys.path.append(cs.DIR)
from argparse import HelpFormatter
from operator import attrgetter
import argparse
import os
import pele_platform.Adaptive.main as gl
import pele_platform.Adaptive.simulation as ad
cla... |
# Work with Python 3.6
import discord
import os
import re
import datetime
import mysql.connector
import time
import asyncio
from dateutil.relativedelta import relativedelta
from Dependencies.ServerPrefixes import *
with open('BotToken.txt') as f:
TOKEN = f.read()
AltonDB = mysql.connector.connect(
host="local... |
#!/usr/bin/env python
from __future__ import print_function, division, absolute_import
import numpy as np
from scipy.integrate import odeint
from scipy.integrate import ode
import numpy.linalg as la
import pdb
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d.axes3d as p3
import matplotlib.animation as animat... |
import networkx as nx
import itertools
import graph_util
from sortedcontainers import SortedListWithKey
from meekrules import MeekRules
import numpy as np
import time
import dill
import os
from knowledge import Knowledge
class Arrow:
__slots__ = ['a', 'b', 'na_y_x', 'h_or_t', 'bump', 'index']
def __init__(sel... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
from os import listdir
import re
import numpy as np
from scipy.linalg import inv, solve_triangular, svd, pascal, invpascal
from scipy.optimize import nnls
from abel.tool... |
"""
Works well for language modelling
"""
import torch.nn as nn
from torch.autograd import Variable
import torch
import numpy as np
from models.networks.recurrent.goru import GORU
from models.networks.recurrent.urnn import EURNN
from models.networks.recurrent.qrnn import QRNN
from models.networks.convolutional.highway... |
'''
Name: get_mean_image.py
Desc: Return the average image over a set of data. Supports mean and median.
Usage:
python get_mean_image.py /path/to/cfgdir/ --stat-type median
'''
from __future__ import absolute_import, division, print_function
import argparse
import numpy as np
import os
import pdb
import pic... |
import time
from fontTools.ttLib import TTFont, TTLibError
from fontTools.ttLib.tables._h_e_a_d import mac_epoch_diff
from fontTools.misc.textTools import num2binary
from fontTools.pens.boundsPen import ControlBoundsPen
from extractor.exceptions import ExtractorError
from extractor.tools import RelaxedInfo, copyAttr
#... |
import logging
import stat
import dateutil.parser
import re
import json
import os
import atexit
import resource
import pprint
import math
from errno import ENOENT, EIO, ENOTDIR, ENOTEMPTY, EPERM, EEXIST
from fuse import FUSE, Operations, FuseOSError, c_statvfs, fuse_get_context, \
LoggingMixIn
from ti... |
from aiotfm.connection import TFMProtocol
import aiohttp
import asyncio
import aiotfm
import random
import string
import time
import re
import os
import sys
WEEKLY_RECORDS_MSG = """<a:blob_cheer1:683845978553450576> **[{} - {}]** <a:blob_cheer2:683846001421058071>
Congratulations to the highest achieving Weekly Leade... |
import torch.nn as nn
import torch.nn.functional as F
import torch
import math
import numpy as np
import pandas as pd
"""
LocalEnergy is the energy of a protein. LocalTransformer is the transformer block.
In local_ss.py, we separate structure and sequence.
First calculate P(structure), then calculate P(sequence|str... |
#!/usr/bin/env python
"""
Test the HDF5 connector
"""
import datetime
import random
import warnings
import shutil
import nose
import numpy
import tokiotest
import tokio.connectors.hdf5
DATASETS_1D = [
'FSStepsGroup/FSStepsDataSet',
'MDSCPUGroup/MDSCPUDataSet'
]
DATASETS_2D = [
'FSMissingGroup/FSMissingDat... |
from dataflows import Flow, update_resource, dump_to_path, load
import os
from collections import defaultdict
import tempfile
import datetime
import time
from . import db
import pycurl
import signal
from signal import SIGPIPE, SIG_IGN
import hashlib
import shutil
HASH_BLOCKSIZE = 65536
MAX_DOWNLOAD_RUNTIME_SECONDS = ... |
import gc
import os
import cv2
import numpy as np
import torch
from SRL4RL import SRL4RL_path
from SRL4RL.rl.utils.runner import StateRunner
from SRL4RL.utils.nn_torch import numpy2pytorch, pytorch2numpy, save_model
from SRL4RL.utils.utils import createFolder, loadPickle
from SRL4RL.utils.utilsEnv import (
NCWH2W... |
import maya.cmds as cmds
from functools import partial
from PySide2 import QtWidgets, QtCore, QtGui
from master_rigger import Splitter
from master_rigger import cmdsTranslator as nUtil
from maya_tools.contexts.undoContext import UndoContext
attributes = ['tx', 'ty', 'tz',
'rx', 'ry', 'rz',
... |
#!/usr/bin/env python
# coding: utf-8
# <h1><center>IME 611A Financial Engineering, IIT Kanpur</center></h1>
# <p><h1><center>Course Project A</center></h1></p>
# <p><center><NAME> (20114003); <NAME> (20114014)</center></p>
# <p><center>Group 15 (MTech IME, 1st year)</center></p>
#
#
# In[1]:
import pandas as pd
... |
#!/usr/bin/env python3
#
# @author: <NAME> @YangLab, Hormel Institute, UMN
#
# ===============================================================================
import argparse
import os
import sys
import traceback
import gffutils
import pandas as pd
import pysam
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.Se... |
'''
TACO: Multi-sample transcriptome assembly from RNA-Seq
'''
import os
import shutil
import logging
from operator import itemgetter
from multiprocessing import Process, JoinableQueue, Value, Lock
from collections import namedtuple
from taco.lib.gtf import GTF
from taco.lib.base import Strand, Results
from taco.lib.b... |
from __future__ import absolute_import
from time import sleep
from operator import itemgetter
from warnings import warn
from os.path import join
from cobra import Model, Reaction, Metabolite
from .SeedClient import SeedClient, ServerError, ObjectNotFoundError, JobError, handle_server_error
from .workspace import get_... |
"""Library of methods for visualization with a few miscellaneous methods."""
import numpy as np
import torch as t
import torchvision as tv
from esh import datasets
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib import collections as mc
from matplotlib.colle... |
import numpy as np
import pandas as pd
import xarray as xr
import copy
import warnings
try:
from plotly import graph_objs as go
plotly_installed = True
except:
plotly_installed = False
# warnings.warn("PLOTLY not installed so interactive plots are not available. This may result in unexpected funtionali... |
import concurrent.futures
import datetime as dt
import heapq
import math
import traceback
from time import time
from barbante.utils.profiling import profile
import barbante.utils.logging as barbante_logging
import barbante.utils.text as text
import barbante.utils as utils
from barbante.context.context_manager import w... |
from tkinter import NW
import dash
from dash.dependencies import Input, Output, State
from dash import dcc
from dash import html
import plotly.graph_objects as go
import dash_daq as daq
from dash import dash_table
import json
from scipy import signal
from typing import Optional
import numpy as np
import h5py
import pan... |
#! /usr/bin/env python
"""
@@ script: sra_proceduere_bowtie.py
@@ description: based on python3.5.2
@@ author: zhangq
"""
import argparse
import datetime
import os
import sys
import re
import subprocess
import tempfile
import copy
import itertools
import pandas
def printlg(log_message):
print(log_message, file = ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon May 6 14:05:30 2019
@author: avanetten
"""
import numpy as np
from osgeo import gdal, ogr, osr
import scipy.spatial
import rasterio as rio
import affine as af
import shapely
import time
import os
import sys
import subprocess
from math import sqrt, rad... |
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
from collections import namedtuple
import concurrent.futures
import datetime
from distutils.version import StrictVersion
from enum import Enum
import filecmp
import glob
import json
import logging.handlers
import os
from pathlib import Path
import re
import subprocess
import sys
import tempfile
import requests
from bas... |
import collections
import itertools
import math
import random
import string
from abc import ABC, abstractmethod
from typing import List, Tuple, Any, Dict, Type
import pandas as pd
import numpy as np
def biased_coin(p):
return np.random.choice([1, 0], p=[p, 1 - p])
def RandStr(alphabet=string.ascii_letters, min... |
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2012 by <NAME>.
# License: BSD, see LICENSE for more details.
#
import re
import os.path
from jinja2 import TemplateSyntaxError, nodes
from jinja2.ext import Extension
__version__ = '0.3.4-dev'
begin_tag_rx = r'\{%\-?\s*haml.*?%\}'
end_tag_rx = r'\{%\-?\s*endhaml\s*\-?%\}... |
import re
import click
from truffleHog import truffleHog
import json
import boto3
from botocore.exceptions import ClientError
import os
import logging
import time
import base64
import csv
class AwsAccessKey(click.ParamType):
# Search for access key IDs: (?<![A-Z0-9])[A-Z0-9]{20}(?![A-Z0-9]).
name = 'aws_acces... |
import json
import os
from audiocommons_ffont.key_estimation.evaluation_metrics import *
from audiocommons_ffont.tempo_estimation.evaluation_metrics import *
import numpy as np
ANNOTATIONS_FILE = "./annotation_dict.json"
FSL10K_PATH = "/mnt/f/code/research/freesound-loop-annotator/static/FSL10K/"
METADATA_FILE = os... |
# -*- coding: utf-8 -*-
# pylint: disable=too-many-lines
"""
Perform transformations on Dimensions
=====================================
Provide functions and classes to build a Space which an algorithm can operate on.
"""
import functools
import itertools
from abc import ABCMeta, abstractmethod
import numpy
from o... |
# Copyright (c) 2009, <NAME>'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Common objects shared by __init__.py and _ps*.py modules."""
# Note: this module is imported by setup.py so it should not import
# psutil or third-party modules.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.