id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/AstroCabTools-1.5.1.tar.gz/AstroCabTools-1.5.1/astrocabtools/mrs_subviz/src/utils/ellipse_xy_transformations.py
from photutils import EllipticalAperture, aperture_photometry import math __all__=["transform_xy_ellipse", "transform_ellipse_subband", "transform_ellipse_subband_from_coord"] def transform_xy_ellipse(centerX, centerY, aAxis, bAxis, cubeModel): """ Update rectangle data widgets and image object attributes :pa...
PypiClean
/Exegol-4.2.5.tar.gz/Exegol-4.2.5/exegol/config/UserConfig.py
from pathlib import Path from typing import List from exegol.config.ConstantConfig import ConstantConfig from exegol.console.ConsoleFormat import boolFormatter from exegol.utils.DataFileUtils import DataFileUtils from exegol.utils.MetaSingleton import MetaSingleton class UserConfig(DataFileUtils, metaclass=MetaSingl...
PypiClean
/Anthrax-0.1.0.tar.bz2/Anthrax-0.1.0/src/anthrax/field/text.py
import unicodedata import re import abc from anthrax.field.base import Field from anthrax import widget as w from gettext import gettext as _ from anthrax.exc import ValidationError, MissingData class TextField(Field): """Simple field that represents a string. Inherits regexp, min_len, and max_len arguents a...
PypiClean
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/inginious/frontend/task_factory.py
from os.path import splitext from inginious.common.filesystems import FileSystemProvider from inginious.common.log import get_course_logger from inginious.common.base import id_checker, get_json_or_yaml from inginious.common.task_file_readers.yaml_reader import TaskYAMLFileReader from inginious.common.exceptions import...
PypiClean
/ElectroMagneticPython-2.1.4-py3-none-any.whl/EMpy/RCWA.py
__author__ = "Lorenzo Bolla" import scipy as S from scipy.linalg import toeplitz, inv, eig, solve as linsolve from numpy import pi from EMpy.utils import ( cond, warning, BinaryGrating, SymmetricDoubleGrating, AsymmetricDoubleGrating, ) def dispersion_relation_ordinary(kx, ky, k, nO): """Dis...
PypiClean
/GooseSLURM-0.12.4.tar.gz/GooseSLURM-0.12.4/docs/python.rst
************* Python module ************* Overview ======== Write job scripts ----------------- .. autosummary:: GooseSLURM.scripts.plain GooseSLURM.scripts.tempdir GooseSLURM.files.cmake Parse ps -------- .. autosummary:: GooseSLURM.ps.read_interpret GooseSLURM.ps.read GooseSLURM.ps.interpret Goo...
PypiClean
/ChemGAPP-0.0.9-py3-none-any.whl/ChemGAPP_Package/ChemGAPP_Big/Add_Gene_Names.py
# In[ ]: import argparse import os import pandas as pd import re def get_options(): parser = argparse.ArgumentParser(description="Add the gene names from the plate info files to make the final dataset. The plate info files must be in a folder by themselves and should be .txt files.", ...
PypiClean
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/datatables-searchbuilder/js/dataTables.searchBuilder.min.js
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(k,m,l){if(k==...
PypiClean
/MyoSuite-2.0.1-py3-none-any.whl/myosuite/envs/myo/myobase/obj_hold_v0.py
import collections import numpy as np import gym from myosuite.envs.myo.base_v0 import BaseV0 class ObjHoldFixedEnvV0(BaseV0): DEFAULT_OBS_KEYS = ['hand_qpos', 'hand_qvel', 'obj_pos', 'obj_err'] DEFAULT_RWD_KEYS_AND_WEIGHTS = { "goal_dist": 100.0, "bonus": 4.0, "penalty": 10, } ...
PypiClean
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/pouchdb/dist/pouchdb.find.min.js
!function e(t,n,r){function i(u,s){if(!n[u]){if(!t[u]){var a="function"==typeof require&&require;if(!s&&a)return a(u,!0);if(o)return o(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[u]={exports:{}};t[u][0].call(f.exports,function(e){var n=t[u][1][e];return i(n||e)},f,f.exp...
PypiClean
/MnemoPwd-1.2.1-py3-none-any.whl/mnemopwd/server/clients/protocol/StateS2.py
# Copyright (c) 2015-2016, Thierry Lemeunier <thierry at lemeunier dot net> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright n...
PypiClean
/HBT_IP_Test-1.0.1-py3-none-any.whl/HBT_IP_Test/libs/isom/python/IsomDeviceCollections_e_pb2.py
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_in...
PypiClean
/Eventory-0.0.6.tar.gz/Eventory-0.0.6/eventory/ext/inktory.py
import clr import os import subprocess import sys from os import path from tempfile import TemporaryDirectory from System.IO import FileNotFoundException from eventory import EventoryParser, Eventructor, register_parser try: clr.AddReference("ink-engine-runtime") except FileNotFoundException: raise FileNotFo...
PypiClean
/Gbtestapi0.1-0.1a10-py3-none-any.whl/gailbot/core/utils/download.py
import shutil from typing import List from tqdm.auto import tqdm import requests from zipfile import ZipFile import os import socket from .logger import makelogger logger = makelogger("download") def download_from_urls( urls: List[str], download_dir: str, unzip: bool = True, chunkSize: int = 8192 ) -> List[str]...
PypiClean
/FlexGet-3.9.6-py3-none-any.whl/flexget/plugins/filter/age.py
from datetime import datetime from dateutil.parser import parse as dateutil_parse from loguru import logger from flexget import plugin from flexget.event import event from flexget.utils.tools import parse_timedelta logger = logger.bind(name='age') class Age: """ Rejects/accepts entries based on date in spe...
PypiClean
/DendroPy-4.6.1.tar.gz/DendroPy-4.6.1/src/dendropy/dataio/nexusreader.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
/FoilMesh-0.0.8.tar.gz/FoilMesh-0.0.8/foilmesh/meshio/_cli/_compress.py
import os import pathlib from .. import ansys, cgns, gmsh, h5m, mdpa, ply, stl, vtk, vtu, xdmf from .._common import error from .._helpers import _filetypes_from_path, read, reader_map def add_args(parser): parser.add_argument("infile", type=str, help="mesh file to compress") parser.add_argument( "--...
PypiClean
/2vyper-0.3.0.tar.gz/2vyper-0.3.0/src/twovyper/translation/expression.py
from functools import reduce from itertools import chain from typing import List, Optional, Tuple, Callable from twovyper.ast import ast_nodes as ast, names, types from twovyper.ast.arithmetic import Decimal from twovyper.ast.nodes import VyperFunction, VyperInterface, VyperVar, VyperEvent, VyperProgram from twovyper...
PypiClean
/Mezzanine-6.0.0.tar.gz/Mezzanine-6.0.0/mezzanine/core/static/mezzanine/tinymce/themes/modern/theme.min.js
tinymce.ThemeManager.add("modern",function(a){function b(){function b(b){var d,e=[];if(b)return l(b.split(/[ ,]/),function(b){function c(){var c=a.selection;"bullist"==f&&c.selectorChanged("ul > li",function(a,c){for(var d,e=c.parents.length;e--&&(d=c.parents[e].nodeName,"OL"!=d&&"UL"!=d););b.active(a&&"UL"==d)}),"numl...
PypiClean
/CodeIntel-2.0.0b19-cp34-cp34m-macosx_10_12_x86_64.whl/codeintel/codeintel2/lang_html.py
from __future__ import absolute_import import os import sys import logging import re import traceback from pprint import pprint from codeintel2.common import * from codeintel2.langintel import LangIntel from codeintel2.udl import UDLLexer, UDLBuffer, UDLCILEDriver, XMLParsingBufferMixin from codeintel2.lang_xml import...
PypiClean
/Flask-Wizard-0.5.28.tar.gz/Flask-Wizard-0.5.28/flask_wizard/telegram.py
from __future__ import absolute_import from __future__ import print_function import os import json import requests import base64 import sys import random import telepot import uuid import apiai import ast import pprint import time from timeit import default_timer as timer from flask import request from actions impor...
PypiClean
/Annalist-0.5.18.tar.gz/Annalist-0.5.18/annalist_root/annalist/models/entitydata.py
from __future__ import unicode_literals from __future__ import absolute_import, division, print_function __author__ = "Graham Klyne (GK@ACM.ORG)" __copyright__ = "Copyright 2014, G. Klyne" __license__ = "MIT (http://opensource.org/licenses/MIT)" import logging log = logging.getLogger(__name__) import os i...
PypiClean
/LstGen-0.6.2.tar.gz/LstGen-0.6.2/CHANGES.md
# Changes ## 0.6.2 * Added 2023 PAP from July ## 0.6.1 * Added 2023 PAP ## 0.6.0 * Added golang generator which supersedes go generator (thanks polderudo) * Fixed empty if-body in python * Added javascript example (thanks 0xCCD) * Added 2022 PAP (thanks 0xCCD) ## 0.5.4 * Added php BigDecimal fixes (thanks tburschka...
PypiClean
/FYS2130_FreqAn-0.1.5.tar.gz/FYS2130_FreqAn-0.1.5/FYS2130_FreqAn/Freq_Analysis.py
import numpy as np import matplotlib.pyplot as plt import time class Freq_Analysis: def __init__(self, signal, fs): self.signal = signal self.fs = fs # Sample frekvens self.dt = 1 / fs # Tid mellom samplingspunkter self.N = len(signal) # Antall samplingspunkter se...
PypiClean
/KratosStructuralMechanicsApplication-9.4-cp310-cp310-win_amd64.whl/KratosMultiphysics/StructuralMechanicsApplication/automatic_rayleigh_parameters_computation_process.py
import KratosMultiphysics as KM from KratosMultiphysics import eigen_solver_factory import KratosMultiphysics.StructuralMechanicsApplication as SMA def Factory(settings, Model): if not isinstance(settings, KM.Parameters): raise Exception("Expected input shall be a Parameters object, encapsulating a json s...
PypiClean
/DataProperty-1.0.1.tar.gz/DataProperty-1.0.1/dataproperty/_dataproperty.py
import typing from decimal import Decimal from typing import Any, Optional, cast import typepy from mbstrdecoder import MultiByteStrDecoder from typepy import ( Bool, DateTime, Dictionary, Infinity, Integer, IpAddress, Nan, NoneType, NullString, RealNumber, StrictLevel, ...
PypiClean
/3q-0.1.6.tar.gz/3q-0.1.6/qqq/github.py
from typing import Union, Dict import requests from requests.auth import HTTPBasicAuth class GitHub: _api_base_url = 'https://api.github.com' def __init__(self, username, token): self.username = username self.token = token @classmethod def verify_token(cls, username: str, token: str...
PypiClean
/Dulcinea-0.11.tar.gz/Dulcinea-0.11/lib/sort.py
import re from quixote.html import stringify def sort(seq): """(seq) -> [any] Sort 'seq', which must be a sequence object of any type. If 'seq' is a list object, it will be sorted in-place and returned. Otherwise, 'seq' will be converted to a list, sorted in-place, and returned. Don't just us...
PypiClean
/Lasco-0.1.0.tar.gz/Lasco-0.1.0/lasco/lascocli.py
from ConfigParser import ConfigParser from cmd import Cmd from optparse import OptionParser import os import readline # pyflakes: ignore import shlex import sys import traceback from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker import lasco.api from lasco.utils import repr_as_table DEFAU...
PypiClean
/MultivariaTeach-0.1.8.tar.gz/MultivariaTeach-0.1.8/multivariateach/multivariateach.py
import numpy as np import pandas as pd import scipy # Structures for returning results class MANOVAResult: def __init__(self, beta_hat, E, B, H, wilks_lambda, pillais_trace, hotelling_lawley_trace, roys_largest_root): self.beta_hat = beta_hat self.E = E self.B = B self.H = H ...
PypiClean
/Aesthete-0.4.2.tar.gz/Aesthete-0.4.2/aesthete/glypher/Alternatives.py
from Symbol import * import traceback import gtk from Phrase import * from Word import make_word import Parser class GlypherBox(GlypherPhrase) : colour = None anchor = None attached_to = None caret = None def __init__(self, phrase, colour = (0.9, 0.8, 0.6), anchor = None, attached...
PypiClean
/6D657461666C6F77-0.0.17.tar.gz/6D657461666C6F77-0.0.17/metaflow/tutorials/04-playlist-plus/README.md
# Episode 04-playlist-plus: The Final Showdown. -- **Now that we've improved our genre based playlist generator, expose a 'hint' parameter allowing the user to suggest a better bonus movie. The bonus movie is chosen from the movie that has the most similiar name to the 'hint'. This is achieved by importing a string ed...
PypiClean
/EOmaps-7.0-py3-none-any.whl/eomaps/cb_container.py
import logging from types import SimpleNamespace from functools import update_wrapper, partial, wraps from itertools import chain from .callbacks import ( ClickCallbacks, PickCallbacks, KeypressCallbacks, MoveCallbacks, ) from .helpers import register_modules import matplotlib.pyplot as plt from pypr...
PypiClean
/Flask-Discord-Interactions-2.1.2.tar.gz/Flask-Discord-Interactions-2.1.2/flask_discord_interactions/models/embed.py
from dataclasses import dataclass, asdict from typing import List from flask_discord_interactions.models.utils import LoadableDataclass @dataclass class Footer(LoadableDataclass): "Represents the footer of an Embed." text: str icon_url: str = None proxy_icon_url: str = None @dataclass class Field(L...
PypiClean
/NeodroidAgent-0.4.8-py36-none-any.whl/neodroidagent/agents/numpy_agents/model_free/tabular_q_agent.py
import typing from collections import defaultdict from itertools import count from typing import Any, Tuple import gym import numpy from tqdm import tqdm from neodroid.environments.gym_environment import NeodroidGymEnvironment from neodroidagent.agents.numpy_agents.numpy_agent import NumpyAgent class TabularQAgent(...
PypiClean
/LogWatcher-1.1.1.tar.gz/LogWatcher-1.1.1/logwatcher/logwatcher.py
# Copyright 2015 CityGrid Media, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
PypiClean
/Nuitka_winsvc-1.7.10-cp310-cp310-win_amd64.whl/nuitka/tools/testing/check_reference_counts/__main__.py
import os import sys from optparse import OptionParser from nuitka.PythonVersions import isDebugPython from nuitka.tools.testing.Common import checkReferenceCount, getTempDir from nuitka.Tracing import my_print from nuitka.utils.Execution import check_call from nuitka.utils.Importing import importFileAsModule def ma...
PypiClean
/NEMO_billing-2.6.7-py3-none-any.whl/NEMO_billing/rates/rates_class.py
from itertools import groupby from typing import Dict, Iterable, List from NEMO.models import Consumable, Tool from NEMO.rates import Rates from NEMO.utilities import distinct_qs_value_list from django.conf import settings from django.utils.formats import number_format from NEMO_billing.invoices.models import Invoice...
PypiClean
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/pkg_resources/_vendor/pyparsing.py
__doc__ = \ """ pyparsing module - Classes and methods to define and execute parsing grammars ============================================================================= The pyparsing module is an alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of re...
PypiClean
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/vgg.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim def vgg_arg_scope(weight_decay=0.0005): """Defines the VGG arg scope. Args: weight_decay: The l2 regularization coefficient. Returns: A...
PypiClean
/Gpxity-1.7.2-py3-none-any.whl/gpxity/util.py
# Copyright (c) 2019 Wolfgang Rohdewald <wolfgang@rohdewald.de> # See LICENSE for details. """This module defines some helpers.""" import os import datetime import time import logging import curses from math import isclose from gpxpy.geo import length as gpx_length __all__ = ['Duration', 'repr_timespan', 'uniq', '...
PypiClean
/CGlue-0.2.4.tar.gz/CGlue-0.2.4/cglue/data_types.py
from cglue.function import ArgumentList from cglue.utils.dict_processor import DictProcessor class TypeCategory: def __init__(self, type_collection, name, attributes): self._name = name self._attributes = attributes self._type_collection = type_collection self._data_processor = Dic...
PypiClean
/GTW-1.2.6.tar.gz/GTW-1.2.6/_OMP/_PAP/_E164/Country.py
from __future__ import division, print_function from __future__ import absolute_import, unicode_literals from _GTW import GTW from _TFL import TFL from _TFL.formatted_repr import formatted_repr from _TFL.I18N import _...
PypiClean
/MoonNectar-0.6.0.tar.gz/MoonNectar-0.6.0/mnectar/action.py
from __future__ import annotations import functools import inspect from copy import copy from dataclasses import dataclass, field from typing import Tuple, Callable, Optional from mnectar.util.signal import BoundSignal from mnectar.config import Setting from mnectar.util import classproperty class Actionable: ...
PypiClean
/JATA_Tools-0.1.9-py3-none-any.whl/CJH/CJH.py
import numpy as np import pandas as pd import requests from bs4 import BeautifulSoup def find_between(s, first, last): try: try: start = s.index(first) + len(first) end = s.index(last, start) return s[start:end] except ValueError: start = s.index(fir...
PypiClean
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/terminal/paint_target.py
class IPaintTarget(object): """This interface defines the methods for painting XML to the UIDL stream. @author: Vaadin Ltd. @author: Richard Lincoln @version: 1.1.2 """ def addSection(self, sectionTagName, sectionData): """Prints single XMLsection. Prints full XML section....
PypiClean
/OASYS1_HALF_SRW-0.0.3-py3-none-any.whl/orangecontrib/srw/widgets/tools/ow_srw_wavefront_to_wofry.py
from orangewidget import gui from oasys.widgets import widget from PyQt5.QtGui import QPalette, QColor, QFont from PyQt5.QtWidgets import QApplication, QMessageBox from PyQt5.QtCore import QRect from wofry.propagator.wavefront2D.generic_wavefront import GenericWavefront2D from orangecontrib.srw.util.srw_objects imp...
PypiClean
/FeatureSelectionUsingGA-1.0.0-py3-none-any.whl/fsga.py
import numpy as np import random import matplotlib.pyplot as plt import numpy.random as npr #Code author: Sriram Ranganathan, Meng. ECE, University of Waterloo class candidate: def __init__(self, bitstream, fitness = 0.00): self.fitness = fitness self.bitstream = bitstream def __eq__(self, x): if self...
PypiClean
/ModelSEEDpy-freiburgermsu-0.3.1.4.tar.gz/ModelSEEDpy-freiburgermsu-0.3.1.4/modelseedpy_freiburgermsu/community/commhelper.py
from modelseedpy_freiburgermsu.core.msminimalmedia import minimizeFlux_withGrowth, bioFlux_check from modelseedpy_freiburgermsu.core.exceptions import NoFluxError, ObjectiveError from modelseedpy_freiburgermsu.community.mscompatibility import MSCompatibility from modelseedpy_freiburgermsu.core.msmodelutl import MSModel...
PypiClean
/AMFM_decompy-1.0.11.tar.gz/AMFM_decompy-1.0.11/amfm_decompy/pyQHM.py
import numpy as np import scipy """ -------------------------------------------- Classes. -------------------------------------------- """ """ Creates a single component object. """ class ComponentObj(object): def __init__(self, H, harm): self.mag = H[harm, 0, :] self.phase = H[h...
PypiClean
/Flask-SignalBus-0.5.20.tar.gz/Flask-SignalBus-0.5.20/README.rst
Flask-SignalBus =============== **Flask-SignalBus** adds to Flask-SQLAlchemy the capability to *atomically* send messages (signals) over a message bus. **Important note:** Flask-SignalBus does work with Flask-SQLAlchemy 2.5, and does not work with Flask-SQLAlchemy 3.0 or later. And for this reason, SQLAlchemy 2.0 or ...
PypiClean
/Euphorie-15.0.2.tar.gz/Euphorie-15.0.2/src/euphorie/client/model.py
from AccessControl.interfaces import IUser from AccessControl.PermissionRole import _what_not_even_god_should_do from AccessControl.SecurityInfo import ClassSecurityInfo from Acquisition import aq_chain from Acquisition import aq_inner from Acquisition import aq_parent from collections import defaultdict from euphorie....
PypiClean
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/data/util/list_set.py
class ListSet(list): """ListSet is an internal Muntjac class which implements a combination of a List and a Set. The main purpose of this class is to provide a list with a fast L{contains} method. Each inserted object must by unique (as specified by L{equals}). The L{set} method allows duplicates becaus...
PypiClean
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/stats_scripts/perturbSeqAnalysis.py
import sys,string,os sys.path.insert(1, os.path.join(sys.path[0], '..')) ### import parent dir dependencies import export import unique import traceback """ Intersecting Coordinate Files """ def cleanUpLine(line): line = string.replace(line,'\n','') line = string.replace(line,'\c','') data = string.replac...
PypiClean
/DRSlib-DavidRodriguezSoaresCUI-0.8.0.tar.gz/DRSlib-DavidRodriguezSoaresCUI-0.8.0/src/DRSlib/path_tools.py
# pylint: disable=too-few-public-methods, import-error, wrong-import-order, broad-except """ Path tools ========== Easy to use tool to collect files matching a pattern. Note: both class and function versions should be euivalent, both kept just in case. Class may be usefull for repeated calls to `collect` method. ...
PypiClean
/KaTrain-1.14.0-py3-none-any.whl/katrain/core/tsumego_frame.py
from katrain.core.game_node import GameNode from katrain.core.sgf_parser import Move # tsumego frame ported from lizgoban by kaorahi # note: coords = (j, i) in katrain near_to_edge = 2 offence_to_win = 5 BLACK = "B" WHITE = "W" def tsumego_frame_from_katrain_game(game, komi, black_to_play_p, ko_p, margin): cur...
PypiClean
/Komoe-0.4.0-py3-none-any.whl/komoe/commands.py
import click import os from pathlib import Path import traceback import watchfiles from . import template, __version__ from .config import ProjectConfig from .builder import Builder from . import log @click.group() def main(): pass @main.command() @click.argument( "path", default=".", type=click.P...
PypiClean
/CaseRecommender-1.1.1.tar.gz/CaseRecommender-1.1.1/caserec/recommenders/rating_prediction/svd.py
# © 2019. Case Recommender (MIT License) import numpy as np from scipy.sparse.linalg import svds from caserec.recommenders.rating_prediction.base_rating_prediction import BaseRatingPrediction from caserec.utils.extra_functions import timed __author__ = 'Arthur Fortes <fortes.arthur@gmail.com>' class SVD(BaseRating...
PypiClean
/Beetle_Preview-0.1.0-py3-none-any.whl/beetle_preview/__init__.py
from beetle.renderers import MissingRendererError from http import server from socketserver import TCPServer from watchdog.observers import Observer from watchdog.events import LoggingEventHandler from watchdog.events import FileSystemEventHandler from hashlib import md5 import os class Updater(FileSystemEventHandler)...
PypiClean
/Cuckoo-2.0.7a1.tar.gz/Cuckoo-2.0.7a1/cuckoo/processing/apkinfo.py
import hashlib import logging import os import zipfile from cuckoo.common.objects import File from cuckoo.common.abstracts import Processing from cuckoo.common.exceptions import CuckooProcessingError log = logging.getLogger(__name__) class ApkInfo(Processing): """Static android information about analysis sessio...
PypiClean
/Nano-CAT-0.7.2.tar.gz/Nano-CAT-0.7.2/nanoCAT/ff/cp2k_utils.py
from scm.plams import Molecule, Settings, Atom __all__ = ['set_cp2k_element', 'set_cp2k_param'] def set_cp2k_element(settings: Settings, mol: Molecule) -> None: """Set the FORCE_EVAL/SUBSYS/KIND/ELEMENT_ keyword(s) in CP2K job settings. Performs an inplace update of the input.force_eval.subsys key in **sett...
PypiClean
/Chubasquero-1.0.0.tar.gz/Chubasquero-1.0.0/chubasquero/static/post.js
// This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be ...
PypiClean
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Platform/__init__.py
__revision__ = "src/engine/SCons/Platform/__init__.py 2014/07/05 09:42:21 garyo" import SCons.compat import imp import os import sys import tempfile import SCons.Errors import SCons.Subst import SCons.Tool def platform_default(): """Return the platform string for our execution environment. The returned v...
PypiClean
/Layernode-0.0.3.tar.gz/Layernode-0.0.3/layernode/peer_check.py
import time import uuid from layernode import blockchain from layernode import ntwrk from layernode import tools from layernode.service import Service, threaded, sync class PeerCheckService(Service): def __init__(self, engine, new_peers): # This logic might change. Here we add new peers while initializin...
PypiClean
/Diofant-0.14.0a2.tar.gz/Diofant-0.14.0a2/diofant/domains/complexfield.py
from __future__ import annotations import mpmath from ..core import Float, I from ..polys.polyerrors import CoercionFailed from .characteristiczero import CharacteristicZero from .field import Field from .mpelements import MPContext from .simpledomain import SimpleDomain class ComplexField(CharacteristicZero, Simp...
PypiClean
/MagicBus-4.1.2.tar.gz/MagicBus-4.1.2/magicbus/plugins/tasks.py
import os import re import sys import time import threading from magicbus.plugins import SimplePlugin from magicbus.compat import get_thread_ident, TimerClass # _module__file__base is used by Autoreload to make # absolute any filenames retrieved from sys.modules which are not # already absolute paths. This is to wo...
PypiClean
/DeriveAlive-1.0.1.tar.gz/DeriveAlive-1.0.1/README.md
[![Build Status](https://travis-ci.com/cs207-group19/cs207-FinalProject.svg?branch=master)](https://travis-ci.com/cs207-group19/cs207-FinalProject.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/github/cs207-group19/cs207-FinalProject/badge.svg?branch=master)](https://coveralls.io/github/cs207-group1...
PypiClean
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Scanner/Prog.py
__revision__ = "src/engine/SCons/Scanner/Prog.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan" import SCons.Node import SCons.Node.FS import SCons.Scanner import SCons.Util # global, set by --debug=findlibs print_find_libs = None def ProgramScanner(**kw): """Return a prototype Scanner in...
PypiClean
/FALCONN-1.3.1.tar.gz/FALCONN-1.3.1/external/pybind11/docs/release.rst
To release a new version of pybind11: - Update the version number and push to pypi - Update ``pybind11/_version.py`` (set release version, remove 'dev'). - Update ``PYBIND11_VERSION_MAJOR`` etc. in ``include/pybind11/detail/common.h``. - Ensure that all the information in ``setup.py`` is up-to-date. - ...
PypiClean
/Kallithea-0.7.0.tar.gz/Kallithea-0.7.0/kallithea/model/pull_request.py
import datetime import logging import re from tg import request from tg.i18n import ugettext as _ from kallithea.lib import auth, hooks, webutils from kallithea.lib.utils import extract_mentioned_users from kallithea.lib.utils2 import ascii_bytes, short_ref_name from kallithea.model import changeset_status, comment, ...
PypiClean
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/js/jquery/ui/minified/jquery.ui.position.min.js
(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width(...
PypiClean
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas_rhino/utilities/constructors.py
from __future__ import print_function from __future__ import absolute_import from __future__ import division from compas.utilities import geometric_key import Rhino import scriptcontext as sc __all__ = ["volmesh_from_polysurfaces"] def volmesh_from_polysurfaces(cls, guids, precision=None): """Construct a volu...
PypiClean
/Lotlan_Scheduler-1.1.2.tar.gz/Lotlan_Scheduler-1.1.2/lotlan_scheduler/api/materialflow.py
# standard libraries import uuid import networkx as nx import matplotlib.pyplot as plt # local sources from lotlan_scheduler.api.event import Event from lotlan_scheduler.api.transportorder import TransportOrder from lotlan_scheduler.logger.sqlite_logger import SQLiteLogger from lotlan_scheduler.petri_net.logic impo...
PypiClean
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/meter_calendarized_use_vs_weather_response_py3.py
from msrest.serialization import Model class MeterCalendarizedUseVsWeatherResponse(Model): """MeterCalendarizedUseVsWeatherResponse. :param year: The year :type year: int :param is_heating_weather_sensitive: Is heating weather sensitive? :type is_heating_weather_sensitive: bool :param winter...
PypiClean
/Eryn-1.1.4.tar.gz/Eryn-1.1.4/eryn/backends/hdfbackend.py
from __future__ import division, print_function __all__ = ["HDFBackend", "TempHDFBackend", "does_hdf5_support_longdouble"] import os from tempfile import NamedTemporaryFile import numpy as np from .. import __version__ from .backend import Backend try: import h5py except ImportError: h5py = None def do...
PypiClean
/Evmlab-0.3.0.0.1-py3-none-any.whl/evmlab/contract.py
import re from evmlab.opcodes import parseCode """ Solidity source code mappings, as documented [here](http://solidity.readthedocs.io/en/develop/miscellaneous.html#source-mappings) """ def update(original, changes): retval = [] for i in range(0, len(original)): val = original[i] if i < len...
PypiClean
/Django_patch-2.2.19-py3-none-any.whl/django/utils/termcolors.py
color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white') foreground = {color_names[x]: '3%s' % x for x in range(8)} background = {color_names[x]: '4%s' % x for x in range(8)} RESET = '0' opt_dict = {'bold': '1', 'underscore': '4', 'blink': '5', 'reverse': '7', 'conceal': '8'} def coloriz...
PypiClean
/Moments-2.0.tar.gz/Moments-2.0/moments/export.py
import sys, subprocess, os, re from moments.journal import Journal from moments.tag import Tags from moments.path import Path, load_journal from moments.timestamp import Timestamp def merge_many(source, destination, add_tags=[]): """ use load journal to load the source directory then save the resulting jo...
PypiClean
/CmlArabicReaderThird-0.1-py3-none-any.whl/ThirdcamelArabicReader/camel_tools/utils/charmap.py
# MIT License # # Copyright 2018-2021 New York University Abu Dhabi # # 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, c...
PypiClean
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/setuptools/package_index.py
import sys import os import re import shutil import socket import base64 import hashlib import itertools import warnings from functools import wraps from setuptools.extern import six from setuptools.extern.six.moves import urllib, http_client, configparser, map import setuptools from pkg_resources import ( CHECKO...
PypiClean
/AutoTorch-0.0.2b20200818.tar.gz/AutoTorch-0.0.2b20200818/autotorch/scheduler/remote/remote.py
import os import time import signal import atexit import weakref import logging import subprocess import concurrent from threading import Thread import multiprocessing as mp from distributed import Client from .ssh_helper import start_scheduler, start_worker __all__ = ['Remote'] logger = logging.getLogger(__name__)...
PypiClean
/GPyM-0.60b.tar.gz/GPyM-0.60b/get_dtime_gpm.py
import os,sys from optparse import OptionParser from numpy import array #from datetime import datetime, timedelta def get_dtime_gpm(srcPath, fn_read): if 'GMI' in srcPath : h5Grp = 'S1' elif 'DPR' in srcPath : h5Grp = 'NS' elif 'KuPR' in srcPath : h5Grp = 'NS' ...
PypiClean
/Flask-SQLAlchemy-Booster-0.6.31.tar.gz/Flask-SQLAlchemy-Booster-0.6.31/flask_sqlalchemy_booster/entities_router/__init__.py
from flask import Response import json from schemalite.core import json_encoder from .crud_constructors import ( construct_get_view_function, construct_index_view_function, construct_post_view_function, construct_put_view_function, construct_delete_view_function, construct_patch_view_function, construc...
PypiClean
/My-APScheduler-3.9.5.tar.gz/My-APScheduler-3.9.5/apscheduler/jobstores/mongodb.py
from __future__ import absolute_import import warnings from apscheduler.jobstores.base import BaseJobStore, JobLookupError, ConflictingIdError from apscheduler.util import maybe_ref, datetime_to_utc_timestamp, utc_timestamp_to_datetime from apscheduler.job import Job try: import cPickle as pickle except ImportErr...
PypiClean
/NSoL-0.1.14.tar.gz/NSoL-0.1.14/nsol/primal_dual_solver.py
import numpy as np from nsol.solver import Solver import pysitk.python_helper as ph ## # First-order primal-dual algorithm for convex problems # min_x [f(x) + alpha g(Bx)] with B being a continuous linear operator. # class PrimalDualSolver(Solver): ## # Store all essential variables # \date 2017-...
PypiClean
/GradAttack-0.1.2.tar.gz/GradAttack-0.1.2/gradattack/datamodules.py
import os from typing import Optional import numpy as np import torch import torchvision.datasets as datasets import torchvision.transforms as transforms from pytorch_lightning.core.datamodule import LightningDataModule from torch.utils.data import Subset from torch.utils.data.dataloader import DataLoader from torch.u...
PypiClean
/Cola-0.1.0b0.tar.gz/Cola-0.1.0b0/cola/core/counter.py
import threading class Aggregator(object): def create_combiner(self, val): raise NotImplementedError def merge_combiner(self, combiner1, combiner2): raise NotImplementedError def merge_val(self, combiner, val): raise NotImplementedError class AddAggregator(Aggregator)...
PypiClean
/ChadBot6-0.1-py3-none-any.whl/ChadBot/core/FAQ.py
from typing import List, Union, Dict, Tuple import os import numpy as np from .exceptions import * from .generation import GenerateManager import pickle def save_dict(obj, path): with open(path, 'wb') as f: pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL) def load_dict(path): with open(path, 'rb') as f: ...
PypiClean
/Flask-Docker-0.2.0.tar.gz/Flask-Docker-0.2.0/README.rst
|Build Status| |Coverage Status| |PyPI Version| |Wheel Status| Flask-Docker ============ Flask-Docker is an extension for Flask_ that integrates Docker_ client into your application. It is based on the official client docker-py_. .. _Flask: http://flask.pocoo.org .. _Docker: https://www.docker.com .. _docker-py: htt...
PypiClean
/KiMoPack-7.0.14.tar.gz/KiMoPack-7.0.14/docs/source/Introduction.rst
Introduction ============= KiMoPack is a project for the handling of spectral data measure at multiple time-points. The current design is optimised for the use with optical transient absorption data, but it has been successfully adapted for the use with transient x-ray emission and spectro-electro chemistry data. It ...
PypiClean
/ChemListem-0.1.0.tar.gz/ChemListem-0.1.0/chemlistem/ensemblemodel.py
import sys from collections import defaultdict from datetime import datetime from .tradmodel import TradModel, get_trad_model from .minimodel import MiniModel, get_mini_model defaultmodel = None defaultmodelgpu = False def get_ensemble_model(version="0.1.0", gpu=False): """ Gets the default ensemble model - b...
PypiClean
/Gritty-0.1.3.zip/Gritty-0.1.3/gritty/demos/game_of_life.py
import pygame import itertools from gritty.demos import basic_grid # gritty demo # Copyright 2013 Joe Cross # This is free software, released under The GNU Lesser General Public License, version 3. # You are free to use, distribute, and modify pyGrid. If modification is your game, # it is recommended that you read the...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/charting/plot2d/Stacked.js.uncompressed.js
define("dojox/charting/plot2d/Stacked", ["dojo/_base/lang", "dojo/_base/declare", "dojo/_base/array", "./Default", "./common", "dojox/lang/functional", "dojox/lang/functional/reversed", "dojox/lang/functional/sequence"], function(lang, declare, arr, Default, dc, df, dfr, dfs){ /*===== var Default = dojox.charting.p...
PypiClean
/OctoPrint-1.9.2.tar.gz/OctoPrint-1.9.2/src/octoprint/vendor/sockjs/tornado/transports/htmlfile.py
from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.transports.htmlfile ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HtmlFile transport implementation. """ import re from octoprint.vendor.sockjs.tornado import proto from octoprint.vendor.sockjs.tornado.transports ...
PypiClean
/MeaningCloud-python-2.0.0.tar.gz/MeaningCloud-python-2.0.0/meaningcloud/Request.py
import requests import sys if sys.version_info.major < 3: from urllib import urlencode elif sys.version_info.major == 3: from urllib.parse import urlencode class Request: _timeout = 60 _url = "" _key = "" _params = {} _file = {} CONTENT_TYPE_TXT = 'txt' CONTENT_TYPE_URL = 'url' ...
PypiClean
/Kadabra-0.5.0.tar.gz/Kadabra-0.5.0/kadabra/channels.py
from .metrics import Metrics import logging, json class RedisChannel(object): """A channel for transporting metrics using Redis. :type host: string :param host: The host of the Redis server. :type port: int :param port: The port of the Redis server. :type db: int :param db: The database...
PypiClean
/MindustryCompiler-2.1-py3-none-any.whl/compiler/yacc/grammar/InstrASM/op.py
from .._start import grammar, YaccProduction from .. import asmError as err from ...classes import AsmInst, Variable, KeyWord @grammar def opResultTwoArgs(p: YaccProduction): '''ligne : op opTwoArgs ID instrArgs EndLine''' args = p[4] if len(args) != 2: raise err.tooManyArgs(p, 2, len(args)) p...
PypiClean
/MozPhab-1.4.3-py3-none-any.whl/mozphab/repository.py
import json import os import urllib.parse from typing import ( List, Optional, ) from mozphab import environment from .conduit import conduit, normalise_reviewer from .exceptions import Error from .helpers import ( get_arcrc_path, has_arc_rejections, read_json_field, ) from .logger import logger...
PypiClean
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/mmdetection/mmdet/models/dense_heads/anchor_free_head.py
import warnings from abc import abstractmethod import torch import torch.nn as nn from mmcv.cnn import ConvModule from mmcv.runner import force_fp32 from mmdet.core import build_bbox_coder, multi_apply from mmdet.core.anchor.point_generator import MlvlPointGenerator from ..builder import HEADS, build_loss from .base_...
PypiClean
/Gxsphinx-markdown-tables-1.0.8.tar.gz/Gxsphinx-markdown-tables-1.0.8/sphinx_markdown_tables/__init__.py
import re from sphinx_markdown_tables import __version__ def get_str_len(in_str): str_len = 0 for s in in_str: if s >= '\u4e00' and s <= '\u9fff': str_len += 2 elif s >= '\uff00' and s <= '\uffef': str_len += 2 else: str_len += 1 return str_len ...
PypiClean