id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/DjangoPackage-v0.1.1-0.1.1.tar.gz/DjangoPackage-v0.1.1-0.1.1/README.rst | =====
DjangoAWS
=====
Polls is a simple Django app to conduct Web-based polls. For each
question, visitors can choose between a fixed number of answers.
Detailed documentation is in the "docs" directory.
Quick start
-----------
1. Add "blog" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [
... | PypiClean |
/HiNT-Package-2.2.8.tar.gz/HiNT-Package-2.2.8/HiNT/diff.py | from . import straw
import math
import argparse
bpresolutions=(2500000,1000000,500000,100000,50000,25000,10000,5000)
fragresolutions=(500,200,100,50,20,5,2,1)
chrs=('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','X')
norms=('NONE', 'KR', 'VC')
def isclose(a, b, r... | PypiClean |
/edward-1.3.5.tar.gz/edward-1.3.5/edward/inferences/map.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import six
import tensorflow as tf
from edward.inferences.variational_inference import VariationalInference
from edward.models import RandomVariable, PointMass
from edward.util import copy, transform
try:
f... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/standard/plugins/a11yhelp/dialogs/lang/cy.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","cy",{title:"Canllawiau Hygyrchedd",contents:"Cynnwys Cymorth. I gau y deialog hwn, pwyswch ESC.",legend:[{name:"Cyffr... | PypiClean |
/FormAlchemy-1.5.6.tar.gz/FormAlchemy-1.5.6/formalchemy/ext/zope/__init__.py | __doc__ = """This module provides an experimental subclass of
:class:`~formalchemy.forms.FieldSet` to support zope.schema_'s schema. `Simple
validation`_ is supported. `Invariant`_ is not supported.
.. _zope.schema: http://pypi.python.org/pypi/zope.schema
.. _simple validation: http://pypi.python.org/pypi/zope.schema... | PypiClean |
/Fuzzython-0.1.0.tar.gz/Fuzzython-0.1.0/norms/norms.py | from utils import norm
__author__ = ''
@norm(type_='TNORM', name='MIN')
def minimum(*args:float) -> float:
return min(args)
@norm(type_='SNORM', name='MAX')
def maximum(*args:float) -> float:
return max(args)
@norm(type_='TNORM', name='PROD')
def algebraic_product(x:float, y:float) -> float:
return x*... | PypiClean |
/Cherrydoor-0.8.1-py3-none-any.whl/cherrydoor/auth.py |
__author__ = "opliko"
__license__ = "MIT"
__version__ = "0.8.b0"
__status__ = "Prototype"
import asyncio
import logging
from json import dumps
from aiohttp.web import HTTPForbidden, HTTPUnauthorized
from aiohttp_session import get_session, new_session
from aiohttp_security import check_permission, authorized_userid
f... | PypiClean |
/MRFI-2.0.0.tar.gz/MRFI-2.0.0/docs/basic_observe.md | # Basic observation on LeNet
Let's observe network variable by two utility functions `get_activation_info` and `get_weight_info` in `mrfi.experiment`.
::: mrfi.experiment
options:
show_source: false
members: [get_activation_info, get_weight_info]
docstring_section_style: list
show_root_toc... | PypiClean |
/Airshare-0.1.6.tar.gz/Airshare-0.1.6/airshare/utils.py | import mimetypes
import os
import pyperclip
import re
import socket
import tempfile
from time import strftime
from zipfile import ZipFile
from zeroconf import IPVersion, ServiceInfo, Zeroconf
from .qrcode import ErrorCorrectLevel, QRCode
__all__ = ["get_local_ip_address", "qr_code", "get_service_info",
"... | PypiClean |
/LingTree-0.7.tar.gz/LingTree-0.7/py_src/lingtree/penn.py | from __future__ import print_function
import sys
import re
from .tree import TerminalNode, NontermNode, Tree
tokens_table = [(code, re.compile(rgx))
for (code, rgx) in
[('(', '\\(([^\\s]+) *'),
('( ', '\\( +'),
('W', '([^\\(\\)\\s]+) *'),
... | PypiClean |
/FlaskPlus-0.9-py3-none-any.whl/flask_plus/starter/util.py | import importlib
import os
import re
import sys
from copy import deepcopy
from pathlib import Path
from flask_plus import FlaskPlus
class Starter:
# 有顺序要求
EXTS = [
'remote_config',
'mongo_logging',
'file_logging',
'kong_header',
'auth_header',
'mongo',
... | PypiClean |
/DMT_core-2.0.0-py3-none-any.whl/DMT/core/database_manager.py | import pandas as pd
import warnings
import _pickle as cpickle
from pathlib import Path
from pyarrow.lib import ArrowInvalid
from DMT.config import DATA_CONFIG
from DMT.core.data_frame import DataFrame
from DMT.core.singleton import Singleton
from DMT.core.naming import SpecifierStr, get_specifier_from_string
class D... | PypiClean |
/Flask-MDEditor-0.1.4.tar.gz/Flask-MDEditor-0.1.4/flask_mdeditor/static/mdeditor/js/lib/codemirror/mode/asterisk/asterisk.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 st... | PypiClean |
/KeralaPyApiV2-2.0.2020.tar.gz/KeralaPyApiV2-2.0.2020/pyrogram/client/types/inline_mode/inline_query.py |
from typing import List
import pyrogram
from pyrogram.api import types
from .inline_query_result import InlineQueryResult
from ..messages_and_media import Location
from ..object import Object
from ..update import Update
from ..user_and_chats import User
class InlineQuery(Object, Update):
"""An incoming inline q... | PypiClean |
/EduKit-0.0.3.tar.gz/EduKit-0.0.3/README.md | # EduKit
## Library for teaching Python to students
---
[](https://pypi.org/project/EduKit/)


:
parser = argparse.ArgumentParser(description="Outputs a list of plates which were removed at a certain chosen threshold for the Z-score test. Also outputs a new dataset to go back into the process of normalisation and scoring, but with detrimental pl... | PypiClean |
/Chronix2Grid-1.2.0.post1.tar.gz/Chronix2Grid-1.2.0.post1/chronix2grid/kpi/Generator_parameter_checker.py |
import pandas as pd
import os
import numpy as np
def EnergyMix_AprioriChecker(env118_withoutchron,Target_EM_percentage, PeakLoad, AverageLoad, CapacityFactor ):
# # Check the Energy Mix apriori
# ### Target Energy mix
# when summing over scenarios
#
# In[132]:
#print('\n the target energ... | PypiClean |
/MongoDBTools-0.1.1-py3-none-any.whl/mongodbtools/links/doc_to_collection.py | from escore import process_manager, ConfigObject, DataStore, Link, StatusCode
from mongodbtools import MongoConnection, etl_utils
class MongoDocToCollection(Link):
"""Defines the content of link."""
def __init__(self, **kwargs):
"""Initialize an instance.
:param str name: name of link
... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/db/models/enums.py | import enum
from types import DynamicClassAttribute
from django.utils.functional import Promise
__all__ = ["Choices", "IntegerChoices", "TextChoices"]
class ChoicesMeta(enum.EnumMeta):
"""A metaclass for creating a enum choices."""
def __new__(metacls, classname, bases, classdict, **kwds):
labels =... | PypiClean |
/ClevelandMuseumArt-1.0.1.tar.gz/ClevelandMuseumArt-1.0.1/CMA/cli.py | from CMA.api import Handler
import argparse
import random
import json
verbose = argparse.ArgumentParser(add_help=False)
verbose.add_argument('--verbose', dest='verbose', action='store_true')
verbose.add_argument('--limit', dest='limit', type=int, default=100, help='Limit for number of JSON results. Default: 100')
ver... | PypiClean |
/Flask_Multipass_CERN-2.2.8-py3-none-any.whl/flask_multipass_cern.py |
import logging
from datetime import datetime
from functools import wraps
from importlib import import_module
from inspect import getcallargs
from authlib.integrations.requests_client import OAuth2Session
from flask import current_app, g, has_request_context
from flask_multipass import IdentityRetrievalFailed
from fla... | PypiClean |
/Melodie-0.7.0-cp38-cp38-win_amd64.whl/MelodieInfra/exceptions/pretty_warnings.py | from typing import Dict, Set
try:
from termcolor import cprint
except:
def cprint(s, **kwargs):
print(s)
class FSM:
def __init__(self, initial_state: int, state_transition_table: Dict[int, Set[int]]):
self.current_state: int = initial_state
self.stt = state_transition_table
... | PypiClean |
/GraphState-1.0.6.tar.gz/GraphState-1.0.6/graph_state/graph_state.py |
import itertools
import nickel
import graph_state
import graph_state_property
if 'chain_from_iterables' not in itertools.__dict__:
def chain_from_iterables(iterables):
for it in iterables:
for element in it:
yield element
itertools.chain_from_iterables = chain_from_iterab... | PypiClean |
/Flask-ReactJS-0.2.3.tar.gz/Flask-ReactJS-0.2.3/flask_react/static/react/js/components.js | class AjaxComponent extends React.Component {
constructor(props) {
super(props);
this.state = {loaded: false};
}
componentDidMount() {
this.getState();
}
getArgs() {
return {}
}
get(url, params) {
let args = "";
Object.keys(params).forEach(f... | PypiClean |
/LibRecommender-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl/libreco/graph/inference.py | import torch
from torch.nn import functional as F
from tqdm import tqdm
from .from_dgl import build_i2i_homo_graph
def full_neighbor_embeddings(model):
"""Full inference by aggregating over all neighbor embeddings on the homogeneous graph.
original graph -> CPU
`torch_model` -> CPU or GPU
returned e... | PypiClean |
/Flask-CKFinder3-0.1.1.tar.gz/Flask-CKFinder3-0.1.1/flask_ckfinder3/ckfinder.py | from flask import abort, request, send_from_directory, url_for
from werkzeug.utils import secure_filename
from os.path import join
from .resource_type import CKFResourceType
from .connector import CKFConnector
from .acl import CKFAcl
class CKFinder():
"""
CKFinder flask extension
"""
def __init__(sel... | PypiClean |
/CAMSA-1.3.tar.gz/CAMSA-1.3/camsa/core/io.py | import csv
import os
import shutil
from collections import defaultdict
from enum import Enum
from camsa.core.data_structures import AssemblyPoint, APFieldOutExtractorConverter, Sequence
def get_fn_relations_for_column_names(fieldnames, aliases):
canonical_field_names = [aliases.get(name.lower(), name) for name i... | PypiClean |
/AeroSandbox-4.1.1.tar.gz/AeroSandbox-4.1.1/aerosandbox/structures/legacy/beams.py | import casadi as cas
import aerosandbox.numpy as np
from aerosandbox.geometry import *
from aerosandbox.common import AeroSandboxObject
class TubeBeam1(AeroSandboxObject):
def __init__(self,
opti, # type: cas.Opti
length,
points_per_point_load=100,
... | PypiClean |
/DataQualityFramework-0.0.7.tar.gz/DataQualityFramework-0.0.7/data_quality_framework/quality/uniqueness.py |
# GNU AFFERO GENERAL PUBLIC LICENSE
# Version 3, 19 November 2007
# Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
# ... | PypiClean |
/HISpectralModel-0.1.0.tar.gz/HISpectralModel-0.1.0/hispectrum/hiutils/ranges.py |
# Name: ranges
#
# Author: Ian Stewart
#
# TODO:
# - Make calcNearestToRange() a method of Range as well and then abolish it as a function.
#
# Contains:
# class Bound:
# class Range:
# class SimpleRange:
#
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# Copyright ... | PypiClean |
/DevContest-0.4.tar.gz/DevContest-0.4/devcontest/public/jsmath/jsMath-fallback-mac-msie.js | *
* Fix the default non-TeX-font characters to work with MSIE
*
*/
jsMath.Update.TeXfonts({
cmr10: {
'0': {c: 'G', tclass: 'greek'},
'1': {c: 'D', tclass: 'greek'},
'2': {c: 'Q', tclass: 'greek'},
'3': {c: 'L', tclass: 'greek'},
'4': {c: 'X', tclass: 'greek'},
'5': {c: 'P', tclass:... | PypiClean |
/Cov19DashJacobBeeson-0.0.1-py3-none-any.whl/covid19DashCode/application.py | import json
import logging
import time
from datetime import datetime
from flask import Flask, request, render_template, redirect
from covid_data_handler import schedule_covid_updates
from covid_data_handler import covid_scheduler
from covid_news_handling import schedule_news_updates
from covid_news_handling import ne... | PypiClean |
/Chronoclust-0.2.1.2.tar.gz/Chronoclust-0.2.1.2/README.md | # ChronoClust
A clustering algorithm that will perform clustering on each of a time-series of discrete (not a data stream... yet) datasets, and explicitly track the evolution of clusters over time.
If you use the ChronoClust algorithm, please cite the associated publication:
>Putri, Givanna H., Mark N. Read, Irena K... | PypiClean |
/MetaSBT-0.1.2.tar.gz/MetaSBT-0.1.2/metasbt/modules/report.py | __author__ = "Fabio Cumbo (fabio.cumbo@gmail.com)"
__version__ = "0.1.0"
__date__ = "Apr 13, 2023"
import argparse as ap
import datetime
import errno
import os
from pathlib import Path
from typing import Dict, List, Tuple, Union
# Local modules are not available when the main controller
# tries to load them for acces... | PypiClean |
/Cubane-1.0.11.tar.gz/Cubane-1.0.11/cubane/lib/html.py | from __future__ import unicode_literals
from django.forms.utils import flatatt
from cubane.lib.text import text_from_html
from cubane.lib.url import is_external_url
from bs4 import BeautifulSoup
import re
def transpose_html_headlines(html, level):
"""
Transpose existing headlines within the given html by the ... | PypiClean |
/EGCG-Core-0.13.tar.gz/EGCG-Core-0.13/egcg_core/app_logging.py | import logging
import logging.config
import logging.handlers
from sys import stdout
from cached_property import cached_property
from egcg_core.config import cfg
class LoggingConfiguration:
"""Stores Loggers, Formatters and Handlers"""
default_fmt = '[%(asctime)s][%(name)s][%(levelname)s] %(message)s'
def... | PypiClean |
/NeodroidVision-0.3.0-py36-none-any.whl/neodroidvision/regression/vae/architectures/flow/vae_flow.py |
__author__ = "Christian Heider Nielsen"
__doc__ = r"""
Created on 22/03/2020
"""
"""Credit: mostly based on Ilya's excellent implementation here:
https://github.com/ikostrikov/pytorch-flows"""
import numpy
import torch
from torch import nn
from torch.nn import functional
class InverseAutoregr... | PypiClean |
/AS-Object_models-2.3.9.tar.gz/AS-Object_models-2.3.9/as_models/grow_month.py | from .sales_inv_utils import SalesInvBase
from datetime import datetime
from datetime import timedelta, date
from dateutil.relativedelta import relativedelta
from calendar import monthrange
import jmespath
from .item_month import ItemMonthCollection, ItemMonth
from .item_reserve import ItemReserve
from .reserve_summar... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/bower_components/prism/components/prism-nginx.min.js | Prism.languages.nginx=Prism.languages.extend("clike",{comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},keyword:/\b(?:CONTENT_|DOCUMENT_|GATEWAY_|HTTP_|HTTPS|if_not_empty|PATH_|QUERY_|REDIRECT_|REMOTE_|REQUEST_|SCGI|SCRIPT_|SERVER_|http|events|accept_mutex|accept_mutex_delay|access_log|add_after_body|add_before_body|add... | PypiClean |
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/lattices/Struct48.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 = """
120 392
21... | PypiClean |
/dragonflow-4.0.0.tar.gz/dragonflow-4.0.0/dragonflow/db/drivers/ramcloud_db_driver.py |
import ramcloud
from dragonflow.db import db_api
class RamCloudDbDriver(db_api.DbApi):
def __init__(self):
super(RamCloudDbDriver, self).__init__()
self.client = None
self.current_key = 0
self.service_locator = None
self.db_name = 'dragonflow'
def initialize(self, d... | PypiClean |
/MXFusion-0.3.1.tar.gz/MXFusion-0.3.1/mxfusion/inference/minibatch_loop.py |
import mxnet as mx
from mxnet.gluon.data import ArrayDataset
from .grad_loop import GradLoop
class MinibatchInferenceLoop(GradLoop):
"""
The class for the main loop for minibatch gradient-based optimization. The
*batch_size* specifies the size of mini-batch is used in mini-batch
inference. *rv_scali... | PypiClean |
/FoLiA-tools-2.5.4.tar.gz/FoLiA-tools-2.5.4/foliatools/foliatree.py | from __future__ import print_function, unicode_literals, division, absolute_import
import getopt
import io
import sys
import os
import glob
from collections import Counter
import folia.main as folia
def usage():
print("foliatree",file=sys.stderr)
print(" by Maarten van Gompel (proycon)",file=sys.stderr)
... | PypiClean |
/ConfArgParse-1.1.20.tar.gz/ConfArgParse-1.1.20/README.txt |
============
ConfArgParse
============
This module adds a config file parsing capability to argparse.
Usage
-----
Start by importing the module and initializing the parser::
import confargparse
parser = confargparse.ConfArgParser()
The usage is identical to the argparse module::
parser.add_argument(... | PypiClean |
/Activate_App-0.0.10-py3-none-any.whl/activate/app/dialogs/settings.py | import PyQt5
from PyQt5 import QtWidgets
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIcon
from activate.app import connect, settings, widgets
from activate.app.dialogs import FormDialog
from activate.app.ui.settings import Ui_settings
from activate.app.widgets import Form
class AddServerDialog(FormDialog):
... | PypiClean |
/DisPass-0.4.0.tar.gz/DisPass-0.4.0/dispass/dispass.py |
# Copyright (c) 2012-2016 Tom Willemse <tom@ryuslash.org>
# Copyright (c) 2011-2018 Benjamin Althues <benjamin@babab.nl>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice app... | PypiClean |
/OERPLib-0.8.4.tar.gz/OERPLib-0.8.4/oerplib/oerp.py | import os
import base64
import zlib
import tempfile
import time
from oerplib import rpc, error, tools
from oerplib.tools import session, v
from oerplib.service import common, db, wizard, osv, inspect
class OERP(object):
"""Return a new instance of the :class:`OERP` class.
The optional `database` parameter sp... | PypiClean |
/JaqalPaq-extras-1.2.0a1.tar.gz/JaqalPaq-extras-1.2.0a1/examples/Tutorials/Transpiler_Demo.ipynb | ## Bell State Preparation from Cirq
```
import cirq
from jaqalpaq.transpilers.cirq import jaqal_circuit_from_cirq_circuit
from jaqalpaq.generator import generate_jaqal_program
cirq_bell = cirq.Circuit()
qubits = [cirq.LineQubit(0), cirq.LineQubit(1)]
cirq_bell.append(cirq.H.on(qubits[0]))
cirq_bell.append(cirq.CNOT(... | PypiClean |
/IMSIS-1.1.2-py3-none-any.whl/imsis/misc.py | import os
import json
import base64
from datetime import datetime
import re
class Misc(object):
@staticmethod
def multipleof2(number):
"""Rounds the given number to the nearest multiple of two.
:Parameters: float
:Returns: int
"""
remainder = number % 2
if remai... | PypiClean |
/NICpolpy-0.1.5-py3-none-any.whl/nicpolpy/ysphotutilpy4nicpolpy/growth.py | import numpy as np
def _profile_moffat(r, flux=1, width=1, power=1):
''' The circular Moffat profile (Students' t-distribution variant)
Paramters
---------
r : float
The distance from the profile center in pixel.
flux : float, optional.
The total flux.
width, power : float, opt... | PypiClean |
/Guerilla-1.0.2.tar.gz/Guerilla-1.0.2/README.md | # Guerilla
Guerilla is a deep learning chess engine developed by Miguel and Stephane Aroca-Ouellette. More details on the project can be found at [here](https://unarresteddev.wordpress.com/2017/02/23/guerilla-a-chess-engine-part-1/).
The project was developed in Python 2.7 on Linux systems (Ubuntu). All instruction... | PypiClean |
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/bomsoi2001.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def bomsoi2001(path):
"""Southern Oscillation Index Data
The Southern Oscillation Index (SOI) ... | PypiClean |
/LiPD-0.2.8.9.tar.gz/LiPD-0.2.8.9/lipd/fetch_doi.py | import urllib.error
from collections import OrderedDict
import json
import re
import requests
import csv
import os
import demjson3
def update_dois(csv_source, write_file=True):
"""
Get DOI publication info for a batch of DOIs. This is LiPD-independent and only requires a CSV file with all DOIs
listed in a ... | PypiClean |
/MLapp1-0.0.37.tar.gz/MLapp1-0.0.37/src/MLapp/UI/result.py | from dash import dcc,html,dash_table
import dash_bootstrap_components as dbc
from ..app import app
from dash.dependencies import Input, Output,State
import dash_uploader as du
import pickle,dash
from ..helperFunctions import *
du.configure_upload(app, 'uploads')
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
uploadResult=dbc.... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/cometd/callbackPollTransport.js | define(["dijit","dojo","dojox","dojo/require!dojox/cometd/_base,dojox/cometd/longPollTransport,dojo/io/script"],function(_1,_2,_3){
_2.provide("dojox.cometd.callbackPollTransport");
_2.require("dojox.cometd._base");
_2.require("dojox.cometd.longPollTransport");
_2.require("dojo.io.script");
_3.cometd.callbackPollTransp... | PypiClean |
/DomainThesaurus-1.2.3.tar.gz/DomainThesaurus-1.2.3/DST/word_discrimination/WordDiscrimination.py | import re
import networkx as nx
from DST.utils.DSUtil import levenshtein_distance
import logging
logger = logging.getLogger(__name__)
def __numberInString(term):
for i in term:
if i.isdigit():
return True
return False
# check if the number in two string are the same
def __isNumberSame(te... | PypiClean |
/CompoundPye-0.95.tar.gz/CompoundPye-0.95/executables/cp_GUI.py |
## @author Ilyas Kuhlemann
# @contact ilyasp.ku@gmail.com
# @date 15.01.15
"""
@package CompoundPye.executables.GUI
This module holds the RunGUI-class, which initializes the whole graphical
user interface and stores the parameters the user enters.
When creating a RunGUI-object, the QtGui-Application (and the GUI)... | PypiClean |
/GeologicalToolbox-0.3.1b1.tar.gz/GeologicalToolbox-0.3.1b1/geological_toolbox/stratigraphy.py | import sqlalchemy as sq
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm.session import Session
from typing import List
from geological_toolbox.exceptions import DatabaseException
from geological_toolbox.db_handler import Base, AbstractDBObject
class StratigraphicObject(Base, AbstractDBObject):
"""
... | PypiClean |
/leicv-0.0.1.tar.gz/leicv-0.0.1/pytorch_model.py |
# # Image Classification of Dogs vs. Cats With PyTorch
# ### Imports & Environment
# In[1]:
import os
import random
import collections
import shutil
import time
import glob
import csv
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.nn as nn
import torch.optim as optim
import torc... | PypiClean |
/Feedjack-16.8.1.tar.gz/Feedjack-16.8.1/feedjack/static/feedjack/fern/fold.fern.js | (function() {
var hasProp = {}.hasOwnProperty;
$(document).ready(function() {
var _fold_entries, fold_css, fold_entries, folds, folds_commit, folds_lru, folds_ts, folds_update, get_length, get_ts, limit, limit_lru, limit_lru_gc, ref, ref1, ref2, site_key, storage_key, url_site, url_static;
if (typeof local... | PypiClean |
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/chokidar/index.js | 'use strict';
const { EventEmitter } = require('events');
const fs = require('fs');
const sysPath = require('path');
const { promisify } = require('util');
const readdirp = require('readdirp');
const anymatch = require('anymatch').default;
const globParent = require('glob-parent');
const isGlob = require('is-glob');
c... | PypiClean |
/Firefly%20III%20API%20Python%20Client-1.5.6.post2.tar.gz/Firefly III API Python Client-1.5.6.post2/firefly_iii_client/model/autocomplete_bill.py | import re # noqa: F401
import sys # noqa: F401
from firefly_iii_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,... | PypiClean |
/MambuPy-2.0.0b22.tar.gz/MambuPy-2.0.0b22/mambupy/orm/schema_activities.py | from sqlalchemy import (Column, DateTime, ForeignKey, Integer, Numeric, String,
Table)
from sqlalchemy.orm import backref, relationship
from . import schema_orm as orm
from .schema_branches import Branch
from .schema_clients import Client
from .schema_groups import Group
from .schema_loans impo... | PypiClean |
/Bis-Miner-3.11.1.tar.gz/Bis-Miner-3.11.0/Orange/widgets/data/utils/preprocess.py |
import bisect
import contextlib
import warnings
from AnyQt.QtWidgets import (
QWidget, QVBoxLayout, QSpacerItem, QSizePolicy,
QStyle, QAction, QApplication,
QStylePainter, QStyleOptionFrame, QDockWidget,
QFocusFrame
)
from AnyQt.QtCore import (
Qt, QObject, QEvent, QSize, QModelIndex, QMimeData
)... | PypiClean |
/OctoPrint-Nanny-0.16.0.tar.gz/OctoPrint-Nanny-0.16.0/octoprint_nanny/vendor/octoprint_setuptools/__init__.py | from __future__ import absolute_import, division, print_function, unicode_literals
### NOTE #################################################################################
# This module is vendored to avoid build-time dependency on OctoPrint in Yocto build system
#####################################################... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/@types/node/http.d.ts | declare module 'http' {
import * as stream from 'node:stream';
import { URL } from 'node:url';
import { EventEmitter } from 'node:events';
import { LookupOptions } from 'node:dns';
import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
// incoming headers w... | PypiClean |
/LiPydomics-1.6.8-py3-none-any.whl/lipydomics/test/data.py | import os
import numpy as np
from lipydomics.test import run_tests
from lipydomics.data import Dataset
from lipydomics.stats import add_pca3, add_plsra
from lipydomics.identification import add_feature_ids
def dataset_init_mock1():
"""
dataset_init_mock1
description:
Tests initialization of the Datas... | PypiClean |
/Mezzanine-6.0.0.tar.gz/Mezzanine-6.0.0/docs/caching-strategy.rst | ================
Caching Strategy
================
Mezzanine takes great care to appropriately minimize database queries.
This strategy enables Mezzanine to perform well without a caching
configuration. However, caching is also well-supported in the event
that you wish to implement customized caching for your Mezzanin... | PypiClean |
/KittyStore-0.9.3.tar.gz/KittyStore-0.9.3/kittystore/search.py | from __future__ import absolute_import
import os
import shutil
from whoosh.index import create_in, exists_in, open_dir
from whoosh.fields import Schema, ID, TEXT, DATETIME, KEYWORD, BOOLEAN
from whoosh.analysis import StemmingAnalyzer
from whoosh.qparser import MultifieldParser
from whoosh.query import Term
from mail... | PypiClean |
/OBP_reliability_pillar_u1-0.2.1-py3-none-any.whl/OBP_reliability_pillar_u1/auto_scaling/asg_elb_healthcheck_required.py | import logging
import botocore
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger()
def asg_elb_healthcheck_required(self) -> dict:
"""
:param self:
:return dict:
"""
logger.info(" ---Inside autoscaling :: asg_elb_healthcheck_required()")
self.refresh_session()
result = ... | PypiClean |
/Firefly_III_API_Client-2.0.5.0-py3-none-any.whl/firefly_iii_client/apis/tags/insight_api.py | from firefly_iii_client.paths.v1_insight_expense_asset.get import InsightExpenseAsset
from firefly_iii_client.paths.v1_insight_expense_bill.get import InsightExpenseBill
from firefly_iii_client.paths.v1_insight_expense_budget.get import InsightExpenseBudget
from firefly_iii_client.paths.v1_insight_expense_category.get ... | PypiClean |
/FishFishJump-0.2.3.tar.gz/FishFishJump-0.2.3/fish_core/bloomfilter.py | from hashlib import md5
class SimpleHash(object):
"""
SimpleHash class to implement hash function of bloom filter.
"""
def __init__(self, capacity, seed):
"""
Parameters:
-----------
capacity: integer
the maximum bit digits.
... | PypiClean |
/Azule_Hair_Transplant-0.0.1.tar.gz/Azule_Hair_Transplant-0.0.1/losses/lpips/pretrained_networks.py | from collections import namedtuple
import torch
from torchvision import models as tv
from IPython import embed
class squeezenet(torch.nn.Module):
def __init__(self, requires_grad=False, pretrained=True):
super(squeezenet, self).__init__()
pretrained_features = tv.squeezenet1_1(pretrained=pretrained... | PypiClean |
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/utils/ratelimit.py |
from django.conf import settings
from django.contrib.auth import logout
from django.core.cache import cache
from django.middleware.csrf import rotate_token
from django.shortcuts import redirect
from django.template.loader import render_to_string
from weblate.logger import LOGGER
from weblate.utils import messages
fro... | PypiClean |
/FEADRE_AI-1.0.7.tar.gz/FEADRE_AI-1.0.7/FEADRE_AI/ai/fmodels/f_layer_get.py | import torch
from torchvision.models import _utils
import torch.nn as nn
import types
'''-----------------模型组合-----------------------'''
def x_model_group():
model = nn.Sequential()
model.add_module('conv', nn.Conv2d(3, 3, 3))
model.add_module('batchnorm', nn.BatchNorm2d(3))
model.add_module('activat... | PypiClean |
/DESlib-0.3.5-py3-none-any.whl/deslib/dcs/mcb.py |
# Author: Rafael Menelau Oliveira e Cruz <rafaelmenelau@gmail.com>
#
# License: BSD 3 clause
import numpy as np
from deslib.dcs.base import BaseDCS
class MCB(BaseDCS):
"""Multiple Classifier Behaviour (MCB).
The MCB method evaluates the competence level of each individual
classifiers taking into accou... | PypiClean |
/AI-Starter-3.0.7.tar.gz/AI-Starter-3.0.7/dxc/ai/visualization/visualization.py | from yellowbrick.features import Rank2D #exploring raw data
import matplotlib.pyplot as plt
import missingno as msno #gauge dataset completeness
import seaborn as sns #data exploration, distribution plotting
import pandas as pd
from datacleaner import autoclean
import math
from pandas.api.types import is_numeric_dtype
... | PypiClean |
/GalSim-2.4.11-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl/galsim/convolve.py |
import numpy as np
from . import _galsim
from .gsparams import GSParams
from .gsobject import GSObject
from .chromatic import ChromaticObject, ChromaticConvolution
from .utilities import lazy_property
from .errors import GalSimError, galsim_warn
def Convolve(*args, **kwargs):
"""A function for convolving 2 or mo... | PypiClean |
/DLMS_SPODES-0.40.11.tar.gz/DLMS_SPODES-0.40.11/src/DLMS_SPODES/cosem_interface_classes/security_setup/ver0.py | from ..__class_init__ import *
class SecurityPolicy(cdt.Enum, elements=tuple(range(16))):
""" Enforces authentication and/or encrypting algorithm provided with security_suite """
class SecuritySuite(cdt.Enum, elements=tuple(range(16))):
"""Specifies authentication, encryption and key transport algorithm"""
... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/jinja2_35/jinja2/parser.py | from jinja2 import nodes
from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError
from jinja2.lexer import describe_token, describe_token_expr
from jinja2._compat import imap
_statement_keywords = frozenset(['for', 'if', 'block', 'extends', 'print',
'macro', 'include'... | PypiClean |
/JaqalPaq-1.2.0a1.tar.gz/JaqalPaq-1.2.0a1/src/jaqalpaq/run/frontend.py | from jaqalpaq.error import JaqalError
from jaqalpaq.parser import parse_jaqal_file, parse_jaqal_string
DEFAULT_BACKEND = None
FORCE_BACKEND = None
def _get_backend(backend):
global DEFAULT_BACKEND
if FORCE_BACKEND is not None:
return FORCE_BACKEND
if backend is not None:
return backend... | PypiClean |
/FPyS-0.5.tar.gz/FPyS-0.5/README.txt | FPyS - An Amazon FPS Client for Python
FPyS utilizes the REST interface to the Amazon Flexible Payment system
to allow Python developers easy access to the Flexible Payment System.
The library works out of the box with Python 2.5. ElementTree is a
required install in environments not yet running 2.5. FPyS is release... | PypiClean |
/ImSwitch-2.0.0.tar.gz/ImSwitch-2.0.0/imswitch/imreconstruct/view/DataFrame.py | import pyqtgraph as pg
from qtpy import QtCore, QtWidgets
from .DataEditDialog import DataEditDialog
from .guitools import BetterPushButton
class DataFrame(QtWidgets.QFrame):
"""Frame for showing and examining the raw data"""
# Signals
sigShowMeanClicked = QtCore.Signal()
sigAdjustDataClicked = QtCo... | PypiClean |
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/demo/sampler/features/commons/TooltipsExample.py | from muntjac.api import VerticalLayout, Button, RichTextArea
from muntjac.ui.themes import BaseTheme
from muntjac.ui.button import IClickListener
class TooltipsExample(VerticalLayout):
_editTxt = 'Edit tooltip'
_applyTxt = 'Apply'
def __init__(self):
super(TooltipsExample, self).__init__()
... | PypiClean |
/Gbtestapi-0.1a10-py3-none-any.whl/gailbot/services/organizer/settings/settingManager.py | from typing import Dict, Union, List
import os
from .objects import SettingDict, SettingObject, PluginSuiteSetObj, EngineSetObj
from src.gailbot.core.utils.general import (
is_file,
is_directory,
read_toml,
get_name,
make_dir,
delete,
filepaths_in_dir,
)
from src.gailbot.core.utils.logger i... | PypiClean |
/BucketCache-0.12.1.tar.gz/BucketCache-0.12.1/doc/usage.rst | *****
Usage
*****
Overview
--------
In one sentence, :py:class:`~bucketcache.Bucket` is a container object with optional lifetime backed by configurable serialisation methods that can also act as a function or method decorator.
Before everything is explained in detail, here's a quick look at the functionality:
.. c... | PypiClean |
/GenIce-1.0.11.tar.gz/GenIce-1.0.11/genice/lattices/Struct09.py | pairs="""
208 115
328 222
349 102
337 211
204 111
84 288
12 331
171 314
339 145
70 174
243 53
350 91
363 162
335 190
422 282
423 283
17 218
142 440
67 336
366 425
379 182
403 284
135 115
100 93
85 322
205 454
130 430
170 399
387 218
383 14
393 356
454 336
116 352
311 410
279 324
288 97
403 321
264 79
114 421
276 294
23... | PypiClean |
/Messenger_Desktop_Client_Application-0.7.tar.gz/Messenger_Desktop_Client_Application-0.7/client/gui/main_window_gui.py |
from PyQt5 import QtCore, QtWidgets
class Gui_MainClientWindow(object):
"""
The class describes the GUI of the main window of clients.
"""
def setupUi(self, MainClientWindow):
"""The method creates interface elements of the main window."""
MainClientWindow.setObjectName('MainClientWin... | PypiClean |
/GradDog-1.3.0.tar.gz/GradDog-1.3.0/graddog/compgraph.py | import numpy as np
import pandas as pd
import graddog.math as math
from itertools import combinations_with_replacement
class CompGraph:
# implements the singleton design pattern
# so that only one instance of a CompGraph object ever exists
class __CompGraph:
def __init__(self):
self.reset()
def reset(se... | PypiClean |
/Firefly%20III%20API%20Python%20Client-1.5.6.post2.tar.gz/Firefly III API Python Client-1.5.6.post2/firefly_iii_client/model/rule_action_update.py | import re # noqa: F401
import sys # noqa: F401
from firefly_iii_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,... | PypiClean |
/BigJob-0.64.5.tar.gz/BigJob-0.64.5/examples/pilot-api/example-pilot-api.py | import sys
import os
import time
sys.path.append(os.path.join(os.path.dirname(__file__), "../.."))
sys.path.insert(0, os.getcwd() + "/../")
from pilot import PilotComputeService, ComputeDataService, State
COORDINATION_URL = "redis://localhost:6379"
if __name__ == "__main__":
pilot_compute_service = P... | PypiClean |
/IBATS_Utils-1.20211214.0-py3-none-any.whl/ibats_utils/json.py | import json
import logging
import typing
from datetime import datetime, date
from enum import Enum
import numpy as np
import simplejson
from ibats_utils.transfer import datetime_2_str, date_2_str
logger = logging.getLogger(__name__)
class JsonEncoder(json.JSONEncoder):
"""Json编码器"""
def default(self, obj)... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/dns/rdtypes/dsbase.py |
# Copyright (C) 2010, 2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AN... | PypiClean |
/ColorfulCLI-0.0.1.tar.gz/ColorfulCLI-0.0.1/README.md | # ColorfulCLI
## A simple way to add color to your Python CLI apps.
#
# Example uses:
## Import the module:
from ColorfulCLI import colorful
## Create an instance of the ColorfulCLI class
color = Colorful()
## Example usage
print(f"{color.yellow}Hello, World!{color.reset}")
print(f"{color.blink}{color.yell... | PypiClean |
/First_Messenger_Client-0.8.2.tar.gz/First_Messenger_Client-0.8.2/client/client/add_contact.py | from PyQt5.QtGui import QStandardItemModel, QStandardItem
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QDialog, QLabel, QComboBox, QPushButton
import logging
logger = logging.getLogger('client')
class AddContactDialog(QDialog):
'''
Диалог добавления пользователя в список контактов.
Предлагает ... | PypiClean |
/MeUtils-2023.8.29.13.9.44-py3-none-any.whl/meutils/templates/pypackage/{{cookiecutter.project_slug}}/README.md | {% set is_open_source = cookiecutter.open_source_license != 'Not open source' -%}
{% if is_open_source %}
   functions using a hybrid method
HOBIT is a Python library that combines the power of Hyperopt (https://githu... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.