id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/GmoCoin-0.0.13.zip/GmoCoin-0.0.13/gmocoin/public/dto.py | from marshmallow import fields, pre_load
from marshmallow_enum import EnumField
from enum import Enum
from datetime import datetime
from pytz import timezone
from typing import List
from decimal import Decimal
from ..common.dto import BaseSchema, BaseResponse, BaseResponseSchema, Status, Symbol, SalesSide
class GetS... | PypiClean |
/NBT-1.5.1.tar.gz/NBT-1.5.1/README.txt | ==========================
The NBT library for Python
==========================
Forewords
=========
This is mainly a `Named Binary Tag` parser & writer library.
From the initial specification by Markus Persson::
NBT (Named Binary Tag) is a tag based binary format designed to carry large
amounts of binary data ... | PypiClean |
/OASYS1-SHADOWFOUR-0.0.4.tar.gz/OASYS1-SHADOWFOUR-0.0.4/orangecontrib/shadow4/widgets/gui/plots.py | from oasys.widgets import gui as oasysgui
def plot_data1D(x, y,
title="", xtitle="", ytitle="",
log_x=False, log_y=False, color='blue', replace=True, control=False,
xrange=None, yrange=None, symbol=''):
plot_widget_id = oasysgui.plotWindow(parent=None,
... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/DjangoAppCenter/simpleui/static/admin/simpleui-x/elementui/calendar.js | module.exports =
/******/ (function (modules) { // webpackBootstrap
/******/ // The module cache
/******/
var installedModules = {};
/******/
/******/ // The require function
/******/
function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in ... | PypiClean |
/LinOTP-2.11.1.tar.gz/LinOTP-2.11.1/linotp/public/js/jed.js | -----------
A gettext compatible i18n library for modern JavaScript Applications
by Alex Sexton - AlexSexton [at] gmail - @SlexAxton
WTFPL license for use
Dojo CLA for contributions
Jed offers the entire applicable GNU gettext spec'd set of
functions, but also offers some nicer wrappers around them.
The api for gette... | PypiClean |
/Flask_MAB-3.0.0-py3-none-any.whl/flask_mab/bandits.py | from random import random, choice, uniform, betavariate
from math import log, exp, expm1
class Bandit(object):
"""The primary bandit interface. Don't use this unless you really
want uniform random arm selection (which defeats the whole purpose, really)
Used as a control to test against and as an interfa... | PypiClean |
/Altair%20Smartworks%20SDK-0.0.1.tar.gz/Altair Smartworks SDK-0.0.1/openapi_client/model/action_delete_response.py | import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | PypiClean |
/Dandelion-0.17.26-py3-none-any.whl/dandelion/model/resnet.py | # ------------------------------------------------------------------------------------------------
__author__ = 'dawei.leng'
import theano.tensor as tensor
from ..module import *
from ..functional import *
from ..activation import *
class ResNet_bottleneck(Module):
"""
[ResNet bottleneck block] (https://arxi... | PypiClean |
/DPark-0.5.0.tar.gz/DPark-0.5.0/dpark/web/ui/static/js/bootstrap-tooltip.js | !function ($) {
"use strict"; // jshint ;_;
/* TOOLTIP PUBLIC CLASS DEFINITION
* =============================== */
var Tooltip = function (element, options) {
this.init('tooltip', element, options)
}
Tooltip.prototype = {
constructor: Tooltip
, init: function (type, element, options) {
... | PypiClean |
/Flask-Scaffold-0.5.1.tar.gz/Flask-Scaffold-0.5.1/app/templates/static/node_modules/angular-grid/src/ts/widgets/agDropdownList.ts |
module awk.grid {
var utils = Utils;
var svgFactory = SvgFactory.getInstance();
export class AgDropdownList {
private itemSelectedListeners: any;
private eValue: any;
private agList: any;
private eGui: any;
private hidePopupCallback: any;
private selectedI... | PypiClean |
/12306-booking-0.1.18.tar.gz/12306-booking-0.1.18/booking/auth.py | import os
import time
import uuid
import json
import base64
import logging
from hack12306.auth import TrainAuthAPI
from hack12306.user import TrainUserAPI
from hack12306.exceptions import TrainUserNotLogin
from . import settings
from .remind import remind_login_qr
_logger = logging.getLogger('booking')
__all__ = ('... | PypiClean |
/Labeventtable-0.0.1.tar.gz/Labeventtable-0.0.1/README.md | ## Generating Labevent Table using python
[](https://www.python.org/)
[](https://www.python.org/downloads/release/python-360/)
To install and import the package
```... | PypiClean |
/42di-0.2.6.tar.gz/42di-0.2.6/di/__init__.py | from logging import error
import requests
from requests import status_codes
import swagger_client as sw
import json
import pandas
import warnings
from enum import Enum
#warnings.filterwarnings('default')
SSL = True
TOKEN = None
class ResourceType(Enum):
INVALID = 0
TEAM = 1
PROJECT = 2
DATASET = 3
... | PypiClean |
/BioFlow-0.2.3.tar.gz/BioFlow-0.2.3/bioflow/annotation_network/BioKnowledgeInterface.py | import hashlib
import json
import pickle
import random
import string
import math
from collections import defaultdict
from copy import copy
from csv import reader
from itertools import combinations, chain
from pprint import PrettyPrinter
from random import shuffle
from time import time
import traceback, sys
import nump... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/bower_components/web-animations-js/src/timing-utilities.js |
(function(shared, testing) {
var fills = 'backwards|forwards|both|none'.split('|');
var directions = 'reverse|alternate|alternate-reverse'.split('|');
var linear = function(x) { return x; };
function cloneTimingInput(timingInput) {
if (typeof timingInput == 'number') {
return timingInput;
}
... | PypiClean |
/CsuPTMD-1.0.12.tar.gz/CsuPTMD-1.0.12/PTMD/maskrcnn_benchmark/apex/apex/fp16_utils/fp16_optimizer.py | import torch
from torch import nn
from torch.autograd import Variable
from torch.nn.parameter import Parameter
from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
from ..amp._amp_state import _amp_state, maybe_print
from ..amp.scaler import LossScaler
from ..multi_tensor_apply import multi_tensor... | PypiClean |
/Caroline-presentation-0.2.4.tar.gz/Caroline-presentation-0.2.4/caroline/html_dist/js/mathjax/input/tex/extensions/mhchem.js | !function(n){var a={};function o(t){if(a[t])return a[t].exports;var e=a[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}o.m=n,o.c=a,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d... | PypiClean |
/HavNegpy-1.2.tar.gz/HavNegpy-1.2/docs/_build/doctrees/nbsphinx/_build/doctrees/nbsphinx/_build/html/_build/html/_build/html/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 |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/readable-stream/lib/internal/streams/end-of-stream.js |
'use strict';
var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;
function once(callback) {
var called = false;
return function () {
if (called) return;
called = true;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
... | PypiClean |
/Hooke-1.0.0.alpha%20(Ninken).tar.gz/Hooke-1.0.0.alpha (Ninken)/hooke/ui/gui/dialog/points.py |
from numpy import arange
import wx
class ClickedPoint(object):
"""Defines a clicked point from a curve plot.
"""
def __init__(self):
self.is_marker=None #boolean ; decides if it is a marker
self.is_line_edge=None #boolean ; decides if it is the edge of a line (unused)
self.absol... | PypiClean |
/DeepGMAP-0.2.0.tar.gz/DeepGMAP-0.2.0/deepgmap/network_constructors/conv4.py | import functools
import tensorflow as tf
import math
import sys
import numpy as np
_ac=il.import_module("deepgmap.network_constructors.auc_calc")
ac=_ac.auc_pr
#the code design came from https://gist.github.com/danijar/8663d3bbfd586bffecf6a0094cd116f2
def doublewrap(function):
@functools.wraps(function)
def d... | PypiClean |
/MeteorTools-2023.9.0-py3-none-any.whl/meteortools/fileformats/kmlHandlers.py | import xmltodict
from shapely.geometry import Polygon
import csv
import simplekml
import numpy as np
import pandas as pd
import os
def readCameraKML(kmlFilename, return_poly=False):
""" Load a KML file and return either a list of lats and longs, or a Shapely polygon
Arguments:
kmlFilename: ... | PypiClean |
/Flask_AppBuilder-4.3.6-py3-none-any.whl/flask_appbuilder/models/mixins.py | from datetime import datetime
import logging
from flask import g
from sqlalchemy import Column, DateTime, ForeignKey, Integer
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.orm import relationship
import sqlalchemy.types as types
log = logging.getLogger(__name__)
class FileColumn(types.TypeDe... | PypiClean |
/BaseCon-1.0.2.tar.gz/BaseCon-1.0.2/basecon.py |
# import directive
__all__ = ('__author__', '__license__', '__version__', 'BaseCon')
# package metadata
__author__ = 'Hansheng Zhao'
__license__ = 'BSD-2-Clause + MIT'
__version__ = '1.0.2'
class BaseCon(object):
""" BaseCon class for converting integers to URL safe strings """
# stop dynamic attribute creatio... | PypiClean |
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/chokidar/lib/fsevents-handler.js | 'use strict';
const fs = require('fs');
const sysPath = require('path');
const { promisify } = require('util');
let fsevents;
try {
fsevents = require('fsevents');
} catch (error) {
if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);
}
if (fsevents) {
// TODO: real check
const mtch =... | PypiClean |
/AsyncIRCClient-0.0.8-py3-none-any.whl/async_irc_client/async_irc_client.py | import asyncio
from asyncio import transports
from dataclasses import dataclass, field
from typing import Union, Callable, Any, Coroutine
import datetime
from loguru import logger
def is_event_loop_set() -> bool:
"""
check if asyncio has loop set
:return: bool
"""
try:
# check if any event... | PypiClean |
/FoilMesh-0.0.8.tar.gz/FoilMesh-0.0.8/foilmesh/meshio/off/_off.py | import numpy as np
from .._common import warn
from .._exceptions import ReadError
from .._files import open_file
from .._helpers import register_format
from .._mesh import CellBlock, Mesh
def read(filename):
with open_file(filename) as f:
points, cells = read_buffer(f)
return Mesh(points, cells)
de... | PypiClean |
/DiST_Net-0.1.5.tar.gz/DiST_Net-0.1.5/distnet/data_generator/dy_iterator.py | from dataset_iterator import TrackingIterator
import numpy as np
from scipy.ndimage import center_of_mass, find_objects, maximum_filter
from scipy.ndimage.measurements import mean
from math import copysign
import sys
import itertools
import edt
from random import random
class DyIterator(TrackingIterator):
def __in... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_mt-mt.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": [
"AM",
"PM"
],
"DAY": [
"Il-\u0126add",
... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_sw-tz.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 |
/CPAT-3.0.4.tar.gz/CPAT-3.0.4/.eggs/nose-1.3.7-py3.6.egg/nose/plugins/manager.py | import inspect
import logging
import os
import sys
from itertools import chain as iterchain
from warnings import warn
import nose.config
from nose.failure import Failure
from nose.plugins.base import IPluginInterface
from nose.pyversion import sort_list
try:
import pickle as pickle
except:
import pickle
try:
... | PypiClean |
/BlazeUtils-0.7.0-py3-none-any.whl/blazeutils/spreadsheets.py | import datetime as dt
from decimal import Decimal
from io import BytesIO
from random import randint
import os.path as osp
try:
import openpyxl
except ImportError:
openpyxl = None
try:
import xlrd
except ImportError:
xlrd = None
try:
import xlwt
except ImportError:
xlwt = None
try:
import... | PypiClean |
/NREL_reV-0.8.1-py3-none-any.whl/reV/bespoke/gradient_free.py | import numpy as np
import time
from math import log
import logging
logger = logging.getLogger(__name__)
class GeneticAlgorithm():
"""a simple genetic algorithm used to select bespoke turbine locations
"""
def __init__(self, bits, bounds, variable_type, objective_function,
max_generation... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/crm/model/task.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 |
/MirrorHerokuX-6.0.3-py3-none-any.whl/bot/helper/mirror_utils/download_utils/direct_link_generator.py | import json
import re
import math
import urllib.parse
from os import popen
from random import choice
from urllib.parse import urlparse
import lk21
import requests
import logging
from bot import UPTOBOX_TOKEN
from bs4 import BeautifulSoup
from lk21.extractors.bypasser import Bypass
from base64 import standard_b64encod... | PypiClean |
/MetaNN-0.3.2-py3-none-any.whl/metann/dependentmodule.py | from collections import OrderedDict
from copy import deepcopy
import torch
from torch.nn import Module
from torch._six import string_classes
from .utils import SubDict
from typing import Dict, List, Optional, Tuple, Union, Any
class DependentModule(Module):
r"""
The PyTorch sugggest all parameters of a mod... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/basic/lang/en-au.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/license
*/
CKEDITOR.lang['en-au']={"editor":"Rich Text Editor","editorPanel":"Rich Text Editor panel","common":{"editorHelp":"Press ALT 0 for help","browseServer":"Browse Server","url":"... | PypiClean |
/FishFishJump-0.2.3.tar.gz/FishFishJump-0.2.3/fish_crawlers/slave_crawler/slave_crawler/spiders/crawler.py | import time
from scrapy.contrib.linkextractors.lxmlhtml import LxmlLinkExtractor
from scrapy.spiders import Rule
from scrapy_redis.spiders import RedisCrawlSpider
from fish_core.scrapy.items import CommonItem
from fish_core.simhash import Simhash
class SimpleCrawler(RedisCrawlSpider):
"""
A simple example f... | PypiClean |
/FastNLP-1.0.1.tar.gz/FastNLP-1.0.1/fastNLP/transformers/torch/activations.py |
import math
from packaging import version
from fastNLP.envs.imports import _NEED_IMPORT_TORCH
from fastNLP.core.log import logger
if _NEED_IMPORT_TORCH:
import torch
from torch import nn, tanh, sigmoid
from torch.nn.functional import relu
else:
from fastNLP.core.utils.dummy_class import (
Du... | PypiClean |
/DeeFuzzer-0.8.2.tar.gz/DeeFuzzer-0.8.2/deefuzzer/tools/webm.py |
# <yomguy@parisson.com>
# This software is a computer program whose purpose is to stream audio
# and video data through icecast2 servers.
# This software is governed by the CeCILL license under French law and
# abiding by the rules of distribution of free software. You can use,
# modify and/ or redistribute the s... | PypiClean |
/FileCrawler-0.1.8.tar.gz/FileCrawler-0.1.8/filecrawler/libs/process.py | import platform
import tempfile
import time
import signal
import os
from pathlib import Path
from subprocess import Popen, PIPE
from filecrawler.config import Configuration
from filecrawler.libs.color import Color
from filecrawler.libs.logger import Logger
class Process(object):
''' Represents a running/ran pro... | PypiClean |
/OBITools-1.2.13.tar.gz/OBITools-1.2.13/doc/sphinx/source/scripts/ecodbtaxstat.rst | .. automodule:: ecodbtaxstat
:py:mod:`ecodbtaxstat` specific option
--------------------------------------
.. cmdoption:: --rank=<TAXONOMIC_RANK>
The taxonomic rank at which frequencies have to be computed.
Possible values are:
- class
-... | PypiClean |
/Cartridge-1.3.4-py3-none-any.whl/cartridge/shop/utils.py | import hmac
from hashlib import sha512 as digest
from locale import LC_MONETARY
from locale import Error as LocaleError
from locale import setlocale
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import gettext as _
from mezzanine.conf import settings
from mezzanine.utils.importi... | PypiClean |
/Flask-Ask-alphavideo-2.1.0.tar.gz/Flask-Ask-alphavideo-2.1.0/docs/_themes/flask_theme_support.py | from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
class FlaskyStyle(Style):
background_color = "#f8f8f8"
default_style = ""
styles = {
# No corresponding class for the follow... | PypiClean |
/MI_RLMS_MO-0.0.1-py3-none-any.whl/MI_RLMS_MO.py |
def summarize(input_eng):
try:
import requests
from bs4 import BeautifulSoup
from googletrans import Translator
import warnings
warnings.filterwarnings("ignore")
import warnings,logging
warnings.simplefilter('ignore')
logging.disable(logging.WARNING)... | PypiClean |
/DiPAS-2.0.tar.gz/DiPAS-2.0/docs/source/examples/transfer_line.ipynb | # Beamline Quadrupole Tuning
The beamline consists of 21 quadrupoles whose strength will be varied in order to fulfill the following optimization targets:
* Beam spot size @ target position: $\sigma_x \leq 500\,\mu m, \sigma_y \leq 500\,\mu m$
* Beam spot size @ beam dump position: $\sigma_x \leq 12\,mm, \sigma_y \le... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/methods/stream/change_stream.py | import asyncio
import logging
import shlex
from typing import Union
from ...exceptions import NodeJSNotRunning
from ...exceptions import NoMtProtoClientSet
from ...exceptions import NotInGroupCallError
from ...file_manager import FileManager
from ...mtproto import BridgedClient
from ...scaffold import Scaffold
from ..... | PypiClean |
/LibRecommender-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl/libreco/evaluation/evaluate.py | import functools
import math
import numbers
import numpy as np
import pandas as pd
from sklearn.metrics import log_loss, mean_absolute_error, r2_score, roc_auc_score
from .computation import (
build_eval_transformed_data,
compute_preds,
compute_probs,
compute_recommends,
)
from .metrics import (
L... | PypiClean |
/FanFicFare-4.27.0.tar.gz/FanFicFare-4.27.0/fanficfare/adapters/adapter_asexstoriescom.py |
# Copyright 2013 Fanficdownloader team, 2018 FanFicFare team
#
# 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 applica... | PypiClean |
/CNN4IE-0.1.9-py3-none-any.whl/cnn4ie/attention_augmented_cnn/model.py | import torch
import torch.nn.functional as F
import torch.nn as nn
from cnn4ie.util import crf
from cnn4ie.attention_augmented_cnn.attn_aug_cnn import AugmentedConv
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
class Encoder(nn.Module):
def __init__(self, emb_dim, hid_dim, n_layers, kernel... | PypiClean |
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/resolve/test/pathfilter.js | var path = require('path');
var test = require('tape');
var resolve = require('../');
var resolverDir = path.join(__dirname, '/pathfilter/deep_ref');
var pathFilterFactory = function (t) {
return function (pkg, x, remainder) {
t.equal(pkg.version, '1.2.3');
t.equal(x, path.join(resolverDir, 'node_... | PypiClean |
/EMalign-1.0.5.tar.gz/EMalign-1.0.5/README.md | <h1>emalign</h1>
A algorithm for aligning rotation, reflection, and translation between volumes.
Current version: 1.0.5
Project's homepage: https://github.com/ShkolniskyLab/emalign
Date: 08/2023
Please cite the following paper when using this package:
Harpaz, Y., & Shkolnisky, Y. (2023). Three-dimensional alignm... | PypiClean |
/Makechr-1.5.tar.gz/Makechr-1.5/makechr/object_file_writer.py | import gen.valiant_pb2 as valiant
import StringIO
MAGIC_NUM = 7210303610482106886
class DataInfo(object):
def __init__(self):
self.clear()
def clear(self):
self.name = None
self.align = None
self.size = None
self.order = None
self.null_value = None
self.is_condensable = False
def... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/extensions/Safe.js | (function(d,c){var f="2.7.9";var a=MathJax.Hub.CombineConfig("Safe",{allow:{URLs:"safe",classes:"safe",cssIDs:"safe",styles:"safe",fontsize:"all",require:"safe"},sizeMin:0.7,sizeMax:1.44,lengthMax:3,safeProtocols:{http:true,https:true,file:true,javascript:false},safeStyles:{color:true,backgroundColor:true,border:true,c... | PypiClean |
/MeUtils-2023.8.29.13.9.44-py3-none-any.whl/meutils/np_utils.py |
from itertools import combinations
from collections import defaultdict
# ME
from meutils.pipe import *
# 分组
# np.array_split(range(6), 3)
# iteration_utilities.split
# iteration_utilities.grouper([1,2,3,4], 2) | xlist
# 展平
"""
l=[[1,2,3],[4,[5],[6,7]],[8,[9,[10]]]]*1000
from iteration_utilities import deepflatten
_... | PypiClean |
/Nbdler-3.0.3.tar.gz/Nbdler-3.0.3/nbdler/download.py | from concurrent.futures.thread import ThreadPoolExecutor
from nbdler.handler import (
SpeedAdjuster,
AIOReaderWriter,
BlockSlicer,
FileTempData,
ClientWorker,
URIStatusManager,
GatherException,
h, Handlers)
from .client import get_policy, ClientPolicy
from .version import VERSION
from .u... | PypiClean |
/MapProxy-1.16.0.tar.gz/MapProxy-1.16.0/mapproxy/response.py | import hashlib
from mapproxy.util.times import format_httpdate, parse_httpdate, timestamp
from mapproxy.compat import PY2, text_type, iteritems
class Response(object):
charset = 'utf-8'
default_content_type = 'text/plain'
block_size = 1024 * 32
def __init__(self, response, status=None, content_type=No... | PypiClean |
/GearMess_client-0.3.2-py3-none-any.whl/client_src/client.py | import socket
from time import sleep
from client_src.JIM.JIMs import Jim, MessageConverter
from client_src.JIM.jim_config import *
from client_src.client_storage_handler import ClientStorageHandler
from client_src.crypto.crypto import *
BUF_SIZE = 1024
ADDR = 'localhost'
PORT = 7777
class Client:
def __init__(s... | PypiClean |
/Copreus-0.4.0.tar.gz/Copreus-0.4.0/copreus/drivermanager/driverfactory.py | import copreus.drivers
import importlib
import pelops.logging.mylogger as mylogger
class DriverFactory:
factory_logger = None
mqtt_client = None
logger = None
spi_lock = None
i2c_lock = None
#driver = None
def __init__(self, mqtt_client=None, logger=None, spi_lock=None, i2c_lock=None):
... | PypiClean |
/CANberry-0.4.tar.gz/CANberry-0.4/canberry/utils.py | from __future__ import print_function, absolute_import, division
import os
import math
import time
try:
from configparser import ConfigParser
except ImportError:
from ConfigParser import SafeConfigParser as ConfigParser
from .can_utils import Service
__author__ = 'Florian Wilhelm'
__copyright__ = 'Florian W... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/build/inline_copy/lib/scons-4.4.0/SCons/Tool/clang.py | # Based on SCons/Tool/gcc.py by Paweł Tomulik 2014 as a separate tool.
# Brought into the SCons mainline by Russel Winder 2017.
import os
import re
import subprocess
import SCons.Util
import SCons.Tool.cc
from SCons.Tool.clangCommon import get_clang_install_dirs
from SCons.Tool.MSCommon import msvc_setup_env_once
c... | PypiClean |
/Cuttlefish-0.3.tar.gz/Cuttlefish-0.3/README.txt | Cuttlefish is an example project using the Bottle flyweight Web
framework and the Mako template engine in Python. It's intended to run
on your desktop, and provide a lightweight search engine (using grep)
for your source code.
[[[NOTE]]]
This is an early development alpha. It basically works, but there are
many known ... | PypiClean |
/JumpScale-core-6.0.0.tar.gz/JumpScale-core-6.0.0/lib/JumpScale/core/pmtypes/base.py | import inspect
import types
import operator
import json
from JumpScale import j
from JumpScale.core.baseclasses.dirtyflaggingmixin import \
DIRTY_PROPERTIES_ATTRIBUTE, DIRTY_AFTER_LAST_SAVE_ATTRIBUTE
#Needed to handle default values
#We want NO_DEFAULT and NO_VALUE as some special instances because we can't
#... | PypiClean |
/Camelot-13.04.13-gpl-pyqt.tar.gz/Camelot-13.04.13-gpl-pyqt/camelot/core/orm/fields.py | from sqlalchemy import schema, orm
from . properties import Property
from . statements import ClassMutator
"""
This module provides support for defining the fields (columns) of your
entities. This module sole reason of existence is to keep existing Elixir
model definitions working. Do not use it when writing new cod... | PypiClean |
/D-Analyst-1.0.6.tar.gz/D-Analyst-1.0.6/main/analyst/visuals/mesh_visual.py | import numpy as np
from .visual import Visual
from analyst import get_color
__all__ = ['normalize',
'projection_matrix', 'rotation_matrix', 'scale_matrix',
'translation_matrix', 'camera_matrix',
'MeshVisual']
def normalize(x):
"""Normalize a vector or a set of vectors.
... | PypiClean |
/ImSwitch-2.0.0.tar.gz/ImSwitch-2.0.0/imswitch/imcontrol/controller/controllers/AlignAverageController.py | import numpy as np
from ..basecontrollers import LiveUpdatedController
class AlignAverageController(LiveUpdatedController):
""" Linked to AlignAverageWidget."""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.roiAdded = False
# Connect CommunicationChanne... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/admin/util.py | from __future__ import unicode_literals
import datetime
import decimal
from django.db import models
from django.db.models.constants import LOOKUP_SEP
from django.db.models.deletion import Collector
from django.db.models.related import RelatedObject
from django.forms.forms import pretty_name
from django.utils import f... | PypiClean |
/C-Telethon-1.28.5.tar.gz/C-Telethon-1.28.5/telethon/tl/alltlobjects.py |
from . import types, functions
LAYER = 158
tlobjects = {
0x7f3b18ea: types.InputPeerEmpty,
0x7da07ec9: types.InputPeerSelf,
0x35a95cb9: types.InputPeerChat,
0xdde8a54c: types.InputPeerUser,
0x27bcbbfc: types.InputPeerChannel,
0xa87b0a1c: types.InputPeerUserFromMessage,
0xbd2a0840: types.I... | PypiClean |
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/tailwindcss/lib/postcss-plugins/nesting/README.md | # tailwindcss/nesting
This is a PostCSS plugin that wraps [postcss-nested](https://github.com/postcss/postcss-nested) or [postcss-nesting](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting) and acts as a compatibility layer to make sure your nesting plugin of choice properly understands Tai... | PypiClean |
/Bayesian2D-0.3.1.tar.gz/Bayesian2D-0.3.1/README.md | # Bayesian2D
This package implements Bayesian optimization in Python for any 2D function. It uses Gaussian regression to create a surrogate function and the Maximum Probability of Improvement aquisition function to pick points to evaluate, thus finding the specified extremum of the function in only a few hundred evalu... | PypiClean |
/OBP_reliability_pillar_4-0.0.14-py3-none-any.whl/OBP_reliability_pillar_4/elastic_beanstalk/enhanced_health_reporting_enabled.py | import botocore
import logging
from botocore.exceptions import ClientError
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger()
def enhanced_health_reporting_enabled(self) -> dict:
"""
:param self:
:return:
"""
logger.info(" ---Inside elastic_beanstalk :: enhanced_health_reportin... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/paper-toolbar/.github/ISSUE_TEMPLATE.md | <!-- Instructions: https://github.com/PolymerElements/paper-toolbar/CONTRIBUTING.md#filing-issues -->
### Description
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
### Expected outcome
<!-- Example: The page stays the same color. -->
### Actual outcome
<!-- Example: The page t... | PypiClean |
/Automancy-0.5.12.tar.gz/Automancy-0.5.12/automancy/elementals/molecules/slider.py |
from time import sleep
from automancy.core import AutomancyChain, Elemental
class Slider(Elemental):
""" Handler for slider objects (E.G., video volume, video progress bar) """
def __init__(self, locator: str, human_name: str, system_name: str, orientation: str, boundary_buffer: int = 0, position_attribute:... | PypiClean |
/FStore-1.0.2-py3-none-any.whl/fstore/binary_search_tree.py | from collections import deque
class Node:
"""tree element"""
def __init__(self, key, val):
self.key = key
self.val = val
self.left = None
self.right = None
def search(root, key):
"""search tree by key"""
if not root:
return None
if key < root.key:
re... | PypiClean |
/Geosis-0.0.1.tar.gz/Geosis-0.0.1/README.md | <h1 align="center">
<br>
<a href="https://github.com/mohamed-hachaichi/Geosis"><img src="https://github.com/mohamed-hachaichi/app/blob/main/Geosis.png" alt="" width="200"></a>
<br>
Geosis
<br>
</h1>
<h4 align="center">A powerful geographic analysis tool on top of <a href="https://www.python.org/" target="_bl... | PypiClean |
/Editra-0.7.20.tar.gz/Editra-0.7.20/src/syntax/_xtext.py | __author__ = "Igor Dejanovic <igor.dejanovic@gmail.com>"
__svnid__ = "$Id: _xtext.py 70229 2012-01-01 01:27:10Z CJP $"
__revision__ = "$Revision: 70229 $"
#-----------------------------------------------------------------------------#
# Imports
import wx.stc as stc
from pygments.lexer import RegexLexer, include, bygro... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/@types/node/ts4.8/vm.d.ts | declare module 'vm' {
interface Context extends NodeJS.Dict<any> {}
interface BaseOptions {
/**
* Specifies the filename used in stack traces produced by this script.
* Default: `''`.
*/
filename?: string | undefined;
/**
* Specifies the line number of... | PypiClean |
/CeLEryPy-1.1.1-py3-none-any.whl/CeLEry/util.py | import pandas as pd
import numpy as np
import scipy
import os
import scanpy as sc
from tqdm import tqdm
# from skimage.metrics import structural_similarity as ssim
# import pickle
from math import floor
import json
from sklearn.metrics import confusion_matrix
from sklearn.metrics import classification_report
# from sea... | PypiClean |
/EOxServer-1.2.12-py3-none-any.whl/eoxserver/services/ows/wps/parameters/__init__.py |
from .base import Parameter
from .literaldata import LiteralData
from .complexdata import (
ComplexData, CDBase, CDObject, CDTextBuffer, CDByteBuffer,
CDAsciiTextBuffer, CDFileWrapper, CDFile, CDPermanentFile,
)
from .formats import (
Format, FormatText, FormatXML, FormatJSON,
FormatBinaryRaw, FormatBi... | PypiClean |
/Kallithea-0.7.0.tar.gz/Kallithea-0.7.0/kallithea/lib/indexers/daemon.py | import logging
import os
import traceback
from shutil import rmtree
from time import mktime
from tg import config
from whoosh.index import create_in, exists_in, open_dir
from whoosh.qparser import QueryParser
from kallithea.lib import celerylib
from kallithea.lib.conf import INDEX_EXTENSIONS, INDEX_FILENAMES
from kal... | PypiClean |
/Haus-0.1.0.tar.gz/Haus-0.1.0/haus/components/abstract.py |
try:
from functools import wraps, update_wrapper, \
WRAPPER_ASSIGNMENTS, WRAPPER_UPDATES
except ImportError, ie:
WRAPPER_ASSIGNMENTS = ('__module__', '__name__', '__doc__')
WRAPPER_UPDATES = ('__dict__',)
def update_wrapper(wrapper, wrapped, assigned=None, updated=None):
... | PypiClean |
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/ssn/nl_BE/__init__.py | from .. import Provider as SsnProvider
"""
For more info on rijksregisternummer, see https://nl.wikipedia.org/wiki/Rijksregisternummer
Dutch/French only for now ...
"""
class Provider(SsnProvider):
def ssn(self) -> str:
"""
Returns a 11 digits Belgian SSN called "rijksregisternummer" as a string
... | PypiClean |
/ChatPDF-2023.4.25.9.25.56-py3-none-any.whl/chatllm/uis/gradio_ui.py |
import gradio as gr
import mdtex2html
########################################################################
from chatllm.utils import llm_load, llm_load4chat
from chatllm.applications import Chat
MODEL = '/Users/betterme/PycharmProjects/AI/CHAT_MODEL/chatglm'
chat_func = llm_load4chat(MODEL, device='mps')
qa = ... | PypiClean |
/Auto_FOX-1.0.0b1-py3-none-any.whl/FOX/recipes/psf.py | from __future__ import annotations
import math
import warnings
from types import MappingProxyType
from typing import (Union, Iterable, Optional, Callable, Mapping, Type, Iterator, TypeVar,
Any, Tuple, List, cast, Sequence, Dict, TYPE_CHECKING)
from itertools import chain
from collections import abc... | PypiClean |
/Firmant-0.2.3a1.tar.gz/Firmant-0.2.3a1/firmant/utils/exceptions.py | import os
import tempfile
import traceback
def log_uncaught_exceptions(func, log, message, save_traceback=False):
'''Catch and log exceptions of ``func``.
Returns True if the function succeeds without throwing an exception.
`message` will be written to `log` if an exception is thrown, and False is
r... | PypiClean |
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/js/tiny_mce/plugins/table/editor_plugin_src.js | (function(tinymce) {
var each = tinymce.each;
// Checks if the selection/caret is at the start of the specified block element
function isAtStart(rng, par) {
var doc = par.ownerDocument, rng2 = doc.createRange(), elm;
rng2.setStartBefore(par);
rng2.setEnd(rng.endContainer, rng.endOffset);
elm = doc.createE... | PypiClean |
/OTLModel/Classes/Onderdeel/Camera.py | from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut
from OTLMOW.OTLModel.Classes.ImplementatieElement.AIMNaamObject import AIMNaamObject
from OTLMOW.OTLModel.Datatypes.BooleanField import BooleanField
from OTLMOW.OTLModel.Datatypes.DtcCameraBeeldverwerking import DtcCameraBeeldverwerking
from OTLMOW.OTLMo... | PypiClean |
/MarkDo-0.3.0.tar.gz/MarkDo-0.3.0/markdo/static/bower/codemirror/lib/util/formatting.js | (function() {
CodeMirror.extendMode("css", {
commentStart: "/*",
commentEnd: "*/",
newlineAfterToken: function(type, content) {
return /^[;{}]$/.test(content);
}
});
CodeMirror.extendMode("javascript", {
commentStart: "/*",
commentEnd: "*/",
// FIXME semicolons inside of for
... | PypiClean |
/Ibidas-0.1.26.tar.gz/Ibidas-0.1.26/ibidas/itypes/detector.py | import numpy
import array
from collections import defaultdict
import operator
import platform
from itertools import chain
import rtypes
from ..constants import *
from ..utils import sparse_arrays, module_types
from ..utils.missing import *
import re
_delay_import_(globals(),"dimensions")
_delay_import_(globals(),"dim... | PypiClean |
/node_managment_application-0.0.1.tar.gz/node_managment_application-0.0.1/nms_app/static/admin/js/nav_sidebar.js | 'use strict';
{
const toggleNavSidebar = document.getElementById('toggle-nav-sidebar');
if (toggleNavSidebar !== null) {
const navSidebar = document.getElementById('nav-sidebar');
const main = document.getElementById('main');
let navSidebarIsOpen = localStorage.getItem('django.admin.navS... | PypiClean |
/GoogleLocationUtility-0.1.0a1.tar.gz/GoogleLocationUtility-0.1.0a1/docs/Location Processing.md | #### Function Pages
[Location Reporting](/docs/Location%20Reporting.md)
• [Location Filtering](/docs/Location%20Filtering.md)
• [geoTag and geoStrip](/docs/geoTag.md)
• [Location Mapping](/docs/Mapping.md)
[Getting Started](/docs#getting-started)
# Location Processing
[location_parse.py](/src/GLU/location_parse.py)... | PypiClean |
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/semver/classes/semver.js | const debug = require('../internal/debug')
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')
const { safeRe: re, t } = require('../internal/re')
const parseOptions = require('../internal/parse-options')
const { compareIdentifiers } = require('../internal/identifiers')
class SemVer {
construct... | PypiClean |
/JLpy_utils_package-2.0.5-py3-none-any.whl/JLpy_utils_package/img.py | import numpy as np
import skimage, skimage.transform, skimage.restoration, skimage.measure, skimage.feature
import matplotlib.pyplot as plt
import matplotlib as mpl
import sys
try:
import cv2
except ImportError:
sys.exit("""You need cv2. run: '!pip install opencv-python' """)
# from transform import resc... | PypiClean |
/Housing_Price_Prediction-0.4-py3-none-any.whl/house_pricing/ingest_data.py | 0~"""
This module contains helper functions for ingestion of data.
Running this standalone downloads the housing data and stores preprocessed copies of it in the specified folders.
"""
import os
import tarfile
from argparse import ArgumentParser, Namespace
from logging import Logger
import numpy as np
import pandas as... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/typescript/lib/protocol.d.ts | declare namespace ts.server.protocol {
const enum CommandTypes {
JsxClosingTag = "jsxClosingTag",
Brace = "brace",
BraceCompletion = "braceCompletion",
GetSpanOfEnclosingComment = "getSpanOfEnclosingComment",
Change = "change",
Close = "close",
/** @deprecated... | PypiClean |
/FileCrawler-0.1.8.tar.gz/FileCrawler-0.1.8/filecrawler/filecrawler.py | import codecs
import hashlib
import io
import shutil
import tempfile
from .libs.process import Process
try:
from .config import Configuration
except (ValueError, ImportError) as e:
raise Exception('You may need to run filecrawler from the root directory (which includes README.md)', e)
import sys, datetime, ... | PypiClean |
/HanabIRC-1.2.05.tar.gz/HanabIRC-1.2.05/hanabIRC/hanabot.py | import logging
import time
import string
import random
import sys
import os
import traceback
from collections import defaultdict
from itertools import chain, islice
from hanabi import Game
from game_history import game_history
from text_markup import irc_markup
from GameResponse import GameResponse
from irc.bot import... | PypiClean |
/HiNT-Package-2.2.8.tar.gz/HiNT-Package-2.2.8/HiNT/getGenomeRowSumsFromHiC.py | import numpy as np
from HiNT.straw import *
import os,sys
def get_chromInfo(chromlf):
chroms = []
infos = {}
inf = open(chromlf)
for line in inf:
line = line.strip().split('\t')
infos[line[0]] = int(line[1])
chroms.append(line[0])
return chroms,infos
def getSumPerChrom(i, j, hicfile, binsize, chroms, chrom... | PypiClean |
/JumpScale-core-6.0.0.tar.gz/JumpScale-core-6.0.0/lib/JumpScale/core/baseclasses/BaseType.py | from JumpScale import j
from JumpScale import j
from JumpScale.core.pmtypes.base import BaseType as TypeBaseType
def generate_init_properties(cls, attrs):
'''Generate a class __init_properties__ method
@param cls: Type to generate method for
@type cls: type
@param attrs: Class construction attributes... | PypiClean |
/ELLIPTIc-1.0.1-py3-none-any.whl/elliptic/Kernel/Context.py | from collections import defaultdict
from typing import Dict, List, Any, Union, Iterable
from abc import ABC, abstractmethod
class ContextException(Exception):
"""Exception raised when an error related to a Context operation occurs.
"""
class Context:
"""Defines a context for code generation.
A Cont... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.