id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/Nodes-1.2.tar.gz/Nodes-1.2/BPGR.py | # Copyright (c) Alexander Sedov 2008
# This file is part of Nodes.
#
# Nodes 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.
#
# Node... | PypiClean |
/ApiLogicServer-9.2.18-py3-none-any.whl/api_logic_server_cli/create_from_model/safrs-react-admin-npm-build/static/js/787.d5293104.chunk.js | "use strict";(self.webpackChunkreact_admin_upgrade=self.webpackChunkreact_admin_upgrade||[]).push([[787],{787:function(e,t,n){n.r(t),n.d(t,{getCLS:function(){return y},getFCP:function(){return g},getFID:function(){return C},getLCP:function(){return P},getTTFB:function(){return D}});var i,r,a,o,u=function(e,t){return{na... | PypiClean |
/FinPy-0.5.tar.gz/FinPy-0.5/finpy/data/DataPull.py | import urllib.request, urllib.error, urllib.parse
import datetime
import os
import argparse
from finpy.data.fetch import Fetcher
import re
def get_data(data_path, ls_symbols, src="Yahoo"):
# Create path if it doesn't exist
if not (os.access(data_path, os.F_OK)):
os.makedirs(data_path)
# utils.cle... | PypiClean |
/Mathics3-6.0.2.tar.gz/Mathics3-6.0.2/mathics/builtin/image/base.py | from typing import Tuple
import numpy
import PIL.Image
from mathics.builtin.base import AtomBuiltin, String
from mathics.builtin.box.image import ImageBox
from mathics.builtin.colors.color_internals import convert_color
from mathics.core.atoms import Atom
from mathics.core.evaluation import Evaluation
from mathics.co... | PypiClean |
/Flask-Scaffold-0.5.1.tar.gz/Flask-Scaffold-0.5.1/app/templates/static/node_modules/angular-ui-router/site/js/marked.js | ;(function() {
/**
* Block-Level Grammar
*/
var block = {
newline: /^\n+/,
code: /^( {4}[^\n]+\n*)+/,
fences: noop,
hr: /^( *[-*_]){3,} *(?:\n+|$)/,
heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,
nptable: noop,
lheading: /^([^\n]+)\n *(=|-){3,} *\n*/,
blockquote: /^( *>[^\n]+(\n[^\n]+)*\n*)+/,
... | PypiClean |
/BRAILS-3.0.1.tar.gz/BRAILS-3.0.1/brails/modules/NumFloorDetector/lib/efficientdet/model.py | import torch.nn as nn
import torch
from torchvision.ops.boxes import nms as nms_torch
from lib.efficientnet import EfficientNet as EffNet
from lib.efficientnet.utils import MemoryEfficientSwish, Swish
from lib.efficientnet.utils_extra import Conv2dStaticSamePadding, MaxPool2dStaticSamePadding
def nms(dets, thresh):
... | PypiClean |
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/resolve/test/mock_sync.js | var path = require('path');
var test = require('tape');
var resolve = require('../');
test('mock', function (t) {
t.plan(4);
var files = {};
files[path.resolve('/foo/bar/baz.js')] = 'beep';
var dirs = {};
dirs[path.resolve('/foo/bar')] = true;
function opts(basedir) {
return {
... | PypiClean |
/BIT_framework-0.0.2-py3-none-any.whl/BIT_DL/pytorch/losses/rewards.py | import sys
from typing import Optional
import torch
from BIT_DL.pytorch.utils.shapes import mask_sequences
from BIT_DL.pytorch.utils.utils import sequence_mask
__all__ = [
"discount_reward",
"_discount_reward_tensor_1d",
"_discount_reward_tensor_2d",
]
def discount_reward(reward: torch.Tensor,
... | PypiClean |
/Barak-0.3.2.tar.gz/Barak-0.3.2/barak/absorb.py | from __future__ import division
from voigt import voigt
from convolve import convolve_psf
from utilities import between, adict, get_data_path, indexnear
from constants import Ar, me, mp, kboltz, c, e, sqrt_ln2, c_kms
from spec import find_wa_edges
from sed import make_constant_dv_wa_scale
from abundances import Asolar... | PypiClean |
/FoneAstra-3.0.1.tar.gz/FoneAstra-3.0.1/fa/static/fa/flot/jquery.flot.image.js | (function ($) {
var options = {
series: {
images: {
show: false,
alpha: 1,
anchor: "corner" // or "center"
}
}
};
$.plot.image = {};
$.plot.image.loadDataImages = function (series, options, callback) {
var ... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/codemirror/mode/rst/rst.js |
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("../python/python"), require("../stex/stex"), require("../../addon/mode/overlay"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/tree/ReformulationMatchStatements.py | import ast
from nuitka.nodes.AttributeNodes import (
ExpressionAttributeCheck,
makeExpressionAttributeLookup,
)
from nuitka.nodes.BuiltinLenNodes import ExpressionBuiltinLen
from nuitka.nodes.BuiltinTypeNodes import ExpressionBuiltinList
from nuitka.nodes.ComparisonNodes import makeComparisonExpression
from nu... | PypiClean |
/AssertionLib-3.2.2-py3-none-any.whl/assertionlib/README.rst | ``assertionlib``
================
A package for performing assertion operations.
``assertionlib.dataclass``
--------------------------
A class with a number of generic pre-defined (magic) methods inspired by
the builtin ``dataclasses`` module introduced in `Python 3.7`_.
``assertionlib.functions``
-----------------... | PypiClean |
/BullETS-0.1.1.tar.gz/BullETS-0.1.1/src/bullets/data_indicators/indicators.py | from bullets.data_source.data_source_interface import DataSourceInterface, Resolution
from bullets.runner import Runner
from datetime import datetime, timedelta
import math
class Indicators:
def __init__(self, data_source: DataSourceInterface):
self.data_source = data_source
def sma(self, symbol: str... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/lib/js/bootstrap.js | if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery')
}
+function ($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
throw ne... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/core/files/move.py | import os
from shutil import copymode, copystat
from django.core.files import locks
__all__ = ["file_move_safe"]
def _samefile(src, dst):
# Macintosh, Unix.
if hasattr(os.path, "samefile"):
try:
return os.path.samefile(src, dst)
except OSError:
return False
# All... | PypiClean |
/OASYS1-ALS-ShadowOui-0.0.60.tar.gz/OASYS1-ALS-ShadowOui-0.0.60/orangecontrib/shadow/als/widgets/utility/ow_als_caustic.py | from PyQt5 import QtGui, QtWidgets
from PyQt5.QtWidgets import QApplication
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui
from orangecontrib.shadow.util.shadow_objects import ShadowBeam
from orangecontrib.shadow.util.shadow_util import ShadowCongruenc... | PypiClean |
/Alarmageddon-1.1.2-py3-none-any.whl/alarmageddon/validations/cassandra.py |
from alarmageddon.validations.validation import Priority
from alarmageddon.validations.ssh import SshValidation
from alarmageddon.validations.utilities import format_node, format_cluster
import os
import re
import logging
logger = logging.getLogger(__name__)
# The output for Cassandra's nodetool status command ha... | PypiClean |
/GSEIM-1.4.tar.gz/GSEIM-1.4/src/grc/core/blocks/block.py | from __future__ import absolute_import
import collections
import itertools
import copy
import re
import ast
from ._flags import Flags
from ..base import Element
from ..utils.descriptors import lazy_property
def _get_elem(iterable, key):
items = list(iterable)
for item in items:
if item.key == key:... | PypiClean |
/MoonNectar-0.6.0.tar.gz/MoonNectar-0.6.0/mnectar/plugins/ui/pyqt5/console.py | import logging
# Change the log level for the pyqtconsole.qt module
# ... because it has an INFO level message which we don't want displayed every time
logging.getLogger('pyqtconsole.qt').setLevel('WARNING')
from PyQt5 import QtCore
from PyQt5 import QtGui
from PyQt5 import Q... | PypiClean |
/NeuroTS-3.4.0-py3-none-any.whl/neurots/extract_input/from_diameter.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 |
/Fleepy-0.2.1.tar.gz/Fleepy-0.2.1/fleepy/_account.py | from attrdict import AttrDict
class Account(object):
"""Account management.
https://fleep.io/fleepapi/ref-account.html
"""
def __init__(self, server, handler='account'):
self._server = server
self._handler = handler
self.smtp = AttrDict({
'configure': self.smtp_co... | PypiClean |
/CQPy-0.1.2.tar.gz/CQPy-0.1.2/cqpy/cqp.py | from base64 import b64decode
from typing import List
from cqpy.types import BinPack, GroupMemberInfo, GroupInfo, ListedGroupInfo, FriendInfo, UserInfo
try:
import _embed
except ImportError:
raise RuntimeError('CQPy only run within top.weak-ptr.cqpy CoolQ plugin.')
# internal
AUTH_CODE: int = _embed.AUTH_CODE... | PypiClean |
/EHRcorral-0.0.3.tar.gz/EHRcorral-0.0.3/docs/modules.rst | ========
Modules
========
ehrcorral.ehrcorral
-------------------
Herd
^^^^
.. autoclass:: ehrcorral.ehrcorral.Herd
:members:
Record
^^^^^^
.. autoclass:: ehrcorral.ehrcorral.Record
:members:
Profile
^^^^^^^
.. autoclass:: ehrcorral.ehrcorral.Profile
:member-order: bysource
gen_record()
^^^^^^^^^^^^
.... | PypiClean |
/Num_CFS_Cluster-0.5.3.tar.gz/Num_CFS_Cluster-0.5.3/Numerical_CFS/Test.py | from sympy.printing import ccode
from scipy import integrate
from symengine import I
from sympy import *
from Numerical_CFS.configfunktion import configfunktion
from Numerical_CFS.Lib_Action_Minimum import *
import configparser
import sympy as sy
import symengine as si
import numpy as np
import random
import time
impor... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/web-animations-js/CONTRIBUTING.md | ## Developer instructions
### Setup
1. Fork web-animations/web-animations-js.
1. `git clone git@github.com:$GITHUB_USER/web-animations-js.git`
1. `git submodule update --init --recursive` (Necessary for running tests.)
1. Install [node](https://nodejs.org/en/) and make sure `npm` is in your $PATH
1. Run `npm install`... | PypiClean |
/KalaPy-0.4.2.tar.gz/KalaPy-0.4.2/docs/source/settings.rst | Settings
========
A settings file contains all the configuration of your KalaPy application. A
settings file is just a normal Python module with module-level variables.
There are two kind of settings file, `project settings` located in the top-level
project directory and `package settings` located in the package dire... | PypiClean |
/OBP_reliability_pillar-0.2.0.tar.gz/OBP_reliability_pillar-0.2.0/OBP_reliability_pillar/auto_scaling/asg_elb_healthcheck_required.py | import logging
import botocore
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger()
def asg_elb_healthcheck_required(self) -> dict:
"""
:param self:
:return dict:
"""
logger.info(" ---Inside autoscaling :: asg_elb_healthcheck_required()")
self.refresh_session()
result = ... | PypiClean |
/Cryp-0.2.tar.gz/Cryp-0.2/cryp/backup.py | import getpass
import yaml
from . import storage
def dump(file):
import getpass
store = storage.Storage()
while True:
value = getpass.getpass('Master password: ')
if not value:
return
if store.open(value):
break
for uid, _, description in store.titles:
... | PypiClean |
/NEMO_CE-1.6.12-py3-none-any.whl/NEMO/views/accounts_and_projects.py | from django.contrib.auth.decorators import login_required
from django.http import HttpResponseBadRequest, HttpResponseForbidden
from django.shortcuts import get_object_or_404, redirect, render
from django.views.decorators.http import require_GET, require_POST, require_http_methods
from NEMO.decorators import accountin... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/full/lang/oc.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/license
*/
CKEDITOR.lang['oc']={"editor":"Editor de tèxte enriquit","editorPanel":"Tablèu de bòrd de l'editor de tèxte enriquit","common":{"editorHelp":"Utilisatz l'acorchi Alt-0 per obt... | PypiClean |
/ocn-xmlchecker.env.tar.gz/env (copy)/lib/python2.7/encodings/mac_turkish.py |
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input,errors='strict'):
return codecs.charmap_decode(input,errors,decoding_table)
class IncrementalEncoder(codecs... | PypiClean |
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/utilities/profiler/profiler.py | import time
from datetime import datetime, timezone
from functools import wraps
import mindsdb.utilities.hooks as hooks
from mindsdb.utilities.config import Config
from mindsdb.utilities.context import context as ctx
def _get_current_node(profiling: dict) -> dict:
""" return the node that the pointer points to
... | PypiClean |
/Djblets-3.3.tar.gz/Djblets-3.3/djblets/db/fields/base64_field.py | from base64 import (decodebytes as base64_decode,
encodebytes as base64_encode)
from django.db import models
from django.utils.encoding import force_str, smart_str
from django.utils.translation import gettext as _
class Base64TypeError(TypeError):
"""Error indicating an invalid value type was... | PypiClean |
/Kheiron-1.0.4-py3-none-any.whl/kheiron/utils/metrics.py | from typing import Union, List, Dict
from collections import defaultdict
class DefaultMetrics:
@staticmethod
def _calc_micro_metrics(tp, p, t, percent=True):
"""
Compute overall precision, recall and FB1 (default values are 0.0)
if percent is True, return 100 * original decimal... | PypiClean |
/Browthon-Reborn-1.0.1.tar.gz/Browthon-Reborn-1.0.1/browthon/Core/Widgets/browserWidget.py |
from PySide2.QtWebEngineWidgets import QWebEngineView, QWebEnginePage
from PySide2.QtCore import QUrl, Qt, QEvent, QEventLoop, QPoint, QPointF, QTimer
from PySide2.QtWidgets import QAction
from PySide2.QtGui import QKeySequence
from browthon.Core.Utils.webHitTestResult import WebHitTestResult
from browthon.Core.Utils... | PypiClean |
/IMAPClient-2.3.1.zip/IMAPClient-2.3.1/imapclient/imapclient.py |
from __future__ import unicode_literals
import functools
import imaplib
import itertools
import select
import socket
import sys
import re
import warnings
from collections import namedtuple
from datetime import datetime, date
from operator import itemgetter
from logging import LoggerAdapter, getLogger
from six import... | PypiClean |
/MihkelMagic_Electrical-0.8.0.tar.gz/MihkelMagic_Electrical-0.8.0/Electrical_MM/specific_electrical.py | import numpy as np
import pandas as pd
import xlwt
from xlwt import Workbook, easyxf
from general_functions import *
def calculate_values(data, calculation_indeces, inx):
ESR_10ms=np.array([])
ESR_1s=np.array([])
ESR_5s=np.array([])
capacitance=np.array([])
RTE=np.array([])
for step in calculation_indeces:
... | PypiClean |
/IOT3ApiClient-1.0.0.tar.gz/IOT3ApiClient-1.0.0/urllib3/util/connection.py | from __future__ import absolute_import
import socket
from urllib3.exceptions import LocationParseError
from ..contrib import _appengine_environ
from ..packages import six
from .wait import NoWayToWaitForSocketError, wait_for_read
def is_connection_dropped(conn): # Platform-specific
"""
Returns True if the... | PypiClean |
/HavNegpy-1.2.tar.gz/HavNegpy-1.2/docs/_build/html/_build/doctrees/nbsphinx/_build/html/_build/doctrees/nbsphinx/_build/doctrees/nbsphinx/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 |
/Adafruit_Blinka-8.20.1-py3-none-any.whl/adafruit_blinka/microcontroller/bcm283x/pwmio/PWMOut.py | """Custom PWMOut Wrapper for Rpi.GPIO PWM Class"""
from RPi import GPIO
GPIO.setmode(GPIO.BCM) # Use BCM pins D4 = GPIO #4
GPIO.setwarnings(False) # shh!
# pylint: disable=unnecessary-pass
class PWMError(IOError):
"""Base class for PWM errors."""
pass
# pylint: enable=unnecessary-pass
class PWMOut:
... | PypiClean |
/BlueWhale3-Educational-0.4.1.tar.gz/BlueWhale3-Educational-0.4.1/orangecontrib/educational/widgets/utils/gradient_descent.py | import numpy as np
from scipy.optimize import fmin_l_bfgs_b
from Orange.classification import Model
class GradientDescent:
"""
Logistic regression algorithm with custom cost and gradient function,
which allow to perform algorithm step by step
Parameters
----------
alpha : float
Learn... | PypiClean |
/DRUGseq_tools-0.0.1-py3-none-any.whl/pipeline/drug/featureCounts.py | import re
import subprocess
import pysam
from pipeline.drug.__init__ import __STEPS__
from pipeline.toolkits import utils
from pipeline.toolkits.report import reporter
class FEATURECOUNTS():
"""
Features
- Assigning uniquely mapped reads to genomic features with FeatureCounts.
Arguments:
- ... | PypiClean |
/BotEXBotBase-3.1.3.tar.gz/BotEXBotBase-3.1.3/redbot/core/cli.py | import argparse
import asyncio
def confirm(m=""):
return input(m).lower().strip() in ("y", "yes")
def interactive_config(red, token_set, prefix_set):
loop = asyncio.get_event_loop()
token = ""
print("Red - Discord Bot | Configuration process\n")
if not token_set:
print("Please enter a ... | PypiClean |
/CRIkit2-0.4.4.tar.gz/CRIkit2-0.4.4/docs/source/crikit.io.rst | crikit.io package
=================
Subpackages
-----------
.. toctree::
:maxdepth: 4
crikit.io.lazy5
crikit.io.tests
Submodules
----------
crikit.io.csv\_nist module
--------------------------
.. automodule:: crikit.io.csv_nist
:members:
:undoc-members:
:show-inheritance:
crikit.io.hdf5 module... | PypiClean |
/Dandelion-0.17.26-py3-none-any.whl/dandelion/ext/CV/CV.py | __author__ = 'dawei.leng'
import numpy as np
from PIL import Image, ImageFile, ExifTags
ImageFile.LOAD_TRUNCATED_IMAGES = True
def imread(f, flatten=False, dtype='float32'):
"""
Read image from file, backend=scipy
f : str or file object -> The file name or file object to be read.
flatten : bool,... | PypiClean |
/MyoSuite-2.0.1-py3-none-any.whl/myosuite/envs/myo/myodex/__init__.py | from gym.envs.registration import register
import collections
import os
import numpy as np
curr_dir = os.path.dirname(os.path.abspath(__file__))
# Task specification format
task_spec = collections.namedtuple('task_spec',
['name', # task_name
'robot', # robot name
'object', ... | PypiClean |
/Hatta-1.6.7.tar.gz/Hatta-1.6.7/hatta/static/scripts.js | var hatta = function () {
var hatta = {};
hatta._parse_date = function (text) {
/* Parse an ISO 8601 date string. */
var m = /^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})Z$/.exec(text);
return new Date(
Date.UTC(+m[1], +m[2] - 1, +m[3], +m[4], +m[5], +... | PypiClean |
/CFXplorer-0.1.0-py3-none-any.whl/cfxplorer/utils.py | import numpy as np
import tensorflow as tf
def safe_euclidean(matrix_diff, epsilon=10.0**-10) -> tf.Tensor:
"""
Calculates the Euclidean distance between two matrices with a small epsilon added to prevent singularities.
Args:
matrix_diff: A tensor representing the difference between two matrices
... | PypiClean |
/OSG-Gratia-Viewer-0.1.tar.gz/OSG-Gratia-Viewer-0.1/src/gratia/tools/gip_record.py |
import datetime
import MySQLdb
from gratia.gip.ldap import query_bdii, read_ldap, config_file
from gratia.gip.common import cp_get, getGipDBConn, findCE
insert_vo_info = """
insert into vo_info values
( %(time)s,
%(runningJobs)s,
%(totalCpus)s,
%(freeJobSlots)s,
%(maxTotalJobs)s,
%(totalJobs)s,
%(status... | PypiClean |
/GaiaCurves-1.0.2.tar.gz/GaiaCurves-1.0.2/README.md | # GaiaCurves!
## Motivation
The package is supposed to give the light curves of variable stars from Gaia Data Releases (1 and 2) with a star name that can be resolved by SIMBAD. It eliminates the need of checking different folders/without going through the task of using separate CSV files and cross-matching tables or ... | PypiClean |
/DendroPy-4.6.1.tar.gz/DendroPy-4.6.1/src/dendropy/dataio/nexmlwriter.py |
##############################################################################
## DendroPy Phylogenetic Computing Library.
##
## Copyright 2010-2015 Jeet Sukumaran and Mark T. Holder.
## All rights reserved.
##
## See "LICENSE.rst" for terms and conditions of usage.
##
## If you use this work or any portion there... | PypiClean |
/Makima-0.1.9.1-py3-none-any.whl/makima/mac/call_mac_api/call_quartz_event_services.py | import time
import Quartz
def mouse_move_event(x, y):
event = Quartz.CGEventCreateMouseEvent(None, Quartz.kCGEventMouseMoved, (x, y), Quartz.kCGMouseButtonLeft)
Quartz.CGEventPost(Quartz.kCGHIDEventTap, event)
def scroll_wheel_event(x, y):
event = Quartz.CGEventCreateScrollWheelEvent(None, Quartz.kCGSc... | PypiClean |
/LambdaGuard-2.4.3.tar.gz/LambdaGuard-2.4.3/lambdaguard/utils/log.py | import logging
import logging.config
import traceback
from pathlib import Path
def configure_log(path=""):
logpath = Path(path, "lambdaguard.log").as_posix()
logging.config.dictConfig(
{
"version": 1,
"disable_existing_loggers": False,
"formatters": {
... | PypiClean |
/DACBench-0.2.0.tar.gz/DACBench-0.2.0/dacbench/wrappers/episode_time_tracker.py | import time
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sb
from gymnasium import Wrapper
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
sb.set_style("darkgrid")
current_palette = list(sb.color_palette())
class EpisodeTimeWrapper(Wrapper):
"""
Wrapper to ... | PypiClean |
/Bis-Miner-3.11.1.tar.gz/Bis-Miner-3.11.0/Orange/preprocess/continuize.py | from Orange.data import ContinuousVariable, Domain, Table
from Orange.statistics import distribution
from Orange.util import Reprable
from .transformation import Identity, Indicator, Indicator1, Normalizer
from .preprocess import Continuize
from Orange.preprocess.util import _RefuseDataInConstructor
__all__ = ["Domain... | PypiClean |
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas_rhino/artists/volmeshartist.py | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import compas_rhino
from compas.geometry import centroid_points
from compas.artists import VolMeshArtist
from .artist import RhinoArtist
class VolMeshArtist(RhinoArtist, VolMeshArtist):
"""Artist for draw... | PypiClean |
/GISAXS_XPCS-0.2.5.tar.gz/GISAXS_XPCS-0.2.5/gisaxs_xpcs/common_tools.py | import time
import os
from typing import Optional, List
import logging
from pathlib import Path
from gisaxs_xpcs.read_edf import read_header_from_file
_DEFAULT_MONETA_DIR = '/home/vladimir/remote_folder/OMBD/'
class MonetaDirNotSetError(ValueError):
"""Please, set the correct _path to OMBD folder on moneta serv... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/geo/openlayers/Patch.js.uncompressed.js | define("dojox/geo/openlayers/Patch", [
"dojo/_base/kernel",
"dojo/_base/lang", // dojo.extend getObject
"dojo/_base/sniff", // dojo.isIE
"dojox/gfx",
"dojox/gfx/shape"
], function(dojo, lang, sniff, gfx, shape){
var dgo = lang.getObject("geo.openlayers", true, dojox);
dgo.Patch = {
patchMethod : function(/*... | PypiClean |
/EthTx-0.3.22.tar.gz/EthTx-0.3.22/ethtx/semantics/solidity/precompiles.py |
from ethtx.models.semantics_model import FunctionSemantics, ParameterSemantics
precompiles = {
1: FunctionSemantics(
signature="",
name="ecrecover",
inputs=[
ParameterSemantics(parameter_name="hash", parameter_type="bytes32"),
ParameterSemantics(parameter_name="v",... | PypiClean |
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/address/es_CO/__init__.py | from collections import OrderedDict
from typing import List, Tuple
from ..es import Provider as AddressProvider
class Provider(AddressProvider):
departments = {
"05": "Antioquia",
"08": "Atlántico",
"11": "Bogotá, D.C.",
"13": "Bolívar",
"15": "Boyacá",
"17": "Cald... | PypiClean |
/CosmoTech-SupplyChain-5.1.0.tar.gz/CosmoTech-SupplyChain-5.1.0/Supplychain/Transform/production_route.py | from csm.engine import SimulatorInterface
from Supplychain.Generic.adx_and_file_writer import ADXAndFileWriter
import pandas as pd
def send_production_route_data(writer: ADXAndFileWriter,
simulation_id: str,
simulator: SimulatorInterface):
df = get_sor... | PypiClean |
/Office365-REST-Python-Client-2.4.3.tar.gz/Office365-REST-Python-Client-2.4.3/office365/sharepoint/listitems/version.py | from office365.runtime.paths.resource_path import ResourcePath
from office365.runtime.paths.service_operation import ServiceOperationPath
from office365.sharepoint.base_entity import BaseEntity
class ListItemVersion(BaseEntity):
"""Represents a version of a list item."""
@property
def version_id(self):
... | PypiClean |
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/isbn/isbn.py | from typing import Any, Optional
class ISBN:
MAX_LENGTH = 13
def __init__(
self,
ean: Optional[str] = None,
group: Optional[str] = None,
registrant: Optional[str] = None,
publication: Optional[str] = None,
) -> None:
self.ean = ean
self.group = grou... | PypiClean |
/OTSun-2.10.6.tar.gz/OTSun-2.10.6/LICENSE.md | MIT License
Copyright (c) 2017 Biel Cardona, Ramon Pujol
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, ... | PypiClean |
/Divisi2-2.2.5.tar.gz/Divisi2-2.2.5/divisi2/blending.py | from divisi2.sparse import SparseMatrix
import numpy as np
def blend_factor(mat):
"""
Use the blending heuristic to suggest an appropriate weight for combining
this matrix with others.
"""
U, S, V = mat.svd(1)
return 1.0/S[0]
def blend(mats, factors=None, symmetric=False, post_weights=None):
... | PypiClean |
/DpmModule-1.1.0-py3-none-any.whl/dpmModule/jobs/__init__.py | from . import archmageFb as archmageFb
from . import archmageTc as archmageTc
from . import bishop as bishop
from . import hero as hero
from . import paladin as paladin
from . import sniper as sniper
from . import windBreaker as windbreaker
from . import soulmaster as soulmaster
from . import luminous as luminous
from ... | PypiClean |
/Flask_Admin-1.6.1-py3-none-any.whl/flask_admin/contrib/mongoengine/widgets.py | from wtforms.widgets import html_params
from markupsafe import escape
from mongoengine.fields import GridFSProxy, ImageGridFsProxy
from flask_admin._backwards import Markup
from flask_admin.helpers import get_url
from . import helpers
class MongoFileInput(object):
"""
Renders a file input chooser field... | PypiClean |
/Kickbase_API-0.0.8.tar.gz/Kickbase_API-0.0.8/kickbase_api/kickbase.py | from datetime import datetime, timedelta, timezone
from typing import Union
import requests
import json
from kickbase_api.exceptions import KickbaseLoginException, KickbaseException
from kickbase_api.models._transforms import parse_date, date_to_string
from kickbase_api.models.chat_item import ChatItem
from kickbase_... | PypiClean |
/NlpToolkit-DataGenerator-1.0.7.tar.gz/NlpToolkit-DataGenerator-1.0.7/README.md | Data Generator
============
Video Lectures
============
[<img src=https://github.com/StarlangSoftware/DataGenerator/blob/master/video1.jpg width="50%">](https://youtu.be/E9rE_eCffPE)[<img src=https://github.com/StarlangSoftware/DataGenerator/blob/master/video2.jpg width="50%">](https://youtu.be/ISHmGWvHL7k)
For Deve... | PypiClean |
/EZFF-1.0.0.tar.gz/EZFF-1.0.0/examples/lj-gulp-save-restart/run_step2_restart.py | import ezff
from ezff.interfaces import gulp, vasp
import numpy as np
# DEFINE GROUND TRUTHS
gt_bulk_modulus = 1.1236 #GPa
gt_structure = vasp.read_atomic_structure('ground_truths/POSCAR')
def my_error_function(variable_values, template):
myrank = ezff.get_pool_rank()
# Configure GULP job.
path = str(my... | PypiClean |
/Authlog-1.0.0.tar.gz/Authlog-1.0.0/authlog/models.py | from __future__ import absolute_import
from django.db import models
from collections import defaultdict
ACTION_TYPE = defaultdict(lambda: 0) # return 0 if action not defined
ACTION_TYPE.update(dict(VIEW_CHANGE=1, SUBMIT_CHANGE=2, VIEW_DELETE=3,
SUBMIT_DELETE=4, VIEW_HISTORY=5, VIEW_LIST=6,
... | PypiClean |
/LEPL-5.1.3.zip/LEPL-5.1.3/src/lepl/regexp/unicode.py | from sys import maxunicode
from lepl.regexp.str import StrAlphabet, ILLEGAL
from lepl.support.lib import chr, lmap, fmt
_WHITESPACE = '\u0009\u000A\u000B\u000C\u000D\u0020\u0085\u00A0\u1680' \
'\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007' \
'\u2008\u2009\u200a\u2028\u2029\u2... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/iron-validatable-behavior/.github/ISSUE_TEMPLATE.md | <!-- Instructions: https://github.com/PolymerElements/iron-validatable-behavior/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... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/contrib/gis/geos/collections.py | from django.contrib.gis.geos import prototypes as capi
from django.contrib.gis.geos.geometry import GEOSGeometry, LinearGeometryMixin
from django.contrib.gis.geos.libgeos import GEOM_PTR
from django.contrib.gis.geos.linestring import LinearRing, LineString
from django.contrib.gis.geos.point import Point
from django.con... | PypiClean |
/BabitMF_GPU-0.0.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/bmf/python_modules/Module_scale_gpu/scale_gpu.py | import re
from bmf import *
import bmf.hml.hmp as hmp
import cvcuda
class scale_gpu(Module):
def __get_size(self, size_str):
split = re.split('\*|x|,', size_str)
w = int(split[0])
h = int(split[1])
return w, h
def __get_algo(self, algo_str):
return {
'are... | PypiClean |
/ARS-0.5a2.zip/ARS-0.5a2/ars/model/collision/ode_objects_factories.py | import ode
#==============================================================================
# Environment
#==============================================================================
def create_ode_simple_space():
"""Create an ODE geoms container (i.e. "space") of the simplest type.
.. note::
``ode.SimpleSpac... | PypiClean |
/NlpToolkit-Math-1.0.18.tar.gz/NlpToolkit-Math-1.0.18/Math/Vector.py | from __future__ import annotations
import math
from Math.VectorSizeMismatch import VectorSizeMismatch
class Vector(object):
__size: int
__values: list
def __init__(self,
valuesOrSize=None,
initial=None):
"""
A constructor of Vector class which takes a l... | PypiClean |
/APC_Power_Usage-0.1.5-py3-none-any.whl/APC_Power_Usage-0.1.5.dist-info/LICENSE.md | GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Pream... | PypiClean |
/Flask-Douwa-1.2.1.tar.gz/Flask-Douwa-1.2.1/flask_douwa/rpc_client/rpc_data_pb2.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.p... | PypiClean |
/NREL_reVX-0.3.53-py3-none-any.whl/reVX/rpm/rpm_manager.py | from concurrent.futures import as_completed
import logging
import os
import pandas as pd
import psutil
from warnings import warn
from reVX.handlers.outputs import Outputs
from reVX.rpm.rpm_clusters import RPMClusters
from reVX.rpm.rpm_output import RPMOutput
from reVX.utilities.exceptions import RPMValueError, RPMRunt... | PypiClean |
/ExifReader-0.1.1-py3-none-any.whl/exifreader/tags/exif.py | from ..utils import make_string, make_string_uc
# Interoperability tags
INTEROP_TAGS = {
0x0001: ('InteroperabilityIndex', ),
0x0002: ('InteroperabilityVersion', ),
0x1000: ('RelatedImageFileFormat', ),
0x1001: ('RelatedImageWidth', ),
0x1002: ('RelatedImageLength', ),
}
INTEROP_INFO = (
'Inter... | PypiClean |
/Dio_package_house_rocket_project-0.0.1.tar.gz/Dio_package_house_rocket_project-0.0.1/Dio_package_house_rocket_project/house_rocket_project.py | import streamlit as st
import pandas as pd
import plotly.express as px
##############################################################
# Set Browser Layout
##############################################################
st.set_page_config(layout='wide')
@st.cache(allow_output_mutation=True)
##########################... | PypiClean |
/MDAnalysisData-0.8.1.tar.gz/MDAnalysisData-0.8.1/docs/helpers.rst | .. _helpers:
=========
Helpers
=========
A small number of functions and classes are included to help organize
the data.
.. currentmodule:: MDAnalysisData.base
For users
=========
.. autoclass:: Bunch
:members:
.. autodata:: DEFAULT_DATADIR
.. autofunction:: get_data_home
.. autofunction:: clear_data_h... | PypiClean |
/FiddleOptions-1.2.4.tar.gz/FiddleOptions-1.2.4/mercury/client/model/condor.py | import pprint
import six
from mercury.client.model import Trade # noqa: F401,E501
from mercury.client.model.option_contract_type import OptionContractType
class CondorValueException(Exception):
pass
class BaseCondor(Trade):
"""
This class must not used directly.
"""
def __init__(self,
... | PypiClean |
/DevContest-0.4.tar.gz/DevContest-0.4/devcontest/public/jsmath/plugins/spriteImageFonts.js | if (!window.jsMath) {window.jsMath = {}}
jsMath.spriteImageFonts = {version: "1.1"};
if (!jsMath.styles) {jsMath.styles = []}
jsMath.styles['.typeset .img'] = {
position: 'relative',
display: 'inline-block',
overflow: 'hidden',
'background-repeat': 'no-repeat'
};
jsMath.styles['.typeset .img .xy'] = {
p... | PypiClean |
/mysmile-0.7.2.tar.gz/mysmile-0.7.2/apps/preferences/models.py | from django.db import models
from django.utils.translation import ugettext_lazy as _
class PreferencesManager(models.Manager):
def get_all(self):
p = Preferences.objects.all().values('key', 'value')
c = {}
for item in p:
c[item['key']] = item['value']
return c
def ... | PypiClean |
/C-Telethon-1.28.5.tar.gz/C-Telethon-1.28.5/telethon/tl/types/photos.py | from ...tl.tlobject import TLObject
from typing import Optional, List, Union, TYPE_CHECKING
import os
import struct
from datetime import datetime
if TYPE_CHECKING:
from ...tl.types import TypePhoto, TypeUser
class Photo(TLObject):
CONSTRUCTOR_ID = 0x20212ca8
SUBCLASS_OF_ID = 0xc292bd24
def __init__(... | PypiClean |
/Lango-0.21.0.tar.gz/Lango-0.21.0/lango/parser.py | from nltk.parse.stanford import StanfordParser, GenericStanfordParser
from nltk.internals import find_jars_within_path
from nltk.tree import Tree
from pycorenlp import StanfordCoreNLP
class Parser:
"""Abstract Parser class"""
def __init__():
pass
def parse(self, sent):
pass
class OldSta... | PypiClean |
/DagApi-0.1.2.tar.gz/DagApi-0.1.2/DAGAPI/BlockExplorerApi.py | import requests
class BlockExplorer (object):
REST_API_URL = 'https://block-explorer.constellationnetwork.io'
#Snapshot chapter
def latest_snapshot(self):
'''Get latest (the highest) snapshot
{
"hash": "1ae6e0f9161b7a29c96e8accb853fb479e0ea026832850ff5de... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/drawing/manager/Stencil.js.uncompressed.js | define("dojox/drawing/manager/Stencil", ["dijit","dojo","dojox"], function(dijit,dojo,dojox){
dojo.provide("dojox.drawing.manager.Stencil");
(function(){
var surface, surfaceNode;
dojox.drawing.manager.Stencil = dojox.drawing.util.oo.declare(
// summary:
// The main class for tracking Stencils that are cretaed,... | PypiClean |
/MezzanineFor1.7-3.1.10.tar.gz/MezzanineFor1.7-3.1.10/mezzanine/pages/migrations/south/0005_rename_contentpage.py | import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
orm.Page.objects.filter(content_model="contentpage").update(content_model="richtextpage")
def backwards(self, orm):
orm.Page.objects... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/pip/_internal/utils/misc.py | from __future__ import absolute_import
import contextlib
import errno
import io
# we have a submodule named 'logging' which would shadow this if we used the
# regular name:
import logging as std_logging
import os
import posixpath
import re
import shutil
import stat
import subprocess
import sys
import tarfile
import zi... | PypiClean |
/564bff00ff_strawberry_graphql-0.168.2-py3-none-any.whl/strawberry/experimental/pydantic/error_type.py | from __future__ import annotations
import dataclasses
import warnings
from typing import (
TYPE_CHECKING,
Any,
Callable,
List,
Optional,
Sequence,
Tuple,
Type,
Union,
cast,
)
from pydantic import BaseModel
from pydantic.utils import lenient_issubclass
from strawberry.auto impo... | PypiClean |
/Euphorie-15.0.2.tar.gz/Euphorie-15.0.2/docs/index.rst | .. _index:
************************************************
:mod:`Euphorie` -- Euphorie Risk Assessment tool
************************************************
Translations
============
The following translations are available for this document:
:doc:`English <index>`
:doc:`Français <index_fr>`
Ελληνικά
Nederlands
:d... | PypiClean |
/MyQuery-0.0.6.tar.gz/MyQuery-0.0.6/myquery/util/sql_builder_util.py | import re
class SQLBuilderUtil(object):
@staticmethod
def get_key_str(keys):
"""
获取 键 的字符串拼接
fields list
eg:
>>> SQLBuilderUtil.get_key_str(["name", "age"])
'`name`, `age`'
"""
return ", ".join(["`{}`".format(key) for key in keys])
@staticm... | PypiClean |
/Grammaticomastix-0.0.1rc2-py3-none-any.whl/grammaticomastix/dchars/languages/grc/transliterations/basic/ucombinations.py | from dchars.dchars import new_dstring
from dchars.languages.grc.dcharacter import DCharacterGRC
from dchars.languages.grc.transliterations.basic.basic import dchar__get_translit_str
import itertools
#///////////////////////////////////////////////////////////////////////////
def get_usefull_combinations():
"""
... | PypiClean |
/GANetic-0.0.11.tar.gz/GANetic-0.0.11/ganetic/cyclegan.py | from torch import nn
from torch.nn import functional as F
from ganetic import basemodel
class ResidualBlock(nn.Module):
def __init__(self, channels):
super(ResidualBlock, self).__init__()
self.block = nn.Sequential(
nn.ReflectionPad2d(1),
nn.Conv2d(channels, channels, kern... | PypiClean |
/KalturaApiClient-19.3.0.tar.gz/KalturaApiClient-19.3.0/KalturaClient/Plugins/Group.py | from __future__ import absolute_import
from .Core import *
from .ElasticSearch import *
from ..Base import (
getXmlNodeBool,
getXmlNodeFloat,
getXmlNodeInt,
getXmlNodeText,
KalturaClientPlugin,
KalturaEnumsFactory,
KalturaObjectBase,
KalturaObjectFactory,
KalturaParams,
KalturaS... | PypiClean |
/Meringue-0.3.1.a.3.tar.gz/Meringue-0.3.1.a.3/meringue/utils/thumbnails.py |
from PIL import Image
import logging
import math
import os.path
import re
try:
from hashlib import md5
except ImportError:
from md5 import md5
from django.conf import settings
from meringue import settings as wn_settings
class Thumbnail(object):
crop_method = wn_settings.THUMBNAIL_CROP_MOTHOD
resi... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.