id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/HolmesIV-2021.9.8a1.tar.gz/HolmesIV-2021.9.8a1/mycroft/tts/cache_handler.py | # TODO: remove in 21.08
import base64
import glob
import os
import re
import shutil
import hashlib
import json
import mycroft.util as util
from urllib import parse
from requests_futures.sessions import FuturesSession
from mycroft.util.log import LOG
REGEX_SPL_CHARS = re.compile(r'[@#$%^*()<>/\|}{~:]')
MIMIC2_URL = '... | PypiClean |
/AnyBlok-2.1.0.tar.gz/AnyBlok-2.1.0/anyblok/column.py | import decimal
import time
import warnings
from base64 import b64decode, b64encode
from datetime import date, datetime, timedelta
from hashlib import md5
from inspect import ismethod
from json import dumps, loads
from logging import getLogger
import pytz
from dateutil.parser import parse
from sqlalchemy import CheckCo... | PypiClean |
/LeagueOfEvents-1.0.7.tar.gz/LeagueOfEvents-1.0.7/README.md | League Of Events
================
Create custom callbacks to various in game events made possible with the League Client API
## Installing
Install the [PyPI Package](https://pypi.org/project/LeagueOfEvents/):
pip install LeagueOfEvents
## Examples
Basic example:
```py
import leagueofevents
def my_death_functi... | PypiClean |
/GxSphinx-1.0.0.tar.gz/GxSphinx-1.0.0/doc/man/sphinx-build.rst | sphinx-build
============
Synopsis
--------
**sphinx-build** [*options*] <*sourcedir*> <*outputdir*> [*filenames* ...]
Description
-----------
:program:`sphinx-build` generates documentation from the files in
``<sourcedir>`` and places it in the ``<outputdir>``.
:program:`sphinx-build` looks for ``<sourcedir>/conf... | PypiClean |
/node_managment_application-0.0.1.tar.gz/node_managment_application-0.0.1/nms_app/static/drf-yasg/swagger-ui-init.js |
"use strict";
var currentPath = window.location.protocol + "//" + window.location.host + window.location.pathname;
var defaultSpecUrl = currentPath + '?format=openapi';
function slugify(text) {
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/... | PypiClean |
/Lightflow-1.11.1.tar.gz/Lightflow-1.11.1/examples/multi_data.py | from lightflow.models import Dag
from lightflow.tasks import PythonTask
# store the value 5 under the key 'value'
def put_data(data, store, signal, context):
data['value'] = 5
# print the name of the task and the current value
def print_data(data, store, signal, context):
print(context.task_name, 'The value... | PypiClean |
/django-chuck-0.2.3.tar.gz/django-chuck/modules/feincms/project/static/scripts/libs/tiny_mce/utils/mctabs.js | function MCTabs() {
this.settings = [];
this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');
};
MCTabs.prototype.init = function(settings) {
this.settings = settings;
};
MCTabs.prototype.getParam = function(name, default_value) {
var value = null;
value = (typeof(this.set... | PypiClean |
/CBintentBox-0.3.0a3-py3-none-any.whl/intentBox/parsers/adapt_extract.py | from intentBox.parsers.template import IntentExtractor
from intentBox.utils import LOG, normalize, get_utterance_remainder
from adapt.intent import IntentBuilder
from adapt.engine import IntentDeterminationEngine
class AdaptExtractor(IntentExtractor):
keyword_based = True
regex_entity_support = True
def ... | PypiClean |
/Gpxity-1.7.2-py3-none-any.whl/gpxity/backends/gpsies.py |
# Copyright (c) 2019 Wolfgang Rohdewald <wolfgang@rohdewald.de>
# See LICENSE for details.
"""
This implements :class:`gpxity.gpsies.GPSIES` for https://www.gpsies.com.
so ginge das mit dem API-Key: https://github.com/telemaxx/gpsiesreader/blob/master/gpsies3.py
"""
# pylint: disable=protected-access
from html.pa... | PypiClean |
/GaiaXPy-2.1.0.tar.gz/GaiaXPy-2.1.0/gaiaxpy/output/sampled_spectra_data.py | import warnings
from os.path import join
from pathlib import Path
import numpy as np
import pandas as pd
from astropy.io import fits
from astropy.io.votable.tree import Field, Param, Resource, Table, VOTableFile
from astropy.units import UnitsWarning
from fastavro import parse_schema, writer
from fastavro.validation i... | PypiClean |
/HuMobi-0.1.12-py3-none-any.whl/humobi/preprocessing/spatial_aggregation.py | import numpy as np
from shapely.geometry import Point
from humobi.misc.utils import resolution_to_points, moving_average, to_labels
from tqdm import tqdm
import pandas as pd
import geopandas as gpd
import concurrent.futures as cf
from itertools import repeat
from humobi.structures.trajectory import TrajectoriesFrame
... | PypiClean |
/FetchCord-2.7.7.tar.gz/FetchCord-2.7.7/fetch_cord/debugger.py |
from typing import List
from .computer.Computer import Computer
from .computer.cpu.Cpu_interface import Cpu_interface
def run_debug(computer: Computer):
print("----out.py----\n")
print("----DE/WM----")
if not computer.neofetchwin:
print("deid: %s" % computer.deid)
print("wmid: %s" % comp... | PypiClean |
/FORD-6.2.5-py3-none-any.whl/ford/sourceform.py |
from collections import defaultdict
from dataclasses import dataclass
import sys
import re
import os.path
import copy
import textwrap
from typing import List, Tuple, Optional, Union, Sequence, Dict
from itertools import chain
# Python 2 or 3:
if sys.version_info[0] > 2:
from urllib.parse import quote
else:
fr... | PypiClean |
/MTGProxyPrinter-0.25.0.tar.gz/MTGProxyPrinter-0.25.0/mtg_proxy_printer/logger.py |
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# bu... | PypiClean |
/Config-editor-0.9.2.tar.gz/Config-editor-0.9.2/README.rst | Config editor
=============
.. image:: https://img.shields.io/pypi/v/Config-editor.svg
:target: https://pypi.python.org/pypi/Config-editor
.. image:: https://img.shields.io/pypi/pyversions/Config-editor.svg
:target: https://pypi.python.org/pypi/Config-editor
.. image:: https://img.shields.io/pypi/status/Config... | PypiClean |
/Flask-AppBuilder-jwi078-2.1.13.tar.gz/Flask-AppBuilder-jwi078-2.1.13/flask_appbuilder/models/sqla/filters.py | import datetime
import logging
from dateutil import parser
from flask_babel import lazy_gettext
from ..filters import BaseFilter, BaseFilterConverter, FilterRelation
log = logging.getLogger(__name__)
__all__ = [
"SQLAFilterConverter",
"FilterEqual",
"FilterNotStartsWith",
"FilterStartsWith",
"F... | PypiClean |
/Dpowers-0.1.5rc1.tar.gz/Dpowers-0.1.5rc1/docs/preperation.rst | Installation and Dependencies
*****************************
Install from PyPI::
$ pip install -U Dpowers
(This will automatically install the package 'Dhelpers' as a
necessary dependency. All of Dhelpers' functions and classes can be used
independently for your own projects, i.e. without the Dpowers package
inst... | PypiClean |
/EOxServer-1.2.12-py3-none-any.whl/eoxserver/services/ows/wcs/basehandlers.py | from django.db.models import Q
from eoxserver.resources.coverages import models
from eoxserver.services.result import to_http_response
from eoxserver.services.ows.wcs.parameters import WCSCapabilitiesRenderParams
from eoxserver.services.exceptions import (
NoSuchCoverageException, OperationNotSupportedException
)
... | PypiClean |
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/bower_components/bootstrap-table/src/locale/bootstrap-table-hr-HR.js | /**
* Bootstrap Table Croatian translation
* Author: Petra Štrbenac (petra.strbenac@gmail.com)
* Author: Petra Štrbenac (petra.strbenac@gmail.com)
*/
$.fn.bootstrapTable.locales['hr-HR'] = $.fn.bootstrapTable.locales['hr'] = {
formatCopyRows () {
return 'Copy Rows'
},
formatPrint () {
return 'Print'... | PypiClean |
/OASYS1-ESRF-Extensions-0.0.69.tar.gz/OASYS1-ESRF-Extensions-0.0.69/orangecontrib/esrf/oasys/widgets/extension/ow_surface_file_merger.py | import numpy
from PyQt5.QtCore import QRect
from PyQt5.QtWidgets import QApplication, QMessageBox
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets.widget import OWWidget
from oasys.widgets import gui as oasysgui
from oasys.util.oasys_objects import OasysPreProcessorData, Oasy... | PypiClean |
/Dabo-0.9.16.tar.gz/Dabo-0.9.16/dabo/ui/uitk/dPemMixin.py | """ dPemMixin.py: Provide common PEM functionality """
import sys, types
import dabo
from dabo.dLocalize import _
import dabo.ui.dPemMixinBase
import dabo.dEvents as dEvents
from dabo.lib.utils import ustr
class dPemMixin(dabo.ui.dPemMixinBase.dPemMixinBase):
""" Provide Property/Event/Method interfaces for dForms ... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/views/csrf.py | from django.conf import settings
from django.http import HttpResponseForbidden
from django.template import Context, Engine, TemplateDoesNotExist, loader
from django.utils.translation import gettext as _
from django.utils.version import get_docs_version
# We include the template inline since we need to be able to relia... | PypiClean |
/BamTyper-0.2.6.tar.gz/BamTyper-0.2.6/README.md |
888888b. 88888888888
888 "88b 888
888 .88P 888
... | PypiClean |
/DLRN-0.26.1.tar.gz/DLRN-0.26.1/scripts/build_srpm.sh |
set -o pipefail
# FIXME(hguemar): we need to document all parameters passed to this script
shift # First parameter is TARGET, not needed here
source $(dirname $0)/common-functions
exec &> >(tee "${OUTPUT_DIRECTORY}/rpmbuild.log") 2>&1
set -x
for FILE in {test-,}requirements.txt
do
if [ -f ${FILE} ]
then
... | PypiClean |
/NLP_LIB_cpu-0.0.12.tar.gz/NLP_LIB_cpu-0.0.12/NLP_LIB/transforms/fullword_random_mask_wrapper.py | import numpy as np
import random
from NLP_LIB.nlp_core.data_transform_wrapper import DataTransformWrapper
class FullWordRandomMaskWrapper(DataTransformWrapper):
# When initialize DataTransformWrapper, we pass configuration and dataset object to constructor
def __init__(self, config, dataset):
super(FullWord... | PypiClean |
/Marl-Factory-Grid-0.1.2.tar.gz/Marl-Factory-Grid-0.1.2/marl_factory_grid/modules/items/rules.py | from typing import List
from marl_factory_grid.environment.rules import Rule
from marl_factory_grid.environment import constants as c
from marl_factory_grid.utils.results import TickResult
from marl_factory_grid.modules.items import constants as i
from marl_factory_grid.modules.items.entitites import DropOffLocation
... | PypiClean |
/LazyHDF5-0.3.0.tar.gz/LazyHDF5-0.3.0/lazy5/nonh5utils.py | import copy as _copy
from collections import OrderedDict as _OrderedDict
import numpy as _np
__all__ = ['filterlist', 'check_type_compat', 'return_family_type']
def filterlist(in_list, filters, keep_filtered_items=True, exclusive=True):
"""
Parameters
----------
in_list : list
List of strings... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_en-gu.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 |
/NetbeansConverter-1.0.tar.gz/NetbeansConverter-1.0/netbeansconvert.py | import xml.etree.cElementTree as ET
import xml
from os import walk
import os
import shutil
def get_files(directory):
"""
Walks the directory and takes the souce and header file paths to be returned.
:param directory: The directory to search
:return: A tuple of (sources, headers) where sources and heade... | PypiClean |
/Hunabku_urlshortener-0.0.3.tar.gz/Hunabku_urlshortener-0.0.3/README.md | <center><img src="https://raw.githubusercontent.com/colav/colav.github.io/master/img/Logo.png"/></center>
# HunabKu urlshortener plugin
Hunabku urlshortener allows to change long urls by urls of decent size.
Endpoints to create short urls and to redirect are documented in apidocs,
when you start the server you will ... | PypiClean |
/OSMAlchemy-0.1.5.tar.gz/OSMAlchemy-0.1.5/osmalchemy/model.py | import datetime
from sqlalchemy import (Column, ForeignKey, Integer, BigInteger, Numeric, String, Unicode,
DateTime, Boolean, UniqueConstraint)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.ext.orderinglist i... | PypiClean |
/Gbtestapi0.3-0.1a10-py3-none-any.whl/gailbot/services/converter/converter.py | from typing import Dict, List, Union, Tuple
from .payload import (
load_transcribed_dir_payload,
load_audio_payload,
load_conversation_dir_payload,
PayLoadObject,
)
from gailbot.core.utils.logger import makelogger
from ..organizer.source import SourceObject
from gailbot.workspace.manager import Workspa... | PypiClean |
/ImoT_tools-1.2.0.tar.gz/ImoT_tools-1.2.0/doc/api/imot_tools.util.argcheck.rst | imot\_tools.util.argcheck
=========================
.. automodule:: imot_tools.util.argcheck
.. rubric:: Functions
.. autosummary::
accept_any
allow_None
check
has_booleans
has_complex
has_evens
has_integers
has_ndim
has_odds
has_pow2s
has_re... | PypiClean |
/DESPOTIC-2.1.tar.gz/DESPOTIC-2.1/despotic/fetchLamda.py |
import os
try:
# Python 2
from urllib2 import urlopen, HTTPError
from urlparse import urljoin
except:
# Python 3
from urllib.request import urlopen
from urllib.parse import urljoin
from urllib.error import HTTPError
from .despoticError import despoticError
# Default location of LAMDA datab... | PypiClean |
/MTGProxyPrinter-0.25.0.tar.gz/MTGProxyPrinter-0.25.0/mtg_proxy_printer/decklist_parser/csv_parsers.py |
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# bu... | PypiClean |
/AHRS-0.3.1-py3-none-any.whl/ahrs/filters/ekf.py | import numpy as np
from ..common.orientation import q2R, ecompass, acc2q
from ..common.mathfuncs import cosd, sind, skew
class EKF:
"""
Extended Kalman Filter to estimate orientation as Quaternion.
Examples
--------
>>> import numpy as np
>>> from ahrs.filters import EKF
>>> from ahrs.comm... | PypiClean |
/MAGINE-0.1.5.tar.gz/MAGINE-0.1.5/magine/networks/visualization/cytoscape.py | import os
import time
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import pandas as pd
import requests
from py2cytoscape.cyrest.layout import layout as cy_layout
from py2cytoscape.data.cyrest_client import CyRestClient
IP = 'localhost'
PORT = 1234
VERSION ... | PypiClean |
/MyoSuite-2.0.1-py3-none-any.whl/myosuite/envs/myo/myochallenge/baoding_v1.py | import collections
import enum
import gym
import numpy as np
from myosuite.envs.myo.base_v0 import BaseV0
# Define the task enum
class Task(enum.Enum):
HOLD = 0
BAODING_CW = 1
BAODING_CCW = 2
# Choose task
WHICH_TASK = Task.BAODING_CCW
class BaodingEnvV1(BaseV0):
DEFAULT_OBS_KEYS = [
'hand_... | PypiClean |
/AssetBundleFramework-0.3.0.tar.gz/AssetBundleFramework-0.3.0/README.md | # ABF - The Asset Bundle Factory
## Setup
### Locally
When running locally, such as for testing, run-
```bash
make clone
```
If you want to pull in the latest versions of the AssetBundler repositories-
```bash
make reclone
```
### Downstream
If you are not running in this repository directly there's a few steps... | PypiClean |
/GammaLab-0.6.3.tar.gz/GammaLab-0.6.3/src/gammalab/analysis/pulse_detection.py | from ..service import ReceivingService, SourceService, ThreadService
from ..wire import FloatWire, PulseWire
from functools import partial
import numpy
import pickle
class PulseDetection(ThreadService, SourceService, ReceivingService):
input_wire_class=FloatWire
output_wire_class=PulseWire
def __init_... | PypiClean |
/Dabo-0.9.16.tar.gz/Dabo-0.9.16/dabo/dObject.py | import string
import types
import new
import dabo
from dabo.lib.propertyHelperMixin import PropertyHelperMixin
from dabo.lib.eventMixin import EventMixin
from dabo.dLocalize import _
NONE_TYPE = type(None)
class dObject(PropertyHelperMixin, EventMixin):
"""The basic ancestor of all Dabo objects."""
# Subclasses ca... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_hu-hu.js | 'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"de.",
"du."
],
"DAY": [
"vas\u00e1rnap",
... | PypiClean |
/Flask_Firehose-0.2.3-py3-none-any.whl/flask_firehose.py | from flask import g, session
class Connector(object):
@staticmethod
def get_pushed():
"""Returns a set of items that have been already pushed to client.
Returns
-------
set
Set of items that are pushed.
"""
pushed_items = session.get("h2-pushed", ... | PypiClean |
/Didacto-0.1.10-py3-none-any.whl/didacto/model.py |
# Didacto, un logiciel d'aide à l'organisation d'un corpus didactique
# Copyright (C) 2020 Marco de Freitas
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the ... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/editor/plugins/_SmileyPalette.js | if(!dojo._hasResource["dojox.editor.plugins._SmileyPalette"]){
dojo._hasResource["dojox.editor.plugins._SmileyPalette"]=true;
dojo.provide("dojox.editor.plugins._SmileyPalette");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dojo.i18n");
dojo.requireLocalization("dojox.editor.plugins","... | PypiClean |
/MuPhyN-0.1.1.post4-py3-none-any.whl/muphyn/packages/core/application/box_library/importers/box_library_importer_1_1_0.py | import importlib
import numpy as np
import os
import sys
import yaml
from typing import Dict
from muphyn.packages.core.base import LogManager, loadCode
from muphyn.packages.core.application.plci_core_data_type import DataType, get_data_type
from muphyn.packages.core.application.box_library.box_library_data import Abst... | PypiClean |
/ChatRoom_jianjun-3.1.0-cp310-cp310-win_amd64.whl/ChatRoom/data/Package/DemoUser/demo/server.py | import os
from ChatRoom.package import BaseServer
import DemoUser.demo as SelfPackage
# 本包服务端用户名称为 DemoUser
try:
# 从本包路径中导入自定义动态链接库
from DemoUser.demo.Lib.ext_lib import plus
except (ImportError, ModuleNotFoundError):
# 我的动态链接库为 ext_lib.cp310-win_amd64.pyd, 只支持 cpython 3.10
# 这里只是例子, 如果你在其他环境中使用自己的动态... | PypiClean |
/GISAXS_XPCS-0.2.5.tar.gz/GISAXS_XPCS-0.2.5/gisaxs_xpcs/common_functions.py |
import matplotlib as mpl
from matplotlib import cm
from matplotlib.colors import LogNorm
import h5py
from tqdm import tqdm
from .extract_data import *
from .common_tools import *
from .plot_report import *
logging.basicConfig(level=logging.ERROR,
format='%(asctime)s %(levelname)s:%(message)s',... | PypiClean |
/GxSphinx-1.0.0.tar.gz/GxSphinx-1.0.0/doc/usage/extensions/linkcode.rst | :mod:`sphinx.ext.linkcode` -- Add external links to source code
===============================================================
.. module:: sphinx.ext.linkcode
:synopsis: Add external links to source code.
.. moduleauthor:: Pauli Virtanen
.. versionadded:: 1.2
This extension looks at your object descriptions (``.... | PypiClean |
/FORD-6.2.5-py3-none-any.whl/ford/output.py |
import sys
import os
import shutil
import traceback
from itertools import chain
import pathlib
import jinja2
from tqdm import tqdm
import ford.sourceform
import ford.tipue_search
import ford.utils
from ford.graphs import graphviz_installed, GraphManager
loc = pathlib.Path(__file__).parent
env = jinja2.Environment(... | PypiClean |
/CoVeriTeam-1.0-py3-none-any.whl/coveriteam/language/parallel_portfolio.py |
import multiprocessing as mp
import signal
import subprocess as sp
import sys
import traceback
from queue import Queue
from textwrap import indent
from typing import Tuple
import pkg_resources
from benchexec.result import RESULT_CLASS_FALSE # noqa: F401,F403,E261
from benchexec.result import RESULT_CLASS_OTHER # no... | PypiClean |
/Flask-AppBuilder-redirect-2.1.13.tar.gz/Flask-AppBuilder-redirect-2.1.13/flask_appbuilder/fieldwidgets.py | from flask_babel import lazy_gettext as _
from wtforms import widgets
from wtforms.widgets import html_params, HTMLString
class DatePickerWidget(object):
"""
Date Time picker from Eonasdan GitHub
"""
data_template = (
'<div class="input-group date appbuilder_date" id="datepicker">'
'... | PypiClean |
/ARGs_OAP-2.3.2.tar.gz/ARGs_OAP-2.3.2/ARGs_OAP/bin/bbmap/sketch.sh |
usage(){
echo "
Written by Brian Bushnell
Last modified January 28, 2020
Description: Creates one or more sketches from a fasta file,
optionally annotated with taxonomic information.
Please read bbmap/docs/guides/BBSketchGuide.txt for more information.
Usage: sketch.sh in=<fasta file> out=<sketch file>
Standard ... | PypiClean |
/NASGrpcFileSystem2-1.3.8.tar.gz/NASGrpcFileSystem2-1.3.8/NASGrpcFileSystem/grpc_create_file.py |
import base64
import json
import logging
import os
import sys
import traceback
from NASGrpcFileSystem.grpc_options import OPTIONS
try:
from urllib.parse import urlparse
except:
from urlparse import urlparse
import grpc
from typing import Iterable
from future.utils import raise_
from werkzeug.wrappers import ... | PypiClean |
/Django_patch-2.2.19-py3-none-any.whl/django/contrib/gis/sitemaps/views.py | from django.apps import apps
from django.contrib.gis.db.models.fields import GeometryField
from django.contrib.gis.db.models.functions import AsKML, Transform
from django.contrib.gis.shortcuts import render_to_kml, render_to_kmz
from django.core.exceptions import FieldDoesNotExist
from django.db import DEFAULT_DB_ALIAS... | PypiClean |
/DeepSpectrum-0.6.9-py3-none-any.whl/deepspectrum/tools/label_parser.py | import csv
import decimal
from os.path import splitext, normpath
class LabelParser():
def __init__(self,
filepath,
delimiter=',',
timecontinuous=False,
remove_extension=False):
self._timecontinuous = timecontinuous
self._filepath ... | PypiClean |
/CodeShow-0.2.2.tar.gz/CodeShow-0.2.2/README.md | # CodeShow
CodeShow turns a directory of code into a static website suitable for use in presentations. It uses [pygments](http://pygments.org) for syntax highlighting. In directories that include a `readme.md` or `readme.txt`, the readme contents will be displayed under the directory listing.
Passing `--site44` gener... | PypiClean |
/K_AIKO-0.5.2-py3-none-any.whl/kaiko/tui/sheditors.py | from enum import Enum
import re
from typing import Optional, List
import dataclasses
from ..utils import commands as cmd
class SHLEXER_STATE(Enum):
SPACED = " "
PLAIN = "*"
BACKSLASHED = "\\"
QUOTED = "'"
@dataclasses.dataclass(frozen=True)
class ShToken:
r"""The token of shell-like grammar.
... | PypiClean |
/Flask-Philo-SQLAlchemy-0.5.3.tar.gz/Flask-Philo-SQLAlchemy-0.5.3/README.md | # Flask-Philo-SQLAlchemy

SQLAlchemy suport for Flask-Philo-Core.
## Motivation
[Flask-Philo-Core](http://flask-philo-core.readthedocs.io/en/latest/) implements
simple funcionality fo... | PypiClean |
/ImgDatasetBuilder-1.0.2.tar.gz/ImgDatasetBuilder-1.0.2/src/DatasetBuilder.py | import cv2
import time
import copy
import os
import uuid
class DatasetBuilder:
def __init__(self, classes, out_dir):
"""
:param classes: classes of the dataset that we'll create
:param out_dir: directory where we'll store the freshly created datased
"""
self.classes = class... | PypiClean |
/OASYS1-ESRF-Extensions-0.0.69.tar.gz/OASYS1-ESRF-Extensions-0.0.69/orangecontrib/esrf/wofry/widgets/extension/ow_real_lens_2d.py | from orangewidget.settings import Setting
from orangewidget import gui
from oasys.widgets import gui as oasysgui
from oasys.widgets import congruence
from oasys.util.oasys_util import write_surface_file
from orangecontrib.esrf.syned.util.lens import Lens # TODO: from syned.beamline.optical_elements....
from orangeco... | PypiClean |
/Flask-Avatars-0.2.2.tar.gz/Flask-Avatars-0.2.2/flask_avatars/static/jcrop/js/jquery.Jcrop.min.js | (function(a){a.Jcrop=function(b,c){function i(a){return Math.round(a)+"px"}function j(a){return d.baseClass+"-"+a}function k(){return a.fx.step.hasOwnProperty("backgroundColor")}function l(b){var c=a(b).offset();return[c.left,c.top]}function m(a){return[a.pageX-e[0],a.pageY-e[1]]}function n(b){typeof b!="object"&&(b={}... | PypiClean |
/Flask-AutoCRUD-2.2.1.tar.gz/Flask-AutoCRUD-2.2.1/flask_autocrud/scripts/run.py | import os
import sys
import click
import yaml
from flask import Flask
from flask_errors_handler import ErrorHandler
from flask_logify import FlaskLogging
from flask_response_builder import ResponseBuilder
from flask_sqlalchemy import SQLAlchemy
from yaml.error import YAMLError
from flask_autocrud import AutoCrud
from... | PypiClean |
/DataSae-0.1.37.tar.gz/DataSae-0.1.37/datasae/quality/comformity.py | from difflib import SequenceMatcher
import pandas as pd
import simplejson as json
from claming import Matching
from nltk.tokenize import RegexpTokenizer
from Sastrawi.Stemmer.StemmerFactory import StemmerFactory
class Comformity:
"""
class comformity
"""
def __init__(
self,
d... | PypiClean |
/ContactMechanics-1.1.1.tar.gz/ContactMechanics-1.1.1/examples/easy_hardwall_simulation.ipynb | # Do contact calculations as easily as on contact.engineering in your jupyter notebook
For more details on the simulations and more detailed use of the ContactMechanics Library, see notebooks
- [Hardwall_Simulation.ipynb](Hardwall_Simulation.ipynb)
- [plastic_simulation_cone.ipynb](plastic_simulation_cone.ipynb)
- [co... | PypiClean |
/GraphSTAM-0.1.5-py3-none-any.whl/graphstam/graphstam_bkp.py |
import json
import pandas as pd
import numpy as np
import gc
# show available model configurations
model_types = {'SimpleGraphSage': "A Basic GNN Model which uses GraphSAGE layers directly on graph structured data (as torch_geometric.data.HeteroData object).\
This model derives basic rolling statistics to use as fea... | PypiClean |
/LibRecommender-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl/libreco/algorithms/torch_modules/graphsage_module.py | import torch
from torch import nn
from torch.nn import functional as F
from ...utils.validate import (
check_dense_values,
check_sparse_indices,
dense_field_size,
sparse_feat_size,
)
class GraphSageModelBase(nn.Module):
def __init__(self, paradigm, data_info, embed_size, batch_size, num_layers):
... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/prism/components/prism-stylus.js | (function (Prism) {
var inside = {
'url': /url\((["']?).*?\1\)/i,
'string': {
pattern: /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,
greedy: true
},
'interpolation': null, // See below
'func': null, // See below
'important': /\B!(?:important|optional)\b/i,
'keyword': {
pattern: /(^|\s+)(?:(?:... | PypiClean |
/ASGIWebDAV-1.3.2.tar.gz/ASGIWebDAV-1.3.2/asgi_webdav/config.py | import json
from enum import Enum
from logging import getLogger
from os import getenv
from pydantic import BaseModel
from asgi_webdav.constants import (
DEFAULT_FILENAME_CONTENT_TYPE_MAPPING,
DEFAULT_SUFFIX_CONTENT_TYPE_MAPPING,
AppEntryParameters,
DAVCompressLevel,
)
from asgi_webdav.exception import... | PypiClean |
/GitSubmoduleExample-0.0.0-py3-none-any.whl/gitsubmoduleexample/gitsubmoduleexample.py | import logging
from pathlib import Path
from termcolor import colored
from beetools import beearchiver, beeutils
_PROJ_DESC = __doc__.split('\n')[0]
_PROJ_PATH = Path(__file__)
def project_desc():
return _PROJ_DESC
class GitSubmoduleExample:
'''Class short description one-liner goes here.
Class multi-... | PypiClean |
/DeepRank-GNN-0.1.22.tar.gz/DeepRank-GNN-0.1.22/deeprank_gnn/GraphGenMP.py | import os
import sys
import glob
import h5py
from tqdm import tqdm
import time
import multiprocessing as mp
from functools import partial
import pickle
from .ResidueGraph import ResidueGraph
from .Graph import Graph
class GraphHDF5(object):
def __init__(self, pdb_path, ref_path=None, graph_type='residue', pssm_... | PypiClean |
/ObjectListView-1.3.1.zip/ObjectListView-1.3.1/docs/features.rst | .. -*- coding: UTF-8 -*-
.. include:: _substitutions.txt
.. _features:
Features of an ObjectListView
=============================
Why take the time to learn how to use an ObjectListView? What's the benefit? The return on
investment? This page tries to document the useful features of an ObjectListView. Not all
featu... | PypiClean |
/LabExT_pkg-2.2.0.tar.gz/LabExT_pkg-2.2.0/LabExT/Tests/Utils.py | from os import path
import json
import numpy as np
import _tkinter
import tkinter
from unittest.mock import patch
from LabExT.Movement.Stage import Stage
import pytest
from unittest import TestCase
import random
import string
RUNTESTS_DIR = path.abspath(path.dirname(__file__))
TRANSFORMATIONS_DIR = path.join(RUNTESTS_... | PypiClean |
/McPhysics-1.5.12.tar.gz/McPhysics-1.5.12/instruments/_sillyscope.py | import numpy as _n
import time as _t
import spinmob as _s
import spinmob.egg as _egg
_g = _egg.gui
import mcphysics as _mp
try: from . import _visa_tools
except: _visa_tools = _mp.instruments._visa_tools
_mp._debug_enabled = False
_debug = _mp._debug
class sillyscope_api(_visa_tools.visa_api_base):
"""
... | PypiClean |
/MDP-3.6.tar.gz/MDP-3.6/bimdp/__init__.py |
# TODO: add a target seperator that does not remove the key. Could use
# -> remove key
# --> remove one '-' on entry
# => do not remove the key
# Note that adding this kind of magic is relatively cheap in BiNode,
# in parsing first check just for > .
# TODO: add wildcard support for node_id in message keys... | PypiClean |
/ConfigFramework-4.0.2.tar.gz/ConfigFramework-4.0.2/config_framework/loaders/yaml.py | import yaml
from functools import partial
from os import PathLike
from pathlib import Path
from typing import Union, Optional, MutableMapping, Any, Callable
from config_framework.types.abstract import AbstractLoader
try:
from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
# Those are ac... | PypiClean |
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/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 |
/OASYS1-ALS-ShadowOui-0.0.60.tar.gz/OASYS1-ALS-ShadowOui-0.0.60/orangecontrib/shadow/als/widgets/utility/ow_als_wavefront_generator.py |
from PyQt5 import QtGui, QtWidgets
from PyQt5.QtWidgets import QApplication
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui
from orangecontrib.shadow.util.shadow_objects import ShadowBeam
from orangecontrib.shadow.util.shadow_util import ShadowCongrue... | PypiClean |
/ARGs_OAP-2.3.2.tar.gz/ARGs_OAP-2.3.2/ARGs_OAP/bin/bbmap/pytools/filter.py | import os
import sys
import argparse
import datetime
import shutil
import glob
import re
# import numpy as np
# import matplotlib
# matplotlib.use("Agg") ## This needs to skip the DISPLAY env var checking
# import matplotlib.pyplot as plt
# import mpld3
from pprint import pprint
## append the pipeline lib and tools re... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/prism/components/prism-pure.min.js | !function(e){e.languages.pure={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],"inline-lang":{pattern:/%<[\s\S]+?%>/,greedy:!0,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},s... | PypiClean |
/CodeIntel-2.0.0b19-cp34-cp34m-macosx_10_12_x86_64.whl/codeintel/codeintel2/lang_php.py | from __future__ import absolute_import
from __future__ import print_function
import os
from os.path import isdir, join, basename, splitext, exists, dirname
import sys
import re
import logging
import time
import warnings
from six.moves import cStringIO as StringIO
import weakref
from glob import glob
from SilverCity.Sc... | PypiClean |
/Krakatau-noff-v0.20181212.tar.gz/Krakatau-noff-v0.20181212/Krakatau/script_util.py | from __future__ import print_function
import collections
import errno
from functools import partial
import hashlib
import os
import os.path
import platform
import zipfile
# Various utility functions for the top level scripts (decompile.py, assemble.py, disassemble.py)
copyright = '''Krakatau Copyright (C) 2012-18 ... | PypiClean |
/JumpScale-core-6.0.0.tar.gz/JumpScale-core-6.0.0/lib/JumpScale/baselib/sort/Sort.py |
from heapq import heapify, heappop, heappush
from itertools import islice, cycle
from tempfile import gettempdir
import os
from JumpScale import j
class Sort(object):
def merge(self,chunks,key=None):
"""
@todo p3 document (id:22)
"""
if key is None:
key = lambda x : x
values = []
for index, chunk i... | PypiClean |
/DendroPy_calver-2023.330.2-py3-none-any.whl/dendropy/simulate/popgensim.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 |
/MakkaPakka-1.0.4.tar.gz/MakkaPakka-1.0.4/src/makka_pakka/elf_caver/injector/redirect_execution.py | import subprocess
from pathlib import Path
from typing import List
from typing import Tuple
from uuid import uuid4
from makka_pakka import settings
from makka_pakka.elf_caver.exceptions.exceptions import MKPKInvalidParameter
from makka_pakka.elf_caver.injector.byte_extraction import (
to_little_endian_32bit,
)
d... | PypiClean |
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas_rhino/conversions/_geometry.py | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import Rhino
import compas_rhino
class RhinoGeometry(object):
"""Base class for Rhino Geometry and DocObject wrappers.
Attributes
----------
name: str
The name of the object.
type... | PypiClean |
/MacSyFinder-2.1.2.tar.gz/MacSyFinder-2.1.2/CONTRIBUTORS.md | CONTRIBUTORS
============
This is a list of people who have made contributions to Macsyfinder.
| Emoji | Represents | Comments |
|-------------------|---------------|----------------------------------------------------------------------|
|:co... | PypiClean |
/GenIce-1.0.11.tar.gz/GenIce-1.0.11/genice/lattices/Struct70.py | pairs="""
121 56
209 89
227 41
169 122
27 220
153 93
11 60
95 2
42 186
89 173
81 45
119 143
124 128
64 134
49 202
7 41
225 217
21 68
189 197
111 37
220 66
155 89
138 144
136 204
80 14
67 180
51 30
154 110
147 224
33 3
91 151
97 214
135 184
82 201
140 195
198 134
34 40
126 187
7 104
156 193
113 103
188 163
5 58
132 34
1... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/bootstrap3-editable/js/typeahead.js | (function($) {
var VERSION = "0.9.3";
var utils = {
isMsie: function() {
var match = /(msie) ([\w.]+)/i.exec(navigator.userAgent);
return match ? parseInt(match[2], 10) : false;
},
isBlankString: function(str) {
return !str || /^\s*$/.test(str);
... | PypiClean |
/IP_Connector-0.0.2.tar.gz/IP_Connector-0.0.2/IP_Connector/IpConnector.py | import json
import requests
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver.common.by import By
import os
import time
from IP_Connector.PrintRecord import print_record
class IpConnector(obje... | PypiClean |
/Buffet-1.0.zip/Buffet-1.0/README.txt | For the latest on Buffet, see http://projects.dowski.com/projects/buffet
Buffet is a universal templating system for CherryPy 2.2.x. It supports plugins that follow the interface defined at http://www.turbogears.org/docs/plugins/template.html and register setuptools entry points in the 'python.templating.engines' ent... | PypiClean |
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/ms/license.md | The MIT License (MIT)
Copyright (c) 2016 Zeit, Inc.
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, publi... | PypiClean |
/Flask-ZODB-0.1.tar.gz/Flask-ZODB-0.1/flaskext/zodb.py | import flask
import transaction
import zodburi
from UserDict import IterableUserDict
from ZODB.DB import DB
from contextlib import contextmanager, closing
from werkzeug import cached_property
from BTrees.OOBTree import OOBTree as BTree
from persistent import Persistent as Object
from persistent.list import Persistent... | PypiClean |
/GRImpulsiveWaves-0.3.2-py3-none-any.whl/grimpulsivewaves/waves/solutions.py | import numpy as np
from grimpulsivewaves.integrators import integrate_geodesic
class Solution:
def generate_geodesic(self, x0, v0, range, dim=4, christoffelParams=None, coordinateParams=None, max_step=np.inf):
if x0.type != v0.type:
raise ValueError("x0 and v0 has to be in same coordinate re... | PypiClean |
/Banhammer.py-2.5.4b0.tar.gz/Banhammer.py-2.5.4b0/banhammer/banhammer.py | import asyncio
import json
import os
import re
from typing import Awaitable, Callable, Dict, Tuple, Union, Any
import apraw
import discord
from apraw.utils import ExponentialCounter
from .const import BANHAMMER_PURPLE, logger
from .models import (EventFilter, EventHandler, GeneratorIdentifier,
It... | PypiClean |
/fastapi_jsonapi-2.0.0.tar.gz/fastapi_jsonapi-2.0.0/fastapi_jsonapi/data_layers/base.py | import types
from typing import List, Optional, Tuple, Type
from fastapi_jsonapi.data_typing import TypeModel, TypeSchema
from fastapi_jsonapi.querystring import QueryStringManager
from fastapi_jsonapi.schema import BaseJSONAPIItemInSchema
class BaseDataLayer:
"""Base class of a data layer"""
REWRITABLE_MET... | PypiClean |
/Itachi-0.0.1rc1-py3-none-any.whl/itachi/common/logging.py | import logging
from logging import Filter
import os
import sys
from typing import Optional
from itachi.common.tee import TeeHandler
from itachi.common.tqdm import Tqdm
class AllenNlpLogger(logging.Logger):
"""
A custom subclass of 'logging.Logger' that keeps a set of messages to
implement {debug,info,etc... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/yaml_35/yaml/cyaml.py | __all__ = ['CBaseLoader', 'CSafeLoader', 'CLoader',
'CBaseDumper', 'CSafeDumper', 'CDumper']
from _yaml import CParser, CEmitter
from .constructor import *
from .serializer import *
from .representer import *
from .resolver import *
class CBaseLoader(CParser, BaseConstructor, BaseResolver):
def __init... | PypiClean |
/BigJob2-0.54.post73.tar.gz/BigJob2-0.54.post73/bigjob/job_plugin/ec2ssh.py |
from bigjob import logger
import os
import uuid
import time
import traceback
import sys
from boto.ec2.connection import EC2Connection
from boto.ec2.regioninfo import RegionInfo
import boto.ec2
import saga
###############################################################################
# EC2 General
PLACEMENT_GROUP=No... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/layers/migrations/24_initial.py |
from django.db import migrations, models
import datetime
from django.conf import settings
from django.utils.timezone import now
import django.core.files.storage
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('base', '__first__'... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.