Saravanan666/pypi-org huggingface dataset:
Package: tempcf
TEMPCF: Cleaning and Filtering for Ground Temperature DataThis package provides a graphical user interface for viewing, flagging, and cleaning ground temperature data for permafrost applications. It is designed to work with a variety of different input data types including data loggers, and databases. It uses read / write functionality provided by theteaspoonpackage (Brown, 2022).For a full description of the package, including some examples, please see thedocumentation pages.How to get tempcfThere are a few ways to get tempcf running on your computer.Install from pipYou can install tempcf with pip:pip install tempcfThen you can run it from the command line with:tempcfRunning pre-compiled executablesAs an alternative to command-line installation, its possible to download the latest files from theReleasespage of the GitLab repository. This requires no coding experience whatsoever, but only works on Windows and Linux at the moment. These also won't be the most up-to-date versions.If you are familiar with python and would rather run tempf from the source code, follow the instructions below. This is the preferred option if you intend to contribute, or if you want to make any modifications.Install from sourceStep 1: Download the filesgit clone https://gitlab.com/permafrostnet/permafrost-tempcfStep 2: Create a virtual environmentThis makes sure that the python packages that get installed don't conflict with other python packages you might have installed.
On Mac or Linux, make sure to replace '' with '/' in the last line.cd permafrost-tempcf
python -m venv env
.\env\Scripts\activateStep 3: Install tempcfThese commands will install the required dependencies, and launch tempcfpython setup.py install
cd tempcf
python main.py
Package: tempdb
Spawn temporary PostgreSQL clusters for use in unit tests. This is alpha quality
software and the API may change between version.UsageThe following example shows how to create a temporary database withpytest.importpsycopg2importpytestfromcontextlibimportclosingfromtempdbimportfind_postgres_bin_dir,PostgresFactory@pytest.fixturedefconn():# Try to discover a directory where PostgreSQL is installed. If you# have installed it in a non-standard location you must replace# pg_bin_dir with the path to the binary directory for your# installation.## It is possible to provide a specific version as an argument if there# are multiple versions to choose from. The highest available version# is chosen by default.pg_bin_dir=find_postgres_bin_dir()ifpg_bin_dirisNone:pytest.skip("Unable to locate a PostgreSQL installation")# The factory is bound to a particular PostgreSQL version and can be# used to create an arbitrary number of clustersfactory=PostgresFactory(pg_bin_dir)# A cluster is an actual running instance of PostgreSQL. By default a# cluster doesn't have any databases apart from the defaults. It is# possible to create new databases using the method# .create_database(name, template=None)withclosing(factory.create_temporary_cluster())ascluster:tmp_db=cluster.create_database("tmp")yieldpsycopg2.connect(tmp_db.dsn)deftest_create_tables(conn):withconn.cursor()asc:c.execute("""
            CREATE TABLE test(
                id SERIAL,
                name VARCHAR
            )
        """)c.execute("INSERT INTO test(name) VALUES (%s), (%s)",["Abel","Cain",])c.execute("SELECT name FROM test ORDER BY id")assert[nameforname,inc.fetchall()]==["Abel","Cain",]ChangelogVersion 0.1.0Released on 3rd June, 2019Initial release
Package: temp-dec
Supervised Learning Function for Neural dataThis toolbox facilitates neural decoding of time series. Under the hood it uses scikit-learn functions.Set-upInstall using pip (https://pypi.org/project/temp-dec/)pip install temp_decRequirementssklearn==0.21.3numpy==1.13.1scipy==0.19.1Python implementationThis function takes in the data X (ndarray; trials by features by time), labels y (ndarray; vector).fromtemp_decimportdecoding_functionsdecoding_functions.temporal_decoding(X,y)Using a sliding time windowIf there is information in the temporal dynamics of the signal, using a sliding time window will increase decoding accuracy (and smooth the signal). We can also demean the signal within each window, this avoids the issue of baselining.size_window=5demean=TrueApplying PCAIf you use a large amount of features, you might want to consider applying PCA to your features before applying your classifier. In addition, classifiers are sensitive to noise rejecting noise components from the data can be beneficial.
You can also regulate how many components you would like to keep (setting the pca_components variant to > 1) or how much variance you would like to explain (setting the pca_components variant to < 1). As a general rule of thumb maintaining 95% of variance will maintain enough signal and reduces feature space. Ifpca_components = 1then 100% of the variance will be maintained so no PCA is applied.pca_components=.95ClassifiersDifferent classifiers are supported, selected in accordance with Grootwagers et al (2017) j.cogn.neurosci.LDA: linear disciminant analysisLG: logistic regressionGNB: Gaussian Naive Bayesmaha: Nearest Neighbours using mahalanobis distance.classifier='LDA'with the amounts of stratified cross-validations (kfold) adjusted with the following flag, 5-fold by default.n_folds=5All options incorporatedoutput=decoding_functions.temporal_decoding(data,labels,n_folds=5,classifier='LDA',pca_components=.95,size_window=20,demean=True)
Package: temp_dir
Change into newly created temporary directory for executing a block of code.Upon leaving the code block the temporary directory and all its contents are
removed and the original working directory is restored.Intended as a tool to ease “integration” testing.The package contains only two functions:in_temp_dirto be used with thewithstatement
andwithin_temp_dirto decorate a function.ExamplesFunction decorator:@within_temp_dir
def f():
    return os.getcwd()


class TestScript(unittest.TestCase):

    @within_temp_dir
    def test_output_file_created(self):
        self.create_input_file()
        call_script('input')
        self.assertTrue(os.path.exists('output'))Context manager:with in_temp_dir():
    with open('tempfile', 'w') as f:
        f.write(...)
    process_file('tempfile')Similar functionality elsewhereSimilar functionality can be found attest.test_support.temp_cwd
(http://docs.python.org/3/library/test.html#test.support.temp_cwd)
in the Python distribution
- temp_cwd is quite close to this module,
unfortunately it is not in the standard library,
but packaged together with the regression tests.
temp_cwd’s source shows some special cases
and runs the code in a directory that can be guessedtempdir (https://bitbucket.org/another_thomas/tempdir)tempdirs (https://github.com/thelinuxkid/tempdirs)
- for creating any number of temporary directoriespath.py (https://github.com/jaraco/path.py/blob/master/path.py)
- tempdir at the end of the file
Package: tempdirs
Descriptiontempdirs is a library which allows users to safely and cleanly create
any number of temporary directories. Temporary directories are
automatically deleted. It was created as a testing utility.InstallationInstall using pip:pip install pyuspsor easy_install:easy_install pyuspsExamplesYou can tempdirs.makedirs as a decorator passing in the number of
temporary directories needed:import os

import tempdirs

@tempdirs.makedirs(2)
def test_foo(**kwargs):
    (srcdir, dstdir) = kwargs['tempdirs_dirs']
    srcfile = os.path.join(srcdir,'foo')
    dstfile = os.path.join(dstdir,'bar')
    with open(srcfile, 'w') as fp:
        fp.write('src content\n')
    with open(dstfile, 'w') as fp:
        fp.write('dst content\n')You can also use tempdirs.makedirs as a Context Manager:import os

import tempdirs

with tempdirs.makedirs(2) as (srcdir, dstdir):
    srcfile = os.path.join(srcdir,'foo')
    dstfile = os.path.join(dstdir,'bar')
    with open(srcfile, 'w') as fp:
        fp.write('src content\n')
    with open(dstfile, 'w') as fp:
        fp.write('dst content\n')DevelopingExternal dependenciespython-devpython-setuptoolspython-virtualenvSetupTo start developing run the following commands from the project’s base
directory. You can download the source fromhttps://github.com/thelinuxkid/tempdirs:# I like to install the virtual environment in a hidden repo.
virtualenv .virtual
# I leave the magic to Ruby developers (.virtual/bin/activate)
.virtual/bin/python setup.py develop
Package: temp-discordpy-without-websockets-requirement
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.Key FeaturesModern Pythonic API usingasyncandawait.Proper rate limit handling.100% coverage of the supported Discord API.Optimised in both speed and memory.InstallingPython 3.5.3 or higher is requiredTo install the library without full voice support, you can just run the following command:# Linux/OS Xpython3-mpipinstall-Udiscord.py# Windowspy-3-mpipinstall-Udiscord.pyOtherwise to get voice support you should run the following command:# Linux/OS Xpython3-mpipinstall-Udiscord.py[voice]# Windowspy-3-mpipinstall-Udiscord.py[voice]To install the development version, do the following:$gitclonehttps://github.com/Rapptz/discord.py$cddiscord.py$python3-mpipinstall-U.[voice]Optional PackagesPyNaCl (for voice support)Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g.apt,yum, etc) before running the above commands:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.6-devfor Python 3.6)Quick ExampleimportdiscordclassMyClient(discord.Client):asyncdefon_ready(self):print('Logged on as',self.user)asyncdefon_message(self,message):# don't respond to ourselvesifmessage.author==self.user:returnifmessage.content=='ping':awaitmessage.channel.send('pong')client=MyClient()client.run('token')Bot Exampleimportdiscordfromdiscord.extimportcommandsbot=commands.Bot(command_prefix='>')@bot.command()asyncdefping(ctx):awaitctx.send('pong')bot.run('token')You can find more examples in the examples directory.LinksDocumentationOfficial Discord ServerDiscord API
Package: tempeh
tempehtempeh is a framework toTEstMachine learningPErformanceexHaustivelywhich includes tracking memory usage and run time. This is particularly useful as a pluggable tool for your repository's performance tests. Typically, people want to run them periodically over various datasets and/or with a number of models to catch regressions with respect to run time or memory consumption. This should be as easy asimportpytestfromtimeimporttimefromtempeh.configurationsimportdatasets,models@pytest.mark.parametrize('Dataset',datasets.values())@pytest.mark.parametrize('Model',models.values())deftest_fit_predict_regression(Dataset,Model):dataset=Dataset()X_train,X_test=dataset.get_X()y_train,y_test=dataset.get_y()model=Model()max_execution_time=get_max_execution_time(dataset,model)ifmodel.compatible_with_dataset(dataset):start_time=time()model.fit(X_train,y_train)model.predict(X_test)duration=time()-start_timeassertduration<max_execution_timeInstallationtempeh depends on various packages to provide models, includingtensorflow,torch,xgboost,lightgbm. To install a release version oftempehjust runpipinstalltempehCommon issuesIf you're using a 32-bit Python version you might need to switch to a 64-bit Python version first to successfully install tensorflow.If the installation oftorchfails try using the recommendation from thepytorch websitefor stable versions without CUDA for your python version on your operating system.If the installation oflightgbmorxgboostfails try to use a pip version less than 20.0 until their bug is resolved.StructureDatasetsDatasets (located in thedatasets/directory) encapsulate different datasets used for testing.To add a new oneCreate a python file in thedatasets/directory with naming convention[name]_datasets.pySubclassBasePerformanceDatasetWrapper. The naming convention is[dataset_name]PerformanceDatasetWrapperIn__init__load the dataset and callsuper().__init__(data, targets, size)Add the class to__init__.pyMake sure the class contains class variablestask,data_type,sizeAdd an entry to thedatasetsdictionary inconfigurations.py.ModelsModels (models/directory) wrap different machine learning models.To add a new oneCreate a python file in themodels/directory with naming convention[name]_model.pySubclassBaseModelWrapperand name the class[name]ModelWrapperIn__init__train the model; we expect format__init__(self, ...)Models must containtasksandalgorithmAdd an entry to themodelsdictionary inconfigurations.py.MaintainersIn alphabetical order:Eduardo de LeonIlya MatiachRoman LutzContributingTo contribute please check ourContributing Guide.IssuesRegular (non-Security) IssuesPlease submit a report throughGithub issues. A maintainer will respond within a reasonable period of time to handle the issue as follows:bug: triage asbugand provide estimated timeline based on severityfeature request: triage asfeature requestand provide estimated timelinequestion or discussion: triage asquestionand respond or notify/identify a suitable expert to respondMaintainers are supposed to link duplicate issues when possible.Reporting Security IssuesPlease take a look at our guidelines for reportingsecurity issues.
Package: temp-email
# Temp-Mail Api Wrapepr
Python API wrapper for 1secmail.com/api/. Temp mail lets you use anonymous emails for free
## Requirements
- requests
## Installation
- pip install## Usage
Get list of active domains` from tempmail import TempMail email = TempMail() # you can youse your loginprint(email.get_list_of_active_domain())`Generate random email address` from tempmail import TempMail email = TempMail() # you can youse your login email.generate_random_email_address() `Get your login and domain` from tempmail import TempMail email = TempMail() get.login() get.domain() `Download Attachment from MailBox` from tempmail import TempMail() email =TempMail(login='login')email.download_attachments_by_id(id=12312,attachemnts='file.jpg')`Download all Files from MailBox` from tempmail import TempMail() email =TempMail(login='login')email.download_all_files() `Get list of emails` from tempmail import TempMail() email =TempMail(login='login')email.get_list_of_emails() `
Package: tempenv
tempenvManage environment variables in a temporary scope.Some products use environment variables as a primary means to supply
credentials.  To ensure the lifetime of exposed credentials is short,
wrap them in a TemporaryEnvironment so that they are automatically
destroyed on scope exit.You can:Set or unset environment variables inside awithcode block,Get a warning if the code block modifies one of the environment
variables,Optionally bypass restoration of the original environment variable
value if the code block modifies the environment variable.InstallInstall the latest version of tempenv:pip install tempenvExamplesEach of these examples can be found in the tests.Set some environment variables temporarily:
(see tests/example_set_test.py):deftest_set(self):user_before=os.environ.get("USER")withTemporaryEnvironment({"USER":"nobody","OTHER":"foo"}):assertos.environ.get("USER")=="nobody"assertos.environ.get("OTHER")=="foo"assertos.environ.get("USER")==user_beforeChanging the value toNonewill unset the environment variable during
the code block
(see tests/example_unset_test.py):deftest_unset(self):os.environ["DEBUG"]="1"withTemporaryEnvironment({"DEBUG":None}):assert"DEBUG"notinos.environassert"DEBUG"inos.environChanging a temporary environment variable during the scope will cause a
warning
(see tests/example_overwrite_test.py):deftest_overwritten_in_context(self):withself.assertWarnsRegex(EnvironmentVariableChangedWarning,"FOO"):withTemporaryEnvironment({"FOO":"BAR"}):os.environ["FOO"]="SAM"If you set the optional argumentrestore_if_changed=Falsethen a change
during the scope of the TemporaryEnvironment will not issue a warning and will
not restore to the original value
(see tests/example_ignore_test.py):deftest_ignored_overwrite_in_context(self):os.environ["FOO"]="BAR"withTemporaryEnvironment({"FOO":"SAM"},restore_if_changed=False):os.environ["FOO"]="DEAN"assertos.environ["FOO"]=="DEAN"You can use TemporaryEnvironment in a unittest scope as follows
(see tests/example_unittest_test.py):@TemporaryEnvironment({"USER":"Crowley"})deftest_check(self):assertos.environ.get("USER")=="Crowley"LicenseReleased under the Apache Software License, Version 2.0 (seeLICENSE):Copyright (C) 2019 - 2022 James E. King III (@jeking3) <jking@apache.org>BugsPlease report any bugs that you find onGitHub.
Or, even better, fork the repository onGitHuband create a pull request (PR). We welcome all changes, big or small, and we
will help you make the PR if you are new togit(just ask on the issue and/or
seeCONTRIBUTING.rst).
Package: tempenviron
[![Build Status](https://travis-ci.org/u1234x1234/tempenviron.svg?branch=master)](https://travis-ci.org/u1234x1234/tempenviron)[![Coverage Status](https://coveralls.io/repos/github/u1234x1234/tempenviron/badge.svg?branch=master)](https://coveralls.io/github/u1234x1234/tempenviron?branch=master)# tempenviron`tempenviron` allows you to temporary modify your environment variables with context manager.## Usage:```pythonfrom tempenviron import updated_environ# Update with keyword argassert 'RANDOM_ENVIRONMENT_VARIABLE' not in os.environwith updated_environ(RANDOM_ENVIRONMENT_VARIABLE='SOME_VALUE'):assert os.environ['RANDOM_ENVIRONMENT_VARIABLE'] == 'SOME_VALUE'assert 'RANDOM_ENVIRONMENT_VARIABLE' not in os.environ# Or pass a dictionarywith updated_environ({'var1': 'val1', 'var2': 'val2'}):assert os.environ['var1'] == 'val1'assert os.environ['var2'] == 'val2'# Or both. In that case keywords have a higher prioritywith updated_environ({'var1': 'val1', 'var2': 'val2'}, var2='val3'):assert os.environ['var2'] == 'val3'# To temporary delete an environment variable, set the variable to Noneos.environ['var1'] = 'val1'with updated_environ(var1=None):assert 'var1' not in os.environassert os.environ['var1'] == 'val1'```
Package: tempera
TemperaDescriptionCreate temperature objects which return their value in a set 'global' unit scale - either Celsius, Fahrenheit, or Kelvin - using the methodgetTemperature(). When the Global temperature scale is changed, all temperature objects are returned in that scale.I created this module to easily convert multiple temperatures displayed on a GUI when a user selects a different scale. I imagine it could be useful any time one has multiple persistant temperatures that need to undergo unit conversion at will.Using this ModuleThe Global temperature scale can be set with the methodself.setGlobalScale(). All Temperature objects will return in this scale withself.getTemperature().Set or return from a specific scale usingself.cfor Celsius,self.ffor Fahrenheit, andself.kfor Kelvin.Local ScalesIf you want a specific Temperature object to returnself.getTemperature()in a different scale regardless of the current global scale, useself.setLocalScale(). Can return to using global scale withself.setLocalScale(False)orself.useGlobalScale().RoundingSet the number of decimal places with thedecimal_placekeyword argument:fromtemperaimportTemperaturetemp1=Temperature(12,decimal_place=2)Or withself.setDecimalPlace(int), whereintis an integer. The default decimal place is 2. Setting toNonewill always return a rounded integer.IntervalsTemperature objects can also represent intervals instead of actual temperatures with the keyword argumentisinterval=True. For example, if you wanted to represent an interval of 3 celsius units:temp_interval=Temperature(3,isinterval=True)print(temp1.C+temp_interval.C)# Adds 3 celsius to temp1 and printsHow it functionsThe temperature is stored internally in Celsius. All setting and getting of the temperature in different scales is a conversion from this 'private' celsius attribute. This attribute is not rounded. Any rounding is done whengetTemperature()(or a similar method) is called, so setting a decimal place does not affect the internally stored temperature.
Package: temperature-conversion
temperature_conversionPaquete de conversión de temperaturasEl módulo del paquete contiene las funciones siguientes:Una función llamada F_to_K que convierte temperaturas en Fahrenheit a Kelvin.Una función llamada C_to_R que convierte temperaturas en Celsius a Rankine.Una función llamada C_to_F que convierte temperaturas en Celsius a Fahrenheit.Instalaciónpip install temperature_conversionForma de usoprint('To be edited')
Package: temperature-converter-py
Temperature Convertertemperature_converter_pyis a simple temperature converter.Installpip install temperature-converter-pyImportimport temperature_converter_pyFunctionscelsius_to_fahrenheit(temp_in_celsius): Receives a float value in Celsius and returns in Fahrenheit.fahrenheit_to_celsius(temp_in_fahrenheit): Receives a float value in Fahrenheit and returns in Celsius.celsius_to_kelvin(temp_in_celsius): Receives a float value in Celsius and returns in Kelvin.kelvin_to_celsius(temp_in_kelvin): Receives a float value in Kelvin and returns in Celsius.fahrenheit_to_kelvin(temp_in_fahrenheit): Receives a float value in Fahrenheit and returns in Kelvin.kelvin_to_fahrenheit(temp_in_kelvin): Receives a float value in Kelvin and returns in Fahrenheit.
Package: temperature-expansion-kit-plugin
Pioreactor Temperature Expansion Kit PluginThis is the necessary software to use thePioreactor Temperature Expansion Kit.Follow the hardware instructionshere, and then install this plugin.After installation, check that thetemperature_automation.thermostathave been updated on all the Pioreactors with the kit installed on. The PID values should look like those in theadditional_config.iniin this repository.
Package: temperaturePy
TemperaturePyA Simple temperature conversion library for Python 3.ExamplesEasy Conversions>>fromtemperatureimportTemperature>>celsius:int=25>>kelvin:Temperature=Temperature.ctok(celsius)>>kelvin298.15Simple maths and comparisons built in>>fromtemperatureimportTemperature>>start_temp:Temperature=Temperature(150)>>end_temp:Temperature=Temperature(100)>>delta_t=start_temp-end_temp>>delta_tTemperature(kelvin=50,celsius=-223.15,farenheit=-369.67,rankine=90.0)Clamped to real bounds>>fromtemperatureimportTemperature>>impossible=Temperature(-1)ValueError:TemperaturecannotbebelowAbsoluteZeroLicenseThis project is released under the MIT license
Package: temperatures
temperaturesis a Python program that gathers temperatures from hard
disks, CPU and GPU and presents them in a concise string suitable to be
fed to XFCE’s Generic Monitor panel plugin or similar.https://github.com/luismsgomes/temperaturesCopyright (c) 2020 Luís Gomes <luismsgomes@gmail.com>UsageThis program takes no input and no options.It is assumed thathddtempddaemon is running and listening on port 7634.Presently the program is not configurable and works for my particular hardware, which
includes and AMD Ryzen CPU, an AMD Radeon RX 590 GPU and some HDDs.  I’m not
particularly interested in SSDs temperatures, so I leave those out.In the future I may extend the code to allow:configurable devicesconfigurable output formatcontinuous run, outputing a new line at regular intervals