text stringlengths 8.04k 46.5k |
|---|
# coding=utf-8
# Copyright 2018 The Mesh TensorFlow Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
#!/usr/bin/env python3
from ast import arg
import os
import json as json_dumper
from builtins import open as open_file
import time
import r2pipe
#from tkinter import E
# from submodules.claripy import claripy # TODO
import claripy
import monkeyhex # this will format numerical results in hexadecimal
import logging
... |
import requests
import tarfile
import os
import sys
from pathlib import Path
from datetime import datetime
import logging
import shutil
import glob
from operator import itemgetter
import collections
import pydicom
import nrrd
import numpy as np
import nibabel as nib
#import PySimpleGUI as sg
from skimage.filters.thresh... |
'''
description: FRBCat functionality for pyfrbcatdb
license: APACHE 2.0
author: <NAME>, NLeSC (<EMAIL>)
'''
from pyfrbcatdb import dbase as dbase
import os
import sys
from numpy import append as npappend
from numpy import array as nparray
import voeventparse as vp
import datetime
import pytz
import r... |
import sys
import numpy
from argparse import ArgumentParser
from chainer import Chain, ChainList, Variable, cuda, functions, links, optimizer, optimizers, serializers
import util.generators as gens
from util.functions import trace, fill_batch
from util.vocabulary import Vocabulary
def parse_args():
def_gpu_device = ... |
# coding=utf-8
# Copyright 2022 The Uncertainty Baselines 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 ap... |
import os
import sys
from time import time as timer
import gym
import numpy as np
import numpy.random as rd
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data as data
"""
2019-07-01 Zen4Jia1Hao2, GitHub: Yonv1943
2019-08-01 soft_update
2019-10-10 spectral normalization (should... |
"""
Manage spectral and angular models for an energy band to calculate the likelihood, gradient
$Header: /nfs/slac/g/glast/ground/cvs/pointlike/python/uw/like2/bandlike.py,v 1.67 2018/01/28 21:27:58 kerrm Exp $
Author: T.Burnett <<EMAIL>> (based on pioneering work by M. Kerr)
"""
import sys, types
import numpy as ... |
from sympy import cos, Matrix, sin, symbols, pi, S, Function, zeros
from sympy.abc import x, y, z
from sympy.physics.mechanics import Vector, ReferenceFrame, dot, dynamicsymbols
from sympy.physics.mechanics import Dyadic, CoordinateSym, express
from sympy.physics.mechanics.essential import MechanicsLatexPrinter
from sy... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" BASE EXPYRIMENT CLASS.
providing additional functions and compatibility to expyriment
versions 0.7 and 0.9, used by all tasks in this battery of cognitive tasks for expyriment.
Documentation on how to develop your own experiments can be found here:
<https://mbroedl.gi... |
#!/usr/bin/env python
#
# iuwandbox.py
#
# Copyright (C) 2014-2018, <NAME>
# This software is released under the new BSD License,
# see LICENSE
#
import os
import sys
import re
import codecs
import argparse
from time import sleep
from argparse import ArgumentParser
from wandbox import Wandbox
from requests.exceptions... |
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
import uuid
import numpy as np
import tempfile
from io import BytesIO
from base64 import b64encode
from contextlib import contextmanager
import warnings
try:
from matplotlib.colors import ColorC... |
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################... |
#!/usr/bin/env python3
from reglib import *
from typing import Mapping
import leak_scan
peris :Mapping[str, peripheral] = {}
############ MDM
peris['mdm'] = Peripheral(peripheral('mdm', 0x44c00000, 0x4000))
Reg('txchan', 0x44c00824)
Field('txcbwmax', 0xfcffffff) # Channel bandwidth
Field('txnssmax', 0xffffff8f) # ... |
import numpy as np
import multiprocessing as mp
from multiprocessing import get_context
from numba import njit, prange
from hmmconf.conform import *
from hmmconf.base_utils import *
from hmmconf.numba_utils import *
from hmmconf.utils import *
import scipy
logger = make_logger(__file__)
__all__ = [
'compute_l... |
# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
import json
import logging
from collections import OrderedDict
from pprint import pformat
from braces.views._access import LoginRequiredMixin
from django.conf import settings
from django.contrib.auth import (
BACKEND_SESSION_KEY,
H... |
#!/usr/bin/env python
__author__ = "waroquiers"
import unittest
import numpy as np
from pymatgen.analysis.chemenv.coordination_environments.coordination_geometries import (
AllCoordinationGeometries,
CoordinationGeometry,
ExplicitPermutationsAlgorithm,
SeparationPlane,
)
from pymatgen.util.testing ... |
import json, struct
import numpy as np
from arkouda.client import generic_msg, verbose, maxTransferBytes, pdarrayIterThresh
from arkouda.dtypes import *
from arkouda.dtypes import structDtypeCodes, NUMBER_FORMAT_STRINGS
__all__ = ["pdarray", "info", "any", "all", "is_sorted", "sum", "prod", "min", "max",
"... |
#!/usr/bin/env python
#--- coding: utf-8 ---
"""
@package nvt
Runs a simulation to compute condensed phase properties (for example, the density
or the enthalpy of vaporization) and compute the derivative with respect
to changing the force field parameters. This script is a part of ForceBalance.
The algorithm used... |
# 조합하기
import random
from itertools import combinations, permutations, product
from utils.common import ANIMAL_NAMES, COLORS, OBJECTS, PEOPLE_NAMES
from utils.utils import get_answer, postprocessing
Q_EOMIS = ['입니까?', '인가요?', '인가?', '인지 구하시오.', '인지 구하세요.', '인지 구하여라.', '인지 쓰시오.',
'인지 알아보세요.', '인지 알아보시오.', '... |
import sys, os
import numpy as np
from keras.preprocessing.image import transform_matrix_offset_center, apply_transform, Iterator,random_channel_shift, flip_axis
from scipy.ndimage.interpolation import map_coordinates
from scipy.ndimage.filters import gaussian_filter
import cv2
import random
import pdb
from skimage.io ... |
# coding=utf-8
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import functools
import logging
import os
import re
from future.utils import PY3, text_t... |
from tkinter import *
from tkinter import ttk
from tkinter import filedialog
from tkinter import scrolledtext
from tkinter import messagebox
from PIL import ImageTk, Image
import requests
import pickle
import numpy as np
import base64
from io import BytesIO
import json
import matplotlib.pyplot as plt
import matplotlib
... |
#
# Copyright (C) 2019 Igalia S.L
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trad... |
"""
Mostly copied from wandb client code
Modified "next_sample" code to do the following:
-accepts a 'failure_cost' argument
-if failure cost 'c' is nonzero, modifies expected improvement of each
sample according to:
e' = p e / (p (1-c) + c)
where 'p' is probability of success and 'e' is unmodified expected improv... |
"""
=====
Cyton
=====
The OpenBCI Cyton PCBs were designed with Design Spark, a free PCB capture
program.
Cyton Board Specs:
* Power with 3-6V DC Battery ONLY
* PIC32MX250F128B Micrcontroller with chipKIT UDB32-MX2-DIP bootloader
* ADS1299 Analog Front End
* LIS3DH 3 axis Accelerometer
* RFduino BLE radio
* Micro S... |
from __future__ import absolute_import, division, print_function
import time as tim
from functools import partial
from multiprocessing import Pool
import numpy as np
from scipy.integrate import quad
from scipy.special import erf
def finite_line_source(
time, alpha, borehole1, borehole2, reaSource=True, imgS... |
# ######################## Over View ############################
#
# Classical Planning follow the following pattern:
#
# Problem -> Solver -> Plan
#
# Problem = <S, s_0, S_g, A(s), T(a,s) -> s', C(a,s) -> int>
# Solver = explores the problem state space, finding a plan from the initial state to goal
# Plan = The... |
"""
motifscan.cli.main
------------------
Main command line interface of MotifScan.
"""
import argparse
import os
import sys
from textwrap import dedent
from motifscan import __version__
from motifscan.cli import config, genome, motif, scan
from motifscan.config import user_rc_path
from motifscan.logging import setu... |
import argparse
import os
import random
import shutil
import time
import warnings
import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.distributed as dist
import torch.optim
import torch.multiprocessing as mp
import torch.utils.dat... |
import os
import numpy as np
import time
import pickle
class Cluster:
def __init__(self, a_s, a_u, u, s, a, alpha_r, e=None, m_k=None):
self.a_s = a_s
self.a_u = a_u
self.ns = np.size(s)
self.alpha = 1
self.alpha_r = alpha_r
self.S = s[np.newaxis, :]
sel... |
import torch
import pickle
import numpy as np
from models.graph_model import GraphPMU, GraphEncoder, GraphEncoderLocGlob, GraphPMULocalGlobal
from models.graph_model import GraphEncoderLocGlobAutoEncoder, EncGraphDisc
from models.discriminator import Discriminator
from models.AED.simpleAED import Encoder
import os
os... |
import numpy
import sys
def local_energy_generic(h1e, eri, G, ecore=0.0, Ghalf=None):
r"""Calculate local for generic two-body hamiltonian.
This uses the full form for the two-electron integrals.
For testing purposes only.
Parameters
----------
system : :class:`hubbard`
System inform... |
# -*- coding: utf-8 -*-
# Copyright (c) 2019 tecnovert
# Distributed under the MIT software license, see the accompanying
# file LICENSE.txt or http://www.opensource.org/licenses/mit-license.php.
import os
import json
import time
import struct
import traceback
import threading
import http.client
import urllib.parse
f... |
import scipy.optimize
import numpy as np
import pyautogui
import os, time
pyautogui.FAILSAFE = False
def write_dat_file(file_name, params):
file = open(file_name, "w")
file.write("& Version=4.20\n")
file.write("SI=yes\n")
file.write("\n")
file.write("\n")
file.write("\n")
file.write("\n"... |
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import logout, authenticate, login
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.contrib.staticfiles import finders
from django.core.mail import EmailMessage
... |
import logging
import geopandas as gpd
import numpy as np
import pandas as pd
from shapely.geometry import LineString
from delft3dfmpy.core import checks, geometry
from delft3dfmpy.datamodels.common import ExtendedDataFrame, ExtendedGeoDataFrame
logger = logging.getLogger(__name__)
roughness_gml = {
1: "Chezy",... |
# -*- coding: utf-8 -*-
import os
os.environ["MKL_NUM_THREADS"] = "1"
os.environ["NUMEXPR_NUM_THREADS"] = "1"
os.environ["OMP_NUM_THREADS"] = "1"
from os import path, listdir
import numpy as np
np.random.seed(1)
import random
random.seed(1)
import pandas as pd
import timeit
import cv2
from tqdm import tqdm
import sy... |
import torch
import torch.nn as nn
import torch.nn.parallel
from miscc.config import cfg
from torch.autograd import Variable
def conv3_1d(in_planes, out_planes, stride=1, padding=False):
"3 convolution without padding"
return nn.Conv1d(in_planes, out_planes, kernel_size=3, stride=stride,
p... |
# -*- coding: utf-8 -*-
"""
.. module:: grapĥ_stats
:platform: Unix
:synopsis: Preparing, computing stats and permutations
.. moduleauthor:: <NAME> <<EMAIL>>
"""
import numpy as np
import os
import itertools as iter
from nipype.interfaces.base import BaseInterface, \
BaseInterfaceInputSpec, traits, File,... |
import argparse
import sys
sys.path.insert(1, '../tsdate')
import tsdate
from tsdate.date import (SpansBySamples,
ConditionalCoalescentTimes, fill_prior, Likelihoods,
InOutAlgorithms, NodeGridValues, posterior_mean_var,
constrain_ages_topo,
... |
# Copyright 2021 <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/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softwa... |
# Leo colorizer control file for rebol mode.
# This file is in the public domain.
# Properties for rebol mode.
properties = {
"commentEnd": "}",
"commentStart": "comment {",
"indentCloseBrackets": "}])",
"indentOpenBrackets": "{[(",
"lineComment": ";",
"lineUpClosingBracket": "true",
... |
#! /usr/bin/env python3
"""
convert videos with ffmpeg
"""
# cSpell: word jolitp chdir ffmpeg libx movflags cmdline Popen
import os
import sys
from pathlib import Path
import csv
from collections import Counter
from typing import Tuple
import subprocess
from subprocess import *
import datetime
from natsort import nats... |
#!/usr/bin/env python
# MIT License
#
# Copyright (c) 2020 <NAME> / project contributors
#
# 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 t... |
##### Imports scenes from a gbsproj #####
import json
import copy
import logging
import os
import textwrap
import keyword
import re
import pprint
import itertools
from pathlib import Path
import collections.abc
from ..utilities import bcolors, translateScriptCommandNames
from rom_generator.meta import sc... |
""" Northwestern MSiA 490 Deep learning
Assignment #2 starter code, Spring 2018
This code demonstrates the use of transfer learning to speed up
the training process for a convolutional neural network.
Notes:
- Heatmaps may appear black in the first few epochs. Run to ~500 to get decent maps.
... |
"""Main entry points for scripts."""
from __future__ import print_function, division
from argparse import ArgumentParser
from collections import OrderedDict
from copy import copy
from datetime import datetime
import glob
import json
import logging
import math
import os
import scipy.stats
import numpy as np
from .ve... |
"""
Module containing the graph logic for the dependency resolver.
Upon application initialization a dependency graph of all project wide
computed fields is created. The graph does a basic cycle check and
removes redundant dependencies. Finally the dependencies are translated
to the resolver map to be used later by ``... |
import re
from django import forms
from django.forms import (
ModelForm,
TextInput,
Select,
Textarea,
NumberInput
)
from decimal import Decimal
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.contrib.auth.password_validation import valid... |
from pbpy.pbtools import error_state
import os.path
import os
import sys
import argparse
import webbrowser
import threading
import multiprocessing
import time
from pathlib import Path
from pbpy import pblog
from pbpy import pbgh
from pbpy import pbtools
from pbpy import pbunreal
from pbpy import pbgit
from pbpy impor... |
# 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, ... |
#_*_coding:utf-8_*_
__author__ = 'jieli'
import datetime
import re
from django import template
from kingadmin.admin_base import site
from django.utils.safestring import mark_safe
from django.urls import reverse as url_reverse
register = template.Library()
@register.simple_tag
def query_set(table_related_field,que... |
# This file is part of the MapProxy project.
# 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... |
#!/usr/bin/env python3
import sys
import os
import subprocess as sub
import re
import xml.etree.ElementTree as ET
import time
import dxpy
import argparse
import json
# Uploads an Illumina run directory (HiSeq 2500, HiSeq X, NextSeq)
# If for use with a MiSeq, users MUST change the config files to include and NOT spe... |
import logging
from collections import OrderedDict
import numpy as np
import matplotlib.pyplot as plt
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.parallel import DataParallel, DistributedDataParallel
import models.networks as networks
import models.lr_scheduler as lr_sch... |
# run Bayesian ensembles on UCI benchmarks
import numpy as np
from numpy import linalg as LA
import torch
from tqdm import tqdm
from tqdm import trange
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.autograd import grad
from torch.autograd import Variable
import pickle
im... |
import logging
from bz2 import BZ2File
from concurrent.futures import ThreadPoolExecutor, as_completed
from typing import Union, Optional, Tuple, List
from collections import deque
from sqlalchemy.sql import exists
import flask
from esipy import EsiClient
from yaml.events import MappingStartEvent, ScalarEvent, MappingE... |
"""
WDL expressions composing literal values, arithmetic, comparison, conditionals,
string interpolation, arrays & maps, and function applications. These appear on
the right-hand side of value declarations and in task command substitutions,
task runtime sections, and workflow scatter and conditional sections.
The abst... |
from enum import Enum
from typing import List, Union
from datetime import datetime, timedelta
from flumine.controls.clientcontrols import MaxTransactionCount
from flumine import BaseStrategy
from flumine.markets.market import Market
from flumine.order.order import BetfairOrder, OrderStatus
from flumine.order.ordertype... |
'''
Loss building blocks.
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import math
from absl import flags
import numpy as np
import pdb
import itertools
from ..utils import suncg_parse
# from ..utils import quatUtils
# -------------- flags -------------#
# ... |
#!/usr/bin/env python
r"""
Show numerical precision of $2 J_1(x)/x$.
"""
from __future__ import division, print_function
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import numpy as np
from numpy import pi, inf
import scipy.special
try:
from mpmath import... |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, print_function, unicode_literals
from __future__ import absolute_import
from pymatgen.analysis.elasticity.tensors import Tensor, \
voigt_map as vmap, TensorCollection
f... |
from .. import maps
from .. import container
import random
import pygame
import math
from .. import animobs
from .. import context
class RoomError( Exception ):
"""Something went wrong during room construction."""
pass
# *****************
# *** ROOMS ***
# *****************
class Room( object ):
... |
from wasm.modtypes import (TypeSection,
ImportSection,
FunctionSection,
TableSection,
MemorySection,
GlobalSection,
ExportSection,
... |
import argparse
import ConfigParser
import cPickle
import csv
import mysql.connector
import time
import sys, os, re
from context import diana
import diana.classes.drug as diana_drug
def main():
options = parse_user_arguments()
design_experiment_dcdb(options)
def parse_user_arguments(*args, **kwds):
"""... |
""" Import data from Discodata
https://discodata.eea.europa.eu/
WISE_ShippingsPorts_Measures - latest
"""
#!/usr/bin/env python3
import json
import requests
import tqdm
from elasticsearch import Elasticsearch
from elasticsearch.helpers import streaming_bulk
OM = 'Origin of the measure'
sql_views = {
# d... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu May 5 10:42:50 2022
@author: lukepinkel
"""
import numpy as np
from .special_mats import lmat, nmat
from .numerical_derivs import jac_approx
from .dchol import dchol, unit_matrices
def _hess_chain_rule(d2z_dy2, dy_dx, dz_dy, d2y_dx2):
H1 = np.... |
# -*- coding: utf-8 -*-
from __future__ import (division, print_function, absolute_import,
unicode_literals)
"""
Small collection of robust statistical estimators based on functions from
<NAME> (Hughes STX) statistics library (called ROBLIB) that have
been incorporated into the AstroIDL User's... |
# separate two models, train g^t first, then train K and L
from __future__ import print_function
import argparse
import torch
from torch import nn, optim, sigmoid, tanh, relu
from torch.autograd import Variable
from torch.nn import functional as F
from torchvision.utils import save_image
from torch.utils.data import D... |
"""
Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the Apache License Version 2.0.You may not use
this file except in compliance with the License.
This program is distributed in the hope that it will be ... |
from discord.ext import commands
from discord import Embed, colour, File
from pyrez.exceptions import NotFound, MatchException
from PIL import Image, ImageFont, ImageDraw, ImageOps
from io import BytesIO
import my_utils as helper
class MatchCog(commands.Cog, name="Match Command"):
"""Match Cog"""
def __ini... |
#
# ForteBio Analysis Module Example
# PyVuka Modules are native python code. They can import PyVuka as a module to run native
# PyVuka commands(import ModuleLink.toPyVuka as pyvuka) or access the PyVuka data directly
# (import data_obj as data).
#--------------------------------------------... |
# -*- coding: utf-8 -*-
"""Tests for `mq_channels`."""
import os
import sys
import unittest
import time
import datetime
from modules.mq_channels import (
get_channels,
extract_channel_name,
get_template,
get_channel_status,
format_channel_output,
make_metric_for_mq_channels_status,
get_mq_ch... |
import datetime
import json
import re
import requests
from django.conf import settings
from django.contrib.auth import get_user_model, login, logout
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.core.urlresolvers import reverse_lazy, reverse
from django.http ... |
"""
Module containing data types to enable an automatic usage of
different other modules in the Python package.
"""
import warnings
import logging
from typing import Union, Callable
from copy import deepcopy
import pandas as pd
import numpy as np
from ebcpy import TimeSeriesData
from ebcpy.utils.statistics_analyzer imp... |
import numpy as np
import pandas as pd
from .outflow import one_phase_pressure_profile, two_phase_pressure_profile, two_phase_outflow_curve, two_phase_upward_pressure
from .als import Als
from .inflow import OilInflow
from ...pvtpy.black_oil import Pvt,Oil,Gas,Water
def nozzle_flow(
an:float,
pn:float,
... |
import nltk as nl
import numpy as np
import string
import collections
import os
import random
import re
import pickle
try:
# Python 3
from itertools import zip_longest
except ImportError:
# Python 2
from itertools import izip_longest as zip_longest
# GENERIC UTILS
def save_data(data, file):
with... |
# Part of the code is from https://github.com/tensorflow/models/blob/master/research/object_detection/metrics/oid_challenge_evaluation.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
# The original code is under Apache License, Version 2.0 (the "License");
# Part of the code is from https://github.c... |
import sys
import os
import json
import matplotlib.pyplot as plt
import numpy as np
from collections import defaultdict
stats = defaultdict(lambda: defaultdict(dict))
stats2 = defaultdict(lambda: defaultdict(dict))
gpu_map = {
"p2.xlarge" : "gpus-1",
"p2.8xlarge" : "gpus-8",
"p2.16xlarge-io1"... |
import typing
from pathlib import Path
import numpy as np
import scipy.fftpack
from scipy import signal
import einops
import functools
import torch
import paderbox as pb
import padertorch as pt
import padercontrib as pc
from padertorch.contrib.cb.transform import stft as pt_stft, istft as pt_istft
from padertorch.c... |
# Standard imports
import argparse
import asyncio
import json
import os
import socket
import statistics as stats
import sys
import traceback
from datetime import datetime
from difflib import get_close_matches
from random import choice, randint
from sys import stderr
from time import time
import pytz
import requests
i... |
# -*- coding: utf-8 -*-
"""
Python Slack Bot class for use with the pythOnBoarding app
Original code structure Courtesy <NAME>
https://github.com/slackapi/Slack-Python-Onboarding-Tutorial/blob/master/LICENSE
"""
import os
import message
import re
import subprocess
import docker_parser
from circleclient import circlecl... |
# import
import os
import random
import numpy as np
from tqdm import tqdm
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.utils.tensorboard import SummaryWriter
from torch.optim.lr_scheduler import ReduceLROnPlateau
device = torch.device("cuda:0" if torch.cuda... |
import copy
import logging
import sys
from typing import Callable
import numpy as np
import torch
from pandas.api.types import is_numeric_dtype
from scipy.interpolate import interp1d
from torchinterp1d import Interp1d
# Some useful functions
# Set double precision by default
torch.set_default_tensor_type(torch.Doubl... |
"""
NetSQL is a network query tool which helps to collect and filter data about your network.
Requires access to network devices, but also can process raw command output.
"""
from __future__ import print_function, unicode_literals
import json
import re
import csv
import getpass
import ipaddress
import argparse
import ... |
#!/usr/bin/env python
from __future__ import print_function
import math
import numpy
import matplotlib
matplotlib.use("PDF")
fig_size = [8.3,11.7] # din A4
params = {'backend': 'pdf',
'axes.labelsize': 10,
'text.fontsize': 10,
'legend.fontsize': 10,
'xtick.labelsize': 8,
'yti... |
from collections import defaultdict
from enum import Enum
from typing import Union
from typing import Iterator, Set
from typing import Optional
from typing import Sequence
from typing import List
class HostState(Enum):
""" Batsim Host State Types """
UNAVAILABLE = 0
SLEEPING = 1
SWITCHING_OFF = 2
... |
r"""Python interactive completion using GNU readline 2.1.
$Id: rlcompleter2.py,v 1.1 2003/01/29 17:20:35 hpk Exp $
licensed under the Python Softare License
(c) 2003-2010 <NAME>, hpk at codespeak net
how the interactive completer works
-------------------------------------
The Completer works... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import json
from collections import defaultdict
from typing import Any, Callable, Dict
import attr
import magnum as mn
... |
import pandas as pd
import numpy as np
np.random.seed(99)
from sklearn.model_selection import train_test_split
from sklearn.model_selection import KFold
from sklearn.model_selection import GridSearchCV
from sklearn.multioutput import MultiOutputClassifier, MultiOutputRegressor
from sklearn.multiclass import OneVsRestCl... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 20 11:09:03 2020
@author: <NAME>
"""
import sys, os
import numpy as np
from math import ceil
import xarray as xr
import multiprocessing as mpi
import time
from joblib import Parallel, delayed
from tqdm import tqdm
import scipy.stats as st
from scipy... |
# Copyright 2020 Turbonomic, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
#!/usr/bin/python3
#
# MIT License
#
# Copyright (c) 2017 heckie75
#
# 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, cop... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import importlib
import json
import logging
import os
import re
import collections
import copy
import shutil
import datetime
import time
import uuid
import imp
import sys
from oic.oauth2.message import REQUIRED_LIST_OF_SP_SEP_STRINGS
from oic.oauth2.message import OPTIONAL... |
import os
import copy
import pickle
import argparse
import numpy as np
import pandas as pd
from pprint import pprint
from datetime import datetime
import newLoadData
import newLoadModel
import multiprocessing as mp
import time
# from debug import ipsh
try:
import generateSATExplanations
except:
print('[ENV WAR... |
from flask_restplus import Resource, fields, Namespace
from datetime import date
from bl.allocation.stock.StockBl import StockBl
from decorator.RoleRequest import login_require
from factory.BlFactory import globalAllocationBl
from factory.DaoFactory import investDao, profitDao, userDao, stockDao, goodsDao, bondsDao
fr... |
#!/usr/bin/python3
###############################################################################
#
# usage: securityscan.py [-h] --arch ARCH --config CONFIG --policy POLICY --output OUTPUT [--kernel] [--dmesg]
# [--proc] [--exec] [--vuln] [--cert] [--sys]
#
# optional arguments:
# -h, --help ... |
"""
test_studio_detector_2.py : Test live streaming with Qt. Send copies of the streams to machine vision process. There is a single machine vision process for all streams.
Copyright 2017 - 2019 <NAME>
Authors: <NAME>
This file is part of the Valkka Python3 examples library
Valkka Python3 examples library is free... |
""".. Line to protect from pydocstyle D205, D400.
Segmentation
------------
Parse genome annotation, segment it and prepare a number of annotations.
These annotations are used for mapping and for various analyses:
- regions of genes (all isoforms and other parts merged into one region)
- regions of individual regio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.