id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/Keras_Applications_3D-0.1.0-py3-none-any.whl/keras_applications_3d/applications/inception_resnet_v2.py
from tensorflow.python.keras import backend from tensorflow.python.keras.applications import imagenet_utils from tensorflow.python.keras.engine import training from tensorflow.python.keras.layers import VersionAwareLayers from tensorflow.python.keras.utils import data_utils from tensorflow.python.keras.utils import lay...
PypiClean
/MPInterfaces_Latest-2.0.3.tar.gz/MPInterfaces_Latest-2.0.3/mpinterfaces/mat2d/electronic_structure/startup.py
from __future__ import print_function, division, unicode_literals import itertools import math import numpy as np import os import shutil import subprocess from pymatgen import Structure from pymatgen.io.vasp.inputs import Kpoints, Incar from pymatgen.symmetry.bandstructure import HighSymmKpath from mpinterfaces.mat...
PypiClean
/CodeComb-0.1.9-py3-none-any.whl/CodeComb_Core/make_code_corpus.py
import re import os import pandas as pd import sys import pickle import configparser from CodeComb_Core.embeddings import * from CodeComb_Core.utils import * from CodeComb_Core.env import * ## Read the file and pack it into file_info dict def prepare_file(filename, location): with open(os.path.join(location,filen...
PypiClean
/GooseSLURM-0.12.4.tar.gz/GooseSLURM-0.12.4/docs/cheat-sheet.rst
*********** Cheat-sheet *********** SLURM commands -------------- ========================= ======================================================================================================= Command Description ========================= =========================================================...
PypiClean
/DI_engine-0.4.9-py3-none-any.whl/dizoo/gfootball/model/bots/rule_based_bot_model.py
from kaggle_environments.envs.football.helpers import * from math import sqrt from enum import Enum import random import torch import torch.nn as nn import numpy as np from ding.torch_utils import tensor_to_list, one_hot, to_ndarray from ding.utils import MODEL_REGISTRY from ding.torch_utils import to_tensor, to_dtype ...
PypiClean
/ConSSL-0.0.1-py3-none-any.whl/CSSL/models/self_supervised/swav/transforms.py
from typing import List import numpy as np from CSSL.utils import _OPENCV_AVAILABLE, _TORCHVISION_AVAILABLE from CSSL.utils.warnings import warn_missing_pkg if _TORCHVISION_AVAILABLE: from torchvision import transforms as transforms else: # pragma: no cover warn_missing_pkg('torchvision') if _OPENCV_AVAILA...
PypiClean
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/lattices/engel26.py
from genice2.cell import cellvectors import genice2.lattices import numpy as np desc = { "ref": { "PCOD8321499": "Engel 2018", "engel26": "Engel 2018" }, "usage": "No options available.", "brief": "Hypothetical zeolitic ice" } class Lattice(genice2.lattices.Lattice): def __init__(s...
PypiClean
/AnyBlok-2.1.0.tar.gz/AnyBlok-2.1.0/anyblok/field.py
from sqlalchemy.ext.hybrid import hybrid_property from anyblok.common import anyblok_column_prefix from anyblok.mapper import ModelRepr class FieldException(Exception): """Simple Exception for Field""" class Field: """Field class This class must not be instanciated """ use_hybrid_property = F...
PypiClean
/FMOARPG-0.0.7-py3-none-any.whl/BIM360/__init__.py
import requests import BIM360 import CLASSES import DATAMANAGEMENT import Utils from datetime import date def getToken(client_id, client_secret, credentials): """Obtain Forge token given a client id & secret""" req = { 'client_id' : client_id, 'client_secret': client_secret, 'grant_type' : 'client_credentials...
PypiClean
/BenchExec-3.17.tar.gz/BenchExec-3.17/contrib/vcloud/vcloudutil.py
import collections import os import sys import benchexec.util sys.dont_write_bytecode = True # prevent creation of .pyc files def parse_vcloud_run_result(values): result_values = collections.OrderedDict() def parse_time_value(s): if s[-1] != "s": raise ValueError(f'Cannot parse "{s}" ...
PypiClean
/Kahi_scienti_sources-0.0.2a0.tar.gz/Kahi_scienti_sources-0.0.2a0/kahi_scienti_sources/Kahi_scienti_sources.py
from kahi.KahiBase import KahiBase from pymongo import MongoClient from datetime import datetime as dt from time import time from langid import classify class Kahi_scienti_sources(KahiBase): config = {} def __init__(self, config): self.config = config self.mongodb_url = config["database_url...
PypiClean
/AlgorithmLib-4.0.3.tar.gz/AlgorithmLib-4.0.3/algorithmLib/AEC_EVALUATION/ERLE_ETSIMATION.py
import sys,os from os import path sys.path.append('../') from ctypes import * from commFunction import emxArray_real_T,get_data_of_ctypes_ import ctypes import platform # * ------------------------------------------------------------------------- # * Arguments : const emxArray_real_T *sig_mic # * ...
PypiClean
/M5-0.3.2.tar.gz/M5-0.3.2/lib/scottp-scrollability/scrollability.js
(function() { // Number of pixels finger must move to determine horizontal or vertical motion var kLockThreshold = 10; // Factor which reduces the length of motion by each move of the finger var kTouchMultiplier = 1; // Maximum velocity for motion after user releases finger //var kMaxVelocity = 720 / (window.deviceP...
PypiClean
/Confluence-Task-Crawler-0.0.6.tar.gz/Confluence-Task-Crawler-0.0.6/ctr/Database/model.py
from sqlalchemy import Column from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy import String from sqlalchemy import DateTime from sqlalchemy import Date from sqlalchemy import Boolean from sqlalchemy import func, event from sqlalchemy.orm import declarative_base from sqlalchemy.orm impor...
PypiClean
/AQoPA-0.9.5.tar.gz/AQoPA-0.9.5/aqopa/module/greenanalysis/__init__.py
from aqopa import module from .gui import ModuleGui from aqopa.simulator.state import HOOK_TYPE_SIMULATION_FINISHED from .console import PrintResultsHook class Module(module.Module): def __init__(self, energyanalysis_module): self.energyanalysis_module = energyanalysis_module self.carbon_dioxide_...
PypiClean
/JumpScale-core-6.0.0.tar.gz/JumpScale-core-6.0.0/lib/JumpScale/core/base/time/Time.py
from JumpScale import j import time import struct class Time: """ generic provider of time functions lives at j.base.time """ def getTimeEpoch(self): ''' Get epoch timestamp (number of seconds passed since January 1, 1970) ''' try: return j.core.appserver...
PypiClean
/Flask-KQMaps-0.4.2.tar.gz/Flask-KQMaps-0.4.2/flask_kqmaps/static/kqwebclient/leaflet/3rd_libs/leaflet.markercluster/leaflet.markercluster.js
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Leaflet=e.Leaflet||{},e.Leaflet.markercluster=e.Leaflet.markercluster||{}))}(this,function(e){"use strict";var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxCluster...
PypiClean
/Chaturanga-0.1.8.linux-x86_64.tar.gz/usr/local/lib/python2.7/dist-packages/chaturanga/check.py
def next_point(ref, points, axis, positive): """ Returns next_point in points w.r.t. ref on given axis and direction. {int: axis} = {0: row, 1: column, 2: anti-diagonal, 3: diagonal} """ if axis == 0: line = list(filter(lambda p: p[0] == ref[0], points)) if positive: lin...
PypiClean
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/full/lang/cy.js
/* Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/license */ CKEDITOR.lang['cy']={"editor":"Golygydd Testun Cyfoethog","editorPanel":"Panel Golygydd Testun Cyfoethog","common":{"editorHelp":"Gwasgwch ALT 0 am gymorth","browseServer":"Po...
PypiClean
/FoBiS.py-3.0.5.tar.gz/FoBiS.py-3.0.5/fobis/Fobos.py
# Copyright (C) 2015 Stefano Zaghi # # This file is part of FoBiS.py. # # FoBiS.py 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. # #...
PypiClean
/Electrum-VTC-2.9.3.3.tar.gz/Electrum-VTC-2.9.3.3/gui/kivy/uix/dialogs/checkpoint_dialog.py
from kivy.app import App from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder from electrum_vtc.i18n import _ Builder.load_string(''' #:import _ electrum_vtc_gui.kivy.i18n._ <CheckpointDialog@Popup> id: popup title: _('Blockchain') size_hint: 1, 1 ...
PypiClean
/Argonaut-0.3.4.tar.gz/Argonaut-0.3.4/argonaut/public/ckeditor/_source/plugins/about/dialogs/about.js
/* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'about', function( editor ) { var lang = editor.lang.about; return { title : CKEDITOR.env.ie ? lang.dlgTitle : lang.title, minWidth : 390, minH...
PypiClean
/McStasScript-0.0.63.tar.gz/McStasScript-0.0.63/mcstasscript/data/pyvinylData.py
from libpyvinyl.BaseData import BaseData from mcstasscript.data.McStasDataFormat import McStasFormat from mcstasscript.data.MCPLDataFormat import MCPLDataFormat class pyvinylMcStasData(BaseData): def __init__( self, key, data_dict=None, filename=None, file_format_class=None...
PypiClean
/Azule_Hair_Transplant-0.0.1.tar.gz/Azule_Hair_Transplant-0.0.1/models/face_parsing/resnet.py
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.model_zoo as modelzoo # from modules.bn import InPlaceABNSync as BatchNorm2d resnet18_url = 'https://download.pytorch.org/models/resnet18-5c106cde.pth' def conv3x3(in_planes, out_planes, stride=1): """3x3 convolution with pad...
PypiClean
/OASYS1-XRayServer-1.0.36.tar.gz/OASYS1-XRayServer-1.0.36/orangecontrib/xrayserver/widgets/xrayserver/ow_x0p.py
__author__ = "Luca Rebuffi" from orangewidget import gui from orangewidget.settings import Setting from oasys.widgets import gui as oasysgui import urllib from http import server from orangecontrib.xrayserver.util.xrayserver_util import HttpManager, XRayServerGui, XRAY_SERVER_URL, ShowHtmlDialog from orangecontrib....
PypiClean
/CellProfiler-4.2.6.tar.gz/CellProfiler-4.2.6/cellprofiler/modules/measureobjectoverlap.py
from functools import reduce import centrosome.cpmorphology import centrosome.fastemd import centrosome.filter import centrosome.index import centrosome.propagate import numpy import scipy.ndimage import scipy.sparse from cellprofiler_core.constants.measurement import COLTYPE_FLOAT from cellprofiler_core.module import...
PypiClean
/Mopidy-Mopify-1.7.3.tar.gz/Mopidy-Mopify-1.7.3/mopidy_mopify/static/debug/src/vendor/angular-notifier/dist/angular-notifier.min.js
!function(){"use strict";angular.module("llNotifier",["ngAnimate"]).value("llNotificationsTemplateUrl","src/notifications.html").value("llNotificationTemplateUrl","src/notification.html").constant("llConstants",{DEFAULT_NOTIFICATION_TYPE:"default",DEFAULT_NOTIFICATION_POSITION:"top center",DEFAULT_DELAY:3e3,FADE_DELAY:...
PypiClean
/Khooshe-0.2.tar.gz/Khooshe-0.2/khooshe/khooshe.py
import os import shutil import csv import numpy as np from scipy.cluster.vq import kmeans, vq def remove_tiles_folder(tile_name): ''' ''' if os.path.exists(tile_name): shutil.rmtree(tile_name) def create_folder(folder_name): ''' ''' if os.path.exists(folder_name): shutil.rmtr...
PypiClean
/CloudFerry-1.55.2.tar.gz/CloudFerry-1.55.2/QUICKSTART.md
# Quick Start Guide 1. Get CloudFerry sources ``` git clone https://github.com/MirantisWorkloadMobility/CloudFerry.git cd CloudFerry # The most recent code is in devel branch git checkout -b devel origin/devel ``` 2. Install vagrant (devlab requires vagrant version >= 1.6) ``` wget ht...
PypiClean
/CC-dbgen-0.2.0.tar.gz/CC-dbgen-0.2.0/dbgen/inputs/rxn.py
from dbgen.support.datatypes.table import Table,Col,FK from dbgen.support.datatypes.rule import Rule,Plan,PureSQL,SimpleUpdate from dbgen.support.datatypes.misc import Arg,noIndex from dbgen.support.datatypes.sqltypes import Varchar,Decimal from dbgen.support.utils import mkInsCmd ###...
PypiClean
/Neveregiveup-2.0.3.tar.gz/Neveregiveup-2.0.3/wargame/knight.py
from __future__ import print_function from abstractgameunit import AbstractGameUnit from gameutils import print_bold class Knight(AbstractGameUnit): """Class that represents the game character 'Knight' The player instance in the game is a Knight instance. Other Knight instances are considered as 'friends...
PypiClean
/Exceptable-0.1.0.tar.gz/Exceptable-0.1.0/exceptable/base.py
import re def __factory__(regex): class Exceptable(object): def __init__(self, wraps, mappings): """ * wraps - is the base exception type to wrap. * mappings - the dict of strings to mappings that represent the Exceptable chain. Strings will b...
PypiClean
/NERDA_Con-0.0-py3-none-any.whl/NERDA_Con/precooked.py
from NERDA_Con.datasets import get_dane_data, get_conll_data from NERDA_Con.models import NERDA import os import urllib from pathlib import Path from progressbar import ProgressBar pbar = None # helper function to show progressbar def show_progress(block_num, block_size, total_size): global pbar if pbar is No...
PypiClean
/BucketCache-0.12.1.tar.gz/BucketCache-0.12.1/bucketcache/utilities.py
from __future__ import absolute_import, division, print_function import inspect import json import sys import weakref from collections import namedtuple from copy import copy from functools import partial, wraps from decorator import decorator as decorator from .compat.contextlib import suppress from .exceptions imp...
PypiClean
/Inti-0.0.0a0.tar.gz/Inti-0.0.0a0/inti/MA/MAESLoader.py
import os import logging from elasticsearch import Elasticsearch, helpers from inti.MA.MAExecutor import MAExecutor from inti.MA.MAMetadata import MAColumnNames class MAESLoader: def __init__(self, file_name, index_name, field_name, col_names, sep='\t', buffer_size=1024 * 1024, db_ip='127.0.0....
PypiClean
/Auto-Research-1.0.tar.gz/Auto-Research-1.0/src/arxiv_public_data/s3_bulk_download.py
import os import re import gzip import json import glob import shlex import shutil import tarfile import boto3 import hashlib import requests import subprocess from functools import partial from multiprocessing import Pool from collections import defaultdict import xml.etree.ElementTree as ET from arxiv_public_data i...
PypiClean
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/prminwge.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def prminwge(path): """prminwge Data loads lazily. Type data(prminwge) into the console. A ...
PypiClean
/AaronTools-1.0b14.tar.gz/AaronTools-1.0b14/bin/grabThermo.py
import sys import argparse import os from glob import glob from warnings import warn from numpy import isclose from AaronTools.comp_output import CompOutput from AaronTools.fileIO import FileReader from AaronTools.geometry import Geometry from AaronTools.utils.utils import glob_files thermo_parser = argparse.Argum...
PypiClean
/DefDAP-0.93.5-py3-none-any.whl/defdap/base.py
import numpy as np import networkx as nx from defdap.quat import Quat from defdap import plotting from defdap.plotting import Plot, MapPlot, GrainPlot from skimage.measure import profile_line from defdap.utils import reportProgress class Map(object): """ Base class for a map. Contains common functionality...
PypiClean
/IdracRedfishSupportTest-0.0.7.tar.gz/IdracRedfishSupportTest-0.0.7/AssignHotSpareREDFISH.py
import argparse import getpass import json import logging import re import requests import sys import time import warnings from datetime import datetime from pprint import pprint warnings.filterwarnings("ignore") parser = argparse.ArgumentParser(description="Python script using Redfish API with OEM extension to ass...
PypiClean
/CC-dbgen-0.2.0.tar.gz/CC-dbgen-0.2.0/dbgen/support/datatypes/sqltypes.py
from abc import abstractmethod from re import split ################################################################################ class SQLType(object): """ SQL datatypes """ @abstractmethod def __str__(self)->str: pass def __repr__(self)->str: return str(self) def __eq__...
PypiClean
/EARL-pytorch-0.5.1.tar.gz/EARL-pytorch-0.5.1/rlgym/utils/math.py
import numpy as np def get_dist(x, y): return np.subtract(x, y) def vector_projection(vec, dest_vec, mag_squared=None): if mag_squared is None: norm = vecmag(dest_vec) if norm == 0: return dest_vec mag_squared = norm * norm if mag_squared == 0: return dest_ve...
PypiClean
/OctoPrint-Slack-0.2.2.tar.gz/OctoPrint-Slack-0.2.2/README.md
OctoPrint Slack Integration =========================== Send messages to your group's Slack chat when printing events happen! You need to set up an [Incoming Webhook](https://my.slack.com/services/new/incoming-webhook) integration on the Slack side to use this. Features -------- * Select which events you want to tri...
PypiClean
/BinTools-0.2.0.zip/BinTools-0.2.0/bintools/dwarf/expressions.py
from bintools.elf.exception import * from bintools.dwarf.enums import DW_OP class Instruction(object): def __init__(self, addr, opcode, operand_1=None, operand_2=None): self.addr = addr self.opcode = opcode self.operand_1 = operand_1 self.operand_2 = operand_2 def get(self...
PypiClean
/EVE-SRP-0.12.11.tar.gz/EVE-SRP-0.12.11/src/evesrp/models.py
from __future__ import absolute_import import datetime as dt from decimal import Decimal import six from six.moves import filter, map, range from sqlalchemy import event from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.event import listens_for from s...
PypiClean
/Hyperion-0.9.10.tar.gz/Hyperion-0.9.10/hyperion/grid/amr_grid.py
from __future__ import print_function, division import os import struct import hashlib from copy import deepcopy import h5py import numpy as np from ..util.meshgrid import meshgrid_nd from ..util.functions import FreezableClass, link_or_copy from astropy import log as logger from .grid_helpers import single_grid_dim...
PypiClean
/GloboNetworkAPI-0.9.6.tar.gz/GloboNetworkAPI-0.9.6/networkapiclient/ApiIPv4.py
from networkapiclient.ApiGenericClient import ApiGenericClient from networkapiclient.utils import build_uri_with_ids class ApiIPv4(ApiGenericClient): def __init__(self, networkapi_url, user, password, user_ldap=None, request_context=None): """Class constructor receives parameters to connect to the networ...
PypiClean
/Ideal%20Engine-1.0.2.tar.gz/Ideal Engine-1.0.2/engine/pickle.py
import sys import argparse from time import sleep import json import pickle from os import path def getData(): with open('title.txt', 'rb') as readTitle: titleList = pickle.load(readTitle) readTitle.close() with open('bio.txt', 'rb') as readBio: bioList = pickle.load(readBio) ...
PypiClean
/Naughty_and_Nice-7.7.1-py3-none-any.whl/naughty_and_nice/naughtyandnice.py
import tweepy import json import re import string import random from nltk.corpus import stopwords from nltk.tokenize import word_tokenize import nltk.classify.util from nltk.classify import NaiveBayesClassifier ##SET UP TWITTER #change this: with open('/home/pi/Documents/twitter_auth.json') as f: keys = json.load(...
PypiClean
/Kamaelia-0.6.0.tar.gz/Kamaelia-0.6.0/Tools/Whiteboard/WhiteboardPlayer.py
# whiteboard recorder # records the stream of data coming from a whiteboard system, timestamping the data as it goes import Axon from Axon.Component import component from Axon.Ipc import WaitComplete, producerFinished, shutdownMicroprocess from Kamaelia.Util.Console import ConsoleReader, ConsoleEchoer from Kamaelia...
PypiClean
/FuzzyClassificator-1.3.84-py3-none-any.whl/pybrain/datasets/reinforcement.py
__author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de' from pybrain.datasets.sequential import SequentialDataSet from pybrain.datasets.dataset import DataSet from scipy import zeros class ReinforcementDataSet(SequentialDataSet): def __init__(self, statedim, actiondim): """ initialize the reinforcement dat...
PypiClean
/ECRScan-0.2.2.tar.gz/ECRScan-0.2.2/ecrscan/command.py
import sys import logging import click from ecrscan.utility import init_boto3_clients from ecrscan.utility import get_results from ecrscan.utility import scan_image logging.basicConfig( level=logging.INFO, format='[%(levelname)s] %(asctime)s (%(module)s) %(message)s', datefmt='%Y/%m/%d-%H:%M:%S' ) SERVICE...
PypiClean
/KratosSwimmingDEMApplication-9.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/KratosMultiphysics/SwimmingDEMApplication/apply_porosity_solution_body_force_process.py
import KratosMultiphysics import KratosMultiphysics.SwimmingDEMApplication as KratosSDEM def Factory(settings, Model): if not isinstance(settings, KratosMultiphysics.Parameters): raise Exception("expected input shall be a Parameters object, encapsulating a json string") return ApplyPorositySolutionTran...
PypiClean
/AXX_AIAPI-1.3.0-py3-none-any.whl/axx_aiapp/templates/project_template/project_name/concurrent_log/__init__.py
import time import logging import logging.config import os from logging.handlers import TimedRotatingFileHandler import portalocker.constants as porta_lock_const from portalocker.utils import Lock as PortaLock class ConcurrentLogFileLock(PortaLock): def __init__(self, filename, *args, **kwargs): PortaLo...
PypiClean
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/js/tiny_mce/plugins/media/langs/en_dlg.js
tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be...
PypiClean
/OBP_reliability_pillar_1-0.0.12-py3-none-any.whl/OBP_reliability_pillar_1/ec2/instance_in_vpc.py
import botocore import logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger() def instance_in_vpc(self) -> dict: """ :param self: :return: """ logger.info(" ---Inside ec2 : instance_in_vpc()") result = True failReason = '' offenders = [] compliance_type = "E...
PypiClean
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/BootstrapValidator/js/language/sq_AL.js
(function($) { /** * Albanian language package * Translated by @desaretiuss */ $.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, { base64: { 'default': 'Ju lutem përdorni sistemin e kodimit Base64' }, between: { 'default': ...
PypiClean
/Apycula-0.9.0a1.tar.gz/Apycula-0.9.0a1/legacy/report.py
import json nodes = { 0: "A0", 1: "B0", 2: "C0", 3: "D0", 4: "A1", 5: "B1", 6: "C1", 7: "D1", 8: "A2", 9: "B2", 10: "C2", 11: "D2", 12: "A3", 13: "B3", 14: "C3", 15: "D3", 16: "A4", 17: "B4", 18: "C4", 19: "D4", 20: "A5", 21: "B5", 22: "C5", 23: "D5", 24: "A6", 25: "B6", 26: "C6", 27: "D6", 28: "A7", 29: "B7", 30: "C7...
PypiClean
/CROPS-0.1.1-py3-none-any.whl/crops/io/parsers.py
from crops.about import __prog__, __description__, __author__, __date__, __version__ import gemmi import os import csv from crops.elements.sequence import Sequence from crops.io.taggers import retrieve_id from crops.elements.intervals import intinterval def import_db(inpath,pdb_in=None): """Imports intervals dat...
PypiClean
/Data-Transformer-0.1.1.tar.gz/Data-Transformer-0.1.1/transformer/xformer.py
import csv import sys import lxml.etree as ET from jinja2 import Template def xslt_transformer(input_file_path, transformer_file_path): """ Transforms a input XML file `input_file_path` using the XSLT `transformer_file_path`. """ # perform transformation dom = ET.parse(input_file_path) xsl...
PypiClean
/Curp-1.3.1.tar.gz/Curp-1.3.1/curp/twobody/amberbase.py
from __future__ import print_function # standard module import os, sys import numpy import time # curp module topdir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) if topdir not in sys.path: sys.path.insert(0, topdir) import clog as logger #######################################################...
PypiClean
/HTSQL-2.3.3.tar.gz/HTSQL-2.3.3/src/htsql/core/cmd/act.py
from ..adapter import Adapter, adapt from ..error import Error, act_guard from ..util import Clonable from .command import Command, UniversalCmd, DefaultCmd, FormatCmd, FetchCmd from .summon import recognize from .embed import embed from ..syn.parse import parse from ..syn.syntax import Syntax from ..fmt.emit import ...
PypiClean
/Durus-4.2.tar.gz/Durus-4.2/durus/storage.py
import heapq from durus.serialize import unpack_record, split_oids, extract_class_name from durus.utils import int8_to_str import durus.connection class Storage (object): """ This is the interface that Connection requires for Storage. """ def __init__(self): raise RuntimeError("Storage is abstr...
PypiClean
/Elevator-0.5c.tar.gz/Elevator-0.5c/CHANGES.rst
0.5c / 2013-03-18 ================== * Fix : DatabaseStore last acess property * Fix: init script creates pid file * Fix: pyzmq version * Fix: explicit daemon init failures 0.5 / 2013-02-01 ================== * Remove: legacy setup_loggers function * fix #123: exposing a database object * ref #123: Re...
PypiClean
/Jetforce-0.9.1-py3-none-any.whl/jetforce/server.py
from __future__ import annotations import socket import sys import typing from twisted.internet import reactor as _reactor from twisted.internet.base import ReactorBase from twisted.internet.endpoints import SSL4ServerEndpoint from twisted.internet.protocol import Factory from twisted.internet.tcp import Port from ....
PypiClean
/Abyss-Shell-1.0.0.tar.gz/Abyss-Shell-1.0.0/Abyss/__init__.py
from colorama import Fore, Back, init from os import error, system, truncate from tqdm import tqdm import pyfiglet import requests import json import os # #https://download1518.mediafire.com/pjbmrxu3fyig/ygh79hofhj9npol/config.json dir_path = os.path.dirname(os.path.realpath(__file__)) def download(url, filename, cal...
PypiClean
/Downpour-0.2.tar.gz/Downpour-0.2/downpour/web/templates/media/js/common.js
function AJAX() { this.http = AJAX.CreateNewHTTPObject(); } AJAX.prototype.get = function(url, callback) { req = this.http; req.open('GET', url, true); req.setRequestHeader('Content-Type', 'text/plain'); req.onreadystatechange = function(transport) { if ((req.readyState == 4) && (req.status == 200)) callbac...
PypiClean
/Affirmations-0.0.10.tar.gz/Affirmations-0.0.10/README.md
# Affirmations A module that gives you a little bump of encouragement. ## Requirements - A positive attitude - A can-do spirit ## Installation ```bash pip install Affirmations ``` ## Usage Decorate any function to get a random affirmation printed to stdout every time that function is run ``` from Affirmations i...
PypiClean
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/api/mysql/mysql_proxy/datahub/datanodes/integration_datanode.py
import numpy as np from numpy import dtype as np_dtype import pandas as pd from pandas.api import types as pd_types from sqlalchemy.types import ( Integer, Float, Text ) from mindsdb_sql.parser.ast import Insert, Identifier, CreateTable, TableColumn, DropTables from mindsdb.api.mysql.mysql_proxy.datahub.datanodes...
PypiClean
/ESMValTool-2.9.0-py3-none-any.whl/esmvaltool/diag_scripts/autoassess/plot_autoassess_metrics.py
import logging import os import sys import yaml from esmvaltool.diag_scripts.autoassess._plot_mo_metrics import ( plot_nac, read_model_metrics, read_obs_metrics, ) logger = logging.getLogger(__name__) # Diagnostic that takes two datasets (control_model and exp_model # and observational data (ERA-Interim...
PypiClean
/Jupytils-0.41100000000000003.tar.gz/Jupytils-0.41100000000000003/Classification.py
import matplotlib.pyplot as plt from numpy import * from collections import Counter import numpy as np import pylab as pl from matplotlib import colors from matplotlib.colors import ListedColormap from sklearn import neighbors, datasets, cluster, preprocessing, decomposition, svm, datasets from sklearn.svm import SVC ...
PypiClean
/BottleOIDC-21.8.30.tar.gz/BottleOIDC-21.8.30/README.md
## BottleOIDC - OIDC Service Provider for Bottle **BottleOIDC** is an OpenID Connect module providing authentication and authorization for [Bottle web Framework](https://bottlepy.org) web apps. **BottleOIDC** supports OIDC auto discovery to simplify configuration and deployment. ### Installing ```bash # pip install...
PypiClean
/ModelSEEDpy-0.3.0.tar.gz/ModelSEEDpy-0.3.0/modelseedpy/community/mscompatibility.py
from collections import OrderedDict from cobra.core.metabolite import Metabolite from cobra.io.json import save_json_model from zipfile import ZipFile, ZIP_LZMA from warnings import warn from pprint import pprint import json, lzma, re, os class MSCompatibility: def __init__( self, modelseed_db_pat...
PypiClean
/Coopr-4.0.9597.tar.gz/Coopr-4.0.9597/README.txt
============ Coopr README ============ The Coopr project provides a wrapper to Pyomo. ------- License ------- BSD. See the LICENSE.txt file. ------------ Organization ------------ + Directories * coopr - The root directory for Coopr source code + Documentation and Bug Tracking * Trac wiki: https://softwa...
PypiClean
/NehorayRapid-0.0.1-py3-none-any.whl/mmedit/models/losses/perceptual_loss.py
import torch import torch.nn as nn import torchvision.models.vgg as vgg from mmcv.runner import load_checkpoint from torch.nn import functional as F from mmedit.utils import get_root_logger from ..registry import LOSSES class PerceptualVGG(nn.Module): """VGG network used in calculating perceptual loss. In t...
PypiClean
/Flask-Comment-0.1.0.tar.gz/Flask-Comment-0.1.0/src/flask_comment/__init__.py
import sys import typing as t from flask import Blueprint from flask import current_app from flask import Flask from flask import Markup from flask import request # sanity checking try: assert sys.version_info >= (3, 6, 0) except AssertionError: # pragma: no cover raise RuntimeError('Flask-Comment required P...
PypiClean
/CAMELS_library-0.3.tar.gz/CAMELS_library-0.3/plots/different_seeds/plot_CV.py
from pylab import * import numpy as np from matplotlib.ticker import ScalarFormatter import matplotlib.gridspec as gridspec from mpl_toolkits.axes_grid1.inset_locator import mark_inset from matplotlib.ticker import AutoMinorLocator from matplotlib.colors import LogNorm from matplotlib.patches import Ellipse rcParams["m...
PypiClean
/MACS-1.4.3.tar.gz/MACS-1.4.3/lib/IO/bedGraphIO.py
# ------------------------------------ # python modules # ------------------------------------ import os import sys import re import shutil from MACS1.IO.FeatIO import bedGraphTrackI from MACS1.IO.BinKeeper import BinKeeperII import time # ------------------------------------ # constants # ----------------------------...
PypiClean
/GaiaXPy-2.1.0.tar.gz/GaiaXPy-2.1.0/gaiaxpy/generator/synthetic_photometry_generator.py
from configparser import ConfigParser from gaiaxpy.config.paths import config_ini_file from gaiaxpy.core.satellite import BANDS from gaiaxpy.spectrum.sampled_basis_functions import SampledBasisFunctions from gaiaxpy.spectrum.single_synthetic_photometry import SingleSyntheticPhotometry from gaiaxpy.spectrum.utils impor...
PypiClean
/IRCLogParser-1.0.6.tar.gz/IRCLogParser-1.0.6/lib/vis.py
import matplotlib.pyplot as plt import numpy as np from scipy.optimize import curve_fit from sklearn.metrics import mean_squared_error import config import util import igraph from random import randint import math import matplotlib.pyplot as plt import os import in_out.saver as saver from numpy.random import normal fro...
PypiClean
/AMFM_decompy-1.0.11.tar.gz/AMFM_decompy-1.0.11/amfm_decompy/pYAAPT.py
import numpy as np import numpy.lib.stride_tricks as stride_tricks from scipy.signal import firwin, medfilt, lfilter from scipy.signal.windows import hann, kaiser import scipy.interpolate as scipy_interp import amfm_decompy.basic_tools as basic """ -------------------------------------------- Classes...
PypiClean
/MCRAMP-0.0.3-py3-none-any.whl/mcramp/scat/rescal.py
from .sprim import SPrim import numpy as np import pyopencl as cl import pyopencl.array as clarr import os class SRescal(SPrim): def __init__(self, target=[0,0,0], E0=0, dE=0, focus_r=0, idx=0, ctx=None, **kwargs): self.idx = np.uint32(idx) self.ctx = ctx self.target = np.array((target[0...
PypiClean
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_dua.js
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); return (i == -1) ? 0 : n.length - i - 1; } function getVF(n, opt_pre...
PypiClean
/DendroPy_calver-2023.330.2-py3-none-any.whl/dendropy/interop/paup.py
############################################################################## ## DendroPy Phylogenetic Computing Library. ## ## Copyright 2010-2015 Jeet Sukumaran and Mark T. Holder. ## All rights reserved. ## ## See "LICENSE.rst" for terms and conditions of usage. ## ## If you use this work or any portion there...
PypiClean
/CRLFsuite-2.5.2.tar.gz/CRLFsuite-2.5.2/crlfsuite/plugins/wafDetector.py
import re import json import requests import warnings from urllib.parse import urlparse from crlfsuite.utils.compatible import compatible_path warnings.filterwarnings('ignore') crlfsuite_dir = compatible_path(__file__.replace(compatible_path('/crlfsuite/plugins/wafDetector.py'), '')) def WafDetector(url): """ ...
PypiClean
/BlueWhale3-BlueWhale-0.0.54.tar.gz/BlueWhale3-BlueWhale-0.0.54/orangecontrib/blue_whale/widgets/utils/service_window.py
from AnyQt.QtWidgets import QLineEdit, QGridLayout, QPushButton, QMessageBox, QSizePolicy as Policy, QLabel, QCheckBox from AnyQt.QtCore import Qt, QSettings from Orange.widgets.widget import OWWidget from Orange.widgets.utils.widgetpreview import WidgetPreview from Orange.widgets import gui from Orange.widgets.setti...
PypiClean
/Fyreside-0.0.4-py3-none-any.whl/fyreside/__init__.py
from inspect import getmembers, isfunction, isclass import qtmud import qtmud.subscriptions from fyreside import cards, cmds, services, subscriptions, txt __version__ = '0.0.4' connected_players = list() """ The currently connected players. """ player_hands = dict() """ All the hands currently held by different pla...
PypiClean
/HavNegpy-1.2.tar.gz/HavNegpy-1.2/docs/_build/doctrees/nbsphinx/_build/doctrees/nbsphinx/_build/doctrees/nbsphinx/_build/doctrees/nbsphinx/_build/doctrees/nbsphinx/_build/html/hn_module_tutorial.ipynb
# Tutorial for the HN module of HavNegpy package ``` import numpy as np import pandas as pd import matplotlib.pyplot as plt import os import HavNegpy as dd %matplotlib qt os.chdir(r'M:\Marshall_Data\mohamed_data\mohamed_data\n44') def create_dataframe(f): col_names = ['Freq', 'T', 'Eps1', 'Eps2'] #f ...
PypiClean
/ESMValCore-2.9.0rc1.tar.gz/ESMValCore-2.9.0rc1/esmvalcore/preprocessor/_volume.py
import logging import dask.array as da import iris import numpy as np from ._shared import get_iris_analysis_operation, operator_accept_weights from ._supplementary_vars import register_supplementaries logger = logging.getLogger(__name__) def extract_volume( cube, z_min, z_max, interval_bounds='ope...
PypiClean
/Flask-Leancloud-Sms-0.1.tar.gz/Flask-Leancloud-Sms-0.1/flask_leancloud_sms.py
import json import requests class Leancloud_Sms(object): def __init__(self, app=None): self.app = app if app is not None: self.init_app(app) def init_app(self,app): self._app_id = app.config.get('LEANCLOUD_APP_ID', '') self._app_key = app.config.get('LEANCLOUD_APP_KEY...
PypiClean
/MakkaPakka-1.0.4.tar.gz/MakkaPakka-1.0.4/src/makka_pakka/parsing/detect_headings.py
from typing import Tuple from makka_pakka.exceptions.exceptions import ErrorType from makka_pakka.exceptions.exceptions import MKPKInvalidParameter from makka_pakka.exceptions.exceptions import MKPKNameError from makka_pakka.exceptions.exceptions import MKPKParsingError class HeadingStyle: """Enum of heading sty...
PypiClean
/EC2StepShell-1.1.1-py3-none-any.whl/ec2stepshell/core/ReverseShell.py
import os import re import traceback from termcolor import cprint from time import sleep from botocore.exceptions import ClientError from ec2stepshell.ssm.SsmWrapper import SsmWrapper from ec2stepshell.utils.constants import const, user_config from ec2stepshell.utils.terminal.TerminalEmulator import TerminalEmulator ...
PypiClean
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/summernote/lang/summernote-ja-JP.js
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else { var a = factory(); for(var i in a) (typeof exports === 'object' ? exports : roo...
PypiClean
/MLMath-0.0.0rc1.tar.gz/MLMath-0.0.0rc1/mlm/tf/_compile_cuda.py
import os from os.path import isfile, isdir, abspath, join, dirname import subprocess def compile_cuda_ops(gcc: str = None, nvcc: str = None, cuda_lib: str = None): tf_gcc = check_tf_cuda_compatibility() if gcc is None: gcc = tf_gcc if isfile(tf_gcc) else 'gcc...
PypiClean
/LiBai-0.1.1.tar.gz/LiBai-0.1.1/libai/data/data_utils/indexed_dataset.py
# copied from fairseq/fairseq/data/indexed_dataset.py # Removed IndexedRawTextDataset since it relied on Fairseq dictionary # other slight modifications to remove fairseq dependencies # Added document index to index file and made it accessible. # An empty sentence no longer separates documents. import logging imp...
PypiClean
/htpolynet-1.0.7.3.tar.gz/htpolynet-1.0.7.3/docs/source/install.rst
############################## Installation and Prerequisites ############################## Software Prequisites -------------------- The following commands should be in your path: 1. ``antechamber``, ``parmchk2``, and ``tleap`` (`AmberTools <https://ambermd.org/GetAmber.php#ambertools>`_, version 22 or higher); pr...
PypiClean
/170051277_trab_final_gces-0.5.0-py3-none-any.whl/170051277_trab_final_gces/src/data_pipeline/feature_engineering/key_smash.py
from statistics import mean class KeySmash: """A class for calculating metrics to indicate key smashing behavior in a text. Key smashing is the act of typing on a keyboard in a rapid and uncontrolled manner, often resulting in a series of random characters being entered into a document or text field. ...
PypiClean
/CubeLang-0.1.4-py3-none-any.whl/libcube/actions.py
import enum from abc import ABC, abstractmethod from typing import Union, List, Iterable, TypeVar, Optional, Set, Dict from .cube import Cube from .orientation import Orientation, Side, count_occurrences T = TypeVar("T") class Action(ABC): @abstractmethod def perform(self, cube: Cube, orientation: Orientati...
PypiClean
/Idmeneo_cdQa-0.0.tar.gz/Idmeneo_cdQa-0.0/retriever/text_transformers.py
import numpy as np import scipy.sparse as sp from sklearn.base import BaseEstimator, TransformerMixin from sklearn.utils.validation import check_is_fitted, check_array, FLOAT_DTYPES from sklearn.feature_extraction.text import _document_frequency from sklearn.preprocessing import normalize class BM25Transformer(Base...
PypiClean
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Model/Vocabulary/ApplicativeData.py
#+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocols | #+-...
PypiClean