Saravanan666/pypi-org huggingface dataset:
Package: th-simple-preprocessor
th-preprocessorSimple Thai Preprocess FunctionsObjectivesThis repository provides simple preprocess techniques for Thai sentences/phrasesSupportsThe module supports Python 3.6+Installationpip install th-simple-preprocessorHow to Usefromth_preprocessor.preprocessimportpreprocesstext='"::::: อย่างไรก็ตามนูร์ ฮิชัม อับดุลเลาะห์ 21-09-2018 https://www.malaysiakini.com/news/444015"'words=preprocess(text)print(words)# อย่างไรก็ตามนูร์ ฮิชัม อับดุลเลาะห์ WSNUMBER WSNUMBER WSNUMBER WSLINKPackage reference:th_preprocessor.preprocess.normalize_linkth_preprocessor.preprocess.normalize_at_mentionth_preprocessor.preprocess.normalize_emailth_preprocessor.preprocess.normalize_hahath_preprocessor.preprocess.normalize_numth_preprocessor.preprocess.normalize_phoneth_preprocessor.preprocess.normalize_accented_charsth_preprocessor.preprocess.normalize_special_charsth_preprocessor.preprocess.remove_hashtagsth_preprocessor.preprocess.remove_tagth_preprocessor.preprocess.remove_dup_spacesth_preprocessor.preprocess.remove_emojith_preprocessor.preprocess.replace_dup_charsth_preprocessor.preprocess.replace_dup_emojisth_preprocessor.preprocess.insert_spacesth_preprocessor.preprocess.normalize_emojith_preprocessor.preprocess.remove_others_charth_preprocessor.preprocess.remove_stopwordsth_preprocessor.preprocess.preprocessCopyrightAll licenses in this repository are copyrighted by their respective authors. Everything else is released under CC0. SeeLICENSEfor details.
Package: th-sklearn-json
sklearn-jsonExport scikit-learn model files to JSON for sharing or deploying predictive models with peace of mind.Why sklearn-json?Other methods for exporting scikit-learn models require Pickle or Joblib (based on Pickle). Serializing model files with Pickle provides a simple attack vector for malicious users-- they give an attacker the ability to execute arbitrary code wherever the file is deserialized. For an example see:https://www.smartfile.com/blog/python-pickle-security-problems-and-solutions/.sklearn-json is a safe and transparent solution for exporting scikit-learn model files.SafeExport model files to 100% JSON which cannot execute code on deserialization.TransparentModel files are serialized in JSON (i.e., not binary), so you have the ability to see exactly what's inside.Getting Startedsklearn-json makes exporting model files to JSON simple.Installpip install sklearn-jsonExample Usageimportsklearn_jsonasskljsonfromsklearn.ensembleimportRandomForestClassifiermodel=RandomForestClassifier(n_estimators=10,max_depth=5,random_state=0).fit(X,y)skljson.to_json(model,file_name)deserialized_model=skljson.from_json(file_name)deserialized_model.predict(X)FeaturesThe list of supported models is rapidly growing. If you have a request for a model or feature, please reach out tosupport@mlrequest.com.sklearn-json requires scikit-learn >= 0.21.3.Supported scikit-learn ModelsClassificationsklearn.linear_model.LogisticRegressionsklearn.linear_model.Perceptronsklearn.discriminant_analysis.LinearDiscriminantAnalysissklearn.discriminant_analysis.QuadraticDiscriminantAnalysissklearn.svm.SVCsklearn.naive_bayes.GaussianNBsklearn.naive_bayes.MultinomialNBsklearn.naive_bayes.ComplementNBsklearn.naive_bayes.BernoulliNBsklearn.tree.DecisionTreeClassifiersklearn.ensemble.RandomForestClassifiersklearn.ensemble.GradientBoostingClassifiersklearn.neural_network.MLPClassifierRegressionsklearn.linear_model.LinearRegressionsklearn.linear_model.Ridgesklearn.linear_model.Lassosklearn.svm.SVRsklearn.tree.DecisionTreeRegressorsklearn.ensemble.RandomForestRegressorsklearn.ensemble.GradientBoostingRegressorsklearn.neural_network.MLPRegressor
Package: thsl
thsl (Thistle)Typed Human-friendly Serialization LanguageA typed configuration language and serialization format. Imagine YAML with types.Exampledebug @bool: false
name @str: My Name
graphics:
	target_framerate @int: 60
	fullscreen @bool: false
	resolution:
		width @int: 1920
		height @int: 1080Indentation is done via tabs onlySeesample.thslfor more.InstallThis is currently a beta level projectpip install thslUsage>>>frompathlibimportPath>>>importthsl>>>data=thsl.load(Path("data.thsl")){'debug':False,'name':'My Name','graphics':{'target_framerate':60,'fullscreen':False,'resolution':{'width':1920,'height':1080}}}FeaturesNot finalized. Subject to changeYAML like syntaxType safety (avoids theNorwayproblem)CommentsTrailing commasString templatingString escapingCompound typesDictionariesListsSetsTuplesScalar typesBoolsIntsFloatsinf-inf-0nanScientific notationDecimalsinf-inf-0nanScientific notationStringsCharsBinaryHexesOctalsBase64encodingdecodingComplex numbersRangesexclusiveinclusiveDates (with the help of the dateutil library)Times (with the help of the dateutil library)DateTimes (with the help of the dateutil library)Intervals (with the help of the tempora library)IP addressesURLsEnvironment variablesPathsSemantic version numbers (using the semantic_version library)RegexType addon systemDump to fileTODOSerializationString templatingSomething equivalent to yaml node anchorsCustom type addons/plugins
Package: thtml
thtmlthtml(toHTML) is a CLI tool and Python package for converting text to HTML.For example, to pipe a command throughthtml:ls-al--color|thtml<!doctype html><html>...</html>Include--opento send the HTML directly to your default browser:ls-al--color|thtml--openFull documentation:thtml.readthedocs.ioInstallationthtmlrequires Python 3.8 or later.pipinstallthtml👋 Hello!Hello!I'mCariad Ecclestonand I'm an independent/freelance software engineer. If my work has value to you, please considersponsoring.If you ever raise a bug, request a feature or ask a question then mention that you're a sponsor and I'll respond as a priority. Thank you!
Package: thtools
ToeholdToolsCategoryStatusRepositoryPackageBuildQualityA library for the analysis of toehold switch riboregulators created by the iGEM team City of London UK 2021.What is ToeholdTools?ToeholdTools is a Python package and desktop app designed to facilitate analyzing
and designing toehold switches, created as part of the 2021 iGEM competition.As of 2021 this is theonlysoftware of its kind!It's still in the making, so please leave a feature request
if there is anything else you would like to see!FeaturesAn easy-to-use programmatic API for investigating the target RNA specificity of toehold switches.A desktop app complete with a graphical user interface for users who prioritise ease over configuration.Full offline support in both the desktop app and the API, with offline support for the latest release of miRBase as well.Progress–tracking support in both the desktop app and the API.Support for Pandas to allow further data-processing.DocumentationInstallation instructions, the full API reference and all available developer notes can be foundhere.LicenseToeholdTools is licensed under the terms of theGPLv3.
However, the distributed app is bundled with several third party projects.
Please seethird_party/NOTICES.mdfor more information.© Copyright 2021, Lucas Ng.
Package: thttp
thttpthttpis a single file, lightweight, well-tested wrapper aroundurllibthat's intended to be copied directly into your project.It's features include:Making GET, POST, PATCH, PUT, HEAD and OPTIONS requestsSending query parameters with your requestEncoding JSON payloads for POST, PATCH and PUT requestsEncoding form-encoded payloads for POST, PATCH and PUT requestSending custom headers with any requestDisabling SSL certificate verification for local testing / corporate proxiesFollowing (or not following) redirectsSending through a CookieJar object that can be reused between requestsAuthenticating with HTTP basic authSpecifying a custom timeout for your requestDecompressing gzipped content in the responseLoading JSON from the responseReturning error responses instead of throwing exceptions fromurllibpretty()function for printing responsesAbility to upload files using the{"file": open("file.png", "rb")}styleFuture features:Better detection of JSON responsesImprove handling of non-utf-8 requestsImprove handling of non-utf-8 responsesNote: this project is not intended to solve all use cases that can be achieved with urllib, requests, httpx, or other HTTP libraries. The intent is to provide a lightweight tool that simplifies some of the most common use cases for developers.Installationcopythttp.pydirectly into your project:curl https://raw.githubusercontent.com/sesh/thttp/main/thttp.py > thttp.pyOr, install withpip:python3 -m pip install thttpBasic UsageSee the tests for examples of usage, but, effectively it's as simple as:fromthttpimportrequestresponse=request("https://httpbingo.org/get",params={"data":"empty"})response.json# {'args': {'data': ['empty']}, 'headers': {'Accept-Encoding': ['identity'], 'Fly-Client-Ip': ['45.76.105.111'], 'Fly-Forwarded-Port': ['443'], 'Fly-Forwarded-Proto': ['https'], 'Fly-Forwarded-Ssl': ['on'], 'Fly-Region': ['hkg'], 'Fly-Request-Id': ['01F6P2WQAY1NGPRDCXV9H60XW5'], 'Host': ['httpbingo.org'], 'User-Agent': ['Python-urllib/3.8'], 'Via': ['1.1 fly.io'], 'X-Forwarded-For': ['45.76.105.111, 77.83.142.42'], 'X-Forwarded-Port': ['443'], 'X-Forwarded-Proto': ['https'], 'X-Forwarded-Ssl': ['on'], 'X-Request-Start': ['t=1622091390302198']}, 'origin': '45.76.105.111, 77.83.142.42', 'url': 'https://httpbingo.org/get?data=empty'}response.status# 200Running the tests>python3-munittestthttp.pyAnd to check the coverage:>coveragerun-munittestthttp.py
>coveragehtml&&openhtmlcov/index.htmlRunblackbefore committing any changes.>blackthttp.pyPackaging for releaserm dist/*
python3 -m build
python3 -m twine upload dist/*LicenseThis code is currently released under theUNLICENSEand considered public domain.
If more appropriate for your usage you may consider this project released under theMIT License.
Package: thucyd
Advanced EigenanalysisWhat isthucyd?thucyd(thoo'-sid) delivers a reference implementation of advanced eigenanalysis tools. When more performant libraries are created (elsewhere) then they can use this version as a golden source.SeeA consistently oriented basis for eigenanalysis(2020) in theInternational Journal of Data Science and Analyticsfor details of the functions provided inthucyd.Package InstallationThe two package hosts forthucydarePyPiandConda-Forge. The packages are identical and the only difference is the means of delivery. From PyPi, usepip,$pipinstallthucydand from Conda-Forge useconda:$condainstall-cconda-forgethucydOnce installed, the package is importable to Python:>>>importthucydA quick example call to theeigensubpackage would be>>>importnumpyasnp>>>V=np.eye(3).dot(np.diag([1.,-1.,1.]))>>>E=np.arange(3)[::-1]>>>Vor,Eor,signs,thetas,_=thucyd.eigen.orient_eigenvectors(V,E)>>>Vorarray([[1.,0.,0.],[0.,1.,0.],[0.,0.,1.]])>>>signsarray([1.,-1.,1.])Package DependencyThe only dependenciesthucydhas at this time is onpython >= 3.7andnumpy >= 1.23.AboutthucydThucydideswas the first Western writer and historian who applied scientific principles to the recording of Western history. Although Herodotus, who predates Thucydides by less than a generation, started the transformation away from the epic poetry enshrined by Homer to a more objective record, it was Thucydides who engaged in inquiry and cross validation of all accounts in his History of the Peloponnesian Wars.Buell Lane PressBuell Lane Pressis the package sponsor.
Package: thug
The number of client-side attacks has grown significantly in the past few years
shifting focus on poorly protected vulnerable clients. Just as the most known
honeypot technologies enable research into server-side attacks, honeyclients
allow the study of client-side attacks.A complement to honeypots, a honeyclient is a tool designed to mimic the behavior
of a user-driven network client application, such as a web browser, and be
exploited by an attacker’s content.Thug is a Python low-interaction honeyclient aimed at mimicking the behavior of a
web browser in order to detect and emulate malicious contents.DocumentationDocumentation about Thug installation and usage can be found athttp://thug-honeyclient.readthedocs.io/.ContributionsThug is open source and we welcome contributions in all forms!Thug is free to use for any purpose (even commercial ones). If you use and appreciate Thug, please consider
supporting the project with a donation using Paypal.TestingTo run the full test suite usingtox, run the command:toxSince tox builds and installs dependencies from scratch, usingpytestfor faster testing is recommended:pytest--covthugLicense informationCopyright (C) 2011-2024 Angelo Dell’Aera <angelo.dellaera@honeynet.org>License: GNU General Public License, version 2
Package: thug-memes
Command line Thug Meme generator written in Python.InstallationRequirementsPython 3.4+pip3installthug-memesThis installs the core version which supportsopencvhaarcascade based detector. If you are serious with your thug memes (like you definitely should), there is also support fordlibbased detector which, in general, provides better results. If you want to enjoy dlib’s accuracy, please followdlib’s own installation instructions. Some additional dlib installation guides for macOS and Ubuntu can be found in:[1][2].
Thug memes can be installed with dlib’s Python bindings included:pip3installthug-memes[dlib]Usagethugpath/to/the/original/image'JUST CASUALLY LIFTING''20KGs HERE'Will store something like this in your current directory:If you have installed dlib and want to use it instead of opencv detector, add option:--detectordlibIf you want to see the results of the detection, add–debugoption:Opencv (–debug):Dlib (–detector dlib –debug):Almost everything is configurable. You can see the used configuration with:--show-configThe default configuration is insrc/thug/defaul.conf. You can override this by defining environment variableTHUG_CONFand pointing it to a file which contains overrides. In addition, you can override any of the configuration variables from command line with–overrideor-ooptions. For example:thugpath/to/original/img.jpg'WE HAVE HUGE CIGARS''BUT ALSO PINK TEXT'--detectordlib-ocigar_length2-oglasses_width5-ofont_bgr'[180,105,255]'For all available options, see:thug--helpIf you don’t want to have awesome Thug elements in your meme, there is also ‘a plain meme’ alternative:memepath/to/the/original/image'THIS IS A NORMAL MEME''WITHOUT THUG STUFF :('-ofont_bgr'[255,255,255]'Example images are frompexels.ContributingSeecontributingguide.
Package: thu-learn-downloader
THU Web Learning DownloaderDownload everything from Web Learning of Tsinghua UniversityDemoThe resulting file structure looks like:thu-learn
└── Quantum Mechanics(1)
   ├── docs
   │  └── 电子教案
   │     ├── 01-0量子力学介绍1.pdf
   │     └── 04-0量子力学介绍2.pdf
   └── work
      └── 01-第一周作业
         ├── attach-第一周作业.pdf
         ├── submit-第一周作业.pdf
         └── README.mdUsageUsage:$tld[OPTIONS]Options:-u, --username TEXT-p, --password TEXT--prefix DIRECTORY: [default: $HOME/thu-learn]-s, --semester TEXT: [default: 2023-2024-1]-c, --course TEXT--document / --no-document: [default: document]--homework / --no-homework: [default: homework]-j, --jobs INTEGER: [default: 8]-l, --language [en|zh]: [default: en]--log-level [NOTSET|DEBUG|INFO|WARNING|ERROR|CRITICAL]: [env var: LOG_LEVEL; default: INFO]--help: Show this message and exit.Featuresfast concurrent downloadpretty TUI powered byrichauto setmtimeof downloaded files according to timestamp of remote fileauto skip download when local file is newerdump homework details intoREADME.mdin each homework folderpretty markdown files powered byprettier(requireprettierinstalled)Installationdownload pre-built binary formGitHub Releasespip install thu-learn-downloaderpipx install thu-learn-downloader
Package: thumbframes-dl
thumbframes_dlDownload thumbnail frames from a video's progress bar.When you watch a video on the web, you've probably noticed these thumbnail sized preview frames that are shown when you hover the cursor over the video player's progress bar.© Blender Foundation |cloud.blender.org/springWhen you download the actual images, you'll see that they're actually concatenated in grids containing n*m frames like this:© Blender Foundation |cloud.blender.org/springI refer to this individual frames as thumbframes because I couldn't find a better, less confusing name.How to useInstall the library:pip install thumbframes-dlA simple example:# Download a video's thumbframes images and save them in the filesystem# Spring | Blender Animation Studio | CC BY 4.0fromthumbframes_dlimportYouTubeFrames# create YouTubeFrames object containing the methods to get the thumbframesvideo=YouTubeFrames('https://www.youtube.com/watch?v=WhWc3b3KhnY')# iterate all images with thumbframes (there may be more than one)fori,frames_imageinenumerate(video.get_thumbframes()):file_content=frames_image.get_image()withopen(f"{video.video_id}_{i}.{frames_image.mime_type}","wb")asf:f.write(file_content)# save each imageFor a couple more examples showing the potential usefulness of thumbframes see thedemos.For a more detailed description of the API see theAPI documentation.CopyrightAll the code in thumbframes_dl is released into the public domain by its authors. SeeLICENSE.All the text in thumbframes_dl's documentation is likewise released into the public domain under the same license.The images used in the documentation are attributed to their copyright owners and shared under their respective Creative Commons licenses.
Package: thumbgen
ThumbgenPre-generates thumbnails for 'Gnome Files' formerly known as nautilus. This is useful if you have a lot of files which you want to glance over but you have to wait for them to load as you scroll.
SupportsPython 3.5+and any Linux distro using Gnome Desktop 3.Basic Usage# generating thumbnails for two directories
thumbgen -d directory1/directory1_1 directory2

# Pulling up the help
thumbgen --helpCommand Line OptionsshortlongDescription-d--img_dirsdirectories to recursively generate thumbnails seperated by space, eg: "dir1/dir2 dir3"  [required]-w--workersno of cpus to use for processing-i--only_imagesWhether to only look for images to be thumbnailed-r--recursiveWhether to recursively look for files--helpCLI helpInstallationInstall PyGObject pre-requisites for your OS fromhere. For Ubuntu/Debian:sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0Then install Thumbgen using:pip install thumbgen
Package: thumb-gen
Thumbnail Generator 🎬What is ThisThis is a Python application that can be used to generate video thumbnail for mp4 and mkv file types.InstallationYou can use pip:~$ pip3 install thumb-genConfigurationsThe number of screen images that should be included in the final thumbnail imageThumbnail image qualityFont type in the video info panel. You can add a file path of a font file (.ttf) to thisFont size in the video info panelCustom text in the video info panelBackground color of the thumbnail (Hex codes are also supported)Font colour of the thumbnail (Hex codes are also supported)Download font files :FontSquirrel~$ thumb-gen -cor~$ thumb-gen --configBy program default:IMAGES=12IMAGE_QUALITY=80FONT=FONT_SIZE=20CUSTOM_TEXT=BG_COLOUR=whiteFONT_COLOUR=blackUsageUsage optionsUsage: thumb-gen file file
usage: thumb-gen dir dir

Options:
  -h, --help     show this help message and exit
  -c, --config   configurations (images, image quality, font, font size,
                 custom text, bg color, font color)
  -v, --version  show thumb-gen version and exitConsole~$ thumb-gen -h~$ thumb-gen --help~$ thumb-gen -c~$ thumb-gen --config~$ thumb-gen -v~$ thumb-gen --version~$ thumb-gen input.mp4~$ thumb-gen input.mp4 input2.mp4~$ thumb-gen "d:/videos/input.mp4"~$ thumb-gen "/videos"~$ thumb-gen "/videos" "/videos2"~$ thumb-gen "d:/videos"PythonIf you don't set an output folder, thumbnail images will be saved in the video folder (video_path).If you don't need a custom text and custom font file (including font size) and you have already set these for the configuration file (using console or defaults), it will be added automatically. To avoid this set thecustom_textvalue toFalseand add a custom font file location.If you do not set thecolumnssize, it will use the default value (3)Generator(video_path,output_path='',rows=0,columns=0,imgCount=0,custom_text='True',font_dir='',font_size=0,bg_colour='',font_colour='')Example 1fromthumb_genimportGeneratorapp=Generator(video_path="C:/input/video.mp4",output_path="C:/output/",custom_text="www.example.com",font_dir="C:/Windows/Fonts/Arial.ttf",font_size=30)app.run()Example 2importosfromthumb_genimportGeneratorfolder='C:/input'forvideoinos.listdir(folder):ifvideo.endswith('.mp4')orvideo.endswith('.mkv'):app=Generator(video_path=os.path.join(folder,video),custom_text=False,font_dir="C:/Project/font.ttf",font_size=25,bg_colour='blue',font_colour='red')app.run()Example 3importosfromthumb_genimportGeneratorfolder='C:/input'forvideoinos.listdir(folder):ifvideo.endswith('.mp4')orvideo.endswith('.mkv'):app=Generator(video_path=os.path.join(folder,video),columns=5,rows=10,custom_text=False,font_dir="C:/Project/font.ttf",font_size=25,bg_colour='blue',font_colour='red')app.run()
Package: thumbhash
thumbhash-pyA Python port of thethumbhashencoder byEvan WallaceInstallationInstall thumbhash with pippipinstallthumbhash-pyOptionally install with pillow support:pipinstallthumbhash-py[pillow]UsageEncode a RGBA array to a ThumbHashfromthumbhashimportrgba_to_thumb_hashrgba=[100,85,15,255,100,84,32,255,...]width=100height=75thumb_hash=rgba_to_thumb_hash(rgba,width,height)# [86, 8, 10, 13, 128, 22, 234, 86, 111, 117, ...]Open an image using pillow, scale down to max dimensions of 100x100 and encode to a ThumbHashfromthumbhashimportimage_to_thumb_hashthumb_hash=image_to_thumb_hash('image.jpg')# [86, 8, 10, 13, 128, 22, 234, 86, 111, 117, ...]FeaturesAs of now this library only handles the conversion of images to hashes, not the reverse.
Package: thumbhash-py
thumbhash-pyA Python port of thethumbhashencoder byEvan WallaceInstallationInstall thumbhash with pippipinstallthumbhash-pyOptionally install with pillow support:pipinstallthumbhash-py[pillow]UsageEncode a RGBA array to a ThumbHashfromthumbhashimportrgba_to_thumb_hashrgba=[100,85,15,255,100,84,32,255,...]width=100height=75thumb_hash=rgba_to_thumb_hash(rgba,width,height)# [86, 8, 10, 13, 128, 22, 234, 86, 111, 117, ...]Open an image using pillow, scale down to max dimensions of 100x100 and encode to a ThumbHashfromthumbhashimportimage_to_thumb_hashthumb_hash=image_to_thumb_hash('image.jpg')# [86, 8, 10, 13, 128, 22, 234, 86, 111, 117, ...]FeaturesAs of now this library only handles the conversion of images to hashes, not the reverse.