id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dijit/layout/_TabContainerBase.js | require({cache:{"url:dijit/layout/templates/TabContainer.html":"<div class=\"dijitTabContainer\">\n\t<div class=\"dijitTabListWrapper\" data-dojo-attach-point=\"tablistNode\"></div>\n\t<div data-dojo-attach-point=\"tablistSpacer\" class=\"dijitTabSpacer ${baseClass}-spacer\"></div>\n\t<div class=\"dijitTabPaneWrapper $... | PypiClean |
/NESTML-5.3.0-py3-none-any.whl/pynestml/symbols/function_symbol.py | from pynestml.symbols.symbol import Symbol, SymbolKind
class FunctionSymbol(Symbol):
"""
This class is used to store a single function symbol, e.g. the definition of the function max.
Attributes:
param_types (list(TypeSymbol)): A list of the types of parameters.
return_type (type_symbol): ... | PypiClean |
/Chaturanga-0.1.8.linux-x86_64.tar.gz/usr/local/lib/python2.7/dist-packages/chaturanga/bot.py | from .chessboard import Chessboard
from .notation import tup
TEMPO = {'w': 10, 'b': -10}
VALUE = {'P': 100, 'N': 280, 'B': 320, 'R': 479, 'Q': 929, 'K': 60000,
'p': -100, 'n': -280, 'b': -320, 'r': -479, 'q': -929, 'k': -60000}
PST_WHITE = {'P': [[ 0, 0, 0, 0, 0, 0, 0, 0],
... | PypiClean |
/GatherGit-0.0.3.tar.gz/GatherGit-0.0.3/gathergit/repo.py |
import os
# Third party libs
from sh import rsync
from gathergit.gitrepo import GitRepo
class Repo(dict):
"""Represents a repository/ module
"""
def __init__(self, logger):
"""
Constructor initializing instance variables
"""
dict.__init__(self)
self['name'] = ''... | PypiClean |
/CertGenerator-2.2.1.tar.gz/CertGenerator-2.2.1/certgenerator/tools.py | import os
import ruamel.yaml
import time
import csv
import logging
import logging.handlers
import click
import platform
import shutil
import subprocess
from codecs import open as c_open
from config import Config
from cert_exceptions import *
here = os.path.abspath(os.path.dirname(__file__))
yaml = ruamel.yaml.YAML()
... | PypiClean |
/CosmoTech-SupplyChain-5.1.0.tar.gz/CosmoTech-SupplyChain-5.1.0/Supplychain/Run/uncertainty_analysis.py | import numpy
import random
import multiprocessing
from typing import Union
from Supplychain.Wrappers.simulator import CosmoEngine
from Supplychain.Generic.adx_and_file_writer import ADXAndFileWriter
import pandas as pd
from Supplychain.Generic.timer import Timer
from math import sqrt
from Supplychain.Wrappers.environme... | PypiClean |
/BEATluzgool-1.0.1-py3-none-any.whl/econml/_ensemble/_utilities.py |
import numbers
import numpy as np
def _get_n_samples_subsample(n_samples, max_samples):
"""
Get the number of samples in a sub-sample without replacement.
Parameters
----------
n_samples : int
Number of samples in the dataset.
max_samples : int or float
The maximum number of s... | PypiClean |
/DigitalPressureSensor-1.0.0-py3-none-any.whl/DPS.py | import smbus
from time import sleep
def getTwosComplement(raw_val, length):
"""Get two's complement of `raw_val`.
Args:
raw_val (int): Raw value
length (int): Max bit length
Returns:
int: Two's complement
"""
val = raw_val
... | PypiClean |
/ClientWars-1.4.1.tar.gz/ClientWars-1.4.1/README.md | # ClientWars
#### War game, but for programmers.
Python Library for playing in ServerWars Game.
### Install
```shell script
pip3 install -U ClientWars
```
### Example code:
```python
from client_wars import Game
game = Game("<TOKEN>")
def turn(game):
conquers = game.conquerable_tiles()
"""
The metho... | PypiClean |
/BrewPi-0.0.0.1.tar.gz/BrewPi-0.0.0.1/utils/terminal.py |
# Copyright (C) 2018, 2019 Lee C. Bussy (@LBussy)
# This file is part of LBussy's BrewPi Script Remix (BrewPi-Script-RMX).
#
# BrewPi Script RMX is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version... | PypiClean |
/Mathics3-6.0.2.tar.gz/Mathics3-6.0.2/mathics/core/formatter.py | import inspect
import re
from typing import Callable
from mathics.core.element import BoxElementMixin
# key is str: (to_xxx name, value) is formatter function to call
format2fn: dict = {}
def encode_mathml(text: str) -> str:
text = text.replace("&", "&").replace("<", "<").replace(">", ">")
text = ... | PypiClean |
/JanexSC-0.0.29.tar.gz/JanexSC-0.0.29/README.md | # Janex-SpaCy
A version of the set of Janex Frameworks which utilises SpaCy's models to determine the best response and intent class.
If you want to use a less heavyweight but still-accurate version of Janex, I would recommend using Janex: PyTorch Edition, which uses Neural Network techniques from PyTorch and NLTK sy... | PypiClean |
/Flask_DigestAuth-0.6.2-py3-none-any.whl/flask_digest_auth/algo.py |
# Copyright (c) 2022 imacat.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | PypiClean |
/FEADRE_AI-1.0.7.tar.gz/FEADRE_AI-1.0.7/FEADRE_AI/general/FColor.py | import random
import numpy as np
COLORS_RGB = np.array(
[
0.000, 0.447, 0.741, # 深蓝
0.850, 0.325, 0.098, # 暗橙色
0.929, 0.694, 0.125,
0.494, 0.184, 0.556,
0.466, 0.674, 0.188,
0.301, 0.745, 0.933, # 浅蓝色
0.635, 0.078, 0.184,
0.300, 0.300, 0.300,
... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/DjangoAppCenter/simpleui/static/admin/simpleui-x/waves/waves.min.js | !function(t,e){"use strict";"function"==typeof define&&define.amd?define([],function(){return t.Waves=e.call(t),t.Waves}):"object"==typeof exports?module.exports=e.call(t):t.Waves=e.call(t)}("object"==typeof global?global:this,function(){"use strict";function t(t){return null!==t&&t===t.window}function e(e){return t(e)... | PypiClean |
/OASYS1-WONDER-1.0.45.tar.gz/OASYS1-WONDER-1.0.45/orangecontrib/wonder/widgets/wonder/ow_expdecay_background.py |
import sys
from orangewidget.settings import Setting
from orangecontrib.wonder.widgets.gui.ow_generic_parameter_widget import OWGenericWidget, OWGenericDiffractionPatternParametersWidget, ParameterBox
from orangecontrib.wonder.fit.parameters.instrument.background_parameters import ExpDecayBackground
class OWExpDec... | PypiClean |
/energon_prometheus_exporter_main-0.0.1.tar.gz/energon_prometheus_exporter_main-0.0.1/Energon_Prometheus_exporter-main/prometheus_exporter.py | import sys
import re
import time
import energon
import argparse
from prometheus_client import start_http_server, Gauge, Info
# import actualMeter
# example: sudo python3 prometheus_exporter.py 00:15:A3:00:55:02
parser = argparse.ArgumentParser()
parser.add_argument(
"-p",
"--port",
nargs="?",
default=... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/BootstrapValidator/js/bootstrapValidator.min.js | if("undefined"==typeof jQuery)throw new Error("BootstrapValidator requires jQuery");!function(a){var b=a.fn.jquery.split(" ")[0].split(".");if(+b[0]<2&&+b[1]<9||1===+b[0]&&9===+b[1]&&+b[2]<1)throw new Error("BootstrapValidator requires jQuery version 1.9.1 or higher")}(window.jQuery),function(a){var b=function(b,c){thi... | PypiClean |
/FatBotSlim-0.2.tar.gz/FatBotSlim-0.2/fatbotslim/irc/tcp.py | from gevent import spawn, joinall, killall
from gevent.queue import Queue
from gevent.socket import socket
from gevent.ssl import wrap_socket
from fatbotslim.log import create_logger
log = create_logger(__name__)
class TCP(object):
"""
A TCP connection.
"""
def __init__(self, host, port, timeout=300... | PypiClean |
/Clorm-1.4.1-py3-none-any.whl/clorm/orm/factbase.py |
import abc
import io
import itertools
import sys
from typing import (Any, Callable, Iterable, Iterator, List, Optional, TextIO,
Tuple, Type, Union, cast, overload)
from ._typing import _T0, _T1, _T2, _T3, _T4
from ._queryimpl import UnGroupedQuery
from .core import (Predicate, PredicateDefn, Predi... | PypiClean |
/IPRA-3.17.51-py3-none-any.whl/ipra/Model/Robot/chinaLifeRobot.py | from genericpath import exists
import time
from bs4 import BeautifulSoup
from selenium.webdriver.support.wait import WebDriverWait
import xlsxwriter
from ipra.Model.Robot.baseRobot import BaseRobot
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdrive... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/@types/node/trace_events.d.ts | declare module 'trace_events' {
/**
* The `Tracing` object is used to enable or disable tracing for sets of
* categories. Instances are created using the
* `trace_events.createTracing()` method.
*
* When created, the `Tracing` object is disabled. Calling the
* `tracing.enable()` method... | PypiClean |
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/import_scripts/sampleIndexSelection.py | import sys,string,os
sys.path.insert(1, os.path.join(sys.path[0], '..')) ### import parent dir dependencies
import os
import math
import traceback
try: from stats_scripts import statistics
except Exception: pass
def makeTestFile():
all_data = [['name','harold','bob','frank','sally','kim','tim'],
['a','0','... | PypiClean |
/ConfTools-1.9.9.tar.gz/ConfTools-1.9.9/src/conf_tools/patterns.py | import re
from contracts import contract
from .exceptions import SemanticMistake, SyntaxMistake
__all__ = ['pattern_matches', 'recursive_subst', 'is_pattern']
reg = '\$\{([^\}]*)\}'
def is_pattern(s):
if not isinstance(s, str):
return False
isa = len(re.findall(reg, s)) > 0
return isa
def p... | PypiClean |
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/static/editor/base.js | var WLT = WLT || {};
WLT.Config = (function () {
return {
IS_MAC: /Mac|iPod|iPhone|iPad/.test(navigator.platform),
};
})();
WLT.Utils = (function () {
return {
getNumericKey: function (idx) {
return (idx + 1) % 10;
},
markFuzzy: function ($el) {
/* Standard workflow */
$el.fin... | PypiClean |
/Flask-AppBuilder-jwi078-2.1.13.tar.gz/Flask-AppBuilder-jwi078-2.1.13/flask_appbuilder/security/sqla/models.py | import datetime
from flask import g
from sqlalchemy import (
Boolean,
Column,
DateTime,
ForeignKey,
Integer,
Sequence,
String,
Table,
UniqueConstraint,
)
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.orm import backref, relationship
from ... import Model
from... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/bower_components/paper-checkbox/README.md | [](https://travis-ci.org/PolymerElements/paper-checkbox)
##<paper-checkbox>
`paper-checkbox` is a [material design checkbox](https://www.google.com/design/spec/components/selection-controls.html#selection-controls-checkbox). ... | PypiClean |
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/mmdetection/mmdet/models/dense_heads/yolox_head.py | import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import (ConvModule, DepthwiseSeparableConvModule,
bias_init_with_prob)
from mmcv.ops.nms import batched_nms
from mmcv.runner import force_fp32
from mmdet.core import (MlvlPointGenerato... | PypiClean |
/Chula-0.13.3.tar.gz/Chula-0.13.3/chula/queue/messages/message.py |
import datetime
import thread
from chula import collection, data, error, json
from chula.queue import messages
class Message(collection.Collection):
def __init__(self, msg=None):
now = datetime.datetime.now()
self.created = now
self.id = thread.get_ident()
self.inprocess = False
... | PypiClean |
/GTW-1.2.6.tar.gz/GTW-1.2.6/__test__/Subjects.py |
from __future__ import absolute_import, division, print_function, unicode_literals
_test_code = """
>>> scope = Scaffold.scope (%(p1)s, %(n1)s) # doctest:+ELLIPSIS
Creating new scope MOMT__...
>>> PAP = scope.PAP
>>> print (PAP.Subject.count, PAP.Company.count_strict, PAP.Person.count_strict)
... | PypiClean |
/Catalyst_Lib-0.8.tar.gz/Catalyst_Lib-0.8/Catalyst_Lib/htmlgen.py | from xml.dom.minidom import parseString as string_to_dom
import pathlib
tags = ["a", "abbr", "acronym", "address", "area", "b", "base", "bdo", "big", "blockquote", "body", "br", "button",
"caption", "cite", "code", "col", "colgroup", "dd", "del", "dfn", "div", "dl", "DOCTYPE", "dt", "em",
"fieldset", "... | PypiClean |
/DLD_vig-1.0.0.tar.gz/DLD_vig-1.0.0/src/DLD_basic/DLD.py | def any_to_dec(string_number, radix):
# the above function takes in a string as input along with a radix of the given number
string_number = list(string_number)
if "." not in string_number:
string_number = string_number + ["."] + ["0"]
if radix == 16:
for i in range(len(string_number)):
... | PypiClean |
/FlattenList-0.1.4.zip/FlattenList-0.1.4/README.txt | =============
Flatten List
=============
Given a list of nested lists/tuples, returns all the elements in a single list.
Typical usage::
#!/usr/bin/env python
from flatten.flatten import flattenlist
the_list = [[1,2,3],[4,5,6], [7], [8,9]]
flattenlist(the_list)
[1, 2, 3, 4, 5, 6, 7, 8, 9]
... | PypiClean |
/FFTA-0.3.5.1-py3-none-any.whl/ffta/analysis/svd.py | import h5py
import numpy as np
import pyUSID as usid
from matplotlib import pyplot as plt
from sidpy.viz import plot_utils
from ffta.load import get_utils
from .svd_utils import SVD, rebuild_svd
"""
Wrapper to SVD functions, specific to ffta Class.
Typical usage:
>> h5_svd = svd.test_svd(h5_avg)
>> clean = [... | PypiClean |
/HILO-MPC-1.0.3.tar.gz/HILO-MPC-1.0.3/hilo_mpc/modules/optimizer.py |
from __future__ import annotations
from abc import ABCMeta, abstractmethod
from copy import deepcopy
from typing import Optional, Sequence, TypeVar, Union
import warnings
import casadi as ca
import numpy as np
from .base import Base, Vector, Problem, OptimizationSeries, TimeSeries
from .dynamic_model.dynamic_model ... | PypiClean |
/Mothership-0.0.35.zip/Mothership-0.0.35/mothership/idrac6/__init__.py | import os
import sys
import re
import pexpect
import subprocess
def check_known_hosts(host, user='~'):
# check for ssh host key
hasKey = False
userknownhosts = os.path.expanduser('%s/.ssh/known_hosts' % user)
for file in [ '/etc/ssh/ssh_known_hosts', userknownhosts ]:
for line in open(file):
... | PypiClean |
/Moose-0.9.9b3.tar.gz/Moose-0.9.9b3/moose/utils/archive.py | import os
import shutil
import stat
import tarfile
import zipfile
class ArchiveException(Exception):
"""
Base exception class for all archive errors.
"""
class UnrecognizedArchiveFormat(ArchiveException):
"""
Error raised when passed file is not a recognized archive format.
"""
def extract... | PypiClean |
/OBP_security_pillar_2-0.0.4.tar.gz/OBP_security_pillar_2-0.0.4/OBP_security_pillar_2/s3/s3_bucket_ssl_requests_only.py | import logging
import botocore
import json
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger()
def s3_bucket_ssl_requests_only(self):
logger.info(" ---Inside s3 :: s3_bucket_ssl_requests_only()")
result = True
failReason = ''
offenders = []
control_id = 'Id3.92'
compliance... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/codemirror/addon/mode/simple.js |
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use... | PypiClean |
/NESTML-5.3.0-py3-none-any.whl/pynestml/meta_model/ast_ode_equation.py |
from pynestml.meta_model.ast_node import ASTNode
from pynestml.meta_model.ast_expression import ASTExpression
from pynestml.meta_model.ast_simple_expression import ASTSimpleExpression
from pynestml.meta_model.ast_variable import ASTVariable
class ASTOdeEquation(ASTNode):
"""
This class is used to store meta... | PypiClean |
/Graph_RL-0.1.2.tar.gz/Graph_RL-0.1.2/README.md | # Graph-RL
Graph-RL is a hierarchical reinforcement learning (HRL) framework that emphasizes modularity and flexibility. The user can define a hierarchy by specifying a directed graph where the nodes correspond to what is usually referred to as level or layer in the literature. Each node consists of an algorithm (resp... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/__init__.py | import os.path
import sys
from functools import cmp_to_key
import SCons.Environment
import SCons.Errors
import SCons.Util
import SCons.Warnings
from .BoolVariable import BoolVariable # okay
from .EnumVariable import EnumVariable # okay
from .ListVariable import ListVariable # naja
from .PackageVariable import Pack... | PypiClean |
/Craft_xai-0.0.3-py3-none-any.whl/craft/sobol/sampler.py | from abc import ABC, abstractmethod
import numpy as np
import tensorflow as tf
import scipy
class Sampler(ABC):
"""
Base class for replicated design sampling.
"""
@staticmethod
def build_replicated_design(sampling_a, sampling_b):
"""
Build the replicated design matrix C using A &... | PypiClean |
/BlueWhale3_Text-1.6.0-py3-none-any.whl/orangecontrib/text/vectorization/bagofwords.py | from collections import OrderedDict
from functools import partial
import numpy as np
from gensim import corpora, models, matutils
from sklearn.preprocessing import normalize
from orangecontrib.text.vectorization.base import BaseVectorizer,\
SharedTransform, VectorizationComputeValue
from orangecontrib.text.i18n_c... | PypiClean |
/Js2Py-0.74.tar.gz/Js2Py-0.74/js2py/legecy_translators/flow.py | from __future__ import print_function
from utils import *
from jsparser import *
from nodevisitor import exp_translator
import random
TO_REGISTER = []
CONTINUE_LABEL = 'JS_CONTINUE_LABEL_%s'
BREAK_LABEL = 'JS_BREAK_LABEL_%s'
PREPARE = '''HOLDER = var.own.get(NAME)\nvar.force_own_put(NAME, PyExceptionToJs(PyJsTempExc... | PypiClean |
/Digikam-DB-0.3.1.tar.gz/Digikam-DB-0.3.1/docs/tutorial.rst | Using Digikam-DB
=================
This document assumes that you are reasonably familiar with Digikam. If using
MySQL, some knowledge about MySQL database setup and user management is
helpful. You need not be an expert - if you managed to set up the database for
Digikam, you should be fine. While Digikam-DB tries to ... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/crm/model/patched_opportunity_endpoint_request.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 |
/HavNegpy-1.2.tar.gz/HavNegpy-1.2/docs/_build/html/_build/doctrees/nbsphinx/_build/doctrees/nbsphinx/_build/html/_build/doctrees/nbsphinx/_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 |
/Flask-DebugToolbar-0.13.1.tar.gz/Flask-DebugToolbar-0.13.1/src/flask_debugtoolbar/static/codemirror/mode/ecl/ecl.js | CodeMirror.defineMode("ecl", function(config) {
function words(str) {
var obj = {}, words = str.split(" ");
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
return obj;
}
function metaHook(stream, state) {
if (!state.startOfLine) return false;
stream.skipToEnd();
return "meta... | PypiClean |
/AA_stat-2.5.5-py3-none-any.whl/AA_stat/gui/logging.py | import logging
import logging.handlers
import socketserver
import struct
import pickle
import socket
import tkinter as tk
class LoggingToGUI(logging.Handler):
# https://stackoverflow.com/a/18194597/1258041
def __init__(self, console):
logging.Handler.__init__(self)
self.console = console
... | PypiClean |
/OMEGA_micro-0.0.2-py3-none-any.whl/OMEGA_core/image.py | __author__ = "jz-rolling"
import numpy as np
import tifffile
import nd2reader as nd2
from . import helper
from .cluster import Cluster
from skimage import filters, morphology, registration
import pickle as pk
Version = '0.1.1'
class Image:
"""
Read image data in the format of .nd2 hyperstack or .tif hyperst... | PypiClean |
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/inception_v2.py | """Contains the definition for inception v2 classification network."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.compat.v1 as tf
import tf_slim as slim
from nets import inception_utils
# pylint: disable=g-long-lambda
trunc_normal =... | PypiClean |
/MJOLNIR-1.3.1.tar.gz/MJOLNIR-1.3.1/docs/notebooks/QuickPlottingofData.ipynb | # Overview of data using View3D
or the initial overview of what has been measured and for viewing some features in the data, a quick 3D viewer can be initiated. This tutorial shows how to initialize it but not how the interactive parts work; for this see [Viewer3D documentation](../Data/Gui.html), the [dedicated tutor... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/member/views.py | from flask_xxl.baseviews import BaseView
from flask_cms.member.forms import EditProfileForm
from flask_cms.member import member
from flask import abort
class MemberProfileView(BaseView):
_template = 'profile.html'
_context = {}
def get(self,member_id):
from auth.models import User
... | PypiClean |
/Hikka_TL_New-2.0.4-py3-none-any.whl/hikkatl/tl/custom/chatgetter.py | import abc
from ... import errors, utils
from ...tl import types
class ChatGetter(abc.ABC):
"""
Helper base class that introduces the `chat`, `input_chat`
and `chat_id` properties and `get_chat` and `get_input_chat`
methods.
"""
def __init__(self, chat_peer=None, *, input_chat=None, chat=None... | PypiClean |
/Django-Gtranslate-0.1.3.tar.gz/Django-Gtranslate-0.1.3/README.md | <h1 align='center'> django_gtranslate </h1>
<p align='center'>
<a href="https://travis-ci.com/mrf345/django_gtranslate"><img src="https://travis-ci.com/mrf345/django_gtranslate.svg?branch=master" /></a>
<a href='https://coveralls.io/github/mrf345/django_gtranslate?branch=master'><img src='https://coveralls.io/repos/git... | PypiClean |
/DynamicForms-0.74.8-py3-none-any.whl/dynamicforms/pagination.py | import datetime
import json
import rest_framework.pagination as drf_p
from django.db.models import DurationField, F, Q
class CursorPagination(drf_p.CursorPagination):
ordering = "pk"
NONE_VALUE = "{`None`}"
# noinspection PyAttributeOutsideInit
def paginate_queryset(self, queryset, request, view=Non... | PypiClean |
/LinkedListMazeSolver-1.0.0.tar.gz/LinkedListMazeSolver-1.0.0/README.md | # Linked-List Maze Solver
This python class provides an A* algorithm to solve linked list, represented as a dictonary, mazes. It can be used to find the shortest path between a start and end point in a maze.
The LinkedListMazeSolver class is optimized for readability and performance. It has been designed to work with... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/sketch/Annotation.js.uncompressed.js | define("dojox/sketch/Annotation", [
"dojo/_base/kernel",
"dojo/_base/lang",
"dojo/_base/declare",
"dojo/_base/json",
"./Anchor",
"./_Plugin"
], function(dojo){
dojo.declare("dojox.sketch.AnnotationTool", dojox.sketch._Plugin, {
onMouseDown: function(e){
this._omd=true;
},
onMouseMove: function(e,rect){
... | PypiClean |
/BIT_framework-0.0.2-py3-none-any.whl/BIT_DL/pytorch/utils/utils.py | import collections
import copy
import inspect
from functools import lru_cache
from pydoc import locate
from typing import (
Any, Callable, Collection, Dict, List, MutableMapping, Optional, Sequence,
Tuple, Type, TypeVar, Union, cast, no_type_check, overload)
import funcsigs
import numpy as np
import torch
impo... | PypiClean |
/DataWrang-0.0.4.2.tar.gz/DataWrang-0.0.4.2/datawrang/__init__.py | import random
import pandas as pd
import numpy as np
import colorama
from colorama import Fore
pd.options.mode.chained_assignment = None # default='warn'
try:
#finding Things and data research--------------->
def Find_Categorical_col(df):
# This will return all categorical vairables from data fra... | PypiClean |
/LightZero-0.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/zoo/classic_control/pendulum/config/pendulum_cont_disc_sampled_efficientzero_config.py | from easydict import EasyDict
# ==============================================================
# begin of the most frequently changed config specified by the user
# ==============================================================
collector_env_num = 8
n_episode = 8
evaluator_env_num = 3
continuous_action_space = False
K... | PypiClean |
/ChorusFruit_mani.f-0.0.1.tar.gz/ChorusFruit_mani.f-0.0.1/README.md | **This module is in alpha test!**
hi my name is mani, and i want to show you what you can do with 'ChorusFruit' python module
***This module is a replacement for curses module***
#Tutorial:
###Installation
****
you can just `pip install` it
or for source code You can download source code from [my Github](https:\\githu... | PypiClean |
/KratosSwimmingDEMApplication-9.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/KratosMultiphysics/SwimmingDEMApplication/apply_porosity_solution_transient_body_force_process.py | import KratosMultiphysics
import KratosMultiphysics.SwimmingDEMApplication as KratosSDEM
def Factory(settings, Model):
if not isinstance(settings, KratosMultiphysics.Parameters):
raise Exception("expected input shall be a Parameters object, encapsulating a json string")
return ApplyPorositySolutionTran... | PypiClean |
/MAVR-0.93.tar.gz/MAVR-0.93/scripts/sequence_clusters/expansion/get_common_correct_families.py | __author__ = 'Sergei F. Kliver'
import sys
import argparse
from RouToolPa.Collections.General import TwoLvlDict, IdList, IdSet, SynDict
from RouToolPa.Routines.File import check_path
from RouToolPa.Routines.File import read_synonyms_dict
def filter_nonassembled(families):
for entry in set(families):
if ... | PypiClean |
/Hooke-1.0.0.alpha%20(Ninken).tar.gz/Hooke-1.0.0.alpha (Ninken)/hooke/config.py | import ConfigParser as configparser
import logging
import os.path
import textwrap
import unittest
from .compat.odict import odict as OrderedDict
from .util.convert import to_string, from_string
DEFAULT_PATHS = [
'/usr/share/hooke/hooke.cfg',
'/etc/hooke/hooke.cfg',
'~/.hooke.cfg',
'.hooke.cfg',
]... | PypiClean |
/Mezzanine-6.0.0.tar.gz/Mezzanine-6.0.0/mezzanine/blog/urls.py | from django.urls import path, re_path
from mezzanine.blog import views
from mezzanine.conf import settings
# Trailing slahes for urlpatterns based on setup.
_slash = "/" if settings.APPEND_SLASH else ""
# Blog patterns.
urlpatterns = [
path(
"feeds/<format>" + _slash,
views.blog_post_feed,
... | PypiClean |
/Eden-2.1.14.zip/Eden-2.1.14/eden/edenLib/openGl/learn/ttftest/freetype-2.4.8/src/tools/docmaker/docbeauty.py |
from sources import *
from content import *
from utils import *
import utils
import sys, os, time, string, getopt
content_processor = ContentProcessor()
def beautify_block( block ):
if block.content:
content_processor.reset()
markups = content_processor.process_content( block.content )
... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/ol-2.13/lib/OpenLayers/Layer/KaMap.js | * @requires OpenLayers/Layer/Grid.js
*/
/**
* Class: OpenLayers.Layer.KaMap
*
* Inherits from:
* - <OpenLayers.Layer.Grid>
*/
OpenLayers.Layer.KaMap = OpenLayers.Class(OpenLayers.Layer.Grid, {
/**
* APIProperty: isBaseLayer
* {Boolean} KaMap Layer is always a base layer
*/
isBase... | PypiClean |
/KratosOptimizationApplication-9.4-cp310-cp310-win_amd64.whl/KratosMultiphysics/OptimizationApplication/utilities/optimization_problem.py | from __future__ import annotations
from typing import Any, Union
import KratosMultiphysics as Kratos
from KratosMultiphysics.OptimizationApplication.utilities.buffered_dict import BufferedDict
from KratosMultiphysics.OptimizationApplication.execution_policies.execution_policy import ExecutionPolicy
from KratosMultiphy... | PypiClean |
/Flask-MDBootstrap-3.0.5.tar.gz/Flask-MDBootstrap-3.0.5/flask_mdbootstrap/static/MDB/src/js/vendor/free/velocity.js | jQuery.Velocity?console.log("Velocity is already loaded. You may be needlessly importing Velocity again; note that Materialize includes Velocity."):(!function(e){function t(e){var t=e.length,a=r.type(e);return"function"===a||r.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===a||0===t||"number"==typeof t&&t>0&&t-1 in e}if(... | PypiClean |
/Diofant-0.14.0a2.tar.gz/Diofant-0.14.0a2/diofant/geometry/entity.py | from ..core import Basic, Dummy, Tuple, oo
from ..core.compatibility import is_sequence
from ..core.sympify import sympify
from ..functions import atan, cos, sin
from ..matrices import eye
from ..sets import Set
class GeometryEntity(Basic):
"""The base class for all geometrical entities.
This class doesn't r... | PypiClean |
/Eureqa-1.76.0.tar.gz/Eureqa-1.76.0/eureqa/analysis/components/search_builder_link.py | from eureqa.analysis.components.base import _Component
from eureqa.utils.jsonrest import _JsonREST
from eureqa.search_settings import SearchSettings
class SearchBuilderLink(_Component):
"""
Create a SearchBuilderLink component
Example of using HtmlBlock with a SearchBuilderLink::
# include a link... | PypiClean |
/CommandLineApp-3.0.7.tar.gz/CommandLineApp-3.0.7/docs/source/commandlineapp.rst | #########################################################
:mod:`commandlineapp` -- Command line application builder
#########################################################
.. automodule:: commandlineapp
Application Base Class
======================
.. autoclass:: CommandLineApp
:members: __init__, EXAMPLES_DES... | PypiClean |
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/users/api/userendpoints/username.py | from django.db import IntegrityError
from django.utils.translation import gettext as _
from rest_framework import status
from rest_framework.response import Response
from ...namechanges import get_username_options
from ...serializers import ChangeUsernameSerializer
def username_endpoint(request):
if request.meth... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/drawing/plugins/drawing/Grid.js.uncompressed.js | define("dojox/drawing/plugins/drawing/Grid", ["dijit","dojo","dojox","dojo/require!dojox/drawing/plugins/_Plugin"], function(dijit,dojo,dojox){
dojo.provide("dojox.drawing.plugins.drawing.Grid");
dojo.require("dojox.drawing.plugins._Plugin");
dojox.drawing.plugins.drawing.Grid = dojox.drawing.util.oo.declare(
// summ... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_ca.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 |
/Netbyte-0.1.6.3.tar.gz/Netbyte-0.1.6.3/netbyte/__init__.py | import time
import warnings
import struct
import re
import math
import os
import sys
import importlib
from functools import reduce
# Note that optional arguments default to None (Python) or NULLVL (Netbyte).
# Base Operations
BASE_OPCODES = [
"SETVAR", # Set Variable : string name, string scope, any value
"G... | PypiClean |
/Hot3nCoder-1.0.5.tar.gz/Hot3nCoder-1.0.5/README.md | # Hot3nCoder
A tool to encode your .cpp file with whatever you want
## How to use
- open your terminal
- type "pip install Hot3nCoder" in your terminal
- type "Hot3nCoder -i \<YourCppFilePath\> -s \<Symbols you want\n>
- notice that symbols should split with " "
- the Encoded file will generate in the same directory... | PypiClean |
/Chiplotle-0.4.1.tar.gz/Chiplotle-0.4.1/chiplotle/documentation/chapters/tutorial/shapes.rst | Shapes
======
Chiplotle comes with a variety of `primitive` shape constructors.
A circle constructor takes at least a `radius` parameter::
c = shapes.circle(1000)
A rectangle constructor takes two parameters, a `width` and a `height`::
r = shapes.rectangle(500, 1000)
.. note::
The shapes module is load... | PypiClean |
/Flask-ADFS-0.1.19.tar.gz/Flask-ADFS-0.1.19/flask_adfs/adfs.py | import requests
import re
from flask import Blueprint, jsonify, abort
from flask import current_app as app
from flask_login import login_user, current_user
from flask import render_template, redirect, request, session, url_for, Blueprint, g, abort
from flask import current_app as app
from urllib.parse import urlpars... | PypiClean |
/Hypercorn-noteable-0.11.3.tar.gz/Hypercorn-noteable-0.11.3/src/hypercorn/protocol/__init__.py | from __future__ import annotations
from typing import Awaitable, Callable, Optional, Tuple, Union
from .h2 import H2Protocol
from .h11 import H2CProtocolRequired, H2ProtocolAssumed, H11Protocol
from ..config import Config
from ..events import Event, RawData
from ..typing import ASGIFramework, Context
class Protocol... | PypiClean |
/ModelSEEDpy-0.3.0.tar.gz/ModelSEEDpy-0.3.0/modelseedpy/core/rpcclient.py |
from __future__ import absolute_import
import json as _json
import requests as _requests
import random as _random
class _JSONObjectEncoder(_json.JSONEncoder):
def default(self, obj):
if isinstance(obj, set):
return list(obj)
if isinstance(obj, frozenset):
return list(obj)... | PypiClean |
/jupyterquiz-2.6.3.tar.gz/jupyterquiz-2.6.3/README.md | # JupyterQuiz
*JupyterQuiz* is a tool for displaying **interactive self-assessment quizes in Jupyter notebooks and Jupyter Book**.
*JupyterQuiz* is part of my effort to make **open source tools for developing modern, interactive textbooks**.
* The other part of this effort is my interactive self-assessment quiz tool,... | PypiClean |
/Adafruit_CharLCD-1.1.1.tar.gz/Adafruit_CharLCD-1.1.1/Adafruit_CharLCD/Adafruit_CharLCD.py | import time
import Adafruit_GPIO as GPIO
import Adafruit_GPIO.I2C as I2C
import Adafruit_GPIO.MCP230xx as MCP
import Adafruit_GPIO.PWM as PWM
# Commands
LCD_CLEARDISPLAY = 0x01
LCD_RETURNHOME = 0x02
LCD_ENTRYMODESET = 0x04
LCD_DISPLAYCONTROL = 0x08
LCD_CURSORSHIFT = 0x10
LCD_FUNCT... | PypiClean |
/DeepPhysX-22.6.tar.gz/DeepPhysX-22.6/src/Manager/Manager.py | from typing import Any, Dict, Tuple, Optional
from os.path import join as osPathJoin
from os.path import isfile, basename, exists
from datetime import datetime
from numpy import ndarray
from DeepPhysX.Core.Manager.DataManager import DataManager
from DeepPhysX.Core.Manager.NetworkManager import NetworkManager
from Deep... | PypiClean |
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/lattices/CRN3.py | from genice2.cell import cellvectors
import genice2.lattices
desc = {"ref": {"CRN": 'Mousseau 2001'},
"usage": "No options available.",
"brief": "A continuous random network of Sillium."
}
class Lattice(genice2.lattices.Lattice):
def __init__(self):
self.cell = """
43.274 4... | PypiClean |
/GSAS-II-WONDER_win-1.0.1.tar.gz/GSAS-II-WONDER_win-1.0.1/GSAS-II-WONDER/imports/G2pwd_fxye.py | from __future__ import division, print_function
import os.path as ospath
import platform
import numpy as np
import GSASIIobj as G2obj
import GSASIIpath
GSASIIpath.SetVersionNumber("$Revision: 3742 $")
class GSAS_ReaderClass(G2obj.ImportPowderData):
'Routines to import powder data from a GSAS files'
def __init_... | PypiClean |
/NL4Py-0.9.0-py3-none-any.whl/nl4py/NL4PyException.py | import functools
import inspect
import warnings
class NL4PyControllerServerException(Exception):
def __init___(self,dErrorArguments):
Exception.__init__(self,"{0}".format(dErrArguments))
self.dErrorArguments = dErrorArguements
string_types = (type(b''), type(u''))
def deprecated(reason):
"""
... | PypiClean |
/CoDocParser-0.2.49.tar.gz/CoDocParser-0.2.49/docparser/implements/excel_document_parser.py | import openpyxl
import os
import re
from docparser.core.document_parser_base import DocumentParserBase
from docparser.config.excel.table_block_config import TableBlockConfigSchema
class ExcelDocumentParser(DocumentParserBase):
"""
Excel文档解析器
"""
def __init__(self, file, configs):
"""
... | PypiClean |
/EpyNN-1.2.11.tar.gz/EpyNN-1.2.11/epynn/gru/forward.py | import numpy as np
def initialize_forward(layer, A):
"""Forward cache initialization.
:param layer: An instance of GRU layer.
:type layer: :class:`epynn.gru.models.GRU`
:param A: Output of forward propagation from previous layer.
:type A: :class:`numpy.ndarray`
:return: Input of forward pro... | PypiClean |
/Auptimizer-2.0.tar.gz/Auptimizer-2.0/src/aup/Proposer/spearmint/spearmint_pb2.py |
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
DESCRIPTOR = _descriptor.... | PypiClean |
/Lightflow-Filesystem-1.6.1.tar.gz/Lightflow-Filesystem-1.6.1/lightflow_filesystem/newline_trigger_task.py | import os
import time
from lightflow.queue import JobType
from lightflow.logger import get_logger
from lightflow.models import BaseTask, TaskParameters, Action
from .exceptions import LightflowFilesystemPathError
logger = get_logger(__name__)
class NewLineTriggerTask(BaseTask):
""" Triggers a callback function... | PypiClean |
/CaptureMock-2.3.0.tar.gz/CaptureMock-2.3.0/capturemock/pythonclient.py | import sys, types, inspect
class NameFinder(dict):
def __init__(self, moduleProxy):
dict.__init__(self)
self.moduleProxy = moduleProxy
self["InstanceProxy"] = InstanceProxy
self["PythonProxy"] = PythonProxy
self["ProxyMetaClass"] = ProxyMetaClass
self["Instance"] = s... | PypiClean |
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/account_meter_child_with_serial_number_py3.py |
from msrest.serialization import Model
class AccountMeterChildWithSerialNumber(Model):
"""AccountMeterChildWithSerialNumber.
:param serial_number: The Serial Number of the Meter
:type serial_number: str
:param account_meter_id: The AccountMeter identifier
:type account_meter_id: int
:param s... | PypiClean |
/HavNegpy-1.2.tar.gz/HavNegpy-1.2/docs/_build/doctrees/nbsphinx/_build/html/_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 |
/Flask-PW-2020-1.1.3.tar.gz/Flask-PW-2020-1.1.3/flask_pw/__init__.py | import logging
import os
from importlib import import_module
import peewee as pw
from cached_property import cached_property
from flask._compat import string_types
from peewee_migrate.router import Router
from playhouse.db_url import connect
from .models import Model, BaseSignalModel, Choices # noqa
__license__ = "... | PypiClean |
/MindustryCompiler-2.1-py3-none-any.whl/compiler/yacc/grammar/ifElseIf.py | from boa import boa
from ..classes import Jump
from ._start import grammar, YaccProduction, context
@grammar
def linesFromIf(p: YaccProduction):
'''lines : ifBlock'''
infoIf = p[1]
p[0] = genIfsLines(infoIf, None, [])
@grammar
def linesFromIfElse(p: YaccProduction):
'''lines : ifBlock elseBlock'''
... | PypiClean |
/BlueWhale3_Network-1.4.2-cp38-cp38-macosx_10_9_x86_64.whl/orangecontrib/network/network/readwrite.py | import shlex
from itertools import count, repeat
import numpy as np
import scipy.sparse as sp
from Orange.data.io import FileFormatMeta
from .base import Network, EdgeType
__all__ = ("read_pajek", "write_pajek", "PajekReader")
class NetFileFormat(metaclass=FileFormatMeta):
pass
class PajekReader(NetFileForma... | PypiClean |
/Corrfunc-2.5.1.tar.gz/Corrfunc-2.5.1/docs/source/modules/generate_bins.rst | .. _generate_bins:
*******************************************
Specifying the separation bins in Corrfunc
*******************************************
All of the python extensions for `Corrfunc` accept
either a filename or an array for specifying the
:math:`r_p` or :math:`\theta`.
Manually creating a file with arbit... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.