id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/nodes/KeyValuePairNodes.py | from abc import abstractmethod
from nuitka.PythonVersions import python_version
from .BuiltinHashNodes import ExpressionBuiltinHash
from .ConstantRefNodes import makeConstantRefNode
from .ExpressionBases import (
ExpressionBase,
ExpressionChildHavingBase,
ExpressionChildrenHavingBase,
ExpressionNoSide... | PypiClean |
/BxTorch-0.7.3.tar.gz/BxTorch-0.7.3/bxtorch/optim/lamb.py |
import math
import torch
import torch.optim as optim
class LAMB(optim.Optimizer):
"""
Optimizer presented in "Large Batch Optimization for Deep Learning: Training Bert in 76
Minutes" (You et al., 2019).
The LAMB optimizer ("Layer-wise Adaptive Moments optimizer for Batch training") enables
traini... | PypiClean |
/Gestus-0.3.4.tar.gz/Gestus-0.3.4/gestus/models.py | from django.db import models
from django.utils.translation import ugettext_lazy as _
ENVIRONMENT_KIND_CHOICES = (
('integration', _('Integration')),
('production', _('Production')),
)
class Egg(models.Model):
"""
Egg model
"""
created = models.DateTimeField(_('created'), auto_now_add=True)
... | PypiClean |
/FoundryDataBrowser-190903.1.tar.gz/FoundryDataBrowser-190903.1/viewers/power_scan_h5.py | from ScopeFoundry.data_browser import DataBrowserView
import pyqtgraph as pg
import h5py
from qtpy import QtWidgets
import numpy as np
from ScopeFoundry.widgets import RegionSlicer
class PowerScanH5View(DataBrowserView):
name = 'power_scan_h5'
def is_file_supported(self, fname):
return('powe... | PypiClean |
/Nodes-1.2.tar.gz/Nodes-1.2/doc/README.rst | .. _link-to-readme:
.. currentmodule:: nodes
#######
Concept
#######
Nodes
=====
Maybe you've heard about the neuronets, or Neural Networks. It is
rather old and mature concept of Artificial Intelligence. It often
shows good results, but we often want **best** ones. So, I developed
new concept -- *Nodes*.
Node is ... | PypiClean |
/Brian2Cuda-1.0a2-py3-none-any.whl/brian2cuda/cuda_prefs.py | import numpy as np
from brian2.core.preferences import prefs, BrianPreference
from brian2.core.core_preferences import default_float_dtype_validator, dtype_repr
from brian2.utils.logger import get_logger
logger = get_logger('brian2.devices.cuda_standalone.cuda_prefs')
def validate_bundle_size_expression(string):
... | PypiClean |
/6D657461666C6F77-0.0.17.tar.gz/6D657461666C6F77-0.0.17/metaflow/plugins/catch_decorator.py | import traceback
from metaflow.exception import MetaflowException,\
MetaflowExceptionWrapper
from metaflow.decorators import StepDecorator
NUM_FALLBACK_RETRIES = 3
class FailureHandledByCatch(MetaflowException):
headline = 'Task execution failed but @catch handled it'
def __init__(self, retry_count):
... | PypiClean |
/BubbleBox-0.53-py3-none-any.whl/bubblebox/binding_models.py | import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import least_squares
class bindingbox():
def __init__(self, number_of_polymers, n_polymer_sites, number_of_ligands, number_of_solvent_molecules, interaction_matrix, initialize_in_ground_state = False, kT = 0.4):
"""
Initialize m... | PypiClean |
/DeltaML-commons-0.10.17.tar.gz/DeltaML-commons-0.10.17/commons/data/data_loader.py | import logging
import uuid
import numpy as np
from sklearn.datasets import load_diabetes
import pandas as pd
import os
from commons.utils.singleton import Singleton
class Metadata:
id = None
filename = None
features = None
features_min = None
features_max = None
target_min = None
target_m... | PypiClean |
/BayesASE-21.1.13.1.tar.gz/BayesASE-21.1.13.1/scripts/bwa_split_sam_seonly_2output.py |
import os
import re
import argparse
def getOptions():
"""Function to pull in arguments"""
parser = argparse.ArgumentParser(
description="Takes a SE aligned SAM file and split into different categories"
)
tool = parser.add_argument_group(title="Tool Specific Inputs")
tool.add_argument(
... | PypiClean |
/FlyForms-1.0.0b1.tar.gz/FlyForms-1.0.0b1/flyforms/validators.py | from abc import ABCMeta, abstractmethod
from collections import Iterable
import re
from .common import UNSET
from .compat import with_metaclass
__all__ = (
"EntryValidator",
"MaxValueValidator",
"MaxLengthValidator",
"MinLengthValidator",
"MinValueValidator",
"EmailValidator",
"RegexValida... | PypiClean |
/Chronix2Grid-1.2.0.post1.tar.gz/Chronix2Grid-1.2.0.post1/chronix2grid/generation/_dispatch/_PypsaDispatchBackend/_EDispatch_L2RPN2020/utils.py |
import numpy as np
import pandas as pd
import copy
import warnings
from chronix2grid.generation.dispatch.utils import RampMode
def filter_ramps(net, mode):
"""
Apply filters on ramp constraints, corresponding to different levels of
complexity of the economic dispatch.
Parameters
----------
... | PypiClean |
/FCoRE-4.0.0.tar.gz/FCoRE-4.0.0/F/CLASS/Listener.py | import F
from .Function import FairFunction
# import typing as t
class FairListener:
lid = F.get_uuid()
registered_functions: [FairFunction] = []
callback_function: FairFunction = None
def add_callback_function(self, func:FairFunction):
self.callback_function = func
def run_func(self):
... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/jax/output/SVG/fonts/STIX-Web/SansSerif/Bold/Main.js | MathJax.OutputJax.SVG.FONTDATA.FONTS["STIXMathJax_SansSerif-bold"]={directory:"SansSerif/Bold",family:"STIXMathJax_SansSerif",weight:"bold",id:"STIXWEBSANSSERIFB",32:[0,0,250,0,0,""],160:[0,0,250,0,0,""],120276:[690,0,690,25,665,"665 0h-130l-66 162h-248l-66 -162h-130l306 690h28zM428 264l-83 204l-83 -204h166"],120277:[6... | PypiClean |
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/interfaces/chatbot/chatbot_task.py | import traceback
import datetime as dt
from mindsdb.integrations.libs.api_handler import APIChatHandler
from mindsdb.api.mysql.mysql_proxy.controllers.session_controller import SessionController
from mindsdb.interfaces.storage import db
from mindsdb.interfaces.tasks.task import BaseTask
from mindsdb.utilities import... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/AppCenter/simpleui/static/admin/simpleui-x/elementui/col.js | module.exports =
/******/ (function (modules) { // webpackBootstrap
/******/ // The module cache
/******/
var installedModules = {};
/******/
/******/ // The require function
/******/
function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in ... | PypiClean |
/KratosCoSimulationApplication-9.4-cp39-cp39-win_amd64.whl/KratosMultiphysics/CoSimulationApplication/solver_wrappers/sdof/sdof_solver_wrapper.py | import KratosMultiphysics as KM
import KratosMultiphysics.CoSimulationApplication as KMC
# Importing the base class
from KratosMultiphysics.CoSimulationApplication.base_classes.co_simulation_solver_wrapper import CoSimulationSolverWrapper
# Other imports
from .sdof_solver import SDoFSolver
from KratosMultiphysics.CoS... | PypiClean |
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/lattices/c1te.py | import genice2.lattices
from logging import getLogger
import numpy as np
def usage():
logger = getLogger()
logger.info(__doc__)
desc = {"ref": {"C1": "Teeratchanan 2015"},
"usage": usage(),
"brief": "Hydrogen-ordered hydrogen hydrate C1 by Teeratchanan. (Positions of guests are supplied.)"
... | PypiClean |
/CrossTex-0.7.0.tar.gz/CrossTex-0.7.0/crosstex/parse.py | import os
import re
import cPickle as pickle
import traceback
import ply.lex
import ply.yacc
from copy import copy
from crosstex.options import OptionParser, error, warning
class Value:
'A field value containing a string, number, key, or concatenation.'
def __init__(self, file, line, value, kind=None):
... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/containers/OrderedSetsFallback.py | # Copyright 2009 Raymond Hettinger
#
# 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, copy, modify, merge, publish,
# dis... | PypiClean |
/1NeuronPerceptron_Pypi-mdnazmulislam0087-0.0.4.tar.gz/1NeuronPerceptron_Pypi-mdnazmulislam0087-0.0.4/README.md | # -1NeuronPerceptron_Pypi
1Neuron|Perceptron|_Pypi
"""
author: Nazmul
email: md.nazmul.islam0087@gmail.com
"""
## How to use this
## First install the library using below command by using latest version-
```bash
pip install 1NeuronPerceptron-Pypi-mdnazmulislam0087==0.0.4
```
## Run the below code to see the t... | PypiClean |
/Nuitka_winsvc-1.7.10-cp310-cp310-win_amd64.whl/nuitka/plugins/standard/UpxPlugin.py | """UPX plugin. """
import os
from nuitka.Options import isOnefileMode, isOnefileTempDirMode
from nuitka.plugins.PluginBase import NuitkaPluginBase
from nuitka.utils.AppDirs import getCacheDir
from nuitka.utils.Execution import executeToolChecked, getExecutablePath
from nuitka.utils.FileOperations import copyFile, mak... | PypiClean |
/HTTPolice-0.9.0.tar.gz/HTTPolice-0.9.0/httpolice/syntax/rfc8288.py | from httpolice.citation import RFC
from httpolice.parse import (auto, can_complain, fill_names, literal, many,
mark, maybe, parse, pivot, skip, string, string1)
from httpolice.structure import (CaseInsensitive, MediaType, MultiDict,
Parametrized)
from httpol... | PypiClean |
/Marmir-0.1.3.tar.gz/Marmir-0.1.3/mm/lib/xlwt_0_7_2/ExcelFormulaParser.py | import sys
import antlr
version = sys.version.split()[0]
if version < '2.2.1':
False = 0
if version < '2.3':
True = not False
### header action >>>
import struct
import Utils
from UnicodeUtils import upack1
from ExcelMagic import *
_RVAdelta = {"R": 0, "V": 0x20, "A": 0x40}
_RVAdeltaRef = {"R": 0, "V": 0... | PypiClean |
/CCAgT_utils-0.2.4a0.tar.gz/CCAgT_utils-0.2.4a0/README.md | [](https://pypi.org/project/CCAgT-utils/)
[](https://codecov.io/gh/johnnv1/CCAgT-utils)
[
rev_dict = lambda dct: {val: key for key, val... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ace/ext-textarea.js | ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
"use strict";
exports.isDark = false;
exports.cssClass = "ace-tm";
exports.cssText = ".ace-tm .ace_gutter {\
background: #f0f0f0;\
color: #333;\
}\
.ace-tm .ace_print-margin {\
width: 1px;\
background: #e... | PypiClean |
/Mezzanine-6.0.0.tar.gz/Mezzanine-6.0.0/mezzanine/core/static/mezzanine/tinymce/plugins/spellchecker/plugin.min.js | !function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;f<a.length;++f){if(c=g[a[f]]||e(a[f]),!c)throw"module definition dependecy not found: "+a[f];d.push(c)}b.apply(null,d)}function d(a,d,e){if("string"!=typeof a)throw"invalid module definition, module id must be defined and be a string";if(d===b)throw"invalid... | PypiClean |
/ECmean4-0.1.4.tar.gz/ECmean4-0.1.4/ecmean/utils/cmip6-clim-evaluate.py | __author__ = "Paolo Davini (p.davini@isac.cnr.it), Sep 2022."
import os
import yaml
import warnings
import glob
import numpy as np
from ecmean.performance_indices import performance_indices
from ecmean.libs.files import load_yaml
warnings.simplefilter("ignore")
# the 30-year climatological window to be used as a base... | PypiClean |
/HTSQL-2.3.3.tar.gz/HTSQL-2.3.3/src/htsql/tweak/django/introspect.py |
from ...core.adapter import Protocol, rank, call
from ...core.introspect import Introspect
from ...core.entity import make_catalog
from ...core.domain import (BooleanDomain, IntegerDomain, FloatDomain,
DecimalDomain, TextDomain, DateDomain,
TimeDomain, DateTimeD... | PypiClean |
/HPI-0.3.20230327.tar.gz/HPI-0.3.20230327/my/core/legacy.py | import os
import inspect
import re
from typing import List
from my.core import warnings as W
def handle_legacy_import(
parent_module_name: str,
legacy_submodule_name: str,
parent_module_path: List[str],
) -> bool:
###
# this is to trick mypy into treating this as a proper namespace pa... | PypiClean |
/NetSuite_Connector-0.2.2-py3-none-any.whl/NetSuite_Connector/NetSuite.py | import json
import logging
import traceback
from dataclasses import asdict, dataclass
from typing import Any, Optional
import requests_oauthlib as oauth
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
@dataclass
class NetsuiteObject:
url: Optional[str] = None
request_headers: Optional[dict] = ... | PypiClean |
/FFEAT-1.0.0-py3-none-any.whl/ffeat/strategies/crossover/Differential.py | from typing import Union, Callable
import torch as t
from ffeat import Pipe, STANDARD_REPRESENTATION
_FDU = Union[float, t.distributions.Distribution]
class _Differential(Pipe):
"""
Differential evolution operator. May be used as the whole evolution or as a single crossover operator.
"""
def __init__... | PypiClean |
/Nano-Assault-1.0.tar.gz/Nano-Assault-1.0/nanoassault/level.py |
# (C) 2017, Eike Jesinghaus
# This program 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.
# This program is distributed in the hope ... | PypiClean |
/MAB_algorithm-0.0.12.tar.gz/MAB_algorithm-0.0.12/MAB_algorithm/MABMultiplayer.py |
__all__ = [] # TODO(Antares): delete this
from typing import Callable, Dict, List, Optional, Set, overload
import numpy as np
from MAB_algorithm.arm import *
from MAB_algorithm.MAB import *
class MABMultiplayer(MABAlgorithm):
def __init__(self, arms: List[Arm], numberOfPlayers: int) -> None:
if numbe... | PypiClean |
/JMRPi.Spark-1.0.10.tar.gz/JMRPi.Spark-1.0.10/JMRPiSpark/Drives/Attitude/MPU6050.py |
import smbus
##
# default I2C address of MPU6050
DEF_MPU6050_ADDRESS = 0x68
##
# Earth Gravitiy
GRAVITIY_EARTH = 9.80665
class MPU6050:
"""!
\~english
This driver is for MPU-6050 Motion Processing Unit( InvenSense Inc ).
Features: <br>
* Gyroscope sensor
* Accelerometer sensor
... | PypiClean |
/Deliverance.Rewrite-0.6.3.tar.gz/Deliverance.Rewrite-0.6.3/deliverance/editor/media/editarea/edit_area/manage_area.js | EditArea.prototype.focus = function() {
this.textarea.focus();
this.textareaFocused=true;
};
EditArea.prototype.check_line_selection= function(timer_checkup){
//if(do_highlight==false){
if(!editAreas[this.id])
return false;
//time=new Date;
//t1=t2=t3= time.getTime();
if(!this.smooth_selecti... | PypiClean |
/Finance-Ultron-1.0.8.1.tar.gz/Finance-Ultron-1.0.8.1/ultron/ump/ump/main_jump.py | """็คบไพumpไธป่ฃ็นๅพ่ทณ็ฉบๆจกๅ"""
from ultron.ump.trade.ml_feature import FeatureJump
from ultron.ump.ump.base import ump_main_make_xy, BuyUmpMixin
from ultron.ump.ump.main_base import MainBase
from ultron.ump.model.principles import Principles
class JumpFiter(Principles):
"""
ๅ
้จ็ฑป๏ผๅช้่ฆๅฎ็ฐmake_xy๏ผไธไฝฟ็จump_main_make_xy่ฃ
้ฅฐ
... | PypiClean |
/GeoBases3K-5.0.16.zip/GeoBases3K-5.0.16/GeoBases/TableAssets/table.js | if (!String.fmt) {
String.prototype.fmt = function() {
var formatted = this;
var i;
for (i=0; i<arguments.length; i++) {
var regexp = new RegExp('\\{'+i+'\\}', 'gi');
formatted = formatted.replace(regexp, arguments[i]);
}
return formatted;
};
}
f... | PypiClean |
/Cnc25D-0.1.10.tar.gz/Cnc25D-0.1.10/cnc25d/export_2d.py | ################################################################
# header for Python / FreeCAD compatibility
################################################################
import importing_freecad
importing_freecad.importing_freecad()
#print("FreeCAD.Version:", FreeCAD.Version())
#FreeCAD.Console.PrintMessage("Hell... | PypiClean |
/Code1v1-0.0.9.tar.gz/Code1v1-0.0.9/README.md | ๐ฆ Code1v1 (for Bornforthis)
=======================
ไฝ ๅฅฝ๏ผๆๆฏๆฆๅใ
Hello, this is Yue Chuang.
ๅฆๆไฝ ๅฏน Python ๅบๅผๅๆฏ่พ็ๆไธๆๅ
ด่ถฃไธ่ตท็ ๅๅไผๅ๏ผๆฌข่ฟ๐ๅๆไบค issues ็ณ่ฏทใ[https://github.com/AndersonHJB/Code1v1/issues](https://github.com/AndersonHJB/Code1v1/issues)ใ
If you are familiar with Python library development and are interested in working to... | PypiClean |
/OPAF-0.9.2.tar.gz/OPAF-0.9.2/opaflib/__init__.py | from opaflib.parser import parse,bruteParser,normalParser,xrefParser,multiParser
from opaflib.xmlast import payload,setpayload,xmlToPy,etree,create_node
from opaflib.filters import defilterData
from opaflib.xref import *
#Logging facility
import logging
logging.basicConfig(filename='opaf.log',level=logging.DEBUG)
log... | PypiClean |
/CC-dbgen-0.2.0.tar.gz/CC-dbgen-0.2.0/dbgen/support/datatypes/datatypes.py | import typing
class DataType(object):
def toJSON(self)->dict: raise NotImplementedError()
class AnyType(DataType):
def toJSON(self)->dict:
return {'tag':'AnyType'}
def __str__(self)->str:
return 'Any'
def __repr__(self)->str:
return self.__str__()
class NoneType(DataType):
... | PypiClean |
/Mesa-2.1.1-py3-none-any.whl/mesa/visualization/templates/external/bootstrap-slider-11.0.2/dist/bootstrap-slider.min.js | "use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},windowIsDefined="object"===("undefined"==typeof window?"undefined":_typeof(window));!function... | PypiClean |
/Assimulo-3.0.tar.gz/Assimulo-3.0/assimulo/examples/cvode_with_parameters_fcn.py |
# Copyright (C) 2010 Modelon AB
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITH... | PypiClean |
/Funciones_experimental-0.0.1.tar.gz/Funciones_experimental-0.0.1/Funciones_experimental/Ajustes.py | import matplotlib.pyplot as plt #matplotlib contiene funciones necesarias para graficar. Los detalles se pueden consultar en https://matplotlib.org/stable/plot_types/index.html documentaciรณn
import numpy as np #numpy contiene las definiciones de las funciones matemรกticas mรกs comunes como trigonomรฉtricas, exponenciales,... | PypiClean |
/BigchainDBNext-2.2.2.1.tar.gz/BigchainDBNext-2.2.2.1/bigchaindb/web/websocket_server.py | # NOTE
#
# This module contains some functions and utilities that might belong to other
# modules. For now, I prefer to keep everything in this module. Why? Because
# those functions are needed only here.
#
# When we will extend this part of the project and we find that we need those
# functionalities elsewhere, we can... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/build/inline_copy/lib/scons-4.4.0/SCons/Tool/FortranCommon.py | import re
import os.path
from typing import Tuple
import SCons.Scanner.Fortran
import SCons.Tool
import SCons.Util
from SCons.Action import Action
def isfortran(env, source) -> bool:
"""Returns True if source has any fortran files in it.
Only checks based on filename suffixes, does not examine code.
"""... | PypiClean |
/MCTSRLV2-0.8-py3-none-any.whl/PreprocessingND.py | import warnings
import pandas as pd
from sklearn import preprocessing
warnings.simplefilter(action='ignore', category=FutureWarning)
class Preprocessing:
def __init__(self, df):
self.df = df
def isnumber(self, x):
try:
float(x)
return True
except:
r... | PypiClean |
/Newgram-0.0.5.tar.gz/Newgram-0.0.5/newgram/types/bots_and_keyboards/inline_keyboard_button.py |
from typing import Union
import newgram
from newgram import raw
from newgram import types
from ..object import Object
class InlineKeyboardButton(Object):
"""One button of an inline keyboard.
You must use exactly one of the optional fields.
Parameters:
text (``str``):
Label text on ... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/grid/_ViewManager.js | if(!dojo._hasResource["dojox.grid._ViewManager"]){
dojo._hasResource["dojox.grid._ViewManager"]=true;
dojo.provide("dojox.grid._ViewManager");
dojo.declare("dojox.grid._ViewManager",null,{constructor:function(_1){
this.grid=_1;
},defaultWidth:200,views:[],resize:function(){
this.onEach("resize");
},render:function(){
t... | PypiClean |
/Flask-AppBuilder-jack-3.3.4.tar.gz/Flask-AppBuilder-jack-3.3.4/flask_appbuilder/forms.py | import logging
from flask_wtf import FlaskForm
from wtforms import (
BooleanField,
DateField,
DateTimeField,
DecimalField,
FloatField,
IntegerField,
StringField,
TextAreaField,
)
from wtforms import validators
from .fields import EnumField, QuerySelectField, QuerySelectMultipleField
fr... | PypiClean |
/MangaCrawler-1.0.0a1-py3-none-any.whl/MangaCrawler-1.0.0a1.dist-info/DESCRIPTION.rst | MangaCrawler
============
**Simple crawler for finding new chapters to read.**
#. Reads mangalist file for supported list site.
#. Finds all of the mangas that has 5 or more new chapters from
supported manga sites.
#. Outputs .csv file with all of the needed data.
Installing and usage
--------------------
Instal... | PypiClean |
/CSelenium-0.0.7.tar.gz/CSelenium-0.0.7/src/Cselenium/TestHttp/TestHTTP.py | import socket
import time
import random
import ctypes
import re
import sys
# ้่ฟๅฐๅๅป่ทๅๅผ
a = 100
addr = id(a)
g = ctypes.cast(addr,ctypes.py_object).value
# print(g)
def t():
pass
class A:
pass
'''
ๆฐๅญ
ๅญ็ฌฆไธฒ
็ฑป
...
'''
NUMBER_BYTE = sys.getsizeof(1)
STRING_BYTE = sys.getsizeof("")
FUNCTION_BYTE = sys.getsizeof(t)
... | PypiClean |
/Camelot-13.04.13-gpl-pyqt.tar.gz/Camelot-13.04.13-gpl-pyqt/camelot/view/action_steps/open_file.py |
from PyQt4 import QtGui, QtCore
from camelot.admin.action import ActionStep
from camelot.core.templates import environment
class OpenFile( ActionStep ):
"""
Open a file with the preferred application from the user. The absolute
path is preferred, as this is most likely to work when running from an
... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/@types/node/fs/promises.d.ts | declare module 'fs/promises' {
import { Abortable } from 'node:events';
import { Stream } from 'node:stream';
import { ReadableStream } from 'node:stream/web';
import {
BigIntStats,
BigIntStatsFs,
BufferEncodingOption,
constants as fsConstants,
CopyOptions,
... | PypiClean |
/ogn_lib-0.2.5-py3-none-any.whl/ogn_lib-0.2.5.dist-info/DESCRIPTION.rst | # OGN Lib
[](https://travis-ci.org/akolar/ogn-lib) [](https://codecov.io/gh/akolar/ogn-lib) [](https://badge.fury.io/... | PypiClean |
/BayesASE-21.1.13.1.tar.gz/BayesASE-21.1.13.1/scripts/gen_headers_after_merge_priors_one_comparate.py |
import re
import argparse
import os
import sys
import numpy as np
from functools import reduce
from collections import OrderedDict
import pandas as pd
DEBUG = False
def getOptions():
parser = argparse.ArgumentParser(
description='Create headers for model for a for a single comparate.'
)
parser.ad... | PypiClean |
/CartiMorph_nnUNet-1.7.14.tar.gz/CartiMorph_nnUNet-1.7.14/CartiMorph_nnUNet/inference/ensemble_predictions.py |
import shutil
from copy import deepcopy
from CartiMorph_nnUNet.inference.segmentation_export import save_segmentation_nifti_from_softmax
from batchgenerators.utilities.file_and_folder_operations import *
import numpy as np
from multiprocessing import Pool
from CartiMorph_nnUNet.postprocessing.connected_components im... | PypiClean |
/ModbusGuiApp-1.1-py3-none-any.whl/modbus_gui_app/state/data_structures.py | from datetime import datetime
def _init_user_action_state_dict():
current_request_and_response_dictionary = {
"current_tid": 0,
"current_unit_address": "0",
"current_function_code": "00",
"current_request_name": "Unknown Request.",
"current_request_from_gui": '-',
"... | PypiClean |
/myllm-1.2.37.tar.gz/myllm-1.2.37/README.md |
<table style="border: 1px solid transparent">
<tr>
<td>
<a href="http://talky.readthedocs.io"><img src="https://img.shields.io/badge/Wiki-%23000000.svg?style=for-the-badge&logo=wikipedia&logoColor=white"></a>
<a href="https://github.com/mraniki/tt/"><img src="https://img.shields.io/badge/github-%23000000.svg?st... | PypiClean |
/DendroPy-4.6.1.tar.gz/DendroPy-4.6.1/src/dendropy/calculate/treecompare.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 |
/MezzanineFor1.7-3.1.10.tar.gz/MezzanineFor1.7-3.1.10/docs/admin-customization.rst | ===================
Admin Customization
===================
Mezzanine uses the standard `Django admin interface
<http://docs.djangoproject.com/en/dev/ref/contrib/admin/>`_ allowing you to
add admin classes as you normally would with a Django project, but also
provides the following enhancements to the admin interface ... | PypiClean |
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/lorem/ja_JP/__init__.py | from typing import Dict
from .. import Provider as LoremProvider
class Provider(LoremProvider):
"""Implement lorem provider for ``ja_JP`` locale."""
word_connector = ""
sentence_punctuation = "ใ"
word_list = (
"ใณใใฅใใใฃ",
"้ ใ",
"่",
"้ถๅจ",
"้ฏ่ฆ",
"ใใผใฒใณ",
... | PypiClean |
/My_Server_Student-0.0.1.tar.gz/My_Server_Student-0.0.1/server/server/add_user.py | from hashlib import pbkdf2_hmac
from binascii import hexlify
import sys
from PyQt5.QtWidgets import QDialog, QPushButton, QLineEdit, QApplication, QLabel, QMessageBox
from PyQt5.QtCore import QEvent
from PyQt5.QtCore import Qt
class RegisterUser(QDialog):
"""ะะปะฐัั ะพะบะฝะฐ ะดะธะฐะปะพะณะฐ ัะตะณะธัััะฐัะธะธ ะฟะพะปัะทะพะฒะฐัะตะปั ะฝะฐ ัะตัะฒะตัะต... | PypiClean |
/Marl_Neon_Grid-0.1.4.5-py3-none-any.whl/marl_neon_grid/ray_caster.py | import math
import itertools
import numpy as np
from numba import njit
class RayCaster:
def __init__(self, agent, degs=360):
self.agent = agent
self.n_rays = 100#(agent.view_radius + 1) * 8
self.degs = degs
self.ray_targets = self.build_ray_targets()
def build_ray_targets(self... | PypiClean |
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Common/Utils/SortedTypedList.py |
#+---------------------------------------------------------------------------+
#| 01001110 01100101 01110100 01111010 01101111 01100010 |
#| |
#| Netzob : Inferring communication protocols |
#+-... | PypiClean |
/CEA_Wrap-1.6.1-py3-none-any.whl/CEA_Wrap/utils.py | import importlib.resources, os, shutil
import logging as _logging
import appdirs
from zlib import crc32
logging = _logging.getLogger(__name__)
use_local_assets = True # If possible, use local assets rather than site-packages. Set to false if error on move
class Output(dict): # This is just a dictionary that you can a... | PypiClean |
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/brace-expansion/index.js | var concatMap = require('concat-map');
var balanced = require('balanced-match');
module.exports = expandTop;
var escSlash = '\0SLASH'+Math.random()+'\0';
var escOpen = '\0OPEN'+Math.random()+'\0';
var escClose = '\0CLOSE'+Math.random()+'\0';
var escComma = '\0COMMA'+Math.random()+'\0';
var escPeriod = '\0PERIOD'+Math... | PypiClean |
/FreeClimb-4.5.0-py3-none-any.whl/freeclimb/model/say.py | import re # noqa: F401
import sys # noqa: F401
from freeclimb.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,
vali... | PypiClean |
/FlaskFarm-4.0.104-py3-none-any.whl/flaskfarm/lib/framework/static/js/Sortable.js | (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.Sortable = factory());
}(this, (function () { 'use strict';
function ownKeys(obje... | PypiClean |
/LoginRadius-2.8.1.zip/LoginRadius-2.8.1/UserRegistration.py | from datetime import datetime
#Requires Python 2.6>
from collections import namedtuple
#Requires Python 2.7>
from importlib import import_module
import sys
__author__ = "LoginRadius"
__copyright__ = "Copyright 2015-2016, LoginRadius"
__email__ = "developers@loginradius.com"
__status__ = "Production"
__version__ = "2.... | PypiClean |
/OdooRPC-0.10.1.tar.gz/OdooRPC-0.10.1/doc/source/tuto_browse_methods.rst | .. _tuto-browse-methods:
Call methods from a Model or from records
*****************************************
Unlike the `Odoo` API, there is a difference between class methods
(e.g.: `create`, `search`, ...) and instance methods that apply directly on
existing records (`write`, `read`, ...)::
>>> User = odoo.env... | PypiClean |
/NESTML-5.3.0-py3-none-any.whl/pynestml/cocos/co_co_resolution_func_legally_used.py |
from pynestml.cocos.co_co import CoCo
from pynestml.meta_model.ast_equations_block import ASTEquationsBlock
from pynestml.meta_model.ast_function import ASTFunction
from pynestml.meta_model.ast_simple_expression import ASTSimpleExpression
from pynestml.utils.logger import LoggingLevel, Logger
from pynestml.utils.messa... | PypiClean |
/DigiCore-1.1.3.tar.gz/DigiCore-1.1.3/alibabacloud_gateway_dingtalk/client.py | from Tea.exceptions import TeaException
from Tea.core import TeaCore
from typing import Any
from alibabacloud_gateway_spi.client import Client as SPIClient
from alibabacloud_gateway_spi import models as spi_models
from alibabacloud_tea_util.client import Client as UtilClient
class Client(SPIClient):
def __init__... | PypiClean |
/ESMValTool-2.9.0-py3-none-any.whl/esmvaltool/diag_scripts/ocean/diagnostic_profiles.py | import logging
import os
import sys
import numpy as np
import iris
import iris.coord_categorisation
import iris.exceptions
import iris.quickplot as qplt
import matplotlib.pyplot as plt
from esmvaltool.diag_scripts.ocean import diagnostic_tools as diagtools
from esmvaltool.diag_scripts.shared import run_diagnostic
fro... | PypiClean |
/NlpToolkit-WordNet-1.0.24.tar.gz/NlpToolkit-WordNet-1.0.24/WordNet/SynSet.py | from __future__ import annotations
from Dictionary.Pos import Pos
from WordNet.InterlingualDependencyType import InterlingualDependencyType
from WordNet.InterlingualRelation import InterlingualRelation
from WordNet.Literal import Literal
from WordNet.Relation import Relation
from WordNet.SemanticRelation import Semant... | PypiClean |
/CGATReport-0.9.1.tar.gz/CGATReport-0.9.1/doc/Background.rst | .. _Background:
=====================
Background
=====================
This section introduces the concepts of cgatreport. This section is
required reading in order to be able to use cgatreport effectively.
To create dynamic figures, cgatreport combines two components, a
:term:`tracker` and a :term:`renderer`. A :te... | PypiClean |
/AMON-bio-1.0.0.tar.gz/AMON-bio-1.0.0/scripts/amon.py |
import argparse
from AMON.predict_metabolites import main
if __name__ == '__main__':
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
# Primary inputs
parser.add_argument('-i', '--gene_set', help="KEGG KO's from bacterial community or organism of interest in the "
... | PypiClean |
/Beaker-1.12.1.tar.gz/Beaker-1.12.1/beaker/middleware.py | import warnings
try:
from paste.registry import StackedObjectProxy
beaker_session = StackedObjectProxy(name="Beaker Session")
beaker_cache = StackedObjectProxy(name="Cache Manager")
except:
beaker_cache = None
beaker_session = None
from beaker.cache import CacheManager
from beaker.session import S... | PypiClean |
/Becky-0.7.tar.gz/Becky-0.7/becky_cli/becky/providers/s3_provider.py | import os
import glob
import uuid
import subprocess
from tempfile import TemporaryDirectory
from shutil import copyfile
from becky_cli.becky.utils.utils import remove_prefix, join_file_path, path_to_folders
"""
A provider that can backup to and from any S3 compatible object storage server in a
differential fashion.
"... | PypiClean |
/NHentai-API-1.0.2.tar.gz/NHentai-API-1.0.2/NHentai/sync/infra/adapters/repositories/hentai/implementations/nhentai.py | from urllib.parse import urljoin
from bs4 import BeautifulSoup
from NHentai.core.logging import logger
from NHentai.core.interfaces import Comment, CommentPage, Doujin, SearchResult, Sort, PopularPage, Page
from NHentai.sync.infra.adapters.repositories.hentai.hentai_interface import NhentaiInterface
from NHentai.sync... | PypiClean |
/Infomericaclass-1.0.0.tar.gz/Infomericaclass-1.0.0/inf/models/ethnicolr_keras_lstm_wiki_name.ipynb | ```
import keras
import tensorflow as tf
print(keras.__version__)
print(tf.__version__)
import numpy as np
import pandas as pd
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report,confusion_matrix
NGRAMS = 2
... | PypiClean |
/GPopt-0.2.4.tar.gz/GPopt-0.2.4/README.md | GPopt
===============================
Bayesian Optimization using Gaussian Process Regression
 [](./LICENSE) [](https://pepy.tech/project/gpopt)
[:
"""
Discover Class to retrieve module information over a WebSocket connection.
:Arguments: ****kwargs** *(Dict)*: connection_handle: InoDrive Object's Connection Handle
... | PypiClean |
/FitBenchmarking-1.0.0.tar.gz/FitBenchmarking-1.0.0/fitbenchmarking/controllers/scipy_ls_controller.py | from scipy.optimize import least_squares
import numpy as np
from fitbenchmarking.controllers.base_controller import Controller
class ScipyLSController(Controller):
"""
Controller for the Scipy Least-Squares fitting software.
"""
controller_name = 'scipy_ls'
algorithm_check = {
'all': ['l... | PypiClean |
/FRB-1.1.4.tar.gz/FRB-1.1.4/docs/_build/html/_static/underscore.js | (function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case... | PypiClean |
/HTS-waterworks-0.1.tar.gz/HTS-waterworks-0.1/hts_waterworks/annotation.py | import shlex
import tempfile
import glob
import os
from ruffus import (transform, suffix, files, follows, regex, split, collate,
add_inputs)
from ruffus.task import active_if
import pyper
from matplotlib import pyplot
import scipy as sp
import bx.bbi.bigwig_file as bigwig_file
from hts_waterworks.... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/components/trakt/trakt_lookup.py | from typing import Optional
from loguru import logger
from flexget import plugin
from flexget.entry import Entry, register_lazy_lookup
from flexget.event import event
from flexget.manager import Session
from . import api_trakt as plugin_api_trakt
from . import db
# TODO: not very nice ..
lookup_series = plugin_api_... | PypiClean |
/InformixDB-2.5.tar.gz/InformixDB-2.5/informixdb.py |
# $Id: informixdb.py 169 2007-10-15 01:56:03Z chaese $
# informixdb.py
#
# This is a trivial python wrapper around the C core _informixdb.so
#
"""\
DB-API 2.0 compliant interface for IBM Informix databases.
Here's a small example to get you started:
>>> import informixdb
>>> conn = informixdb.connect('mydatabase')... | PypiClean |
/EModelRunner-1.1.16.tar.gz/EModelRunner-1.1.16/emodelrunner/GUI_utils/interface.py |
# Copyright 2020-2022 Blue Brain Project / EPFL
# 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 agree... | PypiClean |
/CardGames-0.0.0.tar.gz/CardGames-0.0.0/cards/classify_hand.py | from cards.classification_utils import is_straight_ace_low_high, is_flush
from cards.five_card_hand import FiveCardHand
from cards.poker_hands import StraightFlush, Straight, Flush, HighCard, FourOfAKind, FullHouse, ThreeOfAKind, TwoPair, \
OnePair
def classify(hand, is_straight_function=is_straight_ace_low_high)... | PypiClean |
/Adeepspeed-0.9.2.tar.gz/Adeepspeed-0.9.2/deepspeed/utils/logging.py |
# DeepSpeed Team
import functools
import logging
import sys
import os
log_levels = {
"debug": logging.DEBUG,
"info": logging.INFO,
"warning": logging.WARNING,
"error": logging.ERROR,
"critical": logging.CRITICAL,
}
class LoggerFactory:
@staticmethod
def create_logger(name=None, level=l... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojo/cldr/nls/ko/gregorian.js | ({"months-format-narrow":["1์","2์","3์","4์","5์","6์","7์","8์","9์","10์","11์","12์"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"์์ผ","dateFormatItem-yQQQ":"y๋
QQQ","dateFormatItem-yMEd":"yyyy. M. d. EEE","dateFormatItem-MMMEd":"MMM d์ผ (E)","eraNarrow":["๊ธฐ์์ ","์๊ธฐ"],"dateFormat-long":"y๋
M์ d์ผ","... | PypiClean |
/Imaginary-0.0.5.tar.gz/Imaginary-0.0.5/imaginary/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 regular expressions. With pyparsing, you
don't need to learn a new syntax for ... | PypiClean |
/fangnao-0.1.0.tar.gz/FangNao-0.1.0/examples/neurons/HH_model.py |
import matplotlib.pyplot as plt
import brainpy as nb
import brainpy.numpy as np
def define_hh(noise=0., E_Na=50., g_Na=120., E_K=-77., g_K=36., E_Leak=-54.387,
g_Leak=0.03, C=1.0, Vth=20.):
"""The HodgkinโHuxley neuron model.
Parameters
----------
noise : float
The noise fluct... | PypiClean |
/parts/Top/Hairs/ShortFlat.py | def ShortFlat(color):
return (
'<path fill-rule="evenodd" clip-rule="evenodd"'
' d="M180.15 39.9204C177.39 37.1004 174.186 34.7068 171.069 32.3066C170.382 31.7774 169.683 31.2611 169.011 30.7118C168.858 30.587 167.292 29.4657 167.105 29.0531C166.654 28.0603 166.915 28.8333 166.977 27.6486C167.056... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/yaml_35/yaml/representer.py | __all__ = ['BaseRepresenter', 'SafeRepresenter', 'Representer',
'RepresenterError']
from .error import *
from .nodes import *
import datetime, sys, copyreg, types, base64, collections
class RepresenterError(YAMLError):
pass
class BaseRepresenter:
yaml_representers = {}
yaml_multi_representers = {}
... | PypiClean |
/NREL_reV-0.8.1-py3-none-any.whl/reV/utilities/curtailment.py | import datetime
import logging
import numpy as np
import pandas as pd
from warnings import warn
from reV.utilities.exceptions import HandlerWarning
from rex.utilities.solar_position import SolarPosition
from rex.utilities.utilities import check_tz, get_lat_lon_cols
logger = logging.getLogger(__name__)
def curtail(... | PypiClean |
/Netfoll_TL-2.0.1-py3-none-any.whl/netfoll_tl/tl/custom/conversation.py | import asyncio
import functools
import inspect
import itertools
import time
from .chatgetter import ChatGetter
from ... import helpers, utils, errors
# Sometimes the edits arrive very fast (within the same second).
# In that case we add a small delta so that the age is older, for
# comparision purposes. This value is... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.