id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/Firefly%20III%20API%20Python%20Client-1.5.6.post2.tar.gz/Firefly III API Python Client-1.5.6.post2/firefly_iii_client/model/rule_action.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
/FancyQt-1.0.1.tar.gz/FancyQt-1.0.1/fancyqt/firefox.py
import fancyqt.firefox_rc values = { "ffWhite": "#fffdfc", "ffBackground": "#d6d2d0", "ffBackgroundAlternative": "#c7c3c0", "ffBorder": "#a09a94", "ffIconFill": "#797c80", "ffButtonHighlightMenu": "#edebea", "ffButtonHighlightMenuBorder": "#b2b0af", "ffButtonHighlightMain": "#f6f6f5", ...
PypiClean
/DB%20Transfer-0.5.6.tar.gz/DB Transfer-0.5.6/db_transfer/adapter_redis.py
import redis import ujson from db_transfer.adapter import Adapter class Redis(Adapter): """ Redis adapter. It connects to Redis database. """ connection = {} def __init__(self, transfer=None): self._transfer = transfer self.HOST = None self.PORT = None self.DB =...
PypiClean
/Axelrod-4.13.0.tar.gz/Axelrod-4.13.0/axelrod/strategies/grudger.py
from axelrod.action import Action from axelrod.player import Player C, D = Action.C, Action.D class Grudger(Player): """ A player starts by cooperating however will defect if at any point the opponent has defected. This strategy came 7th in Axelrod's original tournament. Names: - Friedman'...
PypiClean
/CmonCrawl-1.0.3.tar.gz/CmonCrawl-1.0.3/docs/build/html/_static/copybutton_funcs.js
function escapeRegExp(string) { return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string } // Callback when a copy button is clicked. Will be passed the node that was clicked // should then grab the text and replace pieces of text that shouldn't be used in output export function f...
PypiClean
/Lemuras-1.2.3-py3-none-any.whl/lemuras/processing.py
__author__ = 'AivanF' __copyright__ = 'Copyright 2020, AivanF' __contact__ = 'projects@aivanf.com' from datetime import date, datetime import numbers, math, functools from .utils import call_with_numbers_only, call_with_existing_only def mode(lst): return max(set(lst), key=lst.count) def percentile(lst, percent=0...
PypiClean
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas_rhino/conduits/lines.py
from __future__ import print_function from __future__ import absolute_import from __future__ import division from System.Drawing.Color import FromArgb from Rhino.Geometry import Point3d from compas.utilities import is_sequence_of_iterable from compas.utilities import iterable_like from .base import BaseConduit cla...
PypiClean
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/ats/model/visibility_enum.py
import re # noqa: F401 import sys # noqa: F401 from typing import ( Optional, Union, List, Dict, ) from MergePythonSDK.shared.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, OpenApiModel, change_keys_js_to_python,...
PypiClean
/AskQuora-0.2.5-py3-none-any.whl/AskQuora-0.2.5.dist-info/DESCRIPTION.rst
AskQuora ======== |pypi.python.org| |build Status| Quora Q&A right from the command line! Inspired by https://github.com/gleitz/howdoi Installation & Usage: --------------------- :: sudo pip install -U askquora or if you like to live on the bleeding edge: :: sudo python setup.py install Run it using `...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/mobile/_compat.js.uncompressed.js
define("dojox/mobile/_compat", [ "dojo/_base/array", // array.forEach "dojo/_base/config", "dojo/_base/connect", // connect.connect "dojo/_base/fx", // fx.fadeOut, fx.fadeIn "dojo/_base/lang", // lang.extend, lang.isArray "dojo/_base/sniff", // has("webkit"), has("ie") "dojo/_base/window", // win.doc, win.body ...
PypiClean
/Ceygen-0.3.tar.gz/Ceygen-0.3/doc/core.rst
============================= Core Data Types and Functions ============================= This module provides basic linear algebra operations such as vector and matrix products as provided by the <`Eigen/Core`_> include. Core Data Types =============== .. module:: ceygen.dtype .. data:: dtype Cython `fused typ...
PypiClean
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/moment/locale/hy-am.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
/DendroPy_calver-2023.330.2-py3-none-any.whl/dendropy/utility/container.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
/IPFX-1.0.8.tar.gz/IPFX-1.0.8/ipfx/bin/run_feature_vector_extraction.py
import numpy as np import argschema as ags import logging import traceback from multiprocessing import Pool from functools import partial import os import h5py from ipfx.stimulus import StimulusOntology import allensdk.core.json_utilities as ju import ipfx.feature_vectors as fv import ipfx.lims_queries as lq import ipf...
PypiClean
/FF-Flask-Security-3.1.0.tar.gz/FF-Flask-Security-3.1.0/ff_flask_security/core.py
from datetime import datetime import pkg_resources, base64, urllib, onetimepass from flask import current_app, render_template, session from flask_babelex import Domain from flask_login import UserMixin as BaseUserMixin from flask_login import AnonymousUserMixin, LoginManager, current_user from flask_principal import ...
PypiClean
/DobbyStock-0.1.tar.gz/DobbyStock-0.1/.history/Test_Stock_Main_20221224102437.py
import unittest from main_package.Stock_main import * class TestStock(unittest.TestCase): # test class @classmethod def setUpClass(cls): print('setupClass') def setUp(self): print('Set up') def test_high_price(self): self.high_price_list = [20...
PypiClean
/C-Telethon-1.28.5.tar.gz/C-Telethon-1.28.5/telethon/sessions/sqlite.py
import datetime import os import time from ..tl import types from .memory import MemorySession, _SentFileType from .. import utils from ..crypto import AuthKey from ..tl.types import ( InputPhoto, InputDocument, PeerUser, PeerChat, PeerChannel ) try: import sqlite3 sqlite3_err = None except ImportError as...
PypiClean
/OBP_security_pillar-0.2.1-py3-none-any.whl/OBP_security_pillar/auto_scaling/launch_config_public_ip_disabled.py
import logging import botocore logging.basicConfig(level=logging.INFO) logger = logging.getLogger() def launch_config_public_ip_disabled(self) -> dict: """ :param self: :return: """ logger.info(" ---Inside autoscaling :: launch_config_public_ip_disabled()") self.refresh_session() result...
PypiClean
/Flask-SSO-0.4.0.tar.gz/Flask-SSO-0.4.0/docs/_themes/flask_theme_support.py
from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal class FlaskyStyle(Style): background_color = "#f8f8f8" default_style = "" styles = { # No corresponding class for the follow...
PypiClean
/dlinklist-2.0.0.tar.gz/linklist-2.0.0/README
Doubly Linked List API Ver. 2.0.0 *** Begin CVS Information *** $Author: cnobile $ $Date: 2012-01-11 22:06:24 $ $Revision: 1.7 $ *** End CVS Information *** Copyright (c) 1996-2012 Carl J. Nobile All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of either t...
PypiClean
/KPyGithub-1.32a1.tar.gz/KPyGithub-1.32a1/github/GitCommit.py
# ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
PypiClean
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/static/misago/admin/momentjs/km.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
/MiMSI-0.4.1.tar.gz/MiMSI-0.4.1/data/data_loader.py
import numpy as np import torch from torch.utils.data import Dataset, DataLoader import os from sklearn.preprocessing import normalize from torchvision import transforms class MSIBags(Dataset): def __init__( self, root_dir, coverage=100, include_locations=True, labeled=True...
PypiClean
/BinTools-0.2.0.zip/BinTools-0.2.0/bintools/dwarf/line.py
from copy import copy from bintools.dwarf.enums import DW_LNS, DW_LNE from bintools.dwarf.stream import SectionCache class MachineRegisters(object): default_is_stmt = False def __init__(self): self.reset() def reset(self): self.address = 0 self.file = 1 self.line ...
PypiClean
/KratosSwimmingDEMApplication-9.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/KratosMultiphysics/SwimmingDEMApplication/daitche_quadrature/hinsberg_optimization_3.py
import math import cmath import mpmath import matplotlib.pyplot as plt from bigfloat import * import numpy as np import scipy import cmath def DawsonIntegral(x): return 0.5 * sqrt(math.pi) * exp(- x ** 2) * scipy.special.erfi(x) class K_B: def __init__(self): pass def f(self, t): return t...
PypiClean
/Js2Py-0.74.tar.gz/Js2Py-0.74/js2py/internals/fill_space.py
from __future__ import unicode_literals from .base import Scope from .func_utils import * from .conversions import * import six from .prototypes.jsboolean import BooleanPrototype from .prototypes.jserror import ErrorPrototype from .prototypes.jsfunction import FunctionPrototype from .prototypes.jsnumber import NumberP...
PypiClean
/Homevee_Dev-0.0.0.0-py3-none-any.whl/Homevee/Helper/HomeveeCloud/CloudAPI.py
import json import traceback import requests from Homevee.Helper.HomeveeCloud.Response import Response from Homevee.Utils.Database import Database class CloudAPI(): def __init__(self, remote_id=None, access_token=None): if remote_id is None: remote_id = Database.get_server_data("REMOTE_ID")...
PypiClean
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js
MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.MathJax_WinIE6={directory:"WinIE6/Regular",family:"MathJax_WinIE6",testString:"\uE247 \uE257 \uE2CF",skew:{57869:0.0833,57933:0.0958},Ranges:[[57920,57983,"Bold"],[58048,58079,"AMS"]],32:[0,0,250,0,0],160:[0,0,250,0,0],57856:[511,11,1000,55,944],57857:[694,193,500,17,483],57...
PypiClean
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/DjangoAppCenter/simpleui/static/admin/simpleui-x/elementui/umd/locale/sr.js
(function (global, factory) { if (typeof define === "function" && define.amd) { define('element/locale/sr', ['module', 'exports'], factory); } else if (typeof exports !== "undefined") { factory(module, exports); } else { var mod = { exports: {} }; factory(...
PypiClean
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/summernote/lang/summernote-ar-AR.min.js
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,(function(){return(e=jQuery).extend(e.summernote.lang,{"ar-AR":{font:{bold:"عريض",italic:"ما...
PypiClean
/GooeyPy-0.2.tar.gz/GooeyPy-0.2/gooeypy/input.py
import pygame from const import * from cellulose import * import widget class Input(widget.Widget): """ Input([value, [max_length, [disallowed_chars]]]) - Input widget ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Creates an HTML like input field. Arguments --------- va...
PypiClean
/Aston-0.7.1.tar.gz/Aston-0.7.1/aston/tracefile/__init__.py
import re import struct import numpy as np from aston.trace import Chromatogram, Trace from aston.tracefile.mime import get_mimetype, tfclasses def find_offset(f, search_str, hint=None): if hint is None: hint = 0 f.seek(hint) regexp = re.compile(search_str) while True: d = f.read(len...
PypiClean
/Eureqa-1.76.0.tar.gz/Eureqa-1.76.0/eureqa/analysis/components/layout.py
from eureqa.analysis.components.base import _Component from eureqa.utils.jsonrest import _JsonREST class Layout(_Component): """Generic layout within an Analysis A generic grid layout composed of rows and columns sized by fractions (`1`, `1/2`, `1/4`, etc). Layouts can be nested within other layouts ...
PypiClean
/conpot-0.6.0-py3-none-any.whl/conpot/protocols/ftp/ftp_handler.py
from conpot.protocols.ftp.ftp_base_handler import FTPHandlerBase import logging import fs import os import glob import sys import tempfile from datetime import datetime import gevent from gevent import socket from fs import errors from conpot.core.filesystem import FilesystemError, FSOperationNotPermitted from conpot....
PypiClean
/EbookLib-re-0.18.0.tar.gz/EbookLib-re-0.18.0/docs/plugins.rst
Plugins ======= Plugins can be used to automate some of the workflow. For instance :mod:`ebooklib.plugins.tidyhtml` plugins automatically cleans HTML output for you. FootnotePlugin for instance rewrites custom footnotes into EPUB3 kind of footnotes. Without these plugins you would need to do wanted transformations bef...
PypiClean
/Freezes-1.0.16.tar.gz/Freezes-1.0.16/freezes/pagext.py
from flask import current_app, url_for from markdown import markdown from flask_flatpages import Page from os import path import re from datetime import datetime def get_excerpt(self): """Get the post excerpt from post body :return: """ if self.body == '': return '' lines = self.body.spl...
PypiClean
/ChadBot6-0.1-py3-none-any.whl/ChadBot/generation/rajat_work/qgen/generator/fpm/pattern.py
TOKENS = ['<sbj>', '<obj>', '<act>', '<st>'] pattern_specs = [ # yes/no question (existential) { "patterns": [ "{aux1} there <obj>", "{aux1} there any <obj>", "{aux2} there be <obj>", "{aux2} there be any <obj>", "Any <obj>" ], ...
PypiClean
/DARTSeg-1.0.0-py3-none-any.whl/DARTS/perform_pred.py
import torch import torch.nn as nn import numpy as np import os import nibabel from models.dense_unet_model import Single_level_densenet, Down_sample, Upsample_n_Concat, Dense_Unet # from models.dense_unet_model import * from utils import load_data, create_one_hot_seg, back_to_original_4_pred, back_to_original_4_prob, ...
PypiClean
/Linum-0.9.12.tar.gz/Linum-0.9.12/linum/excel_renderer/calendar/views/layer_view.py
from datetime import date from typing import Optional, List from xlsxwriter import Workbook from xlsxwriter.worksheet import Worksheet from linum.excel_renderer.base.style import Style from linum.excel_renderer.calendar.space.space_row import SpaceRow from linum.excel_renderer.calendar.views.task_part_view import Tas...
PypiClean
/EMP-PY-2.0.4.tar.gz/EMP-PY-2.0.4/README.md
# EMP-Py EMP Python Package repository, currently at version 2.0.4. Functions for estimating EMP (Expected Maximum Profit Measure) in [Credit Risk Scoring](https://www.sciencedirect.com/science/article/pii/S0377221714003105) and [Customer Churn Prediction](https://ieeexplore.ieee.org/document/6165289), according to V...
PypiClean
/Cantonese-1.0.7-py3-none-any.whl/src/can_codegen.py
from src.stack_vm import * class AST(object): def __init__(self, Nodes) -> None: self.Nodes = Nodes def next(self, n) -> None: self.Nodes = self.Nodes[n : ] def current(self): if len(self.Nodes) == 0: return [""] return self.Nodes[0] def check(self, node, ...
PypiClean
/IVisual-0.2.88.zip/IVisual-0.2.88/ivisual/data/pako.min.js
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.pako=t()}}(function(){return function t(e,a,i){function...
PypiClean
/DI_engine-0.4.9-py3-none-any.whl/dizoo/petting_zoo/config/ptz_simple_spread_masac_config.py
from easydict import EasyDict n_agent = 3 n_landmark = n_agent collector_env_num = 8 evaluator_env_num = 8 main_config = dict( exp_name='ptz_simple_spread_masac_seed0', env=dict( env_family='mpe', env_id='simple_spread_v2', n_agent=n_agent, n_landmark=n_landmark, max_cyc...
PypiClean
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/coal_miners.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 coal_miners(path): """Breathlessness and Wheeze in Coal Miners Data from Ashford & Sowden ...
PypiClean
/Lurlene-14-py3-none-any.whl/lurlene/util.py
# This file is part of Lurlene. # # Lurlene 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. # # Lurlene is distributed in the hope tha...
PypiClean
/FibraNet-10.tar.gz/FibraNet-10/sandbox/server.py
import pygame import nanothreads import nanotubes import time import weakref import random class PygameListener(nanotubes.Listener): """ A custom listener which tracks connections in a list. Connected sockets are available via the connections attribute, and use the MessageProtocol to communicate. ...
PypiClean
/Hikka_Pyro-2.0.66-py3-none-any.whl/pyrogram/file_id.py
import base64 import logging import struct from enum import IntEnum from io import BytesIO from typing import List from pyrogram.raw.core import Bytes, String log = logging.getLogger(__name__) def b64_encode(s: bytes) -> str: """Encode bytes into a URL-safe Base64 string without padding Parameters: ...
PypiClean
/Federal-1.0.1.tar.gz/Federal-1.0.1/Formatter/DateFormatter.py
import datetime as dt import re class DateFormatter(object): def __init__(self,start=None,end=None): self.start = start self.end = end return ############################################################################################ #DateTime Formatting #################################...
PypiClean
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_ebu-ke.js
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); return (i == -1) ? 0 : n.length - i - 1; } function getVF(n, opt_pre...
PypiClean
/BitSet-0.1.2.tar.gz/BitSet-0.1.2/bitset/bitset.py
class BitSet: ''' >用于维护一个定长的二进制串< 创建BitSet对象: a = BitSet(8) # 8位二进制串 b = BitSet('00101101') # 8位二进制串 初值为45 c = BitSet(b'\xff') # 8位二进制串 初值为255 d = BitSet(['a', 'b', 'c']) # 3位二进制串 初值为0 三位名字分别为abc e = BitSet(('a', 'b', 'c')) # 3位二进制串 初值为0 ...
PypiClean
/Chu-0.2.0.tar.gz/Chu-0.2.0/docs/index.rst
.. Copyright 2012 ShopWiki Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/mobile/Carousel.js.uncompressed.js
define("dojox/mobile/Carousel", [ "dojo/_base/kernel", "dojo/_base/array", "dojo/_base/connect", "dojo/_base/declare", "dojo/_base/event", "dojo/_base/lang", "dojo/_base/sniff", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-style", "dijit/_Contained", "dijit/_Container", "dijit/_WidgetBase", "./PageIn...
PypiClean
/MRFI-2.0.0.tar.gz/MRFI-2.0.0/docs/example_yolov8.md
# Object detection model inject MRFI can directly inject errors into a object detection model. We use [Ultralytics YOLOv8](https://docs.ultralytics.com/modes/val/) as an example. YOLOv8n official model has 168 layers with complex structure. We test it on coco128 dataset with `default_fi.yaml` configuration. ```pytho...
PypiClean
/BigJob2-0.54.post73.tar.gz/BigJob2-0.54.post73/examples/hadoop/README.md
# YARN BigJob Plugin ## Requirements: * local Hadoop 2.2.0 installation ## BigJob YARN Application (binary within plugin directory) This plugin depends on the BigJob YARN Application Master found here: <https://github.com/drelu/BigJob-YARN> A build of the BigJob YARN application is distributed with BigJob. BIGJO...
PypiClean
/MegEngine-1.13.1-cp37-cp37m-macosx_10_14_x86_64.whl/megengine/module/multiheadattn.py
from typing import Optional import numpy as np import megengine as mge import megengine.functional as F from megengine import Parameter from ..device import get_cudnn_version, is_cuda_available from ..functional.nn import multi_head_attention from ..tensor import Tensor from .init import ones_, xavier_uniform_, zero...
PypiClean
/Django-4.2.4.tar.gz/Django-4.2.4/django/contrib/auth/password_validation.py
import functools import gzip import re from difflib import SequenceMatcher from pathlib import Path from django.conf import settings from django.core.exceptions import ( FieldDoesNotExist, ImproperlyConfigured, ValidationError, ) from django.utils.functional import cached_property, lazy from django.utils.h...
PypiClean
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/node_modules/tar/lib/pax.js
'use strict' const Header = require('./header.js') const path = require('path') class Pax { constructor (obj, global) { this.atime = obj.atime || null this.charset = obj.charset || null this.comment = obj.comment || null this.ctime = obj.ctime || null this.gid = obj.gid || null this.gname = o...
PypiClean
/DDFacet-0.7.2.0.tar.gz/DDFacet-0.7.2.0/SkyModel/Tools/ModFFTW.py
from __future__ import division, absolute_import, print_function import numpy as np import pyfftw import multiprocessing import scipy #Fs=pyfftw.interfaces.numpy_fft.fftshift #iFs=pyfftw.interfaces.numpy_fft.ifftshift Fs=scipy.fftpack.fftshift iFs=scipy.fftpack.ifftshift def test(): size=20 dtype=np.compl...
PypiClean
/MNN-0.0.7-cp27-cp27mu-manylinux2010_x86_64.whl/MNNTools/MNN_FB/ListValue.py
# namespace: MNN import flatbuffers class ListValue(object): __slots__ = ['_tab'] @classmethod def GetRootAsListValue(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = ListValue() x.Init(buf, n + offset) return x # ListValue ...
PypiClean
/OASYS1-ALS-ShadowOui-0.0.60.tar.gz/OASYS1-ALS-ShadowOui-0.0.60/orangecontrib/shadow/als/widgets/utility/ow_als_wiggler.py
import sys import time from orangecontrib.shadow.als.widgets.gui.shadow4_ow_electron_beam import OWElectronBeam from orangecontrib.shadow.als.widgets.gui.shadow4_plots import plot_data1D from oasys.widgets import gui as oasysgui from orangewidget import gui as orangegui from orangewidget.settings import Setting # fr...
PypiClean
/KorAPClient-0.7.5.tar.gz/KorAPClient-0.7.5/Readme.md
# KorAP web service client package for Python [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![CI check](https://github.com/KorAP/PythonKorAPClient/workflows/PythonKo...
PypiClean
/EXtra_data-1.14.0-py3-none-any.whl/extra_data/read_machinery.py
import logging import math import os.path as osp import re import time from glob import iglob from warnings import warn import numpy as np log = logging.getLogger(__name__) DETECTOR_NAMES = {'AGIPD', 'DSSC', 'LPD'} DETECTOR_SOURCE_RE = re.compile(r'(.+)/DET/(\d+)CH') DATA_ROOT_DIR = '/gpfs/exfel/exp' class _Slice...
PypiClean
/MathisN_Ex8_9-0.1.zip/MathisN_Ex8_9-0.1/README.md
# EX8 ## Getting started To make it easy for you to get started with GitLab, here's a list of recommended next steps. Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! ## Add your files - [ ] [Create](https://docs.gitlab.co...
PypiClean
/MAD-0.2.2.zip/MAD-0.2.2/mad/parsing.py
# # This file is part of MAD. # # MAD 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. # # MAD is distributed in the hope that it will ...
PypiClean
/MirrorMirror2-1.1.6.tar.gz/MirrorMirror2-1.1.6/mirror_mirror/events.py
import httplib2 import os from pkg_resources import resource_filename from apiclient import discovery import oauth2client import glob from datetime import datetime from mirror_mirror import BaseUpdater class Credentials(object): """ A set of credentials that can be used to get a list of a user's calendar ev...
PypiClean
/Alfred-PyWorkflow-2.0.0b0.tar.gz/Alfred-PyWorkflow-2.0.0b0/workflow/util.py
import atexit import errno import fcntl import functools import json import os import signal import subprocess import sys import time from collections import namedtuple from contextlib import contextmanager from threading import Event # JXA scripts to call Alfred's API via the Scripting Bridge # {app} is automatically...
PypiClean
/GQCMS-0.0.4-py3-none-any.whl/build/lib/build/lib/gqcms/matrices/Hamiltonian.py
import numpy as np from typing import List from gqcms import Hubbard from gqcms.matrices import Determinant def createHamiltonian(H_core: np.ndarray, I: np.ndarray, determinants: list) -> np.ndarray: """ Create the hamiltonian matrix from a list of determinants :param H_core: core Hamiltonian i.e one el...
PypiClean
/ContrailOnlineCAService-0.4.0.tar.gz/ContrailOnlineCAService-0.4.0/contrail/security/onlineca/server/wsgi/client_register.py
__author__ = "P J Kershaw" __date__ = "22/09/12" __copyright__ = "(C) 2012 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc.ac.uk" __revision__ = '$Id$' import logging log = logging.getLogger(__name__) from datetime import dateti...
PypiClean
/BRAILS-3.0.1.tar.gz/BRAILS-3.0.1/brails/modules/NumFloorDetector/infer.py
import os import cv2 import numpy as np from shapely.geometry import Polygon from shapely.ops import unary_union # Author: Barbaros Cetiner from lib.infer_detector import Infer import torch import time from tqdm import tqdm import warnings import argparse # Ignore Divide by Zero Warnings for dyOverdx warnings.filterw...
PypiClean
/Biblioteca_RIT-3.0.0-py3-none-any.whl/BibliotecaRIT/Sources/controladoras/ControladoraPreProcessamento.py
from BibliotecaRIT.Sources.entidades.Tags import Tags from BibliotecaRIT.Sources.estrategias.preProcessamento.PreProcessamentoCaminho import PreProcessamentoCaminho from BibliotecaRIT.Sources.estrategias.preProcessamento.codigo.PreProcessamentoCodigoInlineHTML import PreProcessamentoCodigoInlineHTML from BibliotecaRIT....
PypiClean
/netket-3.9.2.tar.gz/netket-3.9.2/netket/experimental/operator/fermion.py
from netket.utils.types import DType as _DType from netket.hilbert.abstract_hilbert import AbstractHilbert as _AbstractHilbert from netket.experimental.operator import FermionOperator2nd as _FermionOperator2nd def destroy(hilbert: _AbstractHilbert, site: int, sz: int = None, dtype: _DType = None): """ Builds...
PypiClean
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/person/hu_HU/__init__.py
from collections import OrderedDict from typing import Dict from .. import Provider as PersonProvider # Data source # # Data for this provider comes from the following source: # Ministry of Interior, Deputy Secretary of State for Records # # 100 most frequent family names on record, 2016: # http://www.kekkh.gov.hu/le...
PypiClean
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/readable-stream/lib/internal/streams/from.js
'use strict'; function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return...
PypiClean
/Data_Function-0.0.4-py3-none-any.whl/kon/model/feature_eng/feature_transform.py
import logging from pandarallel import pandarallel import gensim import matplotlib.pyplot as plt from scipy.stats import stats from gensim.models import Word2Vec from pandas import DataFrame from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.linear_model import PassiveAggressiveClassifier, SGDClas...
PypiClean
/Liblabtest-1.0.6-py3-none-any.whl/liblabtest/models/CreateSdkBuildRequest.py
from .base import BaseModel from typing import List from enum import Enum class CreateSdkBuildRequestLanguages(Enum): JAVA = "java" PYTHON = "python" TYPESCRIPT = "typescript" BASH = "bash" SPEC = "spec" def list(): return list(map(lambda x: x.value, CreateSdkBuildRequestLanguages._membe...
PypiClean
/NiMARE-0.2.0rc2.tar.gz/NiMARE-0.2.0rc2/nimare/meta/utils.py
import logging import warnings import numpy as np import sparse from scipy import ndimage from nimare.utils import unique_rows LGR = logging.getLogger(__name__) def compute_kda_ma( mask, ijks, r, value=1.0, exp_idx=None, sum_overlap=False, ): """Compute (M)KDA modeled activation (MA) ma...
PypiClean
/EventDriven-0.1.3.tar.gz/EventDriven-0.1.3/eventdriven/pool.py
from .controller import Controller from .mapping import MappingManager from .event import EVT_DRI_AFTER, EVT_DRI_SUBMIT from .session import session from .utils import Pending from queue import Queue, Empty from threading import Event, Lock import time class ControllerPool: """ 控制器池。 :public property ...
PypiClean
/DI_engine-0.4.9-py3-none-any.whl/dizoo/mujoco/config/halfcheetah_trex_sac_config.py
from easydict import EasyDict halfcheetah_trex_sac_config = dict( exp_name='halfcheetah_trex_sac_seed0', env=dict( env_id='HalfCheetah-v3', norm_obs=dict(use_norm=False, ), norm_reward=dict(use_norm=False, ), collector_env_num=1, evaluator_env_num=8, n_evaluator_...
PypiClean
/Office365_REST_with_timeout-0.1.1-py3-none-any.whl/office365/onenote/notebooks/notebook_collection.py
from office365.entity_collection import EntityCollection from office365.onenote.notebooks.copy_notebook_model import CopyNotebookModel from office365.onenote.notebooks.notebook import Notebook from office365.onenote.notebooks.recent_notebook import RecentNotebook from office365.runtime.client_result import ClientResult...
PypiClean
/netket-3.9.2.tar.gz/netket-3.9.2/netket/experimental/operator/_fermion_operator_2nd.py
from typing import List, Union, Optional import numpy as np from jax.tree_util import tree_map import copy import numba from netket.utils.types import DType from netket.operator._discrete_operator import DiscreteOperator from netket.operator._pauli_strings.base import _count_of_locations from netket.hilbert.abstract...
PypiClean
/Amara-2.0.0a6.tar.bz2/Amara-2.0.0a6/lib/xupdate/commands.py
from amara import tree from amara.lib.xmlstring import splitqname from amara.xpath import context from amara.xupdate import XUpdateError, xupdate_primitive __all__ = [ 'insert_before_command', 'insert_after_command', 'append_command', 'update_command', 'rename_command', 'remove_command', 'variable_command'...
PypiClean
/CloudFerry-1.55.2.tar.gz/CloudFerry-1.55.2/cloudferry/cli/base.py
import yaml from yaml import error as yaml_error from cloudferry import cfglib from cloudferry import config from cloudferry.lib.utils import log class ConfigMixin(object): def __init__(self, app, app_args, cmd_name=None): super(ConfigMixin, self).__init__(app, app_args, cmd_name) self.config = ...
PypiClean
/Dnpr-0.1.0-py3-none-any.whl/backup/clsDnpr.py
import re import json import pandas as p import numpy as np class clsDnpr: def __init__(self): pass def distinct(self, inputJson): try: res_json = '' dfSrc = p.DataFrame() # Normalizing JSON dfSrc = p.io.json.json_normalize(inputJson) ...
PypiClean
/InterpretableMLWrappers-0.0.2.1.tar.gz/InterpretableMLWrappers-0.0.2.1/interpretability/BOACLASS.py
import pandas as pd import numpy as np from .model.BOA.dataMaker import * from pandas.io.parsers import read_csv from .model.BOA.BOAmaster.BOAmodel import * from collections import defaultdict import subprocess import sys import os class BayesianOrOf(): def __init__(self): self.name = "Bayesian or-of-an...
PypiClean
/BioSAK-1.72.0.tar.gz/BioSAK-1.72.0/My_Python_scripts/tree_related/Newick_tree_plotter.py
import os from ete3 import Tree from ete3 import TreeStyle from ete3 import NodeStyle from ete3 import TextFace def plot_tree(tree, tree_title, tree_output): # set tree parameters ts = TreeStyle() ts.mode = "r" # tree model: 'r' for rectangular, 'c' for circular ts.show_leaf_name = 0 # set tree t...
PypiClean
/42di-0.2.6.tar.gz/42di-0.2.6/swagger_client/configuration.py
from __future__ import absolute_import import copy import logging import multiprocessing import sys import urllib3 import six from six.moves import http_client as httplib class TypeWithDefault(type): def __init__(cls, name, bases, dct): super(TypeWithDefault, cls).__init__(name, bases, dct) cls....
PypiClean
/BlueWhale3-3.31.3.tar.gz/BlueWhale3-3.31.3/Orange/classification/simple_random_forest.py
import numpy as np from Orange.classification import Learner, Model from Orange.classification.simple_tree import SimpleTreeLearner from Orange.i18n_config import * def __(key): return i18n.t("orange." + key) __all__ = ['SimpleRandomForestLearner'] class SimpleRandomForestLearner(Learner): """ A random...
PypiClean
/I_Language-0.0.9-py3-none-any.whl/ilanguage/Modules/_core/Console.py
import io import platform from typing import ( Dict, Iterable, List, Set, Tuple, ) ######### # SETUP # ######### # pylint: disable=R0801 if ( platform.system() == "Windows" and platform.release() == "10" ): # Fixes colored output on Windows import ctypes kernel32 = ctypes.windll.ke...
PypiClean
/Beeswarm-0.7.18.tar.gz/Beeswarm-0.7.18/beeswarm/drones/honeypot/capabilities/shared/shell.py
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along...
PypiClean
/APIFuzzer-0.9.13-py3-none-any.whl/apifuzzer/base_template.py
from kitty.core import KittyException from kitty.model import Static, Template, Container from apifuzzer.utils import get_logger class BaseTemplate(object): def __init__(self, name): self.logger = get_logger(self.__class__.__name__) self.name = name self.content_type = "" self.met...
PypiClean
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/examples/levelSet/electroChem/simpleTrenchSystem.py
r"""Model electrochemical superfill using the CEAC mechanism. This input file is a demonstration of the use of :term:`FiPy` for modeling electrodeposition using the CEAC mechanism. The material properties and experimental parameters used are roughly those that have been previously published :cite:`NIST:damascene:2003`...
PypiClean
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/extensions/MathMenu.js
(function(f,o,q,e,r){var p="2.7.9";var d=MathJax.Callback.Signal("menu");MathJax.Extension.MathMenu={version:p,signal:d};var t=function(u){return MathJax.Localization._.apply(MathJax.Localization,[["MathMenu",u]].concat([].slice.call(arguments,1)))};var i=MathJax.Object.isArray;var a=f.Browser.isPC,l=f.Browser.isMSIE,m...
PypiClean
/DStore-ACL-0.1.1.tar.gz/DStore-ACL-0.1.1/README.rst
Welcome To DStore-ACL ##################### .. image:: https://img.shields.io/coveralls/MarkLark/dstore-acl.svg :target: https://coveralls.io/github/MarkLark/dstore-acl?branch=master .. image:: https://img.shields.io/travis/MarkLark/dstore-acl/master.svg :target: https://travis-ci.org/MarkLark/dstore-acl .. ...
PypiClean
/GaiaXPy-2.1.0.tar.gz/GaiaXPy-2.1.0/gaiaxpy/spectrum/sampled_spectrum.py
import numpy as np from numpy import ndarray, nan from .generic_spectrum import Spectrum class SampledSpectrum(Spectrum): """ A spectrum defined by a set of discrete measurements. Each measurement is defined by a position in wavelength (or pseudo-wavelength), a measured flux and an associated flux error....
PypiClean
/Benker-0.5.4.tar.gz/Benker-0.5.4/benker/table.py
import re try: from collections.abc import MutableMapping except ImportError: from collections import MutableMapping from benker.cell import Cell from benker.coord import Coord from benker.grid import Grid from benker.styled import Styled # noinspection PyUnresolvedReferences class TableViewList(object): ...
PypiClean
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/layout/RadioGroup.js
if(!dojo._hasResource["dojox.layout.RadioGroup"]){ dojo._hasResource["dojox.layout.RadioGroup"]=true; dojo.provide("dojox.layout.RadioGroup"); dojo.experimental("dojox.layout.RadioGroup"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("dijit._Contained"); dojo.require("dijit.layout.Stack...
PypiClean
/CsuPMTD-1.0.27.tar.gz/CsuPMTD-1.0.27/PMTD/maskrcnn_benchmark/apex/apex/parallel/optimized_sync_batchnorm.py
import torch from torch.nn.modules.batchnorm import _BatchNorm from torch.nn import functional as F # import syncbn from .optimized_sync_batchnorm_kernel import SyncBatchnormFunction class SyncBatchNorm(_BatchNorm): """ synchronized batch normalization module extented from `torch.nn.BatchNormNd` with the...
PypiClean
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/bower_components/jquery/src/effects/Tween.js
define( [ "../core", "../css/finalPropName", "../css" ], function( jQuery, finalPropName ) { "use strict"; function Tween( elem, options, prop, end, easing ) { return new Tween.prototype.init( elem, options, prop, end, easing ); } jQuery.Tween = Tween; Tween.prototype = { constructor: Tween, init: function( e...
PypiClean
/NeuroTorch-0.0.1b2.tar.gz/NeuroTorch-0.0.1b2/src/neurotorch/init/__init__.py
from typing import Optional import numpy as np import torch @torch.no_grad() def dale_( tensor: torch.Tensor, inh_ratio: float = 0.5, rho: float = 0.99, inh_first: bool = True, seed: Optional[int] = None ) -> torch.Tensor: """ Initialize a tensor with Dale's law. As default it is half excitatory, half in...
PypiClean
/Bokit-0.3.tar.gz/Bokit-0.3/bokit/utils/create_special_char_list.py
def create_special_char_list(): '''Returns a list of special characters in Tibetan language.''' special_char = ['ༀ', '༁', '༂', '༃', '༄', '༅', '༆', '༇', ...
PypiClean