id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/ImageD11-1.9.9.tar.gz/ImageD11-1.9.9/docs/sphx/refinement.rst | Refinement
==========
Assuming you have managed to find some trial orientation matrices the quality of the derived parameters will be quite poor without post refinement of the experimental setup. For each grain the translation of the grain from the rotation axis perturbs the position of the diffraction spots. Also the ... | PypiClean |
/netket-3.9.2.tar.gz/netket-3.9.2/netket/operator/_bose_hubbard.py |
from typing import Optional
from numba import jit
import numpy as np
import jax.numpy as jnp
import math
from netket.graph import AbstractGraph, Graph
from netket.hilbert import Fock
from netket.utils.types import DType
from netket.utils.numbers import dtype as _dtype
from netket.errors import concrete_or_error, Num... | PypiClean |
/LabExT_pkg-2.2.0.tar.gz/LabExT_pkg-2.2.0/docs/index.md | # LabExT - Laboratory Experiment Tool
LabExT, short for Laboratory Experiment Tool, is a software environment for performing laboratory
experiments on silicon-photonic devices and chips. The tool is free, written in Python 3.8 and uses the I/O API VISA
through [pyvisa](https://github.com/pyvisa/pyvisa).
To get starte... | PypiClean |
/GenMotion-0.0.4-py3-none-any.whl/genmotion/algorithm/action2motion/lie/pose_lie.py | import torch
from .lie_util import *
from torch import nn
class LieSkeleton(object):
def __init__(self, raw_translation, kinematic_tree, tensor):
super(LieSkeleton, self).__init__()
self.tensor = tensor
# print(self.tensor)
self._raw_translation = self.tensor(raw_translation.shape)... | PypiClean |
/Flask-Celery-2.4.3.tar.gz/Flask-Celery-2.4.3/README.rst | ==============================
Flask <-> Celery Integration
==============================
:Version: 2.4.3
**FROM CELERY 3.0 THIS LIBRARY IS NO LONGER NECESSARY, INSTEAD YOU SHOULD
USE THE STANDARD CELERY API**
.. _Celery: http://celeryproject.org
Using Flask with Celery
=======================
From Celery 3.0 the... | PypiClean |
/KratosDEMApplication-9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/KratosMultiphysics/DEMApplication/materials_assignation_utility.py | import KratosMultiphysics as Kratos
from KratosMultiphysics.DEMApplication import *
import sys
class MaterialsAssignationUtility:
def __init__(self, model, spheres_model_part, DEM_material_parameters):
self.model = model
self.spheres_model_part = spheres_model_part
self.DEM_material_param... | PypiClean |
/Helmholtz-0.2.0.tar.gz/Helmholtz-0.2.0/helmholtz/core/loggers.py | import logging
#get defaults from settings
#if not found set defaults
#from hardcoded values
try :
from django.conf import settings
default_format = getattr(settings, 'LOG_FORMAT')
default_date_format = getattr(settings, 'LOG_DATE_FORMAT')
default_level_file = getattr(logging, settings.LOG_LEVEL_... | PypiClean |
/MLMath-0.0.0rc1.tar.gz/MLMath-0.0.0rc1/mlm/math/extrapolation.py | import warnings
from typing import Union, Dict, Callable, Tuple
from ..math.backend._backend import get_spatial_derivative_order
from .backend import choose_backend
from ._shape import Shape, channel, spatial
from ._magic_ops import concat, stack
from ._tensors import Tensor, NativeTensor, CollapsedTensor, TensorStack... | PypiClean |
/AtmosRT-0.5.4.tar.gz/AtmosRT-0.5.4/atmosrt/sbdart.py | from collections.abc import Iterable
from contextlib import contextmanager
import numpy
import pandas
from atmosrt import _rtm
from atmosrt import settings
import libsbdart
input_file = 'INPUT'
command = 'sbdart.py'
header_lines = 3
default_out = 'out.txt'
class SBdartError(_rtm.RTMError):
pass
class SBdar... | PypiClean |
/Mopidy_MPD-3.3.0-py3-none-any.whl/mopidy_mpd/protocol/connection.py | from mopidy_mpd import exceptions, protocol
from mopidy_mpd.protocol import tagtype_list
@protocol.commands.add("close", auth_required=False)
def close(context):
"""
*musicpd.org, connection section:*
``close``
Closes the connection to MPD.
"""
context.session.close()
@protocol.com... | PypiClean |
/ESMValTool-2.9.0-py3-none-any.whl/esmvaltool/cmorizers/data/formatters/datasets/persiann_cdr.py | import glob
import logging
import os
import warnings
from pprint import pformat
import dask.array as da
import iris
import iris.coord_categorisation
import numpy as np
from esmvaltool.cmorizers.data import utilities as utils
logger = logging.getLogger(__name__)
def fix_coord_dimensions(cube):
"""Fix the order ... | PypiClean |
/Logger3-0.1.1.tar.gz/Logger3-0.1.1/colorama/win32.py |
# from winbase.h
STDOUT = -11
STDERR = -12
try:
import ctypes
from ctypes import LibraryLoader
windll = LibraryLoader(ctypes.WinDLL)
from ctypes import wintypes
except (AttributeError, ImportError):
windll = None
SetConsoleTextAttribute = lambda *_: None
winapi_test = lambda *_: None
else:... | PypiClean |
/CRIkit2-0.4.4.tar.gz/CRIkit2-0.4.4/crikit/ui/dialog_SVD.py | import sys as _sys
# import timeit
import numpy as _np
from PyQt5.QtWidgets import (QApplication as _QApplication, QWidget as _QWidget)
from crikit.ui.dialog_AbstractFactorization import DialogAbstractFactorization
from scipy.linalg import diagsvd as _diagsvd
class DialogSVD(DialogAbstractFactorization):
"""
... | PypiClean |
/DDFacet-0.7.2.0.tar.gz/DDFacet-0.7.2.0/SkyModel/Sky/DeapAlgo.py | from __future__ import division, absolute_import, print_function
import random
from SkyModel.Other.progressbar import ProgressBar
from deap import tools
from DDFacet.Other import ClassTimeIt
def varAnd(population, toolbox, cxpb, mutpb):
"""Part of an evolutionary algorithm applying only the variation part
(c... | PypiClean |
/BorutaShap-1.0.16.tar.gz/BorutaShap-1.0.16/README.md | [](https://zenodo.org/badge/latestdoi/255354538)
<a href="https://badge.fury.io/py/BorutaShap"><img src="https://badge.fury.io/py/BorutaShap.svg" alt="PyPI version" height="18"></a>
# Boruta-Shap
BorutaShap is a wrapper feature selection method which combines both the Boru... | PypiClean |
/GLManager-1.1.6.tar.gz/GLManager-1.1.6/app/modules/console/ovpn_utils/install.py | import os
import re
from urllib.request import urlopen
from console import Console, FuncItem, COLOR_NAME
from app.utilities.logger import logger
from app.utilities.utils import get_ip_address
RCLOCAL = '/etc/rc.local'
OPENVPN_PATH = '/etc/openvpn'
EASYRSA_PATH = os.path.join(OPENVPN_PATH, 'easy-rsa')
EASYRSA_PKI_P... | PypiClean |
/Auto_FOX-1.0.0b1-py3-none-any.whl/FOX/armc/monte_carlo.py | from __future__ import annotations
import copy
import warnings
from os import PathLike
from abc import ABC, abstractmethod
from logging import Logger
from functools import wraps, partial
from itertools import repeat, cycle, chain
from collections import abc
from typing import (
Tuple, List, Dict, Optional, Union, ... | PypiClean |
/GitRestructure-0.1.tar.gz/GitRestructure-0.1/restructure/branchoperator.py | import click
import subprocess
import sys
from commandexecutor import CommandExecutor
import webbrowser
import time
from printer import Printer
class BranchOperator(object):
START = 'start'
FINISH = 'finish'
FEATURE = 'feature'
HOTFIX = 'hotfix'
RELEASE = 'release'
FOXHOUND_DEV_BRANCH_NAME = '... | PypiClean |
/HomeLab-0.1.36.tar.gz/HomeLab-0.1.36/homelab/analysis/nmap.py | import csv
import io
import os
import platform
import re
import shlex
import subprocess
import sys
from xml.etree import ElementTree as ET
try:
from multiprocessing import Process
except ImportError:
# For pre 2.6 releases
print(ImportError)
from threading import Thread as Process, Timer
__author__ = 'Ale... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/basic/lang/fi.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/license
*/
CKEDITOR.lang['fi']={"editor":"Rikastekstieditori","editorPanel":"Rikastekstieditoripaneeli","common":{"editorHelp":"Paina ALT 0 nähdäksesi ohjeen","browseServer":"Selaa palve... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/ol-2.13/lib/OpenLayers/Geometry/Polygon.js | * @requires OpenLayers/Geometry/Collection.js
* @requires OpenLayers/Geometry/LinearRing.js
*/
/**
* Class: OpenLayers.Geometry.Polygon
* Polygon is a collection of Geometry.LinearRings.
*
* Inherits from:
* - <OpenLayers.Geometry.Collection>
* - <OpenLayers.Geometry>
*/
OpenLayers.Geometry.Polygon = ... | PypiClean |
/MiraiML-3.0.0.tar.gz/MiraiML-3.0.0/miraiml/pipeline.py | from sklearn.preprocessing import OneHotEncoder, MinMaxScaler
from sklearn.impute import SimpleImputer
from sklearn.naive_bayes import GaussianNB
from sklearn.linear_model import LinearRegression
from miraiml.util import is_valid_pipeline_name
from miraiml.core import BasePipelineClass
def compose(steps):
"""
... | PypiClean |
/Moustache.beta-0.0.1.post16473.tar.gz/Moustache.beta-0.0.1.post16473/moustache/wssecretary.py |
import json
import tempfile
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from flask import Flask, render_template, request, send_file, jsonify
from jinja2 import TemplateSyntaxError
from secretary import Renderer
from moustache.FusionHelper import FusionHelper
from moustach... | PypiClean |
/DE_GeraArquivos-0.0.4.tar.gz/DE_GeraArquivos-0.0.4/DE_Gera_Arquivos.py | import datetime as dt
import pandas as pd
import inspect
import os
import csv
import json
import pandavro as pdx
class ARQUIVOS():
def __init__(self, **kwargs):
self._valida_kwargs(**kwargs)
pass
def _valida_kwargs(self, **kwargs):
global gPROCESSO, gDF, gFILE, gEXT, gPATH, gSUFIX, gI... | PypiClean |
/2vyper-0.3.0.tar.gz/2vyper-0.3.0/src/twovyper/utils.py | import importlib
import os
from contextlib import contextmanager
from types import ModuleType
from typing import Callable, Iterable, List, Optional, TypeVar
_ = object()
@contextmanager
def switch(*values):
def match(*v, where=True):
if not where or len(values) != len(v):
return False
... | PypiClean |
/Hector_Observations_Pipeline-1.4-py3-none-any.whl/hop/hexabundle_allocation/hector/magnets/circular.py | from ...general_operations.geometry_shapes.circle import circle
from ...hector.constants import circular_magnet_radius,robot_arm_width
from math import sin, cos, pi
from ...hector.magnets.pickup_areas import tangential_right,tangential_left,radial_inward,radial_outward
class circular_magnet(circle):
# initializin... | PypiClean |
/Office365-REST-Python-Client-2.4.3.tar.gz/Office365-REST-Python-Client-2.4.3/office365/onedrive/contenttypes/content_type.py | from office365.base_item import BaseItem
from office365.entity_collection import EntityCollection
from office365.onedrive.columns.definition import ColumnDefinition
from office365.onedrive.columns.column_link import ColumnLink
from office365.onedrive.contenttypes.order import ContentTypeOrder
from office365.onedrive.do... | PypiClean |
/MyDataSource-0.1.1.tar.gz/MyDataSource-0.1.1/README.md | 📦 setup.py (for humans)
=======================
This repo exists to provide [an example setup.py] file, that can be used
to bootstrap your next Python project. It includes some advanced
patterns and best practices for `setup.py`, as well as some
commented–out nice–to–haves.
For example, this `setup.py` provides a `$... | PypiClean |
/Bonsu-3.6.2-cp39-cp39-macosx_10_9_x86_64.whl/bonsu/phasing/RAAR.py | import numpy
from .abstract import PhaseAbstract
from .abstract import PhaseAbstractPC
from .ShrinkWrap import ShrinkWrap
class RAAR(PhaseAbstract):
"""
Relaxed Average Alternating Reflection (RAAR) algorithm.
"""
def __init__(self, parent=None):
PhaseAbstract.__init__(self, parent)
from ..lib.prfftw import raa... | PypiClean |
/NNBuilder-0.3.7.tar.gz/NNBuilder-0.3.7/nnbuilder/models/text.py | # -*- coding: utf-8 -*-
"""
Created on Feb 13 11:16 PM 2017
@author: aeloyq
"""
from nnbuilder.layers.basic import *
from nnbuilder.layers.simple import *
from nnbuilder.layers.recurrent import *
from nnbuilder.layers.misc import *
class encoder(rechidden):
def __init__(self, unit, core=gru, structure='bi', **k... | PypiClean |
/GraphQL_core_next-1.1.1-py3-none-any.whl/graphql/type/schema.py | from collections.abc import Sequence as AbstractSequence
from functools import reduce
from typing import Any, Dict, List, Optional, Sequence, Set, cast
from ..error import GraphQLError
from ..language import ast
from ..pyutils import inspect, FrozenList
from .definition import (
GraphQLAbstractType,
GraphQLInt... | PypiClean |
/Congo-0.0.1.tar.gz/Congo-0.0.1/portfolio/component/static/portfolio/vendor/mdeditor/bower_components/codemirror/keymap/emacs.js | (function() {
"use strict";
var Pos = CodeMirror.Pos;
function posEq(a, b) { return a.line == b.line && a.ch == b.ch; }
// Kill 'ring'
var killRing = [];
function addToRing(str) {
killRing.push(str);
if (killRing.length > 50) killRing.shift();
}
function growRingTop(str) {
if (!killRing.l... | PypiClean |
/Mathics3-6.0.2.tar.gz/Mathics3-6.0.2/mathics/builtin/mainloop.py | from mathics.builtin.base import Builtin
from mathics.core.attributes import A_LISTABLE, A_NO_ATTRIBUTES, A_PROTECTED
# This tells documentation how to sort this module
sort_order = "mathics.builtin.the-main-loop"
class HistoryLength(Builtin):
"""
<url>:WMA: https://reference.wolfram.com/language/ref/$Histor... | PypiClean |
/ADLES-1.4.0.tar.gz/ADLES-1.4.0/adles/interfaces/interface.py | import logging
from abc import ABC, abstractmethod
class Interface(ABC):
"""Base class for all Interfaces."""
# Names/prefixes
master_prefix = "(MASTER) "
master_root_name = "MASTER-FOLDERS"
def __init__(self, infra, spec):
"""
:param dict infra: Full infrastructure configuration... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/accounting/api/contacts_api.py | import re # noqa: F401
import sys # noqa: F401
from MergePythonSDK.shared.api_client import ApiClient, Endpoint as _Endpoint
from MergePythonSDK.shared.model_utils import ( # noqa: F401
check_allowed_values,
check_validations,
date,
datetime,
file_type,
none_type,
validate_and_convert_ty... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/mtproto/client_cache.py | import logging
from math import floor
from time import time
from typing import Any
from typing import List
from typing import Optional
from ..types import Cache
from ..types.groups import GroupCallParticipant
from ..types.participant_list import ParticipantList
from .bridged_client import BridgedClient
py_logger = lo... | PypiClean |
/NanoSV-1.2.4.tar.gz/NanoSV-1.2.4/nanosv/classes/breakpoint.py |
class Breakpoint:
def __init__(self, id, segment_1, segment_2):
self.id = id
if segment_1.flag & 16:
flag_1 = 16
else:
flag_1 = 0
if segment_2.flag & 16:
flag_2 = 16
else:
flag_2 = 0
self.segment_1 = {
"id":... | PypiClean |
/Cubane-1.0.11.tar.gz/Cubane-1.0.11/cubane/lightbox/static/cubane/lightbox/lightbox.js | ;(function($) {
/*>>core*/
/**
*
* Magnific Popup Core JS file
*
*/
/**
* Private static constants
*/
var CLOSE_EVENT = 'Close',
BEFORE_CLOSE_EVENT = 'BeforeClose',
AFTER_CLOSE_EVENT = 'AfterClose',
BEFORE_APPEND_EVENT = 'BeforeAppend',
MARKUP_PARSE_EVENT = 'MarkupParse',
OPEN_EVENT = 'Open',
CHANGE_EVEN... | PypiClean |
/ConferenceCorpus-0.1.1.tar.gz/ConferenceCorpus-0.1.1/corpus/eventtransfer.py | from corpus.lookup import CorpusLookup
from corpus.datasources.openresearch import OREvent
class EventExporter():
'''
exporter for Events and series
'''
def __init__(self,debug:bool=False):
'''
construct me
'''
self.debug=debug
lookup=CorpusLookup(lookupIds=... | PypiClean |
/BYONDToolsv3-0.1.4.tar.gz/BYONDToolsv3-0.1.4/README.rst | ==========
BYONDTools
==========
A set of tools for BYOND-based games.
Overview
--------
This is a toolkit for developers of BYOND-based games intended to do common, complex
tasks that the engine itself does not currently possess. It also exposes common
interfaces for developers wishing to obtain information from t... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/importing/Importing.py | import collections
import hashlib
import imp
import os
import sys
import zipfile
from nuitka import Options, SourceCodeReferences
from nuitka.__past__ import iter_modules
from nuitka.containers.OrderedSets import OrderedSet
from nuitka.importing import StandardLibrary
from nuitka.plugins.Plugins import Plugins
from nu... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojo/cldr/nls/fi/islamic.js | define(
"dojo/cldr/nls/fi/islamic", //begin v1.x content
{
"dateFormatItem-yM": "L.yyyy",
"dateFormatItem-yyyyMMMEd": "EEE d. MMM y G",
"dateFormatItem-yQ": "Q/yyyy",
"dayPeriods-format-wide-pm": "ip.",
"dateFormatItem-MMMEd": "E d. MMM",
"dateFormatItem-hms": "h.mm.ss a",
"dateFormatItem-yQQQ": "QQQ y",
"days-... | PypiClean |
/Denis_mess_client-1.0.0.tar.gz/Denis_mess_client-1.0.0/client/client/transport.py | import socket
import time
import logging
import json
import threading
import hashlib
import hmac
import binascii
from PyQt5.QtCore import pyqtSignal, QObject
from common.utils import *
from common.variables import *
from common.errors import ServerError
# Логер и объект блокировки для работы с сокетом.
logger = logg... | PypiClean |
/OctoBot-Tentacles-Manager-2.9.4.tar.gz/OctoBot-Tentacles-Manager-2.9.4/CHANGELOG.md | # Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.9.4] - 2023-08-22
### Added
- API: ensure_tentacle_info
## [2... | PypiClean |
/HPI-0.3.20230327.tar.gz/HPI-0.3.20230327/my/time/tz/via_location.py | REQUIRES = [
# for determining timezone by coordinate
'timezonefinder',
]
## user might not have tz config section, so makes sense to be more defensive about it
# todo might be useful to extract a helper for this
try:
from my.config import time
except ImportError as ie:
if ie.name != 'time':
r... | PypiClean |
/CNFgen-0.9.2-py3-none-any.whl/cnfgen/formula/opb.py | from cnfgen.formula.opbio import OPBio
from cnfgen.formula.baseopb import BaseOPB
from cnfgen.formula.variables import VariablesManager
class OPB(VariablesManager, OPBio):
"""Pseudo boolean formula
A OPB formula is a sequence of pseudo boolean constraints, which
are positive integer linear combinations o... | PypiClean |
/BlurWal-1.1.1.tar.gz/BlurWal-1.1.1/blurwal/x11.py | import logging
from typing import Any, List
import Xlib
from Xlib import display, error
from Xlib.display import drawable
class XConnection:
"""A connection to the X server for retrieving properties."""
def __init__(self) -> None:
"""Open a connection to X and retrieve the root window."""
se... | PypiClean |
/Kiwiii-server-0.7.0.tar.gz/Kiwiii-server-0.7.0/kiwiii/screenerapi.py |
import os
import json
import yaml
from tornado import httpclient
with open(os.path.join(
os.path.dirname(__file__), "../server_config.yaml")) as f:
config = yaml.load(f.read())
def request(query, auth_header):
url = "{}{}".format(config["screener_api"], query)
print("HTTP Request: {}".format(ur... | PypiClean |
/BuildNotify-2.1.0.tar.gz/BuildNotify-2.1.0/buildnotifylib/project_status_notification.py | import subprocess
from datetime import datetime
from typing import Optional, Callable, List, Dict, Tuple
from buildnotifylib.config import Config
from buildnotifylib.core.project import Project
from buildnotifylib.core.projects import OverallIntegrationStatus
from buildnotifylib.notifications import Notification
cla... | PypiClean |
/NeuroUnits-0.1.2.tar.gz/NeuroUnits-0.1.2/src/neurounits/unit_term_parsing/unitterm_lexing.py |
# -------------------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull. 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 sourc... | PypiClean |
/GeneXpress-0.0.1.1.tar.gz/GeneXpress-0.0.1.1/ExpressionTools/pyEset.py | import os
from rpy2 import robjects as ro
# from rpy2 import rinterface as ri
from rpy2.robjects import r, pandas2ri
from rpy2.robjects.packages import importr
from rpy2.robjects.methods import RS4
pandas2ri.activate()
# numpy2ri.activate()
start_dir = os.getcwd()
# if os.path.isdir(os.getcwd()+"/r_data"):
# os.c... | PypiClean |
/Benker-0.5.4.tar.gz/Benker-0.5.4/benker/builders/base_builder.py | import numbers
from lxml import etree
try:
# noinspection PyCompatibility
from collections.abc import Sequence
except ImportError:
# noinspection PyCompatibility
from collections import Sequence
text_type = type(u"")
binary_type = type(b"")
string_types = text_type, binary_type
# noinspection PyPro... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/dizoo/d4rl/config/halfcheetah_random_dt_config.py | from easydict import EasyDict
from copy import deepcopy
halfcheetah_dt_config = dict(
exp_name='halfcheetah_random_dt_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,... | PypiClean |
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/mmdetection/mmdet/models/dense_heads/ld_head.py | import torch
from mmcv.runner import force_fp32
from mmdet.core import bbox_overlaps, multi_apply, reduce_mean
from ..builder import HEADS, build_loss
from .gfl_head import GFLHead
@HEADS.register_module()
class LDHead(GFLHead):
"""Localization distillation Head. (Short description)
It utilizes the learned ... | PypiClean |
/AMPAL-1.4.0.tar.gz/AMPAL-1.4.0/src/ampal/base_ampal.py |
from collections import OrderedDict
import itertools
import numpy
from .data import ELEMENT_DATA, PDB_ATOM_COLUMNS
from .geometry import distance, Quaternion, centre_of_mass, rmsd
def cap(v, l):
"""Shortens string is above certain length."""
s = str(v)
return s if len(s) <= l else s[-l:]
def find_ato... | PypiClean |
/Mixpanel-Expert-0.1.2.tar.gz/Mixpanel-Expert-0.1.2/expert/tracker.py | import base64
import json
import time
import urllib
import urllib2
"""
The mixpanel package allows you to easily track events and
update people properties from your python application.
The Mixpanel class is the primary class for tracking events and
sending people analytics updates.
The Consumer and BufferedConsumer ... | PypiClean |
/Dts-OpenFisca-Core-34.8.0.tar.gz/Dts-OpenFisca-Core-34.8.0/openfisca_core/taxbenefitsystems.py |
import glob
from typing import Dict, Optional
from inspect import isclass
from os import path, linesep
from imp import find_module, load_module
import importlib
import logging
import inspect
import pkg_resources
import traceback
import copy
from openfisca_core.periods import Period, Instant, instant as make_instant
... | PypiClean |
/Decision-Tree-Generator-0.0.4.tar.gz/Decision-Tree-Generator-0.0.4/README.md | # Decision-Tree-Generator
Program for generating decision tree LaTeX code for array-based algorithms

## Overview
This project began with the idea of being able to generate a pruned, valid decision tree for any simple algorithm
that performs operations on a ... | PypiClean |
/MiWork-2021.2.20.20.8.11-py3-none-any.whl/miwork/__init__.py |
from __future__ import absolute_import, division, print_function, unicode_literals
from miwork.__version__ import __version__ # NOQA
from miwork.api import OpenLark
from miwork.api_app_link import APIAppLink
from miwork.api_approval import ApprovalUploadFileType
from miwork.api_calendar import CalendarRole
from miwo... | PypiClean |
/FFC-2017.1.0.tar.gz/FFC-2017.1.0/ffc/backends/ufc/__init__.py | __author__ = "Martin Sandve Alnæs, Anders Logg, Kent-Andre Mardal, Ola Skavhaug, and Hans Petter Langtangen"
__date__ = "2017-05-09"
__version__ = "2017.1.0"
__license__ = "This code is released into the public domain"
import os
from hashlib import sha1
from ffc.backends.ufc.function import *
from ffc.backends.ufc.fi... | PypiClean |
/FRETpredict-0.1.1.tar.gz/FRETpredict-0.1.1/README.md | FRETpredict
===========
Overview
--------
A package for FRET Efficiency prediction of protein structures and trajectories, based on the Rotamer Library Approach (RLA).
Installation
------------
To install FRETpredict, use the [PyPI package](https://pypi.org/project/FRETpredict):
```bash
pip install FRETpredict
`... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/summernote/lang/summernote-uk-UA.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 a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(self,(function(){return(e=jQuery).extend(e.summernote.lang,{"uk-UA":{font:{bold:"Напівжирний",ita... | PypiClean |
/HarmoniaCosmo-0.1.2-py3-none-any.whl/harmonia/algorithms/bases.py | import numpy as np
from mpmath import besseljzero
from scipy.special import sph_harm, spherical_jn
from harmonia.utils import binary_search
def spherical_harmonic(ell, m, theta, phi, conj=False):
r"""Evaluate the spherical harmonic function.
This returns :math:`Y_{\ell m}(\theta, \phi)` of degree :math:`\el... | PypiClean |
/Aries-storage-0.1.330.tar.gz/Aries-storage-0.1.330/Aries/storage/base.py | import os
import logging
from abc import ABC
from tempfile import NamedTemporaryFile
from urllib.parse import urlparse
from io import RawIOBase, UnsupportedOperation, SEEK_SET, DEFAULT_BUFFER_SIZE
logger = logging.getLogger(__name__)
class StorageObject:
"""Represents a storage object.
This is the base class ... | PypiClean |
/Github-url-converter-0.1.1.tar.gz/Github-url-converter-0.1.1/src/cli.py | import sys
import helpers
def main():
"""Main method for this module"""
if len(sys.argv) == 2:
if sys.argv[1].lower() in ("help", "h"):
printHelp()
sys.exit(0)
elif sys.argv[1] == "install":
helpers.install_git_alias()
sys.exit(0)
if len(sy... | PypiClean |
/BlueChips-1.0.4.tar.gz/BlueChips-1.0.4/bluechips/controllers/transfer.py | import logging
from datetime import date
from bluechips.lib.base import *
from pylons import request, app_globals as g
from pylons.decorators import validate
from pylons.decorators.secure import authenticate_form
from pylons.controllers.util import abort
from formencode import Schema, validators
from mailer import... | PypiClean |
/ASAPTools-0.6.2.tar.gz/ASAPTools-0.6.2/versioneer.py | from __future__ import print_function
try:
import configparser
except ImportError:
import ConfigParser as configparser
import errno
import json
import os
import re
import subprocess
import sys
class VersioneerConfig:
"""Container for Versioneer configuration parameters."""
def get_root():
"""Get the... | PypiClean |
/GDM-0.8.2.tar.gz/GDM-0.8.2/gdm/commands.py |
import os
import functools
import logging
from . import common
from .config import load
log = logging.getLogger(__name__)
def restore_cwd(func):
@functools.wraps(func)
def wrapped(*args, **kwargs):
cwd = os.getcwd()
result = func(*args, **kwargs)
os.chdir(cwd)
return result
... | PypiClean |
/CheckMates-0.2.0-py3-none-any.whl/checkmates/data_checks/checks/class_imbalance_data_check.py | import numpy as np
import pandas as pd
from checkmates.data_checks import (
DataCheck,
DataCheckError,
DataCheckMessageCode,
DataCheckWarning,
)
from checkmates.utils import infer_feature_types
class ClassImbalanceDataCheck(DataCheck):
"""Check if any of the target labels are imbalanced, or if th... | PypiClean |
/GrTiPy-0.1.0.tar.gz/GrTiPy-0.1.0/docs/Cosmological Models with No Big Bang.ipynb | # Cosmological Models with No Big Bang
```
from GrTiPy import *
init_printing()
d=4
t, psi, theta, phi= symbols('t psi theta phi ')
u=np.array([t, psi, theta, phi])
u[0]
u[1]
u[2]
u[3]
c = Function('c')(t)
a = Function('a')(t)
c
a
g00 = -c**2
g11 = a**2
g22 = a**2*sin(psi)**2
g33 = a**2*sin(psi)**2*sin... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/dizoo/atari/config/serial/spaceinvaders/spaceinvaders_rainbow_config.py | from copy import deepcopy
from easydict import EasyDict
spaceinvaders_rainbow_config = dict(
exp_name='spaceinvaders_rainbow_seed0',
env=dict(
collector_env_num=8,
evaluator_env_num=8,
n_evaluator_episode=8,
stop_value=10000000000,
env_id='SpaceInvadersNoFrameskip-v4',
... | PypiClean |
/Flask-Redisboard-0.2.0.tar.gz/Flask-Redisboard-0.2.0/flask_redisboard/static/dist/css/lib.js | !function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/standard/plugins/specialchar/dialogs/lang/nl.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang("specialchar","nl",{euro:"Euro-teken",lsquo:"Linker enkel aanhalingsteken",rsquo:"Rechter enkel aanhalingsteken",ldquo:"Linker du... | PypiClean |
/ApeMan-0.1.1.tar.gz/ApeMan-0.1.1/docs/import.rst | -------------------------
Python's Import Mechanism
-------------------------
This section reviews how imports are effected within Python.
It exists as a compliment to Python's ``imp``/``importlib`` documentation, which I found to be rather terse and a little confusing.
Granted at the time (Circa. 2016) it contained ... | PypiClean |
/Chips-0.1.2.tar.gz/Chips-0.1.2/chips/VHDL_plugin/binary.py | """VHDL generation of binary operators"""
import divider
import modulo
__author__ = "Jon Dawson"
__copyright__ = "Copyright 2010, Jonathan P Dawson"
__license__ = "MIT"
__version__ = "0.1.2"
__maintainer__ = "Jon Dawson"
__email__ = "chips@jondawson.org.uk"
__status__ = "Prototype"
def write(stream):
identifier... | PypiClean |
/Homevee_Dev-0.0.0.0-py3-none-any.whl/Homevee/Utils/NotificationManager.py | import json
import socket
import ssl
import traceback
# https://github.com/olucurious/PyFCM
from Homevee.Helper import Logger
from Homevee.Utils.Database import Database
from .Constants import END_OF_MESSAGE
class NotificationManager():
def __init__(self):
return
def send_notification(self, registra... | PypiClean |
/DSRE-0.2.tar.gz/DSRE-0.2/HATT/run.py | import argparse
import json
import os
import time
import torch
from hatt.encoder.bert_encoder import BERTEncoder
from hatt.framework.bag_re import BagRE
from hatt.selector.bag_attention import BagAttention
# Pass arguments
parser = argparse.ArgumentParser(
description='Improving Distantly-Supervised Relation Ext... | PypiClean |
/Finance-Ultron-1.0.8.1.tar.gz/Finance-Ultron-1.0.8.1/ultron/factor/empyrical/stats.py | import math
import pandas as pd
import numpy as np
from math import pow
from scipy import stats, optimize
from six import iteritems
from sys import float_info
from .utils import nanmean, nanstd, nanmin
from .periods import ANNUALIZATION_FACTORS, APPROX_BDAYS_PER_YEAR
from .periods import DAILY, WEEKLY, MONTHLY, QUARTE... | PypiClean |
/FAdo3-1.0.tar.gz/FAdo3-1.0/FAdo/rndfa.py | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
from builtins import next
from builtins import *
from past.utils import old_div
from builtins impor... | PypiClean |
/IdracRedfishSupport-0.0.8.tar.gz/IdracRedfishSupport-0.0.8/DeviceFirmwareSimpleUpdateREDFISH.py |
import argparse
import getpass
import json
import logging
import os
import platform
import re
import requests
import subprocess
import sys
import time
import warnings
from datetime import datetime
from pprint import pprint
warnings.filterwarnings("ignore")
parser=argparse.ArgumentParser(description="Python script ... | PypiClean |
/AICloudSDK-1.0.7.tar.gz/AICloudSDK-1.0.7/aicloud/rest.py |
import requests
from aicloud.cloudexception import CommonError
class Object(dict):
def __init__(self, init_dict=None, deep=False):
super(Object, self).__init__()
if isinstance(init_dict, dict):
for k, v in init_dict.items():
if deep:
if isinstance... | PypiClean |
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/person/nl_BE/__init__.py | from collections import Counter, OrderedDict
from .. import Provider as PersonProvider
class Provider(PersonProvider):
"""Provider of `Person` data (male and female first and last names) for locale 'nl_BE' (Belgium Dutch, Flemish)."""
# As per https://nl.wikipedia.org/wiki/Familienaam#Belgi%C3%AB, from 1 Ju... | PypiClean |
/Blackboard_LMS_CLI-1.0.9-py3-none-any.whl/bbcli/commands/assignments.py | import json
import click
from markdown import markdown
from bbcli.commands.contents import grading_options, set_dates, standard_options
from bbcli.entities.content_builder_entitites import GradingOptions, StandardOptions
from bbcli.services import assignments_services, contents_services
from bbcli.utils.error_handler i... | PypiClean |
/CLAM-3.2.6.tar.gz/CLAM-3.2.6/clam/clamclient.py |
###############################################################
# CLAM: Computational Linguistics Application Mediator
# -- Generic CLAM Client --
# by Maarten van Gompel (proycon)
#
# Centre for Language and Speech Technology, Radboud University Nijmegen
# & KNAW Humanities Cluster
#
# License... | PypiClean |
/MR-OCTOPUS-0.2.7.tar.gz/MR-OCTOPUS-0.2.7/OCTOPUS/prog.py | import argparse
import sys
import os
import numpy as np
from tqdm import tqdm
from pathlib import Path
import math
path_search = str(Path(__file__).parent.parent)
sys.path.insert(0, path_search)
from OCTOPUS.utils.dataio import get_data_from_file
import OCTOPUS.ORC as ORC
def main():
parser = argparse.Argument... | PypiClean |
/CatLearn-0.6.2.tar.gz/CatLearn-0.6.2/catlearn/fingerprint/voro.py | from __future__ import absolute_import
from __future__ import division
import pandas as pd
import os
class VoronoiFingerprintGenerator(object):
"""Function to build voronoi fingerprint in pandas.DataFrame.
Based on a list of ase.atoms object.
"""
def __init__(self, atoms, delete_temp=True):
... | PypiClean |
/MetaChecka2000-0.1.3.tar.gz/MetaChecka2000-0.1.3/metachecka2000/dataConstructor.py |
__author__ = "Michael Imelfort"
__copyright__ = "Copyright 2012"
__credits__ = ["Michael Imelfort", "Connor Skennerton"]
__license__ = "GPL3"
__version__ = "0.2.1"
__maintainer__ = "Michael Imelfort"
__email__ = "mike@mikeimelfort.com"
__status__ = "Development"
#######################################################... | PypiClean |
/Dyko-0.2.tar.gz/Dyko-0.2/kalamar/access_point/filesystem.py | import os
import re
import io
from . import AccessPoint
from ..item import Item
from ..value import to_unicode
from ..property import Property
try:
from StringIO import StringIO
except ImportError:
from io import BytesIO as StringIO
# Redifining Python 3.x renamed functions
# pylint: disable=C0103
# pylint: ... | PypiClean |
/COVID19Py-0.3.0.tar.gz/COVID19Py-0.3.0/README.md | # COVID19Py
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[](https://pepy.tech/project/covid19py)
[](https://pepy.tech/project/covid19py/month)
[:
"""
Reads file from disk and returns the first 8192 bytes
of data representing the magic number header signature.
Args:
path: path string to file.
Re... | PypiClean |
/Chips-python-2.2.3.tar.gz/Chips-python-2.2.3/chips/utils/debugger.py |
import os
import wx
import wx.aui
import wx.py.editwindow
from chips.utils.gui_instance import GuiInstance
from chips.utils.gui_report import GuiReport
image_dir = os.path.join(os.path.dirname(__file__), "icons")
class Debugger(wx.Frame):
def __init__(self, chip):
app = wx.App()
wx.Frame.__ini... | PypiClean |
/CAMSA-1.3.tar.gz/CAMSA-1.3/camsa/core/comparative_analysis.py | import enum
import itertools
import networkx
from camsa.core.data_structures import ScaffoldAssemblyGraph
class Conflicts(enum.Enum):
non_conflicted = 0
semi_conflicted = 1
conflicted = 2
def edges_conflict(edge1, edge2):
u1, v1 = edge1
u2, v2 = edge2
return (u1 in [u2, v2] and v1 not in [... | PypiClean |
/AADeepLearning-1.0.8.tar.gz/AAdeepLearning-1.0.8/develop/aa_dnn_mnist_drop_out.py | from aa_deep_learning.AADeepLearning import AADeepLearning
from aa_deep_learning.AADeepLearning.datasets import mnist
from aa_deep_learning.AADeepLearning.datasets import np_utils
# mnist数据集已经被划分成了60,000个训练集,10,000个测试集的形式,如果数据不存在则自动下载
(x_train, y_train), (x_test, y_test) = mnist.load_data()
# 第一个维度是样本数目,第二维度是通道数表示颜色通... | PypiClean |
/Flask-Navigate-0.2.2.tar.gz/Flask-Navigate-0.2.2/flask_navigate/__init__.py | from flask import current_app, Blueprint, render_template, request, url_for
from flask_bs import Bootstrap
from flask_security import current_user
from flask_sqlalchemy import SQLAlchemy
from jinja2 import Template
from sqlalchemy import create_engine
from sqlalchemy.engine.reflection import Inspector
from sqlalchemy.o... | PypiClean |
/FoilMesh-0.0.8.tar.gz/FoilMesh-0.0.8/foilmesh/meshio/vtk/_vtk_42.py | from functools import reduce
import numpy as np
from ..__about__ import __version__
from .._common import warn
from .._exceptions import ReadError, WriteError
from .._files import open_file
from .._mesh import Mesh
from .._vtk_common import (
Info,
meshio_to_vtk_order,
meshio_to_vtk_type,
vtk_to_meshi... | PypiClean |
/GraphLab_Create-2.1-cp27-none-macosx_10_5_x86_64.macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.macosx_10_11_intel.macosx_10_11_x86_64.whl/graphlab/toolkits/recommender/item_content_recommender.py | import graphlab.connect as _mt
import graphlab as _graphlab
from graphlab import SFrame as _SFrame
from graphlab import SArray as _SArray
from graphlab.toolkits.recommender.util import _Recommender
from graphlab.toolkits._model import _get_default_options_wrapper
from array import array as _array
def create(item_data... | PypiClean |
/Buro-0.1.27.tar.gz/Buro-0.1.27/buro/core.py | from os import path
import sys
from werkzeug import Request, ClosingIterator, run_simple, SharedDataMiddleware
from werkzeug.routing import Rule
from werkzeug.exceptions import HTTPException, NotFound
from jinja2 import Environment, FileSystemLoader
from buro.shared import local, local_manager
from buro.urls import url... | PypiClean |
/KeynoteC-0.2.2.tar.gz/KeynoteC-0.2.2/README.md | # KeynoteC
A simple DSL to create keynote presentations using LaTeX and Beamer.
## Usage
At this state, **KeynoteC** is usable as a Python executable module, or as
an application. Install it with `python setup.py install` (you might need
superuser priviledges to install in system wide), and execute the module as
`py... | PypiClean |
/KratosDamApplication-9.2.0-cp36-cp36m-win_amd64.whl/KratosMultiphysics/DamApplication/dam_MPI_mechanical_solver.py | from __future__ import print_function, absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7
#import kratos core and applications
import KratosMultiphysics
import KratosMultiphysics.mpi as mpi
import KratosMultiphysics.TrilinosApplication as TrilinosApplication
import KratosMu... | PypiClean |
/Electrum-Zcash-Random-Fork-3.1.3b5.tar.gz/Electrum-Zcash-Random-Fork-3.1.3b5/gui/kivy/uix/dialogs/fee_dialog.py | from kivy.app import App
from kivy.factory import Factory
from kivy.properties import ObjectProperty
from kivy.lang import Builder
from electrum_zcash_gui.kivy.i18n import _
Builder.load_string('''
<FeeDialog@Popup>
id: popup
title: _('Transaction Fees')
size_hint: 0.8, 0.8
pos_hint: {'top':0.9}
m... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.