id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/Indago-0.4.6-py3-none-any.whl/indago/_fwa.py | """ FIREWORKS ALGORITHM method"""
import numpy as np
from ._optimizer import Optimizer, CandidateState
class FWA(Optimizer):
"""Fireworks Algorithm method class.
Attributes
----------
variant : str
Name of the FWA variant (``Vanilla`` or ``Rank``). Default: ``Rank``.
params : dict
... | PypiClean |
/Flasik-0.5.1.tar.gz/Flasik-0.5.1/flasik/functions.py | import re
import six
import logging
import inspect
import functools
import arrow
import copy
import blinker
from flask import (request, current_app, send_file, session)
import flask_cloudy
import flask_recaptcha
import flask_caching
from . import (Flasik,
extends,
utils,
g,
... | PypiClean |
/LaZy_NT-0.1.0.zip/LaZy_NT-0.1.0/README.txt | ===========
LaZy_NT
===========
LaZy_NT is a forensic analysis and data recovery framework designed to carve
files from raw disk images. It uses file signatures and other techniques to
recover as much of the original data as possible.
The feature that sets this software apart from more well-known file carving
utiltie... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/ol-2.13/lib/OpenLayers/Filter/Spatial.js | * @requires OpenLayers/Filter.js
*/
/**
* Class: OpenLayers.Filter.Spatial
* This class represents a spatial filter.
* Currently implemented: BBOX, DWithin and Intersects
*
* Inherits from:
* - <OpenLayers.Filter>
*/
OpenLayers.Filter.Spatial = OpenLayers.Class(OpenLayers.Filter, {
/**
* APIPropert... | PypiClean |
/MDAKit-1.0.0-py3-none-any.whl/MDKit/tools/PCA/prody_pca.py | import os
import sys
import argparse
import pandas as pd
from prody.apps.apptools import *
from prody.apps.prody_apps.nmaoptions import *
from prody.apps.prody_apps import nmaoptions
from numbers import Integral
DEFAULTS = {}
HELPTEXT = {}
for key, txt, val in [
('aligned', 'trajectory is already aligned', Fals... | PypiClean |
/ImSwitchUC2-2.1.0.tar.gz/ImSwitchUC2-2.1.0/imswitch/imcontrol/model/interfaces/lantzlasers.py | import importlib
from imswitch.imcommon.model import pythontools, initLogger
class LantzLaser:
def __new__(cls, iName, ports):
if len(ports) < 1:
raise ValueError('LantzLaser requires at least one port, none passed')
lasers = []
for port in ports:
laser = getLaser... | PypiClean |
/Firefly%20III%20API%20Python%20Client-1.5.6.post2.tar.gz/Firefly III API Python Client-1.5.6.post2/firefly_iii_client/api/currencies_api.py | import re # noqa: F401
import sys # noqa: F401
from firefly_iii_client.api_client import ApiClient, Endpoint as _Endpoint
from firefly_iii_client.model_utils import ( # noqa: F401
check_allowed_values,
check_validations,
date,
datetime,
file_type,
none_type,
validate_and_convert_types
)
... | PypiClean |
/DroneConnect-0.1.5.tar.gz/DroneConnect-0.1.5/bin/droneconnect_server.py |
# Copyright 2015, Google Inc.
# 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 ... | PypiClean |
/FFC-2017.1.0.tar.gz/FFC-2017.1.0/ffc/quadratureelement.py |
# Copyright (C) 2007-2016 Kristian B. Oelgaard
#
# This file is part of FFC.
#
# FFC is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ver... | PypiClean |
/HADeploy-0.6.1.tar.gz/HADeploy-0.6.1/lib/hadeploy/plugins/elastic/roles/elastic_modules/library/elasticsearch_index.py |
# (c) 2018, BROADSoftware
#
# This software 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 software is distributed in the ho... | PypiClean |
/ARGs_OAP-2.3.2.tar.gz/ARGs_OAP-2.3.2/ARGs_OAP/bin/bbmap/calcmem.sh |
#usage(){
# echo "CalcMem v1.15"
# echo "Written by Brian Bushnell, Doug Jacobsen, Alex Copeland, Bryce Foster"
# echo "Calculates available memory in megabytes"
# echo "Last modified December 17, 2019"
#}
#Also parses other Java flags
function parseXmx () {
local setxmx=0
local setxms=0
for arg in "$@"
do
... | PypiClean |
/Auto-Research-1.0.tar.gz/Auto-Research-1.0/src/arxiv_public_data/oai_metadata.py | import os
import gzip
import glob
import json
import time
import hashlib
import datetime
import requests
import xml.etree.ElementTree as ET
from arxiv_public_data.config import LOGGER, DIR_BASE
log = LOGGER.getChild('metadata')
URL_ARXIV_OAI = 'https://export.arxiv.org/oai2'
URL_CITESEER_OAI = 'http://citeseerx.ist.... | PypiClean |
/Fabric-with-working-dependencies-1.0.1.tar.gz/Fabric-with-working-dependencies-1.0.1/fabric/main.py | from operator import add
from optparse import OptionParser
import os
import sys
from fabric import api # For checking callables against the API
from fabric.contrib import console, files, project # Ditto
from fabric.network import denormalize, interpret_host_string, disconnect_all
from fabric import state # For easily-... | PypiClean |
/Ackbar-0.2.tar.gz/Ackbar-0.2/ackbar.py |
# Analysis and Corroboration of Key Biodiversity AReas - Ackbar
###############################################################################
#
# Copyright 2020 Nelson R. Salinas
#
#
# This file is part of Ackbar.
#
# Ackbar is free software: you can redistribute it and/or modify
# it under the terms of the GNU ... | PypiClean |
/Indomielibs-2.0.106.tar.gz/Indomielibs-2.0.106/pyrogram/methods/messages/delete_messages.py |
from typing import Union, Iterable
import pyrogram
from pyrogram import raw
class DeleteMessages:
async def delete_messages(
self: "pyrogram.Client",
chat_id: Union[int, str],
message_ids: Union[int, Iterable[int]],
revoke: bool = True
) -> int:
"""Delete messages, in... | PypiClean |
/Music-Player-1.0.5.1.tar.gz/Music-Player-1.0.5.1/MusicPlayer/widgets/player.py | 这是一个独立的播放器组件,只需要调用playWidgets里的setPlayerAndPlayList(s)即可播放音乐。
需要的data类型是{'name': str, 'time': str, 'author': str, music_img: None/url}
"""
"""
写法上这个模块比较难懂,界面与功能混合在一块。
只要在需要播放音乐时调用
setPlayerAndPlayList(s)设置音乐即可。
必要时会进行重写。
"""
__author__ = 'cyrbuzz'
import re
import os
import sys
import random
import logging
from PyQt5... | PypiClean |
/Heterogeneous_Highway_Env-0.0.3-py3-none-any.whl/Heterogeneous_Highway_Env/vehicle/objects.py | from abc import ABC
from typing import Sequence, Tuple, TYPE_CHECKING, Optional
import numpy as np
from highway_env import utils
if TYPE_CHECKING:
from highway_env.road.lane import AbstractLane
from highway_env.road.road import Road
LaneIndex = Tuple[str, str, int]
class RoadObject(ABC):
"""
Commo... | PypiClean |
/CryptoBaker-0.8.1-py3-none-any.whl/cryptobaker/recipes/encoding.py | import base64, urllib.parse, hexdump, uuid, html
from .util import check, dec
_morse = {'A': '.-', 'B': '-...', 'C': '-.-.',
'D': '-..', 'E': '.', 'F': '..-.',
'G': '--.', 'H': '....', 'I': '..',
'J': '.---', 'K': '-.-', 'L': '.-..',
'M': '--', 'N': '-.', ... | PypiClean |
/MatchZoo-2.2.0.tar.gz/MatchZoo-2.2.0/matchzoo/preprocessors/units/tokenize.py | import nltk
from matchzoo.utils.bert_utils import is_chinese_char, \
whitespace_tokenize, run_split_on_punc
from .unit import Unit
class Tokenize(Unit):
"""Process unit for text tokenization."""
def transform(self, input_: str) -> list:
"""
Process input data from raw terms to list of to... | PypiClean |
/FFC-2017.1.0.tar.gz/FFC-2017.1.0/doc/sphinx/source/index.rst | .. title:: FFC
=============================
FFC: The FEniCS Form Compiler
=============================
FFC is a compiler for finite element variational forms. From a
high-level description of the form, it generates efficient low-level
C++ code that can be used to assemble the corresponding discrete
operator (tenso... | PypiClean |
/MapProxy-1.16.0.tar.gz/MapProxy-1.16.0/mapproxy/image/transform.py |
from __future__ import division
from mapproxy.compat.image import Image, transform_uses_center
from mapproxy.image import ImageSource, image_filter
from mapproxy.srs import make_lin_transf, bbox_equals
class ImageTransformer(object):
"""
Transform images between different bbox and spatial reference systems.
... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/textfile.py |
__doc__ = """
Textfile/Substfile builder for SCons.
Create file 'target' which typically is a textfile. The 'source'
may be any combination of strings, Nodes, or lists of same. A
'linesep' will be put between any part written and defaults to
os.linesep.
The only difference between the Textfile ... | PypiClean |
/CartiMorph_nnUNet-1.7.14.tar.gz/CartiMorph_nnUNet-1.7.14/CartiMorph_nnUNet/experiment_planning/experiment_planner_baseline_2DUNet.py |
import shutil
import CartiMorph_nnUNet
import numpy as np
from batchgenerators.utilities.file_and_folder_operations import load_pickle, subfiles
from multiprocessing.pool import Pool
from CartiMorph_nnUNet.configuration import default_num_threads
from CartiMorph_nnUNet.experiment_planning.common_utils import get_poo... | PypiClean |
/HomeLab-0.1.36.tar.gz/HomeLab-0.1.36/homelab/static/static/js/main.c3695aca.chunk.js | (window.webpackJsonp=window.webpackJsonp||[]).push([[0],{329:function(e,t,a){e.exports=a(668)},334:function(e,t,a){},335:function(e,t,a){},668:function(e,t,a){"use strict";a.r(t);var n=a(1),r=a.n(n),i=a(55),c=a.n(i),o=(a(334),a(18)),s=a(19),l=a(21),p=a(20),u=a(22),d=(a(335),a(39)),h=a(145),m=a(92),f=a(6),v=a.n(f),g=a(2... | PypiClean |
/hypergraphanalysistoolbox-1.0.20.tar.gz/hypergraphanalysistoolbox-1.0.20/docs/index.rst | .. Hypergraph Analysis Toolbox documentation master file, created by
sphinx-quickstart on Mon Oct 3 14:52:46 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Hypergraph Analysis Toolbox
===========================
.. image:: _static/index_... | PypiClean |
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/automotive/nl_NL/__init__.py | import re
import string
from .. import Provider as AutomotiveProvider
class Provider(AutomotiveProvider):
"""Implement automotive provider for `nl_NL` locale.
Sources:
- https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_the_Netherlands
- https://www.cbs.nl/en-gb/figures/detail/82044eng
... | PypiClean |
/BobBuildTool-0.23.1.tar.gz/BobBuildTool-0.23.1/README.md | [](https://bobbuildtool.github.io/)
[Bob Build Tool](https://bobbuildtool.github.io/)
=================================================
Bob is a build automation tool inspired by bitbake and portage. It is intended
for complex embedded projects and thus focuses on reproducible b... | PypiClean |
/MetaGram-2.0.2.tar.gz/MetaGram-2.0.2/pyrogram/methods/mongo/bit_rate.py |
# ========================×========================
# Jangan Hapus Credit Ngentod
# ========================×========================
import pyrogram
from pytgcalls.types.input_stream.quality import (HighQualityAudio,
HighQualityVideo,
... | PypiClean |
/Constellation-DeviceManager-0.1.3.tar.gz/Constellation-DeviceManager-0.1.3/constellation_devicemanager/static/constellation_devicemanager/js/view-list.js |
/* Global list state */
var devices_list;
var message = document.querySelector('#message-toast');
/* Template for Handlebars to execute */
var source = $('#handlebars-devices').html();
$(document).ready(function(){
/* Start templating */
get_devices();
});
/* Call APIs to get the JSON devices-list */
function ... | PypiClean |
/Matador-4.1.2.tar.gz/Matador-4.1.2/src/matador/cli/utils.py | from logging import getLogger
import shutil
from configparser import ConfigParser
from pathlib import Path
import yaml
from dulwich.errors import NotGitRepository
from dulwich.repo import Repo
from matador import git
logger = getLogger(__name__)
def deployment_repository(project_folder):
project = Path(project... | PypiClean |
/Gitissius-0.1.6.tar.gz/Gitissius-0.1.6/gitissius/common.py | from datetime import datetime
import sys
import os
import readline
readline.parse_and_bind('tab: complete')
# needed for enabling / disabling colorama
ORIGINAL_STDOUT = sys.stdout
ORIGINAL_STDERR = sys.stderr
try:
import colorama
colorama.init(autoreset=True)
except ImportError:
colorama = False
def di... | PypiClean |
/Django_patch-2.2.19-py3-none-any.whl/django/contrib/sessions/backends/base.py | import base64
import logging
import string
from datetime import datetime, timedelta
from django.conf import settings
from django.contrib.sessions.exceptions import SuspiciousSession
from django.core.exceptions import SuspiciousOperation
from django.utils import timezone
from django.utils.crypto import (
constant_t... | PypiClean |
/AaronTools-1.0b14.tar.gz/AaronTools-1.0b14/bin/averageBuriedVolume.py |
import argparse
import sys
import numpy as np
from AaronTools.comp_output import CompOutput
from AaronTools.const import UNIT
from AaronTools.fileIO import FileReader
from AaronTools.finders import NotAny, AnyTransitionMetal, AnyNonTransitionMetal
from AaronTools.geometry import Geometry
from AaronTools.substituent ... | PypiClean |
/Ifbyphone-API-Module-0.0.5.tar.gz/Ifbyphone-API-Module-0.0.5/src/Ifbyphone/api/broadcast.py | from base import IfbyphoneApiBase
class Broadcast(IfbyphoneApiBase):
def create(self, **kwargs):
""" Create a voice broadcast to be scheduled
keyword arguments:
name -- name for broadcast
recording_phone_number -- number to dial to record audio message
... | PypiClean |
/Choco-1.0.5.tar.gz/Choco-1.0.5/choco/errors.py | import traceback
import sys
from choco import util, compat
class ChocoException(Exception):
pass
class RuntimeException(ChocoException):
pass
def _format_filepos(lineno, pos, filename):
if filename is None:
return " at line: %d char: %d" % (lineno, pos)
else:
return " in file '%s' ... | PypiClean |
/BigJob-0.64.5.tar.gz/BigJob-0.64.5/docs/source/tutorial/table.rst | Machines and Valid Parameters
=============================
+----------------------------+---------------------+---------------+----------------------------+---------------------------+--------------------+------------------------+------------------+
| | Resource (Hostname) | | SAGA Adaptor | | Queue Names|... | PypiClean |
/LN2_Monitor-3.11.7-py3-none-any.whl/ln2_monitor/d1.py | import usb.core
import usb.util
import time
import numpy as np
import math
from datetime import datetime
from matplotlib import pyplot
from matplotlib.animation import FuncAnimation
from random import randrange
class SCL():
def __init__(self):
self.VENDOR_ID = 0x0922
self.PRODUCT_ID = 0x8009
... | PypiClean |
/Newgram-0.0.5.tar.gz/Newgram-0.0.5/newgram/mime_types.py |
# From https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types.
# Extended with extra mime types specific to Telegram.
mime_types = """
# This file maps Internet media types to unique file extension(s).
# Although created for httpd, this file is used by many software systems
# and has been placed in th... | PypiClean |
/HiCTornadIO2-0.1.2.tar.gz/HiCTornadIO2-0.1.2/tornadio2/polling.py | import time
import logging
import urllib
from tornado.web import HTTPError, asynchronous
from tornadio2 import proto, preflight, stats
logger = logging.getLogger('tornadio2.polling')
class TornadioPollingHandlerBase(preflight.PreflightHandler):
"""Polling handler base"""
def initialize(self, server):
... | PypiClean |
/MAnorm2_utils-1.0.0.tar.gz/MAnorm2_utils-1.0.0/docs/html/searchindex.js | Search.setIndex({docnames:["MAnorm2_utils-manual"],envversion:52,filenames:["MAnorm2_utils-manual.rst"],objects:{},objnames:{},objtypes:{},terms:{"1st":0,"2nd":0,"4th":0,"5th":0,"6th":0,"abstract":0,"case":0,"default":0,"final":0,"function":0,"int":0,"long":0,"short":0,"while":0,For:0,POS:0,Such:0,The:0,Then:0,There:0,... | PypiClean |
/ANSIEnum-0.2.3.tar.gz/ANSIEnum-0.2.3/src/ansienum/__init__.py | from enum import Enum
from typing import Union
__all__ = ["ANSI"]
VERSION = "0.2.3"
class ANSIEnum(Enum):
def __init__(self, n: Union[int, list[int]], control_byte: str, abbr: str = None, description: str = None):
self._n = n
if type(self._n) is list:
for i, t in enumerate(self._n):
... | PypiClean |
/MeUtils-2023.8.29.13.9.44-py3-none-any.whl/examples/Time-Extractor/TimeNormalizer.py | import pickle
import regex as re
import arrow
import json
import os
import sys
import pandas as pd
from StringPreHandler import StringPreHandler
from TimePoint import TimePoint
from TimeUnit import TimeUnit
# 时间表达式识别的主要工作类
class TimeNormalizer:
def __init__(self, isPreferFuture=False):
self.isPreferFutur... | PypiClean |
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/postcss-load-config/src/index.js | 'use strict'
const resolve = require('path').resolve
const config = require('lilconfig')
const yaml = require('yaml')
const loadOptions = require('./options.js')
const loadPlugins = require('./plugins.js')
/* istanbul ignore next */
const interopRequireDefault = (obj) => obj && obj.__esModule ? obj : { default: obj... | PypiClean |
/EDDIE-Tool-1.0.0.tar.gz/EDDIE-Tool-1.0.0/eddietool/common/eddieSpread.py | __version__ = '$Revision: 900 $'
__copyright__ = 'Copyright (c) Chris Miles 2007'
__author__ = 'Chris Miles'
__license__ = '''
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 ver... | PypiClean |
/BiblioPixel-3.4.46.tar.gz/BiblioPixel-3.4.46/bibliopixel/layout/strip.py | from .. colors import conversions
from . layout import MultiLayout
from . geometry import make_strip_coord_map_multi
from . geometry.strip import make_strip_coord_map_positions
class Strip(MultiLayout):
CLONE_ATTRS = MultiLayout.CLONE_ATTRS + ('brightness', 'pixelWidth')
def __init__(self, drivers, threadedU... | PypiClean |
/GailBot_Testing_Suite-0.1a8-py3-none-any.whl/gailbot/services/converter/plugin/pluginMethod.py | import os
from typing import Dict, Union, List, Any
from gailbot.core.utils.general import write_toml, read_toml
from ..payload.payloadObject import PayLoadObject, MERGED_FILE_NAME
from gailbot.services.converter.result import UttDict
from gailbot.plugins import Methods
from gailbot.core.utils.logger import makelogger... | PypiClean |
/Djaloha-0.4.2.tar.gz/Djaloha-0.4.2/djaloha/static/aloha.0.20/plugins/extra/ribbon/lib/ribbon-plugin.js | define(
['aloha/jquery', 'aloha/plugin', 'aloha/floatingmenu', 'i18n!aloha/nls/i18n'],
function(jQuery, Plugin, FloatingMenu, i18nCore) {
var
$ = jQuery,
GENTICS = window.GENTICS,
Aloha = window.Aloha;
/**
* register the plugin with unique name
*/
var ribbon = Plugin.create('ribbon', {
/**
* I... | PypiClean |
/FunID-0.3.16.2.tar.gz/FunID-0.3.16.2/funid/main.py | def main():
from funid.src import align
from funid.src import tree_interpretation_pipe
from funid.src import cluster
from funid.src import dataset
from funid.src import ext
from funid.src import hasher
from funid.src import initialize
from funid.src import logger
from funid.src impor... | PypiClean |
/Flask-Security-Classic-3.0.2.tar.gz/Flask-Security-Classic-3.0.2/docs/quickstart.rst | Quick Start
===========
* :ref:`basic-sqlalchemy-application`
* :ref:`basic-sqlalchemy-application-with-session`
* :ref:`basic-mongoengine-application`
* :ref:`basic-peewee-application`
* :ref:`mail-configuration`
* :ref:`proxy-configuration`
.. _basic-sqlalchemy-application:
Basic SQLAlchemy Application
===========... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/lib/js/plugins/insertdatetime/plugin.js | (function () {
'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var getDateFormat = function (editor) {
return editor.getParam('insertdatetime_dateformat', editor.translate('%Y-%m-%d'));
};
var getTimeFormat = function (editor) {
return editor.getParam('i... | PypiClean |
/Flask-Dance-7.0.0.tar.gz/Flask-Dance-7.0.0/README.rst | Flask-Dance |build-status| |coverage-status| |docs|
===================================================
Doing the OAuth dance with style using Flask, requests, and oauthlib. Currently,
only OAuth consumers are supported, but this project could easily support
OAuth providers in the future, as well. The `full documentati... | PypiClean |
/fastapi_jsonapi-2.0.0.tar.gz/fastapi_jsonapi-2.0.0/fastapi_jsonapi/signature.py | import inspect
import logging
from enum import Enum
from inspect import Parameter
from types import GenericAlias
from typing import (
Dict,
List,
Optional,
Set,
Tuple,
Type,
)
from fastapi import Query
from pydantic import BaseModel as BaseModelOriginal
from pydantic.fields import ModelField
f... | PypiClean |
/BittyTax-0.5.1.tar.gz/BittyTax-0.5.1/src/bittytax/conv/parsers/blockfi.py |
import sys
from decimal import Decimal
from colorama import Back, Fore
from ..dataparser import DataParser
from ..exceptions import UnexpectedTypeError
from ..out_record import TransactionOutRecord
WALLET = "BlockFi"
def parse_blockfi(data_row, parser, **kwargs):
row_dict = data_row.row_dict
if row_dict[... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/electrum_chi/electrum/msqr.py |
def modular_sqrt(a, p):
""" Find a quadratic residue (mod p) of 'a'. p
must be an odd prime.
Solve the congruence of the form:
x^2 = a (mod p)
And returns x. Note that p - x is also a root.
0 is returned is no square root exists for
these a and p.
The Tonelli-Shanks algorithm is used... | PypiClean |
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/xinha/lang/ro.js |
// LANG: "ro", ENCODING: UTF-8
// Author: Mihai Bazon, http://dynarch.com/mishoo
// FOR TRANSLATORS:
//
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
// (at least a valid email address)
//
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
// (if this is not possible, please include a comment
// t... | PypiClean |
/FEV_KEGG-1.1.4.tar.gz/FEV_KEGG-1.1.4/FEV_KEGG/Experiments/24.py | from FEV_KEGG.Evolution.Taxonomy import NCBI
import FEV_KEGG.KEGG.Organism
from FEV_KEGG.Statistics.Percent import getPercentSentence
if __name__ == '__main__':
output = []
taxonomy = NCBI.getTaxonomy()
groupMajority = 80
#- Create a group of example organisms of Order.
nodesGroup =... | PypiClean |
/NNGT-2.7.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl/nngt/geometry/dxf_import/homcoord.py | __credits__ = ['http://www.nmt.edu/tcc/help/lang/python/examples/homcoord/']
import sys
from math import *
import numpy as np
# --------- #
# Constants #
# --------- #
RAD_45 = pi / 4. # 45 degrees in radians
RAD_90 = pi / 2. # 90 degrees in radians
RAD_180 = pi # 180 degrees in radians
TWO_PI = 2. * p... | PypiClean |
/Dtls-1.2.0.tar.gz/Dtls-1.2.0/dtls/demux/router.py |
# Copyright 2012 Ray Brown
#
# 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
#
# The License is also distributed with this work in the file n... | PypiClean |
/GoogleAppEnginePipeline-1.9.22.1.tar.gz/GoogleAppEnginePipeline-1.9.22.1/pipeline/models.py | from google.appengine.ext import db
from google.appengine.ext import blobstore
try:
import json
except ImportError:
import simplejson as json
# Relative imports
import util
class _PipelineRecord(db.Model):
"""Represents a Pipeline.
Key name is a randomly assigned UUID. No parent entity.
Properties:
... | PypiClean |
/CustomPipeline-0.0.3-py3-none-any.whl/rplibs/colorama/winterm.py | from . import win32
# from wincon.h
class WinColor(object):
BLACK = 0
BLUE = 1
GREEN = 2
CYAN = 3
RED = 4
MAGENTA = 5
YELLOW = 6
GREY = 7
# from wincon.h
class WinStyle(object):
NORMAL = 0x00 # dim text, dim background
BRIGHT = 0x08 ... | PypiClean |
/CLOVER_GUI-1.0.0a1-py3-none-any.whl/clover_gui/details/grid.py |
from typing import Callable
import pandas as pd
import ttkbootstrap as ttk
from clover.impact.finance import COST, ImpactingComponent
from clover.impact.ghgs import INITIAL_GHGS, FINAL_GHGS
from ttkbootstrap.constants import *
from ttkbootstrap.scrolled import *
from ..__utils__ import DETAILS_GEOMETRY
__all__ = (... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/geoserver/upload.py | import uuid
import logging
import geoserver
from geoserver.catalog import ConflictingDataError, UploadError
from geoserver.resource import FeatureType, Coverage
from django.conf import settings
from geonode import GeoNodeException
from geonode.layers.utils import layer_type, get_files
from .helpers import (GEOSERVER... | PypiClean |
/KratosParticleMechanicsApplication-9.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/KratosMultiphysics/ParticleMechanicsApplication/apply_mpm_particle_neumann_condition_process.py | import KratosMultiphysics
import KratosMultiphysics.ParticleMechanicsApplication as KratosParticle
def Factory(settings, Model):
if(not isinstance(settings, KratosMultiphysics.Parameters)):
raise Exception("expected input shall be a Parameters object, encapsulating a json string")
return ApplyMPMPartic... | PypiClean |
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/bower_components/bootstrap/site/content/docs/5.0/content/reboot.md | ---
layout: docs
title: Reboot
description: Reboot, a collection of element-specific CSS changes in a single file, kickstart Bootstrap to provide an elegant, consistent, and simple baseline to build upon.
group: content
aliases: "/docs/5.0/content/"
toc: true
---
## Approach
Reboot builds upon Normalize, providing ma... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/bower_components/iron-scroll-threshold/.github/ISSUE_TEMPLATE.md | <!-- Instructions: https://github.com/PolymerElements/iron-scroll-threshold/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: Th... | PypiClean |
/BioTEMPy-2.1.0a0-py3-none-any.whl/TEMPy/maps/map_parser.py |
import numpy as np
import struct as binary
import mrcfile
from TEMPy.maps.em_map import Map
class MapParser:
def __init__(self):
'''not sure anything needs to be initialised now'''
pass
@staticmethod
def parseCcpemHeader(ccpem_header):
"""
Convert the header object fr... | PypiClean |
/HybridUI-0.0.1.tar.gz/HybridUI-0.0.1/hybrid/elements/select.py | from typing import List
from ..element import Element
# Annahme: `Element` und andere Abhängigkeiten sind bereits definiert
class Select(Element):
def __init__(
self,
allowClear= None,
autoClearSearchValue= None,
autoFocus= None,
bordered= None, ... | PypiClean |
/Finance-Ultron-1.0.8.1.tar.gz/Finance-Ultron-1.0.8.1/ultron/ump/factor/buy/buy_demo.py | from ultron.ump.factor.buy.base import FactorBuyBase, FactorBuyXD, FactorBuyTD, BuyCallMixin
from ultron.ump.factor.buy.buy_break import FactorBuyBreak
from ultron.ump.factor.buy.buy_wrap import LeastPolyWrap
from ultron.ump.technical.line import Line
class FactorSDBreak(FactorBuyXD, BuyCallMixin):
"""示例买入因子: 在Fa... | PypiClean |
/JATOOLBOX-1.0.0.tar.gz/JATOOLBOX-1.0.0/README.md | ## O que é a Jatoolbox ?
No contexto da DP6 é comum lidarmos com uma base de dados para atribuição que apresentas jornadas no formato 'A > B > C', em que as jornadas são representadas por uma string em que os pontos de contato de um usuário são representados por substrings separados por ' > ', na ordem em que aconte... | PypiClean |
/NehorayRapid-0.0.1-py3-none-any.whl/mmedit/models/losses/gan_loss.py | import torch
import torch.autograd as autograd
import torch.nn as nn
from ..registry import LOSSES
@LOSSES.register_module()
class GANLoss(nn.Module):
"""Define GAN loss.
Args:
gan_type (str): Support 'vanilla', 'lsgan', 'wgan', 'hinge'.
real_label_val (float): The value for real label. Defa... | PypiClean |
/ArchivesSnake-0.9.1-py3-none-any.whl/asnake/client/web_client.py | from requests import Session
from urllib.parse import quote
from numbers import Number
from collections.abc import Sequence, Mapping
import json
import asnake.configurator as conf
import asnake.logging as logging
log = None # initialized on first client init
class ASnakeAuthError(Exception): pass
class ASnakeWeirdRe... | PypiClean |
/Flask-DebugToolbar-0.13.1.tar.gz/Flask-DebugToolbar-0.13.1/src/flask_debugtoolbar/static/codemirror/mode/less/less.js | CodeMirror.defineMode("css", function(config) {
var indentUnit = config.indentUnit, type;
function ret(style, tp) {type = tp; return style;}
//html5 tags
var tags = ["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button"... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/grid/enhanced/plugins/CellMerge.js.uncompressed.js | define("dojox/grid/enhanced/plugins/CellMerge", [
"dojo/_base/declare",
"dojo/_base/array",
"dojo/_base/lang",
"dojo/_base/html",
"../_Plugin",
"../../EnhancedGrid"
], function(declare, array, lang, html, _Plugin, EnhancedGrid){
var CellMerge = declare("dojox.grid.enhanced.plugins.CellMerge", _Plugin, {
// summ... | PypiClean |
/Canto-0.9.8.tar.gz/Canto-0.9.8/plugins/reddit.py |
# PREPEND_SCORE, if true will add the score to the entry title. Note, this
# doesn't effect the sort.
PREPEND_SCORE = True
# PREPEND_SUBREDDIT, if true will add the [subreddit] to the entry title.
PREPEND_SUBREDDIT = True
# EXTRA_LOG_OUTPUT, if true will log non-error stuff with -v.
EXTRA_LOG_OUTPUT = False
# Yo... | PypiClean |
/GxSphinx-1.0.0.tar.gz/GxSphinx-1.0.0/sphinx/util/docutils.py | import os
import re
from contextlib import contextmanager
from copy import copy
from distutils.version import LooseVersion
from os import path
from types import ModuleType
from typing import Any, Callable, Dict, Generator, IO, List, Optional, Set, Tuple
from typing import cast
import docutils
from docutils import node... | PypiClean |
/NERDA_Con-0.0-py3-none-any.whl/NERDA_Con/preprocessing.py | import torch
import warnings
import transformers
import sklearn.preprocessing
class NERDADataSetReader():
"""Generic NERDA DataSetReader"""
def __init__(self,
sentences: list,
tags: list,
transformer_tokenizer: transformers.PreTrainedTokenizer,
... | PypiClean |
/FNAPILIB-1.0.4.tar.gz/FNAPILIB-1.0.4/README.md | # Fn-api.com Python Library :
- for help you can enter our discord server [Fn-api](https://discord.gg/YNXhEn3XGt)
----------------------------------------------------------------------------------------------------------------------------------
```
from FNAPILIB import *
api = FNapi()
```
## language example :
- ... | PypiClean |
/DataStructures1-1.0.0.tar.gz/DataStructures1-1.0.0/data_structure/sort.py | def bubbleSort(list):
for iter_num in range(len(list)-1,0,-1):
for idx in range(iter_num):
if list[idx]>list[idx+1]:
temp = list[idx]
list[idx] = list[idx+1]
list[idx+1] = temp
return list
def mergeSort(unsorted_list):
if len(unsorted_lis... | PypiClean |
/Krakatau-noff-v0.20181212.tar.gz/Krakatau-noff-v0.20181212/Krakatau/ssa/ssa_ops/new.py | from .. import excepttypes, objtypes
from ..constraints import ObjectConstraint, returnOrThrow, throw
from ..ssa_types import SSA_OBJECT
from .base import BaseOp
class New(BaseOp):
has_side_effects = True
def __init__(self, parent, name, inode_key):
super(New, self).__init__(parent, [], makeException... | PypiClean |
/Brainfeatures-0.0.4.tar.gz/Brainfeatures-0.0.4/brainfeatures/decoding/decode.py | import pandas as pd
import numpy as np
import logging
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import KFold
from sklearn.decomposition.pca import PCA
# import rfpimp
def get_X_y(data_set, agg_f=None):
""" read all data from the data set. aggregate if wanted """
if agg_f i... | PypiClean |
/Chibchas-0.2.13b0-py3-none-any.whl/chibchas/JSON_output.ipynb | ## JSON output
```
import pandas as pd
import getpass
api_key=getpass.getpass()
df=pd.read_json(f'http://clustercien.udea.edu.co/viceinv/{api_key}/InstituLAC.json')
dff=df[df['Group'].astype(str).str.lower().str.contains('interacciones')][['FRH_P-TES_MAST_P']]#, 'FRH_P-TES_MAST_P',
#'FRH_P-TES_PREG_P']]['FR... | PypiClean |
/HTSQL-2.3.3.tar.gz/HTSQL-2.3.3/src/htsql/core/syn/grammar.py |
from ..util import (maybe, oneof, listof, omapof, trim_doc, toposort, omap,
TextBuffer, Printable)
from ..error import Error, Mark, parse_guard, point
from .token import Token
import re
class Pattern(Printable):
# Abstract regular expression pattern.
def dfa(self):
# Converts the pattern to... | PypiClean |
/Flask-KQMaps-0.4.2.tar.gz/Flask-KQMaps-0.4.2/flask_kqmaps/static/kqwebclient/leaflet/3rd_libs/x2js/xml2json.min.js | (function(a,b){if(typeof define==="function"&&define.amd){define([],b);}else{if(typeof exports==="object"){module.exports=b();}else{a.X2JS=b();}}}(this,function(){return function(z){var t="1.2.0";z=z||{};i();u();function i(){if(z.escapeMode===undefined){z.escapeMode=true;}z.attributePrefix=z.attributePrefix||"_";z.arra... | PypiClean |
/GTW-1.2.6.tar.gz/GTW-1.2.6/_RST/_TOP/Console.py |
from __future__ import absolute_import, division, print_function, unicode_literals
from _GTW import GTW
from _TFL import TFL
from _TFL._Meta.Once_Property import Once_Property
from _TFL.Decorator import getattr_safe
from _TFL.pyk import py... | PypiClean |
/AutoDiff_207_15-1.1.tar.gz/AutoDiff_207_15-1.1/AutoDiff/nn.py | from AutoDiff.ad import DiffObj, Variable
from AutoDiff.ad import MathOps as mo
import numpy as np
class NeuralNet(object):
def __init__(self, input_dim, hidden_dim, out_dim, lr=0.1):
self.in_var, self.in_val = self.DeclareVariables('x', (1, input_dim+1))
self.hid_wt_var, self.hid_wt_val = self.Dec... | PypiClean |
/LUBEAT-0.13.1-cp38-cp38-macosx_10_9_x86_64.whl/econml/_shap.py | import shap
from collections import defaultdict
import numpy as np
from .utilities import broadcast_unit_treatments, cross_product, get_feature_names_or_default
def _shap_explain_cme(cme_model, X, d_t, d_y,
feature_names=None, treatment_names=None, output_names=None,
input_... | PypiClean |
/ModuleUltra-0.4.1-py3-none-any.whl/moduleultra/snakemake_log_handler.py | from blessings import Terminal
from multiprocessing import Lock
DEFAULT_BAR_WIDTH = 60
class ProgressBar:
def __init__(self, name, total, terminal):
self.name = name
self.total = total
self.term = terminal
self.done = 0
self.errored = 0
self.started = 0
sel... | PypiClean |
/EggLib-3.3.0.tar.gz/EggLib-3.3.0/src/egglib/wrappers/_utils.py | import os, re, tempfile, shutil, pathlib, platformdirs
from .. import _interface
#### write sequences down a file #######################################
def _write_sample(obj, fname):
if not isinstance(obj, (_interface.SampleView, str)): raise TypeError('invalid type for `obj` argument')
f = open(fname, 'w')... | PypiClean |
/Bugs%20Everywhere%20(BEurtle%20fork)-1.5.0.1.-2012-07-16-.zip/Bugs Everywhere (BEurtle fork)-1.5.0.1.-2012-07-16-/libbe/command/import_xml.py |
import copy
import os
import sys
try: # import core module, Python >= 2.5
from xml.etree import ElementTree
except ImportError: # look for non-core module
from elementtree import ElementTree
import libbe
import libbe.bug
import libbe.command
import libbe.command.util
import libbe.comment
import libbe.util.enc... | PypiClean |
/Finit_Automaton-0.1-py3-none-any.whl/Finit_Automaton-0.1.dist-info/LICENSE.md | MIT License
Copyright (c) 2020 Fran Martin
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, distr... | PypiClean |
/CallFlow-1.3.0.tar.gz/CallFlow-1.3.0/callflow/layout/hierarchy.py | import networkx as nx
# CallFlow imports
import callflow
from callflow.utils.df import df_as_dict
LOGGER = callflow.get_logger(__name__)
class HierarchyLayout:
"""
Hierarchy Layout computation
"""
def __init__(self, esg, dataset, node, nbins):
"""
Hierarchy Layout computation
... | PypiClean |
/CoinMarketCapAPI-0.5-py3-none-any.whl/coinmarketcap/environment.py |
from os.path import join
from pathlib import Path
from tempfile import gettempdir
from requests_cache.core import CachedSession as session
from threading import Lock
from json import load
from os import environ
from ratelimit import limits, sleep_and_retry
from datetime import datetime
from calendar import monthrange
... | PypiClean |
/CASTING-0.1.3.tar.gz/CASTING-0.1.3/docs/Installation.md |
### Manual Installation
[Install the anaconda package](https://docs.anaconda.com/anaconda/install/). Then,
```
conda env create --name CASTING
conda activate CASTING
git clone https://github.com/sbanik2/CASTING.git
pip install -r requirements.txt
python setup.py install
```
### Installation with pypi
```
pip instal... | PypiClean |
/Flintrock-2.0.0-py3-none-any.whl/flintrock/core.py | import concurrent.futures
import functools
import json
import os
import posixpath
import shlex
import sys
import logging
from concurrent.futures import FIRST_EXCEPTION
# External modules
import paramiko
# Flintrock modules
from .ssh import get_ssh_client, ssh_check_output, ssh, SSHKeyPair
from .exceptions import SSHE... | PypiClean |
/BlazeWeb-0.6.2-py3-none-any.whl/blazeweb/hierarchy.py | import logging
from os import path as ospath
import sys
from blazeutils.datastructures import BlankObject, OrderedDict, UniqueList
from blazeutils.error_handling import raise_unexpected_import_error
import six
from blazeweb.globals import ag, settings
from blazeweb.utils import registry_has_object
log = logging.getL... | PypiClean |
/Bigt-2022.1.4-py3-none-any.whl/bigt/pprint.py | from bigt.dictext import DictExt
try:
from rich.console import Console
from rich.pretty import ReprHighlighter
def pp(full, missed, changed, indent=0):
result = ""
if isinstance(full, dict):
result += "{\n"
indent += 4
for k, v in full.items():
... | PypiClean |
/DEME-0.2.8.tar.gz/DEME-0.2.8/thirdparty/pybind11/docs/advanced/cast/stl.rst | STL containers
##############
Automatic conversion
====================
When including the additional header file :file:`pybind11/stl.h`, conversions
between ``std::vector<>``/``std::deque<>``/``std::list<>``/``std::array<>``/``std::valarray<>``,
``std::set<>``/``std::unordered_set<>``, and
``std::map<>``/``std::unor... | PypiClean |
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/mmdetection/mmdet/core/hook/sync_random_size_hook.py | import random
import warnings
import torch
from mmcv.runner import get_dist_info
from mmcv.runner.hooks import HOOKS, Hook
from torch import distributed as dist
@HOOKS.register_module()
class SyncRandomSizeHook(Hook):
"""Change and synchronize the random image size across ranks.
SyncRandomSizeHook is depreca... | PypiClean |
/15five-django-ajax-selects-1.5.2.155.tar.gz/15five-django-ajax-selects-1.5.2.155/ajax_select/registry.py | from django.core.exceptions import ImproperlyConfigured
from django.conf import settings
class LookupChannelRegistry(object):
"""
Registry for LookupChannels activated for your django project.
This includes any installed apps that contain lookup.py modules (django 1.7+)
and any lookups that are expl... | PypiClean |
/ConfTools-z6-6.0.2.tar.gz/ConfTools-z6-6.0.2/src/conf_tools/code_desc.py | from .checks import check_necessary, wrap_check
from .code_specs import check_valid_code_spec, instantiate_spec
from .exceptions import BadConfig
from conf_tools import ConfToolsGlobal, logger
# from contracts import describe_value
from pprint import pformat
def check_generic_code_desc(x, what=""):
""" Checks th... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.