id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/KDVS-2.0.0.tar.gz/KDVS-2.0.0/kdvs/contrib/ordereddict.py |
r"""
::
Copyright (c) 2009 Raymond Hettinger
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, mo... | PypiClean |
/Aruana-1.1.1-py3-none-any.whl/aruana/vocab.py | persons_pt_br = ['maria',
'ana',
'joao',
'gabriel',
'lucas',
'pedro',
'mateus',
'jose',
'gustavo',
'vitoria',
'guilherme',
... | PypiClean |
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/stats_scripts/mpmath/libmp/libhyper.py | import operator
import math
from .backend import MPZ_ZERO, MPZ_ONE, BACKEND, xrange, exec_
from .libintmath import gcd
from .libmpf import (\
ComplexResult, round_fast, round_nearest,
negative_rnd, bitcount, to_fixed, from_man_exp, from_int, to_int,
from_rational,
fzero, fone, fnone, ftwo, finf, fnin... | PypiClean |
/LatticeStockDataClient-0.0.4-py3-none-any.whl/latticestockdataclient/data/stock/stats.py | from cachetools.func import ttl_cache
from data.stockmarket.util.get import get_json
from data.stockmarket.util.ttlcache import hourly_cache
@hourly_cache
def key_stats_table(ticker_symbol):
return get_json("/stock/key-stats", {"ticker_symbol": ticker_symbol})
def beta(ticker_symbol):
return key_stats_table(... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/summernote/lang/summernote-id-ID.min.js | !function(a,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var t in r)("object"==typeof exports?exports:a)[t]=r[t]}}(self,(function(){return(a=jQuery).extend(a.summernote.lang,{"id-ID":{font:{bold:"Tebal",italic:"M... | PypiClean |
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/webhook_edit_request.py |
from msrest.serialization import Model
class WebhookEditRequest(Model):
"""WebhookEditRequest.
All required parameters must be populated in order to send to Azure.
:param active: Required. The webhook activation status (true=Active,
false=Inactive) <span class='property-internal'>Required</span>
... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/db/backends/sqlite3/base.py | from __future__ import unicode_literals
import datetime
import decimal
import warnings
import re
import sys
from django.db import utils
from django.db.backends import *
from django.db.backends.signals import connection_created
from django.db.backends.sqlite3.client import DatabaseClient
from django.db.backends.sqlite... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/data/ItemExplorer.js | if(!dojo._hasResource["dojox.data.ItemExplorer"]){
dojo._hasResource["dojox.data.ItemExplorer"]=true;
dojo.provide("dojox.data.ItemExplorer");
dojo.require("dijit.Tree");
dojo.require("dijit.Dialog");
dojo.require("dijit.Menu");
dojo.require("dijit.form.ValidationTextBox");
dojo.require("dijit.form.Textarea");
dojo.req... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/electrum_chi/electrum/gui/kivy/uix/dialogs/fx_dialog.py | from kivy.app import App
from kivy.factory import Factory
from kivy.properties import ObjectProperty, BooleanProperty
from kivy.lang import Builder
Builder.load_string('''
<FxDialog@Popup>
id: popup
title: 'Fiat Currency'
size_hint: 0.8, 0.8
pos_hint: {'top':0.9}
BoxLayout:
orientation: 've... | PypiClean |
/Keras_Applications_3D-0.1.0-py3-none-any.whl/keras_applications_3d/applications/resnet.py | from tensorflow.python.keras import backend
from tensorflow.python.keras.applications import imagenet_utils
from tensorflow.python.keras.engine import training
from tensorflow.python.keras.layers import VersionAwareLayers
from tensorflow.python.keras.utils import data_utils
from tensorflow.python.keras.utils import lay... | PypiClean |
/Automat-22.10.0.tar.gz/Automat-22.10.0/docs/about.rst | ===========
Quick Start
===========
.. people like things that are quick and easy
What makes Automat different?
=============================
There are `dozens of libraries on PyPI implementing state machines
<https://pypi.org/search/?q=finite+state+machine>`_.
So it behooves me to say why yet another one would be a ... | PypiClean |
/Klampt-0.9.0-cp36-cp36m-win_amd64.whl/klampt/vis/editors.py | from . import glcommon
from . import glinit
from . import gldraw
from . import visualization
import time
from ..math import vectorops,so3,se3
from ..robotsim import WidgetSet,RobotPoser,ObjectPoser,TransformPoser,PointPoser,AABBPoser,BoxPoser,SpherePoser,WorldModel,RobotModel,RobotModelLink,RigidObjectModel,TerrainMode... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/core/mail/backends/smtp.py | import smtplib
import ssl
import threading
from django.conf import settings
from django.core.mail.backends.base import BaseEmailBackend
from django.core.mail.utils import DNS_NAME
from django.core.mail.message import sanitize_address
from django.utils.encoding import force_bytes
class EmailBackend(BaseEmailBackend):... | PypiClean |
/Glastopf-3.1.2.tar.gz/Glastopf-3.1.2/glastopf/modules/handlers/emulators/dork_list/database_mongo.py |
import re
import warnings
from datetime import datetime
import logging
logger = logging.getLogger(__name__)
try:
from pymongo import MongoClient, uri_parser
except ImportError:
logger.warn('Unable to import module pymongo')
class Database(object):
"""
Responsible for all dork related communication w... | PypiClean |
/Extrator_bne-2.0.2.tar.gz/Extrator_bne-2.0.2/README.md | **BNEFramework**
* O Framework tem como objetivo auxiliar os brasileiros que estão a procura de emprego a localizarem de maneira mais prática e concisa vagas que lhe interessem, além de apresentar as vagas com candidaturas livres disponíveis no site do BNE(Banco Nacional de Emprego)'
**Funções do extrator**
* def pro... | PypiClean |
/CellProfiler-4.2.6.tar.gz/CellProfiler-4.2.6/cellprofiler/modules/matchtemplate.py | import imageio
import skimage.feature
from cellprofiler_core.image import Image
from cellprofiler_core.module import Module
from cellprofiler_core.setting.subscriber import ImageSubscriber
from cellprofiler_core.setting.text import Pathname, ImageName
class MatchTemplate(Module):
module_name = "MatchTemplate"
... | PypiClean |
/mysmile-0.7.2.tar.gz/mysmile-0.7.2/docs/source/REST API/REST API v1/Resources/Content.rst | Content
-------
Content resource returns current page by slug or list of available contents if slug does not set.
.. tabularcolumns:: |p{3cm}|p{1.5cm}|p{10.5cm}|
.. list-table::
:header-rows: 1
* - Resource
- GET [#f1]_
- Example
* - /content
- list of contents
- ::
... | PypiClean |
/KKHEP-0.1.0.tar.gz/KKHEP-0.1.0/kkcoffea/samples.py | import yaml
"""
Collection of classes to handle sample definitions.
"""
class Sample:
"""
A single sample.
"""
def __init__(self, data):
self.data=data
class MultiSample:
"""
A `MultiSample` is a set of Samples corresponding to a single process. For
example, a pT sliced dataset.
... | PypiClean |
/AnDOChecker-0.3.2-py3-none-any.whl/ando/engine.py |
# !/usr/bin/python
# -*- coding: utf-8 -*-
import os
import json
import re
import pathlib
from ando.error import ExperimentError, \
SessionError, SubjectError, MetaDataError, DerivativeDataError, \
RawDataError
dir_rules = os.path.join(os.path.dirname(__file__)) + '/rules/'
def parse_all_path(nested_list_... | PypiClean |
/Extract%20Media%20PowerPoint-0.6.tar.gz/Extract Media PowerPoint-0.6/extract/service.py | from pptx import Presentation
from pptx.enum.shapes import PP_MEDIA_TYPE
from pptx.enum.shapes import MSO_SHAPE_TYPE
from zipfile import ZipFile
import os
DEFAULT_PATH_PPT = 'ppt/media'
class Ext:
def __init__(self):
self._ext_permission_video = ['mp4', 'avi', 'mpg', 'mpeg', 'wmv']
self._ext_permi... | PypiClean |
/CephQeSdk-1.0.0.tar.gz/CephQeSdk-1.0.0/src/RhcsQeSdk/core/cli/ceph/balancer.py | import logging
import RhcsQeSdk.core.cli.fabfile as fabfile
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter(
"%(asctime)s - %(levelname)s - %(name)s:%(lineno)d - %(message)s"
)
stream_handler = logging.StreamHandler()
stream_handler.setFormatter(formatter)
strea... | PypiClean |
/JitViewer-0.2.1.tar.gz/JitViewer-0.2.1/_jitviewer/static/canjs/1.1.4/can.dojo.min.js | (function(q,k){function Ya(a,b){var d=a[K],d=d&&L[d];return b===k?d||qa(a):d&&d[b]}function qa(a,b,d){a=a[K]||(a[K]=++ra);a=L[a]||(L[a]={});b!==k&&(a[b]=d);return a}var c=q.can||{};if("undefined"===typeof GLOBALCAN||!1!==GLOBALCAN)q.can=c;c.isDeferred=function(a){var b=this.isFunction;return a&&b(a.then)&&b(a.pipe)};va... | PypiClean |
/Ngoto-0.0.39-py3-none-any.whl/ngoto/core/util/rich/progress.py | import io
import sys
import typing
import warnings
from abc import ABC, abstractmethod
from collections import deque
from dataclasses import dataclass, field
from datetime import timedelta
from io import RawIOBase, UnsupportedOperation
from math import ceil
from mmap import mmap
from operator import length_hint
from os... | PypiClean |
/CloudFerry-1.55.2.tar.gz/CloudFerry-1.55.2/cloudferry/condensation/cloud.py |
import fractions
import prettytable
from oslo_config import cfg
from cloudferry.condensation import group
from cloudferry.condensation import flavor
from cloudferry.condensation import action
from cloudferry.condensation import node
from cloudferry.condensation import vm
from cloudferry.lib.utils import log
LOG = ... | PypiClean |
/DynamicMachine-1.0.4-py3-none-any.whl/dynamic_machine/cli_commands.py | from pexpect import EOF, TIMEOUT
class beforeSeconds:
def __init__(self, seconds):
self._seconds = seconds
# def __class__(self): # allow for callback type execution, most not needed
# return self
def value(self):
return self._seconds
class ResultOperations(object):
def __init_... | PypiClean |
/Japanera-2.0.0.tar.gz/Japanera-2.0.0/japanera/japanera.py | import datetime
import re
from typing import Optional, List, Union
from warnings import warn
from kanjize import number2kanji
from .era_data import EraType, _ERA_DATA_COMMON, _ERA_DATA_GENERAL, _ERA_DATA_DAIKAKUJI, _ERA_DATA_JIMYOUIN
from .parser import _strptime, find_era_and_date, _set_era_data
class Era:
def... | PypiClean |
/ChemDataExtractor-1.3.0-py3-none-any.whl/chemdataextractor/text/unwrap.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
# TODO: Need to revisit this. Would be better to have an algorithm that does unsupervised training.
# For unsupervised training, we could give it either wrapped or unwra... | PypiClean |
/EpyNN-1.2.11.tar.gz/EpyNN-1.2.11/epynn/commons/logs.py | import traceback
import json
import time
import sys
# Related third party imports
from pygments import highlight, lexers, formatters
from pygments.formatters import TerminalTrueColorFormatter
from pygments.lexers import get_lexer_by_name
from termcolor import cprint, colored
from texttable import Texttable
from pygme... | PypiClean |
/Cuckoo-2.0.7a1.tar.gz/Cuckoo-2.0.7a1/cuckoo/data/analyzer/darwin/modules/packages/zip.py |
import logging
from shutil import move
from os import path, environ
from random import SystemRandom
from string import ascii_letters
from subprocess import check_output
from zipfile import ZipFile, BadZipfile
from lib.core.packages import Package, choose_package_class
log = logging.getLogger(__name__)
class Zip(Pack... | PypiClean |
/Kaggler-0.9.15.tar.gz/Kaggler-0.9.15/kaggler/online_model/classification_tree.py | from ._tree import Tree
from ..util import gini, count_dict, argmax
class ClassificationTree(Tree):
def __init__(
self,
number_of_features,
number_of_functions=10,
min_sample_split=200,
predict_initialize={"count_dict": {}},
):
# Constant values
self.nu... | PypiClean |
/Expross-1.1.2.tar.gz/Expross-1.1.2/README.md | <div id="top"></div>
[](https://hits.seeyoufarm.com)
<!-- PROJECT LOGO -->
<br />
<div align="center">
<h1 ... | PypiClean |
/FFVideo-0.0.13.tar.gz/FFVideo-0.0.13/README.txt | FFVideo
=======
Installation
------------
In Ubuntu you can install the above using the following commands::
sudo aptitude install python-dev cython libavcodec-dev libavformat-dev libswscale-dev
tar -xf FFVideo-0.0.13.tar.gz
cd FFVideo-0.0.13
python setup.py install
or::
sudo aptitude install ... | PypiClean |
/JaqalPaq-1.2.0a1.tar.gz/JaqalPaq-1.2.0a1/src/jaqalpaq/core/algorithm/visitor.py | """Define the infrastructure for visiting Jaqal core types"""
from jaqalpaq.error import JaqalError
class Visitor:
"""Base class for all visitors for the Jaqal core types. To use this class, create a subclass and create methods
named visit_<classname> for each class you wish to define behavior for. Then inst... | PypiClean |
/Django-Pizza-16.10.1.tar.gz/Django-Pizza-16.10.1/pizza/kitchen_sink/static/ks/ckeditor/plugins/a11yhelp/dialogs/lang/it.js | /*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","it",{title:"Istruzioni di Accessibilità",contents:"Contenuti di Aiuto. Per chiudere questa finestra premi ESC.",legend:[{name:"Generale",... | PypiClean |
/KeralaPyApiV2-2.0.2020.tar.gz/KeralaPyApiV2-2.0.2020/pyrogram/client/types/messages_and_media/animation.py |
from struct import pack
from typing import List
import pyrogram
from pyrogram.api import types
from .thumbnail import Thumbnail
from ..object import Object
from ...ext.utils import encode_file_id, encode_file_ref
class Animation(Object):
"""An animation file (GIF or H.264/MPEG-4 AVC video without sound).
P... | PypiClean |
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/pdffont.py | import logging
import struct
import sys
from io import BytesIO
from typing import (
Any,
BinaryIO,
Dict,
Iterable,
Iterator,
List,
Mapping,
Optional,
Tuple,
Union,
cast,
TYPE_CHECKING,
)
from . import settings
from .cmapdb import CMap
from .cmapdb import IdentityUnicodeM... | PypiClean |
/GTW-1.2.6.tar.gz/GTW-1.2.6/_RST/_TOP/_MOM/Mixin.py |
from __future__ import absolute_import, division, print_function, unicode_literals
from _GTW import GTW
from _TFL import TFL
import _GTW._RST._MOM.Mixin
import _GTW._RST._TOP._MOM.Action
import _GTW._RST._TOP._MOM.Field
import _GTW._RST._TOP._MOM.Query_Restriction
import... | PypiClean |
/GitFeed-0.1.9-py3-none-any.whl/gitfeed/gitfeed.py |
# Background color for labels
from colorama import Fore, Back, Style, init
import json
from datetime import datetime
import pydoc
import requests
import argparse
import sys
import time
import os.path
try:
import configparser
except:
from six.moves import configparser
def get_args(argv=None):
file_path = set... | PypiClean |
/Mantissa-0.9.0.tar.gz/Mantissa-0.9.0/xmantissa/website.py | import warnings
from zope.interface import implements
try:
from cssutils import CSSParser, replaceUrls
CSSParser
except ImportError:
CSSParser = None
from epsilon.structlike import record
from nevow.inevow import IRequest, IResource
from nevow.rend import Page, Fragment
from nevow import inevow
from n... | PypiClean |
/51degrees-mobile-detector-v3-wrapper-3.2.18.4.tar.gz/51degrees-mobile-detector-v3-wrapper-3.2.18.4/README.rst | |51degrees|
Device Detection Python API
51Degrees Mobile Detector is a server side mobile detection solution.
Changelog
====================
- Fixed a bug where an additional compile argument was causing compilation errors with clang.
- Updated the v3-trie-wrapper package to include the Lite Hash Trie data file.
- ... | PypiClean |
/Finance-Hermes-0.3.6.tar.gz/Finance-Hermes-0.3.6/hermes/factors/hfreduction/factor_moneyflow.py | import numpy as np
import pandas as pd
from alphakit.const import *
from alphakit.factor import *
from alphakit.portfolio import *
from alphakit.data import *
from hermes.factors.base import FactorBase, LongCallMixin, ShortCallMixin
class FactorMoneyflow(FactorBase, LongCallMixin, ShortCallMixin):
def __init__(... | PypiClean |
/DecentLogs-z6-6.0.0.tar.gz/DecentLogs-z6-6.0.0/src/decent_logs/withinternallog.py | from typing import Optional
from .log_record import LogRecord
# from contracts import contract
from decent_logs import logger
import time
__all__ = ['WithInternalLog']
class WithInternalLog(object):
"""
Subclassing this class gives the object the capability
of calling self.info, self.error, etc... | PypiClean |
/CROPS-0.1.1-py3-none-any.whl/crops/elements/intervals.py | from crops.about import __prog__, __description__, __author__, __date__, __version__
import copy
def _intervalise(subject):
"""Turns any integer or list of two integers into a :class:`~crops.elements.intervals.intinterval`.
:param subject: Input parameter.
:type subject: int, list, :class:`~crops.element... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/standard/plugins/specialchar/dialogs/lang/en-au.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang("specialchar","en-au",{euro:"Euro sign",lsquo:"Left single quotation mark",rsquo:"Right single quotation mark",ldquo:"Left double... | PypiClean |
/DFOGN-1.0.2.tar.gz/DFOGN-1.0.2/dfogn/trust_region.py | from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
from math import sqrt
from .util import d_within_bounds, zhang_code_structure, right_multiply_hessian, sumsq
__all__ = ['trsbox']
def trsbox(xopt, gopt, hq, sl, su, delta):
n = xopt.size
assert gopt.size =... | PypiClean |
/Kamaelia-0.6.0.tar.gz/Kamaelia-0.6.0/Examples/SimpleGraphicalApps/BouncingCatGame/Sprites/BasicSprite.py |
import pygame
from pygame.locals import *
import pygame.mixer
import random
import os
pygame.init()
from Axon.Component import component
class BasicSprite(pygame.sprite.Sprite, component):
Inboxes=["rotator","translation","scaler", "imaging","inbox", "control"]
def __init__(self, **argd):
pygame.sprite.S... | PypiClean |
/Kr0nOs-3.4.1.tar.gz/Kr0nOs-3.4.1/kronbot/cogs/trivia/session.py | import asyncio
import random
import time
from collections import Counter
import discord
from kronbot.core import bank
from kronbot.core.i18n import Translator
from kronbot.core.utils.chat_formatting import bold, box, humanize_list, humanize_number
from kronbot.core.utils.common_filters import normalize_smartquotes
f... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/components/rejected/api.py | from math import ceil
from flask import jsonify, request
from loguru import logger
from sqlalchemy.orm.exc import NoResultFound
from flexget.api import APIResource, api
from flexget.api.app import (
NotFoundError,
base_message_schema,
etag,
pagination_headers,
success_response,
)
from . import db... | PypiClean |
/AndroidTools-0.2.4.tar.gz/AndroidTools-0.2.4/AndTools/TEA.py | import struct
class TEA:
"""QQ TEA 加解密, 64比特明码, 128比特密钥
这是一个确认线程安全的独立加密模块,使用时必须要有一个全局变量secret_key,要求大于等于16位
"""
def xor(a, b):
op = 0xffffffff
a1, a2 = struct.unpack(b'>LL', a[0:8])
b1, b2 = struct.unpack(b'>LL', b[0:8])
return struct.pack(b'>LL', (a1 ^ b1) & op, (a2 ^... | PypiClean |
/Bluebook-0.0.1.tar.gz/Bluebook-0.0.1/pylot/component/static/pylot/vendor/mdeditor/bower_components/codemirror/mode/css/css.js | CodeMirror.defineMode("css", function(config) {
return CodeMirror.getMode(config, "text/css");
});
CodeMirror.defineMode("css-base", function(config, parserConfig) {
"use strict";
var indentUnit = config.indentUnit,
hooks = parserConfig.hooks || {},
atMediaTypes = parserConfig.atMediaTypes || {},
... | PypiClean |
/My_Learn_Messenger_Server-0.1.1.tar.gz/My_Learn_Messenger_Server-0.1.1/сhatserver/server/Server_DataBase.py | import datetime
from sqlalchemy import create_engine, Column, Integer, String, DateTime, ForeignKey, Text
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from sqlalchemy.sql import default_comparator
# Класс - база данных сервера
class ServerDB:
"""
The class is ... | PypiClean |
/Cheesecake-0.6.2.tar.gz/Cheesecake-0.6.2/cheesecake/cheesecake_index.py | import os
import re
import shutil
import sys
import tempfile
from argparse import ArgumentParser
from urllib import urlretrieve
from urlparse import urlparse
from math import ceil
import logger
from util import (pad_with_dots, pad_left_spaces, pad_right_spaces, pad_msg,
pad_line)
from util import r... | PypiClean |
/Amplo-0.17.0.tar.gz/Amplo-0.17.0/amplo/automl/data_processing.py |
from __future__ import annotations
import datetime
from collections import defaultdict
from typing import Any
import dateutil
import numpy as np
import numpy.typing as npt
import pandas as pd
import polars as pl
from sklearn.exceptions import NotFittedError
from sklearn.preprocessing import LabelEncoder
from typing_... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/freezer/DllDependenciesPosix.py | import os
import sys
from nuitka.containers.OrderedSets import OrderedSet
from nuitka.PythonFlavors import isAnacondaPython
from nuitka.Tracing import inclusion_logger
from nuitka.utils.Execution import executeProcess, withEnvironmentPathAdded
from nuitka.utils.SharedLibraries import getSharedLibraryRPATH
from nuitka.... | PypiClean |
/CloudFerry-1.55.2.tar.gz/CloudFerry-1.55.2/cloudferry/actions/image/convert_compute_to_image.py |
import copy
from cloudferry.lib.base.action import action
from cloudferry.lib.base import exception
from cloudferry.lib.utils import log
from cloudferry.lib.utils import utils as utl
LOG = log.getLogger(__name__)
def get_boot_volume(instance):
return instance[utl.INSTANCE_BODY]['boot_volume']
def get_image... | PypiClean |
/Krakatau-noff-v0.20181212.tar.gz/Krakatau-noff-v0.20181212/Krakatau/assembler/assembly.py | from .pool import Pool, utf
from .writer import Writer, Label
def writeU16Count(data, error, objects, message):
count = len(objects)
if count >= 1<<16:
error('Maximum {} count is {}, found {}.'.format(message, (1<<16)-1, count), objects[-1].tok)
data.u16(count)
class Code(object):
def __init_... | PypiClean |
/2ppy-0.4.0-py3-none-any.whl/tuprolog/solve/exception/error/type/__init__.py | from typing import Union
# noinspection PyUnresolvedReferences
import jpype.imports
from tuprolog import logger
from tuprolog.core import Term
from tuprolog.solve import ExecutionContext, Signature
# noinspection PyUnresolvedReferences
import it.unibo.tuprolog.solve.exception.error as errors
TypeError = errors.TypeEr... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojo/data/ItemFileWriteStore.js | define("dojo/data/ItemFileWriteStore",["../_base/lang","../_base/declare","../_base/array","../_base/json","../_base/window","./ItemFileReadStore","../date/stamp"],function(_1,_2,_3,_4,_5,_6,_7){
return _2("dojo.data.ItemFileWriteStore",_6,{constructor:function(_8){
this._features["dojo.data.api.Write"]=true;
this._fea... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/drawing/annotations/BoxShadow.js.uncompressed.js | define("dojox/drawing/annotations/BoxShadow", ["dijit","dojo","dojox"], function(dijit,dojo,dojox){
dojo.provide("dojox.drawing.annotations.BoxShadow");
dojox.drawing.annotations.BoxShadow = dojox.drawing.util.oo.declare(
// summary:
// Creates a box shadow under solid objects. Can change the
// shadow direction,... | PypiClean |
/HPI-0.3.20230327.tar.gz/HPI-0.3.20230327/my/core/pandas.py | from datetime import datetime
from pprint import pformat
from typing import Optional, TYPE_CHECKING, Any, Iterable, Type, Dict
from . import warnings, Res
from .common import LazyLogger, Json, asdict
logger = LazyLogger(__name__)
if TYPE_CHECKING:
# this is kinda pointless at the moment, but handy to annotate DF... | PypiClean |
/OASYS1-ESRF-Extensions-0.0.69.tar.gz/OASYS1-ESRF-Extensions-0.0.69/orangecontrib/esrf/wofry/util/lens.py | import numpy
from orangecontrib.esrf.syned.util.lens import Lens # TODO: from syned.beamline.optical_elements.lenses.lens import Lens
from syned.beamline.shape import Convexity, Direction
from syned.beamline.shape import SurfaceShape, Plane, Paraboloid, ParabolicCylinder, Sphere, SphericalCylinder
from syned.beamline.... | PypiClean |
/dragonflow-4.0.0.tar.gz/dragonflow-4.0.0/dragonflow/controller/apps/portsec.py |
import netaddr
from neutron_lib import constants as n_const
from oslo_log import log
from ryu.lib.packet import arp
from ryu.lib.packet import in_proto
from ryu.ofproto import ether
from dragonflow.controller.common import constants as const
from dragonflow.controller.common import utils
from dragonflow.controller i... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/ol-2.13/lib/OpenLayers/Format/WMTSCapabilities.js | * @requires OpenLayers/Format/XML/VersionedOGC.js
*/
/**
* Class: OpenLayers.Format.WMTSCapabilities
* Read WMTS Capabilities.
*
* Inherits from:
* - <OpenLayers.Format.XML.VersionedOGC>
*/
OpenLayers.Format.WMTSCapabilities = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, {
/**
* APIProperty:... | PypiClean |
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/addon/invient/demo/invient_demo_win.py | from StringIO \
import StringIO
from random \
import random
from threading \
import Thread
from time \
import sleep
from muntjac.addon.invient.invient_charts_util \
import getDate
from datetime \
import datetime
from muntjac.util \
import totalseconds, OrderedSet
from muntjac.api \
... | PypiClean |
/Numberjack-1.2.0.tar.gz/Numberjack-1.2.0/README.md | # Numberjack
## A Python platform for Combinatorial Optimisation
## What is Numberjack?
Numberjack is a modelling package written in Python for combinatorial
optimisation. Python benefits from a large and active programming community,
Numberjack is therefore a perfect tool to embed optimisation technology into
larger... | PypiClean |
/FullMonty-0.1.20.tar.gz/FullMonty-0.1.20/fullmonty/local_shell.py | import signal
import os
import fcntl
import sys
import pexpect
from time import sleep
try:
# use subprocess32 as it is the backport of the Python3.2 rewrite of subprocess
# from: https://stackoverflow.com/questions/21194380/is-subprocess-popen-not-thread-safe
#
# A substantial revision to subprocess ... | PypiClean |
/ImageTextCaptions-0.1.0.tar.gz/ImageTextCaptions-0.1.0/README.md | # ImageTextCaptions
A Python module to generate captions for images using Google AI's Vertex AI Platform.
## Overview
The `ImageTextCaptions` class provides an intuitive interface for generating textual captions for images. By simply passing a base64 encoded image, users can get insightful and accurate captions for ... | PypiClean |
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/build_scripts/LiftOverAffy.py | import sys,string,os
sys.path.insert(1, os.path.join(sys.path[0], '..')) ### import parent dir dependencies
def filepath(filename):
return filename
def cleanUpLine(line):
line = string.replace(line,'\n','')
line = string.replace(line,'\c','')
data = string.replace(line,'\r','')
#data = string.repl... | PypiClean |
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/js/tiny_mce/classes/ui/DropMenu.js | (function(tinymce) {
var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event, Element = tinymce.dom.Element;
/**
* This class is used to create drop menus, a drop menu can be a
* context menu, or a menu for a list box or a menu bar.
*
* @class tinymce.ui.DropMenu
* @extends t... | PypiClean |
/IntervalArithmetic-0.2.0.tar.gz/IntervalArithmetic-0.2.0/README.txt | .. -*- Mode: rst -*-
.. include:: project-links.txt
.. include:: abbreviation.txt
====================
IntervalArithmetic
====================
|Pypi License|
|Pypi Python Version|
|Pypi Version|
* Quick Link to `Production Branch <https://github.com/FabriceSalvaire/python-interval-arithmetic/tree/master>`_
* Quic... | PypiClean |
/flask_kits-0.0.24.tar.gz/flask_kits-0.0.24/flask_kits/restful/entity/common.py | import functools
import inspect
from datetime import datetime
from decimal import Decimal
import flask_restful.fields
from flask_restful import abort
from flask_restful.reqparse import Argument
from flask_restful.reqparse import RequestParser
from flask_restful_swagger import swagger
from six import add_metaclass
from... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/web-animations-js/src/position-handler.js |
(function(scope) {
function negateDimension(dimension) {
var result = {};
for (var k in dimension) {
result[k] = -dimension[k];
}
return result;
}
function consumeOffset(string) {
return scope.consumeToken(/^(left|center|right|top|bottom)\b/i, string) || scope.consumeLengthOrPercent(s... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_saq.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 |
/CAMELS_library-0.3.tar.gz/CAMELS_library-0.3/scripts/GAN/data.py | import torch
from torch.utils.data.dataset import Dataset
from torch.utils.data import DataLoader
import numpy as np
import sys, os, time
# This class creates the dataset
class make_dataset():
def __init__(self, root, grid, verbose=False):
# read the data
f_maps = '%s/Images_T.npy'%root
... | PypiClean |
/Krakatau-noff-v0.20181212.tar.gz/Krakatau-noff-v0.20181212/Krakatau/assembler/disassembly.py | from __future__ import print_function
import collections
import math
import re
from ..classfileformat import classdata, mutf8
from ..classfileformat.reader import Reader, TruncatedStreamError
from ..util.thunk import thunk
from . import codes, token_regexes
from . import flags
from .instructions import OPNAMES, OP_C... | PypiClean |
/LEPL-5.1.3.zip/LEPL-5.1.3/src/lepl/lexer/_test/matchers.py | # pylint: disable-msg=R0201, R0904, R0903, R0914
# tests
from logging import basicConfig, DEBUG
from math import sin, cos
from operator import add, sub, truediv, mul
from unittest import TestCase
from lepl.lexer.matchers import Token
from lepl.lexer.support import LexerError, RuntimeLexerError
from lepl.matchers.core... | PypiClean |
/MijnSimpel-0.6.tar.gz/MijnSimpel-0.6/mijn_simpel/cli.py | import click
import mijn_simpel
from mijn_simpel.client import Session, Subscription
from mijn_simpel.utils import fmt_output
from os.path import expanduser
@click.group()
@click.option('--cookie-jar', default=expanduser("~") + '/.config/mijn-simpel-cookie',
show_default='~/.config/mijn-simpel-cookie',
... | PypiClean |
/DA-DAPPER-1.2.2.tar.gz/DA-DAPPER-1.2.2/dapper/mods/LorenzUV/illust_parameterizations.py | import matplotlib as mpl
import numpy as np
from matplotlib import pyplot as plt
import dapper.mods as modelling
from dapper.mods import with_recursion, with_rk4
# mpl.rcParams['toolbar'] = 'None'
###########################
# Setup
###########################
PRMS = 'Lorenz'
if PRMS == 'Wilks':
from dapper.mods... | PypiClean |
/Electrum-VTC-2.9.3.3.tar.gz/Electrum-VTC-2.9.3.3/gui/qt/__init__.py |
import sys
import os
import signal
try:
import PyQt4
except Exception:
sys.exit("Error: Could not import PyQt4 on Linux systems, you may try 'sudo apt-get install python-qt4'")
from PyQt4.QtGui import *
from PyQt4.QtCore import *
import PyQt4.QtCore as QtCore
from electrum_vtc.i18n import _, set_language
fr... | PypiClean |
/Monary-0.5.0.tar.gz/Monary-0.5.0/monary/write_concern.py |
MONARY_W_ERRORS_IGNORED = -1
MONARY_W_DEFAULT = -2
MONARY_W_MAJORITY = -3
MONARY_W_TAG = -4
class WriteConcern(object):
"""A python object to mimic the libmongoc mongoc_write_concern_t struct."""
def __init__(self, w=MONARY_W_DEFAULT, wtimeout=0, wjournal=False,
wfsync=False, wtag=None):
... | PypiClean |
/Lmgeo-1.1.0.tar.gz/Lmgeo-1.1.0/lmgeo/formats/worldfile.py | import os.path
from math import fabs
from .raster import Raster
from .const import constants as const
import traceback
__author__ = "Steven B. Hoek"
# Helper class, to be used together with classes derived from Raster
# Reads and writes world files for those format which require it
class WorldFile(object):
"""A h... | PypiClean |
/AutoUpdate-0.0.4.tar.gz/AutoUpdate-0.0.4/README.md | Check for updates in the easiest way possible.
Release notes (0.0.4)
===
* Removed useless code
Documentation
===
First, create a github repository. Then in the repository, create a file. Name this whatever you want, as long as it's a .txt file. Put the latest version in there. Update this file with the correspondin... | PypiClean |
/DLStudio-2.3.0.tar.gz/DLStudio-2.3.0/ExamplesAdversarialLearning/README | IMPORTANT NOTE:
You will need to install the PurdueShapes5GAN dataset before you can execute any scripts
in this directory.
Download the dataset archive
datasets_for_AdversarialNetworks.tar.gz
through the link "Download the image dataset for AdversarialNetworks" provided at the top
... | PypiClean |
/Libgenbot/Downloader.py | from os import path
import requests
import time
from .HTMLparsers import getSchiHubPDF, SciHubUrls
import random
from .NetInfo import NetInfo
def setSciHubUrl():
r = requests.get(NetInfo.SciHub_URLs_repo, headers=NetInfo.HEADERS)
links = SciHubUrls(r.text)
found = False
for l in links:
try:
... | PypiClean |
/CephQeSdk-1.0.0.tar.gz/CephQeSdk-1.0.0/src/RhcsQeSdk/core/cli/ceph/mds.py | import logging
import RhcsQeSdk.core.cli.fabfile as fabfile
from RhcsQeSdk.core.utilities import core_utils
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter(
"%(asctime)s - %(levelname)s - %(name)s:%(lineno)d - %(message)s"
)
stream_handler = logging.StreamHandle... | PypiClean |
/CHIP_aREST-0.3.tar.gz/CHIP_aREST-0.3/CHIP_aREST/aREST.py |
# aREST style API for controlling the CHIP via JSON and CHIP_IO
# Robert Wolterman, 2016
#
# Port from node.js to Python
# https://github.com/marcoschwartz/pi-aREST/blob/master/index.js
#
# Analog code adapted from:
# https://github.com/marcoschwartz/aREST-ESP8266/blob/master/aREST.lua
#
# All other code I came up wit... | PypiClean |
/GenMotion-0.0.4-py3-none-any.whl/genmotion/algorithm/vrnn/models.py | import torch
import torch.nn as nn
import torch.utils
import torch.utils.data
class VRNN(nn.Module):
def __init__(self, opt):
# x_dim, h_dim, z_dim, n_layers, device, bias=False, resample_output = False
super(VRNN, self).__init__()
self.x_dim = opt["input_dim"]
self.h_dim = opt["hid... | PypiClean |
/Djblets-3.3.tar.gz/Djblets-3.3/djblets/htdocs/static/djblets/js/forms/views/conditionSetView.es6.67366baa2b82.js | (function() {
/**
* Base view for condition rows.
*
* This is responsible for handling common logic for condition row views. It's
* mainly used to handle deletion of the row.
*/
const BaseConditionRowView = Backbone.View.extend({
tagName: 'li',
className: 'conditions-field-row',
events: {
'c... | PypiClean |
/AnkiServer-2.0.6.tar.gz/AnkiServer-2.0.6/anki-bundled/anki/upgrade.py |
import time, re, datetime, shutil
from anki.utils import intTime, tmpfile, ids2str, splitFields, base91, json
from anki.db import DB
from anki.collection import _Collection
from anki.consts import *
from anki.storage import _addSchema, _getColVars, _addColVars, \
_updateIndices
#
# Upgrading is the first step in... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/data/QueryReadStore.js | define("dojox/data/QueryReadStore",["dojo","dojox","dojo/data/util/sorter","dojo/string"],function(_1,_2){
_1.declare("dojox.data.QueryReadStore",null,{url:"",requestMethod:"get",_className:"dojox.data.QueryReadStore",_items:[],_lastServerQuery:null,_numRows:-1,lastRequestHash:null,doClientPaging:false,doClientSorting:... | PypiClean |
/Kr0nOs_Bot-3.3.11-py3-none-any.whl/redbot/cogs/general/general.py | import datetime
import time
from enum import Enum
from random import randint, choice
from typing import Final
import aiohttp
import discord
from redbot.core import commands
from redbot.core.i18n import Translator, cog_i18n
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
from redbot.core.utils.chat_formatting... | PypiClean |
/Multiplayer_Hangman-1.2-py3-none-any.whl/Multiplayer Hangman/Game_Data/Greek.py | filename = "Κρεμάλα Δύον Παιχτών"
create_game = "Δημιουργία Παιχνιδιού"
join_game = "Εύρεση Παιχνιδιού"
instructions = "Οδηγίες"
credits_ = "Τίτλοι"
quit_ = "Έξοδος"
choose = "Επιλογή"
options = "Ρυθμίσεις"
failedToCreateGame = "Πρόβλημα Σύνδ... | PypiClean |
/LimitTable-0.1.tar.gz/LimitTable-0.1/calculus_limits/limits.py | class LimitTable():
"""
Class for creating a Limit Table object to show the results of a function as x approaches a certain number.
Attributes:
rows (integer) giving the number of rows in the Limit Table
max_delta (percentage expressed as a decimal) giving the starting point for approachin... | PypiClean |
/BiolinkMG-0.3.0.tar.gz/BiolinkMG-0.3.0/metamodel/utils/loadschema.py | import os
import time
from datetime import date, datetime
from io import StringIO
from typing import Union, TextIO, cast, Optional
from urllib.request import Request, urlopen
import yaml
from metamodel.metamodel import SchemaDefinition, metamodel_version
from metamodel.utils.mergeutils import merge_schemas
def load... | PypiClean |
/GTsegments-0.22.tar.gz/GTsegments-0.22/src/gtsegments/DCC_matrix.py |
# Copyright (c) 2013-2016, Philippe Bordron <philippe.bordron+GTsegments@gmail.com>
#
# This file is part of GTsegments.
#
# GTsegments 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 3 ... | PypiClean |
/JumpScale-core-6.0.0.tar.gz/JumpScale-core-6.0.0/lib/JumpScale/baselib/codetools/CodeManager.py | import json
from JumpScale import j
import re
#@review [kristof,incubaid] name:codereviewtools tools for codereview, check all new code
class CodeManager():
def __init__(self):
self.ignoreDirs=["/.hg*"]
self.users={}
self.groups={}
def setusers(self,config):
for lin... | PypiClean |
/Av1an_minimal-5.5.4-py3-none-any.whl/av1an/encoder/rav1e.py | import os
import re
from av1an.project import Project
from av1an.chunk import Chunk
from av1an.commandtypes import MPCommands, CommandPair, Command
from av1an.encoder.encoder import Encoder
from av1an.utils import list_index_of_regex, terminate
class Rav1e(Encoder):
def __init__(self):
super().__init__(... | PypiClean |
/Boolean%20Solver-0.5.2.tar.gz/Boolean Solver-0.5.2/boolean_solver/util/helpers.py |
"""Utility and General purpose functions."""
import inspect
import warnings
import os
import re
import boolean_solver.constants as cts
__author__ = 'juan pablo isaza'
def read_file(absolute_path):
"""
:param absolute_path: string path.
:return: list with lines of the file.
"""
return [line.rstr... | PypiClean |
/DataMason-0.6.0b1.tar.gz/DataMason-0.6.0b1/README.md | ## Release Status
**Current Release:** Beta (v0.7.0b)
Welcome to DataMason! Our package is currently in the Beta release phase, showcasing a stable core functionality. While the primary features are rigorously tested and reliable, we are actively fine-tuning and evaluating additional features. Your insights and contr... | PypiClean |
/Amplo-0.17.0.tar.gz/Amplo-0.17.0/amplo/automl/feature_processing/feature_processing.py | from __future__ import annotations
import re
from itertools import combinations
from warnings import warn
import pandas as pd
import polars as pl
from amplo.automl.feature_processing._base import BaseFeatureExtractor, check_data
from amplo.automl.feature_processing.feature_selection import FeatureSelector
from amplo... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.