id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/address/pl_PL/__init__.py | from .. import Provider as AddressProvider
class Provider(AddressProvider):
cities = (
"Warszawa",
"Kraków",
"Łódź",
"Wrocław",
"Poznań",
"Gdańsk",
"Szczecin",
"Bydgoszcz",
"Lublin",
"Katowice",
"Białystok",
"Gdynia",
... | PypiClean |
/LilypondToBandVideoConverter-1.1.1.tar.gz/LilypondToBandVideoConverter-1.1.1/lilypondtobvc/src/basemodules/datatypesupport.py |
#====================
# IMPORTS
#====================
from copy import deepcopy
import dataclasses
from .regexppattern import RegExpPattern
from .simpleassertion import Assertion
from .simplelogging import Logging
from .simpletypes import Callable, DataType, Dictionary, Object, \
ObjectList,... | PypiClean |
/GenomicRanges-0.3.2-py3-none-any.whl/genomicranges/_utils.py |
# #
# # The following methods are for computing gaps between genomic regions
# #
# def calc_start_gap(
# row: MutableMapping[str, Any], name: Tuple[str, str], start_limit: int
# ) -> Tuple:
# """Give a genomic position and chromosome limits, calculate gap
# Args:
# row (MutableMapping[str, Any]):... | PypiClean |
/EdaSpiffWorkflow-0.0.2.tar.gz/EdaSpiffWorkflow-0.0.2/EdaSpiffWorkflow_Aadesh_G/specs/ExclusiveChoice.py |
# Copyright (C) 2007 Samuel Abels
#
# This library 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 2.1 of the License, or (at your option) any later version.
#
# This library is distri... | PypiClean |
/Cathub-0.1.7.tar.gz/Cathub-0.1.7/README.md | ## Introduction
CatHub provides an interface to the Surface Reactions database on [Catalysis-Hub.org](http://www.catalysis-hub.org).
The module includes a command line interface that can be used to access and upload data. A short guide is given below. We refer to the [catalysis-hub documentation](http://docs.catalysi... | PypiClean |
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/bulk_meter_cost_avoidance_settings_py3.py |
from msrest.serialization import Model
class BulkMeterCostAvoidanceSettings(Model):
"""BulkMeterCostAvoidanceSettings.
:param attempt_cooling_adjustment: Indicates whether or not the cost
avoidance processor will attempt cooling adjustments <span
class='property-internal'>Required (defined)</span>... | PypiClean |
/GSAS-II-WONDER_linux-1.0.1.tar.gz/GSAS-II-WONDER_linux-1.0.1/GSAS-II-WONDER/ReadMarCCDFrame.py | from __future__ import division, print_function
'''
*ReadMarCCDFrame: Read Mar Files*
---------------------------------
'''
"""
from /opt/marccd/documentation/header.txt
MarCCD Header Documentataion
from C code in frame.h and types.h
Documentation updated by R. Doyle Mon Mar 22 15:04:00 CDT 2010
Do... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ace/snippets/javascript.js | ace.define("ace/snippets/javascript",["require","exports","module"], function(require, exports, module) {
"use strict";
exports.snippetText = "# Prototype\n\
snippet proto\n\
${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {\n\
${4:// body...}\n\
};\n\
# Function\n\
snippet fun\n\
funct... | PypiClean |
/ipam_pacman-1.0.0rc1.tar.gz/ipam_pacman-1.0.0rc1/pacman/managers/SCM.py | import time
import serial
import sys
import re
#local imports
from ..utils import utils
global ser,COMPORT, resolution
resolution = 0.1
class SC:
Pos_List = []
def __init__(self,project_fp, COMPORT = 'COM1',debug=False):
self.proj_fp = project_fp
self.DEBUG=debug
self.split_... | PypiClean |
/BlueWhale3-ImageAnalytics-0.6.1.tar.gz/BlueWhale3-ImageAnalytics-0.6.1/orangecontrib/imageanalytics/widgets/owimageviewer.py | import os
import weakref
import logging
import io
from collections import namedtuple
from functools import partial
from concurrent.futures import Future
from contextlib import closing
import typing
from typing import List, Optional, Callable, Tuple, Sequence
import numpy
from AnyQt.QtCore import (
Qt, QObject, Q... | PypiClean |
/DBUtils-3.0.3.tar.gz/DBUtils-3.0.3/dbutils/pooled_db.py | from threading import Condition
from . import __version__
from .steady_db import connect
class PooledDBError(Exception):
"""General PooledDB error."""
class InvalidConnection(PooledDBError):
"""Database connection is invalid."""
class NotSupportedError(PooledDBError):
"""DB-API module not supported b... | PypiClean |
/FSRS_Optimizer-4.12.1-py3-none-any.whl/fsrs_optimizer/__main__.py | import fsrs_optimizer
import argparse
import shutil
import json
import pytz
import os
from pathlib import Path
import matplotlib.pyplot as plt
def prompt(msg: str, fallback):
default = ""
if fallback:
default = f"(default: {fallback})"
response = input(f"{msg} {default}: ")
if response == "":... | PypiClean |
/OSCAAR-2.0beta.tar.gz/OSCAAR-2.0beta/oscaar/astrometry/trackSmooth.py | import numpy as np
from numpy import linalg as LA
import pyfits
from matplotlib import pyplot as plt
import matplotlib.cm as cm
from scipy import ndimage, optimize
from time import sleep
import shutil
from glob import glob
from re import split
import cPickle
from shutil import copy
import os
def quadraticFit(derivativ... | PypiClean |
/HSTools-0.0.3-py3-none-any.whl/hstools/utilities.py | from __future__ import print_function
import os
import glob
from .compat import *
def sizeof_fmt(num, suffix='B'):
for unit in ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi']:
if abs(num) < 1024.0:
return "%3.1f%s%s" % (num, unit, suffix)
num /= 1024.0
return "%.1f%s%s" % (num, 'Yi'... | PypiClean |
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/@types/node/ts4.8/buffer.d.ts | declare module 'buffer' {
import { BinaryLike } from 'node:crypto';
import { ReadableStream as WebReadableStream } from 'node:stream/web';
export function isUtf8(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
export function isAscii(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
... | PypiClean |
/Fregger-0.10.7.tar.gz/Fregger-0.10.7/fregger/static/lib/marked.js | (function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||a.defaults,this.rules=p.normal,this.options.gfm&&(this.options.tables?this.rules=p.tables:this.rules=p.gfm)}function t(e,t){if(this.options=t||a.defaults,this.links=e,this.rules=u.normal,this.renderer=this.options.renderer||new n,this.rendere... | PypiClean |
/MultiRunnable-0.17.0a2-py3-none-any.whl/multirunnable/coroutine/strategy.py | from multipledispatch import dispatch
from gevent.threading import get_ident, getcurrent
from gevent.greenlet import Greenlet
from collections.abc import Iterable
from asyncio.tasks import Task
from gevent.pool import Pool
from typing import List, Iterable as IterableType, Callable, Optional, Union, Tuple, Dict
from ty... | PypiClean |
/braid-0.1.tar.gz/braid-0.1/braid/berryflow/misc/utils.py | from __future__ import absolute_import, print_function
import numpy as np
import sys
import lmdb
from ..proto import Datum
import warnings
def custom_formatwarning(msg, *a):
# ignore everything except the message
return str(msg) + '\n'
warnings.formatwarning = custom_formatwarning
def train_test_shuffle_sp... | PypiClean |
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/doc/api_doc/inginious.frontend.plugins.auth.rst | inginious.frontend.plugins.auth package
==============================================
.. automodule:: inginious.frontend.plugins.auth
:members:
:undoc-members:
:show-inheritance:
Submodules
----------
inginious.frontend.plugins.auth.saml2_auth module
-----------------------------------------------------... | PypiClean |
/Lekha-0.2.1.tar.gz/Lekha-0.2.1/lekha/tabbedbox.py |
from collections import OrderedDict
from efl.evas import EXPAND_BOTH, EXPAND_HORIZ, FILL_BOTH
from efl.elementary.box import Box
from efl.elementary.button import Button
from efl.elementary.icon import Icon
from efl.elementary.separator import Separator
from efl.elementary.scroller import Scroller, ELM_SCROLLER_POLIC... | PypiClean |
/CsPy_Uploading-1.0.11.tar.gz/CsPy_Uploading-1.0.11/CsPy_Uploading/functions.py | import datetime as dt
import openpyxl as xl
import pandas as pd
import sys
import os
from google.cloud.bigquery import Client, TableReference
from google.oauth2 import service_account
from dateutil.relativedelta import relativedelta
# TODO: Add Emailing Function To Read Log Files
# TODO: Add SQL to Workbook function... | PypiClean |
/FormEncode-2.0.1.tar.gz/FormEncode-2.0.1/formencode/htmlfill_schemabuilder.py | from __future__ import absolute_import
from . import validators
from . import schema
from . import compound
from . import htmlfill
__all__ = ['parse_schema', 'SchemaBuilder']
def parse_schema(form):
"""
Given an HTML form, parse out the schema defined in it and return
that schema.
"""
listener =... | PypiClean |
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/batch_create_py3.py |
from msrest.serialization import Model
class BatchCreate(Model):
"""BatchCreate.
All required parameters must be populated in order to send to Azure.
:param batch_code: Required. The batch code <span
class='property-internal'>Required</span> <span
class='property-internal'>Must be between 0 a... | PypiClean |
/BEAT_Guang-1.0.1-py3-none-any.whl/econml/data/dynamic_panel_dgp.py | import numpy as np
from econml.utilities import cross_product
from statsmodels.tools.tools import add_constant
import pandas as pd
import scipy as sp
from scipy.stats import expon
from sklearn.linear_model import LinearRegression
import matplotlib.pyplot as plt
import joblib
import os
dir = os.path.dirname(__file__)
... | PypiClean |
/CB_ModernAPI-0.1.tar.gz/CB_ModernAPI-0.1/cb_wrapper/__init__.py | import os
import yaml
import json
import requests
class APIModern:
syntax = (':{', '{', '},', '}', ':[', '[', ']', '],', ':', ',')
exception_messages = {
'api_missing': 'An API Key must be defined in the configuration file.',
'not_found': 'The provided JSON file path is not correct.'
}
... | PypiClean |
/Flask-Dance-7.0.0.tar.gz/Flask-Dance-7.0.0/docs/understanding-the-magic.rst | Understanding the Magic
=======================
.. currentmodule:: flask_dance.consumer
Flask-Dance might initially seem like magic ("it just works!"),
but it's just code. It's complicated, but understandable. This page
will teach you how Flask-Dance works.
Making the Blueprint
--------------------
The first thing ... | PypiClean |
/Django-HardWorker-0.1.0.zip/Django-HardWorker-0.1.0/hardworker/views.py | from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from django.utils import simplejson
from hardworker import ... | PypiClean |
/Aesthete-0.4.2.tar.gz/Aesthete-0.4.2/aesthete/glypher/GlyphMaker.py | import uuid
import glypher as g
import Mirror
import math
from types import *
from Toolbox import *
import ConfigWidgets
from aobject.utils import debug_print
import gtk
import re
from aobject.paths import *
from aobject import aobject
try :
import sympy
import sympy.parsing.maxima
have_sympy = True
except... | PypiClean |
/BRAILS-3.0.1.tar.gz/BRAILS-3.0.1/brails/modules/ImageClassifier/ImageClassifier.py |
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
from torchvision import datasets, models, transforms
import matplotlib.pyplot as plt
import time
import os
import copy
from PIL import Image
import sys
import requests
import zipfile
class ImageClassifier:
def __init__(self, model... | PypiClean |
/Mantissa-0.9.0.tar.gz/Mantissa-0.9.0/xmantissa/js/PlotKit/SweetSVG.js | PlotKit Sweet SVG Renderer
==========================
SVG Renderer for PlotKit which looks pretty!
Copyright
---------
Copyright 2005,2006 (c) Alastair Tse <alastair^liquidx.net>
For use under the BSD license. <http://www.liquidx.net/plotkit>
*/
// ----------------------------------------... | PypiClean |
/OASYS1-COMSYL-1.0.19.tar.gz/OASYS1-COMSYL-1.0.19/orangecontrib/comsyl/widgets/applications/comsyl_propagate_beamline.py | import os, sys
from PyQt5 import QtGui, QtWidgets
from PyQt5.QtGui import QPalette, QColor, QFont
from PyQt5.QtWidgets import QApplication, QFileDialog
from PyQt5.QtGui import QIntValidator, QDoubleValidator
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasys... | PypiClean |
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/errors/exceptions/bad_request_400.py |
from ..rpc_error import RPCError
class BadRequest(RPCError):
"""Bad Request"""
CODE = 400
"""``int``: RPC Error Code"""
NAME = __doc__
class AboutTooLong(BadRequest):
"""The provided about/bio text is too long"""
ID = "ABOUT_TOO_LONG"
"""``str``: RPC Error ID"""
MESSAGE = __doc__
... | PypiClean |
/FastNLP-1.0.1.tar.gz/FastNLP-1.0.1/fastNLP/io/pipe/summarization.py | import os
import numpy as np
from functools import partial
from .pipe import Pipe
from .utils import _drop_empty_instance
from ..loader.summarization import ExtCNNDMLoader
from ..data_bundle import DataBundle
# from ...core.const import Const
from ...core.vocabulary import Vocabulary
# from ...core._logger import log
... | PypiClean |
/BactInspectorMax-0.1.3-py3-none-any.whl/bactinspector/commands.py | from multiprocessing import Pool
from bactinspector.utility_functions import get_base_name
from bactinspector.mash_functions import run_mash_sketch, get_best_mash_matches, get_most_frequent_species_match, get_species_match_details
from bactinspector.dataframe_parsing_functions import create_refseq_species_metrics_df, ... | PypiClean |
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/inginious/frontend/static/js/codemirror/mode/haml/haml.js |
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), require("../ruby/ruby"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror", "../htmlmixed/htmlmixed", ".... | PypiClean |
/DataEngineer-0.2.9.tar.gz/DataEngineer-0.2.9/pkgs/dataengineer/dba/db_level.py | import os
import sys
import re
import pandas as pd
from ipylib.idebug import *
from dataengineer import config
from dataengineer.database import *
from dataengineer.collection import *
from dataengineer.models import *
class CollNameParser:
def __init__(self, collName=None):
if collName is not None:
... | PypiClean |
/Mopidy-Touchscreen-1.0.0.tar.gz/Mopidy-Touchscreen-1.0.0/README.rst | ******************
Mopidy-Touchscreen
******************
.. image:: https://img.shields.io/pypi/v/Mopidy-Touchscreen.svg?style=flat
:target: https://pypi.python.org/pypi/Mopidy-Touchscreen/
:alt: Latest PyPI version
.. image:: https://img.shields.io/pypi/dm/Mopidy-Touchscreen.svg?style=flat
:target: https... | PypiClean |
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/threads/api/threads.py | from django.core.exceptions import PermissionDenied
from django.db import transaction
from django.utils.translation import gettext as _
from rest_framework import viewsets
from rest_framework.decorators import action
from rest_framework.response import Response
from ...categories import PRIVATE_THREADS_ROOT_NAME, THRE... | PypiClean |
/Hipshot-1.0.zip/Hipshot-1.0/README.rst | Hipshot converts a video file or series of photographs into a
single image simulating a long-exposure photograph.
|image0| |image1| |image2|
Installation
============
Hipshot requires:
- Python 2;
- docopt;
- the `Avena <https://pypi.python.org/pypi/Avena>`__ library;
- the FFMPEG libraries; and
- OpenCV and i... | PypiClean |
/GaiaXPy-2.1.0.tar.gz/GaiaXPy-2.1.0/gaiaxpy/plotter/multi_xp.py | import matplotlib.pyplot as plt
from gaiaxpy.core.satellite import BANDS
from .plotter import Plotter
class MultiXpPlotter(Plotter):
def _plot_multi_xp(self):
show_legend = self.legend
spectra_df = self.spectra
spectra_class = self.spectra_class
max_flux = 0
fig, ax = plt... | PypiClean |
/KaKa-0.1.1.tar.gz/KaKa-0.1.1/README |
一个基于`werkzeug`和`jinja2`的`web`框架,简单易用、架构清晰、模块化。
## 快速开始
### 安装并引入
使用如下命令安装KaKa:
pip install KaKa
使用如下命令将框架引入你的项目:
from kaka import KaKa
### 实例化应用
使用如下语句实例化一个`KaKa`应用对象:
app = KaKa()
### 定义视图函数
使用如下语句定义一个简单的视图函数,此函数将会接受`http`请求并返回一个简单的`hello world`字符串:
from kaka.response import TextResponse
... | PypiClean |
/Alerts4-0.0.5.tar.gz/Alerts4-0.0.5/forwardAlert4/alerts.py | import smtplib, ssl
import json
import string
import random
import os
from twilio.rest import Client
import time
from termcolor import colored
from pyfiglet import figlet_format
import configparser
import colorama
import re
colorama.init()
names = ["users", "posts"]
for name in names:
file = open(f"{name}.json", "... | PypiClean |
/FITS_tools-0.2.tar.gz/FITS_tools-0.2/docs/fits_tools.rst | Tools
=====
Image Regridding
----------------
`FITS_tools.hcongrid.hcongrid` is meant to replicate `hcongrid
<http://idlastro.gsfc.nasa.gov/ftp/pro/astrom/hcongrid.pro>`_ and `hastrom
<http://idlastro.gsfc.nasa.gov/ftp/pro/astrom/hastrom.pro>`_. It uses scipy's
interpolation routines.
`FITS_tools.hcongrid.wcsalign`... | PypiClean |
/Odoo_API_Library-1.1.4.tar.gz/Odoo_API_Library-1.1.4/Odoo_API_Library/JwtHttp.py | from odoo import http
from odoo.http import request, Response
from .Validator import validator
import simplejson as json
from datetime import datetime
import pytz
return_fields = ['id', 'login', 'name', 'company_id', 'noti_token']
class JwtHttp:
def get_state(self):
return {
'd': request.sess... | PypiClean |
/Liftoff-1.6.3.2-py3-none-any.whl/liftoff/merge_lifted_features.py | from liftoff import liftoff_utils, new_feature
def merge_lifted_features(mapped_children, parent, unmapped_features, aln_cov_threshold, copy_id, feature_order,
feature_hierarchy, aln_cov, seq_id, seq_id_threshold):
feature_list, final_features = {}, []
non_parents = []
top_target... | PypiClean |
/Deliverance-0.6.1.tar.gz/Deliverance-0.6.1/deliverance/proxy.py | import urllib
import posixpath
import urlparse
import re
import socket
import os
import string
import tempfile
from deliverance.util.proxyrequest import Request, Response
from webob import exc
from wsgiproxy.exactproxy import proxy_exact_request
from tempita import html_quote
from paste.fileapp import FileApp
from past... | PypiClean |
/FLORIS-3.4.1.tar.gz/FLORIS-3.4.1/floris/tools/cut_plane.py |
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the Licens... | PypiClean |
/ImageD11-1.9.9.tar.gz/ImageD11-1.9.9/docs/sphx/calibration.rst | ===========
Calibration
===========
Calibration of the sample-detector distance, detector tilts and beam centre are one of the fundamental reasons for creating the ImageD11 program and having the sometimes annoying graphical interface. The menu offers the option to read in previously determined parameters from a file::... | PypiClean |
/LumberMill-0.9.5.7-py3-none-any.whl/lumbermill/utils/Buffers.py | import logging
import socket
import sys
import time
import pylru
try:
import msgpack
msgpack_avaiable = True
except ImportError:
msgpack_avaiable = False
try:
import zmq
zmq_avaiable = True
except ImportError:
zmq_avaiable = False
from lumbermill.utils.Decorators import setInterval
from lumb... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/iron-scroll-target-behavior/.github/ISSUE_TEMPLATE.md | <!-- Instructions: https://github.com/PolymerElements/iron-scroll-target-behavior/CONTRIBUTING.md#filing-issues -->
### Description
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
### Expected outcome
<!-- Example: The page stays the same color. -->
### Actual outcome
<!-- Examp... | PypiClean |
/CountryGoogleScraper-0.2.10.tar.gz/CountryGoogleScraper-0.2.10/GoogleScraper/scrape_config.py | """
[OUTPUT]
Settings which control how GoogleScraper represents it's results
and handles output.
"""
# How and if results are printed when running GoogleScraper.
# if set to 'all', then all data from results are outputted
# if set to 'summarize', then only a summary of results is given.
print_results = 'all'
# The na... | PypiClean |
/NeuroUnits-0.1.2.tar.gz/NeuroUnits-0.1.2/src/neurounits/__init__.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 |
/HAP-python-4.7.1.tar.gz/HAP-python-4.7.1/pyhap/hap_handler.py | import asyncio
from http import HTTPStatus
import logging
from typing import TYPE_CHECKING, Dict, Optional
from urllib.parse import ParseResult, parse_qs, urlparse
import uuid
import async_timeout
from chacha20poly1305_reuseable import ChaCha20Poly1305Reusable as ChaCha20Poly1305
from cryptography.exceptions import In... | PypiClean |
/Babel-lex-2.0-lex-20150116.tar.gz/Babel-lex-2.0-lex-20150116/babel/messages/mofile.py | import array
import struct
from babel.messages.catalog import Catalog, Message
from babel._compat import range_type, array_tobytes
LE_MAGIC = 0x950412de
BE_MAGIC = 0xde120495
def read_mo(fileobj):
"""Read a binary MO file from the given file-like object and return a
corresponding `Catalog` object.
:pa... | PypiClean |
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/ornstein.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def ornstein(path):
"""Interlocking Directorates Among Major Canadian Firms
The `Ornstein` dat... | PypiClean |
/LibRecommender-limited-0.6.6.6.tar.gz/LibRecommender-limited-0.6.6.6/libreco/feature/unique_features.py | import numbers
import numpy as np
def construct_unique_feat(
user_indices,
item_indices,
sparse_indices,
dense_values,
user_sparse_col,
user_dense_col,
item_sparse_col,
item_dense_col,
unique_feat
):
# use mergesort to preserve order
sort... | PypiClean |
/Draugr-1.0.9.tar.gz/Draugr-1.0.9/draugr/torch_utilities/tensors/to_tensor.py | from typing import Iterable, Sequence, Union
import numpy
import torch
import torchvision
from PIL.Image import Image
__author__ = "Christian Heider Nielsen"
__doc__ = ""
__all__ = ["to_tensor"]
from draugr.torch_utilities.tensors.types import numpy_to_torch_dtype
# from warg import passes_kws_to
# @passes_kws_t... | PypiClean |
/JitViewer-0.2.1.tar.gz/JitViewer-0.2.1/_jitviewer/static/canjs/1.1.4/amd/can/util/yui.js | define(['can/util/can', 'yui', 'can/util/event', 'can/util/fragment', 'can/util/array/each', 'can/util/object/isplain', 'can/util/deferred', '../hashchange'], function (can) {
// ---------
// _YUI node list._
// `can.Y` is set as part of the build process.
// `YUI().use('*')` is called for when `YUI` is statically... | PypiClean |
/OctoBot-Trading-2.4.23.tar.gz/OctoBot-Trading-2.4.23/octobot_trading/personal_data/portfolios/sub_portfolio.py | import decimal
import octobot_trading.constants as constants
import octobot_trading.personal_data.portfolios.portfolio as portfolio_class
class SubPortfolio(portfolio_class.Portfolio):
DEFAULT_SUB_PORTFOLIO_PERCENT = decimal.Decimal("0.5")
def __init__(self, config, trader, parent_portfolio, percent, is_rel... | PypiClean |
/GB_distributions2004-1.0.tar.gz/GB_distributions2004-1.0/GB_distributions2004/Binomialdistribution.py | import math
import matplotlib.pyplot as plt
from .Generaldistribution import Distribution
class Binomial(Distribution):
""" Binomial distribution class for calculating and
visualizing a Binomial distribution.
Attributes:
mean (float) representing the mean value of the distribution
std... | PypiClean |
/Mathics3-6.0.2.tar.gz/Mathics3-6.0.2/mathics/main.py |
import argparse
import atexit
import locale
import os
import os.path as osp
import re
import subprocess
import sys
from mathics import __version__, license_string, settings, version_string
from mathics.builtin.trace import TraceBuiltins, traced_do_replace
from mathics.core.atoms import String
from mathics.core.defini... | PypiClean |
/AQoPA-0.9.5.tar.gz/AQoPA-0.9.5/sme/Utility.py |
import Structs
import pickle
import wx
#Read from and write to a file
def readFile(filename):
filename = "files\\"+filename
f = open(filename)
lines = [line.strip() for line in f]
f.close()
return lines
#First clears then writes
def writeFile(filename, thelist):
filename = "files\\... | PypiClean |
/IOT3ApiClient-1.0.0.tar.gz/IOT3ApiClient-1.0.0/urllib3/util/ssl_.py | from __future__ import absolute_import
import hmac
import os
import sys
import warnings
from binascii import hexlify, unhexlify
from hashlib import md5, sha1, sha256
from ..exceptions import (
InsecurePlatformWarning,
ProxySchemeUnsupported,
SNIMissingWarning,
SSLError,
)
from ..packages import six
fr... | PypiClean |
/Blue-DiscordBot-3.2.0.tar.gz/Blue-DiscordBot-3.2.0/bluebot/core/downloader/installable.py | import json
import distutils.dir_util
import shutil
from enum import Enum
from pathlib import Path
from typing import MutableMapping, Any, TYPE_CHECKING
from .log import log
from .json_mixins import RepoJSONMixin
from bluebot.core import __version__, version_info as red_version_info, VersionInfo
if TYPE_CHECKING:
... | PypiClean |
/MangaReaderScraper-0.51.tar.gz/MangaReaderScraper-0.51/README.md | # MangaReaderScraper
Search & download mangas from the command line.

## Install
Requires Python3.7+
To install:
```bash
pip3 install --user MangaReaderScraper
```
For development:
```bash
git clone https://github.com/superDross/MangaReaderScraper
pip install -r MangaReaderScraper/dev_requirem... | PypiClean |
/Exegol-4.2.5.tar.gz/Exegol-4.2.5/exegol/utils/GitUtils.py | import os
import sys
from pathlib import Path
from typing import Optional, List
from git.exc import GitCommandError, RepositoryDirtyError
from rich.progress import TextColumn, BarColumn
from exegol.config.ConstantConfig import ConstantConfig
from exegol.config.EnvInfo import EnvInfo
from exegol.console.MetaGitProgres... | PypiClean |
/OBITools-1.2.13.tar.gz/OBITools-1.2.13/distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py |
# KOI8-R language model
# Character Mapping Table:
KOI8R_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, # 20
252,252,252,252,252,252,252,25... | PypiClean |
/HiCTornadIO2-0.1.2.tar.gz/HiCTornadIO2-0.1.2/tornadio2/sessioncontainer.py | from heapq import heappush, heappop
from time import time
from hashlib import md5
from random import random
def _random_key():
"""Return random session key"""
i = md5()
i.update('%s%s' % (random(), time()))
return i.hexdigest()
class SessionBase(object):
"""Represents one session object stored i... | PypiClean |
/Hemp-0.1.9.tar.gz/Hemp-0.1.9/hemp/gitutils.py | from git import Git, Repo
from natsort.natsort import natsorted
from urlparse import urlparse
from hemp.internal.utils import SimpleProgressPrinter, print_info
def remote_tags(url):
# type: (str) -> list
"""
List all available remote tags naturally sorted as version strings
:rtype: list
:param ur... | PypiClean |
/CSUMMDET-1.0.23.tar.gz/CSUMMDET-1.0.23/mmdet/ops/dcn/deform_conv.py | import math
import torch
import torch.nn as nn
from torch.autograd import Function
from torch.autograd.function import once_differentiable
from torch.nn.modules.utils import _pair
from . import deform_conv_cuda
class DeformConvFunction(Function):
@staticmethod
def forward(ctx,
input,
... | PypiClean |
/LibRecommender-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl/libreco/bases/tf_base.py | import abc
import os
import numpy as np
from .base import Base
from ..prediction import predict_tf_feat
from ..recommendation import (
check_dynamic_rec_feats,
cold_start_rec,
construct_rec,
recommend_tf_feat,
)
from ..tfops import modify_variable_names, sess_config, tf
from ..training.dispatch import... | PypiClean |
/Jupytils-0.41100000000000003.tar.gz/Jupytils-0.41100000000000003/ExcelUtils.ipynb | ```
%run "../PyUtils/common.ipynb"
%run "../PyUtils/ShowExcel.ipynb"
%run "../PyUtils/ExcelFormulas.ipynb"
import networkx as nx
from networkx.readwrite import json_graph
wb, ws, genjs, df2 =openFileAndShow( file="test1.xlsx", tname= 't1', sheetname=0)
df2.ix[1][1] = 340
def RANGE_1(f='A1:B1'):
# f = f.lower()
... | PypiClean |
/EcoNameTranslator-2.0.tar.gz/EcoNameTranslator-2.0/README.md | # The Ecological Name Translator
### What is it?
A lightweight python package containing everything you need for translation and management of ecological names. The package takes inspiration from the "taxize" package in R, and currently provides all of it's functionality. On top of this however, the EcoNameTranslator... | PypiClean |
/EA_framework-2.2.3-py3-none-any.whl/main_ea.py | from EA_sequential.Population import *
from EA_sequential.Recombination import *
from EA_sequential.Mutation import *
from EA_sequential.Selection import *
from EA_sequential.Evaluation import *
from EA_sequential.EA import *
import matplotlib.pyplot as plt
import argparse
import time
import os
def main():
parser... | PypiClean |
/Adafruit_Blinka-8.20.1-py3-none-any.whl/adafruit_blinka/microcontroller/rockchip/rk3568/pin.py | from adafruit_blinka.microcontroller.generic_linux.libgpiod_pin import Pin
# GPIOx_yz = x * 32 + y * 8 + z
# y: A -> 0, B -> 1, C -> 2, D -> 3
# GPIO0
GPIO0_A0 = Pin((0, 0))
GPIO0_A1 = Pin((0, 1))
GPIO0_A2 = Pin((0, 2))
GPIO0_A3 = Pin((0, 3))
GPIO0_A4 = Pin((0, 4))
GPIO0_A5 = Pin((0, 5))
GPIO0_A6 = Pin((0, 6))
GPIO0... | PypiClean |
/LibRecommender-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl/libreco/torchops/loss.py | import torch
import torch.nn.functional as F
def binary_cross_entropy_loss(logits, labels):
return F.binary_cross_entropy_with_logits(logits, labels)
# focal loss for binary cross entropy based on [Lin et al., 2018](https://arxiv.org/pdf/1708.02002.pdf)
def focal_loss(logits, labels, alpha=0.25, gamma=2.0, mean... | PypiClean |
/HavNegpy-1.2.tar.gz/HavNegpy-1.2/docs/_build/doctrees/nbsphinx/_build/html/_build/doctrees/nbsphinx/_build/doctrees/nbsphinx/_build/html/_build/doctrees/nbsphinx/hn_module_tutorial.ipynb | # Tutorial for the HN module of HavNegpy package
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
import HavNegpy as dd
%matplotlib qt
os.chdir(r'M:\Marshall_Data\mohamed_data\mohamed_data\n44')
def create_dataframe(f):
col_names = ['Freq', 'T', 'Eps1', 'Eps2']
#f ... | PypiClean |
/Kr0nOs_Bot-3.3.11-py3-none-any.whl/redbot/core/drivers/_mongo.py | import contextlib
import itertools
import re
from getpass import getpass
from typing import Match, Pattern, Tuple, Optional, AsyncIterator, Any, Dict, Iterator, List
from urllib.parse import quote_plus
try:
# pylint: disable=import-error
import pymongo.errors
import motor.core
import motor.motor_asynci... | PypiClean |
/Flask-RESTy-4.0.2.tar.gz/Flask-RESTy-4.0.2/flask_resty/view.py | import itertools
import flask
from flask.views import MethodView
from marshmallow import ValidationError, fields
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm import Load
from sqlalchemy.orm.exc import NoResultFound
from werkzeug.exceptions import NotFound
from . import meta
from .authentication impor... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/hris/model/link_token.py | import re # noqa: F401
import sys # noqa: F401
from typing import (
Optional,
Union,
List,
Dict,
)
from MergePythonSDK.shared.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
OpenApiModel,
change_keys_js_to_python,... | PypiClean |
/MSM_PELE-1.1.1-py3-none-any.whl/Helpers/best_structs.py | import os
import argparse
import pandas as pd
import glob
from MSM_PELE import constants
"""
Description: Parse all the reports found under 'path' and sort them all
by the chosen criteria (Binding Energy as default) having into account the
frequency our pele control file writes a structure through the -ofreq... | PypiClean |
/hft_crypto_api-1.0.6.tar.gz/hft_crypto_api-1.0.6/hftcryptoapi/bitmart/Bitmart.py | from .api_client import PyClient
from hftcryptoapi.bitmart.data import *
from typing import Dict, Union, List
from .ws_base import BitmartWs
from typing import Callable
from time import sleep
class BitmartClient(PyClient):
def __init__(self, api_key: Optional[str] = None, secret_key: Optional[str] = None, memo: ... | PypiClean |
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/phone_number/ar_PS/__init__.py | from .. import Provider as PhoneNumberProvider
class Provider(PhoneNumberProvider):
# Source:
# https://en.wikipedia.org/wiki/Telephone_numbers_in_the_State_of_Palestine
cellphone_formats = (
"{{area_code}} {{provider_code}} ### ####",
"{{area_code}}{{provider_code}}#######",
"0{{... | PypiClean |
/Brian2-2.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/brian2/equations/unitcheck.py | import re
from brian2.core.variables import Variable
from brian2.parsing.expressions import parse_expression_dimensions
from brian2.parsing.statements import parse_statement
from brian2.units.fundamentalunits import (
fail_for_dimension_mismatch,
get_dimensions,
get_unit,
)
__all__ = ["check_dimensions", ... | PypiClean |
/Fathom-Workloads-1.0rc0.tar.gz/Fathom-Workloads-1.0rc0/docs/faq.md | # Functions are missing from `cv2`
You've probably installed the wrong python library. Unfortunately, the `cv2` package in PyPI is not related to OpenCV at all. It's a name-squatter who has managed to upload a useless, empty package. There are a couple of ways to install OpenCV:
1. Install from source by following th... | PypiClean |
/JCC-3.13.tar.gz/JCC-3.13/jcc2/cpp.py |
import os, sys, zipfile, _jcc2
from itertools import izip
python_ver = '%d.%d.%d' %(sys.version_info[0:3])
if python_ver < '2.4':
from sets import Set as set
def split_pkg(string, sep):
parts = string.split(sep)
if len(parts) > 1:
return sep.join(parts[:-1]), parts[-1]
ret... | PypiClean |
/ETSProjectTools-0.6.0.tar.gz/ETSProjectTools-0.6.0/enthought/setuptools/egg_db_command.py |
from egg_db import EGG_DB_FILE
from setuptools import Command
import os
class EggDBCommand(Command):
##########################################################################
# Attributes
##########################################################################
#### public 'Command' interface ###... | PypiClean |
/Apycula-0.9.0a1.tar.gz/Apycula-0.9.0a1/readme.md | # Project Apicula
Documentation and open source tools for the Gowin FPGA bitstream format.
Project Apicula uses a combination of fuzzing and parsing of the vendor data files to provide Python tools for generating bitstreams.
This project is supported by our generous sponsors. Have a look at our [contributors](https:... | PypiClean |
/Flask-Swag-0.1.2.tar.gz/Flask-Swag-0.1.2/flask_swag/resources/swagger-ui/lang/tr.js | 'use strict';
/* jshint quotmark: double */
window.SwaggerTranslator.learn({
"Warning: Deprecated":"Uyarı: Deprecated",
"Implementation Notes":"Gerçekleştirim Notları",
"Response Class":"Dönen Sınıf",
"Status":"Statü",
"Parameters":"Parametreler",
"Parameter":"Parametre",
"Value":"Değer",
... | PypiClean |
/EDA-assistant-0.0.4.tar.gz/EDA-assistant-0.0.4/eda_assistant/_create_tables.py | import pandas as pd
from eda_assistant import _calc_dataframe_statistics
from eda_assistant import _calc_variable_statistics
from eda_assistant import _format_tables
def create_df_summary(df):
"""
Returns a formatted dataframe containing summary statistics values for the
entire dataset.
Parameters... | PypiClean |
/BiblioPixel-3.4.46.tar.gz/BiblioPixel-3.4.46/bibliopixel/drivers/driver_base.py | import numpy as np
from . channel_order import ChannelOrder
from .. colors import gamma as _gamma
from .. project import attributes, clock, data_maker, fields
import threading, time
class DriverBase(object):
"""
Base driver class to build other drivers from.
:param int num: Number of total pixels held b... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/AppCenter/simpleui/static/admin/simpleui-x/elementui/locale/lang/tr-TR.js | 'use strict';
exports.__esModule = true;
exports.default = {
el: {
colorpicker: {
confirm: 'Onayla',
clear: 'Temizle'
},
datepicker: {
now: 'Şimdi',
today: 'Bugün',
cancel: 'İptal',
clear: 'Temizle',
confirm... | PypiClean |
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/examples/diffusion/mesh20x20Coupled.py | r"""Solve a coupled set of diffusion equations in two dimensions.
This example solves a diffusion problem and demonstrates the use of
applying boundary condition patches.
.. index:: Grid2D
>>> from fipy import CellVariable, Grid2D, Viewer, TransientTerm, DiffusionTerm
>>> from fipy.tools import numerix
>>> nx = 20
... | PypiClean |
/Heaty-2020.10b2.tar.gz/Heaty-2020.10b2/heaty/gui/user_input/form.py | from typing import List, Tuple, Union, Callable, Optional, Dict, Any
from PyQt5 import QtCore as qtc
from PyQt5 import QtWidgets as qtw
from heaty.gui.auxiliary.types import ValueType
from heaty.gui.user_input.processing import InputProcessor, Interval
from heaty.quantity.scalar import Quantity
# noinspection PyArgu... | PypiClean |
/DEODR-0.2.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl/deodr/pytorch/laplacian_rigid_energy_pytorch.py | """Pytorch implementation of an as-rigid-as-possible energy based on the difference of laplacian with a reference shape."""
from typing import Tuple
import numpy as np
from scipy.sparse import spmatrix
import torch
from torch.sparse import DoubleTensor # type: ignore
from ..laplacian_rigid_energy import LaplacianRi... | PypiClean |
/CMSeq-1.0.4-py3-none-any.whl/cmseq/consensus_aDNA.py | from .cmseq import CMSEQ_DEFAULTS
from .cmseq import BamFile
from .cmseq import BamContig
import os
import pysam
import math
import pandas as pd
import numpy as np
import argparse
import sys
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
__author__ = 'Kun D. Huang (kun.huang@un... | PypiClean |
/EMalign-1.0.5.tar.gz/EMalign-1.0.5/src/common_finufft.py | import numpy as np
import finufft
from pyfftw.interfaces.numpy_fft import ifft2
def cryo_pft(p, n_r, n_theta):
"""
Compute the polar Fourier transform of projections with resolution n_r in the radial direction
and resolution n_theta in the angular direction.
:param p:
:param n_r: Number ... | PypiClean |
/DisplaceNet-0.1.tar.gz/DisplaceNet-0.1/engine/object_detection_branch/single_shot_detector/bounding_box_utils/bounding_box_utils.py | from __future__ import division
import numpy as np
def convert_coordinates(tensor, start_index, conversion, border_pixels='half'):
'''
Convert coordinates for axis-aligned 2D boxes between two coordinate formats.
Creates a copy of `tensor`, i.e. does not operate in place. Currently there are
three sup... | PypiClean |
/Camelot-13.04.13-gpl-pyqt.tar.gz/Camelot-13.04.13-gpl-pyqt/doc/sphinx/source/advanced/debug.rst | .. _doc-debug:
==========================
Debugging Camelot and PyQt
==========================
Log the SQL Queries
===================
Configure SQLAlchemy to log all queries::
logging.getLogger('sqlalchemy.engine').setLevel(logging.DEBUG)
Enable core dumps
=================
Linux
-----
For older gdb versio... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ckeditor/lang/ro.js | /*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.lang['ro']={"dir":"ltr","editor":"Rich Text Editor","common":{"editorHelp":"Apasă ALT 0 pentru ajutor","browseServer":"Răsfoieşte server","url":"URL","protocol":"Pro... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.