id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/MTGProxyPrinter-0.25.0.tar.gz/MTGProxyPrinter-0.25.0/mtg_proxy_printer/card_info_downloader.py |
# 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 that it will be useful,
# bu... | PypiClean |
/Generic%20model%20class-0.0.3.tar.gz/Generic model class-0.0.3/MontyCarlo/materials/positron/makeBrem.py | from ...settings import __montecarlo__
__path__ = __montecarlo__/'materials'/'electron'/'NRC_BREM'
__data__ = str(__path__) + '/nrc_brems_'
from numpy import array, zeros, searchsorted, log, logspace, insert, append
from matplotlib.pyplot import *
from matplotlib import pyplot
from mpl_toolkits.mplot3d import Axes3... | PypiClean |
/DeepCellTL-0.12.5.tar.gz/DeepCellTL-0.12.5/deepcell/model_zoo/featurenet.py | """Assortment of CNN architectures for single cell segmentation"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import numpy as np
from tensorflow.keras import backend as K
from tensorflow.keras.models import Sequential, Model
from tensorflow.keras.laye... | PypiClean |
/Bumblebee-1.0a1.zip/Bumblebee-1.0a1/bumblebee/rules.py | def spacedList(val):
if not isinstance(val, basestring):
raise Exception("Expected string to work with.")
if not val:
return []
return val.split(' ')
def notNone(val):
if not val:
raise Exception("You must have a value for this.")
return val
class Base(object):
def __... | PypiClean |
/CobWeb-lnx-1.1.0.tar.gz/CobWeb-lnx-1.1.0/README.md | # CobWeb
CobWeb is a Python library for web scraping. The library consists of two classes: Spider and Scraper.
## Spider
The Spider class is used to crawl a website and identify internal and external links. It has the following methods:
__init__(self, url, max_hops = 0): Initializes a Spider object with the giv... | PypiClean |
/Cheetah-2.4.4.tar.gz/Cheetah-2.4.4/cheetah/Tests/Performance.py |
import hotshot
import hotshot.stats
import os
import sys
import unittest
from test import pystone
import time
import Cheetah.NameMapper
import Cheetah.Template
# This can be turned on with the `--debug` flag when running the test
# and will cause the tests to all just dump out how long they took
# insteasd of asse... | PypiClean |
/BuildStream-external-0.30.0.tar.gz/BuildStream-external-0.30.0/README.rst | BuildStream Plugins
*******************
A collection of plugins for the BuildStream project that are too
specific or prone to change for inclusion in the main repository.
This is designed to be used with release releases of BuildStream
only. Please use `bst-plugins-experimental <https://gitlab.com/BuildStream/bst-plug... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/http/multipartparser.py | import base64
import binascii
import collections
import html
from django.conf import settings
from django.core.exceptions import (
RequestDataTooBig,
SuspiciousMultipartForm,
TooManyFieldsSent,
TooManyFilesSent,
)
from django.core.files.uploadhandler import SkipFile, StopFutureHandlers, StopUpload
from... | PypiClean |
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/bower_components/bootstrap-fileinput/js/locales/hu.js | (function ($) {
"use strict";
$.fn.fileinputLocales['hu'] = {
fileSingle: 'fájl',
filePlural: 'fájlok',
browseLabel: 'Tallózás…',
removeLabel: 'Eltávolítás',
removeTitle: 'Kijelölt fájlok törlése',
cancelLabel: 'Mégse',
cancelTitle: 'Feltöltés megs... | PypiClean |
/Blingalytics-0.2.7.tar.gz/Blingalytics-0.2.7/blingalytics/sources/derived.py | from datetime import timedelta
import decimal
from blingalytics import sources
DIVISION_BY_ZERO = (decimal.InvalidOperation, ZeroDivisionError)
class DerivedSource(sources.Source):
def post_process(self, row, clean_inputs):
# Compute derived values for all columns on this row
for name, column in... | PypiClean |
/DisplaceNet-0.1.tar.gz/DisplaceNet-0.1/engine/object_detection_branch/retina_net/keras_retinanet/losses.py | import keras
from . import backend
def focal(alpha=0.25, gamma=2.0):
""" Create a functor for computing the focal loss.
Args
alpha: Scale the focal weight with alpha.
gamma: Take the power of the focal weight with gamma.
Returns
A functor that computes the focal loss using the a... | PypiClean |
/Lantz-0.3.zip/Lantz-0.3/docs/tutorial/rich-app.rst | .. _tutorial-gui-rich-app:
A rich GUI app
==============
Building a rich, responsive and reusable app is tough. In this part of the tutorial you learn how Lantz makes it simpler by build an application using Blocks and :class:Backend and :class:Frontend classes.
This is the wish list for our application:
- Sho... | PypiClean |
/CDS-1.0.1.tar.gz/CDS-1.0.1/INSTALL.rst | Installation
============
Step-by-step
------------
Install `ffmpeg` and ensure that `ffprobe` is in your PATH:
.. code-block:: console
$ ffprobe
... ffprobe version 3.3.3 ...
Prepare the environment
.. code-block:: console
$ ./scripts/setup-npm.sh
$ mkvirtualenv cds3
(cds3)$ cdvirtualenv ; m... | PypiClean |
/HavNegpy-1.2.tar.gz/HavNegpy-1.2/docs/_build/html/_static/language_data.js | var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
/* Non-minified version is copied as a separate JS file, is available */
/**
* Porter Stemmer
*/
v... | PypiClean |
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/person/ru_RU/__init__.py | from collections import OrderedDict
from typing import Dict, Sequence
from .. import Provider as PersonProvider
# See transliteration table https://en.wikipedia.org/wiki/Romanization_of_Russian#Transliteration_table
def translit(text: str) -> str:
translit_dict: Dict[str, str] = {
"а": "a",
"б": ... | PypiClean |
/C-Telethon-1.28.5.tar.gz/C-Telethon-1.28.5/telethon/tl/types/help.py | from ...tl.tlobject import TLObject
from typing import Optional, List, Union, TYPE_CHECKING
import os
import struct
from datetime import datetime
if TYPE_CHECKING:
from ...tl.types import TypeAccessPointRule, TypeChat, TypeDataJSON, TypeDocument, TypeJSONValue, TypeMessageEntity, TypePeer, TypePremiumSubscriptionOp... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/MathBoldItalic.js | MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-bold-italic"],{skew:{119912:0.16,119913:0.14,119914:0.12,119915:0.1,119916:0.1,119917:0.1,119918:0.12,119919:0.1,119920:0.1,119921:0.1,119922:0.1,119923:0.05,119924:0.08,119925:0.08,119926:0.12,119927:0.05,119928:0.12,119929:0.1,119930:0.12,11... | PypiClean |
/MeetupAPI-1.5.8-py3-none-any.whl/meetup_api/meetup_functions/create.py | import time
import requests
from meetup_api.log import Log
class MeetupCreate():
def __init__(self, access_token, group, event, announce, publish_status, how_to_find_us):
self.logs = ['self.__init__']
self.started = round(time.time())
self.access_token = access_token
self.group =... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/jax/output/SVG/fonts/TeX/AMS/Regular/SuppMathOperators.js | MathJax.Hub.Insert(MathJax.OutputJax.SVG.FONTDATA.FONTS.MathJax_AMS,{10846:[813,97,611,54,555,"55 795Q56 806 70 813H540Q554 806 555 795Q555 791 554 788T552 783T549 779T546 777T542 775T539 773H71Q70 773 68 774T65 776T61 779T58 783T56 788T55 795ZM55 601Q56 612 70 619H540Q554 612 555 601Q555 597 554 594T552 589T549 585T54... | PypiClean |
/AMPAL-1.4.0.tar.gz/AMPAL-1.4.0/src/ampal/assembly.py |
from collections import Counter
import itertools
from ampal.base_ampal import BaseAmpal, Polymer, find_atoms_within_distance
from ampal.ligands import LigandGroup, Ligand
from ampal.analyse_protein import (
sequence_molecular_weight, sequence_molar_extinction_280,
sequence_isoelectric_point)
class AmpalCont... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/summernote/plugin/specialchars/summernote-ext-specialchars.js | (function(factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = factory(require('jquery'));
} else {
// Browser globals
... | PypiClean |
/Filterous-0.7.1.tar.gz/Filterous-0.7.1/filterous.py | __author__ = 'Victor Engmark'
__email__ = 'victor.engmark@gmail.com'
__copyright__ = 'Copyright (C) 2010 Victor Engmark'
__license__ = 'GPLv3'
from datetime import datetime
import getopt
from lxml import etree
import sys
from urllib import quote
# pylint: disable-msg=W0105
TAG_SEPARATOR = u' '
"""Delicious separates ... | PypiClean |
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/checks/same.py |
import re
from django.utils.html import strip_tags
from django.utils.translation import gettext_lazy as _
from weblate_language_data.check_languages import LANGUAGES
from weblate.checks.base import TargetCheck
from weblate.checks.data import IGNORE_WORDS
from weblate.checks.format import FLAG_RULES, PERCENT_MATCH
f... | PypiClean |
/Function-Limiter-0.2.0.tar.gz/Function-Limiter-0.2.0/versioneer.py | import configparser
import errno
import json
import os
import re
import subprocess
import sys
class VersioneerConfig:
"""Container for Versioneer configuration parameters."""
def get_root():
"""Get the project root directory.
We require that all commands are run from the project root, i.e. the
dire... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/tree/ReformulationNamespacePackages.py | import os
from nuitka import Options
from nuitka.nodes.AttributeNodes import makeExpressionAttributeLookup
from nuitka.nodes.CallNodes import ExpressionCallNoKeywords
from nuitka.nodes.ConstantRefNodes import makeConstantRefNode
from nuitka.nodes.ContainerMakingNodes import (
makeExpressionMakeList,
makeExpres... | PypiClean |
/Cubane-1.0.11.tar.gz/Cubane-1.0.11/cubane/cms/management/commands/rewrite_links.py | from __future__ import unicode_literals
from django.conf import settings
from django.core.management import call_command
from django.core.management.base import BaseCommand, CommandError
from cubane.cms.views import get_cms
from cubane.lib.app import get_models
from cubane.lib.html import get_normalised_links
from cuba... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/codemirror/addon/selection/mark-selection.js |
// Because sometimes you need to mark the selected *text*.
//
// Adds an option 'styleSelectedText' which, when enabled, gives
// selected text the CSS class given as option value, or
// "CodeMirror-selectedtext" when the value is not a string.
(function(mod) {
if (typeof exports == "object" && typeof module == "ob... | PypiClean |
/Lasagne-0.1.tar.gz/Lasagne-0.1/docs/user/custom_layers.rst | Creating custom layers
======================
A simple layer
--------------
To implement a custom layer in Lasagne, you will have to write a Python class
that subclasses :class:`Layer` and implement at least one method:
`get_output_for()`. This method computes the output of the layer given its
input. Note that both ... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/jquery-validation/jquery.validate.js | (function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery"], factory );
} else if (typeof module === "object" && module.exports) {
module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
$.extend( $.fn, {
// https://jqueryvalidation... | PypiClean |
/KoMar-0.5.tar.gz/KoMar-0.5/komar/__init__.py |
__author__ = "Wojciech 'KosciaK' Pietrzok (kosciak@kosciak.net)"
__version__ = "0.5"
import sys
import os
import re
class Stack(object):
def __init__(self):
self.data = []
def __iter__(self):
return self
def __len__(self):
return len(self.data)
def __rep... | PypiClean |
/LRU-pytorch-0.1.2.tar.gz/LRU-pytorch-0.1.2/LRU_pytorch/LRU.py | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class LRU(nn.Module):
def __init__(self,in_features,out_features,state_features, rmin=0, rmax=1,max_phase=6.283):
super().__init__()
self.out_features=out_features
self.D=nn.Parameter(torch.randn([out_features,i... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/ol-2.13/lib/OpenLayers/Marker.js | * @requires OpenLayers/BaseTypes/Class.js
* @requires OpenLayers/Events.js
* @requires OpenLayers/Icon.js
*/
/**
* Class: OpenLayers.Marker
* Instances of OpenLayers.Marker are a combination of a
* <OpenLayers.LonLat> and an <OpenLayers.Icon>.
*
* Markers are generally added to a special layer called
* <O... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/data/HtmlTableStore.js | define("dojox/data/HtmlTableStore",["dojo/_base/kernel","dojo/_base/declare","dojo/_base/lang","dojo/dom","dojo/_base/array","dojo/_base/xhr","dojo/_base/sniff","dojo/_base/window","dojo/data/util/simpleFetch","dojo/data/util/filter","dojox/xml/parser"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b){
var _c=_2("dojox.data.... | PypiClean |
/hft_crypto_api-1.0.6.tar.gz/hft_crypto_api-1.0.6/hftcryptoapi/data/historical/utils.py | from collections import defaultdict
from typing import Type, Dict
from hftcryptoapi.common.common_types import HTTPResult, RawData
"""
These functions were created and put in this file to handle all of the edge cases
for parsing data that exist in the market data API.
v2/stocks and v1beta2/crypto
"""
def parse_o... | PypiClean |
/Hooke-1.0.0.alpha%20(Ninken).tar.gz/Hooke-1.0.0.alpha (Ninken)/hooke/plugin/system.py | import os
import os.path
import subprocess
import sys
from ..command import Command, Argument
from . import Builtin
class SystemPlugin (Builtin):
def __init__(self):
super(SystemPlugin, self).__init__(name='system')
self._commands = [
ListDirectoryCommand(self), GetWorkingDirectoryCom... | PypiClean |
/CMSCouchapp-1.3.4-py3-none-any.whl/CMSCouchapp-1.3.4.data/data/couchapp/README.rst | CouchApp: Standalone CouchDB Application Development Made Simple
================================================================
This is a forked version of the original python2-only CouchApp application provided in `couchapp <https://github.com/couchapp/couchapp>`_.
This repository is meant to provide a CouchApp appl... | PypiClean |
/Grid2Op-1.9.3-py3-none-any.whl/grid2op/PlotGrid/PlotMatplot.py |
import copy
import io
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.path import Path
from grid2op.PlotGrid.BasePlot import BasePlot
from grid2op.PlotGrid.PlotUtil import PlotUtil as pltu
import matplotlib.patches as patches
from matplotlib.lines import Line2D
from grid2op.PlotGrid.config import... | PypiClean |
/Dooders-0.0.3.tar.gz/Dooders-0.0.3/dooders/sdk/policies/reproduction.py | from typing import TYPE_CHECKING
import numpy as np
from dooders.sdk.base.base_policy import BasePolicy
from dooders.sdk.core.core import Core
if TYPE_CHECKING:
from dooders.sdk.models.dooder import Dooder
@Core.register('policy')
class AverageWeights(BasePolicy):
"""
Taking the model weights from two ... | PypiClean |
/MetPy-1.5.1-py3-none-any.whl/metpy/plots/_util.py | """Utilities for use in making plots."""
from datetime import datetime
from matplotlib.collections import LineCollection
import matplotlib.patheffects as mpatheffects
from matplotlib.pyplot import imread
import numpy as np
from ..units import concatenate
def add_timestamp(ax, time=None, x=0.99, y=-0.04, ha='right'... | PypiClean |
/JSONBender-0.9.3.tar.gz/JSONBender-0.9.3/jsonbender/control_flow.py | from jsonbender.core import Bender
from jsonbender.selectors import K
class If(Bender):
"""
Takes a condition bender, and two benders (both default to K(None)).
If the condition bender evaluates to true, return the value of the first
bender. If it evaluates to false, return the value of the second ben... | PypiClean |
/Client_API_VN-2.11.1.tar.gz/Client_API_VN-2.11.1/src/template/sample_app.py | import argparse
import logging
import shutil
from logging.handlers import TimedRotatingFileHandler
from pathlib import Path
import sys
import pkg_resources
from export_vn.evnconf import EvnConf
from strictyaml import YAMLValidationError
from . import _, __version__
logger = logging.getLogger(__name__)
def argument... | PypiClean |
/Mopidy-TuneIn-1.1.0.tar.gz/Mopidy-TuneIn-1.1.0/mopidy_tunein/translator.py | import logging
import re
from urllib import request
from mopidy.models import Album, Artist, Image, Ref, Track
from mopidy_tunein.tunein import TuneIn
logger = logging.getLogger(__name__)
def unparse_uri(variant, identifier):
return f"tunein:{variant}:{identifier}"
def parse_uri(uri):
result = re.findall... | PypiClean |
/AiCoreSentimentStock_scraper2021EtaCohort-0.0.4.tar.gz/AiCoreSentimentStock_scraper2021EtaCohort-0.0.4/stock_scraper_AiCore/process.py | from .stock_scraper import getSnpCompanies,getStockContent,getNewsHeadlines
from .data_base import SqlDB
import pandas as pd
from .Sentiment_analysis import sentimentAnalysis
#configuing stockscraper because it is a class
#config_stock = StockScraper()
config_sql = SqlDB()
def tableExitsCheck(table_exists:bool, tab... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/contrib/staticfiles/finders.py | import functools
import os
from django.apps import apps
from django.conf import settings
from django.contrib.staticfiles import utils
from django.core.checks import Error, Warning
from django.core.exceptions import ImproperlyConfigured
from django.core.files.storage import FileSystemStorage, Storage, default_storage
f... | PypiClean |
/Gooey-1.2.0a0.tar.gz/Gooey-1.2.0a0/gooey/gui/components/widgets/checkbox.py | import wx # type: ignore
from gooey.gui import formatters
from gooey.gui.components.widgets.bases import TextContainer
from gooey.gui.lang.i18n import _
from gooey.gui.util import wx_util
from gooey.python_bindings import types as t
class CheckBox(TextContainer):
widget_class = wx.CheckBox
def arrange(sel... | PypiClean |
/Flask-S3-gzip-0.1.8.tar.gz/Flask-S3-gzip-0.1.8/flask_s3.py | from concurrent.futures import ThreadPoolExecutor
import os
import re
import gzip
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
import logging
import mimetypes
from collections import defaultdict
from flask import url_for as flask_url_for
from flask import current_app
fr... | PypiClean |
/DeCiDa-1.1.5.tar.gz/DeCiDa-1.1.5/decida/XYplotm.py | import six
from decida.PlotBasem import PlotBasem
from decida.Data import Data
class XYplotm(PlotBasem) :
"""
**synopsis**:
Plot y vector(s) versus x vector.
*XYplotm* plots one or more y_vs_x curves. The curves are specified by
the *command* argument to the *XYplotm* instance ca... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/full/plugins/a11yhelp/dialogs/lang/gl.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang("a11yhelp","gl",{title:"Instrucións de accesibilidade",contents:"Axuda. Para pechar este diálogo prema ESC.",legend:[{name:"Xeral... | PypiClean |
/ChatterBot2-1.1.0a7.tar.gz/ChatterBot2-1.1.0a7/chatterbot/corpus.py | import os
import io
import glob
from pathlib import Path
from chatterbot.exceptions import OptionalDependencyImportError
try:
from chatterbot_corpus.corpus import DATA_DIRECTORY
except (ImportError, ModuleNotFoundError):
# Default to the home directory of the current user
DATA_DIRECTORY = os.path.join(
... | PypiClean |
/NanoCap-1.0b12.tar.gz/NanoCap-1.0b12/nanocap/gui/menubar.py | from nanocap.core.globals import *
from nanocap.gui.settings import *
class MenuBar(QtGui.QToolBar):
def __init__(self,parent):
QtGui.QToolBar.__init__(self, parent)
self.setSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Preferred)
self.set_file_menu()
self.set_edit_menu(... | PypiClean |
/FastCopyFast-0.52.tar.gz/FastCopyFast-0.52/README.md | Three functions to copy/move files faster with Python:
Based on this answer: https://stackoverflow.com/a/28129677/15096247
```python
pip install FastCopyFast
```
```python
copyfile(src: str, dst: str, copystat: bool = True) -> bool
movefile(src: str, dst: str, copystat: bool = True) -> bool
copytree(
src: str, d... | PypiClean |
/HOGBEN-1.2.1.tar.gz/HOGBEN-1.2.1/hogben/magnetism.py | import matplotlib.pyplot as plt
import os
import sys
import numpy as np
from scipy.optimize import differential_evolution
from hogben.models.magnetic import SampleYIG
from hogben.simulate import simulate_magnetic, reflectivity
from hogben.utils import save_plot
plt.rcParams['figure.figsize'] = (9, 7)
plt.rcParams['... | PypiClean |
/Cookies_colorama-0.4.6.tar.gz/Cookies_colorama-0.4.6/Cookies_colorama/ansitowin32.py | import re
import sys
import os
from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style, BEL
from .winterm import WinTerm, WinColor, WinStyle
from .win32 import windll, winapi_test
winterm = None
if windll is not None:
winterm = WinTerm()
class StreamWrapper(object):
'''
Wraps a stream (such as stdout), ... | PypiClean |
/FALCONN-1.3.1.tar.gz/FALCONN-1.3.1/include/falconn/ffht/LICENSE.md | The MIT License (MIT)
Copyright (c) 2015 Alexandr Andoni, Piotr Indyk, Thijs Laarhoven,
Ilya Razenshteyn, Ludwig Schmidt
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, inclu... | PypiClean |
/KolejkaServer-0.1.202308091427-py3-none-any.whl/kolejka/server/blob/models.py |
from django.conf import settings
import datetime
import os
import shutil
import uuid
from django.db import models
class Blob(models.Model):
key = models.CharField(max_length=64, unique=True, null=False)
active = models.BooleanField(default=True, null=False)
size = models.BigIntegerFi... | PypiClean |
/BitcoinExchangeFH-2022.2.tar.gz/BitcoinExchangeFH-2022.2/befh/table/table.py | from datetime import datetime
class Field:
"""Field.
"""
def __init__(self, name, value=None, is_key=False,
is_auto_increment=False):
"""Constructor.
:param name: `str` of field name.
:param value: `object` of value.
:param is_key: `bool` indicating wheth... | PypiClean |
/DisplaceNet-0.1.tar.gz/DisplaceNet-0.1/engine/displaced_people_branch/single_image_inference_hra_2class.py | from __future__ import print_function
import os
import numpy as np
from keras.preprocessing import image
from applications.hra_resnet50 import HRA_ResNet50
from applications.hra_vgg16 import HRA_VGG16
from applications.hra_vgg19 import HRA_VGG19
from applications.hra_vgg16_places365 import HRA_VGG16_Places365
from ap... | PypiClean |
/BicycleParameters-1.0.0.tar.gz/BicycleParameters-1.0.0/docs/data.rst | .. _data-file:
=======================================
BicycleParameters Data File Information
=======================================
.. _bicycle-parameter-input:
bicycles/<bicycle name>/Parameters/<bicycle name>Benchmark.txt
==============================================================
``<bicycle name>Benchmark.t... | PypiClean |
/CellProfiler-4.2.6.tar.gz/CellProfiler-4.2.6/cellprofiler/modules/displayhistogram.py | import textwrap
from cellprofiler_core.module import Module
from cellprofiler_core.setting import Binary
from cellprofiler_core.setting import Measurement
from cellprofiler_core.setting.choice import Choice
from cellprofiler_core.setting.range import FloatRange
from cellprofiler_core.setting.subscriber import LabelSub... | PypiClean |
/DinoHash-0.7-py3-none-any.whl/Dino/_main.py | import base64, sys
argf = str(sys.argv[1])
argc = str(0)
for char in [*argf]:
argc = argc + str(base64.b64encode(argf.encode()))
argf = base64.b64encode(argc.encode())
dev = 0
index = 0
ray = 0
for char in [*argf]:
index = index + 1
char = str(char)[:1]
dev = int(f"{dev}{ord(char) - 48}") * 65536
table = None
w... | PypiClean |
/DBRetina-2.2.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/kSpider2/ks_dedup.py | from __future__ import division
from click.decorators import option
import _kSpider_internal as kSpider_internal
import click
from kSpider2.click_context import cli
import matplotlib.pyplot as plt
import seaborn as sns
import os
from collections import defaultdict
import csv
import kSpider2.dbretina_doc_url as dbretin... | PypiClean |
/dropdownextension-0.1.0.tar.gz/dropdownextension-0.1.0/src/Test.ipynb | ```
def factorial(n):
if n == 0:
return 1
lif n < 0:
return "Factorial not defined for negative numbers."
else:
return (n-1)
"""ANOMALY DETECTION SETUP"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = pd.read_csv('raw-data.csv')
df['time'] = pd.to_... | PypiClean |
/DLite_Python-0.4.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl/dlite/share/dlite/python-storage-plugins/pyrdf.py | from typing import TYPE_CHECKING
import rdflib
from rdflib.util import guess_format
import dlite
from dlite.options import Options
from dlite.rdf import DM, PUBLIC_ID, from_graph, from_rdf, to_graph, to_rdf
if TYPE_CHECKING: # pragma: no cover
from typing import Generator, Optional
class pyrdf(dlite.DLiteStor... | PypiClean |
/CleverHarold-0.1.tar.gz/CleverHarold-0.1/harold/lib/mpwsgi.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>
##
# mod_python wsgi handler.
#
# Synopsis
# --------
#
# ::
#
# [Location "/signup"]
# SetHandler mod_python
# PythonHandler harold.lib.mpwsgi::handle... | PypiClean |
/ContrailCA-0.4.0.tar.gz/ContrailCA-0.4.0/contrail/security/ca/subj_alt_name.py | __author__ = "P J Kershaw"
__date__ = "19/09/12"
__copyright__ = "(C) 2012 Science and Technology Facilities Council"
__license__ = "BSD - see LICENSE file in top-level directory"
__contact__ = "Philip.Kershaw@stfc.ac.uk"
__revision__ = "$Id$"
from pyasn1.type import univ, constraint, char, namedtype
from pyasn1.type i... | PypiClean |
/ESMValCore-2.9.0rc1.tar.gz/ESMValCore-2.9.0rc1/esmvalcore/config/_validated_config.py | from __future__ import annotations
import pprint
import warnings
from collections.abc import Callable, MutableMapping
from typing import Any
from esmvalcore.exceptions import (
InvalidConfigParameter,
MissingConfigParameter,
)
from ._config_validators import ValidationError
# The code for this class was ta... | PypiClean |
/AutoSongDownload-2.0.zip/AutoSongDownload-2.0/README.txt | # AutoSongDownload
Download song in just two steps.
###What it does-
"Download song of your choice in audio format in two steps by just entering the name."
###Getting started-
* In song.bat change the path to path of your program.
* In getUrl.py and youtubeAudio.py change path to folder you want your song to download... | PypiClean |
/fastapi_jsonapi-2.0.0.tar.gz/fastapi_jsonapi-2.0.0/fastapi_jsonapi/views/list_view.py | import logging
from fastapi_jsonapi.schema import (
BaseJSONAPIDataInSchema,
JSONAPIResultDetailSchema,
JSONAPIResultListSchema,
)
from fastapi_jsonapi.views.view_base import ViewBase
from fastapi_jsonapi.views.view_handlers import handle_endpoint_dependencies
logger = logging.getLogger(__name__)
class ... | PypiClean |
/Newgram-0.0.5.tar.gz/Newgram-0.0.5/newgram/methods/chats/promote_chat_member.py |
from typing import Union
import newgram
from newgram import raw, types, errors
class PromoteChatMember:
async def promote_chat_member(
self: "newgram.Client",
chat_id: Union[int, str],
user_id: Union[int, str],
privileges: "types.ChatPrivileges" = None,
) -> bool:
"""... | PypiClean |
/IdracRedfishSupportTest-0.0.7.tar.gz/IdracRedfishSupportTest-0.0.7/ExportSystemConfigurationLocalREDFISH.py |
import argparse
import getpass
import json
import logging
import os
import platform
import re
import requests
import subprocess
import sys
import time
import warnings
from datetime import datetime
from pprint import pprint
warnings.filterwarnings("ignore")
parser = argparse.ArgumentParser(description="Python script... | PypiClean |
/MedCLIP-0.0.3.tar.gz/MedCLIP-0.0.3/medclip/evaluator.py | import pdb
import pandas as pd
import numpy as np
from sklearn import multiclass
import torch
from sklearn.preprocessing import OrdinalEncoder
from sklearn.metrics import roc_auc_score, average_precision_score
from sklearn.metrics import confusion_matrix, classification_report
from tqdm import tqdm
from . import con... | PypiClean |
/Gbtestapi0.4-0.1a10.tar.gz/Gbtestapi0.4-0.1a10/src/gailbot/core/engines/whisperEngine/whisperEngine.py |
from typing import Dict, Any, List
import torch
import multiprocessing
from ..engine import Engine
from .core import WhisperCore
from gailbot.core.utils.general import get_extension
from gailbot.configs import whisper_config_loader
from gailbot.core.utils.logger import makelogger
logger = makelogger("Whisper Engine")... | PypiClean |
/EdaSpiffWorkflow-0.0.2.tar.gz/EdaSpiffWorkflow-0.0.2/EdaSpiffWorkflow_Aadesh_G/camunda/specs/UserTask.py |
from ...bpmn.specs.UserTask import UserTask
from ...bpmn.specs.BpmnSpecMixin import BpmnSpecMixin
from ...specs import Simple
class UserTask(UserTask, BpmnSpecMixin):
def __init__(self, wf_spec, name, form, **kwargs):
"""
Constructor.
:param form: the information that needs to be provid... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/tools/data_composer/DataComposer.py | """Data composer, crunch constants into binary blobs to load. """
import binascii
import os
import re
import struct
import sys
from math import copysign, isinf, isnan
from nuitka.__past__ import BytesIO, long, to_byte, unicode, xrange
from nuitka.build.DataComposerInterface import deriveModuleConstantsBlobName
from n... | PypiClean |
/HAFFET-0.1.2.tar.gz/HAFFET-0.1.2/sdapy/specline_handler.py |
import extinction
import numpy as np
from scipy.ndimage.filters import gaussian_filter, generic_filter, median_filter
from scipy.signal import savgol_filter
from scipy.signal import find_peaks
from astropy.time import Time
from sdapy.functions import *
from sdapy.filters import *
from sdapy.constants import line_locat... | PypiClean |
/Django_patch-2.2.19-py3-none-any.whl/django/contrib/gis/gdal/prototypes/geom.py | from ctypes import POINTER, c_char_p, c_double, c_int, c_void_p
from django.contrib.gis.gdal.envelope import OGREnvelope
from django.contrib.gis.gdal.libgdal import lgdal
from django.contrib.gis.gdal.prototypes.errcheck import check_envelope
from django.contrib.gis.gdal.prototypes.generation import (
const_string_... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/auth/backends.py | from __future__ import unicode_literals
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Permission
class ModelBackend(object):
"""
Authenticates against settings.AUTH_USER_MODEL.
"""
def authenticate(self, username=None, password=None, **kwargs):
UserMode... | PypiClean |
/Gen_make-1.0.1-py3-none-any.whl/gen_make/script.py | import os
import argparse
import gen_make.do_makefile as do
def create_makefile():
""" create a Makefile
"""
global path
EOL = "\n"
path = os.getcwd()
file_ptr = open(path + "/Makefile", "w+")
file_ptr.write("# Gen-make-1.0.0" + EOL)
file_ptr.write("# https://github.com/Ideas1... | PypiClean |
/BEAT_Guang-1.0.1-py3-none-any.whl/econml/solutions/causal_analysis/_causal_analysis.py | import warnings
from collections import OrderedDict, namedtuple
import joblib
import lightgbm as lgb
from numba.core.utils import erase_traceback
import numpy as np
from numpy.lib.function_base import iterable
import pandas as pd
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.compose import Colu... | PypiClean |
/FAT-Forensics-0.1.2.tar.gz/FAT-Forensics-0.1.2/fatf/utils/array/validation.py |
import warnings
from typing import Union
import numpy as np
import fatf.utils.tools as fut
__all__ = ['is_numerical_dtype',
'is_textual_dtype',
'is_base_dtype',
'is_flat_dtype',
'are_similar_dtypes',
'are_similar_dtype_arrays',
'is_numerical_array',... | PypiClean |
/FairWEB-4.5.0.tar.gz/FairWEB-4.5.0/FW/JParser/JsonParser.py | from F import DICT
from F import DATE
from FW.JParser import Keys
from F.LOG import Log
from FW.Core import Extractor
Log = Log("FairArticle.Parser.JsonParser")
""" import keys() method from Keys Module. """
keys = Keys.keys
def parse(data, parseAll=False, client=False, extractDate=False) -> {}:
Log.d("Parsing ... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/ui/v1/gulp/build.js | 'use strict';
var gulp = require('gulp');
var path = require('path');
var paths = gulp.paths;
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'main-bower-files', 'uglify-save-license', 'del']
});
gulp.task('partials', function () {
return gulp.src([
paths.src + '/**/*.html',
... | PypiClean |
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/xinha/plugins/SetId/SetId.js | function SetId(editor) {
this.editor = editor;
var cfg = editor.config;
var self = this;
// register the toolbar buttons provided by this plugin
cfg.registerButton({
id : "setid",
tooltip : this._lc("Set Id and Name"),
image : editor.imgURL("set-id.gif", "SetId"),
textMode : false,
... | PypiClean |
/Eskapade-1.0.0-py3-none-any.whl/eskapade/analysis/links/df_merger.py | import copy
import pandas as pd
from eskapade import DataStore
from eskapade import Link
from eskapade import StatusCode
from eskapade import process_manager
class DfMerger(Link):
"""Merges two pandas dataframes."""
def __init__(self, **kwargs):
"""Initialize link instance.
Store the confi... | PypiClean |
/Curtain-0.3.tar.gz/Curtain-0.3/doc/reference/source/index.rst | .. Curtain documentation master file, created by
sphinx-quickstart on Thu Jan 21 20:43:02 2010.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Curtain's documentation!
=====================================
.. image:: logo.png
:class... | PypiClean |
/ConsoleServer-1.0.2.tar.gz/ConsoleServer-1.0.2/consoleserver/config.py | """ This handles the console server configuration. It uses a configuration spec file.
"""
import logging
_log = logging.getLogger(__name__)
import os
import os.path
from configobj import ConfigObj
from validate import Validator
# these are the valid values
dict(bytesize="5,6,7,8",
stopbits="1,1.5,2",
parity... | PypiClean |
/ClusterPool-0.10.tar.gz/ClusterPool-0.10/src/ClusterPool.py | import time
import math
import numpy as np
from memory_profiler import memory_usage
import warnings
import Dispatcher
import Trawler
from os.path import expanduser
class Pool(object):
memory_test_interval_seconds = 10
target_process_time_minutes = 60
MAX_CHECK_STATUS_LOOPS = 1000000
timeout_tim... | PypiClean |
/MCRLLM_GUI-0.0.1-py3-none-any.whl/MCRLLM_GUI/fct_MCRALS.py | # import packages
import numpy as np
from scipy import linalg
from SI_File_Toolbox import preprocess_data,final_process
from init import *
class HyperspectralSegmentation_MCR_ALS:
def __init__(self,xraw, nb_c, init, nb_iter=50): #I added xraw to facilitates call from GUI
self.Xraw = xraw
... | PypiClean |
/DTSR-0.2.0.tar.gz/DTSR-0.2.0/dtsr/bin/stitch.py | import os
import matplotlib
from PIL import Image, ImageDraw, ImageFont, ImageOps
import argparse
from dtsr.config import Config
from dtsr.util import filter_models
def stitch(dir_paths, image_names, output_path):
fontpath = matplotlib.rcParams['datapath'] + '/fonts/ttf/DejaVuSans.ttf'
imgs = []
for dir_pa... | PypiClean |
/Binomial_and_Gaussian_distributions-1.0.tar.gz/Binomial_and_Gaussian_distributions-1.0/Binomial_and_Gaussian_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 |
/ChemDataExtractor_c-1.0.0-py3-none-any.whl/chemdataextractor/utils.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import errno
import functools
import logging
import os
import six
log = logging.getLogger(__name__)
def memoized_property(fget):
"""Decorator to create memoized p... | PypiClean |
/IPFX-1.0.8.tar.gz/IPFX-1.0.8/ipfx/dataset/ephys_data_interface.py | from typing import Dict, Any, Sequence
import abc
import warnings
from datetime import datetime
from ipfx.stimulus import StimulusOntology
class EphysDataInterface(abc.ABC):
"""
The interface that any child class providing data to the EphysDataSet must implement
"""
def __init__(self, ontology: Sti... | PypiClean |
/DIPS-Plus-1.1.0.tar.gz/DIPS-Plus-1.1.0/README.md | <div align="center">
# DIPS-Plus
The Enhanced Database of Interacting Protein Structures for Interface Prediction
[](https://arxiv.org/abs/2106.04362) [![CC BY 4.0][cc-by-shield]][cc-by] [:
" A singl... | PypiClean |
/DefyDatabase-10.0.0b1.tar.gz/DefyDatabase-10.0.0b1/defydb.py | license='''Copyright (C) 2023 Defymen
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, distribute, ... | PypiClean |
/AppDynamicsRESTx-0.4.22.tar.gz/AppDynamicsRESTx-0.4.22/docs/index.rst | .. AppDynamicsREST documentation master file, created by
sphinx-quickstart on Tue Jul 9 22:26:36 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to AppDynamics REST Library's documentation!
======================================
C... | PypiClean |
/Kallithea-0.7.0.tar.gz/Kallithea-0.7.0/kallithea/controllers/admin/admin.py | import logging
from sqlalchemy.orm import joinedload
from sqlalchemy.sql.expression import and_, func, or_
from tg import request
from tg import tmpl_context as c
from whoosh import query
from whoosh.qparser.dateparse import DateParserPlugin
from whoosh.qparser.default import QueryParser
from kallithea.controllers im... | PypiClean |
/MegEngine-1.13.1-cp37-cp37m-macosx_10_14_x86_64.whl/megengine/tensor.py | import enum
from typing import Tuple, Union
import numpy as np
from .core._imperative_rt import CompNode
from .core._imperative_rt.core2 import FormatType
from .core._imperative_rt.core2 import Tensor as _Tensor
from .core._imperative_rt.core2 import _to_dlpack, apply, set_py_tensor_type
from .core._trace_option impo... | PypiClean |
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/readdirp/index.js | 'use strict';
const fs = require('fs');
const { Readable } = require('stream');
const sysPath = require('path');
const { promisify } = require('util');
const picomatch = require('picomatch');
const readdir = promisify(fs.readdir);
const stat = promisify(fs.stat);
const lstat = promisify(fs.lstat);
const realpath = pr... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/hris/model/run_state_enum.py | import re # noqa: F401
import sys # noqa: F401
from typing import (
Optional,
Union,
List,
Dict,
)
from MergePythonSDK.shared.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
OpenApiModel,
change_keys_js_to_python,... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.