id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/flask_more-0.2.1.tar.gz/flask_more-0.2.1/flask_more/schemas.py | from enum import Enum
from typing import Any, Dict, List, Optional, Union
from pydantic import AnyUrl
from pydantic import BaseModel as _BaseModel
from pydantic import EmailStr, Field
class BaseModel(_BaseModel):
class Config:
allow_population_by_field_name = True
class Contact(BaseModel):
name: Op... | PypiClean |
/Marine_Traffic_API-0.20.1-py3-none-any.whl/marinetrafficapi/voyage_info/client.py | import click
from marinetrafficapi import constants
from marinetrafficapi.bind import bind_request
from marinetrafficapi.voyage_info.\
VI01_voyage_forecasts.models import VoyageForecast
from marinetrafficapi.voyage_info.\
VI01_voyage_forecasts.query_params import VI01QueryParams
from marinetrafficapi.voyage_... | PypiClean |
/Chronix2Grid-1.2.0.post1.tar.gz/Chronix2Grid-1.2.0.post1/chronix2grid/generation/_dispatch/_PypsaDispatchBackend/PypsaEconomicDispatch.py | import numpy as np
import pandas as pd
from collections import namedtuple
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=RuntimeWarning)
warnings.filterwarnings("ignore", category=DeprecationWarning)
# TODO logger !
# some warnings on some pypsa / numpy versi... | PypiClean |
/CloudFerry-1.55.2.tar.gz/CloudFerry-1.55.2/cloudferry/actions/compute/transport_compute_resources.py | import copy
from cloudferry.lib.base.action import action
from cloudferry.lib.os.compute import keypairs
from cloudferry.lib.os.identity import keystone
from cloudferry.lib.utils import log
from cloudferry.lib.utils import utils as utl
LOG = log.getLogger(__name__)
class TransportComputeResources(action.Action):
... | PypiClean |
/Clinamen2-2023.5.1.tar.gz/Clinamen2-2023.5.1/docs/source/example_tutorials.rst | Example tutorials
====================
.. highlight:: python
* :ref:`function_trial`
* :ref:`silver_cluster`
* :ref:`si_bulk`
* :ref:`lennard_jones`
.. _function\_trial:
Function trial
--------------
The function trial can be performed from the command-line or by importing the
relevant functions, e.g., to a Jupyte... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/contrib/gis/db/backends/postgis/introspection.py | from django.contrib.gis.gdal import OGRGeomType
from django.db.backends.postgresql.introspection import DatabaseIntrospection
class PostGISIntrospection(DatabaseIntrospection):
postgis_oid_lookup = {} # Populated when introspection is performed.
ignored_tables = DatabaseIntrospection.ignored_tables + [
... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/full/lang/uk.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/license
*/
CKEDITOR.lang['uk']={"editor":"Текстовий редактор","editorPanel":"Панель розширеного текстового редактора","common":{"editorHelp":"натисніть ALT 0 для довідки","browseServer":... | PypiClean |
/ContactVis-0.1.6.tar.gz/ContactVis-0.1.6/contactvis/parsing/parse_pdb.py | import sys
import operator
import numpy as np
from collections import defaultdict
def parse_atm_record(line):
record = defaultdict()
record['name'] = line[0:6].strip()
record['atm_no'] = int(line[6:11])
record['atm_name'] = line[12:16].strip()
record['res_name'] = line[17:20].strip()
record['... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/dizoo/mujoco/config/hopper_trex_sac_config.py | from easydict import EasyDict
hopper_trex_sac_config = dict(
exp_name='hopper_trex_sac_seed0',
env=dict(
env_id='Hopper-v3',
norm_obs=dict(use_norm=False, ),
norm_reward=dict(use_norm=False, ),
collector_env_num=1,
evaluator_env_num=8,
n_evaluator_episode=8,
... | PypiClean |
/Nitrous-0.9.3-py3-none-any.whl/turbogears/i18n/data/ms_BN.py |
languages={'ms': 'bahasa Melayu'}
countries={'BD': 'Bangladesh', 'BE': 'Belgium', 'BF': 'Burkina Faso', 'BG': 'Bulgaria', 'BA': 'Bosnia and Herzegovina', 'BB': 'Barbados', 'WF': 'Wallis and Futuna', 'BM': 'Bermuda', 'BN': 'Brunei', 'BO': 'Bolivia', 'BH': 'Bahrain', 'BI': 'Burundi', 'BJ': 'Benin', 'BT': 'Bhutan', 'JM'... | PypiClean |
/Finance-Ultron-1.0.8.1.tar.gz/Finance-Ultron-1.0.8.1/ultron/factor/dimension/pca.py | import numpy as np
import pandas as pd
from six.moves import xrange
from sklearn.pipeline import Pipeline
from sklearn.naive_bayes import GaussianNB
from sklearn.decomposition import PCA as PCAImpl
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import RepeatedStratifiedKFold
from ultro... | PypiClean |
/AI4Water-1.6.tar.gz/AI4Water-1.6/ai4water/et/global_variables.py | from ai4water.backend import np, random
# Latent heat of vaporisation [MJ.Kg-1]
LAMBDA = 2.45
#: Solar constant [ MJ m-2 min-1]
SOLAR_CONSTANT = 0.0820
SB_CONS = 3.405e-12 # per minute
ALLOWED_COLUMNS = ['temp', 'tmin', 'tmax', 'rel_hum', 'sol_rad', 'rn', 'wind_speed', 'es', 'sunshine_hrs',
'rh... | PypiClean |
/Chrysalio-1.0.tar.gz/Chrysalio-1.0/chrysalio/security.py |
from pyramid.authentication import AuthTktAuthenticationPolicy
from pyramid.authorization import ACLAuthorizationPolicy
from pyramid.security import Authenticated, Everyone, Allow, ALL_PERMISSIONS
from .lib.i18n import _
from .lib.log import log_info
from .models.dbuser import DBUser
PRINCIPALS = (
('mode', _('... | PypiClean |
/ImSwitch-2.0.0.tar.gz/ImSwitch-2.0.0/imswitch/imcontrol/controller/controllers/ImageController.py | from imswitch.imcontrol.view import guitools
from ..basecontrollers import LiveUpdatedController
from imswitch.imcommon.model import initLogger
import numpy as np
class ImageController(LiveUpdatedController):
""" Linked to ImageWidget."""
def __init__(self, *args, **kwargs):
super().__init__(*args, **... | PypiClean |
/Assemble-0.2.2.tar.gz/Assemble-0.2.2/src/assemble/cli.py | from __future__ import absolute_import, division, print_function
from .assemble import get_package
from .utils import display_table
from .utils import Version
import click
@click.group()
@click.option('--origin', default='.')
@click.option('--search', default='src')
@click.pass_context
def main(ctx, origin, search):... | PypiClean |
/LbNightlyTools-4.0.1-py3-none-any.whl/LbMsg/TestMsg.py | from __future__ import absolute_import
__author__ = "Ben Couturier <ben.couturier@cern.ch>"
import datetime
import json
import os
from .Common import Messenger
class TestMessenger(Messenger):
"""
Class used to connect to the queue of periodic tests to be run
"""
def __init__(self, *args, **kwargs)... | PypiClean |
/KFlask-AppBuilder-1.0.1.tar.gz/KFlask-AppBuilder-1.0.1/flask_appbuilder/static/appbuilder/js/bootstrap.min.js | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQ... | PypiClean |
/FEV_KEGG-1.1.4.tar.gz/FEV_KEGG-1.1.4/FEV_KEGG/Experiments/30.py | from FEV_KEGG.Evolution.Taxonomy import NCBI
import FEV_KEGG.KEGG.Organism as Organism
from FEV_KEGG.Graph.Elements import EcNumber
if __name__ == '__main__':
output = ['Maj. %\tothers\tboth\tours']
#- extract EC numbers from Poot-Hernandez et al. (2015) by hand, any which are marked as blue (preser... | PypiClean |
/Bubot_AdminPanel-0.0.2-py3-none-any.whl/BubotObj/OcfDevice/subtype/AdminPanel/static/ui/js/chunk-5bb29098.30421a92.js | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5bb29098"],{"166a":function(t,e,i){},"16b7":function(t,e,i){"use strict";i("a9e3");var n=i("2b0e");e["a"]=n["a"].extend().extend({name:"delayable",props:{openDelay:{type:[Number,String],default:0},closeDelay:{type:[Number,String],default:0}},data:functio... | PypiClean |
/Cmdopt-0.2.0.tar.gz/Cmdopt-0.2.0/lib/cmdopt.py |
import sys, os, re
class Schema(object):
def __init__(self):
self.items = []
self._option2item = {}
def get(self, opt): # ex. '-h' or '--help'
return self._option2item.get(opt)
def add(self, options, desc, validator=None, handler=None):
attr = None
m = re.sear... | PypiClean |
/Micro-3.1.0-py3-none-any.whl/micro/core/logger.py | import os
import logging
from .params import Params
from ..core.utils import set_folder
LOG_FORMAT = "[%(asctime)s] %(levelname)s: " + \
"%(message)s - %(filename)s, %(funcName)s, %(lineno)s"
LOG_DEBUG_FORMAT = "[%(asctime)s] [%(process)d] %(levelname)s: " + \
"%(message)s - %(name)s, %(filename)s, %(funcName)... | PypiClean |
/Nikippe-0.1.11.tar.gz/Nikippe-0.1.11/nikippe/displayserver.py | import nikippe
import time
from pelops.mythreading import LoggerThread
import threading
from io import BytesIO
from nikippe.renderer.renderer import Renderer
from pelops.abstractmicroservice import AbstractMicroservice
from nikippe.schema.displayserver import get_schema
class DisplayServer(AbstractMicroservice):
... | PypiClean |
/Flask-Philo-3.7.1.tar.gz/Flask-Philo-3.7.1/flask_philo/cloud/aws/s3.py | from .utils import run_action
from prettytable import PrettyTable
import argparse
import boto3
import boto3.ec2
import os
app = None
def download_file(fname, bucket, key, region=None):
client = boto3.client('s3', region_name=region)
return client.download_file(
bucket, key, fname)
def upload_fil... | PypiClean |
/Glashammer-0.2.1.tar.gz/Glashammer-0.2.1/glashammer/utils/webbish.py | import math
from glashammer.utils.local import url_for, local
class Pagination(object):
"""Pagination helper."""
def __init__(self, endpoint, page, per_page, total, url_args=None):
self.endpoint = endpoint
self.page = page
self.per_page = per_page
self.total = total
... | PypiClean |
/BibReview-0.2.4.tar.bz2/BibReview-0.2.4/bayesian_classifier2.py |
# BibReview
# Copyright (C) 2012 Jean-Baptiste LAMY (jibalamy at free . fr)
# BibReview is developped by Jean-Baptiste LAMY, at LIM&BIO,
# UFR SMBH, Université Paris 13, Sorbonne Paris Cité.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License a... | PypiClean |
/LearnUdacitydistributions-0.1.tar.gz/LearnUdacitydistributions-0.1/distributions/Gaussiandistribution.py | import math
import matplotlib.pyplot as plt
from .Generaldistribution import Distribution
class Gaussian(Distribution):
""" Gaussian distribution class for calculating and
visualizing a Gaussian distribution.
Attributes:
mean (float) representing the mean value of the distribution
stdev (float) representing ... | PypiClean |
/DolaBot-Slate-1.0.1.tar.gz/DolaBot-Slate-1.0.1/src/DolaBot/translators/StageTranslator.py | from typing import Optional, Dict, Callable
class StageTranslator:
fn_lookup: Dict[str, Callable[[], str]]
def __init__(self):
self.fn_lookup = {}
for fn in dir(StageTranslator):
if fn.startswith('translate_'):
# Add the whole stage name
name = fn.r... | PypiClean |
/bython-0.8-py3-none-any.whl/bython/importing.py | import sys
import os
import bython.parser
import bython.logger
"""
Module for handling imports of Bython files in Python code.
"""
def bython_import(module_name, globals, logger=None):
"""
Import Bython files in Python code. Example:
``` python
from bython.importing import bython_import
by... | PypiClean |
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/terminal/sys_error.py |
import sys
import traceback
try:
from cStringIO import StringIO
except ImportError, e:
from StringIO import StringIO
from muntjac.terminal.error_message import IErrorMessage
class SysError(RuntimeError, IErrorMessage):
"""C{SystemError} is a runtime exception caused by error in
system. The system e... | PypiClean |
/Djask-0.6.2-py3-none-any.whl/djask/admin/ext.py | import importlib
from typing import Optional
from typing import Sequence
from flask_login import LoginManager
from ..app import Blueprint
from ..app import Djask
from ..auth.anonymous import AnonymousUser
from ..extensions import csrf
from ..types import ModeArg
from ..types import ModeLiteral
from djask import curre... | PypiClean |
/ISA-1.2.4.tar.gz/ISA-1.2.4/README.rst | ***
ISA
***
.. image:: https://badge.fury.io/py/isa.svg
:target: https://badge.fury.io/py/isa
:alt: Build Version
.. image:: https://readthedocs.org/projects/isa/badge/?version=stable
:target: http://isa.readthedocs.io/en/v1.2.4/
:alt: Documentation Status
.. image:: https://travis-ci.org/kevin91nl/isa.s... | PypiClean |
/EQcorrscan-0.4.4.tar.gz/EQcorrscan-0.4.4/eqcorrscan/core/template_gen.py | import numpy as np
import logging
import os
from obspy import Stream, read, Trace, UTCDateTime, read_events
from obspy.core.event import Catalog
from obspy.clients.fdsn import Client as FDSNClient
from eqcorrscan.utils.sac_util import sactoevent
from eqcorrscan.utils import pre_processing
from eqcorrscan.core import ... | PypiClean |
/CaptainSoul-0.1.9.tar.gz/CaptainSoul-0.1.9/cptsoul/netsoul/tools.py |
import re
import string
def urlEncode(s):
r = u''
if not isinstance(s, unicode):
s = unicode(s, 'utf8')
for c in s:
if c not in string.ascii_letters + string.digits:
o = ord(c)
r += (u'%%0%s' if o < 16 else u'%%%s') % hex(o).upper()[2:]
else:
r ... | PypiClean |
/Nuitka_winsvc-1.7.10-cp310-cp310-win_amd64.whl/nuitka/utils/SharedLibraries.py | import os
import re
import sys
from nuitka.__past__ import WindowsError # pylint: disable=I0021,redefined-builtin
from nuitka.__past__ import unicode
from nuitka.containers.OrderedDicts import OrderedDict
from nuitka.containers.OrderedSets import OrderedSet
from nuitka.Options import getMacOSTargetArch, isShowInclusi... | PypiClean |
/FFEAT-1.0.0-py3-none-any.whl/ffeat/_common/selection/StochasticUniversalSampling.py | from typing import Union, Callable
import torch as t
from ffeat import Pipe, STANDARD_REPRESENTATION
_IFU = Union[int, float]
class StochasticUniversalSampling(Pipe):
"""
Stochastic Universal Sampling selection operator.
"""
def __init__(self,
num_select: Union[_IFU, Callable[..., _I... | PypiClean |
/IHEWAdataanalysis-0.0.1.tar.gz/IHEWAdataanalysis-0.0.1/CONTRIBUTING.rst | ============
Contributing
============
Welcome to the IHE WaterAccounting Report Tool (IHEWAdataanalysis) project.
Here's how we work.
Code of Conduct
---------------
First of all: the IHEWAdataanalysis project has a code of conduct. Please read the
CODE_OF_CONDUCT.txt file, it's important to all of us.
Rights
----... | PypiClean |
/CLASHChimeras-0.2.tar.gz/CLASHChimeras-0.2/clashchimeras/align.py | import argparse
import sys
import clashchimeras.log
from clashchimeras.initialize import Arguments
from clashchimeras.parsers import SAM
from clashchimeras.runners import Bowtie, Tophat
class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter,
argparse.RawDescriptionHelpFormatter):
pass... | PypiClean |
/Graphillion-1.5.tar.gz/Graphillion-1.5/graphillion/test/tutorial.py |
from graphillion import GraphSet
import graphillion.tutorial as tl
import unittest
from sys import stderr
class TestTutorial(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_paths(self):
try:
universe = tl.grid(8, 8)
GraphSet.se... | PypiClean |
/Flask-MarcoPolo-0.6.3.tar.gz/Flask-MarcoPolo-0.6.3/flask_marcopolo/projects_templates/default/static/vendor/bootstrap/js/bootstrap.min.js | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/jax/output/HTML-CSS/fonts/STIX/General/Bold/GreekAndCoptic.js | MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-bold"],{894:[472,180,333,82,266],900:[692,-528,300,118,263],901:[692,-528,390,-2,392],902:[700,0,722,9,689],903:[472,-303,333,82,251],904:[700,0,800,10,791],905:[700,0,920,10,904],906:[700,0,530,10,516],908:[700,19,778,10,743],910:[700,0,860,1... | PypiClean |
/KeralaPyApiV2-2.0.2020.tar.gz/KeralaPyApiV2-2.0.2020/pyrogram/client/methods/messages/send_message.py |
from typing import Union
import pyrogram
from pyrogram.api import functions, types
from ...ext import BaseClient
class SendMessage(BaseClient):
async def send_message(
self,
chat_id: Union[int, str],
text: str,
parse_mode: Union[str, None] = object,
disable_web_page_previ... | PypiClean |
/Gbtestapi0.2-0.1a10.tar.gz/Gbtestapi0.2-0.1a10/src/gailbot/services/converter/payload/payloadObject.py | from abc import ABC
from typing import List, Dict
import os
from enum import Enum
from datetime import datetime
from gailbot.core.utils.general import write_json, copy, is_file
from gailbot.configs import OutputFolder, TemporaryFolder
from gailbot.core.utils.logger import makelogger
from ...organizer.source import Sour... | PypiClean |
/MedPy-0.4.0.tar.gz/MedPy-0.4.0/bin/medpy_graphcut_label.py | # build-in modules
from argparse import RawTextHelpFormatter
import argparse
import logging
import os
# third-party modules
import scipy
# path changes
# own modules
from medpy.core import ArgumentError, Logger
from medpy.io import load, save
from medpy import graphcut
from medpy import filter
from medpy.graphcut.wr... | PypiClean |
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/lattices/Struct69.py | from genice2.cell import cellvectors
import genice2.lattices
desc = {"ref": {"SpaceFullerene": 'Sikiric 2010'},
"usage": "No options available.",
"brief": "A space fullerene."
}
class Lattice(genice2.lattices.Lattice):
def __init__(self):
self.pairs = """
70 45
110 ... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/prism/components/prism-gherkin.js | Prism.languages.gherkin = {
'pystring': {
pattern: /("""|''')[\s\S]+?\1/,
alias: 'string'
},
'comment': {
pattern: /((?:^|\r?\n|\r)[ \t]*)#.*/,
lookbehind: true
},
'tag': {
pattern: /((?:^|\r?\n|\r)[ \t]*)@\S*/,
lookbehind: true
},
'feature': {
pattern: /((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!... | PypiClean |
/Chandler-PhotoPlugin-1.0-r16584.tar.gz/Chandler-PhotoPlugin-1.0-r16584/photos/EXIF.py |
# field type descriptions as (length, abbreviation, full name) tuples
FIELD_TYPES=(
(0, 'X', 'Proprietary'), # no such type
(1, 'B', 'Byte'),
(1, 'A', 'ASCII'),
(2, 'S', 'Short'),
(4, 'L', 'Long'),
(8, 'R', 'Ratio'),
(1, 'SB', 'Signed Byte'),
(1, 'U', 'Undefined'),
(2, 'SS', ... | PypiClean |
/CANberry-0.4.tar.gz/CANberry-0.4/canberry/bower_components/jquery/src/callbacks.js | define([
"./core",
"./var/rnotwhite"
], function( jQuery, rnotwhite ) {
// String to Object options format cache
var optionsCache = {};
// Convert String-formatted options into Object-formatted ones and store in cache
function createOptions( options ) {
var object = optionsCache[ options ] = {};
jQuery.each( opti... | PypiClean |
/MLTSA-0.0.7.tar.gz/MLTSA-0.0.7/MLTSA_datasets/OneD_pot/OneD_pot_data.py | import numpy as np
import matplotlib.pyplot as plt
import scipy.stats
from tqdm import tqdm
import random
import itertools
import time
'''
Common functions that can be imported
Potential Class definition
'''
class potentials:
"""
Class for potentials generation
"""
def __init__(self, n_pots, n_d... | PypiClean |
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/README.rst | ===========================================================
Netzob : Protocol Reverse Engineering, Modeling and Fuzzing
===========================================================
.. image:: https://img.shields.io/badge/Python-3-brightgreen.svg
:target: https://github.com/netzob/netzob
:alt: Python3
See compl... | PypiClean |
/Fattoush-0.4.0.tar.gz/Fattoush-0.4.0/src/fattoush/driver/sauce.py | from abc import ABCMeta, abstractmethod
import base64
import hmac
import json
import urllib2
class SauceInterface(object):
__metaclass__ = ABCMeta
@abstractmethod
def set_session_configuration(self, **conf):
pass
@abstractmethod
def fail_session(self):
pass
@abstractmethod
... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/lib/scons-3.1.2/SCons/PathList.py |
__revision__ = "src/engine/SCons/PathList.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
__doc__ = """SCons.PathList
A module for handling lists of directory paths (the sort of things
that get set as CPPPATH, LIBPATH, etc.) with as much caching of data and
efficiency as we can, while still ... | PypiClean |
/Cubane-1.0.11.tar.gz/Cubane-1.0.11/cubane/models/__init__.py | from __future__ import unicode_literals
from django.db import models
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from django.utils import timezone
from cubane.... | PypiClean |
/GSAS-II-WONDER_win-1.0.1.tar.gz/GSAS-II-WONDER_win-1.0.1/GSAS-II-WONDER/imports/G2img_CBF.py | from __future__ import division, print_function
import time
import GSASIIobj as G2obj
import GSASIIpath
import struct as st
import numpy as np
import unpack_cbf as cbf
GSASIIpath.SetVersionNumber("$Revision: 3207 $")
class CBF_ReaderClass(G2obj.ImportImage):
'''Routine to read a Read cif image data .cbf file.
T... | PypiClean |
/ipam_pacman-1.0.0rc1.tar.gz/ipam_pacman-1.0.0rc1/pacman/managers/pacmangui.py |
try:
import Tkinter as tk
except ImportError:
import tkinter as tk
try:
import ttk
py3 = False
except ImportError:
import tkinter.ttk as ttk
py3 = True
import tkinter.filedialog
import sys
import os
if __name__ == '__main__':
import SCM
else:
from . import SCM
import tkinter.messa... | PypiClean |
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/node_modules/tar/lib/extract.js | 'use strict'
// tar -x
const hlo = require('./high-level-opt.js')
const Unpack = require('./unpack.js')
const fs = require('fs')
const fsm = require('fs-minipass')
const path = require('path')
const stripSlash = require('./strip-trailing-slashes.js')
module.exports = (opt_, files, cb) => {
if (typeof opt_ === 'func... | PypiClean |
/Oasis_Optimization-1.0.2-py3-none-any.whl/Oasis/variable.py |
inf = 10.E+20 # define a value for infinity
class Variable(object):
"""
============================================
Optimization Variable Class
============================================
Variable Class Initialization
Parameters:
- name:
[String]: Variable Name
... | PypiClean |
/FlowKit-1.0.1.tar.gz/FlowKit-1.0.1/flowkit/_models/gating_results.py | import pandas as pd
class GatingResults(object):
"""
A GatingResults instance is returned from the GatingStrategy `gate_samples` method
as well as the Session `get_gating_results` method. End users will never create an
instance of GatingResults directly, only via these GatingStrategy and Session
m... | PypiClean |
/Deeplodocus-0.3.0-py3-none-any.whl/deeplodocus/utils/version.py |
import datetime
import functools
import os
import subprocess
import sys
from distutils.version import LooseVersion
# Private, stable API for detecting the Python version. PYXY means "Python X.Y
# or later". So that third-party apps can use these values, each constant
# should remain as long as the oldest supported Dj... | PypiClean |
/Django_patch-2.2.19-py3-none-any.whl/django/forms/models.py | from collections import OrderedDict
from itertools import chain
from django.core.exceptions import (
NON_FIELD_ERRORS, FieldError, ImproperlyConfigured, ValidationError,
)
from django.forms.fields import ChoiceField, Field
from django.forms.forms import BaseForm, DeclarativeFieldsMetaclass
from django.forms.formse... | PypiClean |
/CNVpytor-1.3.1.tar.gz/CNVpytor-1.3.1/cnvpytor/viewer.py | from __future__ import absolute_import, print_function, division
from .io import *
from .utils import *
from .genome import *
from .viewparams import ViewParams, HelpDescription
from .annotator import *
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import matplotlib.colors as colors
import mat... | PypiClean |
/Kato-FlaskAppBuilder-1.1.14.tar.gz/Kato-FlaskAppBuilder-1.1.14/flask_appbuilder/static/appbuilder/js/bootstrap.min.js | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQ... | PypiClean |
/FragPELE-2.1.1.tar.gz/FragPELE-2.1.1/frag_pele/Analysis/forcefield_analysis.py | import numpy as np
import math
import matplotlib.pyplot as plt
from frag_pele.Growing.template_fragmenter import Atom, TemplateOPLS2005, Phi, Theta, Bond
NUM_AVOG = 6.022e23
DIEL_CNST = 1/(4*np.pi*1)
ELECTRON_CHARGE = 1.6022e-19 # C
MAGIC_NUMBER = 10e10/(4.184*1000)
Ein = 1 # ??
Esolv = 80.0 # ??
Evac = 1.257 * 10... | PypiClean |
/DLite_Python-0.4.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl/dlite/triplestore/README.md | Triplestore
===========
> A Python package encapsulating different triplestores using the strategy
> design pattern.
This package has by itself no dependencies outside the standard library,
but the triplestore backends may have.
The main class is Triplestore, who's `__init__()` method takes the name of the
backend to... | PypiClean |
/BWP-0.7.0.tar.gz/BWP-0.7.0/bwp/static/typeahead/0.10.5/bloodhound.js | (function($) {
var _ = function() {
"use strict";
return {
isMsie: function() {
return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false;
},
isBlankString: function(str) {
... | PypiClean |
/Flask-MDEditor-0.1.4.tar.gz/Flask-MDEditor-0.1.4/flask_mdeditor/static/mdeditor/js/lib/codemirror/mode/mllike/mllike.js |
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use s... | PypiClean |
/MultiPyVu-1.2.0.tar.gz/MultiPyVu-1.2.0/README.md | 
# MultiPyVu
***
---
### Introduction
MultiPyVu provides the ability to control the temperature, magnetic field, and chamber status of Quantum Design, Inc. products using python. This module includes MultiVuServer, which runs on the same computer as MultiVu, and MultiVuC... | PypiClean |
/BuzzAlgoTrade-0.0.2.tar.gz/BuzzAlgoTrade-0.0.2/pyalgotrade/tools/yahoofinance.py | import os
import datetime
import pyalgotrade.logger
from pyalgotrade import bar
from pyalgotrade.barfeed import yahoofeed
from pyalgotrade.utils import dt
from pyalgotrade.utils import csvutils
def __adjust_month(month):
if month > 12 or month < 1:
raise Exception("Invalid month")
month -= 1 # Month... | PypiClean |
/DMS_APP-0.2.1-py3-none-any.whl/dms_app/resources/add_profile/add_profile.py | from flask import request
from flask_restx import Resource, reqparse, fields
from ...db.db_connection import database_access
from ...namespace import api
import logging
from ...response_helper import get_response
import json
from bson import json_util
import os
import re
from ..login_register.login import token_require... | PypiClean |
/DerPyBooruPhi-0.10.3.tar.gz/DerPyBooruPhi-0.10.3/derpibooru/search.py |
# Copyright (c) 2014, Joshua Stone
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the... | PypiClean |
/IHEWAcollect-0.0.31.tar.gz/IHEWAcollect-0.0.31/CONTRIBUTING.rst | ============
Contributing
============
Welcome to the IHE WaterAccounting Collect Tool (IHEWAcollect) project.
Here's how we work.
Code of Conduct
---------------
First of all: the IHEWAcollect project has a code of conduct. Please read the
CODE_OF_CONDUCT.txt file, it's important to all of us.
Rights
------
The G... | PypiClean |
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/@types/node/async_hooks.d.ts | declare module 'async_hooks' {
/**
* ```js
* import { executionAsyncId } from 'async_hooks';
*
* console.log(executionAsyncId()); // 1 - bootstrap
* fs.open(path, 'r', (err, fd) => {
* console.log(executionAsyncId()); // 6 - open()
* });
* ```
*
* The ID returne... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/dist/js/demo.js |
(function ($) {
'use strict'
setTimeout(function () {
if (window.___browserSync___ === undefined && Number(localStorage.getItem('AdminLTE:Demo:MessageShowed')) < Date.now()) {
localStorage.setItem('AdminLTE:Demo:MessageShowed', (Date.now()) + (15 * 60 * 1000))
// eslint-disable-next-line no-alert
... | PypiClean |
/ICQ_server-0.1.0.tar.gz/ICQ_server-0.1.0/server/server/server_database.py | import sys
import os
from datetime import datetime
from sqlalchemy import create_engine, Column, Integer, String, ForeignKey, DateTime, Text
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
sys.path.append(os.path.join(os.getcwd(), '../../../messenger'))
sys.path.append(... | PypiClean |
/MPInterfaces-2020.6.19.tar.gz/MPInterfaces-2020.6.19/examples/notebooks/slab_ase.ipynb | ```
TEST_DIR='/home/matk/Software/vasp_automation/test/'
from ase.lattice.surface import fcc111
from ase.io.vasp import write_vasp
pt_slab = fcc111('Pt', size=(2,2,5), vacuum=10.0, orthogonal=True)
write_vasp(TEST_DIR+'POSCAR_pt_ase.vasp', pt_slab,
direct=False, sort=None,
symbol_count=None, lo... | PypiClean |
/HeapDict-1.0.1-py3-none-any.whl/heapdict.py | try:
from collections.abc import MutableMapping
except ImportError:
from collections import MutableMapping
def doc(s):
if hasattr(s, '__call__'):
s = s.__doc__
def f(g):
g.__doc__ = s
return g
return f
class heapdict(MutableMapping):
__marker = object()
def __in... | PypiClean |
/3to2-1.1.1.zip/3to2-1.1.1/lib3to2/fixes/fix_intern.py | from lib2to3 import pytree
from lib2to3 import fixer_base
from lib2to3.fixer_util import Name, BlankLine, find_binding, find_root
class FixIntern(fixer_base.BaseFix):
PATTERN = """
power< 'sys' trailer < '.' 'intern' >
trailer< lpar='('
( not(arglist | argument<any '=' any>) ob... | PypiClean |
/CleverHarold-0.1.tar.gz/CleverHarold-0.1/harold/cache/storage.py |
# Copyright 2006 The Incorporated Wizzo Widget Works
# Distributed under the terms of the GNU General Public License v2
# Author: Troy Melhase <troy@gci.net>
import cPickle
try:
import memcache
except (ImportError, ):
memcache = None
try:
import dbm
except (ImportError, ):
dbm = None
class MemoryS... | PypiClean |
/DeepPhysX.Sofa-22.12.1.tar.gz/DeepPhysX.Sofa-22.12.1/examples/demos/Liver/FC/prediction.py | import os
import sys
from numpy import multiply
# Sofa related imports
import Sofa.Gui
# DeepPhysX related imports
from DeepPhysX.Core.Database.BaseDatabaseConfig import BaseDatabaseConfig
from DeepPhysX.Core.Pipelines.BasePrediction import BasePrediction
from DeepPhysX.Sofa.Environment.SofaEnvironmentConfig import S... | PypiClean |
/Argonaut-0.3.4.tar.gz/Argonaut-0.3.4/argonaut/public/ckeditor/lang/sr-latn.js | /*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.lang['sr-latn']={dir:'ltr',editorTitle:'Rich text editor, %1, press ALT 0 for help.',toolbar:'Toolbar',editor:'Rich Text Editor',source:'Kôd',newPage:'Nova stranica... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/gfx/path.js.uncompressed.js | define("dojox/gfx/path", ["./_base", "dojo/_base/lang","dojo/_base/declare", "./matrix", "./shape"],
function(g, lang, declare, matrix, shapeLib){
/*=====
dojox.gfx.path = {
// summary:
// This module contains the core graphics Path API.
// Path command format follows the W3C SVG 1.0 Path api.
};
g = doj... | PypiClean |
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/currency/__init__.py | from typing import Dict, Optional, Tuple
from .. import BaseProvider, ElementsType
localized = True
class Provider(BaseProvider):
# Format: (code, name)
currencies: ElementsType[Tuple[str, str]] = (
("AED", "United Arab Emirates dirham"),
("AFN", "Afghan afghani"),
("ALL", "Albanian ... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/pip/_vendor/html5lib/_inputstream.py | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type, binary_type
from pip._vendor.six.moves import http_client, urllib
import codecs
import re
from pip._vendor import webencodings
from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase
from .con... | PypiClean |
/DataScienceBI-0.2.tar.gz/DataScienceBI-0.2/DataSBI/SalesPerson.py | class SalesPerson:
"""The SalesPerson class represents an employee in the store
"""
def __init__(self, first_name, last_name, employee_id, salary):
"""Method for initializing a SalesPerson object
Args:
first_name (str)
last_name (str)
employee_... | PypiClean |
/BAxUS-0.0.8.tar.gz/BAxUS-0.0.8/baxus/util/behaviors/embedded_turbo_configuration.py | from dataclasses import dataclass
from typing import Any, Dict
from baxus.util.acquisition_function_types import AcquisitionFunctionType
from baxus.util.behaviors.embedding_configuration import EmbeddingType
@dataclass
class EmbeddedTuRBOBehavior:
"""
The behavior of the embedded TuRBO algorithm
"""
... | PypiClean |
/Gnosis-0.1.1.tar.gz/Gnosis-0.1.1/gnosis/indexer.py | __shell_usage__ = """
Shell Usage: [python] indexer.py [options] [search_words]
-h, /h, -?, /?, ?, --help: Show this help screen
-index: Add files to index
-reindex: Refresh files already in the index
(can take much more time)
... | PypiClean |
/GFX-4.tar.gz/GFX-4/gfx/ext.py | import os
from weakref import WeakValueDictionary
import pygame
from gfx import gl, array
class GLSurface(object):
"""
Create a texture from a pygame.Surface instance.
"""
def __init__(self, surface, type='RGBA', **kw):
self.size = surface.get_size()
self.texture_id = gl.load_texture(... | PypiClean |
/Flask-Dance-7.0.0.tar.gz/Flask-Dance-7.0.0/flask_dance/contrib/spotify.py | from flask import g
from werkzeug.local import LocalProxy
from flask_dance.consumer import OAuth2ConsumerBlueprint
__maintainer__ = "Nick DiRienzo <me@nickdirienzo.com>"
def make_spotify_blueprint(
client_id=None,
client_secret=None,
*,
scope=None,
redirect_url=None,
redirect_to=None,
lo... | PypiClean |
/EMPOL_GUI-2.2.8.tar.gz/EMPOL_GUI-2.2.8/EMPOL_GUI/single_phot.py |
import numpy as np
import math
import matplotlib.pyplot as plt
from astropy.io import fits
import os
import fnmatch
from astropy.io.fits import getheader
from astropy.stats import sigma_clipped_stats
from astropy.modeling import models, fitting
from scipy.optimize import curve_fit
from scipy import interpolate
import ... | PypiClean |
/BlueWhale3-3.31.3.tar.gz/BlueWhale3-3.31.3/Orange/widgets/unsupervised/owlouvainclustering.py | from functools import partial
from concurrent import futures
from concurrent.futures import Future
from types import SimpleNamespace as namespace
from typing import Optional, Callable, Tuple, Any
import numpy as np
import scipy.sparse as sp
import networkx as nx
from AnyQt.QtCore import (
Qt, QObject, QTimer, p... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojo/_base/configFirefoxExtension.js |
// a host environment specifically built for Mozilla extensions, but derived
// from the browser host environment
if(typeof window != 'undefined'){
dojo.isBrowser = true;
dojo._name = "browser";
// FIXME: PORTME
// http://developer.mozilla.org/en/mozIJSSubScriptLoader
// attempt to figure out the path to dojo... | PypiClean |
/MoNeT_MGDrivE-0.9.0.2-py3-none-any.whl/MoNeT_MGDrivE/experimentsHandler.py | import re
import glob
import numpy as np
import warnings as warnings
import MoNeT_MGDrivE.auxiliaryFunctions as auxFun
def getXpId(pFile, idIx):
splitXpId = re.split('_|-', pFile.split('/')[-1].split('.')[-2])
xpId = [int(splitXpId[i]) for i in idIx]
return xpId
def splitExpNames(PATH_OUT, ext='bz'):
... | PypiClean |
/Leytonium-10.tar.gz/Leytonium-10/leytonium/common.py |
# This file is part of Leytonium.
#
# Leytonium 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.
#
# Leytonium is distributed in the ho... | PypiClean |
/LinkChecker-10.2.1-py3-none-any.whl/linkcheck/director/checker.py | import copy
import time
from . import task
from ..cache import urlqueue
from .. import parser
# Interval in which each check thread looks if it's stopped.
QUEUE_POLL_INTERVALL_SECS = 1.0
def check_urls(urlqueue, logger):
"""Check URLs without threading."""
while not urlqueue.empty():
url_data = urlqu... | PypiClean |
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/inginious/common/asyncio_utils.py | import asyncio
import threading
from functools import wraps, partial
from typing import TypeVar, Generic
class AsyncIteratorWrapper(object):
""" A wrapper that converts old-style-generators to async generators using run_in_executor """
def __init__(self, obj):
self._it = obj
self._loop = async... | PypiClean |
/Djblets-3.3.tar.gz/Djblets-3.3/djblets/extensions/settings.py |
from django.utils.translation import gettext as _
from djblets.extensions.signals import settings_saved
class ExtensionSettings(dict):
"""Settings data for an extension.
This is a glorified dictionary that acts as a proxy for the extension's
stored settings in the database.
Callers must call :py:m... | PypiClean |
/DeepManufacturing-0.0.7.tar.gz/DeepManufacturing-0.0.7/ManufacturingNet/models/xgb.py | from math import sqrt
import matplotlib.pyplot as plt
import numpy as np
from sklearn.metrics import (accuracy_score, confusion_matrix, make_scorer,
mean_squared_error, roc_auc_score, roc_curve)
from sklearn.model_selection import (GridSearchCV, cross_val_score,
... | PypiClean |
/FlowTutor-0.9.0.tar.gz/FlowTutor-0.9.0/src/flowtutor/gui/sidebar_forloop.py | from __future__ import annotations
from typing import TYPE_CHECKING, Optional
import dearpygui.dearpygui as dpg
from flowtutor.flowchart.forloop import ForLoop
from flowtutor.flowchart.node import Node
from flowtutor.gui.sidebar import Sidebar
if TYPE_CHECKING:
from flowtutor.gui.gui import GUI
class SidebarFor... | PypiClean |
/DeepPhysX.Sofa-22.12.1.tar.gz/DeepPhysX.Sofa-22.12.1/examples/demos/Beam/FC/validation.py | import os
import sys
# Sofa related imports
import Sofa.Gui
# DeepPhysX related imports
from DeepPhysX.Sofa.Pipeline.SofaPrediction import SofaPrediction
from DeepPhysX.Core.Database.BaseDatabaseConfig import BaseDatabaseConfig
from DeepPhysX.Sofa.Environment.SofaEnvironmentConfig import SofaEnvironmentConfig
from De... | PypiClean |
/DuyanUtils-1.0.4.tar.gz/DuyanUtils-1.0.4/src/DuyanCommon/MysqlDBUtils.py | import re
import pymysql
import loguru
from DuyanCommon.CommonUtls import Entity, EntityPage
logger = loguru.logger
try:
"""支持DBUtils>=2.0以上版本"""
from dbutils.pooled_db import PooledDB
DB_VERSION = PooledDB.version
logger.info("当前DBUtils版本-{}", DB_VERSION)
except Exception as e:
"""用于兼容DBUtils... | PypiClean |
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/ssn/ro_RO/__init__.py | from .. import Provider as BaseProvider
def ssn_checksum(number: str) -> int:
"""
Calculate the checksum for the romanian SSN (CNP).
"""
weights = (2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9)
check = sum(w * int(n) for w, n in zip(weights, number)) % 11
return 1 if check == 10 else check
def vat_che... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.