id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/DoorPi-2.4.1.8.tar.gz/DoorPi-2.4.1.8/doorpi/sipphone/pjsua_lib/SipPhoneAccountCallBack.py |
import logging
logger = logging.getLogger(__name__)
logger.debug("%s loaded", __name__)
import threading
import datetime
import time
import os
import pjsua as pj
from doorpi import DoorPi
from SipPhoneCallCallBack import SipPhoneCallCallBack as CallCallback
class SipPhoneAccountCallBack(pj.AccountCallback):
sem... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/full/plugins/a11yhelp/dialogs/lang/lv.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang("a11yhelp","lv",{title:"Pieejamības instrukcija",contents:"Palīdzības saturs. Lai aizvērtu ciet šo dialogu nospiediet ESC.",legen... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/full/lang/gl.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/license
*/
CKEDITOR.lang['gl']={"editor":"Editor de texto mellorado","editorPanel":"Panel do editor de texto mellorado","common":{"editorHelp":"Prema ALT 0 para obter axuda","browseServe... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ace/mode-curly.js | ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var DocCommentHighlightRule... | PypiClean |
/EagleWrapper-1.1.1-py3-none-any.whl/eaglewrapper/eagle.py | from typing import Optional, List, Dict, Any
import datetime
from pathlib import Path
import json
import concurrent.futures
import requests
from loguru import logger
class ImageData:
"""
A class to represent image data for adding images to Eagle.
Attributes:
url (str): Required. The URL of the ima... | PypiClean |
/Braindecode-0.7.tar.gz/Braindecode-0.7/braindecode/datasets/bcicomp.py |
import glob
import os
import os.path as osp
from os import remove
from shutil import unpack_archive
import mne
import numpy as np
from mne.utils import verbose
from scipy.io import loadmat
from braindecode.datasets import BaseDataset, BaseConcatDataset
DATASET_URL = 'https://stacks.stanford.edu/file/druid:zk881ps05... | PypiClean |
/OASYS1-XOPPY-1.2.10.tar.gz/OASYS1-XOPPY-1.2.10/orangecontrib/xoppy/widgets/optics/xfh.py | import sys
import numpy
from PyQt5.QtWidgets import QApplication
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui, congruence
from oasys.widgets.exchange import DataExchangeObject
from xoppylib.crystals.tools import bragg_calc, bragg_calc2, crystal_fh
f... | PypiClean |
/AHRS-0.3.1-py3-none-any.whl/ahrs/filters/oleq.py | import numpy as np
from ..common.mathfuncs import cosd, sind
class OLEQ:
"""
Optimal Linear Estimator of Quaternion
Parameters
----------
acc : numpy.ndarray, default: None
N-by-3 array with measurements of acceleration in in m/s^2
mag : numpy.ndarray, default: None
N-by-3 arra... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/components/sites/sites/nyaa.py | from urllib.parse import quote
import feedparser
from loguru import logger
from flexget import plugin
from flexget.components.sites.utils import normalize_unicode, torrent_availability
from flexget.entry import Entry
from flexget.event import event
from flexget.utils.tools import parse_filesize
logger = logger.bind(... | PypiClean |
/Harakiri-0.2.3-py3-none-any.whl/harakiri/client.py | from typing import Any, Dict, Optional
import aiohttp
from harakiri.model import (
SkillData,
AllSkillsData,
GalleryPost,
GalleryList,
)
class Client:
@staticmethod
async def get(path: str, params: Optional[Dict[str, Any]] = None):
url = "http://manjiapi.ombe.xyz" + path
async ... | PypiClean |
/MolScribe-1.1.1.tar.gz/MolScribe-1.1.1/molscribe/augment.py | import albumentations as A
from albumentations.augmentations.geometric.functional import safe_rotate_enlarged_img_size, _maybe_process_in_chunks, \
keypoint_rotate
import cv2
import math
import random
import numpy as np
def safe_rotate(
img: np.ndarray... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/angular-sanitize.min.js | (function(n,h,p){'use strict';function E(a){var d=[];s(d,h.noop).chars(a);return d.join("")}function g(a){var d={};a=a.split(",");var c;for(c=0;c<a.length;c++)d[a[c]]=!0;return d}function F(a,d){function c(a,b,c,l){b=h.lowercase(b);if(t[b])for(;f.last()&&u[f.last()];)e("",f.last());v[b]&&f.last()==b&&e("",b);(l=w[b]||!... | PypiClean |
/Flask-Ink-3.1.10.tar.gz/Flask-Ink-3.1.10/flask_ink/static/js/ink.tooltip.js | Ink.createModule('Ink.UI.Tooltip', '1', ['Ink.UI.Aux_1', 'Ink.Dom.Event_1', 'Ink.Dom.Element_1', 'Ink.Dom.Selector_1', 'Ink.Util.Array_1', 'Ink.Dom.Css_1', 'Ink.Dom.Browser_1'], function (Aux, InkEvent, InkElement, Selector, InkArray, Css) {
'use strict';
/**
* @class Ink.UI.Tooltip
* @constructor
... | PypiClean |
/Jinja-1.2.tar.gz/Jinja-1.2/jinja/parser.py | from jinja import nodes
from jinja.datastructure import StateTest
from jinja.exceptions import TemplateSyntaxError
from jinja.utils import set
__all__ = ['Parser']
# general callback functions for the parser
end_of_block = StateTest.expect_token('block_end',
msg='expected end o... | PypiClean |
/MSM_PELE-1.1.1-py3-none-any.whl/AdaptivePELE/AdaptivePELE/freeEnergies/cluster.py | from __future__ import absolute_import, division, print_function, unicode_literals
import os
import numpy as np
import glob
import pyemma.coordinates as coor
from pyemma.coordinates.clustering import AssignCenters
import scipy
class Cluster:
def __init__(self, numClusters, trajectoryFolder, trajectoryBasename, st... | PypiClean |
/GaugeRnR-0.6.0.tar.gz/GaugeRnR-0.6.0/README.md | # Gauge R&R
[](https://github.com/owodunni/GaugeRnR)
[](https://pypi.org/project/GaugeRnR/)
[](https://github.com/owodunn... | PypiClean |
/BoxKit-2023.6.7.tar.gz/BoxKit-2023.6.7/boxkit/library/_region.py | class Region: # pylint: disable=too-few-public-methods, disable=too-many-instance-attributes
"""Base class for a Region."""
type_ = "base"
def __init__(self, blocklist, **attributes):
"""Initialize the Region object and allocate the data.
Parameters
----------
blocklist ... | PypiClean |
/Golmorich-1.2.0.1-py3-none-any.whl/Golmorich-1.2.0.1.dist-info/LICENSE.md | GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Pream... | PypiClean |
/FastNLP-1.0.1.tar.gz/FastNLP-1.0.1/fastNLP/envs/set_env_on_import.py | import os
import sys
from .env import *
import datetime
__all__ = []
def remove_local_rank_in_argv():
"""
通过 torch.distributed.launch 启动的时候,如果没有加入参数 --use_env ,pytorch 会默认通过 rank 注入 rank,这就
要求代码中必须有能够 parse rank 的parser,这里将 rank 删除掉,防止后续报错。
:return:
"""
index = -1
for i, v in enumerate(sy... | PypiClean |
/MNN_FMA-1.0.1-cp27-cp27m-manylinux2010_x86_64.whl/MNN/tools/mnn_fb/ReductionParam.py |
# namespace: MNN
import flatbuffers
class ReductionParam(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsReductionParam(cls, buf, offset):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ReductionParam()
x.Init(buf, n + offset)
return x
... | PypiClean |
/GraphQL_core_next-1.1.1-py3-none-any.whl/graphql/language/__init__.py | from .source import Source
from .location import get_location, SourceLocation
from .print_location import print_location, print_source_location
from .token_kind import TokenKind
from .lexer import Lexer
from .parser import parse, parse_type, parse_value
from .printer import print_ast
from .visitor import (
v... | PypiClean |
/MeetupAPI-1.5.8-py3-none-any.whl/meetup_api/meetup_functions/events.py | import time
from meetup_api.log import Log
class MeetupEvents():
def __init__(self,
meetup_class,
results_per_page=200,
pages='all',
maximum_num_events=10000,
fields=['group_key_photo', 'series', 'simple_html_description', 'rsvp... | PypiClean |
/BrickBreakerGame-0.2.6.tar.gz/BrickBreakerGame-0.2.6/BrickBreaker/brick_breaker.py | import pygame
from BrickBreaker import *
from BrickBreaker.Scenes import *
from BrickBreaker.Shared import *
class BrickBreaker:
def __init__(self):
self._lives = 5
self._score = 0
self._bonus = 1
self._level = Level(self)
self._level.load_random()
self._pad = P... | PypiClean |
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas/numerical/isolines/isolines_numpy.py | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from numpy import asarray
from numpy import meshgrid
from numpy import linspace
from numpy import amax
from numpy import amin
from scipy.interpolate import griddata
import matplotlib.pyplot as plt
__all__ = [... | PypiClean |
/Office365-REST-Python-Client-2.4.3.tar.gz/Office365-REST-Python-Client-2.4.3/office365/sharepoint/sharing/links/info.py | from office365.runtime.client_value import ClientValue
from office365.runtime.client_value_collection import ClientValueCollection
from office365.sharepoint.sharing.invitation.link import LinkInvitation
from office365.sharepoint.sharing.principal import Principal
class SharingLinkInfo(ClientValue):
def __init__(... | PypiClean |
/Django-Photofile-0.5.0.zip/Django-Photofile-0.5.0/photofile/metadata.py | import os
import time
import datetime
import re
from PIL import Image
from PIL.ExifTags import TAGS, GPSTAGS
from PIL import IptcImagePlugin
try:
import pyexiv2
PYEXIV2_SUPPORT = True
except ImportError:
PYEXIV2_SUPPORT = False
# Credits http://eran.sandler.co.il/2011/05/20/extract-gps-latitude-and-longit... | PypiClean |
/M2CryptoWin32-0.21.1-3.tar.gz/M2CryptoWin32-0.21.1-3/M2Crypto/ASN1.py | import time, datetime
import BIO
import m2
MBSTRING_FLAG = 0x1000
MBSTRING_ASC = MBSTRING_FLAG | 1
MBSTRING_BMP = MBSTRING_FLAG | 2
class ASN1_Integer:
m2_asn1_integer_free = m2.asn1_integer_free
def __init__(self, asn1int, _pyfree=0):
self.asn1int = asn1int
self._pyfree = _pyfree
... | PypiClean |
/Mopidy-Plex-0.1.0b.tar.gz/Mopidy-Plex-0.1.0b/README.rst | ****************************
Mopidy-Plex
****************************
.. image:: https://img.shields.io/pypi/v/Mopidy-Plex.svg?style=flat
:target: https://pypi.python.org/pypi/Mopidy-Plex/
:alt: Latest PyPI version
.. image:: https://img.shields.io/pypi/dm/Mopidy-Plex.svg?style=flat
:target: https://pypi.... | PypiClean |
/HPCCSystemsECLDOc-2.0.0.tar.gz/HPCCSystemsECLDOc-2.0.0/ecldoc/Formats/TXT/genTXT.py | import os
import re
from lxml import etree
from ecldoc.Utils import write_to_file
from ecldoc.Utils import joinpath, dirname
###################################################################
from ecldoc.Constants import TEMPLATE_DIR
TXT_TEMPLATE_DIR = joinpath(TEMPLATE_DIR, 'txt')
################################... | PypiClean |
/Grid2Op-1.9.3-py3-none-any.whl/grid2op/Rules/rulesByArea.py |
import numpy as np
from itertools import chain
import warnings
import copy
from grid2op.Rules.BaseRules import BaseRules
from grid2op.Rules.LookParam import LookParam
from grid2op.Rules.PreventReconnection import PreventReconnection
from grid2op.Rules.PreventDiscoStorageModif import PreventDiscoStorageModif
from grid... | PypiClean |
/CGATReport-0.9.1.tar.gz/CGATReport-0.9.1/doc/Tutorials.rst | .. _Tutorials:
*********
Tutorials
*********
The tutorials provide step-by-step introductions to the
main features of cgatreport.
Tutorials
=========
.. toctree::
:maxdepth: 2
Tutorial1.rst
Tutorial2.rst
Tutorial3.rst
Tutorial4.rst
Tutorial5.rst
Tutorial6.rst
Tutorial7.rst
Tutori... | PypiClean |
/Langton-project-0.3.tar.gz/Langton-project-0.3/Langton-project_interface/main.py | import turtle
import random
""" Global variable """
visited_global = {}
orientation = [(0,1),(1,0),(0,-1),(-1,0)]
class Ant:
""" Creation of an ant on the screen """
global visited_global
ant_speed = 0
def __init__(self, ants_data, size_factor):
self.visited_local = [] # list of coordinat... | PypiClean |
/DE_Parametros-0.0.16.2.tar.gz/DE_Parametros-0.0.16.2/DE_Parametros.py | import datetime as dt
import DE_DataBase as D
import DE_LibUtil as U
import pandas as pd
import json
import inspect
import ast
import datetime as dt
class PARAMETROS:
NAME_CLASS = inspect.stack()[0].function
def __init__(self, **kwargs):
msg = None
function_name = inspect.stack()[0].function
... | PypiClean |
/Custom%20Accounts%20Django-0.1.1560515473.tar.gz/Custom Accounts Django-0.1.1560515473/custom_accounts_django/views.py | from urllib.parse import urlparse
from django.contrib import auth
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.forms import AuthenticationForm
from django.shortcuts import render, redirect, render_to_response
# Create your views here.
# helper method to generate a context csr... | PypiClean |
/Electrum-Zcash-Random-Fork-3.1.3b5.tar.gz/Electrum-Zcash-Random-Fork-3.1.3b5/gui/qt/address_list.py | import webbrowser
from electrum_zcash.i18n import _
from electrum_zcash.util import block_explorer_URL
from electrum_zcash.plugins import run_hook
from electrum_zcash.bitcoin import is_address
from .util import *
class AddressList(MyTreeWidget):
filter_columns = [0, 1, 2, 3] # Type, Address, Label, Balance
... | PypiClean |
/JumpScale-core-6.0.0.tar.gz/JumpScale-core-6.0.0/lib/JumpScale/core/actors/ActorObject.py | from JumpScale import j
import struct
import hashlib
import yaml
import json
from pymodel.serializers import YamlSerializer
class ActorObject(object):
"""
ActorObject
"""
_DATA_TYPE_ID = 2
_KEY_PREFIX = 'ActorObject_'
def __init__(self, service):
"""
ActorObject constructor
... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/mdnd/AreaManager.js | define("dojox/mdnd/AreaManager",["dojo/_base/kernel","dojo/_base/declare","dojo/_base/connect","dojo/_base/window","dojo/_base/array","dojo/query","dojo/_base/html","./Moveable"],function(_1){
var am=_1.declare("dojox.mdnd.AreaManager",null,{autoRefresh:true,areaClass:"dojoxDndArea",dragHandleClass:"dojoxDragHandle",co... | PypiClean |
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/fipy/matrices/pysparseMatrix.py | from __future__ import unicode_literals
from builtins import range
__docformat__ = 'restructuredtext'
__all__ = []
from pysparse import spmatrix
from fipy.tools import numerix
from fipy.matrices.sparseMatrix import _SparseMatrix
class _PysparseMatrix(_SparseMatrix):
def __init__(self, matrix):
"""Creat... | PypiClean |
/Fragmenstein-0.12.11.tar.gz/Fragmenstein-0.12.11/fragmenstein/victor/plip.py | import os
from pathlib import Path
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Draw
from rdkit.Chem import PandasTools
from functools import singledispatchmethod
from typing import Tuple, Dict, List, Union, Sequence, Optional, Any
from collections import Counter, defaultdict
from plip.... | PypiClean |
/Alarmageddon-1.1.2-py3-none-any.whl/alarmageddon/validations/validation.py |
from .exceptions import EnrichmentFailure, ValidationFailure
GLOBAL_NAMESPACE = "GLOBAL"
class Priority(object):
"""Priority levels that indicate how severe a validation failure is.
Validations have a priority that publishers use to determine whether
or not to publish in the case of failure.
"""
... | PypiClean |
/K_AIKO-0.5.2-py3-none-any.whl/kaiko/devices/engines.py | import time
import bisect
import functools
import contextlib
import dataclasses
import queue
import threading
import numpy
from ..utils import config as cfg
from ..utils import datanodes as dn
from ..utils import markups as mu
from . import terminals as term
from . import audios as aud
from . import clocks
class Moni... | PypiClean |
/KratosShallowWaterApplication-9.4-cp311-cp311-win_amd64.whl/KratosMultiphysics/ShallowWaterApplication/benchmarks/base_benchmark_process.py | import KratosMultiphysics as KM
import KratosMultiphysics.ShallowWaterApplication as SW
from KratosMultiphysics.kratos_utilities import GenerateVariableListFromInput
def Factory(settings, model):
if not isinstance(settings, KM.Parameters):
raise Exception("expected input shall be a Parameters object, enca... | PypiClean |
/Dulcinea-0.11.tar.gz/Dulcinea-0.11/lib/links.py | from datetime import datetime
from dulcinea.attachable import Attachable
from dulcinea.category import Category, Categorized, CategoryDatabase
from dulcinea.item import Item, ItemFolder
from dulcinea.spec import boolean, sequence, spec, init, add_getters_and_setters
from dulcinea.spec import specify, string
from dulcin... | PypiClean |
/Navycut-0.0.5.tar.gz/Navycut-0.0.5/navycut/cli/_exec_cli.py | from os import makedirs, listdir
from ..utils import path
from nc_console import Console
from ..utils.tools import (generate_random_secret_key,
snake_to_camel_case
)
from ..errors.misc import DirectoryAlreadyExistsError
__baseDir__ = path.abspath(__file__).parent.parent
def ... | PypiClean |
/Navix-0.3.10.tar.gz/Navix-0.3.10/README.md | # NAVIX: minigrid in JAX
[](https://www.repostatus.org/#wip)
[ is a python script/package which generates a reference genetic sequence (*.fasta) for use in sequence align... | PypiClean |
/NlvWxPython-4.2.0-cp37-cp37m-win_amd64.whl/wx/lib/plot/README.md | # wx.lib.plot
A simple, light-weight plotting package for wxPython Phoenix.
Based on wxPlotCanvas
Written by K. Hinsen, R. Srinivasan;
Ported to wxPython: Harm van der Heijden, Feb 1999
This is a simple, light weight plotting module that can be used with
Boa or easily integrated into your own wxPython application. T... | PypiClean |
/Atom_avatar-0.0.3.tar.gz/Atom_avatar-0.0.3/avatar/index.py | from io import BytesIO, StringIO
from random import randrange
from cairosvg import svg2png
from jinja2 import Template, Environment, FileSystemLoader
import json
import os
# a= open('male_back.json')
# b= a.read()
# print(type(json.loads(b)))
path=os.path.dirname(os.path.realpath(__file__))
load_base = FileSystemLoade... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/fs-minipass/node_modules/minipass/README.md | # minipass
A _very_ minimal implementation of a [PassThrough
stream](https://nodejs.org/api/stream.html#stream_class_stream_passthrough)
[It's very
fast](https://docs.google.com/spreadsheets/d/1oObKSrVwLX_7Ut4Z6g3fZW-AX1j1-k6w-cDsrkaSbHM/edit#gid=0)
for objects, strings, and buffers.
Supports `pipe()`ing (including ... | PypiClean |
/FFTA-0.3.5.1-py3-none-any.whl/ffta/pixel_utils/fitting.py | import numpy as np
from scipy.optimize import minimize
'''
Fit Equations
'''
def ddho_freq_product(t, A, tau1, tau2):
'''
Uses a product of exponentials as the functional form
:param t:
:type t:
:param A:
:type A:
:param tau1:
:type tau1:
:param tau2:
:type... | PypiClean |
/Cacophony-0.1.tar.gz/Cacophony-0.1/flask_cacophony/slack.py | import json
import uuid
import weakref
from .Cacophony import Command
from flask import request, make_response, abort
class Cacophony(object):
def __init__(self, cacophony, app=None):
self.commands = {}
self.app = app
self.cacophony = cacophony
if app is not None:
sel... | PypiClean |
/Gemtools-1.7.1.tar.gz/Gemtools-1.7.1/python/gem/reports.py |
from string import Template
import errno
import json
import locale
import os
import re
import shutil
import zipfile
#import matplotlib stuff
__plotlib_avail = False
try:
from pylab import *
from matplotlib.ticker import FuncFormatter
__plotlib_avail = True
except Exception, e:
pass
## set locale to g... | PypiClean |
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/address/hi_IN/__init__.py | from .. import Provider as AddressProvider
class Provider(AddressProvider):
city_formats = ("{{city_name}}",)
street_name_formats = (
"{{first_name}} {{last_name}}",
"{{last_name}}",
)
street_address_formats = ("{{building_number}} {{street_name}}",)
address_formats = (
... | PypiClean |
/Djblets-3.3.tar.gz/Djblets-3.3/djblets/cache/serials.py | import importlib
import itertools
import logging
import os
from django.conf import settings
logger = logging.getLogger(__name__)
def generate_media_serial():
"""Generate a media serial number for static media files.
The media serial number can be appended to a media filename in order to
make a URL tha... | PypiClean |
/OGRE-embed-0.0.3.tar.gz/OGRE-embed-0.0.3/src/OGRE/evaluation_tasks/link_prediction.py | try:
import cPickle as pickle
except:
import pickle
from numpy import linalg as LA
from sklearn import model_selection as sk_ms
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import f1_score, accuracy_score, roc_auc_score
from sklearn.multiclass import OneVsRestClassifier as oneVr
from sk... | PypiClean |
/LDB_Inventory_Barcode-0.14.1.tar.gz/LDB_Inventory_Barcode-0.14.1/docs/getting-started.rst | Getting started
===============
Installation
------------
The usual way is to use pip:
.. code:: shell
pip install python-barcode
Don't forget to add this to our app's dependencies.
If you'll be exporting to images (eg: not just SVG), you'll need the "images" extras:
.. code:: shell
pip install "python-... | PypiClean |
/django-chuck-0.2.3.tar.gz/django-chuck/modules/django-cms/project/apps/filer/migrations/0001_initial.py | from south.db import db
from django.db import models
from filer.models import *
class Migration:
def forwards(self, orm):
# Adding model 'Image'
db.create_table('filer_image', (
('file_ptr', orm['filer.Image:file_ptr']),
('_height', orm['filer.Image:_height']),... | PypiClean |
/LDB_Inventory_Barcode-0.14.1.tar.gz/LDB_Inventory_Barcode-0.14.1/ldb/inventory/barcode/ean.py | __docformat__ = "restructuredtext en"
from functools import reduce
from ldb.inventory.barcode.base import Barcode
from ldb.inventory.barcode.charsets import ean as _ean
from ldb.inventory.barcode.errors import (
IllegalCharacterError,
NumberOfDigitsError,
WrongCountryCodeError,
)
# EAN13 Specs (all sizes... | PypiClean |
/Mathics3-6.0.2.tar.gz/Mathics3-6.0.2/mathics/builtin/atomic/strings.py | import io
import re
import unicodedata
from binascii import hexlify, unhexlify
from heapq import heappop, heappush
from typing import Any, List
from mathics_scanner import TranslateError
from mathics.builtin.base import Builtin, Predefined, PrefixOperator, Test
from mathics.core.atoms import Integer, Integer0, Intege... | PypiClean |
/ChatSearch-2023.4.25.9.51.41-py3-none-any.whl/chatllm/utils.py | import torch
from transformers import AutoTokenizer, AutoModel, AutoConfig
from meutils.pipe import *
def auto_configure_device_map(num_gpus: int) -> Dict[str, int]:
# transformer.word_embeddings 占用1层
# transformer.final_layernorm 和 lm_head 占用1层
# transformer.layers 占用 28 层
# 总共30层分配到num_gpus张卡上
... | PypiClean |
/ModelicaLanguage-0.0.0a6-py3-none-any.whl/modelicalang/types/primitive.py | __all__ = (
# base type
"PrimitiveModelicaObject",
# concrete types
"PrimitiveReal",
"PrimitiveInteger",
"PrimitiveBoolean",
"PrimitiveString",
)
import numpy
import enum
from .. import util
from .abc import AbstractModelicaScalarClass
RealType = numpy.double
IntegerType = numpy.intc
Strin... | PypiClean |
/MikeT_messenger_server-0.4.1.tar.gz/MikeT_messenger_server-0.4.1/server/server/config_window.py | import os
from PyQt5.QtWidgets import QDialog, QLabel, QLineEdit, QPushButton, QFileDialog, QMessageBox
from PyQt5.QtCore import Qt
class ConfigWindow(QDialog):
"""Класс окно настроек."""
def __init__(self, config):
super().__init__()
self.config = config
self.initUI()
def initUI... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/crm/model/encoding_enum.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 |
/KTC_API-1.1.0.tar.gz/KTC_API-1.1.0/src/ktc_api/__init__.py | from typing import List
from requests import Session
from pydantic import parse_obj_as
from .types import ActualVersion, Branch, Course, Timetable, Teachers, TeacherTimetable, News, Post, Grade
class KTCClient:
"""Provides working around KTC API
"""
API_URL = 'http://mob.kansk-tc.ru'
def __init__(s... | PypiClean |
/CodeViking.Collections-0.10.tar.gz/CodeViking.Collections-0.10/codeviking/collections/dict/_multidict.py | from collections import namedtuple, Mapping, MutableMapping
__all__ = ['FrozenMultiDict', 'MultiDict']
class MultiDictBase(Mapping):
'''An abstract source. This is a read-only dict-like object that maps key
strings to a user-defined tuple of objects. The length of the tuple is the
same for all ids. ... | PypiClean |
/Euphorie-15.0.2.tar.gz/Euphorie-15.0.2/src/euphorie/deployment/setuphandlers.py | from euphorie.content.passwordpolicy import EuphoriePasswordPolicy
from euphorie.content.utils import REGION_NAMES
from plone import api
from plone.app.layout.navigation.interfaces import INavigationRoot
from plone.dexterity.utils import createContentInContainer
from Products.CMFCore.utils import getToolByName
from Pro... | PypiClean |
/Lentil-0.7.0.tar.gz/Lentil-0.7.0/lentil/wavefront.py | import copy
import numpy as np
import lentil.field
from lentil.field import Field
import lentil.fourier
import lentil.helper
class Wavefront:
"""A class representing a monochromatic wavefront.
Parameters
----------
wavelength : float
Wavelength in meters
pixelscale : float, optional
... | PypiClean |
/Brainfeatures-0.0.4.tar.gz/Brainfeatures-0.0.4/brainfeatures/feature_generation/frequency_feature_generator.py | import numpy as np
from brainfeatures.feature_generation.abstract_feature_generator import (
AbstractFeatureGenerator)
from brainfeatures.feature_generation import features_frequency
class FrequencyFeatureGenerator(AbstractFeatureGenerator):
""" computes features in the frequency domain implemented in featur... | PypiClean |
/AppDynamicsRESTx-0.4.22.tar.gz/AppDynamicsRESTx-0.4.22/docs/api/cmdline.rst | ## Command Line Options
This package includes a module called `appd.cmdline` that provides a simple command-line parser for use
in your scripts. You're not required to use it, but it allows you to point your script at different controllers
without making any code changes, and if you use it consistently, your scripts w... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/bower_components/app-layout/app-drawer/README.md | ##<app-drawer>
![app-drawer]
(http://app-layout-assets.appspot.com/assets/docs/app-drawer/drawer.gif)
app-drawer is a navigation drawer that can slide in from the left or right.
Example:
Align the drawer at the start, which is left in LTR layouts (default):
```html
<app-drawer opened></app-drawer>
```
Align... | PypiClean |
/GNN4LP-0.1.0-py3-none-any.whl/src/vgae/model.py | import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
class GraphConvolution(nn.Module):
def __init__(self, input_dim, output_dim, dropout, bias=False):
super(GraphConvolution, self).__init__()
self.input_dim = input_dim
self.output_dim = output_dim
self.weight... | PypiClean |
/Bis-Miner-3.11.1.tar.gz/Bis-Miner-3.11.0/Orange/canvas/canvas/scene.py | import logging
import itertools
from operator import attrgetter
from xml.sax.saxutils import escape
from AnyQt.QtWidgets import QGraphicsScene, QGraphicsItem
from AnyQt.QtGui import QPainter, QColor, QFont
from AnyQt.QtCore import (
Qt, QPointF, QRectF, QSizeF, QLineF, QBuffer, QObject, QSignalMapper,
QT_VER... | PypiClean |
/NURBS-Python-3.8.0.tar.gz/NURBS-Python-3.8.0/geomdl/Abstract.py | import abc
from warnings import warn
import math
class Curve(object):
""" Abstract class for all curves. """
__metaclass__ = abc.ABCMeta
def __init__(self):
self._rational = False # defines whether the curve is rational or not
self._degree = 0 # degree
self._knot_vector = None ... | PypiClean |
/Allegra-0.63.zip/Allegra-0.63/lib/async_chat.py |
# Copyright (C) 2005 Laurent A.V. Szyster
#
# This library is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# http://www.gnu.org/copyleft/gpl.html
#
# This library is distributed in the hope... | PypiClean |
/ILThermoPy-1.0.0-py3-none-any.whl/ilthermopy/search.py |
import typing as _typing
try:
from typing import Literal as _Literal
except ImportError:
from typing_extensions import Literal as _Literal
import pandas as _pd
import ilthermopy.errors as _err
import ilthermopy.requests as _req
import ilthermopy.data_structs as _ds
from ilthermopy.compound_list import _comp... | PypiClean |
/Analyzer-zero-0.3.tar.gz/Analyzer-zero-0.3/analyzerlibs/nerual/_nerual.py | from qlib.data.sql import SqlObjectEngine, Table
class Doc(Table):
title = 'title'
url = str
content = str
tag = str
class InLink(Table):
fromid = int
toid= int
strength = float
class OutLink(Table):
fromid = int
toid = int
strength = float
class Hidden(Table):
li... | PypiClean |
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/methods/groups/leave_group_call.py | import asyncio
from typing import Union
from ...exceptions import NoActiveGroupCall
from ...exceptions import NodeJSNotRunning
from ...exceptions import NoMtProtoClientSet
from ...exceptions import NotInGroupCallError
from ...mtproto import BridgedClient
from ...scaffold import Scaffold
from ...types import NotInGroup... | PypiClean |
/BatchJAX-0.1.0-py3-none-any.whl/batchjax/batcher.py | from typing import Callable, List
import objax
import jax
import jax.numpy as np
def vc_to_dict(vc):
"""Convert an objax var colection to python dict"""
all_vars = {}
for key in vc.keys():
all_vars[key] = np.array(vc[key].value)
return all_vars
def remove_prefix_from_dict_keys(d: dict, pre... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/DjangoAppCenter/simpleui/static/admin/simpleui-x/elementui/locale/lang/de.js | 'use strict';
exports.__esModule = true;
exports.default = {
el: {
colorpicker: {
confirm: 'OK',
clear: 'Leeren'
},
datepicker: {
now: 'Jetzt',
today: 'Heute',
cancel: 'Abbrechen',
clear: 'Leeren',
confirm: ... | PypiClean |
/Acolyte-0.0.1.tar.gz/Acolyte-0.0.1/acolyte/web/flow.py | from collections import OrderedDict
import simplejson as json
from acolyte.web import (
BaseWebHandler,
check_token
)
from acolyte.core.service import Result
from acolyte.core.job import ActionArg
class FlowMetaHandler(BaseWebHandler):
@check_token
def get(self, flow_meta_name):
"""查询某个FlowMe... | PypiClean |
/Editra-0.7.20.tar.gz/Editra-0.7.20/src/eclib/pstatbar.py | __author__ = "Cody Precord <cprecord@editra.org>"
__svnid__ = "$Id: pstatbar.py 66840 2011-02-03 21:05:28Z CJP $"
__revision__ = "$Revision: 66840 $"
__all__ = ["ProgressStatusBar",]
#--------------------------------------------------------------------------#
# Dependancies
import wx
#-------------------------------... | PypiClean |
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/@types/node/fs.d.ts | declare module 'fs' {
import * as stream from 'node:stream';
import { Abortable, EventEmitter } from 'node:events';
import { URL } from 'node:url';
import * as promises from 'node:fs/promises';
export { promises };
/**
* Valid types for path values in "fs".
*/
export type PathLike ... | PypiClean |
/Djblets-3.3.tar.gz/Djblets-3.3/docs/releasenotes/0.7.7.rst | ===========================
Djblets 0.7.7 Release Notes
===========================
**Release date**: December 16, 2012
djblets.datagrid
================
* Fixed a possible XSS exploit in datagrids.
Patch by Alexander Artemenko.
* Failures during rendering the datagrid now results in a traceback.
djblets.exte... | PypiClean |
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/js/tiny_mce/plugins/media/editor_plugin.js | (function(){var d=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),h=tinymce.makeMap(d.join(",")),b=tinymce.html.Node,f,a,g=tinymce.util.JSON,e;f=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/... | PypiClean |
/MTfit-1.0.6a5.tar.gz/MTfit-1.0.6a5/docs/source/mtplot.rst | *********************************
Plotting the Moment Tensor
*********************************
:mod:`MTfit` has a plotting submodule that can be used to represent the source. There are several different plot types, shown below, and MTplot can be used both from the command line, and from within the python interpreter.
... | PypiClean |
/Fluence-0.1.7-py3-none-any.whl/fluence/adaptive/entmax.py | __all__ = ["AlphaChooser", "EntmaxAlpha", "EntmaxBisectFunction", "entmax_bisect"]
import torch
from torch import nn
from torch.autograd import Function
class AlphaChooser(torch.nn.Module):
"""
It manages the alpha values in alpha-entmax
function.
"""
def __init__(self, head_count):
supe... | PypiClean |
/MLZ-DESC-1.2.tar.gz/MLZ-DESC-1.2/mlz_desc/utils/data.py | __author__ = 'Matias Carrasco Kind'
import numpy
import astropy.io.fits as pf
import random
import copy
from . import utils_mlz
import sys
def read_catalog(filename, myrank=0, check='no', get_ng='no', L_1=0, L_2=-1, A_T=''):
"""
Read the catalog, either for training or testing
currently accepting ascii ta... | PypiClean |
/EXOSIMS-3.1.6.tar.gz/EXOSIMS-3.1.6/README.md | 
Exoplanet Open-Source Imaging Mission Simulator
<a href="http://ascl.net/1706.010"><img src="https://img.shields.io/badge/ascl-1706.010-blue.svg?colorB=262255" alt="ascl:1706.010" /></a>

[ via system browser and get response URL. Currently supporting **Google Chrome** and **Safari** browsers. Built with *applescript* and [*osascript*](https://ss64.com/osx/osascript.html), only works on Mac OSX.
A lot more can be don... | PypiClean |
/Arpeggio-2.0.2.tar.gz/Arpeggio-2.0.2/arpeggio/__init__.py |
from __future__ import print_function, unicode_literals
import sys
from collections import OrderedDict
import codecs
import re
import bisect
from arpeggio.utils import isstr
import types
__version__ = "2.0.2"
if sys.version < '3':
text = unicode
else:
text = str
DEFAULT_WS = '\t\n\r '
NOMATCH_MARKER = 0
c... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/app-route/.github/ISSUE_TEMPLATE.md | <!-- Instructions: https://github.com/PolymerElements/app-route/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 turns... | PypiClean |
/FlaskBB-2.0.2.tar.gz/FlaskBB-2.0.2/flaskbb/management/views.py | import logging
import sys
from celery import __version__ as celery_version
from flask import __version__ as flask_version
from flask import (Blueprint, current_app, flash, jsonify, redirect, request,
url_for)
from flask.views import MethodView
from flask_allows import Not, Permission
from flask_babe... | PypiClean |
/flatlat-2.0.0.tar.gz/flatlat-2.0.0/src/Lat2D_mattb242/Lat2Dv2.py | import numpy as np
import pandas as pd
import csv
import copy
from math import atan2
from math import degrees
import matplotlib
import matplotlib.pyplot as plt
import tenpy
matplotlib.rcParams['text.usetex'] = True
'-----------------------------------------------------'
'UTILITY FUNCTIONS'
'------------------------... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_ss-sz.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 |
/ImSwitch-2.0.0.tar.gz/ImSwitch-2.0.0/imswitch/imcontrol/model/managers/detectors/JetsonCamManager.py | import numpy as np
from imswitch.imcommon.model import initLogger
from .DetectorManager import DetectorManager, DetectorAction, DetectorNumberParameter, DetectorListParameter
class JetsonCamManager(DetectorManager):
""" DetectorManager that deals with TheImagingSource cameras and the
parameters for frame ext... | PypiClean |
/fisinma-0.1.0.tar.gz/fisinma-0.1.0/docs/source/getting_started/examples/damped_oscillator.rst | Damped Oscillator
=================
A damped oscillator can be described by the second order ordinary differential equation
.. math::
:name: eq:damped-osci-ode
\ddot{x} + \mu(h)\dot{x} + \lambda x = 0
Here we additionally assume that the parameter :math:`\mu` depends on another input
variable :math:`h` via... | PypiClean |
/GraFT_Python-0.0.2-py3-none-any.whl/GraFT_Python/main_functions_graft.py | #%% Imports
from sklearn.neighbors import NearestNeighbors
from sklearn.decomposition import PCA
#from quadprog import solve_qp
from qpsolvers import solve_qp #https://scaron.info/doc/qpsolvers/quadratic-programming.html#qpsolvers.solve_qp https://pypi.org/project/qpsolvers/
#print(qpsolvers.available_solvers)
import ... | PypiClean |
/Enarksh-0.9.0.tar.gz/Enarksh-0.9.0/enarksh/controller/client/NodeActionClient.py | import zmq
import enarksh
from enarksh.controller.message.NodeActionMessage import NodeActionMessage
class NodeActionClient:
"""
A client for requesting the controller for a node action.
"""
# -----------------------------------------------------------------------------------------------------------... | PypiClean |
/Gene_POCKET-0.0.4-py3-none-any.whl/pocket/eqtl.py | import os
import numpy as np
import pandas as pd
import limix
class limix_gwas():
def __init__(self, geno_matrix, pheno_list, snp_info_df, kinship=None):
self.geno_matrix = geno_matrix
self.geno_matrix.index = snp_info_df.rsid
self.pheno_list = pheno_list.dropna()
self.kinship = kins... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/hris/model/issue_status_enum.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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.