id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/DjangoAppCenter/simpleui/static/admin/js/SelectFilter2.js | SelectFilter2 - Turns a multiple-select box into a filter interface.
Requires jQuery, core.js, and SelectBox.js.
*/
(function ($) {
'use strict';
function findForm(node) {
// returns the node of the form containing the given node
if (node.tagName.toLowerCase() !== 'form') {
return ... | PypiClean |
/Nuitka_winsvc-1.7.10-cp310-cp310-win_amd64.whl/nuitka/tree/ReformulationForLoopStatements.py | from nuitka.nodes.BuiltinIteratorNodes import (
ExpressionAsyncIter,
ExpressionAsyncNext,
ExpressionBuiltinIter1,
)
from nuitka.nodes.BuiltinNextNodes import ExpressionBuiltinNext1
from nuitka.nodes.ComparisonNodes import ExpressionComparisonIs
from nuitka.nodes.ConditionalNodes import makeStatementConditio... | PypiClean |
/Chorus-0.9.0.tar.gz/Chorus-0.9.0/chorus/v2000writer.py |
import chorus
def atom_block(mol):
idx_table = {}
lines = []
for i, (k, atom) in enumerate(mol.atoms_iter()):
atom_line = []
for ax in atom.coords:
int_, frac = str(ax).split(".")
atom_line.append("{:>5}".format(int_))
atom_line.append("{:0<4}".format(f... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/ol-2.13/lib/OpenLayers/BaseTypes/Element.js | * @requires OpenLayers/Util.js
* @requires OpenLayers/BaseTypes.js
*/
/**
* Namespace: OpenLayers.Element
*/
OpenLayers.Element = {
/**
* APIFunction: visible
*
* Parameters:
* element - {DOMElement}
*
* Returns:
* {Boolean} Is the element visible?
*/
visible: f... | PypiClean |
/MuPhyN-0.1.1.post4-py3-none-any.whl/muphyn/packages/interface/graphical_actions/diagram_change_element_params_action.py |
# Project Imports
from muphyn.packages.core.base import LogManager
from muphyn.packages.interface.graphical_actions.abstract_unique_element_diagram_action import AbstractUniqueElementDiagramAction
from muphyn.packages.interface.models.graphical_models.abstract_graphical_element import AbstractGraphicalElement
from mup... | PypiClean |
/GelReportModels-7.8.0.tar.gz/GelReportModels-7.8.0/protocols/migration/migration_participant_103_to_participant_110.py | from protocols import participant_1_0_3
from protocols import participant_1_1_0
from protocols.util import handle_avro_errors
from protocols.migration import BaseMigration
from protocols.migration.base_migration import MigrationError
class MigrationParticipants103To110(BaseMigration):
old_model = participant_1_0_... | PypiClean |
/ImSwitchUC2-2.1.0.tar.gz/ImSwitchUC2-2.1.0/imswitch/imreconstruct/view/DataEditDialog.py | import pyqtgraph as pg
from qtpy import QtCore, QtWidgets
from .guitools import BetterPushButton
class DataEditDialog(QtWidgets.QDialog):
"""For future data editing window, for example to remove rearrange frames
or devide into seperate datasets"""
sigImageSliceChanged = QtCore.Signal(int)
sigShowMea... | PypiClean |
/Ming-0.13.0-py3-none-any.whl/ming/odm/odmsession.py | from collections import defaultdict
from pymongo.database import Database
from ming.session import Session
from ming.utils import ThreadLocalProxy, ContextualProxy, indent
from ming.base import Object
from ming.exc import MingException
from .base import state, ObjectState, session, _with_hooks, _call_hook
from .mappe... | PypiClean |
/AaronTools-1.0b14.tar.gz/AaronTools-1.0b14/bin/plotAverageUVVis.py |
import argparse
import sys
from warnings import warn
from AaronTools.comp_output import CompOutput
from AaronTools.fileIO import FileReader
from AaronTools.geometry import Geometry
from AaronTools.spectra import ValenceExcitations
from AaronTools.utils.utils import get_filename, glob_files
from matplotlib import rcP... | PypiClean |
/EtaML-0.0.9-py3-none-any.whl/etaml/preprocessing.py | import warnings
import numbers
import joblib
import os
import re
import numpy as np
import pandas as pd
from pandas.core.common import SettingWithCopyWarning
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from sklearn.impute import KNNImputer
from sklearn.experimental import enable_iterative_imputer
f... | PypiClean |
/Inukshuk-0.1.2.tar.gz/Inukshuk-0.1.2/bench/stocks/context.py | data = [
{
'name': 'Adobe Systems',
'name2': 'Adobe Systems Inc.',
'url': 'http://www.adobe.com',
'symbol': 'ADBE',
'price': 39.26,
'change': 0.13,
'ratio': 0.33,
},
{
'name': 'Advanced Micro Devices',
'name2': 'Advanced M... | PypiClean |
/FastFlask-1.2.32-py3-none-any.whl/werkzeug/middleware/profiler.py | import os.path
import sys
import time
import typing as t
from pstats import Stats
try:
from cProfile import Profile
except ImportError:
from profile import Profile # type: ignore
if t.TYPE_CHECKING:
from _typeshed.wsgi import StartResponse
from _typeshed.wsgi import WSGIApplication
from _typeshed... | PypiClean |
/BAxUS-0.0.8.tar.gz/BAxUS-0.0.8/README.md | # Increasing the Scope as You Learn: BAxUS
[](http://gitlab.papenmeier.io/root/baxus-paper-version/-/commits/main) [](http://... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/gfx/path.js | if(!dojo._hasResource["dojox.gfx.path"]){
dojo._hasResource["dojox.gfx.path"]=true;
dojo.provide("dojox.gfx.path");
dojo.require("dojox.gfx.shape");
dojo.declare("dojox.gfx.path.Path",dojox.gfx.Shape,{constructor:function(_1){
this.shape=dojo.clone(dojox.gfx.defaultPath);
this.segments=[];
this.absolute=true;
this.last... | PypiClean |
/NovalIDE-1.1.8-py3-none-any.whl/noval/python/debugger/inspectconsole.py | from noval import GetApp,_
import noval.iface as iface
import noval.plugin as plugin
from tkinter import ttk,messagebox
import tkinter as tk
import noval.editor.text as texteditor
import noval.ttkwidgets.textframe as textframe
from noval.python.debugger.commandui import BaseDebuggerUI
import noval.consts as consts
cla... | PypiClean |
/ModuleZooTorch-1.1.3a0-py3-none-any.whl/moduleZoo/resblocks/residual.py | from typing import Callable, Optional, Tuple, Union
import torch
import torch.nn as nn
from ..convolution import ConvNormActivation1d, ConvNormActivation2d
class ConvResidualBlock2d(nn.Module):
def __init__(self,
in_channels: int,
out_channels: int,
kernel_siz... | PypiClean |
/Adeepspeed-0.9.2.tar.gz/Adeepspeed-0.9.2/deepspeed/ops/adam/fused_adam.py |
# DeepSpeed Team
"""
Copyright NVIDIA/apex
This file is adapted from fused adam in NVIDIA/apex, commit a109f85
"""
import torch
from .multi_tensor_apply import MultiTensorApply
multi_tensor_applier = MultiTensorApply(2048 * 32)
from deepspeed.accelerator import get_accelerator
from deepspeed.ops.op_builder import Fu... | PypiClean |
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/xinha/plugins/QuickTag/tag-lib.js | var allTags={a:"a","a (full)":'a href="" target=""',address:"address",b:"b",big:"big",blockquote:"blockquote",code:"code",div:"div",em:"em",fieldset:"fieldset",font:"font","font (full)":'font face="" size="" color=""',h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",i:"i",legend:"legend",li:"li",ol:"ol",ul:"ul",p:"p",pr... | PypiClean |
/AstroCabTools-1.5.1.tar.gz/AstroCabTools-1.5.1/astrocabtools/fit_line/src/models/moffatModelCreation.py | import numpy as np
import pandas as pd
import math
from lmfit import Parameters, Model
import sys
import traceback
import io
from collections import deque
from .moffatPointsData import moffatPointsData
from .linePointsData import linePointsData
from .quadraticPointsData import quadraticPointsData
from .exponentialP... | PypiClean |
/Data_Split-1.0.0.tar.gz/Data_Split-1.0.0/Data_Split_by_Bhawika/split_train_validation.py | import os
from os import path
import sys
import random
import shutil
from shutil import copyfile
def split_data(SOURCE, TRAINING, VALIDATION, TESTING, SPLIT_SIZE):
files = []
print('Split Data')
for filename in os.listdir(SOURCE):
file = SOURCE +'/'+ filename
if os.path.getsize(file) > 0:
... | PypiClean |
/OTLModel/Classes/Verlichtingstoestel.py | from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut
from abc import abstractmethod
from OTLMOW.OTLModel.Classes.AIMNaamObject import AIMNaamObject
from OTLMOW.OTLModel.Datatypes.BooleanField import BooleanField
from OTLMOW.OTLModel.Datatypes.KlVerlichtingstoestelMerk import KlVerlichtingstoestelMerk
from ... | PypiClean |
/MGP_SDK-1.1.1.tar.gz/MGP_SDK-1.1.1/src/MGP_SDK/ordering_service/orders.py | import requests
from MGP_SDK import process
from MGP_SDK.auth.auth import Auth
from MGP_SDK.account_service import users
from datetime import datetime
class Orders:
def __init__(self, auth: Auth):
self.auth = auth
self.api_version = self.auth.api_version
self.base_url = self.auth.api_base... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/localflavor/sk/sk_districts.py | from django.utils.translation import ugettext_lazy as _
DISTRICT_CHOICES = (
('BB', _('Banska Bystrica')),
('BS', _('Banska Stiavnica')),
('BJ', _('Bardejov')),
('BN', _('Banovce nad Bebravou')),
('BR', _('Brezno')),
('BA1', _('Bratislava I')),
('BA2', _('Bratislava II')),
('BA3', _('Br... | PypiClean |
/BCPy2000-1.6.tar.gz/BCPy2000-1.6/src/LangTools/TreeStructure.py | __all__ = ['trie']
import struct
import md5
import time
import os
try: from .ProgressMonitoring import progress
except ImportError: progress = None
packedfmt_header = '<HLL' # number of children, parent index, count of occurrences
packedfmt_link = '<ccL' # key + node number
packedsize_header = struct.... | PypiClean |
/MezzanineFor1.7-3.1.10.tar.gz/MezzanineFor1.7-3.1.10/mezzanine/generic/templatetags/comment_tags.py | from __future__ import unicode_literals
from future.builtins import int
from collections import defaultdict
from django.core.urlresolvers import reverse
from django.template.defaultfilters import linebreaksbr, urlize
from mezzanine import template
from mezzanine.conf import settings
from mezzanine.generic.forms impo... | PypiClean |
/FyersTestSDK-0.0.4-py3-none-any.whl/fyerstest/fyersApi.py | moduleName = 'fyersApi'
import urllib.parse
import hashlib
import json
from urllib.parse import urlparse
import asyncio
import subprocess
import sys
import requests
import json
import urllib
import aiohttp
import asyncio
import json
class Config:
# Api = 'https://api-t1.fyers.in/trade/v3'
Api = 'https://ap... | PypiClean |
/Mastodon.py-1.8.1.tar.gz/Mastodon.py-1.8.1/mastodon/preferences.py |
import collections
from .versions import _DICT_VERSION_PREFERENCES, _DICT_VERSION_MARKER
from .errors import MastodonIllegalArgumentError
from .utility import api_version
from .internals import Mastodon as Internals
class Mastodon(Internals):
###
# Reading data: Preferences
###
@api_version("2.8.0"... | PypiClean |
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/methods/bots/request_callback_answer.py |
from typing import Union
import fipper
from fipper import raw
class RequestCallbackAnswer:
async def request_callback_answer(
self: "fipper.Client",
chat_id: Union[int, str],
message_id: int,
callback_data: Union[str, bytes],
timeout: int = 10
):
"""Request a ... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/crm/model/email_address.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 |
/Miniature-0.2.0.tar.gz/Miniature-0.2.0/miniature/thumbnails/templatetags/miniature.py | from __future__ import (print_function, division, absolute_import, unicode_literals)
from django import template
from django.template.base import kwarg_re
from django.utils import six
from miniature.thumbnails.conf import settings
from miniature.thumbnails.base import get_thumbnail
register = template.Library()
cl... | PypiClean |
/DJModels-0.0.6-py3-none-any.whl/djmodels/utils/cache.py | import hashlib
import re
import time
from djmodels.conf import settings
from djmodels.core.cache import caches
from djmodels.http import HttpResponse, HttpResponseNotModified
from djmodels.utils.encoding import force_bytes, iri_to_uri
from djmodels.utils.http import (
http_date, parse_etags, parse_http_date_safe, ... | PypiClean |
/NEMO_CE-1.6.12-py3-none-any.whl/NEMO/views/consumables.py | from datetime import date
from logging import getLogger
from typing import List
from django.contrib import messages
from django.contrib.auth.decorators import login_required, user_passes_test
from django.http import HttpResponseBadRequest
from django.shortcuts import get_object_or_404, redirect, render
from django.uti... | PypiClean |
/AutoMonkey-0.2.1.tar.gz/AutoMonkey-0.2.1/automonkey/automonkey.py | from time import sleep
from sys import exit as end
from sys import platform
if platform == "win32":
from os import startfile # It is used
elif platform == "linux":
from subprocess import call
def startfile(file):
call(["xdg-open", file])
from clipboard import paste
from pyautogui import click ... | PypiClean |
/Kadabra-0.5.0.tar.gz/Kadabra-0.5.0/docs/overview.rst | .. _overview:
Overview
========
At a high level Kadabra consists of three components:
- A client for collecting the metrics in your application. You will configure
the client API and instrument your application code to record relevant
metrics, such as user signups or 500 errors.
- Channels for temporarily queuei... | PypiClean |
/Equilid-1.0.1.tar.gz/Equilid-1.0.1/equilid/equilid.py |
# Portions of this code are adapted from the TensorFlow example materials, which
# retains its original Apache Licenese 2.0. All other code was developed by
# David Jurgens and Yulia Tsvetkov and has the same license.
#
# Copyright 2017 David Jurgens and The TensorFlow Authors. All Rights Reserved.
#
# Licensed unde... | PypiClean |
/DjangoDE-0.2.tar.gz/DjangoDE-0.2/djangode/gui/wizards/new_project_wizard.py |
import os
from djangode import global_objects
from djangode.project import Project
from djangode.utils.qt import QtCore, QtGui
class NewProjectWizard(QtGui.QWizard):
def __init__(self):
QtGui.QWizard.__init__(self)
self.addPage(NewProjectType(self))
self.addPage(NewProjectLocation(self))... | PypiClean |
/EnergySystemModels-0.1.17.post63-py3-none-any.whl/PyqtSimulator/nodes/desuperheater.py | from PyQt5.QtCore import *
from PyqtSimulator.calc_conf import *
from PyqtSimulator.calc_node_base import *
from NodeEditor.nodeeditor.utils import dumpException
#############les modèles d'un groupe frigorifique#################
#from Modules_GroupeFrigorifique.Evaporator import Evaporator
#from Modules_GroupeFrigorif... | PypiClean |
/Flask-Coney-1.1.4.tar.gz/Flask-Coney-1.1.4/src/flask_coney/consumer.py | import functools
import json
import time
import pika
from .exchange import ExchangeType
from .utils import logger
class Consumer:
def __init__(
self,
url,
exchange="",
exchange_type=ExchangeType.DIRECT,
queue="",
routing_key="",
on_message=None,
):
... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/documents/tasks.py |
import os
from django.core.files.storage import default_storage as storage
from geonode.celery_app import app
from celery.utils.log import get_task_logger
from geonode.documents.models import Document
from geonode.documents.renderers import render_document
from geonode.documents.renderers import generate_thumbnail_... | PypiClean |
/Distutils2-1.0a4.tar.gz/Distutils2-1.0a4/distutils2/command/build_scripts.py |
import os
import re
from distutils2.command.cmd import Command
from distutils2.util import convert_path, newer
from distutils2 import logger
from distutils2.compat import Mixin2to3
from distutils2._backport import sysconfig
from distutils2._backport.misc import detect_encoding, fsencode
# check if Python is called ... | PypiClean |
/aleksis_app_alsijil-3.0.1.tar.gz/aleksis_app_alsijil-3.0.1/aleksis/apps/alsijil/tables.py | from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy as _
import django_tables2 as tables
from django_tables2.utils import A
from aleksis.apps.chronos.models import Event, LessonPeriod
from aleksis.core.util.tables import S... | PypiClean |
/Mathics3-6.0.2.tar.gz/Mathics3-6.0.2/mathics/doc/latex/doc2latex.py | import os
import os.path as osp
import pickle
import subprocess
import sys
from argparse import ArgumentParser
from typing import Dict, Optional
from mpmath import __version__ as mpmathVersion
from numpy import __version__ as NumPyVersion
from sympy import __version__ as SymPyVersion
import mathics
from mathics impor... | PypiClean |
/AutoYOLObile-0.0.10.tar.gz/AutoYOLObile-0.0.10/ModelOpt/AutoYOLO/utils/layers.py | import torch.nn.functional as F
from ModelOpt.AutoYOLO.utils.utils import *
def make_divisible(v, divisor):
# Function ensures all layers have a channel number that is divisible by 8
# https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet/mobilenet.py
return math.ceil(v / divisor)... | PypiClean |
/GALFITools-1.0.0.tar.gz/GALFITools-1.0.0/src/galfitools/galin/getStar.py |
import numpy as np
from astropy.io import fits
import sys
import subprocess as sp
import os.path
import argparse
def getStar(image: str, regfile: str, imsize: int, center: bool, sky: float, imout: str, sigma: str , sigout: str)-> None:
##########################################
######Internal flags ###... | PypiClean |
/IsPycharmRun-1.0.tar.gz/IsPycharmRun-1.0/airtest/utils/logwraper.py |
import os
import json
import time
import inspect
import functools
import traceback
from copy import copy
from .logger import get_logger
from .snippet import reg_cleanup
LOGGING = get_logger(__name__)
class AirtestLogger(object):
"""logger """
def __init__(self, logfile):
super(AirtestLogger, self).__... | PypiClean |
/Django-Yummy-0.2.6.tar.gz/Django-Yummy-0.2.6/yummy/migrations/0013_auto__chg_field_ingredient_default_unit.py | import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Ingredient.default_unit'
db.alter_column('yummy_ingredient', 'default_unit', self.gf('django.db.models.fields.Pos... | PypiClean |
/Flask-DebugToolbar-0.13.1.tar.gz/Flask-DebugToolbar-0.13.1/README.rst | Flask Debug-toolbar
===================
This is a port of the excellent `django-debug-toolbar <https://github.com/django-debug-toolbar/django-debug-toolbar>`_
for Flask applications.
.. image:: https://travis-ci.org/flask-debugtoolbar/flask-debugtoolbar.png?branch=master
:target: https://travis-ci.org/flask-debugt... | PypiClean |
/FEV_KEGG-1.1.4.tar.gz/FEV_KEGG-1.1.4/FEV_KEGG/Experiments/14.py | from FEV_KEGG.Graph.SubstanceGraphs import SubstanceReactionGraph, SubstanceGeneGraph, SubstanceEcGraph
import FEV_KEGG.KEGG.Organism
if __name__ == '__main__':
#- Get all metabolic pathways of all E. coli organisms from KEGG.
eColiOrganisms = FEV_KEGG.KEGG.Organism.Group(searchString = 'Escherichia coli... | PypiClean |
/BOTMotion-0.2.tar.gz/BOTMotion-0.2/botmotion/pdo_handler.py |
import struct
import ctypes
import time
from debug_printing import *
from pdo_constants import *
from ethernet_socket import *
from ex_thread import *
LOOP_TIME = 0.001 # sec
TIMEOUT = 5 # sec
class ExceptionWrongCMD(Exception):
"""
Wrong command exception class
"""
pass
class ExceptionTimeout(Exce... | PypiClean |
/Flask-hCaptcha-0.6.0.tar.gz/Flask-hCaptcha-0.6.0/README.md | # Flask-hCaptcha
[](https://pypi.org/project/Flask-hCaptcha/)
[](https://github.com/KnugiHK/flask-hcaptch... | PypiClean |
/Mopidy-Podcast-3.0.1.tar.gz/Mopidy-Podcast-3.0.1/mopidy_podcast/__init__.py | import pathlib
import pkg_resources
from mopidy import config, ext, httpclient
__version__ = pkg_resources.get_distribution("Mopidy-Podcast").version
class Extension(ext.Extension):
dist_name = "Mopidy-Podcast"
ext_name = "podcast"
version = __version__
def get_default_config(self):
retur... | PypiClean |
/Adafruit_Blinka-8.20.1-py3-none-any.whl/adafruit_blinka/microcontroller/tegra/t186/pin.py | """Tegra T186 pin names"""
import atexit
from Jetson import GPIO
GPIO.setmode(GPIO.TEGRA_SOC)
GPIO.setwarnings(False) # shh!
class Pin:
"""Pins dont exist in CPython so...lets make our own!"""
IN = 0
OUT = 1
LOW = 0
HIGH = 1
PULL_NONE = 0
PULL_UP = 1
PULL_DOWN = 2
id = None
... | PypiClean |
/BGAscraper-0.0.1.tar.gz/BGAscraper-0.0.1/README.md | # BGA_Scraper
collects the stats of the top players of each
game from https://boardgamearena.com, for each game they have played,
including basic information about each game itself.
Basic Functionality is inherited from bot.py, and data cleaning
is carried out by cleaning.py.
Once data is gathered, some tools for ... | PypiClean |
/NREL_shift-0.1.0a0-py3-none-any.whl/shift/facade.py |
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redist... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/layout/FloatingPane.js.uncompressed.js | require({cache:{
'url:dojox/layout/resources/FloatingPane.html':"<div class=\"dojoxFloatingPane\" id=\"${id}\">\n\t<div tabindex=\"0\" role=\"button\" class=\"dojoxFloatingPaneTitle\" dojoAttachPoint=\"focusNode\">\n\t\t<span dojoAttachPoint=\"closeNode\" dojoAttachEvent=\"onclick: close\" class=\"dojoxFloatingCloseIco... | PypiClean |
/APtools-0.2.4-py3-none-any.whl/aptools/helper_functions.py |
import numpy as np
from copy import copy
def create_beam_slices(z, n_slices=10, len_slice=None):
"""Calculates the slice limits along z of a partile distribution for a
given number of slices or slice length.
Parameters
----------
z : array
Contains the longitudinal position of the partic... | PypiClean |
/K40Silence-0.0.1.tar.gz/K40Silence-0.0.1/src/device/ch341/ch341libusbdriver.py | import usb.core
import usb.util
STATUS_NO_DEVICE = -1
USB_LOCK_VENDOR = 0x1A86 # Dev : (1a86) QinHeng Electronics
USB_LOCK_PRODUCT = 0x5512 # (5512) CH341A
BULK_WRITE_ENDPOINT = 0x02 # usb.util.ENDPOINT_OUT|usb.util.ENDPOINT_TYPE_BULK
BULK_READ_ENDPOINT = 0x82 # usb.util.ENDPOINT_IN|usb.util.ENDPOINT_TYPE_BULK
CH3... | PypiClean |
/Electrum-Zcash-Random-Fork-3.1.3b5.tar.gz/Electrum-Zcash-Random-Fork-3.1.3b5/lib/plugins.py | from collections import namedtuple
import traceback
import sys
import os
import imp
import pkgutil
import time
import threading
from .util import print_error
from .i18n import _
from .util import profiler, PrintError, DaemonThread, UserCancelled, ThreadJob
from . import bitcoin
plugin_loaders = {}
hook_names = set()
... | PypiClean |
/GeoBasesPypy-5.0.16.zip/GeoBasesPypy-5.0.16/GeoBases/GeoUtils.py | from math import pi, cos, sin, acos, asin, tan, atan2, log, sqrt
# kms, mean radius
EARTH_RADIUS = 6371.0
def radian(a):
"""Degree to radian conversion.
:param a: the input in degree
:returns: the output in radian
>>> radian(0)
0.0
>>> radian(180)
3.14...
"""
return float(a) / ... | PypiClean |
/Furious-GUI-0.2.4.tar.gz/Furious-GUI-0.2.4/Furious/Core/TorRelay.py | from Furious.Core.Core import Core
from Furious.Utility.Constants import (
APP,
DATA_DIR,
DEFAULT_TOR_SOCKS_PORT,
DEFAULT_TOR_HTTPS_PORT,
)
from Furious.Utility.Utility import AsyncSubprocessMessage
from PySide6 import QtCore
import re
import signal
import logging
import threading
import subprocess
l... | PypiClean |
/Bonerator-0.1.1.tar.gz/Bonerator-0.1.1/bonerator/environment/table.py | import xlrd
import re
import csv
from typing import Union, List
from bonerator.environment import Environment
from bonerator.content.content import ContentList, ContentBase
from bonerator.content.command import Command, CommandLine
from bonerator import utils
__all__ = ["Tabular", "TableBase", "ExcelTable", "CSVTable"... | PypiClean |
/OASYS1-WONDER-1.0.45.tar.gz/OASYS1-WONDER-1.0.45/orangecontrib/wonder/util/fit_utilities.py |
import operator
import itertools
import numpy
class Symmetry:
FCC = "fcc"
BCC = "bcc"
SIMPLE_CUBIC = "sc"
@classmethod
def tuple(cls):
return [cls.SIMPLE_CUBIC, cls.BCC, cls.FCC]
class Utilities:
@classmethod
def s_hkl(cls, a, h, k, l):
return numpy.sqrt(h**2 + k**2 + l**... | PypiClean |
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/utils/render.py |
from django.conf import settings
from django.core.exceptions import ValidationError
from django.template import Context, Engine, Template, TemplateSyntaxError
from django.urls import reverse
from django.utils.translation import gettext as _
from django.utils.translation import override
from weblate.utils.site import ... | PypiClean |
/AsynCluster-0.3.tar.gz/AsynCluster-0.3/ez_setup.py | import sys
DEFAULT_VERSION = "0.6c7"
DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3]
md5_data = {
'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca',
'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb',
'setuptools-0.6b2-py2.3.egg': '5657759... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/msvc.py |
__revision__ = "src/engine/SCons/Tool/msvc.py 2014/07/05 09:42:21 garyo"
import os.path
import re
import sys
import SCons.Action
import SCons.Builder
import SCons.Errors
import SCons.Platform.win32
import SCons.Tool
import SCons.Tool.msvs
import SCons.Util
import SCons.Warnings
import SCons.Scanner.RC
from MSCommo... | PypiClean |
/MLMath-0.0.0rc1.tar.gz/MLMath-0.0.0rc1/mlm/tf/nets.py | from typing import Callable, Tuple, List
import pickle
from typing import Callable
from typing import Tuple, List
import numpy
import tensorflow as tf
from tensorflow import Tensor
from tensorflow import keras
from tensorflow.keras import layers as kl
from tensorflow import Tensor
from .. import math
def parameter_... | PypiClean |
/Intellect-1.4.9.tar.gz/Intellect-1.4.9/intellect/Intellect.py | import logging
import sys
import urllib
import urllib2
import os
import errno
from urlparse import urlparse
from antlr3 import CommonTokenStream, ANTLRStringStream
from intellect.grammar.PolicyParser import PolicyParser
from intellect.PolicyLexer import PolicyLexer
from intellect.Node import Policy
from intellect.No... | PypiClean |
/Congo-0.0.1.tar.gz/Congo-0.0.1/portfolio/component/static/portfolio/vendor/mdeditor/bower_components/codemirror/addon/edit/closetag.js | (function() {
CodeMirror.defineOption("autoCloseTags", false, function(cm, val, old) {
if (val && (old == CodeMirror.Init || !old)) {
var map = {name: "autoCloseTags"};
if (typeof val != "object" || val.whenClosing)
map["'/'"] = function(cm) { return autoCloseTag(cm, '/'); };
if (typeof ... | PypiClean |
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/lorem/hy_AM/__init__.py | from typing import Dict
from .. import Provider as LoremProvider
class Provider(LoremProvider):
"""Implement lorem provider for ``hy_AM`` locale.
Sources:
- https://www.101languages.net/armenian/armenian-word-list
"""
word_list = (
"ես",
"դու",
"նա",
"մենք",
... | PypiClean |
/CLEMENTDNA-1.0.4.tar.gz/CLEMENTDNA-1.0.4/CLEMENT/Bunch.py | import numpy as np
import copy
import EMhard
class Bunch1: # step_hard, step_soft, trial_hard, trial_soft
def __init__(self, NUM_MUTATION, NUM_BLOCK, NUM_CLONE, K):
self.mixture = np.zeros ( (NUM_BLOCK, NUM_CLONE), dtype = "float")
self.mixture_record = np.zeros ( (K, NUM_BLOCK, NUM_CLONE),... | PypiClean |
/Downpour-0.2.tar.gz/Downpour-0.2/downpour/web/libraries.py | from downpour.web import common
from downpour.core import models, organizer
from twisted.web import server
class Root(common.AuthenticatedResource):
def __init__(self):
common.AuthenticatedResource.__init__(self)
self.putChild('', self);
self.putChild('save', Save())
def getChild(self... | PypiClean |
/IMTreatment-1.3.2.tar.gz/IMTreatment-1.3.2/docs/IMTreatment.core.rst | core package
========================
.. automodule:: IMTreatment.core
:members:
:undoc-members:
:show-inheritance:
.. toctree::
IMTreatment.core.field
IMTreatment.core.fields
IMTreatment.core.orientedpoints
IMTreatment.core.points
IMTreatment.core.profile
IMTreatment.core.scalarfield
... | PypiClean |
/GDBKokkos-0.2.0.tar.gz/GDBKokkos-0.2.0/README.md | # GDBKokkos
[](https://github.com/Char-Aznable/GDBKokkos/actions)
[](https://opensource.org/licenses/BSD-3-Clause)
[![PyPI ve... | PypiClean |
/Flask-TinyMCE-1.0.0.tar.gz/Flask-TinyMCE-1.0.0/flask_tinymce/static/plugins/wordcount/plugin.min.js | !function(){"use strict";function r(t){return t}function g(t){for(var e=a,n=c.length,r=0;r<n;++r){var o=c[r];if(o&&o.test(t)){e=r;break}}return e}function d(t,e,n,r){for(var o,u,c,a,i,s,g,d,l,p=[],h=[],f=0;f<n.length;++f)h.push(t[f]),function(t,e){var n=t[e],r=t[e+1];if(!(e<0||e>t.length-1&&0!==e||0===n&&0===r)){var o=... | PypiClean |
/GQCMS-0.0.4-py3-none-any.whl/build/lib/build/lib/build/lib/build/lib/build/lib/build/lib/gqcms/Optimization.py | import numpy as np
def LineSearch(
a: float,
f: callable,
args: tuple = (),
lower_boundary: float = -10.0,
upper_boundary: float = 10.0,
threshold: float = 1e-6,
check_threshold: float = 1e-3,
maxiter: int = 100,
blog: bool = False,
) -> tuple:
"""
Optimizes the expectation... | PypiClean |
/CCC-2.0.1.tar.gz/CCC-2.0.1/ccc/marketing/autodialer/api/serializers.py | from rest_framework import serializers
from rest_framework.validators import UniqueValidator
from ccc.click_to_call.models import AutoDialerList, PersonalizedMessage
class AutoDialerSerializer(serializers.ModelSerializer):
class Meta:
model = AutoDialerList
fields = '__all__'
def validate_voice... | PypiClean |
/GitWeb-0.4.tar.gz/GitWeb-0.4/README.txt | GitWeb is a fork of `git_http_backend.py
<https://github.com/dvdotsenko/git_http_backend.py>`_ using Webob
Dependencies
============
* Python 2.6
* Git >= 1.6.6 (On the server and on the client side.)
Installation
============
With easy_install::
easy_install GitWeb
Get the source::
git clone git://github.co... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/codemirror/addon/edit/closebrackets.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) {
var ... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/editor/plugins/NormalizeIndentOutdent.js | define("dojox/editor/plugins/NormalizeIndentOutdent",["dojo","dijit","dojox","dijit/_editor/range","dijit/_editor/selection","dijit/_editor/_Plugin","dojo/_base/connect","dojo/_base/declare"],function(_1,_2,_3){
_1.declare("dojox.editor.plugins.NormalizeIndentOutdent",_2._editor._Plugin,{indentBy:40,indentUnits:"px",se... | PypiClean |
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/nanoid/README.md | # Nano ID
<img src="https://ai.github.io/nanoid/logo.svg" align="right"
alt="Nano ID logo by Anton Lovchikov" width="180" height="94">
**English** | [Русский](./README.ru.md) | [简体中文](./README.zh-CN.md) | [Bahasa Indonesia](./README.id-ID.md)
A tiny, secure, URL-friendly, unique string ID generator for JavaScri... | PypiClean |
/Django-Pizza-16.10.1.tar.gz/Django-Pizza-16.10.1/pizza/kitchen_sink/static/ks/ckeditor/lang/pt-br.js | /*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.lang['pt-br']={"editor":"Editor de Texto","editorPanel":"Rich Text Editor panel","common":{"editorHelp":"Pressione ALT+0 para ajuda","browseServer":"Localizar no Ser... | PypiClean |
/NanoLyse-1.2.1.tar.gz/NanoLyse-1.2.1/README.md | # NanoLyse
Remove reads mapping to the lambda phage genome from a fastq file.
This script uses Heng Li's [minimap2](https://github.com/lh3/minimap2) and his [mappy](https://pypi.python.org/pypi/mappy) Python binding.
[ {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use s... | PypiClean |
/DeepPhysX-22.6.tar.gz/DeepPhysX-22.6/src/Visualizer/VedoObjects.py | from typing import Callable, Dict, Union, Tuple
from vedo import Mesh, Glyph, Marker, Points, Arrows, Plotter
from DeepPhysX.Core.Visualizer.VedoObjectFactories.VedoObjectFactory import VedoObjectFactory
from DeepPhysX.Core.Visualizer.VedoObjectFactories.VedoObjectFactory import ObjectDescription, VisualInstance
cre... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dijit/nls/dijit-all_fr-fr.js | dojo.provide("dijit.nls.dijit-all_fr-fr");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.fr_fr");dojo.nls.colors.fr_fr={"lightsteelblue":"bleu acier clair","orangered":"rouge orangé","midnightblue":"bleu nuit","cadetblue":"bleu pétrole","seashell":"coquillage","slategrey":"gri... | PypiClean |
/LongTermBiosignals-1.0.0.tar.gz/LongTermBiosignals-1.0.0/src/ml/trainers/SupervisedTrainReport.py |
# ===================================
# IT - LongTermBiosignals
# Package: ml
# Module: SupervisedTrainReport
# Description: Class SupervisedTrainReport, produces a PDF report for a SupervisingTrainer.
# Contributors: João Saraiva
# Created: 6/05/2022
# ===================================
from datetime import dat... | PypiClean |
/Catactor-0.1.2.tar.gz/Catactor-0.1.2/LassoVariants/README.md | # LassoVariants
## /AlternateLasso
Python code for the alternate features search proposed in the following paper.
* S. Hara, T. Maehara, [Finding Alternate Features in Lasso](https://arxiv.org/abs/1611.05940), arXiv:1611.05940, 2016.
## /EnumLasso
Python code for Lasso solution enumeration proposed in the following ... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/@types/node/ts4.8/process.d.ts | declare module 'process' {
import * as tty from 'node:tty';
import { Worker } from 'node:worker_threads';
global {
var process: NodeJS.Process;
namespace NodeJS {
// this namespace merge is here because these are specifically used
// as the type for process.stdin, pro... | PypiClean |
/FishFishJump-0.2.3.tar.gz/FishFishJump-0.2.3/fish_dashboard/static/js/elasticsearch/cluster_stats.js | function handle_nodes_basic(data) {
$("#nodes_basic_li_failed").children("span").text(data.failed);
$("#nodes_basic_li_successful").children("span").text(data.successful);
$("#nodes_basic_li_total").children("span").text(data.total);
}
function handle_nodes_count(data) {
$("#nodes_count_li_coordinating... | PypiClean |
/InvokeAI-3.1.0-py3-none-any.whl/invokeai/app/cli/completer.py | import atexit
import readline
import shlex
from pathlib import Path
from typing import List, Dict, Literal, get_args, get_type_hints, get_origin
import invokeai.backend.util.logging as logger
from ...backend import ModelManager
from ..invocations.baseinvocation import BaseInvocation
from .commands import BaseCommand
... | PypiClean |
/Joule-0.9.41.tar.gz/Joule-0.9.41/joule/controllers/module_controller.py | from aiohttp import web
from joule.models.supervisor import Supervisor
async def index(request):
supervisor: Supervisor = request.app["supervisor"]
resp = []
if 'statistics' in request.query and request.query['statistics'] != '0':
get_stats = True
else:
get_stats = False
for work... | PypiClean |
/EARL-pytorch-0.5.1.tar.gz/EARL-pytorch-0.5.1/rlgym/communication/communication_handler.py | from rlgym.communication import Message
from rlgym.communication import communication_exception_handler
import win32file
import win32pipe
import struct
from multiprocessing.pool import ThreadPool
class CommunicationHandler(object):
RLGYM_GLOBAL_PIPE_ID = "RLGYM_GLOBAL_COMM_PIPE"
RLGYM_GLOBAL_PIPE_NAME = r"\\... | PypiClean |
/AIKIF-0.2.2.tar.gz/AIKIF-0.2.2/aikif/toolbox/solve_knapsack.py | from collections import namedtuple
Item = namedtuple("Item", ['index', 'value', 'weight', 'density'])
def describe_problem(capacity, items):
print('\nAIKIF Knapsack Solver - 9/3/2014')
print('This attempts to maximise the number of items that can fit into a Knapsack')
print('------------------------------... | PypiClean |
/DFYS_autodiff-1.0.3.tar.gz/DFYS_autodiff-1.0.3/autodiff/backprop.py | import autodiff.forward as fwd
def forward_pass(y,val_dict):
"""
The function evaluating each variable/constant and storing their values
in .val attributes, using atomic variable values from val_dict, in a
recursive fashion, starting from root node in the computational graph
INPUTS:
... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/full/lang/fr-ca.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/license
*/
CKEDITOR.lang['fr-ca']={"editor":"Éditeur de texte enrichi","editorPanel":"Rich Text Editor panel","common":{"editorHelp":"Appuyez sur 0 pour de l'aide","browseServer":"Parcou... | PypiClean |
/src/main/python/Views/dataOverviewManager.py | import sys
sys.path.append('..')
import matplotlib.pyplot as plt
try:
from DMCGui.src.main.python._tools import ProgressBarDecoratorArguments
import DMCGui.src.main.python._tools as _GUItools
from DMCGui.src.main.python.GuiStates import States,highlightStyle,normalStyle
except ImportError:
from _tool... | PypiClean |
/ConfTools-z6-6.0.2.tar.gz/ConfTools-z6-6.0.2/src/conf_tools/code_specs.py | import traceback
from .exceptions import BadConfig, ConfToolsException
from .instantiate_utils import instantiate
from .utils import indent
__all__ = [
"check_valid_code_spec",
"instantiate_spec",
"format_code_spec",
"format_yaml",
]
def check_valid_code_spec(x):
if not isinstance(x, list):
... | PypiClean |
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/builders/losses_builder.py | import functools
from object_detection.core import balanced_positive_negative_sampler as sampler
from object_detection.core import losses
from object_detection.protos import losses_pb2
from object_detection.utils import ops
def build(loss_config):
"""Build losses based on the config.
Builds classification, local... | PypiClean |
/FLUID_project_upprpo-1.1.1.tar.gz/FLUID_project_upprpo-1.1.1/fluid_simulation/Simulation/FluidCube.py | import numpy as np
from .Calculations import diffuse, advect, project
from ..Properties import *
class FluidCube:
def __init__(self, dt, diffusion, viscosity, NN = N):
"""
Инициализирует объект FluidCube.
Аргументы:
dt: Шаг времени.
diffusion: Коэффициент диффузии... | PypiClean |
/Bluebook-0.0.1.tar.gz/Bluebook-0.0.1/pylot/component/static/pylot/vendor/mdeditor/bower_components/codemirror/mode/gfm/gfm.js | CodeMirror.defineMode("gfm", function(config) {
var codeDepth = 0;
function blankLine(state) {
state.code = false;
return null;
}
var gfmOverlay = {
startState: function() {
return {
code: false,
codeBlock: false,
ateSpace: false
};
},
copyState: function(... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.