Saravanan666/pypi-org huggingface dataset:
Package: truefalsepython
true-false-pythonPyPI package with some better syntax tools for pythonpip install truefalsepythontrue-false-pythonLogical toolsLittle functionsUseful functionsR-like functionsFunctions without categoryLogical toolsForTrueandFalsevalues there are equal constants (like it is in C-like languages or R)TRUE, T, trueandFALSE, F, false; forNonethere isNULLconstant:fromtruefalsepythonimportTRUE,FALSE,T,F,true,false,NULLprint(True==T)# Trueprint(True==TRUE)# Trueprint(True==true)# Trueprint(False==F)# Trueprint(False==FALSE)# Trueprint(False==false)# Trueprint(NULL)# NoneLittle functionsis_odd(number)is_even(number)is_number(object)max_fast(a, b)min_fast(a, b)Useful functionsfast_sample(objects, probs)-- returns 1 random object fromobjectswithprobsprobabilities. It's faster thannp.random.choice(objects, 1, probs)(example)randomTrue(prob = 0.5)-- returnsTruewith probabilityprob, otherwiseFalseUseful for debug:set_trace()-- like breakpointdebug(function, *args, **kwargs)-- for debugfunctionfunction with those argumentsR-like functionsFor arrays there are several R-like functions:ifelseвЂ” just wrapper ofnumpy.wherenrowвЂ” returns number of rowsncolвЂ” returns number of columnscolMeansвЂ” returns average for each columnrowMeansвЂ” returns average for each rowcolSumsвЂ” returns sums for each columnrowSumsвЂ” returns sums for each rowapplyвЂ” applies functionFUNto dimension ofarr2Darray (for rows ifMARGIN == 1and columns ifMARGIN == 2)lapplyвЂ” applies functionfuncfor each element inarray(array/list or something else)sapplyвЂ” likelapplybut returns numpy arraysampleвЂ” it isnp.random.choicebutreplace = Falseby defaultsample_intвЂ” sample numbers from0ton-1Example of usage:importnumpyasnpfromtruefalsepythonimportnrow,ncol,colMeans,rowMeans,colSums,rowSums,apply,lapply,sapply,sample,sample_intnp.random.seed(1)# some 2D arrayrandom_matrix=np.random.randint(8,size=(5,3))# how to get rows and cols countsprint(nrow(random_matrix))# 5print(ncol(random_matrix))# 3# operations for each row/columnprint(rowMeans(random_matrix))# [4.         2.66666667 5.         0.33333333 5.33333333]print(colMeans(random_matrix))# [2.4 4.4 3.6]print(rowSums(random_matrix))# [12  8 15  1 16]print(colSums(random_matrix))# [12 22 18]# apply function (MARGIN is 1 for rows and 2 for columns)print(apply(random_matrix,MARGIN=1,FUN=np.min))# [3 0 3 0 4]# as u can see, it's not necessary to use FUN returns only 1 number by vectorprint(apply(random_matrix,MARGIN=2,FUN=np.sqrt))#[[2.23606798 0.         1.73205081 0.         2.        ]# [1.73205081 2.64575131 2.23606798 0.         2.64575131]# [2.         1.         2.64575131 1.         2.23606798]]some_arr=np.array([1,2,3,5,4,3,2])# returns listprint(lapply(some_arr,lambdax:-x))# [-1, -2, -3, -5, -4, -3, -2]# returns numpy arrayprint(sapply(some_arr,lambdax:-x))# [-1 -2 -3 -5 -4 -3 -2]# like np.random.choice but replace = False by defaultprint(sample(some_arr,4))# [5 3 2 1]# sample numbers from 0 to n-1print(sample_int(n=100,size=10))# [69 46 58 12 73 98 31 53 65 96]Functions without categorytime_to_seconds(days = 0, hours = 0, minutes = 0, seconds = 5)-- converts time to seconds
Package: truelayer-signing
truelayer-signingPython package to produce & verify TrueLayer API requests signatures.Installpip install truelayer-signingGenerating a signaturetl_signature=sign_with_pem(KID,PRIVATE_KEY)\.set_method(HttpMethod.POST)\.set_path(path)\.add_header("Idempotency-Key",idempotency_key)\.set_body(body)\.sign()Seefull example.Verifying webhooksTheverify_with_jwksfunction may be used to verify webhookTl-Signatureheader signatures.# `jku` field is included in webhook signaturesjws_header=extract_jws_header(webhook_signature).jku# check `jku` is an allowed TrueLayer url & fetch jwks JSON (not provided by this lib)ensure_jku_allowed(jku)jwks=fetch_jwks(jku)# jwks may be used directly to verify a signatureverify_with_jwks(jwks,jws_header)\.set_method(HttpMethod.POST)\.set_path(path)\.add_headers(headers)\.set_body(body)\.verify(tl_signature)Seewebhook server example.
Package: truelearn
TrueLearnis a machine learning library for predicting and modelling learner engagement with educational resources.User InstallationInstall from PyPI:pip install -U truelearnFor more information on installation, see theGetting Started guide.DocumentationLatest stable releaseis available at:https://truelearn.readthedocs.io/en/stable/Development versionis available at:https://truelearn.readthedocs.io/en/latest/Change LogSee theChange Logfor a history of all the major changes to the truelearn.Alternatively you can find it in theCHANGELOG.rstfile found here:https://github.com/TrueLearnAI/truelearn/blob/main/docs/changelog.rstContributingContributions are welcome, and they are greatly appreciated! Every little bit helps,
and credit will always be given.
Please see:Contributing Guidefor more information!
We have listed a brief guide below.Source CodeYou can check out the latest the source code with the following command:git clone https://github.com/TrueLearnAI/truelearn.gitInstalling TrueLearn from sourceAfter cloning the repository, you can install TrueLearn locally from source:pip install -e .[dev]

# if you are using zsh
pip install -e ".[dev]"See theContributing Guide: Getting Startedfor a more detailed explanation.TestingAfter installation, you can run the tests from the source directory:pytest truelearnSee theContributing Guide: Testing guidefor a more detailed explanation.Before submitting a PRPlease make sure you have followed the Guidelines outlined in theContributing Guide: Before/During PR.
Package: truelle
TruelleTruelle - "trowel" in french - is a tiny web scraping library, inspired by the greatScrapyframework,
depending only onRequests, andParsellibraries.Truelle only offers a sequential request processing, and returns items directly
It's intended to be embedded in tiny scripts. Spiders aims to be compatible with Scrapy spider and easily switch to a Scrapy.Installpip install truelleGet startedCreate a SpiderfromtruelleimportSpiderclassMySpider(Spider):start_urls=["https://truelle.io"]defparse(self,response:Response):fortitleinresponse.css("h1::text").getall():yield{"title":title}spider=MySpider()Then get your items back...... in vanilla Python:foriteminspider.crawl():do_something(item)... in a Pandas dataframe:importpandasaspdmy_df=pd.DataFrame(spider.crawl())Custom settingsdefcustom_fingerprint(request):return"test"custom_settings={"HTTP_CACHE_ENABLED":True,"REQUEST_FINGERPRINTER":custom_fingerprint,"HTTP_PROXY":"http://myproxy:8080","HTTPS_PROXY":"http://myproxy:8080","DOWNLOAD_DELAY":2}spider.crawl(settings=custom_settings)
Package: truenaspy
TruenaspyFetch data from TrueNasInstallUse the PIP package manager$pipinstalltruenaspyOr manually download and install the last version from github$gitclonehttps://github.com/cyr-ius/truenaspy.git
$pythonsetup.pyinstallGet started# Import the truenaspy package.fromtruenaspyimportTrueNASAPITOKEN="012345"HOST="1.2.3.4:8080"asyncdefmain():api=TrueNASAPI(token=TOKEN,host=HOST,use_ssl=False,verify_ssl=False)rslt=awaitapi.async_get_system()print(rlst)awaitapi.async_close()loop=asyncio.get_event_loop()loop.run_until_complete(main())Have a look at theexample.pyfor a more complete overview.
Package: true-north
true-northBeautiful, powerful, and pythonic benchmarks engine for Python code.Features:Follows best practices of benchmarking to produce the most reliable results.Detects caching and side-effects.Traces memory usage and allocations (opt-in).Opcodes tracing for reproducble benchmarks (opt-in).100% type safe.Zero dependency.Highly configurable.Nice and colorful output.Ships with CLI to discover and run all benchmarks.A friendly API to write your own logic on top of benchmarks.sorting algorithms
  list.sort
    possible side-effect detected: slowest iteration x21 slower than fastest
    5k   loops, best of 5:  43.579 us ±  12.681 us                 ████▇
              11 ops, 3961 ns/op
  sorted
    5k   loops, best of 5:  43.911 us ±   3.697 us    x1.01 slower █████
              11 ops, 3991 ns/op
  insert_sort
    2    loops, best of 5: 100.662 ms ± 111.725 us x2309.85 slower █████
      11_683_767 ops,    8 ns/opInstallationpython3-mpipinstalltrue-northUsageimporttrue_northgroup=true_north.Group()@group.adddefmath_sorted(r):val=[1,2,3]*300# timer start before entering the loop# and stops when leaving itfor_inr:sorted(val)# run and print all benchmarks in the groupif__name__=='__main__':group.print()Seeexamplesfor more examples andtrue-north.orsinium.devfor chad documentation.
Package: true_or_false
true_or_falseA simple python funciton to determine whether an input is True or FalseDetermine (educated guess) whether an input value is True
or False.  Input can be a bool, dict, int or str.  This is
useful for determining the value of a parameter as passed
in via environment variable, cli, config file or plain
python code.Examples of True values:
str: ['true', 't', '1', 'yes', 'y', 't', 'oui']
bool: True
dict: {'a': 1} # any non empty dictionary
list: [0]  # any list not zero lengthExamples of False values:
str FALSES = ['false', 'f', '0', 'no', 'n', 'non']
bool: False
dict: {}  # empty dictionary
list: []  # empty listInstallationpip install true-or-falseUsagefrom true_or_false import true_or_false

b = true_or_false(1)
print(b)
>> True
Package: true-random
A quantum alternative for standard Python random packageInstallation :pip install true-randomFeatures :true_randinttrue_choicetrue_shuffletrue_passwordGenerate a strong password :fromtruerandomimporttrue_passwordprint(true_password(length=12))output : Jjr1i[h*vtsqGenerate a bunch of passwords :python -m truerandom --length=12 --nb=100You can also provide a 'csv' param to export the output as a csv file, but it is not recommended to store your passwords on a storage (for security reasons).
Package: trueskill
An implementation of the TrueSkill algorithm for Python.  TrueSkill is a rating
system among game players and it is used on Xbox Live to rank and match
players.fromtrueskillimportRating,quality_1vs1,rate_1vs1alice,bob=Rating(25),Rating(30)# assign Alice and Bob's ratingsifquality_1vs1(alice,bob)<0.50:print('This match seems to be not so fair')alice,bob=rate_1vs1(alice,bob)# update the ratings after the matchLinksDocumentationhttp://trueskill.org/GitHub:http://github.com/sublee/trueskillMailing list:trueskill@librelist.comList archive:http://librelist.com/browser/trueskillContinuous integration (Travis CI)https://travis-ci.org/sublee/trueskillSee AlsoTrueSkill(TM) Ranking System by Microsoft“Computing Your Skill” by Jeff Moser“The Math Behind TrueSkill” by Jeff MoserTrueSkill Calcurator by Microsoft
Package: truetool
truetoolA easy tool for frequently used TrueNAS SCALE CLI utilities.
Previously known as "trueupdate"How to installrunpip install truetoolPlease be aware you will need to reinstall after every SCALE updateHow to Updaterunpip install --upgrade truetoolHow to userunningtruetoolshould be a good start.Additional options are available:Helptruetool -hfor the CLI help pageUpdatetruetool -uortruetool --updateupdates TrueNAS SCALE Appstruetool --catalog CATALOGNAMEwhere CATALOGNAME is the name of the catalog you want to process in capstruetool --versioning SCHEMEwhere SCHEME is the highest semver version you want to process. options:patch,minorandmajortruetool -aortruetool --allupdates both active (running) and non-active (stuck or stopped) AppsBackuptruetool -bortruetool --backupbackup the complete Apps system prior to updates. Deletes old backups prior, number of old backups can be set, 14 by defaulttruetool -rortruetool --restorerestores a specific backup by nametruetool -dortruetool --deletedeletes a specific backup by nameOthertruetool -sortruetool --syncto sync the catalogs before running updatestruetool -portruetool --pruneto prune (remove) old docker images after running auto-updateImportant notePlease use the above arguments seperatly, combining them might not work as you would expect.
So use:truetool -u -b -p -s -anot:truetool -ubpsa
Package: trueupdate
trueupdateA TrueCharts automatic and bulk update utilityHow to installrunpip install trueupdatePlease be aware you will need to reinstall after every SCALE updateHow to Updaterunpip install --upgrade trueupdateHow to useJust runtrueupdatein the shell of your TrueNAS SCALE machine, to have it process Patch and Minor version updates for all AppsAdditional options are available:trueupdate --catalog CATALOGNAMEwhere CATALOGNAME is the name of the catalog you want to process in capstrueupdate --versioning SCHEMEwhere SCHEME is the highest semver version you want to process. options:patch,minorandmajortrueupdate -hfor the CLI help pagetrueupdate -sortrueupdate --syncto sync the catalogs before running auto-updatetrueupdate -portrueupdate --pruneto prune (remove) old docker images after running auto-updatetrueupdate -aortrueupdate --allupdates both active (running) and non-active (stuck or stopped) Appstrueupdate -bortrueupdate --backupbackup the complete Apps system prior to updates
Package: trueway-geocoding-rapidapi
TrueWay Geocoding API on RapidAPIInstallusing pippip install trueway_geocoding_rapidapiusing poetrypoetry add trueway_geocoding_rapidapiBuildWindowsgit clone https://github.com/dankaprogg/trueway_geocoding_rapidapi.git

cd trueway_geocoding_rapidapi
py -m venv venv
cd venv/Scripts/ && activate && cd ../../
pip install -r requirements.txt
py setup.py sdist bdist_wheel installLinuxgit clone https://github.com/dankaprogg/trueway_geocoding_rapidapi.git

cd trueway_geocoding_rapidapi
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 setup.py sdist bdist_wheel install
Package: truework
Truework Python SDKA first party Python SDK for theTruework API.Code in this repository is licensed under the MIT license, see LICENSE for details.InstallationpipinstalltrueworkRequirementspython 2.7 or python 3.6+Usageimporttrueworktruework.API_TOKEN='<your_token>'# Get the first 10 companies that match the query "International"truework.Company.search('International',offset=0,limit=10)DevelopmentFirst you need to install some additional packages by runningpipinstall-rrequirements-dev.txt-rrequirements-test.txtThen to test run:toxThis will test the SDK in bothpython2andpython3environments.
Package: trufflehog3
trufflehog3This is an enhanced version of the Python-basedtruffleHogscannerInstallationPackage is available onPyPIpip install trufflehog3UsageFull API documentation is available atfeeltheajf.github.io/trufflehog3.You can always check available options by runningtrufflehog3 --helpHere are some basic examples to get you started# clone remote Git repository, scan 10 latest commits and output to stdout$trufflehog3--max-depth10https://github.com/feeltheajf/trufflehog3# disable Git history search, scan current directory and save report as JSON$trufflehog3--no-history--formatjson--outputreport.json# render HTML report from JSON$trufflehog3-Rreport.json--outputreport.htmlNewv3 was heavily updated both under the hood and from API perspective. See below for more details on new features.Automatic Config Detection.trufflehog3.ymlis automatically detected in the root of the scanned directory. However, you can still specify custom path using-c/--configCLI argument. Do not forget to check out the updated.trufflehog3.ymlconfig file format.HTML ReportsHTML reports are now much prettier and more useful than ever. You can filter out specific rules or paths on the fly without fiddling with raw data. Have a look at a sampleHTML reportand try it on your own.Inline ExcludeInlinenosecretcomments are now supported for excluding false positives# skip all rulespassword=""# nosecret# only skip rule with specific idpassword=""# nosecret: generic.passwordIf for some reason you would like to avoid such behavior, there is a new--ignore-nosecretCLI flag which will tell trufflehog3 to ignore all inline comments.Incremental ScanYou can now run an incremental scan by specifying the path to the baseline JSON report as-i/--incrementalCLI argument. In this case, only the new issues compared to the baseline will be reported.MultiprocessingMultiprocessing support allows for much faster scans. You can alter the number of processes using-p/--processesCLI argument.ThanksSpecial thanks to Dylan Ayrey (@dxa4481), developer of the originaltruffleHogscanner
Package: trufle
Trufle DocumentationImportingimporttrufleMainWindowwindow=trufle.Window(title,width,height,x,y)All of these parameters are optional.To change the width, height, x, y using a method:window.size(width,height,x,y)The x and y parameters are optional.Alternatively you can use the geometry method:window.geometry('{width}x{height}+{x}+{y}')Again the x and y parameters in the geometry method are optionalTo change the title:window.title('My Window')To run the window:window.run()To stop the window:window.close()To change the icon:window.icon(path_to_icon)Supported file types are .png .ico .svgThis documentation isnt finished yet.
Package: trufont
TruFontTruFontis a font-editing application
written with Python3, ufoLib, defcon and PyQt5.Getting startedInstallPython 3.6(or later):OS X: Install usingHomebrew:brew install python3Windows: Download installer frompython.org/downloadsLinux: It’s usually packaged with the OS.Set up a new Pythonvirtual environment. Although this is not
required, it’shighly recommended, since TruFont has lots of
dependencies, which may (or may not) conflict with other modules
you installed globally.To create a new virtual environment inENV_DIR:python3-mvenv ENV_DIRThis creates a newENV_DIRfolder (you can choose the name
you want). Thebinsubfolder (orScriptsif you are
on Windows) contains a newpythonexecutable, and thepipinstaller linked to that.Activate the newly created environment:OS X or Linux:source ENV_DIR/bin/activateWindows:ENV_DIR\Scripts\activate.batThis temporarily adds the virtual environment’s scripts folder to
your console’sPATH, so you can accesspython,pipand
thetrufontscript from anywhere.Rundeactivatewhen you wish to exit the virtual environment.
This restores the default systemPATH.Install/update TruFont to the latest stable release:pip install--upgradetrufontRun the app astrufont.ContributingHere’s a quick tutorial if you’d like to contribute to TruFont.Click the “Fork” button above, and clone the forked git repository
to a new directory calledtrufont:git clonehttps://github.com/<YOUR_USERNAME>/trufontMove into the new folder and run this command to add the upstream
repository url to the local list of remotes:git remote add upstreamhttps://github.com/trufont/trufontThis enables you to keep up-to-date with the upstream development.Synchronize your fork’smasterbranch with theupstream/master, especially before creating new branches:git checkout master
git fetch upstream
git rebase upstream/master
git pushInstall pre-commit. It will run some checks every time you are
about to commit something.pip install pre-commit
pre-commit installNow, you can create and checkout your new feature branch:git checkout-bmy-cool-new-featureUse pip to install TruFont in “editable” mode:pip install--editable.Instead of copyingtrufontto your Python site-packages directory,
this command only creates a link to the source directory inside the
git repository. You can then modify the code in place, or
synchronize the latest upstream changes (as in step 4) without
having to re-install.It is also recommended to regularly update the dependencies to the
curently tested versions as listed inrequirements.txt:pip install--upgrade-rrequirements.txtOnce you have commited your patch, push the new branch to your fork:git push-uoriginmy-cool-new-featureFinally, click “New pull request” on TruFont’s Github page to submit
your patch.We will be happy to review and integrate it into the main app.Happy hacking with TruFont! :muscle:
Package: truhanen.stuiplot
stuiplotScript for plotting s-tui logs.Usage$ stuiplot --help
usage: stuiplot [-h] [--figure-path FIGURE_PATH] [--align-threshold ALIGN_THRESHOLD] [--minutes MINUTES] log [log ...]

Read s-tui csv log files & plot CPU frequency, temperature, &
utilization percentage as a function of time. All values shown are
means over all CPU cores.

positional arguments:
  log                   path to s-tui log file

optional arguments:
  -h, --help            show this help message and exit
  --figure-path FIGURE_PATH
                        if given, don't show the figure but write it to this file
  --align-threshold ALIGN_THRESHOLD
                        CPU utilization threshold for aligning the data on the time axis
  --minutes MINUTES     amount of time to showInstallationInstall from PyPI withpip install truhanen.stuiplotand from sources withpip install ..
Package: truhanen-windowlayouts
windowlayoutsUtility for automatically storing & restoring application window layouts for
specific screen configurations on the X Window System.For example, if a user frequently changes their setup between a single laptop
screen and two external monitors, this tool remembers & automatically restores
all windows to their original positions for each monitor setup without the need
for manual rearrangement.InstallationRunpip install truhanen.windowlayoutsto install the scriptwindowlayoutsto be used from the command line.To install from source, runpip install .in the project root directory.RequirementsPython 3.7+wmctrl command line toolUsageusage: windowlayouts [-h] [--verbose] {store,restore,switch} ...

positional arguments:
  {store,restore,switch}
    store               Store the current window layout for the current screen
                        layout. Replace a previously stored window layout if
                        such a window layout exists for the current screen
                        layout.
    restore             Restore a window layout if one with the current screen
                        layout has previously been stored.
    switch              Run store, then switch to a screen layout configured
                        in ~/.config/windowlayouts/config.ini, and
                        then run restore. Screen layout values in the
                        configuration file must be valid input for xrandr that
                        apply a specific screen layout. Each "output" of a
                        screen layout should be defined on a separate line in
                        the configuration value. See examples/config.ini for
                        example.

optional arguments:
  -h, --help            show this help message and exit
  --verbose, -v         Increase verbosity.
Package: trulens-eval
Welcome to TruLens-Eval!Don't just vibe-check your llm app!Systematically evaluate and track your
LLM experiments with TruLens. As you develop your app including prompts, models,
retreivers, knowledge sources and more, TruLens-Eval is the tool you need to
understand its performance.Fine-grained, stack-agnostic instrumentation and comprehensive evaluations help
you to identify failure modes & systematically iterate to improve your
application.Read more about the core concepts behind TruLens includingFeedback
Functions,The RAG Triad,
andHonest, Harmless and Helpful
Evals.TruLens in the development workflowBuild your first prototype then connect instrumentation and logging with
TruLens. Decide what feedbacks you need, and specify them with TruLens to run
alongside your app. Then iterate and compare versions of your app in an
easy-to-use user interface 👇Installation and SetupInstall the trulens-eval pip package from PyPI.pipinstalltrulens-evalQuick UsageWalk through how to instrument and evaluate a RAG built from scratch with
TruLens.💡 ContributingInterested in contributing? See ourcontribution
guidefor more details.