text stringlengths 6.04k 39.5k |
|---|
#!/usr/bin/env python3
#----------------------------------------------------------------------------
# Copyright (c) 2020 Playing With Fusion. See license.txt for more info.
#
# This is a sample python program for configuring and using the NoIR Camera
# with the WPILibPi Raspberry Pi Image and Playing With Fusion's inf... |
# Vesion 1.0
# run with "python Acimdes_Client.py"
# for logging run with "python Acimdes_Client.py > log.txt"
# Copyright 2020 <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
# ht... |
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import tensorflow as tf
import tensorflow_addons as tfa
import skopt as sk
from sklearn.model_selection import train_test_split
from tensorflow.keras import initializers
from tensorflow.keras.layers import Dense, Dropout
from tensorflow.keras.models... |
import time
import os
from typing import List
import ai_flow as af
from ai_flow_plugins.job_plugins import python, flink
from pyflink.table import Table
from tf_main import train
from notification_service.client import NotificationClient
from notification_service.base_notification import BaseEvent
from ai_flow.model_c... |
# -*- coding: utf-8 -*-
"""
Created on 28 Aug 2019 17:15:59
@author: jiahuei
"""
from link_dirs import pjoin
import os
import json
import pickle
import random
import textwrap
import matplotlib.pyplot as plt
import matplotlib.font_manager as fmng
from PIL import Image, ImageEnhance, ImageOps, ImageFont, ImageDraw
# Va... |
"""
Copyright (c) 2022 ZOOMi Technologies Inc.
all rights reserved.
This source code is licensed under the license found in the
LICENSE file in the root directory of this source tree.
maintainers : <EMAIL>, <EMAIL>
This file contain image to video converter.
"""
import os
import cv2
from PIL import Image
import ... |
# !/usr/bin/env python3
# -*-coding:utf-8-*-
# @file: basic.py
# @brief:
# @author: <NAME>, <EMAIL>, <EMAIL>
# @version: 0.0.1
# @creation date: 12-12-2019
# @last modified: Thu 02 Apr 2020 04:47:10 PM EDT
# > see: the code is adapoted from https://github.com/zyf12389/GC-Net/blob/master/gc_net.py
import torch
from tor... |
"""Convenience methods for data visualization
- matplotlib, seaborn, statsmodels, pandas
Author: <NAME>
License: MIT
"""
import numpy as np
import scipy
import pandas as pd
from pandas import DataFrame, Series
import wget
import os
import re
import time
import requests
import calendar
from datetime import datetime
fr... |
import os
import time
import torch
import logging
import numpy as np
import pandas as pd
from typing import List, Optional
from torch import nn
from torch.utils.data import DataLoader
from collections import defaultdict
from sklearn.metrics import accuracy_score, f1_score, recall_score, precision_score
from deeplogliz... |
# ============================================================================
# 输入格式为已经过提取的光流或rgb的.npy文件
# i3d网络,rgb和光流分别计算,再进行模型融合
# 预加载模型为imagenet_pretrained和rgb_imagenet,
# 未添加数据增强
# ============================================================================
# -*- coding: utf-8 -*-
"""Loads a sample video and clas... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# python 3.3.2+ Hammer Dos Script v.1
# by <NAME>
# only for legal purpose
from queue import Queue
from optparse import OptionParser
import time,sys,socket,threading,logging,urllib.request,random
def user_agent():
global uagent
uagent=[]
uagent.append("Mo... |
import numpy as np
from copy import deepcopy
class ActionValueNetwork:
def __init__(self, network_config):
self.state_dim = network_config.get("state_dim")
self.num_hidden_units = network_config.get("num_hidden_units")
self.num_actions = network_config.get("num_actions")
... |
from keras.models import Model
from keras.layers.convolutional import ZeroPadding2D
from keras.layers import Input, concatenate, Conv2D, MaxPooling2D, Conv2DTranspose
from keras.utils.vis_utils import plot_model
def keras_model(x_train, save_model=True):
inputs = Input(x_train.shape[1:]) # Input(shape), return a... |
from phi.experimental import *
import collections
import random
import math as pymath
class State:
def __init__(self, frame, density, velocity):
self.frame = frame
if isinstance(density, tf.Tensor):
self.density = density
else:
self.density = tf.constant(density)
... |
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
def subplot_to_grid( fig , shape, loc, rowspan=1, colspan=1 ):
""" A mirror function of matplotlib.pyplot.subplot2grid that doesn't try to import tkinter """
gridspec = GridSpec( shape[0], shape[1]... |
#
# Copyright (c) Microsoft Corporation.
#
from .model_mgr import unflatten_unit, ModelEval, DataModel
import numpy as np
import math
from .itp import itp_pred, bound, LayerPredicate
from .itp import BoundPredicate, And
import time
import random
from typing import Tuple, List, Optional, Callable
#
# Code for computin... |
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import cchardet
import re
import argparse
import os
COLOR = {
'aliceblue': '#F0F8FF',
'antiquewhite': '#FAEBD7',
'aqua': '#00FFFF',
'aquamarine': '#7FFFD4',
'azure': '#F0FFFF',
'beige': '#F5F5DC',
'bisque': '#FFE4C4',
'black': '#000000',
... |
#!/usr/bin/env python3
from datetime import timedelta, datetime
from os import error
from time import sleep
from requests import get, post
import re
import json
######### META DATA #################
# For data collection organizational purposes
USER_ID = 'Jasrags#1992' # e.g. Discord handle
PRINTER_MODEL = ... |
import binascii
import json
import zlib
from struct import pack
import six
import yaml
try:
from collections.abc import Mapping # Python 3
except ImportError:
from collections import Mapping # Python 2, will be deprecated in Python 3.8
from .backends import get_random_bytes
from .constants import ALGORITHM... |
import pdf_wrapper as pdfw
'''
This functions are used to dynamically create the report based
on the results of the attacks performed by MQTTSA.
'''
# Authorization mechanism section
def authorization_report(pdfw, no_authentication, broker_info, auth_anyway, interface):
pdfw.add_paragraph("Authentication")
#... |
import cgi
import os
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp.util import login_required
from google.appengine.ext import db
from google.appengine.ext.webapp import template
import normal
imp... |
# Copyright (C) 2013 Sony Mobile Communications AB.
# All rights, including trade secret rights, reserved.
import os
import json
import errno
import signal
import traceback
from ave.network.connection import *
from ave.network.control import Control
from ave.network.exceptions import *
from ave.broker.session ... |
# Imports
from gurobipy import *
from itertools import chain, combinations
import time
import math
start_time = time.time()
# Utility functions
def powerset(V):
return chain.from_iterable(combinations(V, r) for r in range(len(V)+1))
def euc_dist(p1, p2):
return math.sqrt((p2[0] - p1[0]) **... |
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 30 15:55:44 2021
@author: hsauro
"""
from uModel import TModel_
from uModel import TModel
from uModel import TReaction
from numba import jit
import tellurium as te
import roadrunner
import modTeUtils as tu
import numpy as np
import random
import matpl... |
import unittest
import numpy as np
import tensorflow as tf
import tensorflow.keras.backend as K
from tensorflow import keras
from tensorflow.keras import Model, Input
from tensorflow.keras.layers import Add
from tensorflow.keras.layers import ReLU, concatenate
from tensorflow.keras.layers import TimeDistributed, Dense... |
import os
from typing import Union as Fixture
import pytest
from bitproto._ast import (Alias, Array, Bool, BooleanConstant, Constant, Enum,
Int, IntegerConstant, Message, MessageField, Option,
Proto, StringConstant)
from bitproto.errors import GrammarError
from bit... |
"""
Adapted from:
https://github.com/dl4sits/BreizhCrops
Original implementation of BreizhCrops dataset:
https://github.com/dl4sits/BreizhCrops/blob/master/breizhcrops/datasets/breizhcrops.py
"""
import logging
import os
import tarfile
import urllib
import zipfile
import h5py
... |
#!/usr/bin/env python
#
# (C) Copyright 2012- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its stat... |
from __future__ import unicode_literals
import pytest
try:
from unittest import mock
except ImportError:
import mock
from eth_utils import (
to_dict,
encode_hex,
decode_hex,
)
from eth_tester.exceptions import (
ValidationError,
)
from eth_tester.validation import DefaultValidator
@pytest.... |
from __future__ import annotations
import discord
from discord import Embed, HTTPException, Forbidden, NotFound, Client, Message
from ....cfg import bbData, cfg
from .... import lib
from .. import criminal
from ....botState import logger
import asyncio
from .. import bounty
from typing import Dict, Union, List
from ...... |
"""Noise map generators are provided by this module.
The :any:`Noise.sample_mgrid` and :any:`Noise.sample_ogrid` methods perform
much better than multiple calls to :any:`Noise.get_point`.
Example::
>>> import numpy as np
>>> import tcod
>>> noise = tcod.noise.Noise(
... dimensions=2,
... ... |
"""Defines various containers for AMPAL objects."""
from collections import Counter
import itertools
from ampal.base_ampal import BaseAmpal, Polymer, find_atoms_within_distance
from ampal.ligands import LigandGroup, Ligand
from ampal.analyse_protein import (
sequence_molecular_weight, sequence_molar_extinction_28... |
import threading
import queue as stdlib_queue
from itertools import count
import attr
import outcome
import trio
from ._sync import CapacityLimiter
from ._core import enable_ki_protection, disable_ki_protection, RunVar
__all__ = [
"run_sync_in_worker_thread",
"current_default_worker_thread_limiter",
"Bl... |
# Copyright (c) 2020 Boston Dynamics, Inc. All rights reserved.
#
# Downloading, reproducing, distributing or otherwise using the SDK Software
# is subject to the terms and conditions of the Boston Dynamics Software
# Development Kit License (20191101-BDSDK-SL).
"""Simple robot command capture tutorial."""
import sy... |
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import getdate, add_months, add_days, flt, today, get_first_day, get_last_day, date_diff, rounded
from erpnext.accounts.utils import get_fiscal_year, get_account_currency
from erpnext.accounts.general_ledger import make_gl_entr... |
import os
import argparse
import time
import itertools
import torch
from torch.autograd import Variable
import numpy as np
from utils import DataLoader
from helper import get_mean_error, get_final_error
from helper import *
from grid import getSequenceGridMask
class parameters():
def __init__(self, args):
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import time
import pandas as pd
import numpy as np
import os
__docformat__ = 'restructedtext en'
def exe_time(func):
def new_func(*args, **args2):
t0 = time.time()
print("-- @%s, {%s} start" % (time.strftime("%X",... |
"""
hspfbintoolbox to read HSPF binary files.
"""
from __future__ import print_function
import datetime
import warnings
import os
import sys
import struct
import mando
from mando.rst_text_formatter import RSTHelpFormatter
import pandas as pd
from tstoolbox import tsutils
code2intervalmap = {5: "yearly", 4: "month... |
import numpy as np
import torch
import torch.utils.data as data
import torchbiomed.utils as utils
from glob import glob
import os
import os.path
import SimpleITK as sitk
import pandas as pd
MIN_BOUND = -1000
MAX_BOUND = 400
image_dict = {}
label_dict = {}
mask_dict = {}
stats_dict = {}
test_split = []
train_split = ... |
from __future__ import annotations
import asyncio
import async_timeout
import logging
import json
import time
import queue
from datetime import datetime, timezone
from collections.abc import Callable
from .const import (
COMMAND,
CONFIG,
PING,
PONG,
DOOR_STATUS,
CMD_OPEN,
CMD_OPEN_AND_HOL... |
from copy import copy, deepcopy
from ordered_set import OrderedSet
import os
import pickle
from typing import Any, Dict, Iterable, List, Optional, Sequence, Set, Union
import warnings
import symro.src.mat as mat
from symro.src.scripting.specialcommand import SpecialCommand
import symro.src.scripting.script as scr
impo... |
#===============================================================================
# Imports
#===============================================================================
import os
import sys
from evn.event import (
Event,
EventType,
)
#========================================================================... |
#/usr/bin/env python
"""
globifest/ManifestParser.py - globifest
This script processes package descriptor files and generates output for plugging into another
build system.
Copyright 2018, <NAME>, Garmin Ltd, or its subsidiaries.
All rights reserved.
Redistribution and use in source and binar... |
from typing import Optional, Union, List, Dict, Tuple, Iterable, Any, Callable
from typing import Sequence, Set, cast
import warnings
from functools import partial
from pathlib import Path
import srsly
from .pipe import Pipe
from ..training import Example
from ..language import Language
from ..errors import Errors, Wa... |
# -*- coding: utf-8 -*-
import json
import os
import pickle
import random
import numpy as np
import torch
from sklearn import metrics
from sklearn.metrics import precision_recall_fscore_support, accuracy_score
from torch.utils.data import DataLoader, SequentialSampler, TensorDataset
from tqdm import tqdm
import con... |
import numpy as np
import pickle
import theano
import time
import constants as c
import scipy.constants as sc
import scipy.interpolate as spi
import eigen
import starry
import progressbar
import theano
import theano.tensor as tt
import mc3.stats as ms
from numba import njit
def initsystem(fit, ydeg):
'''
Uses ... |
from typing import List, Any, Iterable
import random
import numpy as np
import torch
import torch.nn.functional as F
from sequence_models.utils import Tokenizer
from sequence_models.constants import PAD, GAP, START, STOP, MASK
from sequence_models.constants import ALL_AAS
from sequence_models.gnn import get_node_feat... |
from __future__ import print_function
import logging
import time
from tornado.gen import coroutine, sleep, Return
from tornado.ioloop import IOLoop
from katcp import KATCPClientResource
from mpikat.effelsberg.edd.EDDDataStore import EDDDataStore
known_packetizers = {"faraday_room":{"ip":"172.16.58.3","port":7147}, "f... |
from inject_attack import read_dataset, dump_injected_dataset
import argparse
import random
import copy
from collections import Counter
import operator
# https://elixir.bootlin.com/linux/latest/source/net/netfilter/nf_conntrack_proto_tcp.c
nf_conntrack_states = [
"SYN_SENT",
"SYN_RECV",
"ESTABLISHED",
... |
from decimal import Decimal
from operator import eq, ne, lt, le, gt, ge
import pytest
from moneypy.exceptions import IncompatibleCurrencyError
from moneypy.money import Money
# =================================== TEST CONVERTERS ====================================
@pytest.mark.parametrize('amount, expected', [
... |
import functools
import pickle
import random
from baselines.common.vec_env import VecEnvWrapper
import gym
import numpy as np
import os.path as osp
import tensorflow as tf
from rllab.envs.base import Env, EnvSpec
import rllab.misc.logger as rl_logger
from sandbox.rocky.tf.envs.base import TfEnv, to_tf_space
from rlla... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
---------------------------------------------... |
import os
from io import BytesIO
from typing import Any, Callable, List, Mapping, Optional, Tuple
import aiofiles
import aiohttp
import matplotlib.image as plt
import numpy as np
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
from PIL import ImageOps
from PIL import ImageSequence
from discor... |
# -*- coding: utf-8 -*-
'''
CRISPResso2 - <NAME> and <NAME> 2018
Software pipeline for the analysis of genome editing outcomes from deep sequencing data
(c) 2018 The General Hospital Corporation. All Rights Reserved.
'''
import os
from copy import deepcopy
import sys
import argparse
import re
import traceback
import j... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# TODO
# answers setter in question, like question setter in Exam
# Question attribute type_of_question
# open_ended, yes_no, multi_choice
# based on number of alternative answers provided
from pathlib import Path
from typing import Tuple, List, Optional, Iterator, Itera... |
"""Preprocessing functions.
Authors: <NAME> <<EMAIL>>
<NAME> <<EMAIL>>
"""
def preprocess_fif(fif_file, l_freq=None, h_freq=None, down_sfreq=None):
"""Filter and downsample data."""
import os
from mne.io import read_raw_fif
from mne import pick_types
from nipype.utils.filemanip import sp... |
#/usr/bin/env python
"""
globifest/globitest/testDefTree.py - Tests for DefTree module
Copyright 2018, <NAME>, Garmin Ltd, or its subsidiaries.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__appname__ = "Midnite"
__author__ = "<NAME> <<EMAIL>>"
__version__ = "0.2.1"
__license__ = "Apache2"
from copy import deepcopy
import sys
import pymodbus.exceptions
from collections import OrderedDict
from pymodbus.client.sync import ModbusTcpClient as ModbusClient
from... |
# -*- coding: utf-8 -*-
import logging
import numpy
import itertools
from interact import __module__
from interact.core.helpers import set_contact_type
from interact.core.geometry import plane_fit, distance, angle, projection, vector_angle
from interact.interactions.utils import is_pication
logger = logging.getLogge... |
import time
import cv2
import numpy as np
from keras.layers import *
from tensorflow.contrib.distributions import Beta
import tensorflow as tf
from keras.optimizers import Adam
from keras import backend as K
from lib.training_data import TrainingDataGenerator, stack_images
class GANTrainingDataGenerator(TrainingData... |
#!/usr/bin/env python
'''Check that index.html is valid and print out warnings and errors
when the header is malformed.
Checks for:
1. There should be the right number of categories
2. Categories are allowed to appear only once
3. Contact email should be valid (letters + @ + letters + . + letters)
4. Latitute/lon... |
import string
import random
import json
import time
replaceterm = [["[protocolo]", 0], ["[adesivo]", 0], ["[cpf]", 0], ["[atendente]", 1],
["[inicio_hora_att]", 0], ["[fim_hora_att]", 0], ["[sobrenome]", 0],
["[valor_monetario]", 0], ["[valor]", 0], ["[estado_civil]", 0],
[... |
"""
Module for performing color math. Heavily based on colorspacious, viscm and ethplot.
The main model of perceptual distance is the "CAM02-UCS" color-space
(Uniform Colour Space version of the CIECAM02).
This module uses Cartesian Lab and CIECAM02 color spaces and cylindrical
CIELCh (hereafter LCh) and CIEJCh (herea... |
#!/usr/bin/env python
from optparse import OptionParser
import json
import os
import pdb
import random
import sys
from intervaltree import IntervalTree
import networkx as nx
import numpy as np
import pysam
import pandas as pd
import tensorflow as tf
from basenji.dna_io import dna_1hot
import gff
"""
basenji_data_gen... |
#!/usr/bin/env python
from __future__ import print_function
import os
import sys
import time
import traceback
from github import GithubException, GithubObject
from issue_finder import CommitFinder, IssueFinder
from mantisdump import MantisDump, MantisSchema
# Python3 redefined 'unicode' to be 'str'
if sys.version_i... |
# Larger CNN for the MNIST Dataset
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import Dropout
from tensorflow.keras.layers import Flatten
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Input
... |
# Copyright (c) 2019 Cloudify Platform Ltd. 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 ap... |
# -*- coding: utf-8 -*-
"""primersearch.py
Code to conduct primer crosshybridisation tests with primersearch
(c) The James Hutton Institute 2016-2019
Author: <NAME>
Contact: <EMAIL>
<NAME>,
Information and Computing Sciences,
James Hutton Institute,
Errol Road,
Invergowrie,
Dundee,
DD2 5DA,
Scotland,
UK
The MIT Li... |
from __future__ import division
from __future__ import print_function
import glob
import struct
import time
import serial
import numpy as np
from datetime import datetime
import os
from matplotlib import animation
import matplotlib.pyplot as plt
import multiprocessing
# // define all functions ///////////////////////... |
import tensorflow as tf
import cv2
import time
import argparse
import csv
import posenet
import numpy as np
# -*- coding:utf-8 -*-
# ここからテトリス
import tkinter as tk
import random
# 定数
BLOCK_SIZE = 25 # ブロックの縦横サイズpx
FIELD_WIDTH = 10 # フィールドの幅
FIELD_HEIGHT = 25 # フィールドの高さ
MOVE_LEFT = 0 # 左にブロックを移動することを示す定数
MOVE_RIG... |
#!/usr/bin/env python3
import sys
import argparse
import struct
from lark import Lark, Transformer, Visitor, Tree, Token, v_args
from lark.visitors import Transformer_InPlace, Interpreter, visit_children_decor
prog_argp = argparse.ArgumentParser(description='Icarium assembler')
prog_argp.add_argument('input',
nar... |
import os
import cv2
import numpy as np
import os
import shutil
import time
import random
import math
import functools
def _find_minrect(img, image_name, output_dir=None, debug_type=0, thresh_x = 120, morphology = False, channel='all', overlapthresh=.3):
# param@debug_type:0,not debug; 1,store bbox file; 2,store m... |
# Copyright 2019 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: Elie
"""
# Libraries
import datetime
import numpy as np
import pandas as pd
#plotting
import matplotlib as mpl
from matplotlib import pyplot as plt
import seaborn as sns
import os
#sklearn
from sklearn.metrics import auc, roc_curve
from sklearn.model_selection import (GridSearchCV,... |
from numpy import random, mean
#note: Project completed with the use of lecture notes, notes from TA discussion section,
#and work on past assignements
#note: The provided code shows +2 results over number of itterations shown,
# and if I run world.run() without running the rest of the code the output in incorrect... |
from math import pi
import cmath
import numpy as np
from .util import isstr
from .invert import SurroundVariation, remesh
from .sld_profile import SLDProfile, refr_idx
"""
References:
[Majkrzak2003] <NAME>, <NAME>: Physica B 336 (2003) 27-38
Phase sensitive reflectometry and the unambiguous determi... |
from enum import Enum, auto
from operator import attrgetter
import networkx as nx
import pendulum
import uuid
from django.apps import apps
from django.core.exceptions import FieldDoesNotExist
from django.db.models import DateTimeField
from share.exceptions import ShareException
from share.util import TopologicalSort... |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015 Red Hat
# Licensed under The MIT License (MIT)
# http://opensource.org/licenses/MIT
#
import os
import json
import kobo
import productmd
from productmd.rpms import Rpms
from django.db import transaction, connection
from django.db.models import Q
from rest_framework impo... |
"""
Neural State Space Models - N-step ahead System ID
"""
import numpy as np
import matplotlib.pyplot as plt
import torch
import torch.nn.functional as F
from torch import nn
import mlflow
import argparse
from scipy.io import loadmat
from copy import deepcopy
def parse_args():
parser = argparse.ArgumentParser(... |
import os
# os.environ["OMP_NUM_THREADS"] = "16"
import logging
logging.basicConfig(filename=snakemake.log[0], level=logging.INFO)
import pandas as pd
import numpy as np
# seak imports
from seak.data_loaders import intersect_ids, EnsemblVEPLoader, VariantLoaderSnpReader, CovariatesLoaderCSV
from seak.scoretest impo... |
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from protonets.models import register_model
from . import wasserstein
from protonets.models.vgg import VGGS
from .utils import euclidean_dist
class Flatten(nn.Module):
def __init__(self):
... |
import platform
import re
import sys
import traceback
from .DataGridder import DataGridder
from . import ClassifyUtils
from . import ClassifyMethod
from .ClassifyMethod import ClassifyMethodError
qgis_qhull_fails=platform.platform().startswith('Linux')
from qgis.core import (
QgsExpression,
QgsExpressionCont... |
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from scipy.stats import norm
import tensorflow.contrib.slim as slim
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data") # , one_hot=True)
tf.reset_default_graph()
# the model of... |
#! usr/bin/python
from __future__ import print_function, division, absolute_import
from os import remove
from os.path import join, abspath
from sys import stdout, exit
from time import time
import multiprocessing as mp
from argparse import ArgumentParser
import logging
import numpy as np
from disvis import DisVis, PD... |
#!/usr/bin/python
# Copyright (c) 2012 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.
"""Unittests for build stages."""
import glob
import mox
import optparse
import os
import sys
import constants
sys.path.insert(0,... |
import os,fortnitepy,datetime,asyncio,sys,json,random
from termcolor import colored
from random import shuffle
from Fortnite.Events import SetCosmetics
CosmeticCommands = ["!SKIN","!BACKPACK","!PICKAXE","!EMOJI","!EMOTE"]
async def SwitchSkins(fnClient,Skins):
for Skin in Skins:
await fnClient.... |
"""
Algorithm for PLS with built in filtering of Y orthogonal variation present in the X block.
Adaptation of the default scikit-learn _pls regression code to implement the algorithm described in
<NAME>, <NAME>, Orthogonal projections to latent structures (O-PLS), J. Chemometrics 2002; 16: 119-128
"""
import warnings... |
#!/usr/bin/env python
import os
from typing import Tuple, List, Dict
import json
from datetime import datetime
import click
from flask import Flask, current_app
import requests
import pytz
from flexmeasures.utils.time_utils import as_server_time, get_timezone
from flexmeasures.utils.geo_utils import compute_irradian... |
# Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
from psychopy import visual, core, event
from psychopy.visual import Rect, Circle, ImageStim, TextStim
from psychopy.core import Clock
from random import sample, choice, shuffle
from copy import deepcopy
import os
import csv
"""
I'M NOT GOING TO COMMENT THIS THROUGHOUT, SO THIS IS HOW ANIMATION & STIMULUS
PRESENTATION... |
#!/usr/bin/env python3
import os, sys, requests, time, re
from py import process
import datetime as dt
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import tabulate as tb
from html.parser import HTMLParser
from scipy.optimize import curve_fit
__version__ = '1.0.0'
H... |
import time
import csv
import json
import os
from dateutil.parser import parse
from geoalchemy2.shape import from_shape
from shapely.geometry import shape, Polygon, MultiPolygon
from sqlalchemy import create_engine
from sqlalchemy import exc
from sqlalchemy.orm import sessionmaker
from sqlalchemy_utils import database... |
#! /usr/bin/env python
"""
Test source_finder.py
"""
__author__ = '<NAME>'
from astropy.io import fits
from AegeanTools import source_finder as sf
from AegeanTools.wcs_helpers import Beam, WCSHelper
from AegeanTools import models, flags
from AegeanTools.models import classify_catalog
from copy import deepcopy
import ... |
from sympy import *
from time import time
from mpmath import radians
import tf
import numpy as np
'''
Format of test case is [ [[EE position],[EE orientation as quaternions]],[WC location],[joint angles]]
You can generate additional test cases by setting up your kuka project and running `$ roslaunch kuka_arm forward_k... |
#!/home/hudaiber/env3.4/bin/python
__description__ = """ Create megablast based dotplots between two loci """
import os
import sys
import configparser
import subprocess as sp
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from Bio import SeqIO
import numpy as np
import argparse
config_file = os... |
import numpy as np
from glob import glob
import time
import os
from pathlib import Path
import types
import contextlib
from scipy import stats, signal, interpolate, special, integrate
from darklim import constants
from darklim.limit import _upper
import mendeleev
__all__ = [
"upper",
"helmfactor",
"drde"... |
# data loader
from __future__ import print_function, division
import glob
import torch
# from skimage import io, transform, color
import numpy as np
import random
import math
import matplotlib.pyplot as plt
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms, utils
from PIL import Image
... |
#!/usr/bin/python
#
# Purpose: Paxos Acceptor
#
# Vanderbilt University Computer Science
# Author: <NAME>
# Course: CS6381 Distributed Systems Principles
# Created: Spring 2021
#
# Can be used on Mininet, insider a Docker cluster, and directly on distributed hosts
#
#
# system and time
import os
import sys
import ti... |
#! /usr/bin/python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Hook script used by tamarin team on tamarin-redux and tamarin-central.
#
# For documentation on ... |
"""
Several helper functions for calculating pairwise quantities.
Original code in this file from IDP Conformer Generator package
(https://github.com/julie-forman-kay-lab/IDPConformerGenerator)
developed by <NAME> (@joaomcteixeira), and added to the
MSCCE repository in commit 30e417937968f3c6ef09d8c06a22d54792297161.
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.