Saravanan666/pypi-org huggingface dataset:
Package: tdextensions
Teradata ML ExtensionsExtensions to the core teradataml library by Teradata Consulting to aid in field development work around BYOM, STO, RTO and AnalyticOps solutions.InstallationYou can install via pip.pip install tdextensionUsageYou must use the same version of python on your client side as is used in Teradata (3.6+ at the time of writing). The reason for this is due to differences in serialization between versions of python (e.g. between 3.5 and 3.6).fromteradataml.dataframe.dataframeimportDataFramefromtdextensions.distributedimportDistDataFrame,DistModefromteradatamlimportcreate_contextimportpandasaspdimportnumpyasnppd.options.display.max_colwidth=250engine=create_context(host="localhost",username="ivsm_user",password="ivsm_user")A simple map row example where we multiple the value of two columns on a row by row basisdefmy_fun(row):returnnp.array([row.idx,row.sepal_length*row.sepal_width])df=DistDataFrame("iris_train",dist_mode=DistMode.STO,sto_id="my_dumb_map")df=df.map(lambdarow:my_fun(row),returns=[["idx","INTEGER"],["my_derived_col","INTEGER"]])df.head()A more advanced example where we train a different model for each partition of a datasetfromsklearn.ensembleimportRandomForestClassifierimportbase64importdilldeftrain(partition):X=partition[['sepal_length','sepal_width','petal_length','petal_width']]y=partition[['species']]clf=RandomForestClassifier()clf.fit(X,y.values.ravel())returnnp.array([[partition.species.iloc[0],"my_model_id",base64.b64encode(dill.dumps(clf))]])df=DistDataFrame("iris_train",dist_mode=DistMode.STO,sto_id="my_model_train")df=df.map_partition(lambdapartition:train(partition),partition_by="species",returns=[["partition_id","VARCHAR(255)"],["model_id","VARCHAR(255)"],["model_artefact","CLOB"]])df.to_pandas().head()PermissionsSET SESSION SEARCHUIFDBPATH = <database>;
GRANT EXECUTE procedure on <db> to <user>;
GRANT EXECUTE procedure on SYSUIF to <user>;
GRANT CREATE external procedure on <db> to <user>;
GRANT EXECUTE FUNCTION ON TD_SYSFNLIB.SCRIPT to <user>;
GRANT EXECUTE ON  SYSUIF.DEFAULT_AUTH TO <user>;
Package: tdf3sdk
TDF3 SDKThe TDF3 Python SDK allows developers to easily create and manage encryptedTrusted Data Format (TDF) objectsand interact withKey Access and Entity Attribute Services (KAS, EAS).InstallationUpgrade pip3 to the latest version and runpip3installtdf3sdkAuthenticationtdf3sdk allows users to set authentication headers (OIDC bearer tokens, etc), and will use those for authenticating with
backing services - by design itdoes not containauthentication flow logic, for example to exchange client credentials
for OIDC bearer tokens, refresh expired tokens, etc - it expects callers to handle that.For an example of how to wrap this library in auth provider flows, seevirtru-tdf3-cppOIDCProvide KAS url, user id, and set the use_oidc flag to true:client=TDF3Client(kas_url,user_id,use_oidc=True)Provide the TDF3Client instance with your valid, previously obtained/generated OIDC bearer token:client.set_auth_header('eyJhbGciOiJSUzI1NiIsInR5cCIg...')Legacy EASTwo different methods:Provide EAS url and user id (user should be registered on EAS):client=TDF3Client(eas_url,user_id)Provide EAS url, user id, client key (absolute file path), client cetificate (absolute file path) and root CA (absolute file path)client=TDF3Client(eas_url,user_id,filepath_client_key,filepath_client_cert,filepath_rootCA)Create Encrypted TDF Object (minimal example)fromtdf3sdkimportTDF3Clientclient=TDF3Client(eas_url,user_id)unprotected_file="sensitive.txt"protected_file=unprotected_file+".tdf.html"client.encrypt_file(unprotected_file,protected_file)Terms of ServicePrivacy Policy
Package: tdfmt
tdfmttdfmt is a concise timedelta formatterInstallpip install tdfmtUsefrom datetime import timedelta
from tdfmt.tdfmt import tdfmt

print(tdfmt(timedelta(hours=3, minutes=14, seconds=15, microseconds=926535)))  # 3h14m15.926535s
print(tdfmt(timedelta(hours=4, minutes=20)))                                   # 4h20m0s
print(tdfmt(timedelta(minutes=17, seconds=38)))                                # 17m38s
print(tdfmt(timedelta(seconds=9)))                                             # 9s
print(tdfmt(timedelta(minutes=1, milliseconds=300)))                           # 1m0.3s
print(tdfmt(timedelta(microseconds=12340)))                                    # 12.34ms
print(tdfmt(timedelta(microseconds=12)))                                       # 12µs
Package: tdfpy
TDFpybasic pip package to handle Bruker's .tdf and .tdfbin files.How to installpip install tdfpyorgit clonehttps://github.com/pgarrett-scripps/tdfpy.gitcd tdfpypip install .How to access analysis.tdf dbfrom tdfpy import PandasTdfpd_tdf = PandasTdf('path/to/analysis.tdf')pd_tdf.precursors -> returns pd.DataFrame containing Precursors tablepd_tdf.frames -> returns pd.DataFrame containing Frames tablepd_tdf.properties -> returns pd.DataFrame containing Properties tableHow to access analysis.tdf_bin dbfrom tdfpy import TimsDatatd = TimsData('path/to/dfolder')td.readPasefMsMsForFrame(1) -> return msms spectra for first msms frame
Package: tdfs
Teradata Feature Store ClientInstallationUsageInstallationYou can install via pip. The minimum python version required is 3.6+pipinstalltdfsUsageFirst, you'll needteradatamlcontext:fromteradataml.context.contextimport*importgetpasscreate_context('mycluster.teradata.com','my_user',getpass.getpass())Next, use this context to get connection and instantiate Feature Store client:fromtdfsimportFeatureStorefs=FeatureStore(get_connection(),metadata_table='my_database.fs_metadata')It will create metadata table if it doesn't exist.Register feature groupsfs.register_feature_group(entity='patient',table='dm.cust_profile',entity_key_column='cust_id',features={'Age':'Age'},date_column='snapshot_dt')Discover registered featuresfs.list_entities()fs.list_features('patient')fs.get_feature_details('patient','Age')Get feature set for training/evaluation/scoringtrain_df=fs.get_featureset_df('patient','2021-07-12',['Age','DiPedFunc','TwoHourSerIns'])train_pdf=train_df.to_pandas()
Package: tdgl
pyTDGLTime-dependent Ginzburg-Landau in PythonMotivationpyTDGLsolves a 2D generalized time-dependent Ginzburg-Landau (TDGL) equation, enabling simulations of vortex and phase dynamics in thin film superconducting devices.LearnpyTDGLThe documentation forpyTDGLcan be found atpy-tdgl.readthedocs.io.TrypyTDGLClick the badge below to trypyTDGLinteractively online viaGoogle Colab:AboutpyTDGLAuthorsPrimary author and maintainer:@loganbvh.CitingpyTDGLpyTDGLis described in the following paper:pyTDGL: Time-dependent Ginzburg-Landau in Python, Computer Physics Communications291, 108799 (2023), DOI:10.1016/j.cpc.2023.108799.If you usepyTDGLin your research, please cite the paper linked above.% BibTeX citation
@article{
    Bishop-Van_Horn2023-wr,
    title    = "{pyTDGL}: Time-dependent {Ginzburg-Landau} in Python",
    author   = "Bishop-Van Horn, Logan",
    journal  = "Comput. Phys. Commun.",
    volume   =  291,
    pages    = "108799",
    month    =  may,
    year     =  2023,
    url      = "http://dx.doi.org/10.1016/j.cpc.2023.108799",
    issn     = "0010-4655",
    doi      = "10.1016/j.cpc.2023.108799"
}AcknowledgmentsParts of this package have been adapted fromSuperDetectorPy, a GitHub repo authored byMattias Jönsson. BothSuperDetectorPyandpy-tdglare released under the open-source MIT License. If you use either package in an academic publication or similar, please consider citing the following in addition to thepyTDGLpaper:Mattias Jönsson, Theory for superconducting few-photon detectors (Doctoral dissertation), KTH Royal Institute of Technology (2022) (Link)Mattias Jönsson, Robert Vedin, Samuel Gyger, James A. Sutton, Stephan Steinhauer, Val Zwiller, Mats Wallin, Jack Lidmar, Current crowding in nanoscale superconductors within the Ginzburg-Landau model, Phys. Rev. Applied 17, 064046 (2022) (Link)The user interface is adapted fromSuperScreen.
Package: tdh-tcd
Twitch Chat DownloaderNeat python script to download chat messages from past broadcastsRequirementsPython 3.6+pippython-requestsInstallation and usageThere are multiple ways to install this script.# Install package with pippip3installtdh-tcd
python3-mtcd<video_id># Run pip3 as root to install `tcd` for all users (not recommended)sudopip3installtdh-tcd
tcd<video_id># Start script directly from cloned repositorygitclonehttps://github.com/TheDrHax/Twitch-Chat-Downloader.gitcdTwitch-Chat-Downloader
pipinstall-rrequirements.txt

python-mtcd<video_id># or ...pythonapp.py<video_id>SettingsTo override default options, runpython -m tcd --generate-configand edit generatedsettings.jsonor just use console arguments listed below.OptionTypeArgumentDescriptionclient_idstr--client-idTwitch API Client-ID header.cooldownint--cooldownDelay (in milliseconds) between API calls.display_progressbool--[no-]progressDisplay animated progress bar in terminal.formatsstr[]-f/--formatsList of formats to download. See Formats table below.directorystr-t/--directoryName of directory to save all generated files.filename_formatstr--filename-formatFull format of generated filenames. Possible arguments:directory,video_idandformat.max_widthint--max-widthAdd line breaks to fit messages into specified width. Note: Implemented only for SSA/ASS subtitles.subtitle_durationint--subtitle-durationDuration (in seconds) of each line of subtitles.dynamic_durationobjIncrease subtitle duration based on message length.—.enabledbool--[no-]dynamic-durationEnable or disable this function.—.maxint--dynamic-duration-maxMaximum duration of subtitle message.—.max_lengthint--dynamic-duration-max-lengthMaximum length of subtitle message.millisecond_separatorstr--millisecond-separatorSeparator between seconds and milliseconds in timestamps (IRC only).group_repeating_emotesobjConvertKappa Kappa KappatoKappa x3.—.enabledbool--[no-]groupEnable or disable this function.—.thresholdint--group-thresholdNumber of repeating emotes to trigger this function.—.collocationsint--group-collocationsMaximum number of words in repeating collocations (default: 1, more is slower).—.collocations_thresholdint--group-collocations-thresholdSame logic as in —.threshold, but applies only to repeating collocations.—.formatstr--group-formatCustomize format of replaced emotes.badgesobjAdd badges before the username (IRC only).—.enabledbool--[no-]badgesEnable or disable this function.—.max_countint--badges-maxOnly show the first N badges (default: 1)—.mapobjConfigure which symbol corresponds to a specific badge.video_typesstr--video-typesComma-separated list of VOD types to detect in Channel Mode. (seebroadcast_type)FormatsFormatDescriptionassorssaAdvanced SubStation AlphasrtSubRipircIRC-style logNotesEmpty messages means the user has been timed out. There's no known way to get these.This script is using Twitch's API v5 that isdeprecated.Consider increasing the delay between API calls insettings.jsonto avoid a potential temporary block from Twitch for sending too many requests when downloading messages from very long streams.
Package: tdi
TDI (Template Data Interface,/ʹtedɪ/) is a markup templating system written in python with optional speedup code written in C. Unlike most templating systems the TDI does not invent its own language to provide functionality. Instead you simply mark the nodes you want to manipulate within the template document. The template is parsed and the marked nodes are presented to your python code, where they can be modified in any way you want.Copyright and LicenseCopyright 2006 - 2015
André Malo or his licensors, as applicable.The whole package is distributed under the Apache License Version 2.0.
You’ll find a copy in the root directory of the distribution or online
at: <http://www.apache.org/licenses/LICENSE-2.0>.BugsNo bugs, of course. ;-)
But if you’ve found one or have an idea how to improve the TDI, feel free
to send a pull request ongithubor send a mail to <tdi-bugs@perlig.de>.Author InformationAndré “nd” Malo <nd perlig.de>
GPG: 0x8103A37EIf God intended people to be naked, they would be born that way.
– Oscar Wilde
Package: t_dict
Traversing and Querying Dicts the easy wayFree software: BSD licenseInstallpip install t_dictWhy?Dealing with deep nested dicts can be a total pain. TDict aims to make less boring working with it, using jsonpointer syntax for that.It stand on the shoulders of jsonpointer (https://pypi.python.org/pypi/jsonpointer), which implements the RFC -https://tools.ietf.org/html/rfc6901Usagefromt_dict.t_dictimportTDicttd=TDict({'nested':{'dict':'here','other':{'spam':'eggs'}}})td.find('/nested/dict')>>'here'td.find('/nested/notfound','defaultvalue')>>'defaultvalue'td.setin('/nested/dict','new')td['nested']['dict']=='new'>>True# converts dict to TDictisinstance(td.find('/nested/other'),TDict)>>TrueHistory0.1.0 (2014-01-11)First release on PyPI.
Package: tdil
Version0.0.1Python VersionPython 3.10.8 is supported.Installation[sudo] pip install tdilQuickstartfromsrc.sepimportTurkceturkce=Turkce()word=input("Enter A Word")is_turkish=turkce.seperator(word)print(is_turkish)# If your word is turkish word return True.# If your word isn't turkish word return False.
Package: tdim
tdim - Show and help size terminal dimensionsA simple tool to help when I want to size any terminal "just so".Installationtdimcan be installed with eitherpip$pipinstalltdimor ideallypipx:$pipxinstalltdimUsageTo run the tool, just runtdim. Once you run it up you'll see a simple
display of the dimensions of your terminal. Resize your terminal and be
amazed as the numbers change!You can show/hide a border by pressingb.To aim seeking a specific aspect ratio, a number of keys are set up for
common ones. When pressed the border will be shown, the width set to the
width of your terminal at that moment, and then height to the corresponding
target height for that ratio.The keys are:KeyRatio0Clear target ratio116 x 924 x 332 x 141 x 1To exit the application pressEsc.
Package: td-install
Tokyo Dark macOS PortAutomatedTokyo DarkmacOS port creation tool.
Built to run on macOS. Will not run on other platforms.Disclaimer:This is a third-party modification toTokyo Darkand is not affiliated in any way with
Cherrymochi. This does not contain any assets fromTokyo Darkand requires a Steam login which has
purchasedTokyo Darkto build.InstallationTo install, runpip install td_installin Terminal. This application was
developed in Python 3.6.4, but will likely work in any modern version of Python
(either of version 2 or 3).UsageThere are two modes that you can runtd_installin:Installation ModeandDebugging Mode.Installation Modeis the intended, default installation
method for the macOS version ofTokyo Dark.
However, there are some bugs in SteamCMD that makes it that if you suspect
something is wrong, perhapsDebugging Modewill be better.To install Tokyo Dark viaInstallation ModeIn Terminal, runtd_install. The installer will will ask for your Steam
credentials as well as a installation directory at the end, so it is a
semi-interactive procedure.To install Tokyo Dark viaDebugging ModeDebugging mode will show the output of all internal commands run bytd_install.
In order to install Tokyo Dark in this manner, runtd_debugin Terminal.NotesSteam typically will open a Finder window. This is completely normal,
and the window can be closed immediately if wanted. Not quite sure why this
happens.Steam will sometimes crash or hang when logging in and updating. If
Steamcrashes, you will get notified through the Terminal immediately astd_installwill crash. If Steamhangs, then it is harder to detect
outside of debugging mode since it will appear to just be downloading Tokyo
Dark. If you suspect that Steam is hanging (i.e. the download is taking longer
then you would expect given your internet conditions), you can check by going
into the network tab in Activity Monitor and seeing if there is significant network
activity fromsteamcmd, which would indicate that Steam is working as expected.
Package: tdir
🗃 tdir - create and fill a temporary directory 🗃Run code inside a temporary directory filled with zero or more files.Very convenient for writing tests: you can decorate individual tests or a whole
test suite.tdir()runs code in a temporary directory pre-filled with files: it can
either be used as a context manager, or a decorator for functions or classes.tdir.fill()is a tiny function that recursively fills a directory.Example: as a context managerfrom pathlib import Path
import tdir

cwd = Path.cwd()

# Simplest invocation.

with tdir():
   # Do a lot of things in a temporary directory

# Everything is gone!

# With a single file
with tdir('hello') as td:
    # The file `hello` is there
    assert Path('hello').read_text() = 'hello\n'

    # We're in a temporary directory
    assert td == Path.cwd()
    assert td != cwd

    # Write some other file
    Path('junk.txt').write_text('hello, world\n')

# The temporary directory and the files are gone
assert not td.exists()
assert cwd == Path.cwd()

# A more complex example:
#
with tdir(
    'one.txt',
    three='some information',
    four=Path('existing/file'),  # Copy a file into the tempdir
    sub1={
        'file.txt': 'blank lines\n\n\n\n',
        'sub2': [
            'a', 'b', 'c'
        ]
    },
):
    assert Path('one.txt').exists()
    assert Path('four').read_text() == Path('/existing/file').read_text()
    assert Path('sub1/sub2/a').exists()

# All files gone!Example: as a decoratorfrom pathlib import Path
import tdir
import unittest

@tdir
def my_function():
    pass  # my_function() always operates in a temporary directory


# Decorate a TestCase so each test runs in a new temporary directory
# with two files
@tdir('a', foo='bar')
class MyTest(unittest.TestCast):
    def test_something(self):
        assert Path('a').read_text() = 'a\n'

    def test_something_else(self):
        assert Path('foo').read_text() = 'bar\n'


class MyTest2(unittest.TestCast):
    # Decorate just one test in a unitttest
    @tdir(foo='bar', baz=bytes(range(4)))  # binary files are possible
    def test_something(self):
        assert Path('foo').read_text() = 'bar\n'
        assert Path('baz').read_bytes() = bytes(range(4)))

    # Run test in an empty temporary directory
    @tdir
    def test_something_else(self):
        assert not Path('a').exists()
        assert Path().absolute() != self.ORIGINAL_PATH

    ORIGINAL_PATH = Path().absolute()API Documentation
Package: tdirstat
Terminal-based directory statistics with a nice TUI and quick actionable informationOverviewThis project is inspired by projects such as kdirstat and qdirstat.
Easily find where your disk space has gone, without waiting for a full-drive scan
to complete.Contributions welcome!Installationpip install --user setuptools tdirstat@git+https://github.com/apockill/tdirstatThen, to run:
.. code:tdirstat /The first argument is the directory you wish to map. By default, it picks the current working directory.Repository goalsReduce memory usageSpeed up scan timeAdd tooling for file and directory deletion
Package: tdk
tdkA library to query meaning of Turkish word from official dictionary.Install$ pip install tdkRequirementsPython +3.4DocumentationCommand Line$ tdk efe
a. 1. Yiğit, özellikle Batı Anadolu köy yiğidi, zeybek. 2. Ağabey. 3. Kabadayı: Düğünevinin avlusuna girerken yeni düze inmiş efeler gibi nara attı. -Ö. Seyfettin. 4. tar. Kaptan.Libraryfromtdk.coreimportTurkishWordword=TurkishWord('Atatürk')word.query()result=word.meaningprint(result)"Cinsiyet: Erkek1. Türklerin atası. 2. Büyük kurtarıcı Gazi Mustafa Kemal Paşa'ya 1934 yılında yasayla verilmiş soyadı."
Package: tdk-cli
tdk-cliCommand-line tool forTDKDictionary,sozluk.gov.trwithrichoutput.Install:pip install tdk-cliUsage:tdk <word>Example Usage:tdk kemalArguments-h, --help     show this help message and exit
  -p, --plain    returns plain text output
  -v, --version  show program's version number and exitDependenciesrich
Package: td-kernel-dmvw
TD Kernel DM+V/WThe algorithm implements the theoretical research of the following papers:S. Asadi and A. Lilienthal, "Approaches to time-dependent gas distribution modelling," 2015 European Conference on Mobile Robots (ECMR), Lincoln, 2015, pp. 1-6.Asadi, Sahar & Reggente, Matteo & Stachniss, Cyrill & Plagemann, Christian & Lilienthal, Achim. (2011). Statistical Gas Distribution Modelling Using Kernel Methods. Intelligent Systems for Machine Olfaction: Tools and Methodologies. 153-179.A. J. Lilienthal, M. Reggente, M. Trincavelli, J. L. Blanco and J. Gonzalez, "A statistical approach to gas distribution modelling with mobile robots - The Kernel DM+V algorithm," 2009 IEEE/RSJ International Conference on Intelligent Robots and Systems, St. Louis, MO, 2009, pp. 570-576.M. Reggente and A. J. Lilienthal, "Using local wind information for gas distribution mapping in outdoor environments with a mobile robot," 2009 IEEE Sensors, Christchurch, 2009, pp. 1715-1720.Neumann, Patrick. (2013). BAM-Dissertationsreihe. Bd. 109: Gas Source Localization and Gas Distribution Mapping with a Micro-Drone. Berlin : Bundesanstalt für
Materialforschung und -prüfung (BAM)Besides the root algorithm (KernelDM), it contains the proposed extensions:time dependency (TD)variance (V)wind dependency (W)Thanks to Achim Lilienthal, Patrick Neumann and Victor Hernandez for providing Matlab implementations for the extensions V and W.RequirementsPython 3pipenvRun demoRun the following code to generate the different maps. The mean map, variance map and confidence map are being plotted.pipenvinstall--dev
pipenvrunpythonsimple_example.py
Package: tdk-py
Python API for the Turkish Language Foundationtdk-py is a Python package that allows for simple access toTurkish dictionariesmade available by theTDK, the Turkish Language Society.
tdk-py aims to be easy to use and internally queries the TDK and parses its response into easy to use Python class objects.Installationtdk-py is supported on Python 3.6+. The recommended way to install is viapipwhich comes with Python.pip install tdk-pyIf your machine doesn’t have Python and pip installed you can download it fromThe Python Software Foundation’s website.Sample usagetdk.gtsis used to access TDK’s GTS, the up-to-date Turkish dictionary (Güncel Türkçe Sözlük).>>> import tdk.gts
>>> tdk.gts.search("merkeziyetçilik")
[<Entry 41635 (merkeziyetçilik)>]tsk.gts.searchreturns a list because it is possible for there to be more than one word with the exact same spelling.>>> for number, entry in enumerate(tdk.gts.search("bar")):
...     for meaning in entry.meanings:
...         print(number+1, entry.entry, meaning.meaning)
...
1 bar Anadolu'nun doğu ve kuzey bölgesinde, en çok Artvin ve Erzurum yörelerinde el ele tutuşularak oynanan, ağır ritimli bir halk oyunu
2 bar Danslı, içkili eğlence yeri
2 bar Ayaküstü içki içilen eğlence yeri
2 bar Amerikan bar
3 bar Hava basıncı birimi
4 bar Ateşten, mide bozukluğundan, ağızda, dil ve dişlerde meydana gelen acılık, pas
5 bar Halter sporunda ağırlığı oluşturan kiloları birbirine bağlayan metal çubuk
>>> # 5 different words! One of them (#2) has multiple meanings!You can query suggestions for misspelt words or for other similar words.>>> from difflib import get_close_matches
>>> get_close_matches("feldispat", tdk.gts.index())
['feldspat', 'ispat', 'fesat']You can perform complex analyses very easily.
Let’s see the distribution of entries by the number of maximum consecutive consonants.>>> from tdk.tools import max_streak
>>> from tdk.alphabet import CONSONANTS
>>> annotated_dict = {}
>>> for entry in tdk.gts.index():
...     streaks = max_streak(entry)
...     if streaks not in annotated_dict:
...         annotated_dict[streaks] = [entry]
...     else:
...         annotated_dict[streaks].append(entry)
>>> for i in set(annotated_dict):
...     print(i, len(annotated_dict[i]))
...
0 19
1 15199
2 73511
3 3605
4 68
5 5Licensetdk-py’s source code is provided under theMIT License.Copyright © 2021-2023 Emre Özcan