id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/Euphorie-15.0.2.tar.gz/Euphorie-15.0.2/docs/manuals/creation-guide.rst | ==========================================
A Guide to creating a Risk Assessment tool
==========================================
1. Introduction
===============
Your goal is to create the content of the OiRA tool for enterprises in your sector, and to offer this sector-specific tool to them.
The OiRA tool promotes a... | PypiClean |
/AstroKundli-2.0.0.tar.gz/AstroKundli-2.0.0/FlatlibAstroSidereal/angle.py | import math
# === Angular utilities === #
def norm(angle):
""" Normalizes an angle between 0 and 360. """
return angle % 360
def znorm(angle):
""" Normalizes an angle between -180 and 180. """
angle = angle % 360
return angle if angle <= 180 else angle - 360
def distance(angle1, angle2):
"... | PypiClean |
/AppiumRunner-0.0.1-py3-none-any.whl/appiumrunner/excel_reader.py | from xlrd import open_workbook
from appiumrunner.step_model import StepModel as model
class ExcelReader():
@staticmethod
def read_excel(excel_path):
reader = open_workbook(excel_path)
names = reader.sheet_names()
# 1. 读取步骤,以列表保存 {"login":[step1,step2]}
step_dict = {}
... | PypiClean |
/Gemtography-0.0.2-py3-none-any.whl/Gemtography-0.0.2.dist-info/LICENSE.md | Copyright 2022 Vlad Usatii
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense... | PypiClean |
/nosedjango-1.1.0.tar.gz/nosedjango-1.1.0/nosedjango/plugins/cherrypy_plugin.py | import os
import time
from django.core.handlers.wsgi import WSGIHandler
from nosedjango.plugins.base_plugin import Plugin
# Next 3 plugins taken from django-sane-testing:
# http://github.com/Almad/django-sane-testing
# By: Lukas "Almad" Linhart http://almad.net/
#####
# It was a nice try with Django server being thre... | PypiClean |
/BlueWhale3-ImageAnalytics-0.6.1.tar.gz/BlueWhale3-ImageAnalytics-0.6.1/doc/widgets/imageviewer.md | Image Viewer
============
Displays images that come with a data set.
**Inputs**
- Data: A data set with images.
**Outputs**
- Data: Images that come with the data.
- Selected images: Images selected in the widget.
The **Image Viewer** widget can display images from a data set, which are
stored locally or on the i... | PypiClean |
/EARL-pytorch-0.5.1.tar.gz/EARL-pytorch-0.5.1/earl_pytorch/util/util.py | import numpy as np
from torch import nn
boost_locations = [
(0.0, -4240.0, 70.0),
(-1792.0, -4184.0, 70.0),
(1792.0, -4184.0, 70.0),
(-3072.0, -4096.0, 73.0),
(3072.0, -4096.0, 73.0),
(- 940.0, -3308.0, 70.0),
(940.0, -3308.0, 70.0),
(0.0, -2816.0, 70.0),
(-3584.0, -2484.0, 70.0),
... | PypiClean |
/EnvComparison-0.1.5.tar.gz/EnvComparison-0.1.5/compare.py |
from EnvComparison import connection, ssh_hosts, server, differ
import sys
import tornado.httpserver
import tornado.ioloop
import tornado.web
import os
def compare_servers(opt_1, opt_2, host_list, ssh_config):
connection_pool = [
connection.Connection(ssh_config, host_list[int(opt_1)]),
connectio... | PypiClean |
/MatchZoo-2.2.0.tar.gz/MatchZoo-2.2.0/matchzoo/datasets/wiki_qa/load_data.py |
import typing
import csv
from pathlib import Path
import keras
import pandas as pd
import matchzoo
_url = "https://download.microsoft.com/download/E/5/F/" \
"E5FCFCEE-7005-4814-853D-DAA7C66507E0/WikiQACorpus.zip"
def load_data(
stage: str = 'train',
task: str = 'ranking',
filtered: bool = False... | PypiClean |
/ERP-0.27.tar.gz/ERP-0.27/erp/base/storage/views.py | from django.shortcuts import get_object_or_404, HttpResponse
from django.views.generic import ListView, TemplateView, DetailView, FormView
from django.forms.models import modelform_factory, inlineformset_factory
from django.contrib.contenttypes.forms import generic_inlineformset_factory
from django.contrib.contenttypes... | PypiClean |
/MolScribe-1.1.1.tar.gz/MolScribe-1.1.1/molscribe/tokenizer.py | import os
import json
import random
import numpy as np
from SmilesPE.pretokenizer import atomwise_tokenizer
PAD = '<pad>'
SOS = '<sos>'
EOS = '<eos>'
UNK = '<unk>'
MASK = '<mask>'
PAD_ID = 0
SOS_ID = 1
EOS_ID = 2
UNK_ID = 3
MASK_ID = 4
class Tokenizer(object):
def __init__(self, path=None):
self.stoi = ... | PypiClean |
/ALS.Milo-0.18.1.tar.gz/ALS.Milo-0.18.1/als/milo/version.py |
__version__ = None # This will be assigned later; see below
__date__ = None # This will be assigned later; see below
__credits__ = None # This will be assigned later; see below
try:
from als.milo._version import git_pieces_from_vcs as _git_pieces_from_vcs
from als.milo._version import run_command, registe... | PypiClean |
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/_style_/VideoStreamStyle/VideoStreamStyle.py | import Famcy
from flask import request, Response
import time
try:
import cv2
except:
print("pip install opencv-python")
import base64
class VideoCamera(object):
def __init__(self, rtsp_address, timeout=15, delay=0.5):
# 通過opencv獲取實時視頻流
self.cv_module = cv2
self.video = self.cv_module.VideoCapture(rtsp_address... | PypiClean |
/CONEstrip-0.1.1.tar.gz/CONEstrip-0.1.1/src/conestrip/optimization.py |
import random
from itertools import chain, combinations
from typing import Any, List, Tuple
from more_itertools import collapse
from more_itertools.recipes import flatten
from z3 import *
from conestrip.cones import GeneralCone, Gamble, print_gamble, print_general_cone, print_cone_generator
from conestrip.global_set... | PypiClean |
/Flask-Track-Usage-2.0.0.tar.gz/Flask-Track-Usage-2.0.0/src/flask_track_usage/storage/mongo.py | import datetime
import inspect
from flask_track_usage.storage import Storage
class _MongoStorage(Storage):
"""
Parent storage class for Mongo storage.
"""
def store(self, data):
"""
Executed on "function call".
:Parameters:
- `data`: Data to store.
.. ver... | PypiClean |
/NeuroTorch-0.0.1b2.tar.gz/NeuroTorch-0.0.1b2/src/neurotorch/rl/agent.py | import json
import logging
from copy import deepcopy
from typing import Sequence, Union, Optional, Dict, Any, List
import numpy as np
import torch
import gym
from ..callbacks.checkpoints_manager import CheckpointManager, LoadCheckpointMode
from ..transforms.base import to_numpy, to_tensor
from ..modules.base import B... | PypiClean |
/JaqalPaq-extras-1.2.0a1.tar.gz/JaqalPaq-extras-1.2.0a1/README.md | # JaqalPaq-Extras
JaqalPaq-Extras contains extensions to the
[JaqalPaq](https://gitlab.com/jaqal/jaqalpaq/) python package, which itself is
used to parse, manipulate, emulate, and generate quantum assembly code written
in
[Jaqal](https://qscout.sandia.gov/jaqal) (Just another quantum assembly
language). The purpose of... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Scanner/Prog.py |
__revision__ = "src/engine/SCons/Scanner/Prog.py 2014/07/05 09:42:21 garyo"
import SCons.Node
import SCons.Node.FS
import SCons.Scanner
import SCons.Util
# global, set by --debug=findlibs
print_find_libs = None
def ProgramScanner(**kw):
"""Return a prototype Scanner instance for scanning executable
files f... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/components/tmdb/api.py | from flask import jsonify
from flask_restx import inputs
from flexget import plugin
from flexget.api import APIResource, api
from flexget.api.app import BadRequest, NotFoundError, etag
tmdb_api = api.namespace('tmdb', description='TMDB lookup endpoint')
class ObjectsContainer:
poster_object = {
'type': ... | PypiClean |
/Electrum-Zcash-Random-Fork-3.1.3b5.tar.gz/Electrum-Zcash-Random-Fork-3.1.3b5/plugins/cosigner_pool/qt.py |
import time
from xmlrpc.client import ServerProxy
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import QPushButton
from electrum_zcash import bitcoin, util
from electrum_zcash import transaction
from electrum_zcash.plugins import BasePlugin, hook
from electrum_zcash.i18n import _
from ele... | PypiClean |
/GASSBI_distributions-0.1.tar.gz/GASSBI_distributions-0.1/distributions/Gaussiandistribution.py | import math
import matplotlib.pyplot as plt
from .Generaldistribution import Distribution
class Gaussian(Distribution):
""" Gaussian distribution class for calculating and
visualizing a Gaussian distribution.
Attributes:
mean (float) representing the mean value of the distribution
stdev (float) representing ... | PypiClean |
/DS_Store_Cleaner-0.2.tar.gz/DS_Store_Cleaner-0.2/README.md | # DS_Store_Cleaner
`DS_Store_Cleaner`是可以删除当前目录或指定目录下所有的 `.DS_Store` 文件的工具。 / `DS_Store_Cleaner` can delete all `.DS_Store` files in the current directory or in the specified directory.
## 什么是 .DS_Store? / What is a .DS_Store?
`.DS_Store` 是 `macOS` 用来保存如何展示文件/文件夹的数据文件,如果开发/设计人员将 `.DS_Store` 文件上传或部署到线上环境,可能造成文件目录结构泄露,特... | PypiClean |
/DAQBrokerServer-0.0.2-py3-none-any.whl/daqbrokerServer.py | from tornado.wsgi import WSGIContainer
from tornado.ioloop import IOLoop
from tornado.httpserver import HTTPServer
#import gevent.monkey
# gevent.monkey.patch_all()
import time
import sys
import json
import traceback
import logging
import multiprocessing
import ntplib
import socket
import psutil
import struct
import s... | PypiClean |
/AFQ-Browser-0.3.tar.gz/AFQ-Browser-0.3/doc/sphinxext/numpydoc.py | from __future__ import division, absolute_import, print_function
import sys
import re
import pydoc
import sphinx
import inspect
import collections
if sphinx.__version__ < '1.0.1':
raise RuntimeError("Sphinx 1.0.1 or newer is required")
from docscrape_sphinx import get_doc_object, SphinxDocString
from sphinx.util... | PypiClean |
/Aitomatic-Contrib-23.8.10.3.tar.gz/Aitomatic-Contrib-23.8.10.3/src/aito/iot_mgmt/data/scripts/profile_equipment_data_fields.py | from pandas._libs.missing import NA # pylint: disable=no-name-in-module
from tqdm import tqdm
from aito.pmfp.data_mgmt import EquipmentParquetDataSet
from aito.util.data_proc import ParquetDataset
from aito.iot_mgmt.api import (EquipmentUniqueTypeGroup,
EquipmentUniqueTypeGroupDataFie... | PypiClean |
/Findex_GUI-0.2.18-py3-none-any.whl/findex_gui/controllers/auth/permissions.py | from flask import current_app
from findex_gui.controllers.auth.auth import get_current_user_data, not_logged_in
def has_permission(role, resource, action):
"""Function to check if a user has the specified permission."""
role = current_app.auth.load_role(role)
return role.has_permission(resource, action) i... | PypiClean |
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/stats_scripts/mpmath/libmp/libintmath.py | import math
from bisect import bisect
from .backend import xrange
from .backend import BACKEND, gmpy, sage, sage_utils, MPZ, MPZ_ONE, MPZ_ZERO
def giant_steps(start, target, n=2):
"""
Return a list of integers ~=
[start, n*start, ..., target/n^2, target/n, target]
but conservatively rounded so that ... | PypiClean |
/CheeseFramework-1.4.95-py3-none-any.whl/Cheese/mockManager.py |
from Cheese.testError import MockError
class MockManager:
mocks = {}
@staticmethod
def setMock(mock):
MockManager.mocks[mock.repoName.upper()] = mock
@staticmethod
def returnMock(repositoryName, methodName, kwargs):
"""
Mocks repository method
"""
if (re... | PypiClean |
/Dejavu-1.5.0.zip/Dejavu-1.5.0/dejavu/test/zoo_fixture.py |
import datetime
import os
thisdir = os.path.dirname(__file__)
logname = os.path.join(thisdir, "djvtest.log")
try:
import pythoncom
except ImportError:
pythoncom = None
try:
set
except NameError:
from sets import Set as set
import sys
import threading
import time
import traceback
import unittest
imp... | PypiClean |
/Macrocomplex_Builder-1.2-py3-none-any.whl/Macrocomplex_Builder-1.2.data/scripts/macrocomplex_functions.py |
import Bio.PDB
import sys
import string
import os
import argparse
import timeit
import logging
import re
def Key_atom_retriever(chain):
"""This function retrieves the key atom, CA in case of proteins and C4' in case of nucleic acids, to do the superimposition and also returns a
variable indicating the kind of molec... | PypiClean |
/ESMValTool-2.9.0-py3-none-any.whl/esmvaltool/diag_scripts/autoassess/stratosphere/strat_metrics_1.py | import logging
import os
import iris
import iris.analysis.cartography as iac
import iris.coord_categorisation as icc
import iris.plot as iplt
import matplotlib.cm as mpl_cm
import matplotlib.colors as mcol
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import numpy as np
from cartopy.mpl.gridliner i... | PypiClean |
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/visualization_scripts/umap_learn/spectral.py | import numpy as np
import scipy.sparse
import scipy.sparse.csgraph
from sklearn.manifold import SpectralEmbedding
from sklearn.metrics import pairwise_distances
from warnings import warn
def component_layout(
data, n_components, component_labels, dim, metric="euclidean", metric_kwds={}
):
"""Provide a layou... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojo/cldr/nls/hebrew.js | ({"dateFormatItem-yM":"y-M","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateFormatItem-yQ":"y Q","eraNames":["AM"],"dateFormatItem-MMMEd":"E MMM d","dateTimeFormat-full":"{1} {0}","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-yQQQ":"y QQQ","days-standAlone-wide":["1","2","3","4","5","6","7"],"dateFormatIte... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/DjangoAppCenter/simpleui/static/admin/simpleui-x/elementui/dialog.js | module.exports =
/******/ (function (modules) { // webpackBootstrap
/******/ // The module cache
/******/
var installedModules = {};
/******/
/******/ // The require function
/******/
function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in ... | PypiClean |
/Electrum-VTC-2.9.3.3.tar.gz/Electrum-VTC-2.9.3.3/gui/qt/address_list.py |
import webbrowser
from util import *
from electrum_vtc.i18n import _
from electrum_vtc.util import block_explorer_URL, format_satoshis, format_time
from electrum_vtc.plugins import run_hook
from electrum_vtc.bitcoin import is_address
class AddressList(MyTreeWidget):
filter_columns = [0, 1, 2] # Address, Label... | PypiClean |
/mynewspaper-4.0.tar.gz/mynewspaper-4.0/misc/dateutil/zoneinfo/__init__.py | from dateutil.tz import tzfile
from tarfile import TarFile
import os
__author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>"
__license__ = "PSF License"
__all__ = ["setcachesize", "gettz", "rebuild"]
CACHE = []
CACHESIZE = 10
USE_SYSTEM_ZONEINFO = True # XXX configure at build time
class tzfile(tzfile):
def __re... | PypiClean |
/AMLT-learn-0.2.9.tar.gz/AMLT-learn-0.2.9/amltlearn/preprocessing/Discretizer.py | __author__ = 'bejar'
import numpy as np
from sklearn.base import TransformerMixin
#Todo: Add the possibility of using the (weighted) mean value of the interval
class Discretizer(TransformerMixin):
"""
Discretization of the attributes of a dataset (unsupervised)
Parameters:
method: str
* 'equal'... | PypiClean |
/LEPL-5.1.3.zip/LEPL-5.1.3/src/lepl/support/_test/graph.py | from unittest import TestCase
from lepl.support.graph import ArgAsAttributeMixin, preorder, postorder, reset, \
ConstructorWalker, Clone, make_proxy, LEAF, leaves
from lepl.support.node import Node
# pylint: disable-msg=C0103, C0111, C0301, W0702, C0324, C0102, C0321, W0141
# (dude this is just a test)
cl... | PypiClean |
/ACSNI-1.0.6.tar.gz/ACSNI-1.0.6/README.md | # ACSNI
Automatic context-specific network inference
Determining tissue- and disease-specific circuit of biological pathways remains a fundamental goal of molecular biology.
Many components of these biological pathways still remain unknown, hindering the full and accurate characterisation of
biological processes of in... | 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/account_type_filter.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 |
/mynewspaper-4.0.tar.gz/mynewspaper-4.0/misc/dateutil/easter.py | __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>"
__license__ = "Simplified BSD"
import datetime
__all__ = ["easter", "EASTER_JULIAN", "EASTER_ORTHODOX", "EASTER_WESTERN"]
EASTER_JULIAN = 1
EASTER_ORTHODOX = 2
EASTER_WESTERN = 3
def easter(year, method=EASTER_WESTERN):
"""
This method was ported fro... | PypiClean |
/EasyFileWatcher-0.0.5.tar.gz/EasyFileWatcher-0.0.5/README.md | <a name="readme-top"></a>
<!-- [![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url] -->
[![MIT License][license-shield]][license-url]
<!-- [![LinkedIn][linkedin-shield]][linkedin-url] -->
<!-- PRO... | PypiClean |
/Indomielibs-2.0.106.tar.gz/Indomielibs-2.0.106/pyrogram/types/user_and_chats/chat_privileges.py |
from pyrogram import raw
from ..object import Object
class ChatPrivileges(Object):
"""Describes privileged actions an administrator is able to take in a chat.
Parameters:
can_manage_chat (``bool``, *optional*):
True, if the administrator can access the chat event log, chat statistics, me... | PypiClean |
/Flask-Material-Lite-0.0.1.tar.gz/Flask-Material-Lite-0.0.1/flask_material_lite/__init__.py |
__app_version__ = '0.0.1'
__material_version__ = '1.0'
import re
from flask import Blueprint, current_app, url_for
try:
from wtforms.fields import HiddenField
except ImportError:
def is_hidden_field_filter(field):
raise RuntimeError('WTForms is not installed.')
else:
def is_hidden_field_filter(f... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/electrum_chi/electrum/gui/qt/console.py |
import sys
import os
import re
import traceback
from PyQt5 import QtCore
from PyQt5 import QtGui
from PyQt5 import QtWidgets
from electrum import util
from electrum.i18n import _
from .util import MONOSPACE_FONT
class OverlayLabel(QtWidgets.QLabel):
STYLESHEET = '''
QLabel, QLabel link {
color: rg... | PypiClean |
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/build_scripts/SubGeneViewerExport.py |
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copi... | PypiClean |
/Djamo-2.67.0-rc2.tar.gz/Djamo-2.67.0-rc2/docs/source/index.rst | .. Djamo documentation master file, created by
sphinx-quickstart on Sun Mar 25 22:02:09 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. sectionauthor:: Sameer Rahmani <lxsameer@gnu.org>
Welcome to Djamo's documentation!
================... | PypiClean |
/CWR-API-0.0.40.tar.gz/CWR-API-0.0.40/cwr/file.py | __author__ = 'Bernardo Martínez Garrido'
__license__ = 'MIT'
__status__ = 'Development'
class CWRFile(object):
"""
Represents a CWR file and all the data contained in it.
This can be divided into two groups: the metadata and the transmission
data.
The first is indicated, according to the standar... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/db/backends/sqlite3/introspection.py | from collections import namedtuple
import sqlparse
from django.db import DatabaseError
from django.db.backends.base.introspection import BaseDatabaseIntrospection
from django.db.backends.base.introspection import FieldInfo as BaseFieldInfo
from django.db.backends.base.introspection import TableInfo
from django.db.mod... | PypiClean |
/Cantera-3.0.0b1-cp311-cp311-win_amd64.whl/cantera/ck2yaml.py |
# This file is part of Cantera. See License.txt in the top-level directory or
# at https://cantera.org/license.txt for license and copyright information.
"""
ck2yaml.py: Convert Chemkin-format mechanisms to Cantera YAML input files
Usage:
ck2yaml [--input=<filename>]
[--thermo=<filename>]
... | PypiClean |
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/js/jquery.bubblepopup.v2.3.1.min.js | eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);retur... | PypiClean |
/MarkdownSubscript-2.1.1.tar.gz/MarkdownSubscript-2.1.1/docs/installation.rst | .. highlight:: console
============
Installation
============
Stable release
--------------
The easiest way to install Markdown Subscript is to use `pip`_. ::
$ python -m pip install MarkdownSubscript
This will install the latest stable version. If you need an older
version, you may pin or limit the requiremen... | PypiClean |
/DynIP-0.1e.tar.gz/DynIP-0.1e/dynip/server.py | Copyright (c) 2011, R. Kristoffer Hardy
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the followi... | PypiClean |
/Flask-APScheduler-1.12.4.tar.gz/Flask-APScheduler-1.12.4/flask_apscheduler/auth.py | import base64
from flask import request
from .utils import bytes_to_wsgi, wsgi_to_bytes
def get_authorization_header():
"""
Return request's 'Authorization:' header as
a two-tuple of (type, info).
"""
header = request.environ.get('HTTP_AUTHORIZATION')
if not header:
return None
... | PypiClean |
/Dabo-0.9.16.tar.gz/Dabo-0.9.16/dabo/ui/uitk/dFormMixin.py | """ dFormMixin.py """
import dPemMixin as pm
from dabo.dLocalize import _
from dabo.lib.utils import ustr
import dabo.dEvents as dEvents
class dFormMixin(pm.dPemMixin):
def __init__(self, preClass, parent=None, properties=None, *args, **kwargs):
# if parent:
# style = wx.DEFAULT_FRAME_STYLE|wx.FRAME_FLOAT_ON_PAREN... | PypiClean |
/HPI-0.3.20230327.tar.gz/HPI-0.3.20230327/my/location/gpslogger.py | REQUIRES = ["gpxpy"]
from my.config import location
from my.core import Paths, dataclass
@dataclass
class config(location.gpslogger):
# path[s]/glob to the synced gpx (XML) files
export_path: Paths
# default accuracy for gpslogger
accuracy: float = 50.0
from itertools import chain
from datetime im... | PypiClean |
/CO2meter-0.2.6-py3-none-any.whl/co2meter/homekit.py | import logging
import signal
from pyhap.accessory_driver import AccessoryDriver
from pyhap.accessory import Accessory, Category
import pyhap.loader as loader
import co2meter as co2
###############################################################################
PORT = 51826
PINCODE = b"800-11-400"
NAME = 'CO2 Monitor... | PypiClean |
/OASYS1-WOFRY-1.0.41.tar.gz/OASYS1-WOFRY-1.0.41/orangecontrib/wofry/widgets/wavefront_propagation/ow_undulator_gaussian_shell_model_1D.py | import numpy
import sys
from PyQt5.QtGui import QPalette, QColor, QFont
from PyQt5.QtWidgets import QMessageBox
from orangewidget import gui
from orangewidget import widget
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui
from oasys.widgets import congruence
from oasys.util.oasys_u... | PypiClean |
/0-orchestrator-1.1.0a7.tar.gz/0-orchestrator-1.1.0a7/zeroos/orchestrator/client/client_support.py | import json
import collections
from datetime import datetime
from uuid import UUID
from enum import Enum
from dateutil import parser
# python2/3 compatible basestring, for use in to_dict
try:
basestring
except NameError:
basestring = str
def timestamp_from_datetime(datetime):
"""
Convert from da... | PypiClean |
/Miniature-0.2.0.tar.gz/Miniature-0.2.0/miniature/processor/wand_processor.py | from __future__ import (print_function, division, absolute_import, unicode_literals)
from wand.api import library
from wand.image import Image, HistogramDict
from wand.color import Color
from .base import BaseProcessor
def fast_histogram(img):
h = HistogramDict(img)
pixels = h.pixels
return tuple(
... | PypiClean |
/Netfoll_TL-2.0.1-py3-none-any.whl/netfoll_tl/errors/common.py | import struct
import textwrap
from ..tl import TLRequest
class ReadCancelledError(Exception):
"""Occurs when a read operation was cancelled."""
def __init__(self):
super().__init__('The read operation was cancelled.')
class TypeNotFoundError(Exception):
"""
Occurs when a type is not found, ... | PypiClean |
/ARGs_OAP-2.3.2.tar.gz/ARGs_OAP-2.3.2/ARGs_OAP/bin/bbmap/rqcfilter2.sh |
usage(){
echo "
Written by Brian Bushnell
Last modified June 26, 2019
Description: RQCFilter2 is a revised version of RQCFilter that uses a common path for all dependencies.
The dependencies are available at http://portal.nersc.gov/dna/microbial/assembly/bushnell/RQCFilterData.tar
Performs quality-trimming, artifac... | PypiClean |
/Nproxypool-1.0.2.tar.gz/Nproxypool-1.0.2/nproxypool/base/db.py | import time
from random import choice
from redis import ConnectionPool, StrictRedis
from nproxypool.utils.exceptions import PoolEmptyException
class RedisPoolBase(object):
def __init__(self, **kwargs):
self._kwargs = kwargs
self._redis_uri = "redis://:{password}@{host}:{port}/{db}"
self._c... | PypiClean |
/Flask-RQ2-18.3.tar.gz/Flask-RQ2-18.3/CHANGELOG.rst | Changelog
---------
https://img.shields.io/badge/calver-YY.0M.MICRO-22bfda.svg
Flask-RQ2 follows the `CalVer <http://calver.org/>`_ version specification
in the form of::
YY.MINOR[.MICRO]
E.g.::
16.1.1
The ``MINOR`` number is **not** the month of the year. The ``MICRO`` number
is a patch level for ``YY.MINOR`... | PypiClean |
/Lantz-0.3.zip/Lantz-0.3/lantz/processors.py | import warnings
from . import Q_
from .log import LOGGER as _LOG
from stringparser import Parser
class DimensionalityWarning(Warning):
pass
def _do_nothing(value):
return value
def _getitem(a, b):
"""Return a[b] or if not found a[type(b)]
"""
try:
return a[b]
except KeyError:
... | PypiClean |
/Cantonese-1.0.7-py3-none-any.whl/src/can_web_parser.py | import sys
from src.can_lexer import *
class WebParser(object):
def __init__(self, tokens : list, Node : list) -> None:
self.tokens = tokens
self.pos = 0
self.Node = Node
def get(self, offset : int) -> list:
if self.pos + offset >= len(self.tokens):
return ["", ""]
... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/ding/envs/env_manager/subprocess_env_manager.py | from typing import Any, Union, List, Tuple, Dict, Callable, Optional
from multiprocessing import connection, get_context
from collections import namedtuple
from ditk import logging
import platform
import time
import copy
import gymnasium
import gym
import traceback
import torch
import pickle
import numpy as np
import t... | PypiClean |
/Extractor-0.5.tar.gz/Extractor-0.5/README | Python bindings for GNU libextractor
About libextractor
==================
libextractor is a simple library for keyword extraction. libextractor
does not support all formats but supports a simple plugging mechanism
such that you can quickly add extractors for additional formats, even
without recompiling libextra... | PypiClean |
/InvestOpenDataTools-1.0.2.tar.gz/InvestOpenDataTools-1.0.2/opendatatools/economy/nbs_agent.py |
from opendatatools.common import RestAgent
import json
import pandas as pd
nbs_city_map = {
'北京':'110000',
'天津':'120000',
'石家庄':'130100',
'唐山':'130200',
'秦皇岛':'130300',
'太原':'140100',
'呼和浩特':'150100',
'包头':'150200',
'沈阳':'210100',
'大连':'210200',
'丹东':'210600',
'锦州':'210... | PypiClean |
/CsuTextSpotter-1.0.28.tar.gz/CsuTextSpotter-1.0.28/TextSpotter/cfg.py | data_root = 'images/'
char_dict_file = 'char_dict.json'
model = dict(
type='AE_TextSpotter',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
style='pytorch'),
neck=dict(
... | PypiClean |
/HavNegpy-1.2.tar.gz/HavNegpy-1.2/docs/_build/html/_build/html/_build/html/_build/html/_build/html/_build/html/hn_module_tutorial.ipynb | # Tutorial for the HN module of HavNegpy package
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
import HavNegpy as dd
%matplotlib qt
os.chdir(r'M:\Marshall_Data\mohamed_data\mohamed_data\n44')
def create_dataframe(f):
col_names = ['Freq', 'T', 'Eps1', 'Eps2']
#f ... | PypiClean |
/aleksis_core-3.1.5-py3-none-any.whl/aleksis/core/util/messages.py | import logging
from typing import Any, Optional
from django.contrib import messages
from django.http import HttpRequest
def add_message(
request: Optional[HttpRequest], level: int, message: str, **kwargs
) -> Optional[Any]:
"""Add a message.
Add a message to either Django's message framework, if called ... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/css3/transition.js.uncompressed.js | define("dojox/css3/transition", ["dojo/_base/kernel",
"dojo/_base/lang",
"dojo/_base/declare",
"dojo/_base/array",
"dojo/_base/Deferred",
"dojo/DeferredList",
"dojo/on",
"dojo/_base/sniff"],
function(dojo, lang, declare, array, deferred, deferredList, on, has){
//TODO create cross platform animation/... | PypiClean |
/Jobtimize-0.0.5a2.tar.gz/Jobtimize-0.0.5a2/README.md | # Jobtimize
`Jobtimize` is a python package which collects, standardizes and completes information about job offers published on job search platforms.
The package is mainly based on scraping and text classification to fill in missing data.
|Release|Usage|Development|
|--- |--- |--- |
|[ { throw new Error('Bootstrap\'s JavaScript requires jQuery') }
/* ========================================================================
* Bootstrap: transition.js v3.1.1
* http://getbootstrap.com/javascript/#transitions
* ========================================================... | PypiClean |
/KaTrain-1.14.0-py3-none-any.whl/katrain/core/sgf_parser.py | import copy
import chardet
import math
import re
from collections import defaultdict
from typing import Any, Dict, List, Optional, Tuple
class ParseError(Exception):
"""Exception raised on a parse error"""
pass
class Move:
GTP_COORD = list("ABCDEFGHJKLMNOPQRSTUVWXYZ") + [
xa + c for xa in "ABCD... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/pip/_vendor/chardet/langhebrewmodel.py |
# 255: Control characters that usually does not exist in any text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# Windows-1255 language model
# Character Mapping Table:
WIN1255_CHAR_TO_ORDER_MAP = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, # 00
2... | PypiClean |
/Finance-Hermes-0.3.6.tar.gz/Finance-Hermes-0.3.6/hermes/factors/technical/factor_volume.py | import copy
from numpy import fabs as npFabs
from hermes.factors.base import FactorBase, LongCallMixin, ShortMixin
from hermes.factors.technical.core.volume import *
class FactorVolume(FactorBase, LongCallMixin, ShortMixin):
def __init__(self, **kwargs):
__str__ = 'volume'
self.category = 'volume... | PypiClean |
/dipex-4.54.5.tar.gz/dipex-4.54.5/integrations/aarhus/initial_classes.py | from dataclasses import dataclass
from uuid import UUID
import uuids
@dataclass
class Class:
titel: str
facet: str
scope: str
bvn: str
uuid: UUID
CLASSES = [
Class(
"Postadresse",
"org_unit_address_type",
"DAR",
"AddressMailUnit",
uuids.UNIT_POSTADDR,... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/app/scene.js.uncompressed.js | define("dojox/app/scene", ["dojo/_base/kernel",
"dojo/_base/declare",
"dojo/_base/connect",
"dojo/_base/array",
"dojo/_base/Deferred",
"dojo/_base/lang",
"dojo/_base/sniff",
"dojo/dom-style",
"dojo/dom-geometry",
"dojo/dom-class",
"dojo/dom-construct",
"dojo/dom-attr",
"dojo/query",
"dijit",
"dojox",
"di... | PypiClean |
/FFGo-1.12.7-py3-none-any.whl/ffgo/config.py |
import sys
import os
import re
import gzip
import contextlib
import gettext
import traceback
import collections
import itertools
import textwrap
from xml.etree import ElementTree
from tkinter import IntVar, StringVar
from tkinter.messagebox import askyesno, showinfo, showerror
import tkinter.font
from tkinter import t... | PypiClean |
/GRID_LRT-1.0.7.tar.gz/GRID_LRT-1.0.7/GRID_LRT/application/submit.py | import os
import signal
import subprocess
import sys
from subprocess import Popen
import logging
import warnings
import random, string
from shutil import copyfile, rmtree
import tempfile
from GRID_LRT.auth.get_picas_credentials import picas_cred as pc
import GRID_LRT
from GRID_LRT.auth import grid_credentials
class ... | PypiClean |
/IPython-Dashboard-0.1.5.tar.gz/IPython-Dashboard-0.1.5/dashboard/static/js/dash.vis.js | function genLineChart(timeFormat){
var chart = nv.models.lineWithFocusChart();
if (timeFormat == 1) {
chart.x(function(d){
return new Date(d.x);
});
chart.xScale = d3.time.scale;
chart.xAxis.tickFormat(function(d) {
return d3.time.format("%Y-%m-%d")(new Da... | PypiClean |
/DNBC4tools-2.1.0.tar.gz/DNBC4tools-2.1.0/dnbc4tools/atac/decon.py | import os
import argparse
from typing import List, Dict
from dnbc4tools.tools.utils import str_mkdir,judgeFilexits,change_path,logging_call,read_json
from dnbc4tools.__init__ import __root_dir__
class Decon:
def __init__(self, args: Dict):
"""
Constructor for Decon class.
Args:
- a... | PypiClean |
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/fipy/meshes/sphericalNonUniformGrid1D.py | from __future__ import unicode_literals
__docformat__ = 'restructuredtext'
from fipy.tools import numerix
from fipy.tools.dimensions.physicalField import PhysicalField
from fipy.tools import parallelComm
from fipy.meshes.nonUniformGrid1D import NonUniformGrid1D
__all__ = ["SphericalNonUniformGrid1D"]
from future.uti... | PypiClean |
/FuzzingTool-3.14.0-py3-none-any.whl/fuzzingtool/utils/utils.py |
from typing import List, Tuple, Union
from .consts import FUZZING_MARK, MAX_PAYLOAD_LENGTH_TO_OUTPUT
def get_indexes_to_parse(content: str,
search_for: str = FUZZING_MARK) -> List[int]:
"""Gets the indexes of the searched substring into a string content
@type content: str
@para... | PypiClean |
/CAGMon-0.8.5-py3-none-any.whl/cagmon/melody.py | from cagmon.agrement import *
__author__ = 'Phil Jung <pjjung@nims.re.kr>'
###------------------------------------------### Coefficients ###-------------------------------------------###
# PCC
def PCC(loaded_dataset, main_channel):
result_bin = dict()
aux_channels = [channel for channel in loaded_dataset['arr... | PypiClean |
/DaMa_ML-1.0a0-py3-none-any.whl/dama/groups/postgres.py | from dama.abc.group import AbsGroup
from dama.utils.core import Shape
import numpy as np
from collections import OrderedDict
from dama.utils.decorators import cache
from dama.data.it import Iterator, BatchIterator
from psycopg2.extras import execute_values
import uuid
class Table(AbsGroup):
inblock = True
de... | PypiClean |
/AutoDiff-CS207-24-0.2.tar.gz/AutoDiff-CS207-24-0.2/AutoDiff/autodiff.py | import math
import numpy as np
#=====================================Elementary functions=====================================================#
def e(x):
#try:
return np.exp(x)
#except:
# return x.exp()
def sin(x):
#try:
return np.sin(x)
#except:
# return x.sin()
def arcs... | PypiClean |
/GeCO-1.0.7.tar.gz/GeCO-1.0.7/geco/mips/loading/miplib.py | import tempfile
from urllib.request import urlretrieve, urlopen
from urllib.error import URLError
import pyscipopt as scip
import os
import pandas as pd
class Loader:
def __init__(self, persistent_directory=None):
"""
Initializes the MIPLIB loader object
Parameters
----------
... | PypiClean |
/Nipo-0.0.1.tar.gz/Nipo-0.0.1/markupsafe/_constants.py | HTML_ENTITIES = {
"AElig": 198,
"Aacute": 193,
"Acirc": 194,
"Agrave": 192,
"Alpha": 913,
"Aring": 197,
"Atilde": 195,
"Auml": 196,
"Beta": 914,
"Ccedil": 199,
"Chi": 935,
"Dagger": 8225,
"Delta": 916,
"ETH": 208,
"Eacute": 201,
"Ecirc": 202,
"Egrave":... | PypiClean |
/MSM_PELE-1.1.1-py3-none-any.whl/AdaptivePELE/AdaptivePELE/analysis/backtrackAdaptiveTrajectory.py | from __future__ import print_function
import os
import sys
import argparse
import glob
import itertools
from AdaptivePELE.utilities import utilities
from AdaptivePELE.atomset import atomset
try:
basestring
except NameError:
basestring = str
def parseArguments():
"""
Parse the command-line options
... | PypiClean |
/EOxServer-1.2.12-py3-none-any.whl/eoxserver/services/exceptions.py |
class HTTPMethodNotAllowedError(Exception):
""" This exception is raised in case of a HTTP requires with unsupported
HTTP method.
This exception should always lead to the 405 Method not allowed HTTP error.
The constructor takes two arguments, the error message ``mgs`` and the list
of the accepted... | PypiClean |
/Hcl.py-0.8.2.tar.gz/Hcl.py-0.8.2/README.md | <h1 align="center">
<br><a href="https://discord.gg/2ZKDxFRk4Y"><img src="https://cdn.discordapp.com/attachments/914247542114500638/915324335407890565/PicsArt_11-23-01.13.37.jpg" alt="Hcl.py" width="1000"></a>
<br>Hcl.py<br>
</h1>
[
s [PROGRAM_OPTIONS] thumb SOURCE DEST
Recursively convert all the pictures and videos in SOURCE into a directory
structure in DEST
Arguments:
SOURCE: The source directory for the images and videos
DEST: An empty directory which will be populated with a converted
data... | PypiClean |
/MegEngine-1.13.1-cp37-cp37m-macosx_10_14_x86_64.whl/megengine/data/dataset/vision/voc.py | import collections.abc
import os
import xml.etree.ElementTree as ET
import cv2
import numpy as np
from .meta_vision import VisionDataset
class PascalVOC(VisionDataset):
r"""`Pascal VOC <http://host.robots.ox.ac.uk/pascal/VOC/>`_ Dataset."""
supported_order = (
"image",
"boxes",
"box... | PypiClean |
/GuangTestBeat-0.13.1-cp38-cp38-macosx_10_9_x86_64.whl/econml/iv/dml/_dml.py | import numpy as np
from sklearn.base import clone
from sklearn.linear_model import LinearRegression, LogisticRegressionCV
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import FunctionTransformer
from itertools import product
from ..._ortho_learner import _OrthoLearner
from ..._cate_estimator import ... | PypiClean |
/BuildStream-2.0.1-cp39-cp39-manylinux_2_28_x86_64.whl/buildstream/_stream.py |
import itertools
import os
import sys
import stat
import shlex
import shutil
import tarfile
import tempfile
from contextlib import contextmanager, suppress
from collections import deque
from typing import List, Tuple, Optional, Iterable, Callable
from ._artifactelement import verify_artifact_ref, ArtifactElement
from... | PypiClean |
/Catnap-0.4.5.tar.gz/Catnap-0.4.5/catnap/models.py | from __future__ import absolute_import, division, print_function, with_statement, unicode_literals
import functools
import json
import sys
import base64
import requests
import requests.auth
from .compat import *
class ParseException(Exception):
"""An exception that occurrs while parsing a test specification"""
... | PypiClean |
/ApiLogicServer-9.2.18-py3-none-any.whl/api_logic_server_cli/create_from_model/safrs-react-admin-npm-build/static/js/1431.d02260cd.chunk.js | "use strict";(self.webpackChunkreact_admin_upgrade=self.webpackChunkreact_admin_upgrade||[]).push([[1431],{51431:function(t,e,i){i.r(e),i.d(e,{conf:function(){return r},language:function(){return m}});var r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComm... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.