id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/FlexGet-3.9.6-py3-none-any.whl/flexget/api/core/user.py | from flask import Response, jsonify, request
from flask_login import current_user
from sqlalchemy.orm import Session
from flexget.api import APIResource, api
from flexget.api.app import BadRequest, base_message_schema, success_response
from flexget.webserver import WeakPassword, change_password, generate_token
user_a... | PypiClean |
/Chromify-1.1.21.tar.gz/Chromify-1.1.21/README.md | # Chromify - Python Library Documentation
Chromify is a Python library that provides functionalities for color manipulation and conversion. It allows you to convert between different color representations such as RGB, HEX, HSL, CMYK, and HSV, and perform various color operations.


<br />
THIS MODULE HELP YOU FOR WRITING MARKUP (HTM) & MARKDOWN (MD) IN YOUR PYTHON SCRIPT.
- - -
## start with Mark2PY
For using Mark2PY, just you must PIP it.
`> pip install Mark2PY`
## MarkDown
this module, inclue **mistune** for... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/uuid/_base.js.uncompressed.js | define("dojox/uuid/_base", ['dojo/_base/kernel', 'dojo/_base/lang'], function(dojo){
dojo.getObject("uuid", true, dojox);
// Public constants:
dojox.uuid.NIL_UUID = "00000000-0000-0000-0000-000000000000";
dojox.uuid.version = {
// Enumeration for the different UUID versions.
UNKNOWN: 0,
TIME_BASED: 1,
DCE_SECURIT... | PypiClean |
/MapProxy-1.16.0.tar.gz/MapProxy-1.16.0/mapproxy/seed/cleanup.py |
from __future__ import print_function
import os
from mapproxy.compat.itertools import izip_longest
from mapproxy.seed.util import format_cleanup_task
from mapproxy.util.fs import cleanup_directory
from mapproxy.seed.seeder import (
TileWorkerPool, TileWalker, TileCleanupWorker,
SeedProgress,
)
from mapproxy.s... | PypiClean |
/M2CryptoWin32-0.21.1-3.tar.gz/M2CryptoWin32-0.21.1-3/M2Crypto/SSL/Context.py | __all__ = ['map', 'Context']
from weakref import WeakValueDictionary
# M2Crypto
import cb
from M2Crypto import util, BIO, Err, RSA, m2, X509
class _ctxmap:
singleton = None
def __init__(self):
self.map = WeakValueDictionary()
def __getitem__(self, key):
return self.map[key]
def __s... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/ol-2.13/lib/OpenLayers/Geometry/Collection.js | * @requires OpenLayers/Geometry.js
*/
/**
* Class: OpenLayers.Geometry.Collection
* A Collection is exactly what it sounds like: A collection of different
* Geometries. These are stored in the local parameter <components> (which
* can be passed as a parameter to the constructor).
*
* As new geometries are a... | PypiClean |
/Mopidy-QR-0.0.1.tar.gz/Mopidy-QR-0.0.1/mopidy_qr/frontend.py | from pyzbar import pyzbar
import threading
import time
import logging
import pykka
from mopidy import core
logger = logging.getLogger(__name__)
class QRFrontend(pykka.ThreadingActor, core.CoreListener):
def __init__(self, config, core):
super().__init__()
self.core = core
self.config = c... | PypiClean |
/MPInterfaces_Latest-2.0.3.tar.gz/MPInterfaces_Latest-2.0.3/mpinterfaces/mpint_parser.py |
from __future__ import division, print_function, unicode_literals, \
absolute_import
from six.moves import range
from argparse import ArgumentParser
def mpint_parse_arguments(args):
m_description = """
Management tool for vasp projects, starting from
encut, kpoint or other parameter optimization of till the... | PypiClean |
/DeepPhysX.Sofa-22.12.1.tar.gz/DeepPhysX.Sofa-22.12.1/examples/features/prediction.py | import os
# Sofa related imports
import Sofa.Gui
# DeepPhysX related imports
from DeepPhysX.Sofa.Pipeline.SofaPrediction import SofaPrediction
from DeepPhysX.Sofa.Environment.SofaEnvironmentConfig import SofaEnvironmentConfig
from DeepPhysX.Torch.FC.FCConfig import FCConfig
# Session imports
from Environment.Environ... | PypiClean |
/Geode_GEM-0.12.0-py3-none-any.whl/geode_gem/__main__.py |
# Filesystem
from pathlib import Path
from shutil import rmtree
# GEM
from geode_gem.engine.api import GEM
from geode_gem.engine.utils import copy, get_data
from geode_gem.engine.lib.configuration import Configuration
from geode_gem.ui.data import Icons, Columns, Folders, Metadata
from geode_gem.ui.utils import magi... | PypiClean |
/Docker_Compose_Templer-1.1.0-py3-none-any.whl/docker_compose_templer/utils.py | def merge_dicts(x, y):
"""Recursively merges two dicts.
When keys exist in both the value of 'y' is used.
Args:
x (dict): First dict
y (dict): Second dict
Returns:
dict: The merged dict
"""
if x is None and y is None:
return {}
if x is None:
return ... | PypiClean |
/ImSwitchUC2-2.1.0.tar.gz/ImSwitchUC2-2.1.0/imswitch/imreconstruct/controller/ScanParamsController.py | import copy
from .basecontrollers import ImRecWidgetController
class ScanParamsController(ImRecWidgetController):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._parDict = {
'dimensions': [self._widget.r_l_text, self._widget.u_d_text, self._widget.b_f_tex... | PypiClean |
/ElmaWebAPI-0.1.3-py3-none-any.whl/elmawebapi/services/auth.py | from datetime import datetime
from json import JSONDecodeError
import requests
from . import base, decorators
LOGIN_WITH = "/API/REST/Authorization/LoginWith"
SERVER_TIME = "/API/REST/Authorization/ServerTime"
SERVER_TIME_UTC = "/API/REST/Authorization/ServerTimeUTC"
def _parse_time(server_response: str) -> dateti... | PypiClean |
/Firefly%20III%20API%20Python%20Client-1.5.6.post2.tar.gz/Firefly III API Python Client-1.5.6.post2/firefly_iii_client/model/budget_spent.py | import re # noqa: F401
import sys # noqa: F401
from firefly_iii_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,... | PypiClean |
/Demomgr-1.10.1-py3-none-any.whl/demomgr/threads/rcon.py | import queue
import socket
import struct
from demomgr.threads._threadsig import THREADSIG
from demomgr.threads._base import _StoppableBaseThread
AUTH = 3
AUTH_RESPONSE = 2
EXECCOMMAND = 2
RESPONSE_VALUE = 0
MAKE_SURE = "Is TF2 running with -usercon and net_start?"
class RCONPacketSizeError(ValueError):
pass
class... | PypiClean |
/DeadOrNot-1.0.2.tar.gz/DeadOrNot-1.0.2/README.md | # DeadOrNot
DeadOrNot is a Python program that parses a file for URLs and returns information about the HTTP status of those links to the command line

## Usage
Use the -h option to see information and other options
```bash
python deadOrNot.py -h
```

from i... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_en-sb.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 |
/Djaloha-0.4.2.tar.gz/Djaloha-0.4.2/djaloha/static/aloha.0.20/plugins/extra/zemanta/lib/zemanta-plugin.js | define(
[
'aloha',
'aloha/jquery',
'aloha/plugin',
'aloha/floatingmenu',
'i18n!zemanta/nls/i18n',
'i18n!aloha/nls/i18n',
'aloha/console',
'css!zemanta/css/zemanta-widget-alohaeditor.css',
],
function(Aloha, jQuery, Plugin, FloatingMenu, i18n, i18nCore, console) {
var
GENTICS = window.GENTICS,
active = fa... | PypiClean |
/Marl_Neon_Grid-0.1.4.5-py3-none-any.whl/marl_neon_grid/environments/closed_rooms/closed_rooms.py | import random
from marl_neon_grid.environments.gridworld import GridWorld
from marl_neon_grid.entitites import Wall, Agent, Food, Entities, Floor, Zone
from marl_neon_grid.commands import MovementCommand
from pathlib import Path
from marl_neon_grid.environments.closed_rooms.game_state import ClosedRoomsGameState
impor... | PypiClean |
/FlashMHA-0.0.5.tar.gz/FlashMHA-0.0.5/README.md | # FlashMHA
FlashMHA is a PyTorch implementation of the Flash Multi-Head Attention mechanism. It is designed to be efficient and flexible, allowing for both causal and non-causal attention. The implementation also includes support for the Flash Attention mechanism, which is a highly efficient attention mechanism designe... | PypiClean |
/ExecFlowSDK-0.3.0.tar.gz/ExecFlowSDK-0.3.0/execflow/wrapper/data/resourceconfig.py | # pylint: disable=line-too-long,invalid-name
from typing import TYPE_CHECKING
from aiida.common.exceptions import ValidationError
from oteapi.models import ResourceConfig
from execflow.wrapper.data.genericconfig import GenericConfigData
from execflow.wrapper.data.secretconfig import SecretConfigData
if TYPE_CHECKING... | PypiClean |
/Alpha-Mind-0.3.1.tar.gz/Alpha-Mind-0.3.1/alphamind/benchmarks/data/winsorize.py | import datetime as dt
import numpy as np
import pandas as pd
from alphamind.data.winsorize import winsorize_normal
def benchmark_winsorize_normal(n_samples: int, n_features: int, n_loops: int) -> None:
print("-" * 60)
print("Starting winsorize normal benchmarking")
print("Parameters(n_samples: {0}, n_fe... | PypiClean |
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/fast-glob/out/index.js | "use strict";
const taskManager = require("./managers/tasks");
const patternManager = require("./managers/patterns");
const async_1 = require("./providers/async");
const stream_1 = require("./providers/stream");
const sync_1 = require("./providers/sync");
const settings_1 = require("./settings");
const utils = require(... | PypiClean |
/KratosOptimizationApplication-9.4-cp310-cp310-win_amd64.whl/KratosMultiphysics/OptimizationApplication/algorithms/standardized_constraint.py | import KratosMultiphysics as Kratos
import KratosMultiphysics.OptimizationApplication as KratosOA
from KratosMultiphysics.OptimizationApplication.utilities.optimization_problem import OptimizationProblem
from KratosMultiphysics.OptimizationApplication.responses.response_routine import ResponseRoutine
from KratosMultiph... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/grid/enhanced/_Events.js | if(!dojo._hasResource["dojox.grid.enhanced._Events"]){
dojo._hasResource["dojox.grid.enhanced._Events"]=true;
dojo.provide("dojox.grid.enhanced._Events");
dojo.declare("dojox.grid.enhanced._Events",null,{_events:null,headerCellActiveClass:"dojoxGridHeaderActive",cellActiveClass:"dojoxGridCellActive",rowActiveClass:"doj... | PypiClean |
/MATE_for_Dummies-0.5.2-py3-none-any.whl/mate4dummies/testing/debugger_MATE_for_Dummies.py |
# You must open an experiment in MATRIX with an I(t) channel first.
import mate4dummies.objects as mo
def read_prop(obj, prop):
out = getattr(obj, prop)()
print(prop + ':', out)
channel_props = ['Enable', 'Enable_Storing']
clock_props = ['Enable', 'Period', 'Samples']
experiment_props = ['Bricklet_Ready', ... | PypiClean |
/Ibidas-0.1.26.tar.gz/Ibidas-0.1.26/ibidas/utils/toposort.py | import copy
class CycleError(RuntimeError):
pass
class StableTopoSortGraph(object):
def __init__(self):
self.nodes = []
self.parents = {}
self.ancestors = {}
def hasNode(self, node):
return node in self.parents
def getNodes(self):
return self.nodes
def ke... | PypiClean |
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/demo/sampler/features/menubar/MenuBarCollapsingExample.py | from muntjac.api import VerticalLayout
from muntjac.ui.menu_bar import MenuBar, ICommand
from muntjac.terminal.external_resource import ExternalResource
class MenuBarCollapsingExample(VerticalLayout):
def __init__(self):
super(MenuBarCollapsingExample, self).__init__()
self._menubar = MenuBar()
... | PypiClean |
/Mathics-1.0.tar.gz/Mathics-1.0/mathics/builtin/pympler/asizeof.py |
# Copyright, license and disclaimer are at the end of this file.
# This is the latest, enhanced version of the asizeof.py recipes at
# <http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/546530>
# <http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/544288>
'''
This module exposes 9 functions and 2 classes ... | PypiClean |
/NeodroidVision-0.3.0-py36-none-any.whl/neodroidvision/data/detection/voc/deprec/s_voc.py |
__author__ = "Christian Heider Nielsen"
__doc__ = r"""
Created on 22/03/2020
"""
from pathlib import Path
from typing import Tuple
from xml.etree import ElementTree
import numpy
from PIL import Image
__all__ = ["VOCDataset"]
from neodroidvision.data.detection.object_detection_dataset import ... | PypiClean |
/Curp-1.3.1.tar.gz/Curp-1.3.1/curp/script/pdb_.py | import os, sys
class Atom:
terminal = False
def __str__(self):
return '<Atom, id={}, name={}, rid={}, rname={}>'.format(
self.id, self.name, self.rid, self.rname)
class System:
def __init__(self, pdb_fpfd):
atoms = self._gen_pdbatom(pdb_fpfd)
self.__atoms = list(... | PypiClean |
/Deeplodocus-0.3.0-py3-none-any.whl/deeplodocus/brain/thalamus/thalamus.py | import multiprocessing.managers
import weakref
# Deeplodocus modules
from deeplodocus.utils.notification import Notification
from deeplodocus.brain.signal import Signal
from deeplodocus.utils.singleton import Singleton
from deeplodocus.brain.connection import Connection
from deeplodocus.flags.notif import *
class Th... | PypiClean |
/Automatic_Differentiation_CS107_Team50-0.0.1-py3-none-any.whl/AutoDifferentiation/elementary.py | import numpy as np
from DualNumber import *
def cos(x):
'''
Parameters
----------
x : int / float / DualNumber object, required
The object on which cos() is applied
Raises
------
TypeError
If the type of input x is not supported
Returns
-------
A new DualN... | PypiClean |
/Axelrod-4.13.0.tar.gz/Axelrod-4.13.0/axelrod/strategies/titfortat.py | from axelrod.action import Action, actions_to_str
from axelrod.player import Player
from axelrod.strategy_transformers import (
FinalTransformer,
TrackHistoryTransformer,
)
C, D = Action.C, Action.D
class TitForTat(Player):
"""
A player starts by cooperating and then mimics the previous action of the... | PypiClean |
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/inginious/frontend/static/js/codemirror/mode/powershell/powershell.js |
(function(mod) {
'use strict';
if (typeof exports == 'object' && typeof module == 'object') // CommonJS
mod(require('codemirror'));
else if (typeof define == 'function' && define.amd) // AMD
define(['codemirror'], mod);
else // Plain browser env
mod(window.CodeMirror);
})(function(CodeMirror) {
'us... | PypiClean |
/Circuitscape-4.0.5.tar.gz/Circuitscape-4.0.5/circuitscape/state.py | from multiprocessing.pool import ThreadPool
import multiprocessing, os, logging, pickle
from profiler import gc_after, print_rusage
from pyamg import smoothed_aggregation_solver
class CSState:
logger = None
def __init__(self):
self.worker_pool = None
self.amg_hierarchy = None
self.... | PypiClean |
/BlueWhale3_Text-1.6.0-py3-none-any.whl/orangecontrib/text/keywords/embedding.py | from collections import defaultdict
from operator import itemgetter
from typing import List, Tuple, Dict, Set, Callable, Collection
import numpy as np
from Orange.util import dummy_callback, wrap_callback
from orangecontrib.text import Corpus
from orangecontrib.text.vectorization import document_embedder
from orangec... | PypiClean |
/HAPI_Nile-1.6.0-py3-none-any.whl/Hapi/hm/saintvenant.py | import numpy as np
from numpy.linalg import inv
class SaintVenant:
"""SaintVenant equation solver."""
def __init__(self, maxiteration=10, beta=1, epsi=0.5, theta=0.5):
# preismann scheme parameters
self.theta = theta
self.epsi = epsi
self.beta = beta
self.maxiteration ... | PypiClean |
/Lantz-0.3.zip/Lantz-0.3/lantz/drivers/legacy/andor/ccd.py | import numpy as np
import ctypes as ct
from collections import namedtuple
from lantz import Driver, Feat, Action, DictFeat
from lantz.errors import InstrumentError
from lantz.foreign import LibraryDriver
from lantz import Q_
degC = Q_(1, 'degC')
us = Q_(1, 'us')
MHz = Q_(1, 'MHz')
seg = Q_(1, 's')
_ERRORS = {
20... | PypiClean |
/EnergyFlow-1.3.2.tar.gz/EnergyFlow-1.3.2/energyflow/datasets/mod.py | r"""# Datasets
## CMS Open Data and the MOD HDF5 Format
Starting in 2014, the CMS Collaboration began to release research-grade
recorded and simulated datasets on the [CERN Open Data Portal](http://opendata.
cern.ch/). These fantastic resources provide a unique opportunity for
researchers with diverse connections to ... | PypiClean |
/Mezzanine-6.0.0.tar.gz/Mezzanine-6.0.0/mezzanine/core/static/mezzanine/tinymce/langs/lv.js | tinymce.addI18n('lv',{
"Cut": "Izgriezt",
"Heading 5": "5.l\u012bme\u0146a virsraksts",
"Header 2": "Otr\u0101 l\u012bme\u0146a virsraksts",
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "J\u016bsu p\u0101rl\u016bkprogramma neatbalsta piek\u013cu... | PypiClean |
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/slp75_81.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 slp75_81(path):
"""slp75\_81
Data loads lazily. Type data(slp75\_81) into the console.
... | PypiClean |
/FrameDuino-0.2.1.tar.gz/FrameDuino-0.2.1/frameduino/drivers/bt_driver.py |
import time
import bluetooth
import os
from abstract_driver import AbstractDriver
from pprint import pprint
#ERRORS
DEVICES_NOT_FOUND = "Could not find bluetooth devices nearby."
DEVICE_NOT_CONNECTED = "Could not find target bluetooth device nearby."
class BluetoothDriver(AbstractDriver):
DEVICE_NAME ... | PypiClean |
/KratosStructuralMechanicsApplication-9.4-cp310-cp310-win_amd64.whl/KratosMultiphysics/StructuralMechanicsApplication/perturb_geometry_sparse_utility.py | import KratosMultiphysics
# Import applications
import KratosMultiphysics.StructuralMechanicsApplication as StructuralMechanicsApplication
from KratosMultiphysics import eigen_solver_factory
import random
class PerturbGeometrySparseUtility():
"""An utility to perturb the initial geometry of a structure
based... | PypiClean |
/DJModels-0.0.6-py3-none-any.whl/djmodels/utils/encoding.py | import codecs
import datetime
import locale
from decimal import Decimal
from urllib.parse import quote
from djmodels.utils import six
from djmodels.utils.functional import Promise
class DjangoUnicodeDecodeError(UnicodeDecodeError):
def __init__(self, obj, *args):
self.obj = obj
super().__init__(*... | PypiClean |
/DAFI-1.0.2.tar.gz/DAFI-1.0.2/dafi/random_field/covariance.py | """ Covariance matrices. """
# standard library imports
import time
# third party imports
import numpy as np
from numpy.core.shape_base import atleast_2d
import scipy.sparse as sp
import scipy.sparse.linalg as splinalg
def generate_cov(kernel='sqrexp', stddev=1.0, sp_tol=1e-8, **kwargs):
""" Generate a covarian... | PypiClean |
/AcraNetwork-0.16.1.tar.gz/AcraNetwork-0.16.1/examples/deprecated/simple_parser_packets_from_pcap.py |
import socket,os,struct,sys
import argparse
import datetime, time
import AcraNetwork.iNetX as inetx
import AcraNetwork.Pcap as pcap
import AcraNetwork.SimpleEthernet as SimpleEthernet
import AcraNetwork.ParserAligned as ParserAligned
def main():
try:
pcapfile = pcap.Pcap("SSR_ABM_102_capture_example... | PypiClean |
/Cuckoo-2.0.7a1.tar.gz/Cuckoo-2.0.7a1/cuckoo/machinery/esx.py |
try:
import libvirt
HAVE_LIBVIRT = True
except ImportError:
HAVE_LIBVIRT = False
from cuckoo.common.abstracts import LibVirtMachinery
from cuckoo.common.exceptions import CuckooCriticalError
from cuckoo.common.exceptions import CuckooMachineError
class ESX(LibVirtMachinery):
"""Virtualization layer f... | PypiClean |
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/profile/__init__.py | import itertools
from datetime import date
from decimal import Decimal
from typing import Dict, List, Optional, Tuple, Union
from ...typing import SexLiteral
from .. import BaseProvider
class Provider(BaseProvider):
"""
This provider is a collection of functions to generate personal profiles and identities.... | PypiClean |
/Amara-2.0.0a6.tar.bz2/Amara-2.0.0a6/lib/xpath/functions/numbers.py | import math
from amara.xpath import datatypes
from amara.xpath.functions import builtin_function
__all__ = ('number_function', 'sum_function', 'floor_function',
'ceiling_function', 'round_function')
class number_function(builtin_function):
"""Function: <number> number(<object>?)"""
name = 'numbe... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Script/Main.py | from __future__ import print_function
unsupported_python_version = (2, 6, 0)
deprecated_python_version = (2, 7, 0)
# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"... | PypiClean |
/JBPhD-2.3.2-py3-none-any.whl/Task/Export.py | import os
import sys
from datetime import datetime
import subprocess
from google.oauth2.service_account import Credentials
from google.oauth2 import service_account
from googleapiclient.discovery import build
from googleapiclient.errors import HttpError
from googleapiclient.http import MediaFileUpload
import spwf
pyth... | PypiClean |
/Eddy's%20Memory%20Game-1.0.zip/Eddy's Memory Game-1.0/memorygame.py | __author__="Edward McKnight (EM-Creations.co.uk)"
__date__ ="$04-Jul-2011 12:04:26$"
import functions #import the functions file
import time #import the "time" library
#TODO Fix bug: high scores don't order properly when level reaches is above 9
print "========= Eddy's Memory Game ========="
print "By EM-... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/components/notify/notifiers/ntfysh.py | from http import HTTPStatus
from urllib.parse import urljoin
from requests.auth import HTTPBasicAuth
from requests.exceptions import RequestException
from flexget import plugin
from flexget.event import event
from flexget.plugin import PluginWarning
from flexget.utils.requests import Session as RequestSession
plugin... | PypiClean |
/BigchainDBNext-2.2.2.1.tar.gz/BigchainDBNext-2.2.2.1/bigchaindb/common/exceptions.py | from bigchaindb.exceptions import BigchainDBError
class ConfigurationError(BigchainDBError):
"""Raised when there is a problem with server configuration"""
class DatabaseDoesNotExist(BigchainDBError):
"""Raised when trying to delete the database but the db is not there"""
class StartupError(BigchainDBErro... | PypiClean |
/D-Analyst-1.0.6.tar.gz/D-Analyst-1.0.6/main/analyst/visuals/texture_visual.py | import numpy as np
from .visual import Visual, RefVar
from analyst.tools import hsv_to_rgb
def colormap(x):
"""Colorize a 2D grayscale array.
Arguments:
* x:an NxM array with values in [0,1]
Returns:
* y: an NxMx3 array with a rainbow color palette.
"""
x = np.clip... | PypiClean |
/KosmosX-0.0.1.tar.gz/KosmosX-0.0.1/Kosmos/train_kosmos_stable_2.py | import time
import torch
from accelerate.utils import set_seed
from datasets import load_dataset
from torch.nn import CrossEntropyLoss
from torch.utils.data import DataLoader
from transformers import default_data_collator, get_linear_schedule_with_warmup
from model.kosmos import Kosmos, KosmosTokenizer
from accelerat... | PypiClean |
/Myghty-1.2.tar.gz/Myghty-1.2/examples/shoppingcart/lib/shoppingdata.py | from shoppingmodel import *
store = Category('store', 'The Myghty Store', [])
tshirts = Category("tshirts", "T Shirts",
[
Item("Myghty T Shirt", "A lovely T-shirt made with genuine Microsoft Paint, featuring the Myghty logo", "tshirt_myghty.gif", None, variants =
[
Varian... | PypiClean |
/Flask-RESTive-0.0.3.tar.gz/Flask-RESTive-0.0.3/flask_restive_sqlalchemy/services.py | from __future__ import unicode_literals
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.exc import SQLAlchemyError
from sqlalchemy import and_, between, tuple_
from flask_restive.services import Service as BaseService
from flask_restive.services import Stor... | PypiClean |
/Eve-Elastic-7.3.2.tar.gz/Eve-Elastic-7.3.2/eve_elastic/helpers.py | from __future__ import unicode_literals
import logging
from operator import methodcaller
from elasticsearch.exceptions import ElasticsearchException, TransportError
from elasticsearch.compat import map, string_types
logger = logging.getLogger("elasticsearch.helpers")
class BulkIndexError(ElasticsearchException):
... | PypiClean |
/Flask-PluginEngine-0.4.1.tar.gz/Flask-PluginEngine-0.4.1/flask_pluginengine/plugin.py |
from contextlib import contextmanager
from flask import render_template, url_for, current_app
from .globals import _plugin_ctx_stack, current_plugin
from .util import wrap_in_plugin_context, trim_docstring, classproperty, get_state
def depends(*plugins):
"""Adds dependencies for a plugin.
This decorator a... | PypiClean |
/OAIPMHScraper-0.4.1.tar.gz/OAIPMHScraper-0.4.1/oaipmhscraper/oaipmh_scraper.py |
# OAIPMH Scraper
from os import path, mkdir
import simplejson
from oaipmh.client import Client as OaipmhClient
from oaipmh.metadata import global_metadata_registry
from datetime import datetime
import logging
import sys, traceback
from lxml import etree
logger = logging.getLogger("OAIPMH Harvester")
logger.se... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/AppCenter/simpleui/static/admin/simpleui-x/elementui/umd/locale/ru-RU.js | (function (global, factory) {
if (typeof define === "function" && define.amd) {
define('element/locale/ru-RU', ['module', 'exports'], factory);
} else if (typeof exports !== "undefined") {
factory(module, exports);
} else {
var mod = {
exports: {}
};
facto... | PypiClean |
/matchengine-V2-2.0.1.tar.gz/matchengine-V2-2.0.1/matchengine/internals/engine.py | from __future__ import annotations
import asyncio
import datetime
import json
import logging
import os
import sys
import uuid
from collections import defaultdict
from multiprocessing import cpu_count
from typing import TYPE_CHECKING, Iterable, Tuple
import dateutil.parser
import pymongo
from pymongo import UpdateMany... | PypiClean |
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/udf_response.py |
from msrest.serialization import Model
class UDFResponse(Model):
"""UDFResponse.
:param udf_id: The identifier of the custom field. <span
class='property-internal'>Required (defined)</span>
:type udf_id: int
:param name: The name of the custom field. <span
class='property-internal'>Require... | PypiClean |
/Flask_Materialize-0.2.4-py3-none-any.whl/flask_materialize/__init__.py |
__app_version__ = '0.2.1'
__material_version__ = '1.0.0-rc.2'
import re
from flask import Blueprint, current_app, url_for
try:
from wtforms.fields import HiddenField
except ImportError:
def is_hidden_field_filter(field):
raise RuntimeError('WTForms is not installed.')
else:
def is_hidden_field_f... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/prism/components/prism-rest.min.js | Prism.languages.rest={table:[{pattern:/(\s*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1(?:[+|].+)+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(\s*)(?:=+ +)+=+(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1(?:=+ +)+=+(?=(?:\r?\n|\r){2}|\s*$)/,lookbehind:!0,inside:{punctuation:/[=-]+/}}]... | PypiClean |
/DirectoryStorage-1.1.21.tar.gz/DirectoryStorage-1.1.21/BaseFilesystem.py |
import os, time, sys, struct, threading
from cStringIO import StringIO
from utils import z64, z128, OMAGIC, TMAGIC, oid2str, ConfigParser
from utils import DirectoryStorageError, FileDoesNotExist
from utils import logger, loglevel_INFO
class FilesystemPrimitives:
# Object which defines interface for convenient lo... | PypiClean |
/Grammaticomastix-0.0.1rc2-py3-none-any.whl/grammaticomastix/dchars/dchars.py | # problem with Pylint :
# pylint: disable=E0611
# "No name 'errors' in module 'dchars.errors'"
from dchars.errors.errors import DCharsError
import os.path
from dchars.languages_name import LANGUAGES_NAME, \
BIBLICAL_HEBREW__NAME, \
LANGUAGES_AND_TRANSL... | PypiClean |
/API_libs-0.1.16-py3-none-any.whl/api_libs/route.py | import re
from . import APILibError
from .interface import interface as to_interface
__all__ = ['Router', 'Context']
class Router:
'''通过此对象集中管理(注册、调用)interface'''
def __init__(self, context_cls=None):
'''
:arg context_cls: 此 router 绑定的 context 类型。不同类型的 context 提供不同的功能。
:type context_... | PypiClean |
/BxGraph-0.4.1.tar.gz/BxGraph-0.4.1/bxgraph/walker/node2vec.py |
import numpy as np
import numba
from .base import RandomWalker
from ..utils.numpy import intersection_mask
class BiasedSecondOrderRandomWalker(RandomWalker):
"""
Random walker sampling random walks by using the biased second-order strategy described in
*node2vec: Scalable Feature Learning for Networks* (G... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/localization/sk/TeX.js | MathJax.Localization.addTranslation("sk","TeX",{version:"2.7.9",isLoaded:true,strings:{ExtraOpenMissingClose:"Prebyto\u010Dn\u00E1 otv\u00E1raj\u00FAca alebo uzavieracia z\u00E1tvorka",ExtraCloseMissingOpen:"Prebyto\u010Dn\u00E1 uzavieracia alebo otv\u00E1raj\u00FAca z\u00E1tvorka",MissingLeftExtraRight:"Ch\u00FDbaj\u0... | PypiClean |
/EvtPlugins-0.99.34.tar.gz/EvtPlugins-0.99.34/opensesame_plugins/VAS/VAS.py | from libopensesame.py3compat import *
from libopensesame.item import item
from libqtopensesame.items.qtautoplugin import qtautoplugin
from openexp.canvas import Canvas, canvas
from libopensesame.oslogging import oslogger
from openexp.keyboard import Keyboard
from openexp.mouse import Mouse
from libopensesame.exception... | PypiClean |
/AlleleFinder-0.1.4.tar.gz/AlleleFinder-0.1.4/allele_tools/profile_reduce.py | # Standard imports
from argparse import ArgumentParser
from csv import DictReader
import logging
import sys
import os
# Third-party imports
from olctools.accessoryFunctions.accessoryFunctions import \
make_path, \
SetupLogging
from allele_tools.methods import pathfinder
class ProfileReduce:
"""
Redu... | PypiClean |
/CommonEnvironment-Formatter-0.5.0b1.tar.gz/CommonEnvironment-Formatter-0.5.0b1/Readme.rst | Formats Python code using Black (https://github.com/ambv/black) plus enhancements:
- Aligns assignments within a block
- Aligns trailing comments within a block
- Ensures that all line-delimited parameters and arguments include a trailing comma
- Ensures that all logical clauses are line-delimited in any are
- Reverts... | PypiClean |
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/node_modules/jquery/src/core/ready.js | define( [
"../core",
"../var/document",
"../core/readyException",
"../deferred"
], function( jQuery, document ) {
"use strict";
// The deferred used on DOM ready
var readyList = jQuery.Deferred();
jQuery.fn.ready = function( fn ) {
readyList
.then( fn )
// Wrap jQuery.readyException in a function so that ... | PypiClean |
/Flask_Unchained-0.9.0-py3-none-any.whl/flask_unchained/_code_templates/project/static/vendor/bootstrap-v4.1.2.min.js | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,h){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=... | PypiClean |
/GailBot_Testing_Suite-0.1a8-py3-none-any.whl/gailbot/services/converter/result/transcribe.py | import os
from typing import TypedDict, List, Dict
from gailbot.core.utils.general import (
write_csv,
read_csv,
write_json,
get_name,
make_dir,
read_json,
paths_in_dir,
is_directory,
is_file)
from gailbot.core.utils.logger import makelogger
from gailbot.configs import servic... | PypiClean |
/Mopidy_Multisonic-0.5.2-py3-none-any.whl/mopidy_multisonic/httpclient.py | from collections import namedtuple
import uuid
import requests
import hashlib
HttpClientConfig = namedtuple(
'HttpClientConfig',
[
'name',
'url',
'username',
'password',
'max_bit_rate',
'format',
]
)
def get_request(client_config, endpoint, params={}):
r... | PypiClean |
/MD2K_Cerebral_Cortex-3.0.0-py3-none-any.whl/MD2K_Cerebral_Cortex-3.0.0.dist-info/DESCRIPTION.rst | # CerebralCortex Kernel
Cerebral Cortex is the big data cloud companion of mCerebrum designed to support population-scale data analysis, visualization, model development, and intervention design for mobile sensor data.
You can find more information about MD2K software on our [software website](https://md2k.org/softwar... | PypiClean |
/ATM1b-QFIT-1.0.1.tar.gz/ATM1b-QFIT-1.0.1/ATM1b_QFIT/utilities.py | u"""
utilities.py
Written by Tyler Sutterley (04/2022)
Download and management utilities for syncing time and auxiliary files
PYTHON DEPENDENCIES:
lxml: processing XML and HTML in Python
https://pypi.python.org/pypi/lxml
UPDATE HISTORY:
Updated 04/2022: updated docstrings to numpy documentation format... | PypiClean |
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA-AI-1.1/DLTA_AI_app/labelme/app.py | import functools
import json
import orjson
import time
import math
import os
import os.path as osp
import re
import traceback
import webbrowser
import copy
# import asyncio
# import PyQt5
# from qtpy.QtCore import Signal, Slot
import imgviz
from matplotlib import pyplot as plt
from qtpy import QtCore
from qtpy.QtCore ... | PypiClean |
/MetaGram-2.0.2.tar.gz/MetaGram-2.0.2/pyrogram/methods/chats/restrict_chat_member.py |
from datetime import datetime
from typing import Union
import pyrogram
from pyrogram import raw, utils
from pyrogram import types
class RestrictChatMember:
async def restrict_chat_member(
self: "pyrogram.Client",
chat_id: Union[int, str],
user_id: Union[int, str],
permissions: "t... | PypiClean |
/MAGINE-0.1.5.tar.gz/MAGINE-0.1.5/magine/networks/utils.py | import os
import operator
import networkx as nx
from collections import OrderedDict
from magine.networks.standards import edge_standards
from magine.mappings.gene_mapper import GeneMapper
def create_dict_from_node_attributes(net, attribute):
"""
Parameters
----------
net : nx.DiGraph
attribute : ... | PypiClean |
/Flask-Annex-1.1.0.tar.gz/Flask-Annex-1.1.0/flask_annex/file.py | import errno
import flask
import os
import shutil
import werkzeug
from packaging.version import Version
from .base import AnnexBase
# -----------------------------------------------------------------------------
class FileAnnex(AnnexBase):
def __init__(self, root_path):
self._root_path = root_path
... | PypiClean |
/Dash-ElectrumX-1.16.0.1.tar.gz/Dash-ElectrumX-1.16.0.1/electrumx/lib/tx_dash.py | from collections import namedtuple
from electrumx.lib.tx import Deserializer
from electrumx.lib.util import (pack_le_uint16, pack_le_int32, pack_le_uint32,
pack_le_int64, pack_varint, pack_varbytes,
pack_be_uint16)
# https://github.com/dashpay/dips/blob... | PypiClean |
/BackuPy-1.10.1-py3-none-any.whl/backupy/gui.py | import os
import sys
import tempfile
sys.stdout = tempfile.TemporaryFile()
import PySimpleGUI as sg
from colored import stylize, attr, fg
from gooey import Gooey, GooeyParser, local_resource_path
from .backupman import BackupManager
from .utils import (
getVersion,
readJson,
writeJson,
)
class Unbuffere... | PypiClean |
/GitPython-3.1.34-py3-none-any.whl/git/refs/reference.py | from git.util import (
LazyMixin,
IterableObj,
)
from .symbolic import SymbolicReference, T_References
# typing ------------------------------------------------------------------
from typing import Any, Callable, Iterator, Type, Union, TYPE_CHECKING # NOQA
from git.types import Commit_ish, PathLike, _T # N... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.