text stringlengths 8.04k 46.5k |
|---|
from collections import defaultdict
import pyglet
from pyglet.gl import glTexParameteri, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_NEAREST
from constants import PROMPT_TOKEN
SCROLL_SCALING = 40
TILE_SIDE = 48
HALFTILE = TILE_SIDE // 2
SCROLLABLE_PANEL_TOP = 400
TAG_SEPARATOR = 8
TAG_HEIGHT = 16... |
import datetime
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from numpy import array, hstack, linspace, meshgrid, newaxis, sqrt
from pandas import DataFrame
from matplotlib.ticker import MaxNLocator
from seaborn import jointplot, set_context, set_style
from .sequential_sampling import sequen... |
# (c) 2020- <NAME> <<EMAIL>>
#
# This file is released under the MIT License:
# https://opensource.org/licenses/MIT
# This software is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied.
import smbus
import RPi.GPIO as GPIO
from threading import Thread, Lock
import os
from co... |
import hashlib
import io
import os
import re
import numpy as np
import six
import arff
import pandas as pd
import xmltodict
from scipy.sparse import coo_matrix
from oslo_concurrency import lockutils
from collections import OrderedDict
from warnings import warn
import openml.utils
import openml._api_calls
from .datas... |
from Assembler.InstructionTable import *
from Base.EDAOBase import *
def GetOpCode(fs):
return fs.ReadByte()
def WriteOpCode(fs, op):
return fs.WriteByte(op)
edao_as_op_table = InstructionTable(GetOpCode, WriteOpCode, DefaultGetLabelName, CODE_PAGE)
InstructionNames = {}
InstructionNames[0x00]... |
"""
Defines GenericForeignFileField, a subclass of GenericRelation from
django.contrib.contenttypes.
"""
import itertools
import operator
import six
from six.moves import reduce
import django
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ObjectDoesNotExist
from django.c... |
"""
ShadowPreprocessorsXraylib: Shadow preprocessors using python+xraylib
functions:
prerefl(): preprocessor for mirrors
pre_mlayer(): preprocessor for multilayers
bragg(): preprocessor for crystals
"""
#
# TODO
#
# - catch errors
# - check/... |
"""Level geometry and objects"""
from base import *
from shapes import Rectangle, Line, Circle, Text
from sprites import Sprite, AnimSprite
import json
import pygame
import math
class Tile(Rectangle):
def __init__(self, grid_x, grid_y, color: tuple, level):
super().__init__((grid_x * 50, 50, gr... |
from __future__ import with_statement
import sys
import os
import copy
import optparse
import re
import types
import inspect
import itertools
import traceback
from os.path import *
import paver.deps.six as six
from paver.deps.six import print_
from paver.version import VERSION
# using six.moves is complicated becaus... |
'''
This file gets data from Keil project and creates:
- base Makefile which can be used with VS Code STM32 IDE ideScripts
- VS Code workspace
'''
import copy
import json
import os
import shutil
import subprocess
import sys
from xml.dom import minidom
import templateStrings as tmpStr
import updateMakefile as m... |
import numpy as np
import open3d as o3d
from selfsupmotion.data.objectron.dataset.box import EDGES, FACES
import PIL
from PIL import ImageDraw
def get_dist_from_plane(plane_normal : np.ndarray, plane_center: np.ndarray, point: np.ndarray) -> float:
"""Get the smallest distance between a point and a plane.
Arg... |
import argparse
import difflib
import os
from collections import OrderedDict
from pprint import pprint
import warnings
import importlib
# For pybullet envs
warnings.filterwarnings("ignore")
import gym
import numpy as np
import yaml
from mpi4py import MPI
from stable_baselines.common import set_global_seeds
from sta... |
# -*- coding: utf-8 -*-
import re
def replace(input):
output = input
output = re.sub(u'\u1000', u'\u0075', output) # ka_gyi
output = re.sub(u'\u1001', u'\u0063', output) # ka_kway
output = re.sub(u'\u1002', u'\u002a', output) # ga_nge
output = re.sub(u'\u1003', u'\u0043', output) # ga_gyi
... |
import os
import warnings
from glob import glob
import contextily as ctx
import geopandas as gpd
import geoviews as gv
import h5py
import holoviews as hv
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from geoviews import tile_sources as gvts
from .utils.L2 import create_gv_points
from .utils.... |
"""
MIT License
Copyright (c) 2020 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distri... |
#! /usr/bin/python2
#
# Copyright (c) 2017 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
"""
Stream and snapshot capture interace
------------------------------------
This module implements an interface to capture things in the server
and then return them to the client.
This can be used to, for example:
... |
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import calendar
import hashlib
import json
import random
import re
import six
from copy import deepcopy
from corehq.apps.data_interfaces.utils import property_references_parent
from corehq.messaging.scheduling... |
#!/usr/bin/env python3
#
# LSTM
import collections
import os
import re
import time
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import requests
import tensorflow.compat.v1 as tf
def check_dir(directory):
"""
:param directory: path to the directory
"""
if not os.path.exists(... |
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
import argparse
from scipy.stats import gamma
from scipy.optimize import minimize,fmin_l_bfgs_b
from functions import *
def parametricBootstrap(distribution, N, theta_vector, B, sensitivity, noise_scale, clipmin, clipmax, cl... |
import os
import sys
import shutil
import os.path as osp
import json
import time
import datetime
import tempfile
import warnings
import numpy as np
from collections import defaultdict, deque
from typing import Any, Dict, List, Optional, Sequence, TextIO, Tuple, Union
from contextlib import contextmanager
from RLA.con... |
import argparse
import copy
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import scipy.sparse as sp
import networkx as nx
import random
from tqdm import tqdm
from cogdl.data import Dataset
from cogdl.models.supervised_model import (
SupervisedHomogeneousNodeClassificationMo... |
import numpy as np
from scipy.linalg import block_diag
class UKF:
"""The Unscented Kalman Filter on (parallelizable) Manifolds.
This filter is the implementation described in :cite:`brossardCode2019` . It
is well adapted to relatively small systems and for understanding the
methodology of **UKF-M**, o... |
#!/usr/bin/python
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... |
#! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
import os, sys
from waflib import Errors, Logs, Node, Options, Task, Utils
from waflib.TaskGen import extension, before_method, after_method, feature
from waflib.Configure import conf
FRAG = '''
#in... |
import numpy as np
import tensorflow as tf
from datetime import datetime
from .utils import LoopIterator, log_function, scope_variables
from .gmm_game_graph import GMMGameGraph
DEBUG=False
class DeepGMM:
def __init__(self, n_critics=50, batch_size_modeler=200, num_steps=30, store_step=10,
displa... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... |
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import vim
import re
import xml.etree.ElementTree as ET
import coqtop as CT
import project_file
from collections import deque
import vimbufsync
vimbufsync.check_version([0,1,0], who="coquille")
# Define un... |
import re
import json
import copy
import datetime
from shutil import copyfile
from os import path
from collections import defaultdict
import click
from moebot import MwApi
import requests
from pyquery import PyQuery as pq
from .ship import ShipService
from lib.common.log import debug
from lib.common.config import CONF... |
# Porn hunter and wisdom bringer
# Can throw several ramdom words and stickers in order to "scroll" chat window
# Also, can send two random phrases (adjective + noun)
# in correct grammatic form
# Currently, only russian language is supported
from .core_addon import BotCommand, BotAddon, BotCallback
import logging
imp... |
import numpy as np
import os
import pandas as pd
from itertools import islice
import sys
import getopt
#xyz = "/projects/jochena/adamphil/projects/Na/short/s_07/2_wfcopt/water.xyz_3"
def usage():
print("USAGE:"+"\n"+
"-h help"+ "\n"+
"-b compute boxsize"+"\n"+
"-c Center an xyz file"+"\n... |
from __future__ import division, print_function
import copy
import os
import pickle, dill
import sys
from contextlib import contextmanager
import matplotlib.pyplot as plt
import numpy as np
import sep
from astropy import units as u
from astropy import wcs
from astropy.coordinates import SkyCoord
from astropy.io impor... |
import os
import re
import numpy as np
import onnx
import onnx_graphsurgeon as gs
import tensorrt as trt
import tf2onnx
from tensorflow import __version__ as TF_VERSION
def maskrcnn_to_onnx(model, model_name, input_spec, kwargs):
if model.name != 'mask_rcnn_inference':
raise ValueError('Inference model s... |
import numpy as np
import cv2
import glob
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from moviepy.editor import VideoFileClip
from IPython.display import *
from Line import Line
# %matplotlib qt
def camera_calibration_configuration():
# prepare object points, like (0,0,0), (1,0... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# (c) B.Kerler 2018-2021 GPLv3 License
import hashlib
from Crypto.Cipher import AES
from Crypto.Util import Counter
from Crypto.Hash import CMAC
from Crypto.Util.number import long_to_bytes, bytes_to_long
from binascii import hexlify
import hmac
class PKCS1BaseException(Exc... |
import struct
import os
import warnings
import logging
import ctypes
import vtk
import numpy as np
from vtki.common import axis_rotation
import vtki
from pyansys import _parsefull
from pyansys import _binary_reader
from pyansys import _parser
from pyansys.elements import valid_types
from pyansys import Result
from py... |
# Copyright (c) 2011, Apple Inc. All rights reserved.
# Copyright (c) 2009, 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain th... |
# Building environment for self driving car
# Import standard libraries of Python
import random
import time
# Import NumPy (used to draw the car's road with "sand")
import numpy as np
# Import Kivy packages
from kivy.app import App
from kivy.uix.button import Button
from kivy.uix.widget import Widget
from kivy.grap... |
import argparse
import sys
import json
import numpy as np
from sklearn import metrics
from sklearn import svm
import os
from tqdm import tqdm
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
# Force matplotlib to not use any Xwindows backend.
# from plat.fuel_helper import get_dataset_iterator
... |
#!/usr/bin/env python3
# pichu.py : Solve one step best solution of Pichu chess game
# <NAME>, Oct 2017
#
#
# Pichu is an Electric-type baby Pokemon, introduced in Generation II.
# It evolves into Pikachu when leveled up with high friendship,
# which evolves into Raichu when exposed to a Thunder Stone.
# https://bulb... |
# Copyright (c) 2014, <NAME>
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import itertools
import numpy
np = numpy
from parameter_core import Parameterizable, adjust_name_for_printing, Pickleable
from observable_array import ObsAr
###### printing
__constraints_name__ = "Constraint"
__index_name__ = "In... |
from ehreact.helpers.rdkit import moltosmiles_transition, mol_transition
from ehreact.diagram.diagram import Diagram
from copy import deepcopy
from rdkit import Chem
from ehreact.helpers.utils import findsubsets
import numpy as np
def extended_hasse(smiles_dict, seeds, rule_dict, tags_core, verbose, quiet):
"""
... |
# TODO: Corregir alertes de linting
from contactboard.models import *
from usermanager.models import *
from extraescolars.models import *
from missatges.models import *
from django.contrib.auth.models import User
from django.db import transaction
from decimal import Decimal
import datetime
import abc
CURRENT_VERSION ... |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# TODO(lpe): Include in package
import pandas as pd
import os
from sklearn import preprocessing
import numpy as np
from scipy.stats import beta
import pathlib
import pickle
from clonesig.estimator import Estimator
from clonesig import mixin_init_parameters
try:
rows, co... |
# -*- coding: utf-8 -*-
import numpy as np, pandas as pd, torch, cv2, os, argparse, math
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap, LinearSegmentedColormap
from matplotlib import cm
from pydub import AudioSegment, effects, scipy_effects
from nnAudio import Spectrogram
from yolo... |
#!/usr/bin/env python3
import os
import pickle
import copy
import random
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl;
mpl.rcParams["savefig.directory"] = '~/Desktop'#$os.chdir(os.path.dirname(__file__))
import argparse
from collections import defaultdict
from utils.optim import AdamOpt... |
import logging
from logging.handlers import RotatingFileHandler
import requests
import json
import datetime as dt
import re
import sqlite3
from enum import Enum, unique
from time import time
from calendar import monthrange
import pandas as pd
import altair as alt
import plotly.offline as offline
import plotly.graph_ob... |
import torch
import torch.nn as nn
from torch.nn import init
import functools
from torch.autograd import Variable
from torch.optim import lr_scheduler
import numpy as np
from .common_net import *
from torch.nn.utils import spectral_norm
import copy
from .gumbelmodule import GumbleSoftmax
try:
# Python 2
xrange
... |
#
# Copyright (C) 2019 Databricks, 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 i... |
import logging
import os
import random
import json
from pathlib import Path
import yaml
import jsonpickle
import ast
import copy
import itertools
from itertools import combinations
import numpy as np
VALID_CONFIG_VALUES = ['executable', 'name', 'output_dir',
'conda_environment', 'project_root_... |
# Copyright (c) 2011 Tencent Inc.
# All rights reserved.
#
# Author: Michaelpeng <<EMAIL>>
# Date: October 20, 2011
"""
This is the target module which is the super class of all of the targets.
"""
from __future__ import absolute_import
from __future__ import print_function
import os
import re
from blade import ... |
#!/usr/bin/env python
# Future Imports for py2/3 backwards compat.
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from builtins import map
from builtins import input
from builtins import range
from time import sleep
from io import BytesIO
from zipfile impor... |
# Copyright 2018 Delivery Hero Germany
#
# 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 t... |
#!/usr/bin/python3
"""This recipe implements diarization system using deep embedding extraction followed by spectral clustering.
To run this recipe:
> python experiment.py hparams/<your_hyperparams_file.yaml>
e.g., python experiment.py hparams/ecapa_tdnn.yaml
Condition: Oracle VAD (speech regions taken from the grou... |
import math
from collections.abc import Iterable
from operator import itemgetter
import random
import os
from glob import glob
from .geom import hflip_pattern, vflip_pattern, rot_pattern
from .error import GollyXPatternNotFoundError, GollyXPatternsError
def get_pattern_filepaths():
patternfilepaths = glob(
... |
import json
import os
from os.path import basename
from typing import List, Dict
from commands import Quarantine_Single_Community, Unquarantine_Single_Community, \
Quarantine_Single_Person, Unquarantine_Single_Person, \
Quarantine_Multiple_People, Unquarantine_Multiple_People, \
Quarantine_Diseased... |
# Authors: <NAME> <<EMAIL>>
"""
----------------------------------------------------------------------
--- jumeg.decompose.group_ica.py -------------------------------------
----------------------------------------------------------------------
author : <NAME>
email : <EMAIL>
last update: 09.11.2016
versi... |
# -*- coding: utf-8 -*-
ANSIBLE_METADATA = {
'metadata_version': '1.3',
'status': ['preview'],
'supported_by': '<NAME>, IMS Cloud Native'
}
DOCUMENTATION = '''
---
module: zport.py
short_description: Allocate TCP/UDP port on z/OS through Unix System Services
version_added: "2.4"
description:
- Using... |
import os
import numpy as np
import pandas as pd
import subprocess
# pyburst
from . import grid_analyser
from . import grid_tools
from . import grid_strings
from pyburst.mcmc import mcmc_versions, mcmc_tools
from pyburst.kepler import kepler_jobs, kepler_files
from pyburst.misc.pyprint import print_title, print_dashes... |
import ast
import asyncio
import collections
import copy
import html
import logging
import os
from typing import Dict, List, Optional, Tuple
import graphviz as gv
from .common import (FullLoadContext, LoadContext, PVRelations,
ScriptPVRelations, dataclass)
from .db import RecordField, RecordInsta... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Generate aggregated cubes.
A subset of variables is selected. This selected subset, its total time average, and
its monthly climatology are all stored as pickle files.
TODO: Enable regex based processing of dataset names too (e.g. for
TODO: Selection.remove_datasets o... |
"""
Views associated with our stocking application.
"""
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.db.models import Count, Q, Min, Max, F
from django.http import HttpResponseRedirect
from django.shortcuts import redirect, render, get_object_or_404
from djang... |
import numpy as np
import matplotlib.pyplot as plt
import accretion_code as ac
import file_tools as flt
from scipy.interpolate import interp1d
import dedalus.public as de
# inviscid approximation
l = 1.1
g = .0925
n = 128
L = 60
asymptotics = ac.asymptotic_analysis(l, g, n, L=L)
# full viscous simulations
a = asympto... |
import datetime
import os
import sys
from math import radians
import geopandas as gpd
from geopandas.testing import assert_geodataframe_equal
import numpy as np
import pandas as pd
import pytest
from shapely.geometry import Point
from sklearn.cluster import DBSCAN
import trackintel as ti
from trackintel.geogr.distan... |
# -*- coding: UTF-8 -*-
"""
iDARTS - get_resources
Implements an internal downloading module for
getting data from internet. Data includes training
data, cis feature files, etc.
This module depends on the url and md5sum stored in ``resources/download.yaml``
"""
from subprocess import *
from collections import default... |
"""
Basic Input and Output control for Colloid Simulation models are hosted within
Colloid_IO.py. Config and ColloidConfig are classes to set up
model dictionaries can be passed along to the main simulation routines.
ColloidConfig is a backend method for the super user. This provides a simple overridden
dictionary clas... |
# coding: utf8
# Copyright (c) <NAME>, University of Antwerp
# Distributed under the terms of the MIT License
import json
import os
import warnings
from fnmatch import fnmatch
import numpy as np
from monty.io import zopen
from monty.json import MontyDecoder, MontyEncoder
from pymatgen import Lattice, PeriodicSite
fro... |
from re import compile, DOTALL
from line2.models.types import ParameterType, NoDefaultParameter, DefaultParameter, Type, CommandType, CommandResultType, CommandContinuousCallType, ChatroomType
from line2.utils import IsEmpty, Alphanumeric, Lock, GetBraceInsides, EscapeNames, Acquire
from traceback import format_exc, pr... |
from __future__ import annotations
import logging
import math
import os
from pathlib import Path
from typing import Any, Callable, Dict, Mapping, Tuple, Union
import fontTools.misc.plistlib
import fontTools.varLib.models # type: ignore
from attr import field, frozen
from fontTools.misc import etree as ElementTree #... |
'''
Tasks, Encoding, and Query helper classes for draco.
'''
import json
import logging
import os
from collections import defaultdict
from copy import deepcopy
from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
import agate
import numpy as np
import pandas as pd
import scipy.stats as stats
from agat... |
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import pandas as pd
from sklearn.metrics import roc_curve, confusion_matrix
import itertools
def _plt_ax(ax, x, y, color, label):
ax.plot(x, y, f"{color}-", label=label)
ax.legend()
def _plt_latent_individual(
ax,
x,
y1,
... |
from datetime import datetime
from django.contrib.admin.utils import NestedObjects, quote
from django.urls import reverse, NoReverseMatch
from django.utils.html import format_html
from django.contrib.auth import get_permission_codename, get_user_model
from django.contrib.auth.models import User
from django.contrib.co... |
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
from mpl_toolkits.mplot3d import Axes3D
from itertools import product, combinations
from mpl_toolkits.axes_grid1 import make_axes_locatable
import h5py as h5
import sys, os
import matplotlib.ticker as tick... |
# Copyright 2021 [name of copyright owner]
# 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 i... |
#!/usr/bin/env python
# coding: utf-8
"""
evaluate levenshtein distance as recognition error for dataset using various model(s)
"""
# Для отладки
inference_width = 850
verbose = 0
models = [
#('NN_results/dsbi_tst_as_fcdca3_c63909', 'models/clr.099.t7'),
#
('NN_results/dsbi_lay3_c4ca62', 'models/clr.005.t... |
"""
The equilibrium test module verifies that the Equilibrium class produces the
correct solution for thermodynamic equilibrium.
"""
import warnings
import os
from nose.tools import raises
from numpy.testing import assert_allclose
import numpy as np
from pycalphad import Database, Model, calculate, equilibrium, Equili... |
'''
Training routines for SGAN
'''
import torch.optim as optim
from sklearn.metrics import accuracy_score
import torch
from torch.autograd import Variable
import numpy as np
def pretrain_classifier(x_labelled, x_unlabelled, y_labelled, eval_x, eval_y, num_batches_l,
batch_size, num_batches_u,... |
"""
This file is part of nucypher.
nucypher is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
nucypher is distributed in the hope that it wil... |
import random
import PIL
import os
import numpy as np
from copy import deepcopy
import pickle as pkl
from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
import torch
import torch.utils.data as data
import torch.nn.functional as F
import torchvision.transforms as transforms
from torchvision.datasets.video... |
import os
import sys
import math
import collections
import numpy as np
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.path as mpath
import matplotlib.patches as mpatches
from Bio import SeqIO
def read_linkdata(f):
link_dict = collections.defaultdict(list)
for li... |
import sys
from rply.token import BaseBox, Token
from rply import ParsingError
# -hacking-
def _token_init(self, name, value, lineno=0):
self.name = name
self.value = value
self.lineno = lineno
def _basebox_getsourcepos(self):
return self.lineno
def _basebox_append_item(self, item):
raise No... |
from matplotlib.axes import Axes, SubplotBase
from matplotlib.axis import Axis
from matplotlib.figure import Figure
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter
from mpl_format.axes.axis_utils import new_axes
from mpl_format.text.text_utils import wrap_text, map_text
from numpy.ma import ... |
import itertools
import numpy as np
import plotly.graph_objs as go
import plotly.subplots as tls
from dash.dependencies import Input, Output
from dash.exceptions import PreventUpdate
from dash_mp_components import CrystalToolkitScene
from pymatgen.ext.matproj import MPRester
from pymatgen.core.periodic_table import E... |
import sys
import math
""" @authors: <NAME> & <NAME>"""
class Batch:
BEFORE_JOINING_BUFFER = 0
IN_BUFFER = 1
IN_MACHINE = 2
FINISHED_IN_INVENTORY = 3
def __init__(self, numberOfWafers, code):
self.numberOfWafers = numberOfWafers
self.code = code
self.state = Batch.BEFOR... |
import asyncio
import math
import os
import queue
import re
from typing import List
import urllib.request
from ctypes.util import find_library
from random import randint
import disnake
from disnake.ext import commands, tasks
from utils.command import botdatatypes
from utils.command.clip import *
from utils.command.pag... |
# Copyright (c) 2016-2018, The University of Texas at Austin
# & University of California--Merced.
# Copyright (c) 2019-2020, The University of Texas at Austin
# University of California--Merced, Washington University in St. Louis.
#
# All Rights reserved.
# See file COPYRIGHT for details.
#
# This file is part of th... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import os
from collections import Counter
from itertools import chain
import ipaddr
from django.conf import settings
from django.d... |
# imports
import sys
import os
import random
# classes
class Player:
def __init__(self, name, power, hit_chance, parry_chance, taunt_chance, health, defence) -> None:
self.name = name
self.points = 0
self.power = power
self.hit_chance = hit_chance
self.crit_chance = 1
... |
# ------------------------------------------------------------------------------
# CPM+GNN Pytorch Implementation
# CPN+GNN paper:
# https://arxiv.org/abs/1901.01760
# Written by <NAME> (<EMAIL>)
# ------------------------------------------------------------------------------
from collections import OrderedDict
import... |
import numpy as np
import pytest
import aesara
import aesara.tensor as at
from aesara.printing import debugprint, pydot_imported, pydotprint
from aesara.tensor.type import dvector, iscalar, scalar, vector
def test_scan_debugprint1():
k = iscalar("k")
A = dvector("A")
# Symbolic description of the result... |
# -*- coding: utf-8 -*-
'''
salt.utils.master
-----------------
Utilities that can only be used on a salt master.
'''
# Import python libs
from __future__ import absolute_import
import os
import logging
import signal
import tempfile
from threading import Thread, Event
# Import salt libs
import salt.log
... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import numpy as np
import astropy.units as u
from .. import core
from .. import *
from .... import exceptions as sbe
from ....data import Phys
def test_photo_lengthscale():
gamma = photo_lengthscale('OH', 'CS93')
assert gamma == 1.... |
__author__ = 'marrabld'
import os
import sys
sys.path.append("../..")
import logger as log
import scipy
import scipy.optimize
import libbootstrap
import libbootstrap.state
import csv
import pylab
DEBUG_LEVEL = libbootstrap.state.State().debug
lg = log.logger
lg.setLevel(DEBUG_LEVEL)
class BioOpticalParameters():
... |
from abc import abstractmethod
from collections import OrderedDict
from typing import List, Union
import warnings
import numpy as np
import pandas as pd
from pandas.core.nanops import nanmean as pd_nanmean
from statsmodels.tsa.seasonal import DecomposeResult
from sklearn.linear_model import RidgeCV
from statsmodels.too... |
# -*- coding: utf-8 -*-
"""
pygments.lexers.asm
~~~~~~~~~~~~~~~~~~~
Lexers for assembly languages.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, using, words, \
... |
'''
Author:: <NAME>
'''
import os
import json
import time
import pdb
import pickle
import numpy as np
import scipy.io as io # to save detection as mat files
from data.datasets import is_part_of_subsets, get_filtered_tubes, get_filtered_frames, filter_labels
from data.datasets import get_frame_level_annos_ucf24, get... |
# coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import serialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import L... |
from __future__ import division
from __future__ import print_function
import os
import time
import tensorflow as tf
import numpy as np
import datetime
from models import SampleAndAggregate, SAGEInfo, Node2VecModel
from minibatch import EdgeMinibatchIterator
from neigh_samplers import UniformNeighborSampler
from utils... |
#!/usr/bin/python
from __future__ import print_function
import pprint
import sys
TEST_COUNT = 0
PLATFORM_ARCH_32 = False
CLASSES = { "new_debians": "(debian.!ubuntu_10.!debian_6)",
"old_debians_32_bit": "(32_bit.(ubuntu_10|debian_6))", # No multiarch support.
"old_debians_64_bit": "(64_bit.(... |
import numpy as np
import networkx as nx
from indra.explanation.pathfinding.pathfinding import bfs_search, \
shortest_simple_paths, bfs_search_multiple_nodes, open_dijkstra_search
from indra.explanation.model_checker.model_checker import \
signed_edges_to_signed_nodes
INT_PLUS = 0
INT_MINUS = 1
def _digraph... |
#!/usr/bin/env python
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''
Usage: callstats.py [-h] <command> ...
Optional arguments:
-h, --help show this help message and exit
Commands:
run ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.