text stringlengths 8.04k 46.5k |
|---|
#!/usr/bin/env python
r"""Download artifacts from AppVeyor builds of the same commit/pull request.
This tool is mainly used to download a ".coverage" file from AppVeyor to
combine it with the one in Travis (since Coveralls doesn't support multi-ci
code coverage). However this can be used to download any artifact from ... |
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 8 05:55:20 2021
@author: lukepinkel
"""
import re
import patsy
import numpy as np
import scipy as sp
import scipy.sparse as sps
import pandas as pd
from ..utilities.data_utils import dummy, _check_np, _check_shape
from ..utilities.linalg_operations import vech, invech,... |
import itertools
import numpy
from nose.tools import assert_raises
from einops import EinopsError
from einops.einops import (rearrange, reduce, _enumerate_directions, _reductions)
from . import collect_test_backends
imp_op_backends = collect_test_backends(symbolic=False, layers=False)
sym_op_backends = collect_test_... |
import struct
from typing import List
from .instruction import GameBoyInstruction
from binaryninja.architecture import Architecture
from binaryninja import LowLevelILLabel, LowLevelILOperation
def u8(bs, signed=False):
x, = struct.unpack('<' + 'b' if signed else 'B', bs)
return x
def u16(bs, signed=False):
... |
#
# Copyright (c) 2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
import os
import math
import pkg_resources
import numpy as np
RES_LIB = pkg_resources.resource_filename('peptoid-tools.peptoid_tools', 'res_lib')
def vec_align(a, b):
"""
Align two vectors
Parameters
----------
"""
v = np.cross(a, b)
s = np.linalg.norm(v)
c = a.dot(b)
I = np.iden... |
"""The base module for the OmniSci engine."""
import re
import sqlalchemy.types as sqltypes
# from sqlalchemy import exc as sa_exc
from sqlalchemy import util as sa_util
from sqlalchemy.engine import default, reflection
from sqlalchemy.pool import NullPool
from sqlalchemy.schema import Table
from sqlalchemy.sql impor... |
# This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... |
import pandas
import time
import sklearn
import numpy as np
import Bio.SeqUtils as SeqUtil
import Bio.Seq as Seq
import azimuth.util
import sys
import Bio.SeqUtils.MeltingTemp as Tm
import pickle
import itertools
def featurize_data(data, learn_options, Y, gene_position, pam_audit=True, length_audit=True, quiet=True):
... |
#2018/09/26 Intial modlue related google drive
#2018/09/29 Add def list_folder(), def list_folder()
# def folder_browser() and def download()
#2018/10/06 Add checkFolderExistence()
#2018/10/12 Add class GoogleDrivebyFileID
####################################################
import glob, os, re
import sys, ... |
import itertools
import types
from inspect import signature
"""UrConstraintKanren
The following is intended to help both myself and others understand micro-kanren
with constraints.
While the overall goal of this project is to make a fully Pythonic Kanren, for
the purposes of this file the emphasis is clarity, partic... |
"""Contains the class DataDualGrid, a wrapper class for model fields,
precipitation and topography data.
Note that coordinates for each file used in the dataset is hard coded and is
not designed to generalise to other datasets (eg see the list of global
constants).
Coordinates are not read from .grib file... |
from enum import Enum
class MatrixFormat(Enum):
"""
Supported expression matrix output formats.
Keep up-to-date with config/matrix-api.yml (MatrixFormat)
"""
LOOM = "loom"
CSV = "csv"
MTX = "mtx"
class MatrixFeature(Enum):
"""Supported expression matrix features."""
GENE = "gene... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import collections
import logging
import numpy as np
from os.path import join
import torch
from torch import nn
import torch.nn.functional as F
import torch.nn.init as init
BN_MOMENTUM =... |
import pandas as pd
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from sklearn.cluster import MiniBatchKMeans
import datetime as dt
import xgboost as xgb
from sklearn.model_selection import train_test_split
from sklearn.metrics import make_scorer
impor... |
from math import sqrt
from pyproj import Proj
from typing import Dict, List, Set, Tuple, IO
import getpass
import json
import os
import subprocess
import sys
from sqlalchemy.orm import aliased
from sqlalchemy.orm.exc import NoResultFound
import click
import fire
from fire.cli import firedb
from fire.api.model import ... |
from cxnn.complexnn import ComplexDense, ComplexConv1D, utils, Modrelu
from simulators import physical_layer_channel, physical_layer_cfo, cfo_compansator, equalize_channel, augment_with_channel_test, augment_with_cfo_test, get_residual
from keras.regularizers import l2
from keras.models import Model, load_model
from ke... |
from . import ClientCaches
from . import ClientConstants as CC
from . import ClientGUIFunctions
from . import ClientGUIMenus
from . import ClientGUIShortcuts
from . import HydrusConstants as HC
from . import HydrusData
from . import HydrusExceptions
from . import HydrusGlobals as HG
import os
from qtpy import QtCore as... |
import numpy as np
from scipy.linalg import LinAlgError
from scipy.signal import lfilter, lfilter_zi, hilbert
from scipy.interpolate import interp1d
import h5py
from tqdm import tqdm
from ecogdata.util import input_as_2d
from ecogdata.util import nextpow2
def h5mean(array, axis, rowmask=(), start=0, stop=None):
"... |
from pdb import set_trace as T
import numpy as np
import time
from scipy.misc import imresize, imsave
from enum import Enum
import pygame
from pygame import Surface
from forge.embyr import embyr
from forge.embyr import utils as renderutils
from forge.embyr import render
from forge.embyr.EnvViewport3D import EnvViewpo... |
#/bin/python3
import discord
import logging
import settings
import asyncio
import sys
import re
import urllib.request
import json
import random
from RoleManager import RoleManager
from PrizeManager import PrizeManager
from BugReporter import BugReporter
from MessageBuilder import MessageBuilder
from key import API_KE... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
##############
# GaudiViewX: UCSF ChimeraX extension to
# explore and analyze GaudiMM solutions
# https://github.com/insilichem/gaudiviewx
# Copyright 2019 <NAME>, <NAME>
# and <NAME>
# Licensed under the Apache License, Version 2.0 (the "License");
# you ... |
from __future__ import print_function
try:
import argparse
import os
import numpy as np
import math
import matplotlib
import matplotlib.pyplot as plt
import pandas as pd
import pickle as pkl
from torch.autograd import Variable
from torch.autograd import grad as torch_grad... |
from argparse import ArgumentParser
from r_support import *
from copy import copy
# ==============================
# Detector types
# ------------------------------
SIMPLE_UPD_TYPE = 1
SIMPLE_UPD_TYPE_R_OPTIM = 2
AAD_UPD_TYPE = 3
AAD_SLACK_CONSTR_UPD_TYPE = 4
BASELINE_UPD_TYPE = 5
AAD_ITERATIVE_GRAD_UPD_TYPE = 6
AAD_I... |
#!/usr/bin/env python
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
import numpy as np
from scipy.stats import norm, pearsonr
from pathlib import Path
import argparse, sys, time, pickle
from seqload import loadSeqs, writeSeqs
from seqtools import histsim... |
import numpy as np
import logging
import LocalStepManyDocs
import OptimizerRhoOmega
from HDPTopicUtil import calcELBO
from HDPTopicUtil import calcELBO_LinearTerms, calcELBO_NonlinearTerms
from HDPTopicUtil import calcHrespForMergePairs
from bnpy.allocmodel.AllocModel import AllocModel
from bnpy.allocmodel.mix.DPMix... |
import numpy as np
import netCDF4 as nc4
from datetime import datetime
import pylab as plt
import seawater as sw
import warnings
from trackeddy.savedata import *
from trackeddy.geometryfunc import *
from trackeddy.physics import *
warnings.filterwarnings("ignore")
def dict_eddym(contour, ellipse, position_selected,pos... |
from corehq.apps.reports.standard import CustomProjectReport
from corehq.apps.reports.dont_use.fields import ReportField
from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader
from corehq.apps.reports.generic import GenericTabularReport
from dimagi.utils.couch.database import get_db
from casexml.... |
import random
import re
import operator
from time import time
from collections import defaultdict
from sqlalchemy import Table, Column, String, Integer, PrimaryKeyConstraint, desc
from sqlalchemy.sql import select
from cloudbot import hook
from cloudbot.event import EventType
from cloudbot.util import botvars
duck_ta... |
# -*- coding: utf-8 -*-
"""
Module for creating custom epoch objects
"""
import mne
import scipy.io
import warnings
from os import listdir, walk
from os.path import isfile, join
import numpy as np
import re
import numbers
def load_montage(raw, montage='auto'):
"""
Helper function for __init__ in EEG_File cl... |
# coding=utf-8
# *** WARNING: this file was generated by Pulumi SDK Generator. ***
# *** 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 _utilities
__all__ ... |
#!/usr/bin/python
# Copyright 2016 Red Hat | Ansible
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
module: docker_swarm
short_description: Manage Swarm cluster
... |
#!/usr/bin/env python3
import sys
import matplotlib
import numpy as np
from sklearn import linear_model
matplotlib.use('agg')
import matplotlib.pyplot as plt
colors = {
'BWA-MEM': '#3498DB',
'SortSam': '#E74C3C',
'MarkDuplicate': 'pink',
'BaseRecalibrator': 'green',
'ApplyBQSR': 'orange',
'H... |
# adata.gui.basic
'''
My WX helpers - old 2006 code - needs cleaning
'''
#__all__ = ['app','sizer','panel']
import os
import sys
import time
import datetime
import platform
import wx
import wx.lib.buttons as buttons
import wx.lib.masked as masked
from wx import adv
from wx.lib.wordwrap import wordwrap
from urllib.r... |
# coding=utf-8
# Copyright 2021 TF-Transformers Authors.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... |
"""Description: Given unreliable ratings of items classes by multiple raters, determine the most likely true class for each item, class marginals, and individual error rates for each rater, using Expectation Maximization
References:
( Dawid and Skene (1979). Maximum Likelihood Estimation of Observer
Error-Rates Using... |
import io
import sys
from datetime import datetime
import discord
from discord.ext import commands
from num2words import num2words
from sqlalchemy.exc import DBAPIError
from sweeperbot.cogs.utils.paginator import FieldPages
from sweeperbot.db import models
from sweeperbot.utilities.helpers import set_sentry_scope
c... |
#!/usr/bin/env python3
#
# MIT Licence
#
# 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... |
from fractions import Fraction
from typing import Union, List, Optional, Any, Dict
from musicxml.xmlelement.xmlelement import *
from musictree.dynamics import Dynamics
from musictree.exceptions import ChordAlreadySplitError, ChordCannotSplitError, ChordHasNoParentError, \
ChordQuarterDurationAlreadySetError, Alre... |
# -*- coding: future_fstrings -*- # should work even without -*-
# -*- coding: utf-8 -*-
#!/bin/bash
# ONNX_management.py
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
#
# Copyright (C) 2019-2020 University of Bologna
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in... |
# -*- coding: utf-8 -*-
"""
Authors: <NAME>
IHE Delft 2017
Contact: <EMAIL>
Repository: https://github.com/gespinoza/waterpix
Module: waterpix
"""
from __future__ import division
from math import exp, sqrt
import pandas as pd
from scipy.optimize import minimize_scalar
from scipy.optimize import fsolve
import ... |
import torch
import torch.nn as nn
from probunet.util import make_onehot as make_onehot_segmentation, make_slices, match_to
def is_conv(op):
conv_types = (nn.Conv1d,
nn.Conv2d,
nn.Conv3d,
nn.ConvTranspose1d,
nn.ConvTranspose2d,
... |
import bson
import copy
import datetime
import dateutil
import os
import pymongo
import shutil
import zipfile
from backports import tempfile
from . import config
from . import files
from . import util
from . import validators
from .dao import containerutil, hierarchy
from .dao.containerstorage import SessionStorage, ... |
from pathlib import Path
from src import utils
from src.data import DataLoaders
import numpy as np
import pandas as pd
from xgboost import XGBClassifier
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
from sklearn.metrics import log_loss
from sklearn.metrics import ro... |
#!/usr/bin/env python3
'''
Agent.py
Author: <NAME>
Updated: 5/16/17
'''
# Import Packages
import deepdoomde
import json, sys, os
import vizdoom as vzd
import itertools as it
from contextlib import contextmanager
import numpy as np
from tqdm import tqdm
from random import sample
import keras.backend as K
K.set_image_d... |
#!/usr/bin/env python3 -u
import os
import sys
import time
import json
import shlex
import base64
import getpass
import logging
import sqlite3
import hashlib
import tempfile
import argparse
import webbrowser
import subprocess
import struct
from io import BytesIO
from pathlib import PurePosixPath, Path
from tempfile i... |
import aiohttp
import asyncio
import concurrent
import async_timeout
import bs4
from utils import Connection
from connectors import StoreManager, Period, FileType
import time
import socket
import json
import boto3
from analytics import DecisionEngine
class EdgarParams(object):
def __init__(self):
self.Url... |
import os
import glob
from datetime import datetime
import click
from fpdf import FPDF
from ..utils import create_path, slugify
# Define globally ..
# (1) .. current date
today = datetime.today()
# (2) .. dimensions (A4)
pdf_width = 210
pdf_height = 297
class PDF(FPDF):
# Date format
date_format = '%d.%m... |
import os
import numpy as np
from wntr.epanet.io import InpFile
from ptsnet.arrays import Table
from ptsnet.epanet.toolkit import ENepanet
from ptsnet.epanet.util import EN, FlowUnits, HydParam, to_si
from ptsnet.simulation.constants import G, TOL, FLOOR_FFACTOR, CEIL_FFACTOR, DEFAULT_FFACTOR
from ptsnet.simulation.co... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# API calls to interact with API.AI (Google Assistant / Actions / Home, Facebook Messenger)
from google.appengine.ext import ndb
from models import Habit, HabitDay, Task, Goal, User, MiniJournal
from datetime import datetime, time
import random
from constants import HABIT_DON... |
import os
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, EarlyStopping
from keras import backend as K
from unet_210204 import *
from f_measure import f_measure, f_measure_loss
from images_loader import *
from option_pa... |
"""
语法分析
"""
from syntax.rule import Sign, Production, terminal_sign_type, non_terminal_sign_type, productions, grammar_start
from error import SyntaxRuleError, SyntaxError, SemanticRuleError
from semantic.rule import SemanticRule, SemanticError, SemanticRuleFactory
class PredictingAnalysisTable:
"""
预测分析表
... |
import sys
import getopt
import datetime
import logging
import re
import shutil
import os
import time
from requests.exceptions import HTTPError
from zipfile import ZipFile
import codecs
from internetarchive import upload, get_session, get_item, modify_metadata
from egazette.utils.file_storage import FileManager
from ... |
# Copyright <NAME> 2018.
# https://xuxiyang1993.github.io/
# the code to implement Monte Carlo Tree Search algorithm for aircraft Computational Guidance algorithm
import copy
import hashlib
import math
import os
import random
import sys
import itertools
import numpy as np
import pygame
from pygame.locals import *
... |
"""Functions for Input/Output (IO) Operations.
Classes
-------
- Keys - Provide convenience for classes used as enumerated dictionary keys.
- StreamCapture - Class to capture/redirect output to stdout and stderr.
Functions
---------
- bytes_string - Return a humanized ... |
#!/usr/bin/env python3
import os, sys, string, time, logging, math, argparse
from logging import debug,warning,info,error,fatal,critical; warn=warning
from panda3d.core import AudioManager
from ursina import *
from ursina import application
class Variable:
def __init__(self, value=None):
self._observers = []
... |
import numpy as NP
import tensorflow as tf
import tensorflow_addons as tfa
from tensorflow.keras.layers import (
Dense,
Dropout,
BatchNormalization,
LayerNormalization,
)
from tensorflow.keras.layers.experimental.preprocessing import Rescaling
from tensorflow.keras.initializers import Zeros, Ones, Tru... |
"""Tests for Video ETL functions"""
# pylint: disable=redefined-outer-name
from collections import defaultdict
from unittest.mock import Mock, MagicMock
from glob import glob
from os.path import basename
import json
from datetime import datetime
import pytest
import pytz
import googleapiclient.errors
import pytube
fro... |
from random import shuffle
from insomniac.actions_types import LikeAction, FollowAction, GetProfileAction, StoryWatchAction
from insomniac.device_facade import DeviceFacade
from insomniac.navigation import switch_to_english, search_for, LanguageChangedException
from insomniac.scroll_end_detector import ScrollEndDetect... |
import numpy as np
from keras import backend as K
from keras.layers import Layer, Lambda
from atomic_images import keras_utils
#
# Basic math functions
#
class OneHot(Layer):
"""One-hot atomic number layer
Converts a list of atomic numbers to one-hot vectors
Input: atomic numbers (batch, atoms)
Out... |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HugginFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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... |
# -*- coding: utf-8 -*-
"""
Discrete function with interpolation
User level function of the Quantarhei package. To be used as:
>>> import quantarhei as qr
>>> f = qr.DFunction()
Discrete representation of a function with several modes of interpolation.
Once defined, the functio... |
"""
NrKmeans clustering
Implementation of the NrKmeans algorithm as described in the Paper
'Discovering Non-Redundant K-means Clusterings in Optimal Subspaces'
SubKmeans is a special case of NrKmeans if there is only a single clustering considered.
"""
import numpy as np
from scipy.stats import ortho_group
from sklear... |
import argparse
import re
from modules.titleutils import get_languages, get_raw_title, get_short_name,\
get_tag_free_name, remove_languages, remove_regions
from modules.utils import Font
class CloneList:
""" Returns a formatted clone list """
def __init__(self, min_version, categories, override... |
import collections
import json
import os
import psutil
import pandas as pd
import numpy as np
import shutil
from progress.bar import Bar
import requests
import subprocess
import signal
import sys
import time
from scipy.io import mmread, mmwrite
from scipy.sparse import vstack
from texttable import Texttable
from tempfi... |
#!/usr/bin/env python3
from parent_folder import svg3d
import pyrr
import numpy as np
import svgwrite.utils
from math import *
sign = np.sign
create_ortho = pyrr.matrix44.create_orthogonal_projection
create_perspective = pyrr.matrix44.create_perspective_projection
create_lookat = pyrr.matrix44.create_look_at
def m... |
"""Example implementation of code to run on the Cloud ML service.
"""
import tensorflow as tf
from tensorflow.keras import backend as K
import numpy as np
from scipy.misc import imread
import matplotlib.pyplot as plt
import time
import gzip
import sys
import _pickle as cPickle
import shutil
import glob
import re
impor... |
import collections
import csv
import os
import zipfile
import requests
import tensorflow as tf
from adversarial_filtering.bert import modeling
from adversarial_filtering.bert import tokenization
import random
import gcsfs
import numpy as np
from tensorflow.python.lib.io import file_io
def _save_np(absolute_fn, arra... |
# coding: utf-8
from app import db, redis_c
import os
import redis
import json
from datetime import date
from sqlalchemy.sql import text
from sqlalchemy.exc import InvalidRequestError
from flask import jsonify
class WordAll(db.Model):
word_id = db.Column(db.Integer, primary_key=True)
word_string = db.Column(d... |
import tensorflow as tf
import unicodedata
import numpy as np
import matplotlib as mplt
mplt.use('Agg')
import matplotlib.pyplot as plt
import os
import re
# 1.1.1.7
SOS = "GO"
EOS = "EOS"
PAD = "PAD"
# create session
session = tf.Session()
def read_and_prepare_data(number_of_sentences, output=False):
# rando... |
#!/usr/bin/env python
## Program: VMTK
## Module: $RCSfile: vmtktetringenerator.py,v $
## Language: Python
## Date: $Date: 2006/07/27 08:27:40 $
## Version: $Revision: 1.14 $
## Copyright (c) <NAME>, <NAME>. All rights reserved.
## See LICENCE file for details.
## This software is distributed W... |
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 24 20:51:58 2018
@author: msi
"""
import h5py
import os
from scipy.fftpack import fft,dct,fftshift,fftfreq,idct
import numpy as np
import PIL.Image as img
from matplotlib import pyplot as plt
import re
'''
hdf5 file IO utils
'''
def printpath(x):
... |
import pandas as pd
from PIL import Image # www.pythonware.com/library/pil/handbook
from PIL import ImageFont, ImageDraw, ImageEnhance
from PIL import ImageFilter
import os
#import time
import logging
from Animate.Items import *
from Animate.Properties import *
from Animate.Constants import *
LOG_FILENAME = '__log... |
#!/usr/bin/env python
import argparse
import logging
import os
import sys
import numpy as np
import torch
import torch.nn as nn
from torch.optim import Adam
from torch.optim.lr_scheduler import ReduceLROnPlateau
from torch.utils.data.sampler import RandomSampler
from shutil import copyfile, rmtree
from torchviz import... |
"""
This is a template for Project 1, Task 1 (Induced demand-supply)
"""
from enum import Enum
from fmclient import Agent, OrderSide, Order, OrderType
import copy
import time
# For debugging only
import inspect
# Group details
GROUP_MEMBERS = {"908525": "<NAME>", "836389": "<NAME>", "888086": "<NAME>"}
# ------ Add... |
# -*- coding: utf-8 -*-
import numpy as np
import queue
import cv2
import csv
import pprint
from tqdm import tqdm
from PIL import ImageFont, ImageDraw, Image
pp = pprint.PrettyPrinter(indent=4)
# global
# from the image device.png
start_x = 563
start_y = 1956
key_width = 131
key_height = 230
# device image
device_... |
# -*- coding: utf-8 -*-
""" This Python Class contains all the functions needed to build the GUI
interface, and to test all the INPUT parameters.
Author: <NAME>
Email: <EMAIL>; <EMAIL>
Last revision: 02-08-2016
***License***:
This file is part of FBG_ReStrain.
FBG_ReStrain is free software: you can redistribute it... |
#!/usr/bin/env python
import os, sys, time, json, requests, logging
import re, traceback, argparse, copy, bisect
from xml.etree import ElementTree
#from hysds_commons.job_utils import resolve_hysds_job
#from hysds.celery import app
from shapely.geometry import Polygon
from shapely.ops import cascaded_union
import date... |
import collections
import collections.abc
import itertools
import random
import stix2.utils
import stix2generator.exceptions
import stix2generator.generation
import stix2generator.generation.reference_graph_generator
import stix2generator.generation.relationships
import stix2generator.utils
class Config(stix2genera... |
import copy
import math
from collections import defaultdict
import json
from archinfo import ArchAMD64
from capstone.x86_const import X86_REG_RSP
from capstone import CS_OP_IMM, CS_GRP_JUMP, CS_GRP_RET
from . import snippets as sp
from librw.kcontainer import (DataCell, InstrumentedInstruction, DataSection,
... |
import pathlib as pl
from tillvisionio.vws import VWSDataManager
import pandas as pd
import tifffile
from view.python_core.misc import excel_datetime
import typing
import easygui
import logging
import pprint
from abc import ABC, abstractmethod
import xml.etree.ElementTree as ET
import datetime
from readlif.reader impor... |
"""
The generate parameters mode command line interface
Generates initial parameters needed for pdb_eda calculations.
Usage:
pdb_eda generate -h | --help
pdb_eda generate atom-type <out-jsonfile> [--residues=<comma-separated-residues>] [--allow-errors] [--default-slope=<default-slope>] [--F000]
pdb_eda g... |
import os
import json
import datetime
import numpy as np
import pandas as pd
import plotly.io as pio
import plotly.express as px
import plotly.graph_objs as go
# from tqdm import tqdm
from typing import Any
from urllib import request
from itertools import repeat
from plotly.subplots import make_subplots
from monitor... |
from bs4 import BeautifulSoup
import pandas as pd
from urllib.request import urlopen
import numpy as np
from requests import get
import re
from loadRegularSeasonGameData import *
from db import get_db
import math
from preAggregateSeasonTeams import pre_aggregate_season
# TODO get current season game lines
# TODO optim... |
from __future__ import annotations
import torch
import numpy as np
from math import sqrt, log, pi
from torch.distributions import MultivariateNormal
import functools
LOG2PI = log(2*pi)
@functools.lru_cache
def hermgauss(n):
return np.polynomial.hermite.hermgauss(n)
class MVN(object):
"""Base class for cu... |
#!/usr/bin/env python3
"""
RPAKit is a small app which searches in a given path(if not file) RenPy archives
and decompresses the content in a custom-made subdirectory. Just listing without
writing or testing & identifying the archiv or simulating the expand process is
also possible.
"""
# TODO: shutil is a nightmare;... |
"""
On the core level the electric motor environment and the interface to its submodules are defined. By using these
interfaces further reference generators, reward functions, visualizations or physical models can be implemented.
Each ElectricMotorEnvironment contains the five following modules:
* PhysicalSyste... |
import warnings
import time
import tensorflow.compat.v1 as tf
import numpy as np
import matplotlib.pyplot as plt
import os
import itertools
import scipy
from matplotlib import cm
from sklearn.decomposition import PCA as sklearn_PCA
from IPython.display import Image
from scipy ... |
import os
from typing import Dict, Any, Optional, List, Set, Tuple
from gura.Parser import ParseError, Parser, GuraError
from enum import Enum, auto
class DuplicatedImportError(GuraError):
"""Raises when a file is imported more than once"""
pass
class DuplicatedKeyError(GuraError):
"""Raises when a key ... |
from master.constants import *
from itertools import combinations
from collections import Counter
import copy
class Color(object):
def __init__(self, col=None):
if not col:
col = 'aggreset'
query = ("SELECT * FROM colors WHERE name = %s", (col,))
self.color = db.query(query).fe... |
# Copyright The Linux Foundation
# SPDX-License-Identifier: Apache-2.0
import glob
import json
import os
from jinja2 import Template
from datatypes import Instance, Priority, Status, InstanceSet
from datefuncs import getYMStr, parseYM, priorMonth
from instancesfile import loadInstances, saveInstances
# Helper for c... |
import genesysmod_to_iamc.data_reader as dr
import genesysmod_to_iamc.data_wrapper as dw
import pandas as pd
import logging
from genesysmod_to_iamc._statics import *
def _set_scenarios(frame: pd.DataFrame):
for entry in DEF_MAP_SCENARIOS:
frame = frame.replace({'scenario': entry}, DEF_MAP_SCENARIOS[entry... |
# coding=utf-8
#
# This file is part of Hypothesis (https://github.com/DRMacIver/hypothesis)
#
# Most of this work is copyright (C) 2013-2015 <NAME>
# (<EMAIL>), but it contains contributions by others. See
# https://github.com/DRMacIver/hypothesis/blob/master/CONTRIBUTING.rst for a
# full list of people who may hold c... |
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 25 00:14:34 2021
@author: dv516
"""
import numpy as np
import pickle
import pyro
pyro.enable_validation(True) # can help with debugging
pyro.set_rng_seed(1)
from algorithms.PyBobyqa_wrapped.Wrapper_for_pybobyqa import PyBobyqaWrapper
from algorithms.Bayesian_opt_Pyro.... |
# -*- coding: utf-8 -*-
# This plugins is licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
# Authors: <NAME> <<EMAIL>>
from gluon import *
from gluon.storage import Storage
# For referencing static and views from other application
import os
APP = os.path.basename(os.path.dirname(os.pa... |
from codecs import replace_errors
import numpy as np
import torch
import torch.nn.functional as F
from recstudio.model import scorer
def kmeans(X, K_or_center, max_iter=300, verbose=False):
N = X.size(0)
if isinstance(K_or_center, int):
K = K_or_center
C = X[torch.randperm(N)[:K]]
else:
... |
# Copyright (c) 2021, ESI ITI GmbH, Modelica Association and contributors
#
# Licensed under the 3-Clause BSD license (the "License");
# you may not use this software except in compliance with
# the "License".
#
# This software is not fully developed or tested.
#
# THE SOFTWARE IS PROVIDED "as is", WITHOUT ANY WARRA... |
"""
Deuce Valere - Client - Base Test Functionality
"""
import datetime
import json
import re
import unittest
import urllib.parse
import uuid
from deuceclient.api import Vault, Block
from deuceclient.client.deuce import DeuceClient
from deuceclient.common.validation import METADATA_BLOCK_ID_REGEX
from deuceclient.comm... |
import os
import sys
import pickle
import urllib
import hashlib
import time
import cgi
from google.appengine.api import users
from google.appengine.api import mail
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from django.utils im... |
# !/usr/bin/env python
"""
About QuickAI RIFF files
Assumed knowledge:
Read this: https://en.wikipedia.org/wiki/Resource_Interchange_File_Format
The file format for QuickAI RIFF files is a form of RIFF.
This file is defined as an array of RIFF blocks.
Each block begins with an 8 byte header.
* Bytes [0:3] is a lit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.