text stringlengths 6.04k 39.5k |
|---|
import pandas as pd, numpy as np
from kaggle_datasets import KaggleDatasets
import tensorflow as tf, re, math
import tensorflow.keras.backend as K
import efficientnet.tfkeras as efn
from sklearn.model_selection import KFold
from sklearn.metrics import roc_auc_score
import matplotlib.pyplot as plt
import argparse
pars... |
import pandas as pd
import os
from decimal import Decimal
# from sklearn.cluster import KMeans,DBSCAN
import datetime,json,time,random
from math import radians, cos, sin, asin, sqrt,degrees
from impala.dbapi import connect
from sqlalchemy import create_engine
import MySQLdb
from collections import OrderedDict
from retr... |
'''
Utility functions models code
'''
import numpy as np
import numpy.lib.recfunctions as nprf
import numpy.linalg as L
from scipy.interpolate import interp1d
from scipy.linalg import svdvals
from statsmodels.distributions import (ECDF, monotone_fn_inverter,
StepFunction)... |
# Copyright (C) 2007-2016 <NAME>' <<EMAIL>>.
# Use of this source code is governed by MIT license that can be
# found in the LICENSE file.
import os
import stat
import tempfile
import time
try:
from stat import filemode as _filemode # PY 3.3
except ImportError:
from tarfile import filemode as _filemode
try:
... |
import numpy as np
import copy
import open3d as o3d
import sklearn.cluster as skc
import vision.depth_camera.pcd_data_adapter as pda
def __draw_registration_result(source_o3d, target_o3d, transformation):
source_temp = copy.deepcopy(source_o3d)
target_temp = copy.deepcopy(target_o3d)
source_temp.paint_unif... |
"""Module to combine GTFS schedule feeds with vehicle positions Parquet files
and update the VPDelays and HlyDelays tables
"""
# pylint: disable=cell-var-from-loop
import os
from datetime import date, datetime, timedelta
from collections import namedtuple
import pytz
import tzlocal
from pyspark.sql import functions ... |
"""Tests for UHD module.
This module contains unit-tests for the UHD module, USRP object and its methods.
TODO:
* write_register
* read_register
* enumerate_registers
* set_user_register
"""
import pyuhd
from pyuhd import Usrp, UhdError
import unittest
from itertools import combinations, product
import numpy... |
import numpy as np
def create_cube(p1=(0, 0, 0), p2=(1, 1, 1)):
p = np.array(
[
[1, 1, 1],
[0, 1, 1],
[0, 0, 1],
[1, 0, 1],
[1, 0, 0],
[1, 1, 0],
[0, 1, 0],
[0, 0, 0],
]
)
faces_p = [0, 1, 2, 3,... |
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
import pybedtools
import numpy as np
import multiprocessing
import itertools
import pysam
import sys
from helpers import chunker
import helpers
from helpers import rebin
import filetype_adapters
class ArgumentError(Exception):
pass
def _local_count(reader, feature, stranded=False):
"""
The count of geno... |
#
# Copyright (c) SAS Institute Inc.
# SPDX-License-Identifier: Apache-2.0
# Version comparison utility extracted from pymaven and further stripped down
# and significantly modified from the original at pymaven
#
# Visit https://aboutcode.org and https://github.com/nexB/univers for support and download.
import functoo... |
'''
Representation learning testing for TCGA data.
Set all parameters in this script & run with parameter "batch" or "local".
'''
import numpy as np
import logging
import datetime
#import argparse
from common import expInterp, ensure_dir_exists
import dataReader
import batch
#########################################... |
#! /usr/bin/env python
# coding=utf-8
# Copyright (c) 2019 Uber 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
#
# Unles... |
##################################################
# Copyright (c) <NAME> [GitHub D-X-Y], 2019 #
######################################################################################
# One-Shot Neural Architecture Search via Self-Evaluated Template Network, ICCV 2019 #
#################################################... |
# -*- coding: utf-8 -*-
from z3 import *
from utils import buildONE, buildZERO, sub, extract1BV
## a refers to the bit-vector of the present activators ##
## of a given gene, size: |genes| ##
## r refers to the bit-vector of the present repressors ##
## of a given gene, size: |genes| ... |
import pytest
import json
from datetime import date, timedelta
from www.core import Synapse, Env
from www.services.synapse_space.dca import CreateDcaSpaceService
import synapseclient as syn
@pytest.fixture
def mk_service(syn_test_helper, mk_uniq_real_email, dca_config, set_dca_config):
services = []
def _mk(... |
import pandas as pd
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
import matplotlib.patches as mpatches
import matplotlib.dates as mdates
from sklearn.manifold import TSNE
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import matplotlib.cm a... |
import datetime as dt
from collections import OrderedDict
from unittest import SkipTest
import numpy as np
try:
import xarray as xr
except:
raise SkipTest("Could not import xarray, skipping XArrayInterface tests.")
from holoviews.core.data import Dataset, concat
from holoviews.core.dimension import Dimension... |
import rdkit.Chem as Chem
import rdkit.Chem.AllChem as AllChem
from rdkit.Chem.rdchem import ChiralType, BondType, BondDir, BondStereo
from rdchiral.utils import vprint, PLEVEL
BondDirOpposite = {AllChem.BondDir.ENDUPRIGHT: AllChem.BondDir.ENDDOWNRIGHT,
AllChem.BondDir.ENDDOWNRIGHT: AllChem.BondDir.... |
import numpy as np
from scipy.optimize import fsolve
from eos_selecction import eos, convert_argument
from models_eos import models_eos_cal
'''
This module calculate parameters necessary to use the equations of state:
SRK, PR and RKPR
'''
RGAS = 0.08314472
# Definir el significado fisicoquímico
A0, B0, C0 = 0.0017, ... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
import sys
import json
import logging
import croniter
import traceback
import random
import time
import datetime
import requests
import asyncio
import functools
import config
from libs import utils
from tornado import gen... |
import numpy as np
from numpy.lib import format
from pycompss.api.api import compss_wait_on
from pycompss.api.constraint import constraint
from pycompss.api.parameter import Depth, COLLECTION_INOUT, COLLECTION_OUT, \
Type, FILE_IN, IN_DELETE, COLLECTION_FILE_IN
from pycompss.api.task import task
import os
from dis... |
# Copyright 2020 Uber 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 applicable law or agreed to ... |
import configparser
import getpass
import os
import sys
import textwrap
from binascii import a2b_base64, b2a_base64, hexlify
from hashlib import sha256, pbkdf2_hmac
from hmac import compare_digest
import msgpack
from .logger import create_logger
logger = create_logger()
from .constants import * # NOQA
from .compres... |
import torch as t
from torch import nn
from torch.nn import functional as F, Parameter
from torch.autograd import Variable
from torch.nn.init import xavier_normal_, xavier_uniform_
from torch.utils import data
from collections import defaultdict
import numpy as np
from time import time
from statistics import mean
impo... |
#%%
'''
Fixed:
tfa.layers.GroupNormalization(1) -> layers.LayerNormalization()
'''
#%%
import tensorflow as tf
import tensorflow.keras as K
from tensorflow.keras import layers
import numpy as np
# import tensorflow_addons as tfa
#%%
# def nonlinearity(x):
# return tf.nn.swish(x)
#%%
# # FIXME
# def normalize(x):
# ... |
#!/usr/bin/env python3
"""Functions for thermochronometer age prediction."""
# Load modules
import numpy as np
import matplotlib.pyplot as plt
from scipy.special import erfc
from scipy.interpolate import interp1d
# Exhumation rate from gradient and age
def edot_linear(ages=[10.0], closure=100.0, gradient=10.0):
e... |
# Importing libaries and modules
import os
from bs4 import BeautifulSoup
import nltk
from nltk.tokenize import word_tokenize
from nltk.stem import PorterStemmer
from collections import defaultdict, OrderedDict
import warnings
import codecs
import math
warnings.filterwarnings("ignore")
# Global variables
Dir1 = "C:\\Us... |
import pytest
import requests
import time
from kubernetes import client
from kubernetes_crd_utility import watch_crd_instance
from kubernetes_pod_utility import watch_pod_status, watch_pod_logs
from kubernetes_pod_utility import get_pod_list
from kubernetes_deployment_utility import watch_deployment_status, read_deplo... |
''' Provider class and helper functions for Frustum PointNets.
Author: <NAME>
Date: September 2017
Modified by <NAME>
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import time
import pickle
import sys
import os
import numpy as np
import... |
from sklearn.preprocessing import Normalizer
from sklearn.preprocessing import MinMaxScaler
from sklearn.preprocessing import StandardScaler
from sklearn.preprocessing import RobustScaler
from sklearn.preprocessing import QuantileTransformer
from sklearn.externals import joblib as jl
from sklearn.externals.joblib.my_e... |
import os
import cv2
import numpy as np
import pickle
import torch
from utils import mkdir
import pdb
def resize_cam(cam, size=(224, 224)):
cam = cv2.resize(cam , (size[0], size[1]))
cam = cam - cam.min()
cam = cam / cam.max()
return cam
def blend_cam(image, cam):
cam = (cam * 255.).astype(np.ui... |
"""Functions for FIR filter design."""
from __future__ import division, print_function, absolute_import
from math import ceil, log
import numpy as np
from numpy.fft import irfft
from scipy.special import sinc
from . import sigtools
__all__ = ['kaiser_beta', 'kaiser_atten', 'kaiserord',
'firwin', 'firwin2',... |
from __future__ import print_function, division
from hscom import __common__
(print, print_, print_on, print_off,
rrr, profile) = __common__.init(__name__, '[scripts]')
# Python
from os.path import dirname, join, splitext
import shutil
from itertools import izip
# Science
import numpy as np
from scipy.cluster.hierarch... |
"""Code to interact with and run various EMBOSS programs.
These classes follow the AbstractCommandline interfaces for running
programs.
"""
from Bio import Application
from Bio.Application import _Option
class Primer3Commandline(Application.AbstractCommandline):
"""Commandline object for the Primer3 interface fr... |
#!/usr/bin/env python3
# #################### INFO ###########################################################
# This program is written as part of <NAME>'s bachelor thesis.
# Validator is an automated checker for error inputs of C* code.
# It contains a parser for Boolectors witness format.
# A C* file is taken as in... |
# Copyright 2021 The SODA 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 applicable law or agreed to in writin... |
import argparse
from data_loader import *
from data_process.transform import *
from loss.bce_losses import *
from loss.cyclic_lr import *
from loss.lovasz_losses import *
from model.model import model34_DeepSupervion,\
model50A_DeepSupervion,\
model101A_DeepSupervion
fr... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
__license__ = """
This file is part of GNU FreeFont.
GNU FreeFont 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, ... |
"""\
This module supports the Extron `DVS 304`_ and `DVS 304 DVI`_ Digital Video Scalers.
The DVS 304 is a four-input video and RGB scaler. Variants include audio switching ("A" models),
a SDI input ("D" models), and DVI-I output ("DVI" models).
These devices feature four inputs:
- Input 1: A BNC connector for co... |
import unittest
import string
from string import Template
class ModuleTest(unittest.TestCase):
def test_attrs(self):
# While the exact order of the items in these attributes is not
# technically part of the "language spec", in practice there is almost
# certainly user code that ... |
# Copyright 2012 OpenStack Foundation
# 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 requ... |
import logging
import traceback
import time
import sys
import uuid
from abc import ABCMeta
from abc import abstractmethod
from collections import OrderedDict
import boto
import venusian
import pyswfaws.decorators
from boto.swf.layer1_decisions import Layer1Decisions
from models import *
from serializers import *
fro... |
import argparse
import json
import logging
import os
import multiprocessing
import re
from contextlib import contextmanager
from functools import partial
from math import ceil
from pathlib import Path
from typing import Dict, Union, Optional, List
import datasets
from dotenv import load_dotenv
from numpy import log10
... |
from skdim import __version__
from distutils.version import LooseVersion
import sphinx
import sys
import os
import sphinx_rtd_theme
sys.path.append("../skdim/")
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the... |
##!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Electron Cash - A Bitcoin Cash SPV Wallet
# This file Copyright (c) 2019 <NAME> <<EMAIL>>
# This file Copyright (c) 2022 mainnet_pat
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files ... |
"""
<NAME>
Date: April 13, 2021
K-Means Unsupervised Clustering
for CH Detection
"""
import numpy as np
import h5py as h5
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
from skimage import measure
from scipy.spatial.distance import cdist
import tensorflow as tf
import matplotlib.colors as colors
im... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... |
# import the necessary packages
import argparse
import time
import cv2
import os
from matplotlib import pyplot as plt
import sys
import numpy as np
import math
# peak local max imports
from skimage import data, img_as_float
from scipy import ndimage as ndi
from skimage.feature import peak_local_max
# for the function... |
from collections import OrderedDict, defaultdict
from jsonobject import (
BooleanProperty,
DictProperty,
JsonObject,
ListProperty,
ObjectProperty,
StringProperty,
)
from corehq.apps.app_manager.app_schemas.app_case_metadata import (
AppCaseMetadata,
FormQuestionResponse,
LoadSavePr... |
# -*- coding: utf-8 -*-
#
# BitcoinLib - Python Cryptocurrency Library
# VALUE class - representing cryptocurrency values
# © 2020 November - 1200 Web Development <http://1200wd.com/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General P... |
# -*- coding: utf-8 -*-
#
# Copyright © 2014 Spyder development team
# Licensed under the terms of the New BSD License
#
# DataFrameModel is based on the class ArrayModel from array editor
# and the class DataFrameModel from the pandas project.
# Present in pandas.sandbox.qtpandas in v0.13.1
# Copyright (c) 201... |
#!/usr/bin/env python3
###############################################################################
# #
# RMG - Reaction Mechanism Generator #
# ... |
# !/usr/bin/env python3
###############################################################################
# $Id: gdallocationinfo.py c78298d387cb982036aa3a515349abff1a9c5a53 2021-05-02 14:27:23 +0300 Idan Miara $
#
# Project: GDAL utils
# Purpose: Query information about a pixel given its location
# A direct ... |
from collections import namedtuple
from .types import *
class IR:
_counter = 0
FunctionBegin = namedtuple('FunctionBegin', 'name storage pragma')
FunctionEnd = namedtuple('FunctionEnd', '')
Label = namedtuple('Label', 'label')
EntityLocalVar = namedtuple('EntityLocalVar', 'name offset specific'... |
import shutil
import numpy as np
import iric
from . import util
def writeSolution(filename, fid, iterMode):
isize, jsize = iric.cg_iRIC_Read_Grid2d_Str_Size()
# fill iface
iface_is_edge = np.zeros(isize * (jsize - 1), dtype=np.int32)
iface_is_edge_reals = np.zeros(isize * (jsize - 1), dtype=np.float... |
from typing import Any, Dict
import argparse
import logging
import pathlib
import random
import sys
from pprint import pprint
import pandas as pd
import torch as th
import numpy as np
try:
from icecream import install # noqa
install()
except ImportError: # Graceful fallback if IceCream isn't installed.
... |
"""Simple collection of unit tests for the lin library.
These functions are written somewhat sparesely as the module is written using
an autocoder. The goal is to test all functions on only a handful of lin types.
"""
import lin
import numpy as np
import pytest
def test_constructor():
"""Tests constructs for t... |
import abc
from collections import OrderedDict
from itertools import product
from functools import partial
from time import time
import cgen
from devito.cgen_utils import ccode
from devito.dle.blocking_utils import (BlockDimension, fold_blockable_tree,
unfold_blocked_tree)
from ... |
"""Ibis expression API definitions."""
from __future__ import annotations
import datetime
import functools
from typing import Iterable, Mapping, Sequence, TypeVar
import dateutil.parser
import numpy as np
import pandas as pd
import ibis.expr.builders as bl
import ibis.expr.datatypes as dt
import ibis.expr.operation... |
# Copyright 2014-2021 Canonical Limited.
#
# 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 ... |
import sys
import os
import random
from attrdict import AttrDict
import numpy as np
import argparse
import torch
# set project search path
ROOT_DIR = os.path.abspath("./")
sys.path.append(ROOT_DIR)
import utils
from config import CONFIG
# import pdb
# ------------------------- respecify important flags ------------... |
import lark
import collections
import pathlib
import re
import warnings
from importlib import import_module
from fontFeatures import FontFeatures
from more_itertools import collapse
from fontTools.feaLib.variableScalar import VariableScalar
from lark.visitors import VisitError
from glyphtools import get_glyph_metrics... |
# -*- coding: utf-8 -*-
import math
import re
from types import SimpleNamespace
from PIL import Image, ImageFont, ImageDraw # images
from imageio import get_writer as imageio_get_writer, imread as imageio_imread # GIFs
from matplotlib import rc as matplotlib_rc # for regulating font
from matplotlib import use as mat... |
import logging
import secrets
from django.conf import settings
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
from github import Github, GithubException
from controlpanel.api import auth0, aws
from controlpanel.api.aws import iam_arn, s3_arn # keep for tests
from controlpanel.api impo... |
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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 ... |
import distutils.util
import os.path
try:
import pathlib
except ImportError:
pathlib = None
import platform
import sys
import sysconfig
import types
import pytest
import pep425
@pytest.fixture
def example_tag():
return pep425.Tag("py3", "none", "any")
def test_Tag_lowercasing():
tag = pep425.Tag(... |
# imports
import tensorflow as tf
import pandas as pd
import numpy as np
class Pipeline:
"""
Inputs: dataframe of COCO-format annotations, including mandatory columns
['image_path', 'width', 'height'] and optional columns
['bbox', 'category', 'supercategory', 'attribute'].
Outputs:
... |
import argparse
import os
import struct
import numpy as np
import pycuda.autoinit # noqa
import pycuda.driver as cuda
import tensorrt as trt
BATCH_SIZE = 1
NUM_SEGMENTS = 8
INPUT_H = 224
INPUT_W = 224
OUTPUT_SIZE = 400
SHIFT_DIV = 8
assert INPUT_H % 32 == 0 and INPUT_W % 32 == 0, \
"Input heigh... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... |
# Copyright (c) 2021, <NAME>
# License: MIT License
from typing import Iterable, Optional, cast, TYPE_CHECKING, List
import abc
import math
from ezdxf.entities import DXFEntity, Insert, get_font_name
from ezdxf.lldxf import const
from ezdxf.enums import TextEntityAlignment
from ezdxf.math import Vec3, UCS, Z_AXIS, X... |
import discord
from discord.ext import commands
import sys
sys.path.append('../')
from main import config_load, increment_command_counter, Poll
import random
from pyowm.owm import OWM
from datetime import datetime, timedelta
from operator import attrgetter
from utils import is_int
import codecs
import json
import valid... |
# Copyright 2018 ICON Foundation
#
# 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... |
"""This module contains some modified versions of DQN classes, methods,
etc. from stable_baselines. The point of the modifications is to ensure
that both during training and testing, each unique action is allowed to
be taken at most once per episode.
This is not the best way of doing things, as upstream changes will b... |
#!/usr/bin/env python
"""These are flows designed to discover information about the host."""
from __future__ import absolute_import
from __future__ import unicode_literals
from future.utils import iteritems
from grr_response_core import config
from grr_response_core.lib import queues
from grr_response_core.lib impor... |
"""
This stores the classes used for the text mining project.
"""
import os
import requests
import re
from scipy.sparse import dok_matrix
import numpy as np
import matplotlib.pyplot as plt
# define constants
start_indicator = "*** START OF"
end_indicator = " ***\n"
contractions = {
"aren't": "are not",
"can't... |
from collections import namedtuple
from functools import partial
import os
import sys
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QGroupBox, QPushButton, \
QLabel, QComboBox, QFileDialog, QMessageBox, QDialog, QTableWidget, QTableWidgetItem, \
QApplication, QProgressBar, QListWidget, QListWi... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
__author__ = 'andyguo'
import os
import shutil
import stat
import logging
from glob import iglob
from collections import namedtuple
from config import *
BASE_STRING_TYPE = str # Python 3 str (=unicode), or Python 2 bytes.
if os.path.supports_unicode_fi... |
# Copyright 2014 CloudFounders NV
#
# 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 writ... |
# Copyright 2021 Hathor Labs
#
# 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... |
import numpy as np
import pydicom
import os
import nibabel as nib
import pandas as pd
import json
import argparse
import pickle
import time
from calculate_t2 import *
from segmentation_refinement import *
from projection import *
from utils import whiten_img
from models import *
from cluster_utils import strip_empty_l... |
"""
Various helpers that are based on Python tokenization
Note that the tokenize module starts the rows at 1 and prompt_toolkit starts
them at 0.
"""
import io
from itertools import tee, chain
from tokenize import tokenize, TokenError
from tokenize import (STRING, COLON, AT, ENDMARKER, DEDENT, NAME, NEWLINE,
... |
# Copyright 2017 Google LLC.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#... |
import pygame as pg
from time import sleep, time
from operator import itemgetter
import threading
import json
import sys
import helpers
import boss
import player
import sprites
from settings import screen
import settings as s
pg.init()
pg.font.init()
def background_tasks():
clock = pg.time.Cl... |
# This will produce matrices from specified salmon quant outputs.
# (cc) 2017 <NAME>
# Karolinska Institutet
__version__ = "0.2.5 GIMLET"
__doc__ ="""
This script has been adapted to be used with the following versions:
snakemake: 3.13.3
cutadapt: 1.14
multiqc: 1.0
fastqc: 0.11.5
salmon: 0.8.2
conda: 4.3.21
""... |
import argparse
import math
import os
import sys
from itertools import product
import torch
import torch.nn as nn
import torch.onnx
import wandb
sys.path.append('../..')
from optimizers.optim import SGD_C, SGD, Adam_C, Adam, RMSprop, RMSprop_C
from optimizers.optim_experimental import AggMo
# commandline arguments
... |
from numpy.linalg import norm
from qmeq.builder.various import *
import qmeq
EPS = 1e-14
class ParametersDoubleDotSpinful(object):
def __init__(self):
tL, tR = 2.0, 1.0
self.tleads = {(0,0): tL, (2,2): tL,
(1,1): tR, (3,3): tR,
(0,1): 0.3*tL, (2,3): ... |
# -*- coding: utf-8 -*-
r"""
Partition Shifting Algebras
This module contains families of operators that act on partitions or,
more generally, integer sequences. In particular, this includes Young's
raising operators `R_{ij}`, which act on integer sequences by adding `1`
to the `i`-th entry and subtracting `1` to the ... |
# -*- coding: utf-8 -*-
'''
Copyright 2012 <NAME> <<EMAIL>>
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 agree... |
#
# Netlink interface based on libnl
#
# Copyright (c) 2011 <NAME> <<EMAIL>>
#
"""netlink library based on libnl
This module provides an interface to netlink sockets
The module contains the following public classes:
- Socket -- The netlink socket
- Message -- The netlink message
- Callback -- The netlink callback... |
import argparse
from collections.abc import Iterable
import os
import pprint
import random
import sys
import time
from typing import List, Tuple
import matplotlib.pyplot as plt
from matplotlib.text import Annotation
from matplotlib.transforms import IdentityTransform
from matplotlib.patches import Rectangle, Arc
from... |
# -*- coding: utf-8 -*-
import numpy as np
from .BaseDataProtocol.PAProtocol import dtype_PA
from .util import _prepare_for_read, _unpack_from_buf, julian2date_SEC, make_time_unit_str
from ..core.NRadar import PRD
from ..configure.pyart_config import get_metadata, get_fillvalue
from ..configure.default_config import CI... |
#!/usr/bin/env python3
import os
import cv2
import pcl
import torch
import os.path
import numpy as np
import torchvision.transforms as transforms
from PIL import Image
from common import Config
import pickle as pkl
from lib.utils.basic_utils import Basic_Utils
import scipy.io as scio
import scipy.misc
from cv2 import i... |
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 07 13:59:40 2016
@author: medialab
"""
import numpy as np
import matplotlib.pyplot as plt
# joint in kinect
JointType_SpineBase = 0
JointType_SpineMid = 1
JointType_Neck = 2
JointType_Head = 3
JointType_ShoulderLeft = 4
JointType_ElbowLeft = 5
JointType_WristLeft = 6
Joi... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Main script for users
# Creates a .hdf5 dataset.
# Public functions:
# main
# ToDo Proposition. Ajouter la possibilité de loader des données
# ... |
from django.shortcuts import render, redirect
from django.http import HttpResponse
import datetime
from django.views.decorators.csrf import csrf_protect
from django.contrib.auth import authenticate, login, logout
from django.contrib import messages
from django.contrib.auth.decorators import login_required, permission_r... |
from functools import partial
import sys
from typing import Tuple
from bokeh.models import Arrow, Button, ColorBar, ColumnDataSource, CustomJS, DataTable
from bokeh.models import Div, Dropdown, HoverTool, LinearColorMapper, NumberFormatter
from bokeh.models import Slider, TableColumn, Toggle, VeeHead
from bokeh... |
import numpy as np
import os
import matplotlib
import matplotlib.pyplot as plt
import forgi
from forgi.visual.mplotlib import _find_annot_pos_on_circle
import colorsys
import RNA
import matplotlib.colors as mc
import shutil
import subprocess as sp
weblogo_opts = '-X NO --fineprint "" --resolution "350" --format "PNG"'... |
# -*- coding: utf-8 -*-
from __future__ import division, print_function
__all__ = ['Maelstrom', 'RadialVelocity']
from multiprocessing import Pool, cpu_count
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from tensorflow.python.framework import ops
from tensorflow.python.ops import array... |
"""
Functionality related to group members.
"""
import time
import datetime
import json
from typing import Iterator, List
from dataclasses import asdict, dataclass, field
from pymongo.collection import ReturnDocument
from alfred3.data_manager import DataManager as dm
from alfred3.quota import SessionGroup
from ._uti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.