id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/Flask-SeaSurf-1.1.1.tar.gz/Flask-SeaSurf-1.1.1/flask_seasurf.py | from __future__ import absolute_import
__version_info__ = ('1', '1', '1')
__version__ = '.'.join(__version_info__)
__author__ = 'Max Countryman'
__license__ = 'BSD'
__copyright__ = '(c) 2011 by Max Countryman'
__all__ = ['SeaSurf']
import calendar
import hashlib
import random
from datetime import datetime, timedelta... | PypiClean |
/NativDebugging-35.tar.gz/NativDebugging-35/src/Win32/DifferentialSearch.py |
from struct import unpack
from copy import deepcopy
from ..Interfaces import ReadError
from .MemoryMap import *
def newDifferentialSearch(reader):
memMap = MemoryMap(reader.getMemoryMap(), reader, atomSize=reader.getDefaultDataSize())
return DifferentialSearch(memMap, reader)
class DifferentialSearch( object... | PypiClean |
/MolPainter-gpantel-1.1.3.tar.gz/MolPainter-gpantel-1.1.3/README.md | # MolPainter
## Table of Contents
- [Introducing MolPainter and MolSolvator](#introducing-molpainter-and-molsolvator)
- [Installation](#installation)
- [Dependencies](#dependencies)
- [Test Dependencies](#test-dependencies)
- [Documentation](#documentation)
- [Tutorial](#tutorial)
- [What's new in 1.1?](#whats-new-in-... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/moment/locale/gom-deva.js |
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
... | PypiClean |
/Kr0nOs_Bot-3.3.11-py3-none-any.whl/redbot/cogs/downloader/repo_manager.py | from __future__ import annotations
import asyncio
import functools
import os
import pkgutil
import shlex
import shutil
import re
import yarl
from concurrent.futures import ThreadPoolExecutor
from pathlib import Path
from subprocess import run as sp_run, PIPE, CompletedProcess
from string import Formatter
from sys impo... | PypiClean |
/NeuroDynamics-0.1.1.tar.gz/NeuroDynamics-0.1.1/brainpy/dynamics/analyst.py |
import inspect
from copy import deepcopy
from .. import numpy as np
from .. import profile
from ..core_system.types import NeuState
from ..tools import DictPlus
class DynamicsAnalyst(object):
def __init__(self, model):
self.model = model
def simulate(self, duration, monitors, vars_init=None, pars_u... | PypiClean |
/FEV_KEGG-1.1.4.tar.gz/FEV_KEGG-1.1.4/FEV_KEGG/Experiments/41.py | from FEV_KEGG.Drawing import Export
from FEV_KEGG.KEGG.File import cache
from FEV_KEGG.Evolution.Clade import CladePair, Clade
from FEV_KEGG.Graph.Elements import EcNumber
@cache(folder_path='experiments/41', file_name='bacteria_clade')
def getBacteriaClade():
bacteriaClade = Clade('/Bacteria')
# pre-fetch col... | PypiClean |
/GoDaddyPy-2.3.4.tar.gz/GoDaddyPy-2.3.4/godaddypy/client.py | from __future__ import unicode_literals
import logging
import sys
from enum import Enum
import requests
try:
# python3.x
from urllib.parse import urljoin
except ImportError:
# python2.x
# noinspection PyUnresolvedReferences
from urlparse import urljoin
__all__ = ['Client', 'BadResponse']
GODADD... | PypiClean |
/NlvWxPython-4.2.0-cp37-cp37m-win_amd64.whl/wx/lib/agw/fmresources.py | import wx
# Overall menu styles
StyleDefault = 0
StyleXP = 1
Style2007 = 2
StyleVista = 3
# Menu shadows
RightShadow = 1 # Right side shadow
BottomShadow = 2 # Not full bottom shadow
BottomShadowFull = 4 # Full bottom shadow
# Button styles
BU_EXT_XP_STYLE = 1
BU_EXT_2007_STYL... | PypiClean |
/Bloxflip.py-2.2.24.tar.gz/Bloxflip.py-2.2.24/bloxflip/currency.py | import cloudscraper
from .utils.errors import errors
scraper = cloudscraper.create_scraper()
class Currency:
def __init__(self) -> None:
pass
@staticmethod
def balance(auth: str) -> int:
"""Get user's balance from their auth token"""
request = scraper.get("https://api.bloxflip.c... | PypiClean |
/Hooke-1.0.0.alpha%20(Ninken).tar.gz/Hooke-1.0.0.alpha (Ninken)/hooke/plugin/multifit.py | from ..command import Command, Argument, Failure
from ..playlist import FilePlaylist
from . import Plugin
from .playlist import PlaylistArgument
class MultifitPlugin (Plugin):
def __init__(self):
super(MultifitPlugin, self).__init__(name='multifit')
self._commands = [MultifitCommand(self)]
class... | PypiClean |
/Axelrod-4.13.0.tar.gz/Axelrod-4.13.0/docs/how-to/classify_strategies.rst | .. _classification-of-strategies:
Classification of strategies
============================
Due to the large number of strategies, every class and instance of the class has
a :code:`classifier` attribute which classifies that strategy according to
various dimensions.
Here is the :code:`classifier` for the :code:`Coo... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/moment/locale/sl.js |
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
... | PypiClean |
/Lokai-0.3.tar.gz/Lokai-0.3/lokai/lk_job_manager/notification.py |
#-----------------------------------------------------------------------
import sys
import logging
import lokai.tool_box.tb_common.notification as notify
#-----------------------------------------------------------------------
""" Set up notifiers that hold certain common information in a
structured way that ca... | PypiClean |
/BullETS-0.1.1.tar.gz/BullETS-0.1.1/src/bullets/data_source/data_source_interface.py | import ssl
from datetime import datetime
from abc import abstractmethod
import aiohttp
import asyncio
from enum import Enum
class Resolution(Enum):
DAILY = "1day"
HOURLY = "1hour"
MINUTE = "1min"
class DataSourceInterface:
def __init__(self):
self.resolution = None
self.timestamp = N... | PypiClean |
/CAMSyFReT-1.1.1.tar.gz/CAMSyFReT-1.1.1/Final_Project/recognize_video1.py | from imutils.video import VideoStream, FPS
import numpy as np
import argparse
import imutils
import pickle
import cv2
import os
import time
from datetime import datetime
import pandas as pd
from os import path
classNames = ["unknown"]
names_and_time = []
all_names = []
directory = path.dirname(__file__)
from dateutil.... | PypiClean |
/AutoDiff_jnrw-0.0.2-py3-none-any.whl/autodiff/forward/sym.py | from typing import Callable, List, Union
import numpy as np
NumberTypes = (int, float, complex)
def symbol(expr: str) -> Union['Symbol', List['Symbol']]:
"""Produce a symbol or tuple of symbols parsed from the provided string.
Tuples are inferred through spaces in the string. Variable names should
be deli... | PypiClean |
/NMRPyStar-1.0.0.tar.gz/NMRPyStar-1.0.0/nmrpystar/parser.py | from nmrpystar.scanner import tokenizer
from nmrpystar.cleantokens import clean_token
from nmrpystar.hierarchical import nmrstar
from nmrpystar.starast import concreteToAST
from nmrpystar.nmrstarast import build_nmrstar_ast
from nmrpystar.unparse.combinators import run
from nmrpystar.unparse.maybeerror import MaybeErro... | PypiClean |
/Djblets-3.3.tar.gz/Djblets-3.3/djblets/webapi/auth/backends/basic.py |
from __future__ import annotations
import base64
import logging
from typing import List
from django.http import HttpRequest
from djblets.webapi.auth.backends.base import (WebAPIAuthBackend,
WebAPIGetCredentialsResult)
logger = logging.getLogger(__name__)
class WebA... | PypiClean |
/FHIRkit-0.1.2.tar.gz/FHIRkit-0.1.2/fhirkit/Patient.py | try:
from typing import Literal
except ImportError:
from typing_extensions import Literal # type: ignore
from pydantic import Field, validator
from typing import Optional, Sequence, Union, List
from fhirkit.choice_type import deterimine_choice_type, ChoiceType
from fhirkit.primitive_datatypes import dateTime, ... | PypiClean |
/headlinehunt-0.1.11.tar.gz/headlinehunt-0.1.11/README.md |
<table style="border: 1px solid transparent">
<tr>
<td>
<a href="http://talky.readthedocs.io"><img src="https://img.shields.io/badge/Wiki-%23000000.svg?style=for-the-badge&logo=wikipedia&logoColor=white"></a>
<a href="https://github.com/mraniki/tt/"><img src="https://img.shields.io/badge/github-%23000000.svg?sty... | PypiClean |
/LowVoltage-0.7.3.tar.gz/LowVoltage-0.7.3/README.rst | LowVoltage is a standalone Python (2.7+ and 3.4+) client for `DynamoDB <http://aws.amazon.com/documentation/dynamodb/>`__
that doesn't hide any feature of `the API <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html>`__.
It's licensed under the `MIT license <http://choosealicense.com/licenses/m... | PypiClean |
/Jalapeno-0.1.4.tar.gz/Jalapeno-0.1.4/Jalapeno_data/Sites/first/Pages/blog/15.md | title: 使用Echosim语音控制2048
date: 2016-11-06
tag: Flask
[TOC]
<!--Sidebar-->
前一阵子去hackathon和队友体验了一把Amazon Echo特别爽。这个小玩意扩展能力很好,你可以通过它直接和你的电脑进行交互。这次我们使用python的Flask来通过Echosim操作2048,完成各个方向的滑动。

让我们开始吧!
<!--More-->
##工具准备
- Flask
- Flask-Ask
- EchoSim
- ngrok
- Python3
- [Python 2048](https:/... | PypiClean |
/Flask_AppBuilder-4.3.6-py3-none-any.whl/flask_appbuilder/static/appbuilder/datepicker/bootstrap-datepicker.js | (function(e){function c(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function h(e,t,n){if(t<e.length)return e;else return Array(t-e.length+1).join(n||" ")+e}function p(e,t,n,r,i,s,o,u){if(r&&i){return'<div class="bootstrap-datetimepicker-widget dropdown-menu" style="z-index:9999 !important;">'+'<ul... | PypiClean |
/FoilMesh-0.0.8.tar.gz/FoilMesh-0.0.8/foilmesh/trailingedge.py | import copy
import numpy as np
import typing
# from PySide6 import QtGui, QtCore
from foilmesh.utils import Utils
import foilmesh.contourAnalysis as ca
if typing.TYPE_CHECKING:
from foilmesh.airfoil import Airfoil
class TrailingEdge:
def __init__(self,af:'Airfoil'):
self.af=af
# get MainW... | PypiClean |
/Django_patch-2.2.19-py3-none-any.whl/django/contrib/auth/migrations/0011_update_proxy_permissions.py | import sys
from django.core.management.color import color_style
from django.db import migrations, transaction
from django.db.models import Q
from django.db.utils import IntegrityError
WARNING = """
A problem arose migrating proxy model permissions for {old} to {new}.
Permission(s) for {new} already existed... | PypiClean |
/OASYS1-PaNOSC-0.3.2.tar.gz/OASYS1-PaNOSC-0.3.2/orangecontrib/panosc/shadow/widgets/extension/ow_remote_beamline_open.py | import os, numpy
from PyQt5.QtGui import QPalette, QColor
from PyQt5 import QtGui, QtWidgets
from PyQt5.QtWidgets import QFileDialog, QMessageBox
from orangewidget import gui,widget
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui, congruence
from oasys.widgets import widget as oasys... | PypiClean |
/CGlue-0.2.4.tar.gz/CGlue-0.2.4/cglue/plugins/BuiltinDataTypes.py | import chevron
from cglue.function import FunctionImplementation
from cglue.utils.common import chevron_list_mark_last, dict_to_chevron_list, indent, rpad, split
from cglue.ports import PortType
from cglue.data_types import TypeCollection, TypeCategory
from cglue.cglue import Plugin, CGlue
from cglue.runtime_generator... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/social/templatetags/social_tags.py |
import json
import logging
from django import template
from django.utils.translation import ugettext_lazy as _
register = template.Library()
logger = logging.getLogger(__name__)
def get_data(action, key, default=None):
"""
Checks for a key in the action's JSON data field. Returns default if the key does not... | PypiClean |
/NeuroTS-3.4.0-py3-none-any.whl/neurots/morphmath/sample.py |
# Copyright (C) 2021 Blue Brain Project, EPFL
#
# 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 di... | PypiClean |
/NUMTdumper-0.1b2-py3-none-any.whl/numtdumper/core.py | # Imports
import os
import sys
import shutil
import re
import functools
import gzip
import numpy
import itertools
from Bio.SeqIO.FastaIO import SimpleFastaParser
from collections import defaultdict
from numtdumper import filterlength
from numtdumper import filtertranslate
from numtdumper import filterreference
def ... | PypiClean |
/CROPS-0.1.1-py3-none-any.whl/crops/command_line/crops-cropstr.py | from crops.about import __prog__, __description__, __author__, __date__, __version__
import argparse
import os
from crops.io import check_path
from crops.io import outpathgen
from crops.io import parsers as cin
from crops.io import taggers as ctg
from crops.core import ops as cop
from crops import command_line as ccl... | PypiClean |
/Hooke-1.0.0.alpha%20(Ninken).tar.gz/Hooke-1.0.0.alpha (Ninken)/hooke/ui/gui/panel/commands.py | import types
import wx
from ....util.callback import callback, in_callback
from . import Panel
class Tree (wx.TreeCtrl):
"""The main widget of :class:`CommandsPanel`.
`callbacks` is shared with the parent :class:`Commands`.
"""
def __init__(self, commands, selected, callbacks, *args, **kwargs):
... | PypiClean |
/KIF-0.3.2.tar.gz/KIF-0.3.2/key_interactions_finder/contact_identification_old.py | from typing import Tuple, Optional, List
import warnings
import pandas as pd
import numpy as np
import MDAnalysis
from MDAnalysis import Universe
from MDAnalysis.analysis.hydrogenbonds.hbond_analysis import HydrogenBondAnalysis as HBA
from MDAnalysis.analysis import contacts
# Amino acid definitions - helps define ... | PypiClean |
/KiwiCoder-0.3.tar.gz/KiwiCoder-0.3/README.md | # KiwiCoder
A biology framework for biological experiments.
## Quick Start
KiwiCoder can be installed using pip
```
pip install KiwiCoder
```
You can generate your first project.
```
kiwi-gen {your path}
```
The project hierarchy is shown as below.
```
├── keee-weee
│ ├── report
│ ├── formal.html
│ ... | PypiClean |
/ImSwitchUC2-2.1.0.tar.gz/ImSwitchUC2-2.1.0/imswitch/imcontrol/view/widgets/PixelCalibrationWidget.py | import numpy as np
import pyqtgraph as pg
import cv2
import copy
from qtpy import QtCore, QtWidgets, QtGui, QtWidgets
from PyQt5.QtGui import QPixmap, QImage
import sys
from PyQt5.QtWidgets import (QApplication, QLabel, QWidget)
from PyQt5.QtGui import QPainter, QColor, QPen
from PyQt5.QtCore import Qt
from qtpy impo... | PypiClean |
/NlvWxPython-4.2.0-cp37-cp37m-win_amd64.whl/wx/lib/analogclock/helpers.py |
from time import strftime, localtime
import math
import wx
from .styles import *
#----------------------------------------------------------------------
_targets = [HOUR, MINUTE, SECOND]
#----------------------------------------------------------------------
class Element:
"""Base class for face, hands and ti... | PypiClean |
/LuaAutoDoc-0.9.1-py3-none-any.whl/lua_auto_doc/Scripts/SourceCodeFolderMap.js | function saveOpenFolders() {
// Get all the open folders
let openFolders = document.querySelectorAll(".source-code-open-folder");
// Create an array to store the names of the open folders
let openFolderNames = [];
// Loop through all the open folders and add their names to the array
for (let i =... | PypiClean |
/MISP_maltego-1.4.7.tar.gz/MISP_maltego-1.4.7/src/MISP_maltego/transforms/common/util.py | from canari.maltego.entities import Hash, URL, File, Person, Hashtag
from canari.maltego.message import Label, LinkStyle, MaltegoException, Bookmark, LinkDirection, UIMessage, UIMessageType
from canari.mode import is_local_exec_mode, is_remote_exec_mode
from distutils.version import StrictVersion
from MISP_maltego.tran... | PypiClean |
/Nuitka_winsvc-1.7.10-cp310-cp310-win_amd64.whl/nuitka/nodes/GlobalsLocalsNodes.py | from .DictionaryNodes import makeExpressionMakeDict
from .ExpressionBases import (
ExpressionBase,
ExpressionBuiltinSingleArgBase,
ExpressionNoSideEffectsMixin,
)
from .KeyValuePairNodes import makeKeyValuePairExpressionsFromKwArgs
from .VariableRefNodes import ExpressionTempVariableRef, ExpressionVariableR... | PypiClean |
/HDDM-0.9.9.tar.gz/HDDM-0.9.9/hddm/models/hddm_stimcoding.py | from copy import copy
import numpy as np
from kabuki.hierarchical import Knode
from hddm.models import HDDM
class HDDMStimCoding(HDDM):
"""HDDM model that can be used when stimulus coding and estimation
of bias (i.e. displacement of starting point z) is required.
In that case, the 'resp' column in your ... | PypiClean |
/GraphLab_Create-2.1-cp27-none-macosx_10_5_x86_64.macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.macosx_10_11_intel.macosx_10_11_x86_64.whl/graphlab/distributed/toolkits/classifier/logistic_classifier.py | from ... import _supervised_learning as _sl
import graphlab.connect as _mt
_DEFAULT_SOLVER_OPTIONS = {
'convergence_threshold': 1e-2,
'step_size': 1.0,
'lbfgs_memory_level': 11,
'max_iterations': 10}
def submit_training_job(env, dataset, target, features=None,
l2_penalty=0.01, l1_penalty=0.0,
solver='auto', f... | PypiClean |
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/inginious/frontend/static/js/codemirror/mode/mumps/mumps.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 ... | PypiClean |
/NCloudAISDK-1.0.1.tar.gz/NCloudAISDK-1.0.1/aicloud/rest.py |
import requests
from aicloud.cloudexception import CommonError
class Object(dict):
def __init__(self, init_dict=None, deep=False):
super(Object, self).__init__()
if isinstance(init_dict, dict):
for k, v in init_dict.items():
if deep:
if isinstance... | PypiClean |
/Flask_CacheControl-0.3.0-py3-none-any.whl/flask_cachecontrol/decorate.py | from datetime import timedelta
from functools import wraps
import flask
from .callback import SetCacheControlHeadersCallback, SetVaryHeaderCallback
from .callback import SetCacheControlHeadersFromTimedeltaCallback, SetCacheControlHeadersForNoCachingCallback
from .evaluator import ResponseIsSuccessful
def cache_for(... | PypiClean |
/MuPhyN-0.1.1.post4-py3-none-any.whl/muphyn/packages/interface/graphical_actions/new_box_dialog_remove_action.py |
from typing import List, Any
from PyQt6.QtWidgets import QTableWidget, QTableWidgetItem, QComboBox
from muphyn.packages.interface.graphical_actions.abstract_graphical_action import AbstractGraphicalAction
from muphyn.packages.core.application import DataType
#-----------------------------------
# Class
#-----------... | PypiClean |
/CANberry-0.4.tar.gz/CANberry-0.4/canberry/bower_components/jquery/src/ajax/jsonp.js | define([
"../core",
"./var/nonce",
"./var/rquery",
"../ajax"
], function( jQuery, nonce, rquery ) {
var oldCallbacks = [],
rjsonp = /(=)\?(?=&|$)|\?\?/;
// Default jsonp settings
jQuery.ajaxSetup({
jsonp: "callback",
jsonpCallback: function() {
var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ... | PypiClean |
/Cemotion-2.0.4-py3-none-any.whl/cemotion/app.py | import os
import numpy as np
import torch
from transformers import BertTokenizer, BertForSequenceClassification, logging
from cemotion.download import download_from_url
logging.set_verbosity_error()
tokenizer = BertTokenizer.from_pretrained('bert-base-chinese')
# 检测所需文件是否存在,不存在则下载
def check_env(url):
if not os... | PypiClean |
/BackupPC-Clone-1.0.1.tar.gz/BackupPC-Clone-1.0.1/backuppc_clone/command/BaseCommand.py | import abc
import configparser
import os
from cleo import Command
from backuppc_clone.Config import Config
from backuppc_clone.DataLayer import DataLayer
from backuppc_clone.exception.BackupPcCloneException import BackupPcCloneException
from backuppc_clone.style.BackupPcCloneStyle import BackupPcCloneStyle
class Ba... | PypiClean |
/Ctrax-0.5.8.linux-x86_64.tar.gz/usr/local/lib/python2.7/dist-packages/psutil/_common.py | from __future__ import division
import contextlib
import errno
import functools
import os
import socket
import stat
import sys
import warnings
from collections import namedtuple
from socket import AF_INET
from socket import SOCK_DGRAM
from socket import SOCK_STREAM
try:
from socket import AF_INET6
except ImportErr... | PypiClean |
/MolScribe-1.1.1.tar.gz/MolScribe-1.1.1/molscribe/indigo/__init__.py |
import os
import platform
import sys
import warnings
from array import array
from ctypes import (CDLL, POINTER, RTLD_GLOBAL, c_byte, c_char_p, c_double,
c_float, c_int, c_ulonglong, pointer)
DECODE_ENCODING = "utf-8"
ENCODE_ENCODING = "utf-8"
class IndigoException(Exception):
def __init__(se... | PypiClean |
/KivyAuth-2.3.3-py3-none-any.whl/kivyauth/android/google_auth.py | from android.activity import bind as result_bind
from jnius import autoclass
from kivy.clock import mainthread
from kivy.logger import Logger
Gso = autoclass("com.google.android.gms.auth.api.signin.GoogleSignInOptions")
GsoBuilder = autoclass(
"com.google.android.gms.auth.api.signin.GoogleSignInOptions$Builder"
)
... | PypiClean |
/EBomb-2.1.6.tar.gz/EBomb-2.1.6/README.md | # EBomb - Email(s) bomber
> pip install -U [EBomb](https://pypi.org/project/EBomb/)
# CLI
> python -m Ebomb -h
```python
# EBomb/__init__.py
class EBomb:
def __init__(self,
targets: list[str],
threads_count: int = None,
proxy: bool = True,
fore... | PypiClean |
/AChemKit-0.3.0.tar.gz/AChemKit-0.3.0/doc/html/_static/sidebar.js | $(function() {
// global elements used by the functions.
// the 'sidebarbutton' element is defined as global after its
// creation, in the add_sidebar_button function
var bodywrapper = $('.bodywrapper');
var sidebar = $('.sphinxsidebar');
var sidebarwrapper = $('.sphinxsidebarwrapper');
// original margi... | PypiClean |
/Finance-Jindowin-1.3.3.tar.gz/Finance-Jindowin-1.3.3/jdw/mfc/entropy/gravity/mixture/models.py | import copy, hashlib, json, pdb, itertools
import pandas as pd
from ultron.tradingday import *
from ultron.sentry.Analysis.SecurityValueHolders import SecurityValueHolder
from ultron.optimize.model.treemodel import StackingRegressor
from ultron.optimize.model.modelbase import load_module
from ultron.factor.utilities im... | PypiClean |
/Glashammer-0.2.1.tar.gz/Glashammer-0.2.1/glashammer/utils/crypto.py | import sha, string
from random import choice
SALT_CHARS = string.ascii_lowercase + string.digits
def gen_pwhash(password):
"""Return a the password encrypted in sha format with a random salt."""
if isinstance(password, unicode):
password = password.encode('utf-8')
salt = gen_salt(6)
h = sha.ne... | PypiClean |
/GA_Common-0.1-py3-none-any.whl/ga/ga.py | from typing import Union, List
from ga.exception import IterStop
from ga.lib import Iterable
from ga.population import Population
from ga.plugins import CodecPlugin, CmPlugin, \
IterPlugin, GeneratePlugin
from ga.selector import Selector
class GA(Iterable):
population: Union[None, Population] = None
def... | PypiClean |
/LEPL-5.1.3.zip/LEPL-5.1.3/src/lepl/stream/_test/simple.py |
from lepl.support.lib import fmt
from lepl._test.base import BaseTest
from lepl.stream.core import s_empty, s_fmt, s_line, s_next, s_stream
from lepl.stream.factory import DEFAULT_STREAM_FACTORY
class GenericTest(BaseTest):
def test_empty(self):
f = DEFAULT_STREAM_FACTORY
for (constructor, ... | PypiClean |
/MAA_PyQT5_messenger_client_app-0.0.1-py3-none-any.whl/client/client/net_client.py | import argparse
import binascii
import hashlib
import hmac
import socket
import sys
import logging
import json
import threading
import time
from PyQt5.QtCore import pyqtSignal, QObject
sys.path.append('../')
from common.variables import PUBLIC_KEY
from common.errors import ReqFieldMissingError
from client.client_base... | PypiClean |
/Generator_Random-0.0.2-py3-none-any.whl/generator/__init__.py | MODULE_NAME_BANNER = """ █████████ █████
███░░░░░███ ░░███
███ ░░░ ██████ ████████ ██████ ████████ ██████ ███████ ██████ ████████
░███ ██... | PypiClean |
/Box2D-2.3.2.tar.gz/Box2D-2.3.2/examples/pgu/gui/document.py | import pygame
from . import container
from . import layout
class _document_widget:
def __init__(self,w,align=None):
#w.rect.w,w.rect.h = w.resize()
#self.rect = w.rect
self.widget = w
if align != None: self.align = align
class Document(container.Container):
"""A document is a ... | PypiClean |
/HybridUI-0.0.1.tar.gz/HybridUI-0.0.1/hybrid/client.py | import uuid
from page import Page
import time
from typing import Dict, Optional, Any
from . import globals
from pathlib import Path
import asyncio
import time
import uuid
from pathlib import Path
from typing import TYPE_CHECKING, Any, Awaitable, Callable, Dict, List, Optional, Union,Literal
from fastapi import Request
... | PypiClean |
/Gbtestapi0.3-0.1a10-py3-none-any.whl/gailbot/services/organizer/settings/objects/engineObject.py | from typing import Dict, List, Union, TypedDict
from ..interface import (
load_watson_setting,
load_whisper_setting,
load_google_setting,
EngineSettingInterface,
PluginSettingsInterface,
)
from gailbot.core.utils.logger import makelogger
from gailbot.core.utils.general import write_toml
from gailbo... | PypiClean |
/CUQIpy-0.4.0-py3-none-any.whl/cuqi/distribution/_cauchy.py | import numpy as np
import scipy.stats as sps
from cuqi.geometry import _get_identity_geometries
from cuqi.utilities import force_ndarray
from cuqi.distribution import Distribution
class Cauchy(Distribution):
""" Multivariate Cauchy distribution of independent random variables.
Each is distributed accordi... | PypiClean |
/ADB_Easy_Control-1.0.1-py3-none-any.whl/ADB_Easy_Control/screen_and_file.py | import os
import datetime
from ADB_Easy_Control import device_assistant
def screen_capture() -> str:
now_time = datetime.datetime.now().strftime("%Y-%m-%d-%H:%M:%S")
os.system("adb" + device_assistant.multi_devices_helper() + " shell screencap -p /sdcard/screencap.png")
if not os.path.exists(format(os.get... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/metacalls_session.py | import asyncio
import re
import sys
from aiohttp import ClientConnectionError
from aiohttp import ClientResponse
from aiohttp import ClientSession
from .__version__ import __version__
from .version_manager import VersionManager
class MetaCallsSession:
notice_displayed = False
async def start(self):
... | PypiClean |
/DeltacodeProject-0.7.31.1.tar.gz/DeltacodeProject-0.7.31.1/README.md | 
# DELTACODE PROJECT
Bienvenue sur mon projet !
## Sommaire
### [Intallation](#installation)
----
### [Encodages](#encodages)
[Le code cesar](#cesar),
[La rotation](#rotation),
[Le DayEncoding](#dayencoding)
----
### [Le menu](#menu)
--... | PypiClean |
/Aliyun-0.1.1.tar.gz/Aliyun-0.1.1/ez_setup.py | import sys
DEFAULT_VERSION = "0.6c11"
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': '565775... | PypiClean |
/Lobster-3dEngine-0.0.1.tar.gz/Lobster-3dEngine-0.0.1/README.md | This first ever python library that can function as a simple 3D engine for the usage of displaying and rotating of Objects. This library allows for you to use any library in addition to this one and display whatever object any way that you want. The purpose of this library is allow the user to quickly and efficiently d... | PypiClean |
/Brian2-2.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/brian2/hears.py | try:
import brian as b1
import brian.hears as b1h
except ImportError:
raise ImportError(
"brian2.hears is deprecated and will be removed in a future release, please use"
" the brian2hears package available at https://brian2hears.readthedocs.io/. If"
" you really want to keep using it... | PypiClean |
/MlTrackTool-0.0.19.tar.gz/MlTrackTool-0.0.19/ml_track_tool/summary_plots.py |
# In[1]:
import plotly
import plotly.express as px
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import os
import json
import pandas as pd
import numpy as np
from sklearn.metrics import roc_auc_score,accuracy_score,f1_score,precision_score,recall_score
import glob
# In[2]:
def get_e... | PypiClean |
/NREL_reV-0.8.1-py3-none-any.whl/reV/supply_curve/supply_curve.py | from copy import deepcopy
import json
import logging
import numpy as np
import os
import pandas as pd
from warnings import warn
from reV.handlers.transmission import TransmissionCosts as TC
from reV.handlers.transmission import TransmissionFeatures as TF
from reV.supply_curve.competitive_wind_farms import CompetitiveW... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/bower_components/paper-checkbox/.github/ISSUE_TEMPLATE.md | <!-- Instructions: https://github.com/PolymerElements/paper-checkbox/CONTRIBUTING.md#filing-issues -->
### Description
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
### Expected outcome
<!-- Example: The page stays the same color. -->
### Actual outcome
<!-- Example: The page ... | PypiClean |
/Krakatau-noff-v0.20181212.tar.gz/Krakatau-noff-v0.20181212/Krakatau/bytecode.py | from __future__ import division
from . import opnames
def parseInstructions(bytestream, isConstructor):
data = bytestream
assert data.off == 0
instructions = {}
while data.size() > 0:
address = data.off
inst = getNextInstruction(data, address)
# replace constructor invocation... | PypiClean |
/Distibutions-1.0.tar.gz/Distibutions-1.0/distributions/Binomialdistribution.py | import math
import matplotlib.pyplot as plt
from .Generaldistribution import Distribution
class Binomial(Distribution):
""" Binomial distribution class for calculating and
visualizing a Binomial distribution.
Attributes:
mean (float) representing the mean value of the distribution
std... | 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_read.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 |
/BootstrapPy-0.6.tar.gz/BootstrapPy-0.6/bootstrappy/templates/+package+/static/js/i18n/grid.locale-dk.js | ;(function($){
/**
* jqGrid Danish Translation
* Kaare Rasmussen kjs@jasonic.dk
* http://jasonic.dk/blog
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
**/
$.jgrid = {
defaults : {
recordtext: "View {0} - {1} of {2}",... | PypiClean |
/MT_diagrams-0.2.0-py3-none-any.whl/src/plantumlv2/pu_manager.py | import sys
from src.core.bt_graph import BTGraph
from src.plantumlv2.pu_entities import (
PACKAGE_NAME_SPLITTER,
EntityState,
PuPackage,
)
from src.plantumlv2.utils import get_pu_package_path_from_bt_package
import os
def render_pu(graph: BTGraph, config: dict):
views = _create_pu_graph(graph, config)... | PypiClean |
/Gemtools-1.7.1.tar.gz/Gemtools-1.7.1/python/gem/filter.py | """Default filters for to filter reads and mappings"""
from __future__ import print_function
import gem
import gem.gemtools as gt
import gem.files as gf
import sys
import subprocess
def create_output_stream(output, compress=False, threads=1):
"""Create a writable output stream based on the given output.
If t... | PypiClean |
/AMLT-learn-0.2.9.tar.gz/AMLT-learn-0.2.9/amltlearn/cluster/KernelKMeans.py |
import numpy as np
from sklearn.base import BaseEstimator, ClusterMixin
from sklearn.metrics.pairwise import pairwise_kernels
from sklearn.utils import check_random_state
class KernelKMeans(BaseEstimator, ClusterMixin):
"""
Kernel K-means
Reference
---------
Kernel k-means, Spectral Clustering ... | PypiClean |
/MASSA_Algorithm-0.9.1-py3-none-any.whl/MASSA_Algorithm/MASSAmoloutput.py | from rdkit.Chem import AllChem
def output_mols(dataframe, FileOutput): # Add, for each molecule, the values of the calculated properties, the identifications of each cluster and which set the molecule belongs to.
# Creation of dictionaries with the name of the molecule:
dict_molecules = dict(dataframe['molecules']) ... | PypiClean |
/OASYS1-SRW-1.1.106.tar.gz/OASYS1-SRW-1.1.106/orangecontrib/srw/widgets/light_sources/ow_srw_3d_light_source.py | import sys
from PyQt5.QtWidgets import QApplication
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui
from oasys.widgets import congruence
from wofrysrw.storage_ring.light_sources.srw_3d_light_source import SRW3DLightSource
from wofrysrw.storage_ring.magn... | PypiClean |
/HIRISEimgs-1.0.0.tar.gz/HIRISEimgs-1.0.0/docs/html/_static/_sphinx_javascript_frameworks_compat.js | * select a different prefix for underscore
*/
$u = _.noConflict();
/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
... | PypiClean |
/Hocrox-0.3.0.tar.gz/Hocrox-0.3.0/hocrox/layer/preprocessing/blur/bilateral.py | import cv2
from hocrox.utils import Layer
class BilateralBlur(Layer):
"""BilateralBlur layer blur (image smoothing) an image using an bilateral filter.
Here is an example code to use the BilateralBlur layer in a model.
```python
from hocrox.model import Model
from hocrox.layer.preprocessing.blu... | PypiClean |
/Euphorie-15.0.2.tar.gz/Euphorie-15.0.2/src/euphorie/client/resources/oira/script/chunks/67134.48dc9d08239fab55d373.min.js | "use strict";(self.webpackChunk_patternslib_patternslib=self.webpackChunk_patternslib_patternslib||[]).push([[67134],{71952:function(n,e,t){var o=t(87537),s=t.n(o),r=t(23645),l=t.n(r)()(s());l.push([n.id,".hljs{display:block;overflow-x:auto;padding:.5em;color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#... | PypiClean |
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/eth.py | from eth_account import (
Account,
)
from eth_utils import (
apply_to_return_value,
is_checksum_address,
is_string,
)
from hexbytes import (
HexBytes,
)
from web3._utils.blocks import (
select_method_for_block_identifier,
)
from web3._utils.decorators import (
deprecated_for,
)
from web3._u... | PypiClean |
/FastGets-0.3.5.tar.gz/FastGets-0.3.5/fastgets/web/static/dist/plugins/fullscreen/plugin.min.js | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') th... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/paper-toggle-button/.github/ISSUE_TEMPLATE.md | <!-- Instructions: https://github.com/PolymerElements/paper-toggle-button/CONTRIBUTING.md#filing-issues -->
### Description
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
### Expected outcome
<!-- Example: The page stays the same color. -->
### Actual outcome
<!-- Example: The ... | PypiClean |
/Joson_yaml_pytest-1.2.7-py3-none-any.whl/Joson_yaml_pytest/runner.py | from . import create_funtion
import types
from inspect import Parameter
from . import validate
from . import extract
from . import my_builtins
from . import render_template_obj
from . import exceptions
import copy
import yaml
from pathlib import Path
import inspect
import allure
from .log import log
from .db import Con... | PypiClean |
/GailBot-0.2a0-py3-none-any.whl/gailbot/services/converter/plugin/pluginMethod.py | import os
from typing import Dict, Union, List, Any
from gailbot.core.utils.general import write_toml, read_toml
from ..payload.payloadObject import PayLoadObject, MERGED_FILE_NAME
from gailbot.services.converter.result import UttDict
from gailbot.plugins import Methods
from gailbot.core.utils.logger import makelogger
... | PypiClean |
/DICaugment-1.0.0-py3-none-any.whl/dicaugment/core/bbox_utils.py | from __future__ import division
from typing import Any, Dict, List, Optional, Sequence, Tuple, TypeVar, cast
import numpy as np
from .transforms_interface import BoxInternalType, BoxType
from .utils import DataProcessor, Params
__all__ = [
"normalize_bbox",
"denormalize_bbox",
"normalize_bboxes",
"d... | PypiClean |
/Hydras-3.1.2.tar.gz/Hydras-3.1.2/README.md | # Hydras
[](https://travis-ci.org/Gilnaa/Hydras)
'*Hydras*' is a python library that allows the developer to create structured binary data according to simple rules,
somewhat similar to how C does it with a struct.
Why "Hydras"? `Hydra` was taken.... | PypiClean |
/Django_UserService-3.2.0-py3-none-any.whl/userservice/user.py |
import logging
from django.http import HttpRequest
from django.conf import settings
from django.contrib.auth.models import User
from threading import currentThread
from userservice.username import get_uid
class UninitializedError(Exception):
pass
class UserService:
_user_data = {}
logger = logging.get... | PypiClean |
/HPI-0.3.20230327.tar.gz/HPI-0.3.20230327/my/photos/utils.py | from pathlib import Path
from typing import Dict
import PIL.Image # type: ignore
from PIL.ExifTags import TAGS, GPSTAGS # type: ignore
Exif = Dict
# TODO PIL.ExifTags.TAGS
class ExifTags:
DATETIME = "DateTimeOriginal"
LAT = "GPSLatitude"
LAT_REF = "GPSLatitudeRef"
LON = "GPSLongitude"
... | PypiClean |
/NlpToolkit-ParseTree-Cy-1.0.10.tar.gz/NlpToolkit-ParseTree-Cy-1.0.10/README.md | Constituency TreeBanks
============
When one talks about the “success” of a Natural Language Processing solution, they often refer to its ability to analyse the semantic and syntactic structure of a given sentence. Such a solution is expected to be able to understand both the linear and hierarchical order of the words... | PypiClean |
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/nswdemo.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 nswdemo(path):
"""Labour Training Evaluation Data
The `nswdemo` data frame contains 722 ro... | PypiClean |
/AbsBox-0.12.5.tar.gz/AbsBox-0.12.5/absbox/local/plot.py | import matplotlib.pyplot as plt
from matplotlib import font_manager
from absbox.local.util import guess_locale,aggStmtByDate,consolStmtByDate
from pyspecter import query, S
from itertools import reduce
import numpy as np
import logging
dmap = {
"cn":{
"bond":"债券","scenario":"场景"
},
"en":{
"... | PypiClean |
/Anuvaad_Tokenizer-0.0.3.tar.gz/Anuvaad_Tokenizer-0.0.3/Anuvaad_Tokenizer/AnuvaadKnTokenizer.py | import re
from nltk.tokenize.punkt import PunktSentenceTokenizer, PunktParameters, PunktTrainer, PunktLanguageVars
from nltk.tokenize import sent_tokenize
static_end = """
TT__TT
.
?
!
:
END_|_END
END_||_END
"""
class AnuvaadKnTokenizer(object):
"""
Default abbrevations
incomplete char range = ([\u0C80-\... | PypiClean |
/kiramibot-0.2.0.tar.gz/kiramibot-0.2.0/kirami/utils/downloader.py | from collections.abc import Iterable
from pathlib import Path
from typing import NamedTuple
from urllib.parse import urlparse
import filetype
from loguru import logger
from rich.panel import Panel
from rich.progress import (
BarColumn,
DownloadColumn,
Progress,
Task,
TextColumn,
TimeRemainingCo... | PypiClean |
/chesstothedeath-0.1.1-py3-none-any.whl/chess_to_the_death/util/config.py | import numpy as np
from chess_to_the_death.util.definition import PieceChar, pieceTranslateDic
boardDtype = np.int8
board = np.asarray([[-4, -3, -2, -5, -6, -2, -3, -4],
[-1, -1, -1, -1, -1, -1, -1, -1],
[ 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.