id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/Desire2Download-0.2.0beta.tar.gz/Desire2Download-0.2.0beta/d2d.py | import getopt
import re
from desire2download import Desire2Download
from desire2download import AuthError
from getpass import getpass
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
help_message = '''
Desire2Download
===============
Download all of the content from the University of Waterloo's
new learning m... | PypiClean |
/EQcorrscan-0.4.4.tar.gz/EQcorrscan-0.4.4/eqcorrscan/doc/tutorials/template-creation.rst | Template creation (old API)
===========================
Note: These tutorials are for the functional workflow - for details on creating
Template and Tribe objects see the :doc:`matched filter <matched-filter>` docs
page.
Simple example
--------------
Within :doc:`template_gen <../submodules/core.template_gen>` there... | PypiClean |
/MiniMock-1.2.8.tar.gz/MiniMock-1.2.8/minimock.py | r"""
minimock is a simple library for doing Mock objects with doctest.
When using doctest, mock objects can be very simple.
Here's an example of something we might test, a simple email sender::
>>> import smtplib
>>> def send_email(from_addr, to_addr, subject, body):
... conn = smtplib.SMTP('localhost... | PypiClean |
/DeepCellTL-0.12.5.tar.gz/DeepCellTL-0.12.5/deepcell/datasets/tracked.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from deepcell.datasets import Dataset
# pylint: disable=line-too-long
#:
nih_3t3 = Dataset(
path='3T3_NIH.trks',
url='https://deepcell-data.s3.amazonaws.com/tracked/3T3_NIH.trks',
file_hash='0d90... | PypiClean |
/Myghty-1.2.tar.gz/Myghty-1.2/doc/lib/highlight.py |
import re, StringIO, sys, string, os
import token, tokenize, keyword
# Highlighter - highlights Myghty and Python source code
__all__ = ['highlight', 'PythonHighlighter', 'MyghtyHighlighter']
pystyles = {
token.ENDMARKER : 'python_operator' ,
token.NAME : 'python_name' ,
token.NUMBER : 'python_number'... | PypiClean |
/Lifetimes-0.11.3-py3-none-any.whl/lifetimes/fitters/gamma_gamma_fitter.py | """Gamma-Gamma Model."""
from __future__ import print_function
from __future__ import division
import warnings
import pandas as pd
from autograd import numpy as np
from pandas import DataFrame
from autograd.scipy.special import gammaln
from . import BaseFitter
from ..utils import _check_inputs, _customer_lifetime_v... | PypiClean |
/Heterogeneous_Highway_Env-0.0.3-py3-none-any.whl/Heteogeneous_Highway_Env/envs/two_way_env.py | import numpy as np
from gym.envs.registration import register
from highway_env import utils
from highway_env.envs.common.abstract import AbstractEnv
from highway_env.road.lane import LineType, StraightLane
from highway_env.road.road import Road, RoadNetwork
from highway_env.vehicle.controller import MDPVehicle
class... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ckeditor/plugins/a11yhelp/dialogs/lang/bg.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","bg",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Общо",items:[{name:"Edit... | PypiClean |
/GuangTestBeat-0.13.1-cp38-cp38-macosx_10_9_x86_64.whl/econml/solutions/causal_analysis/_causal_analysis.py | import warnings
from collections import OrderedDict, namedtuple
import joblib
import lightgbm as lgb
from numba.core.utils import erase_traceback
import numpy as np
from numpy.lib.function_base import iterable
import pandas as pd
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.compose import Colu... | PypiClean |
/Django-EventAggregator-1.5.0.tar.gz/Django-EventAggregator-1.5.0/EventAggregator/event_dispatcher.py | import logging
import threading
import traceback
try:
from django.db import close_old_connections
except ImportError:
def close_old_connections():
pass
LOGGER = logging.getLogger(__name__)
class EventDispatcher(object):
def __init__(self):
self._events = {}
def __del__(self):
... | PypiClean |
/Firefly%20III%20API%20Python%20Client-1.5.6.post2.tar.gz/Firefly III API Python Client-1.5.6.post2/firefly_iii_client/model/auto_budget_period.py | import re # noqa: F401
import sys # noqa: F401
from firefly_iii_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,... | PypiClean |
/Moose-0.9.9b3.tar.gz/Moose-0.9.9b3/moose/apps/config.py | import os
from importlib import import_module
from moose.core.exceptions import ImproperlyConfigured
from moose.utils._os import upath
from moose.utils import six
from moose.utils.module_loading import module_has_submodule
from moose.conf import settings
ACTIONS_MODULE_NAME = 'actions'
CONFIGS_DIRNAME = 'configs'
CON... | PypiClean |
/Isomyr-0.1.tar.gz/Isomyr-0.1/isomyr/particle.py | from random import randint
from isomyr.objects import GravityObject, PhysicalObject
class Destructor(GravityObject):
"""
A class for objects which delete themselves when they collide with
another object.
die: Flag to say if the object should destroy itself: boolean
scene: The current scene of th... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/ui/v1/src/plugins/series/series.component.js | (function () {
'use strict';
angular
.module('plugins.series')
.component('seriesView', {
templateUrl: 'plugins/series/series.tmpl.html',
controllerAs: 'vm',
controller: seriesController
});
function seriesController($mdMedia, $mdDialog, $sce, $t... | PypiClean |
/KTextSurfaceWriter-0.1.0.tar.gz/KTextSurfaceWriter-0.1.0/ktextsurfacewriter.py |
import pygame
__author__ = "Keul - lucafbb AT gmail.com"
__version__ = "0.1.0"
__description__ = "A PyGame addon for display text over surface with many dimension bounds"
LL_CUT = "cut"
LL_SPLIT = "split"
LL_OVERFLOW = "overflow"
PL_OVERFLOW = "overflow"
PL_CUT = "cut"
class KTextSurfaceWriter(object):
"""Gene... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/uuid/generateTimeBasedUuid.js | if(!dojo._hasResource["dojox.uuid.generateTimeBasedUuid"]){
dojo._hasResource["dojox.uuid.generateTimeBasedUuid"]=true;
dojo.provide("dojox.uuid.generateTimeBasedUuid");
dojox.uuid.generateTimeBasedUuid=function(_1){
var _2=dojox.uuid.generateTimeBasedUuid._generator.generateUuidString(_1);
return _2;
};
dojox.uuid.gen... | PypiClean |
/3to2-1.1.1.zip/3to2-1.1.1/lib3to2/build.py | import os
from distutils import log
from distutils.command.build_py import build_py
from lib2to3 import refactor
from lib2to3 import pygram
class DistutilsRefactoringTool(refactor.RefactoringTool):
"""Refactoring tool for lib3to2 building"""
def __init__(self, fixers, options=None, explicit=None):
sup... | PypiClean |
/MPD_sima-0.18.2.tar.gz/MPD_sima-0.18.2/doc/source/man/mpd_sima.cfg.5.rst | ============
mpd_sima.cfg
============
DESCRIPTION
-----------
This manual page documents briefly ``mpd-sima`` configuration options available
in user configuration file (see `FILES <#files>`__).
EXAMPLES
--------
File tags queue mode (offline mode).
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here is an example of autoq... | PypiClean |
/Glask-0.0.23.tar.gz/Glask-0.0.23/glask/__init__.py | import sys
if '__pypy__' in sys.builtin_module_names:
import psycopg2cffi.compat
psycopg2cffi.compat.register()
from functools import wraps
from logging import StreamHandler, INFO
import functools
from flask import request, url_for, redirect
import flask
from flask.ext.debugtoolbar import DebugToolbarExtensio... | PypiClean |
/Mezzanine-6.0.0.tar.gz/Mezzanine-6.0.0/mezzanine/core/static/js/respond.min.js | window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML=... | PypiClean |
/BittyTax-0.5.1.tar.gz/BittyTax-0.5.1/src/bittytax/conv/mergers/etherscan.py |
import copy
import sys
from decimal import Decimal
from colorama import Back, Fore
from ...config import config
from ..datamerge import DataMerge, MergeDataRow
from ..exceptions import UnexpectedContentError
from ..out_record import TransactionOutRecord
from ..parsers.etherscan import (
ETHERSCAN_INT,
ETHERS... | PypiClean |
/Lantz-0.3.zip/Lantz-0.3/lantz/drivers/prior/nanoscanz.py | from pyvisa import constants
from lantz import Action, Feat
from lantz.messagebased import MessageBasedDriver
from lantz.errors import InstrumentError
class NanoScanZ(MessageBasedDriver):
"""Driver for the NanoScanZ Nano Focusing Piezo Stage from Prior.
"""
DEFAULTS = {'ASRL': {'write_termination': '\n... | PypiClean |
/FLaP-0.6.0.tar.gz/FLaP-0.6.0/flap/engine.py |
#
# This file is part of Flap.
#
# Flap 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 3 of the License, or
# (at your option) any later version.
#
# Flap is distributed in the hope that it wi... | PypiClean |
/Comet-3.1.0.tar.gz/Comet-3.1.0/comet/protocol/base.py |
# Twisted protocol definition
from twisted.internet import defer
from twisted.protocols.basic import Int32StringReceiver
# Comet
import comet.log as log
from comet.protocol.messages import ack, nak
# Constants
VOEVENT_ROLES = ('observation', 'prediction', 'utility', 'test')
class ElementSender(Int32StringReceiver):... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/bower_components/app-layout/app-scrollpos-control/README.md | ##<app-scrollpos-control>
app-scrollpos-control is a manager for saving and restoring the scroll position when multiple
pages are sharing the same document scroller.
Example:
```html
<app-scrollpos-control selected="{{page}}"></app-scrollpos-control>
<app-drawer-layout>
<app-drawer>
<paper-menu selecte... | PypiClean |
/MegEngine-1.13.1-cp37-cp37m-macosx_10_14_x86_64.whl/megengine/xla/rules/random.py | from typing import Sequence, Union
import numpy as np
from ...core._imperative_rt import ops as mops
from .. import ir_utils
from ..lib import xla_client as xc
from ..lib.mlir.dialects import hlo
from .hlotensor import HLOTensor
from .utils import _shape_equal, register_lower_rule
RandomAlgorithm = xc.ops.RandomAlgo... | PypiClean |
/FragPELE-2.1.1.tar.gz/FragPELE-2.1.1/README.rst | FrAG-PELE:
===========
A novel fragment-based growing tool for hit-to-lead in drug design
.. image:: docs/_images/movie_growing_phenyl.gif
:height: 100px
:width: 200 px
:scale: 100%
:align: center
Installation
=============
https://carlesperez94.github.io/frag_pele/installation.html
Getting Starte... | PypiClean |
/Brinson_api-1.0.1-py3-none-any.whl/Brinson/Brinson.py | import os
import time
# 0. 导入pandas库
import pandas as pd
# 1. 基准数据和投资组合数据预处理函数(补全行业分类和个股收益率)
'''
· 函数功能:基准数据和投资组合数据预处理函数(日期+代码+权重)
· 输入变量:benchmark_data, positions_data, industry_data, stock_return_data
· 输出变量:基准数据和投资组合数据补全数据(日期+代码+当日日终权重+行业+下一个交易日日终个股收益率),格式为DataFrame的list
· 数据格式:
1. industry_data:index为日期,colum... | PypiClean |
/bareon-0.0.1a3.tar.gz/bareon-0.0.1a3/bareon/utils/utils.py |
import copy
import hashlib
import json
import locale
import math
import os
import re
import shlex
import socket
import subprocess
import time
import difflib
import jinja2
from oslo_config import cfg
import requests
import six
import stevedore.driver
import urllib3
from bareon import errors
from bareon.openstack.com... | PypiClean |
/Heterogeneous_Highway_Env-0.0.3-py3-none-any.whl/Heteogeneous_Highway_Env/utils.py | import copy
import importlib
import itertools
from typing import Tuple, Dict, Callable, List, Optional, Union, Sequence
import numpy as np
# Useful types
Vector = Union[np.ndarray, Sequence[float]]
Matrix = Union[np.ndarray, Sequence[Sequence[float]]]
Interval = Union[np.ndarray,
Tuple[Vector, Vector... | PypiClean |
/FPGAflow-esdg-0.3.5.tar.gz/FPGAflow-esdg-0.3.5/fpgaflow/helpers/customlogging.py | import os
import sys
import yaml
import logging
import logging.config
def setup_logging(default_path='logging.yml', default_level=logging.INFO):
"""Setup logging configuration from a YAML file
Args:
default_path (str, optional): Defines the relative location of the logging configuration file,
... | PypiClean |
/KMMTR-1.1.3.tar.gz/KMMTR-1.1.3/README.md | 🤝🤝🤝 Please star ⭐️ it for promoting open source projects 🌍 ! Thanks !
# Python package - KMMTransferReg
A transfer learning regression model based on Kernel Mean Matching (KMM) algorithm
Written using Python, which is suitable for operating systems, e.g., Windows/Linux/MAC OS etc.
## Installing / 安装
pip i... | PypiClean |
/ESMValCore-2.9.0rc1.tar.gz/ESMValCore-2.9.0rc1/esmvalcore/_provenance.py | import copy
import logging
import os
from functools import total_ordering
from netCDF4 import Dataset
from PIL import Image
from PIL.PngImagePlugin import PngInfo
from prov.model import ProvDerivation, ProvDocument
from ._version import __version__
logger = logging.getLogger(__name__)
ESMVALTOOL_URI_PREFIX = 'https... | PypiClean |
/AutoSubtitles-0.0.1-py3-none-any.whl/audio2srt/audio2srt.py | from auditok import split
import math
import os
import re
import speech_recognition as sr
import pysrt
import time
from googletrans import Translator
# split the audio returns a generator of AudioRegion objects
def split_audio(audio_path, split_audio_path):
split_audio_file = split_audio_path + os.sep + "audio_sp... | PypiClean |
/Grevling-2.0.0-py3-none-any.whl/grevling/script.py | from __future__ import annotations
import asyncio
from collections import namedtuple
from contextlib import contextmanager
from dataclasses import field, InitVar, dataclass
import datetime
import os
from pathlib import Path
import shlex
from time import time as osclock
from typing import Dict, List, Optional, Union
... | PypiClean |
/Bubot_Core-0.1.19-py3-none-any.whl/BubotObj/OcfDevice/subtype/Device/RedisQueueMixin.py | import asyncio
from uuid import uuid4
import aioredis
import bson
from Bubot.Helpers.ExtException import ExtException, ExtNotImplemented
from Bubot.Ocf.OcfMessage import OcfMessage, OcfRequest as Request, OcfResponse as Response
class RedisQueueMixin:
def __init__(self, **kwargs):
self.redis_url = None
... | PypiClean |
/Gnosis_Utils-1.2.2.tar.gz/Gnosis_Utils-1.2.2/gnosis/indexer.py | __shell_usage__ = """
Shell Usage: [python] indexer.py [options] [search_words]
-h, /h, -?, /?, ?, --help: Show this help screen
-index: Add files to index
-reindex: Refresh files already in the index
(can take much more time)
... | PypiClean |
/DeepMuon-1.23.32.tar.gz/DeepMuon-1.23.32/.github/ISSUE_TEMPLATE/bug_report.md | ---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior... | PypiClean |
/OASYS1-SRW-1.1.106.tar.gz/OASYS1-SRW-1.1.106/orangecontrib/srw/widgets/optical_elements/ow_srw_screen.py | from numpy import nan
from syned.beamline.optical_elements.ideal_elements.screen import Screen
from wofry.propagator.propagator import PropagationManager
from wofrysrw.beamline.optical_elements.ideal_elements.srw_screen import SRWScreen
from wofrysrw.propagator.propagators2D.srw_propagation_mode import SRWPropagatio... | PypiClean |
/Autotest_api-1.0.3.tar.gz/Autotest_api-1.0.3/src/Autotest_api/validate.py | import re
def equals(check_value, expect_value):
check_value = None if check_value == 'None' else check_value
expect_value = None if expect_value == 'None' else expect_value
assert check_value == expect_value, f'{check_value}->{type(check_value)} == {expect_value}->{type(expect_value)}'
def less_than(ch... | PypiClean |
/Congo-0.0.1.tar.gz/Congo-0.0.1/portfolio/component/static/portfolio/vendor/bootstrap-tokenfield/bootstrap-tokenfield.min.js | ! function(a) {
"function" == typeof define && define.amd ? define(["jquery"], a) : "object" == typeof exports ? module.exports = global.window && global.window.$ ? a(global.window.$) : function(b) {
if (!b.$ && !b.fn) throw new Error("Tokenfield requires a window object with jQuery or a jQuery instance");
... | PypiClean |
/Kivy-2.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/kivy/uix/recycleboxlayout.py | from kivy.uix.recyclelayout import RecycleLayout
from kivy.uix.boxlayout import BoxLayout
__all__ = ('RecycleBoxLayout', )
class RecycleBoxLayout(RecycleLayout, BoxLayout):
_rv_positions = None
def __init__(self, **kwargs):
super(RecycleBoxLayout, self).__init__(**kwargs)
self.funbind('chil... | PypiClean |
/NEMO-4.6.3-py36-none-any.whl/resources/splash_pad_settings.py | DEBUG = True
FIXTURE_DIRS = ['/nemo/']
ALLOWED_HOSTS = ["*"]
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
AUTH_USER_MODEL = 'NEMO.User'
WSGI_APPLICATION = 'NEMO.wsgi.application'
ROOT_URLCONF = 'NEMO.urls'
LOGIN_URL = 'login'
LOGIN_REDIRECT_URL = 'login'
DATETIME_FORMAT = "l, F jS, Y @ g:i A"
SHORT_DATETIME_FORM... | PypiClean |
/NAT-PMP-1.3.2.tar.gz/NAT-PMP-1.3.2/skeleton.md | # Overview
This project is merged with [skeleton](https://github.com/jaraco/skeleton). What is skeleton? It's the scaffolding of a Python project jaraco [introduced in his blog](https://blog.jaraco.com/a-project-skeleton-for-python-projects/). It seeks to provide a means to re-use techniques and inherit advances when ... | PypiClean |
/AST_data_eng-0.0.5.tar.gz/AST_data_eng-0.0.5/AST_data_eng/correct_labels.py | def reclassify_narrow_closed_roof_and_closed_roof_tanks(xml_path):
""" Reclassify Narrow Closed Roof and Closed Roof Tanks
"""
#load each xml
class_ob = []
tree = et.parse(xml_path)
root = tree.getroot()
for obj in root.iter('object'):
name = obj.find("name").text
xmlbox = o... | PypiClean |
/GoogleScraper-0.2.4.tar.gz/GoogleScraper-0.2.4/README.md | # GoogleScraper - Scraping search engines professionally
## New News - August 2018
For questions you can [contact me on my wegpage](https://incolumitas.com/) and write me an email there.
This project is back to live after two years of abandonment. In the coming weeks, I will take some time to update all functionalit... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/widget/AutoRotator.js.uncompressed.js | define("dojox/widget/AutoRotator", ["dijit","dojo","dojox","dojo/require!dojox/widget/Rotator"], function(dijit,dojo,dojox){
dojo.provide("dojox.widget.AutoRotator");
dojo.require("dojox.widget.Rotator");
(function(d){
d.declare("dojox.widget.AutoRotator", dojox.widget.Rotator, {
// summary:
// A rotator that a... | PypiClean |
/Adviser-Rocksdb-0.0.1.tar.gz/Adviser-Rocksdb-0.0.1/advisor/ini_parser.py |
from enum import Enum
class IniParser:
class Element(Enum):
rule = 1
cond = 2
sugg = 3
key_val = 4
comment = 5
@staticmethod
def remove_trailing_comment(line):
line = line.strip()
comment_start = line.find('#')
if comment_start > -1:
... | PypiClean |
/LMSQuery_fork-0.5.25-py3-none-any.whl/lmsquery/lmsquery.py |
# In[14]:
#get_ipython().run_line_magic('alias', 'nbconvert nbconvert ./lmsquery.ipynb')
#get_ipython().run_line_magic('nbconvert', '')
# In[13]:
import requests
import json
import datetime
# from . import const
# from . import scanLMS
import socket
try:
from . import const
except ImportError as e:
... | PypiClean |
/CI_methods_analyser-1.1.0.tar.gz/CI_methods_analyser-1.1.0/CI_methods_analyser/CI_efficacy.py | from typing import Callable, Literal, Tuple, Union
from abc import ABC, abstractmethod
from matplotlib.figure import Figure
CI_method = Callable[
...,
Tuple[float, float]
]
# sort of "supported" themes. The type has to include "default"
plot_styles = Literal["default", "dark_background", "classic"]
clas... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/ding/policy/dqfd.py | from typing import List, Dict, Any, Tuple
from collections import namedtuple
import copy
import torch
from torch.optim import AdamW
from ding.torch_utils import Adam, to_device
from ding.rl_utils import q_nstep_td_data, q_nstep_td_error, get_nstep_return_data, get_train_sample, \
dqfd_nstep_td_error, dqfd_nstep_td_... | PypiClean |
/FFGo-1.12.7-py3-none-any.whl/ffgo/constants.py | import os
import platform
import textwrap
from os.path import expanduser, join, pardir, normpath
PROGNAME = 'FFGo' # may be needed for some of these imports
from .version import __version__ as PROGVERSION
from . import misc
from .misc import resourceFilename
# FFGo-related constants
NAME_WITH_VERSION =... | PypiClean |
/CoreTracker-1.5.3.tar.gz/CoreTracker-1.5.3/coretracker/classifier/model_old/__init__.py |
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along w... | PypiClean |
/ORG.asm-1.0.3.tar.gz/ORG.asm-1.0.3/doc/sphinx/source/commands/index.rst | .. _oa_index:
The :program:`index` command
============================
|Orgasm|'s :program:`index` command indexes
lexicographicaly a set of sequence reads to make them usable by the
assembler.
The constraints of the |orgasm|
-------------------------------
|Orgasm| was developed to deal with Illumina
paired-end r... | PypiClean |
/Grimsel-0.9.0.tar.gz/Grimsel-0.9.0/README.rst | ==========
Grimsel
==========
**G**\ene\ **R**\al **I**\ntegrated **M**\odeling environment for the **S**\upply of **E**\lectricity and **L**\ow-temperature heat
* Linear/Quadratic programming framework for the cost-optimization of operation and composition of multi-carrier energy systems
* Based on Pyomo
* Input giv... | PypiClean |
/Chips-0.1.2.tar.gz/Chips-0.1.2/chips/VHDL_plugin/external_ip.py |
__author__ = "Jon Dawson"
__copyright__ = "Copyright 2010, Jonathan P Dawson"
__license__ = "MIT"
__version__ = "0.1.2"
__maintainer__ = "Jon Dawson"
__email__ = "chips@jondawson.org.uk"
__status__ = "Prototype"
def write(plugin, stream):
identifier = stream.get_identifier()
instance = stream
definition ... | PypiClean |
/EcoFin-1.3.tar.gz/EcoFin-1.3/[TMP]/3_strategyTester_bis.py | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from tqdm import tqdm
# -------------------------[Set-up]-------------------------
ticker_list = [line.rstrip('\n') for line in open(r'../INDEXs/DJIA.txt')]
maturity_min = 15
base_path = r'../Export/BackTest'
start_date = 0
weights = 'OI'
# -----... | PypiClean |
/LiMiC-0.3.20.tar.gz/LiMiC-0.3.20/limic/render.js | {%% macro header(this, kwargs) %%}
<link rel="stylesheet" href="https://rawcdn.githack.com/marslan390/BeautifyMarker/master/leaflet-beautify-marker-icon.css"/>
<script src="https://rawcdn.githack.com/marslan390/BeautifyMarker/master/leaflet-beautify-marker-icon.js"></script>
{%% endmacro %%}
{%% macro script(this, kwar... | PypiClean |
/Flask-Restless-Zx-0.20.0.tar.gz/Flask-Restless-Zx-0.20.0/flask_restless/manager.py | from collections import defaultdict
from collections import namedtuple
import flask
from flask import Blueprint
from .helpers import primary_key_name
from .helpers import url_for
from .views import API
from .views import FunctionAPI
#: The set of methods which are allowed by default when creating an API
READONLY_MET... | PypiClean |
/guibits-1.0-py3-none-any.whl/src/guibits1_0/command_listing.py |
# version 25 Aug 2022 09:57
from . import coloring, font_styling, type_checking2_0
import threading
"""
Copyright (C) 2014,2105,2016,2017,2020,2021,2022 R.N.Bosworth
This program 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 ... | PypiClean |
/NeatLogger-0.0.1.tar.gz/NeatLogger-0.0.1/README.md | # NeatLogger
Convenient wrapper for logging python applications with options to add color, select logging style, rotate files by size and time, etc.
Output from [`demo.py`](https://github.com/srtamrakar/python-logger/blob/master/demo.py):
:
""" Binomial distribution class for calculating and
visualizing a Binomial distribution.
Attributes:
mean (float) representing the mean value of the distribution
std... | PypiClean |
/AI_Cdvst-0.4.tar.gz/AI_Cdvst-0.4/AI_Cdvst/__init__.py | import os
import openai
import tkinter as tk
from tkinter import messagebox
import logging
###----------------------###
###-- OpenAICodeEditor --###
###----------------------###
class OpenAICodeEditor:
"""
Diese Klasse ermöglicht es, Code oder Texte mit Hilfe von OpenAI-Modellen zu bearbeiten.
"""
de... | PypiClean |
/Lantz-0.3.zip/Lantz-0.3/docs/guides/via-methods.rst | .. _via-methods:
==========================================
Avoiding Resource Names: the *via* methods
==========================================
While resource names provide a comprehensive way to address devices in many cases you want a simpler and succint way to do it. :class::MessageBasedDriver provide special me... | PypiClean |
/ImSwitchUC2-2.1.0.tar.gz/ImSwitchUC2-2.1.0/imswitch/imcontrol/model/interfaces/tiscamera.py | import numpy as np
from imswitch.imcommon.model import initLogger
from .pyicic import IC_ImagingControl
class CameraTIS:
def __init__(self, cameraNo):
super().__init__()
self.__logger = initLogger(self, tryInheritParent=True)
ic_ic = IC_ImagingControl.IC_ImagingControl()
ic_ic.in... | PypiClean |
/ConcurrentEvents-1.12.5.tar.gz/ConcurrentEvents-1.12.5/concurrentevents/eventmanager.py | import collections
import concurrent.futures
import logging
import time
from datetime import timedelta
from concurrentevents._exceptions import Cancel, StartError, EventError, HandlerError
from concurrentevents.tools.threadmonitor import thread_monitoring
logger = logging.getLogger('concurrentevents')
class EventMa... | PypiClean |
/Gbtestapi0.4-0.1a10.tar.gz/Gbtestapi0.4-0.1a10/src/gailbot/services/organizer/source/source_manager.py | from typing import List, Dict, Union
import os
from .source_object import SourceObject
from ..settings import SettingObject
from gailbot.core.utils.general import get_name, is_file, is_directory, is_path
from gailbot.core.utils.logger import makelogger
from gailbot.configs import workspace_config_loader
OUTPUT_EXTENSI... | PypiClean |
/BobBuildTool-0.23.1.tar.gz/BobBuildTool-0.23.1/pym/bob/cmds/build/clean.py |
from ...builder import LocalBuilder, checkoutsFromState
from ...input import RecipeSet
from ...scm import getScm, ScmTaint, ScmStatus
from ...share import getShare
from ...state import BobState
from ...tty import colorize, ERROR, WARNING, EXECUTED, DEFAULT, Warn
from ...utils import removePath, processDefines
import a... | PypiClean |
/Benevolent_Blackjack-1.0-py3-none-any.whl/bbj/Blackjack.py |
import datetime
import getopt
import random
from bbj.BJCardCount import BJCardCount, isStrategyKnown
from bbj.BJCardCountQuiz import BJCardCountQuiz
from bbj.BJComps import chooseComp
from bbj.BJCoplayer import BJCoplayer
from bbj.BJDealer import BJDealer, Male, Female
from bbj.BJDeck import BJDeck, numSuits
from bbj... | PypiClean |
/Lantz-0.3.zip/Lantz-0.3/lantz/feat.py | import time
import copy
from weakref import WeakKeyDictionary
from . import Q_
from .processors import (Processor, ToQuantityProcessor, FromQuantityProcessor,
MapProcessor, ReverseMapProcessor, RangeProcessor)
class _NamedObject(object):
"""A class to construct named sentinels.
"""
... | PypiClean |
/Komoe-0.4.0-py3-none-any.whl/komoe/markdown.py |
import markdown
from abc import ABC, abstractmethod
from . import log
class Markdown:
"""Wrappper around `markdown.Markdown`."""
def __init__(self):
self.__md = None
self.__template = None
self.__title = ""
self.__default_extensions = [
"attr_list",
... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/secure/sandbox.js | define(["dijit","dojo","dojox","dojo/require!dojox/secure/DOM,dojox/secure/capability,dojo/NodeList-fx,dojo/_base/url"],function(_1,_2,_3){
_2.provide("dojox.secure.sandbox");
_2.require("dojox.secure.DOM");
_2.require("dojox.secure.capability");
_2.require("dojo.NodeList-fx");
_2.require("dojo._base.url");
(function()... | PypiClean |
/mysmile-0.7.2.tar.gz/mysmile-0.7.2/apps/pages/admin.py | import os
from django.contrib import admin
from django.conf import settings
from apps.pages.models import Page, Page_translation
from apps.pages.forms import Page_translationInlineForm, PageForm
class Page_translationInline(admin.StackedInline):
model = Page_translation
form = Page_translationInlineForm
... | PypiClean |
/MeUtils-2023.8.29.13.9.44-py3-none-any.whl/meutils/fileparser/filetype/helpers.py |
from __future__ import absolute_import
from .types import TYPES
from .match import (
image_match, font_match, document_match,
video_match, audio_match, archive_match
)
def is_extension_supported(ext):
"""
Checks if the given extension string is
one of the supported by the file matchers.
Args... | PypiClean |
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/lattices/SGT.py | import genice2.lattices
desc = {
"ref": {
"engel31": "Engel 2018",
"SGT": "IZA Database"
},
"usage": "No options available.",
"brief": "Hypothetical zeolitic ice"
}
class Lattice(genice2.lattices.Lattice):
def __init__(self):
self.bondlen = 0.30360000000000026
self.... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/ats/api/passthrough_api.py | import re # noqa: F401
import sys # noqa: F401
from MergePythonSDK.shared.api_client import ApiClient, Endpoint as _Endpoint
from MergePythonSDK.shared.model_utils import ( # noqa: F401
check_allowed_values,
check_validations,
date,
datetime,
file_type,
none_type,
validate_and_convert_ty... | PypiClean |
/M_robot-0.39.tar.gz/M_robot-0.39/robot.py | import numpy as np
import pohyb as poh
import funkcie as fun
class Gyro(object):
"""gyroskop senzor"""
def __init__(self,gyro_start_angle = 0):
self.gyro_angle = 0
def get_gyro_angle(self):
return self.gyro_angle
def set_gyro_angle(self,angle):
self.gyro_angle = angle
r... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/full/vendor/promise.js | (function(v,w){"object"===typeof exports&&"undefined"!==typeof module?module.exports=w():"function"===typeof define&&define.amd?define(w):v.ES6Promise=w()})(this,function(){function v(a){return"function"===typeof a}function w(){return function(){return process.nextTick(n)}}function R(){return"undefined"!==typeof B?fun... | PypiClean |
/Caroline-presentation-0.2.4.tar.gz/Caroline-presentation-0.2.4/caroline/html_dist/js/mathjax/input/tex/extensions/cancel.js | !function(n){var a={};function o(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=n,o.c=a,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d... | PypiClean |
/LEPL-5.1.3.zip/LEPL-5.1.3/src/lepl/_example/matchers.py |
# pylint: disable-msg=W0401,C0111,W0614,W0622,C0301,C0321,C0324,C0103
# (the code style is for documentation, not "real")
#@PydevCodeAnalysisIgnore
'''
Examples from the documentation.
'''
from lepl import *
from lepl._example.support import Example
class MatcherExample(Example):
# this needs to be comple... | PypiClean |
/Kato-FlaskAppBuilder-1.1.14.tar.gz/Kato-FlaskAppBuilder-1.1.14/flask_appbuilder/base.py | import logging
from flask import Blueprint, url_for, current_app
from .views import IndexView, UtilView
from .filters import TemplateFilters
from .menu import Menu
from .babel.manager import BabelManager
from .version import VERSION_STRING
from .const import LOGMSG_WAR_FAB_VIEW_EXISTS, \
LOGMSG_ERR_... | PypiClean |
/Common_Crawl_Extractor-0.8.0-py3-none-any.whl/cmoncrawl/middleware/artemis.py | from datetime import datetime
import json
from typing import List
from cmoncrawl.aggregator.index_query import IndexAggregator
from cmoncrawl.common.loggers import all_purpose_logger
import asyncio
from dataclasses import dataclass
from datetime import datetime, timedelta
import os
from pathlib import Path
import rand... | PypiClean |
/AQoPA-0.9.5.tar.gz/AQoPA-0.9.5/aqopa/module/timeanalysis/gui.py |
import os
import re
import wx
import wx.animate
import wx.lib.scrolledpanel as scrolled
import wx.lib.delayedresult
from aqopa.model import name_indexes
from aqopa.bin import gui as aqopa_gui
from aqopa.simulator.error import RuntimeException
from aqopa.gui.combo_check_box import ComboCheckBox
from aqopa.gui.general_... | PypiClean |
/Ibid-0.1.1.tar.gz/Ibid-0.1.1/ibid/plugins/google.py |
from httplib import BadStatusLine
import re
from urllib import urlencode
from ibid.compat import ElementTree
from ibid.config import Option
from ibid.plugins import Processor, match
from ibid.utils import decode_htmlentities, json_webservice
from ibid.utils.html import get_html_parse_tree
features = {'google': {
... | PypiClean |
/FontCollector-2.1.2-py3-none-any.whl/font_collector/font_backup_for_variable_font.py | import logging
import os
from .font_parser import FontParser
from fontTools.ttLib.tables._c_m_a_p import CmapSubtable
from fontTools.ttLib.ttFont import TTFont
from fontTools.ttLib.ttCollection import TTCollection
from typing import List, Sequence, Set
_logger = logging.getLogger(__name__)
class Font:
filename: ... | PypiClean |
/ChineseCalendarYf-1.2-py3-none-any.whl/chinese_calendar/constants.py | from __future__ import absolute_import, unicode_literals
import datetime
from enum import Enum
class Holiday(Enum):
def __new__(cls, english, chinese, days):
obj = object.__new__(cls)
obj._value_ = english
obj.chinese = chinese
obj.days = days
return obj
new_years_da... | PypiClean |
/NodeGraphQt_QuiltiX_fork-0.6.0.tar.gz/NodeGraphQt_QuiltiX_fork-0.6.0/NodeGraphQt/qgraphics/node_overlay_disabled.py | from Qt import QtGui, QtCore, QtWidgets
from NodeGraphQt.constants import Z_VAL_NODE_WIDGET
class XDisabledItem(QtWidgets.QGraphicsItem):
"""
Node disabled overlay item.
Args:
parent (NodeItem): the parent node item.
text (str): disable overlay text.
"""
def __init__(self, paren... | PypiClean |
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/node_modules/typescript/lib/lib.es2018.intl.d.ts |
declare namespace Intl {
// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories
type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other";
type PluralRuleType = "cardinal" | "ordinal";
interface PluralRulesOptions {
localeMatcher?: "lookup" | ... | PypiClean |
/KratosStructuralMechanicsApplication-9.4-cp310-cp310-win_amd64.whl/KratosMultiphysics/StructuralMechanicsApplication/python_solvers_wrapper_structural.py | import KratosMultiphysics
# Other imports
from importlib import import_module
def CreateSolverByParameters(model, solver_settings, parallelism):
solver_type = solver_settings["solver_type"].GetString()
if solver_settings.Has("time_integration_method"):
time_integration_method = solver_settings["time... | PypiClean |
/ImageD11-1.9.9.tar.gz/ImageD11-1.9.9/sandbox/ftomo.py | from __future__ import print_function
import math, numpy, time
from ImageD11 import cImageD11
from fabio.openimage import openimage
print("Using class version")
class fourier_radial(object):
""" Cache results for re-use where possible on next layer """
def __init__(self, dims, theta=None):
self.dims... | PypiClean |
/MezzanineFor1.7-3.1.10.tar.gz/MezzanineFor1.7-3.1.10/mezzanine/utils/models.py | from __future__ import unicode_literals
from functools import partial
from future.utils import with_metaclass
from django import VERSION
from django.conf import settings
from django.contrib.auth import get_user_model
from django.core.exceptions import ImproperlyConfigured
from django.db.models import Model, Field
from... | PypiClean |
/BRAILS-3.0.1.tar.gz/BRAILS-3.0.1/brails/modules/FacadeParser/infer.py | import requests
import math
import torch
import cv2
import os
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from PIL import Image
import torchvision.transforms as T
from shapely.geometry import Point, LineString, Polygon
import json
from tqdm import tqdm
key = ""
gpu_enabled = True
model_path ... | PypiClean |
/MegEngine-1.13.1-cp37-cp37m-macosx_10_14_x86_64.whl/megengine/module/quantized/conv.py | from typing import Tuple, Union
import numpy as np
from ... import module as Float
from ...core.tensor import dtype
from ...functional.nn import conv_bias_activation, pad
from ...functional.quantized import conv_transpose2d
from ...tensor import Parameter
from ..qat import conv as QAT
from .module import QuantizedMod... | PypiClean |
/dragonflow-4.0.0.tar.gz/dragonflow-4.0.0/dragonflow/db/models/service.py |
from jsonmodels import fields
import six
import time
import uuid
from dragonflow import conf as cfg
import dragonflow.db.field_types as df_fields
import dragonflow.db.model_framework as mf
from dragonflow.db.models import core
SERVICE_ID_NAMESPACE = uuid.UUID('cf6b6d03-8eb8-473a-8058-ff5a44fb2ba9')
def generate_s... | PypiClean |
/GraphvizAnim-1.1.0-py3-none-any.whl/gvanim/animation.py |
from __future__ import absolute_import
from email.utils import quote
import shlex
from gvanim import action
class ParseException( Exception ):
pass
class Step( object ):
def __init__( self, step = None ):
if step:
self.V = step.V.copy()
self.E = step.E.copy()
self.lV = step.lV.copy()
self.lE = ste... | PypiClean |
/BlueWhale3-3.31.3.tar.gz/BlueWhale3-3.31.3/Orange/tree.py |
from collections import OrderedDict
import numpy as np
import scipy.sparse as sp
from Orange.base import TreeModel as TreeModelInterface
class Node:
"""Tree node base class; instances of this class are also used as leaves
Attributes:
attr (Odange.data.Variable): The attribute used for splitting
... | PypiClean |
/BlueWhale3_Network-1.4.2-cp38-cp38-macosx_10_9_x86_64.whl/orangecontrib/network/network/twomode.py | from collections import namedtuple
import numpy as np
import scipy.sparse as sp
from orangecontrib.network import Network
from orangecontrib.network.i18n_config import *
def __(key):
return i18n.t('network.twomode.' + key)
NoWeights, WeightConnections, WeightWeightedConnections,\
WeightGeo, WeightGeoDeg, ... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/standard/plugins/specialchar/dialogs/lang/af.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","af",{euro:"Euroteken",lsquo:"Linker enkelkwotasie",rsquo:"Regter enkelkwotasie",ldquo:"Linker dubbelkwotasie",rdqu... | PypiClean |
/Curp-1.3.1.tar.gz/Curp-1.3.1/curp/current/base.py | from __future__ import print_function
import os, sys
import time
import numpy
# curp modules
topdir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
if topdir not in sys.path: sys.path.insert(0, topdir)
from utility import TimeStore
import clog as logger
#############################################... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.