Saravanan666/pypi-org huggingface dataset:
Package: twain
The Python TWAIN module provides an interface to scanners, digital cameras andother devices which implement TWAIN, for the Windows platform. It provides thefunctionality to allow a Python application to connect to the scanner/camera andto retrieve images from that device.The Python TWAIN module supports 32bit Windows only. It does not run on AppleComputer Platforms or on UNIX based Platforms.Example: Retrieve an image from a scannerimport twainsm = twain.SourceManager(0)ss = sm.OpenSource()ss.RequestAcquire(0,0)rv = ss.XferImageNatively()if rv:(handle, count) = rvtwain.DIBToBMFile(handle, 'image.bmp')
Package: twalk
Featurestwalk packs an entire directory tree (including files) into a single .txt file, which it then can use to regenerate that directory tree.Installationpip install twalkUsageusage: twalk [-h] [-i] [-v] [-V | -s] {pack,unpack} path

Condense a directory tree into a single txt file or extract it from one

positional arguments:
  {pack,unpack}        What to do with the specified path
  path                 path to directory you wish to (un)pack

optional arguments:
  -h, --help           show this help message and exit
  -i, --ignore_binary  Instead of raising an exception when encountering
                       binary files during packing, skip them altogether
  -v, --version        show program's version number and exit
  -V, --verbose
  -s, --silent
Package: twall
TWallTWall is a simple application to display tweets returned by theTwitter’s Search API. You can run it from the command line to watch
newly added tweets in near real-time, or launch a simple web application on your machine that mirrors Twitter’s search
feature. It supports all three modes of search offered by the API: recent, popular and mixed.Developed for MI-PYT 2016/2017DocumentationThe module’s documentation is located in thedocsfolder. To build HTML documentation, navigate to
the directory, then run:pip install -r requirements.txt
make htmlThis will create a_build/htmlfolder containing anindex.htmlfile, which you can browse. If you don’t
need the entire documentation and just want to get started quickly, follow the tutorial laid out indocs/introduction.rst.AuthorsTWall is developed and maintained byDaniel MalyLicenseMIT
Package: twapp
A simple tornado web app generator, very simple, very clean.
Just generate your app, and never touch it again.INSTALLinstall from pypi:pip install twappinstall from source:git clone git@github.com:liujinliu/twapp.git
cd twapp
make install
make uninstall ---UNDEPLOY METHODUSEAGE(twapp)$twapp-make --help
--app                            app name
--prefix                         generate twapp files at [PREFIX] (default
                                 ~/workspace)An example of generate a project:$ twapp-make --app=foo --prefix=mywork
$ cd mywork/foo
$ make build
$ pip install dist/foo-0.0.1-py2-none-any.whl
$ foo-start --help
  --base-dir                       put the config path here (default .)
  --debug                          debug option (default False)
  --port                           app listen port (default 8888)
$ foo-start
$ curl http://localhost:8888/ping
foo works well.
Package: twarc
twarctwarc is a command line tool and Python library for collecting and archiving Twitter JSON
data via the Twitter API. It has separate commands (twarc and twarc2) for working with the older
v1.1 API and the newer v2 API and Academic Access (respectively). It also has an ecosystem ofpluginsfor doing things with the collected data.See thetwarcdocumentation for running commands:twarc2andtwarc1for using the v1.1 API. If you aren't sure about which one to use you'll want to start with twarc2 since the v1.1 is scheduled to be retired.InstallIf you have python installed, you can install twarc from a terminal (such as the Windows Command Prompt available in the "start" menu, or theOSX Terminal application):pip3 install twarcOnce installed, you should be able to use the twarc and twarc2 command line utilities, or use it as a Python library - check the examplesherefor that.Other ToolsTwarc is purpose build for working with the twitter API for archiving and studying digital trace data. It is not built as a general purpose API library for Twitter. While the primary use is academic, it works just as well with "Standard" v2 API and "Premium" v1.1 APIs.For a list of general purpose Twitter Libraries in different languages see theTwitter Documentation. For Python,TwitterAPIandtweepyare both up to date and maintained. They also support v2 APIs, and their data format with expansions may differ from twarc. There is also a reference implementation of thev2 Academic Access Searchandv1.1 Premium Searchfrom Twitterhere. Thev2 versionof this script is compatible with twarc.ForRthere isacademictwitteR. Unlike twarc, it focuses solely on querying the Twitter Academic Research Product Track v2 API endpoint. Data gathered in twarc can be imported intoRfor analysis as a dataframe if you export the data into CSV usingtwarc-csv.Getting HelpCheck out thetutorialto get started, or follow along with thisrecorded streamintroducing twarc. You can also find additional resources linked fromresources. If you run into trouble, feel free to make a post on theTwarc Repositoryor on theTwitter Developer Forums.
Package: twarc2sql
twarc2sqlThis package converts jsonl file generated by twarc2 to sql database in an opnionated way.Free software: MIT licenseDocumentation:https://twarc2sql.readthedocs.io.FeaturesThis package converts jsonl file generated by twarc2 to a postgres sql database in an opnionated way.It creates a database with multiple tables that can be found in the documentation & models.py file.InstallationYou can install twarc2sql using pip:$pipinstalltwarc2sqlUsageimporttwarc2sqltwarc2sql.connect_to_db_and_upload("folderpath/to/jsonl/file","jsonl_file","twarc_task_type","env_file_with_db_information",)CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2023-03-23)First release on PyPI.
Package: twarc-divide
twarc-dividetwarc-divideadds a newdividetwarccommand that
lets you divide collected twitter data by date or a custom temporal window.InstallTo install you will need to:pip3 install twarc-divideUseFirst you will need to collect some data withtwarc:twarc2 search politics tweets.jsonlThen you can divide them by day:mkdir days/
twarc2 divide tweets.jsonl days/This will create in the directorydays/an output file for each day
whose name will be the date.
If the output file already exists, it will append the output to it.You can also change the granularity of the temporal windows used:mkdir hours/
twarc2 divide --granularity hour tweets.jsonl hours/
Package: twarc-edits
twarc-editstwarc-editsadds a neweditstwarccommand that lets you filter collected twitter data to find tweets that have been edited. Outputted data isflattenedsince not all tweets in a single response from the Twitter API may contain edited tweets.InstallTo install you will need to:pip3 install twarc-editsUseFirst you will need to collect some data withtwarc:twarc2 search politics tweets.jsonlThen you can filter it:twarc2 edits tweets.jsonl edited-tweets.jsonlOr use a pipeline if you only want to keep the edits:twarc2 search politics | twarc2 edits - edited-tweets.jsonl
Package: twarc-hashtags
twarc-hashtagsThis module is extendstwarcwith ahashtagscommand that will extract and
count the hashtags in a tweet dataset.Installpip install twarc-hashtagsCollect some Twitter data, for example:twarc2 search blacklivesmatter tweets.jsonlBecause you installed the plugin you have a new subcommandhashtags:twarc2 hashtags tweets.jsonl hashtags.csvThen openhashtags.csvin your favourite spreadsheet program or
DataFrame library.Behind the scenes twarc-hashtags uses Python's native support for SQLite to
create a database and then insert/query it. You can see this database after the
program finishes ashashtags.dbin your current working directory.Options--group: group results by day, week, month, year--limit: limit to this number of hashtags (per group if --group is used)--db: if you would like to name the database something other thanhashtags.db--no-insert: use an existing database instead of inserting (useful for
large numbers of tweets)
Package: twarc-ids
twarc-idsThis module is a simple example of how to create a plugin fortwarc. It usesclick-pluginsto extend the main twarc command, and to manage the command
line options.First you need to install twarc and this plugin:pip install twarc
pip install twarc-idsNow you can collect data using the core twarc utility:twarc search blacklivesmatter > tweets.jsonlAnd you have a new subcommandidsthat is supplied by twarc-ids.twarc ids tweets.jsonl > ids.txtIt's good practice to include some tests for your module. Seetest_twarc_ids.pyfor an example. You can run it directly withpytestor
using:python setup.py testWhen creating your setup.py make sure you don't forget theentry_points magicso that twarc will find your plugin when it is installed!
Package: twarc-text
twarc-textThis module extendstwarcto allow you to print out tweets as text for easy
testing on the command line. Maybe it's useful for spot checking files you've
collected, or your search queries. It's really just a gimmick :) Send a PR to
make it better!Installpip install twarc-textUseIf you've got a file of tweets that you've previously collected you can print
them out:twarc2 text tweets.jsonlAlso you can pipe directly, for example displaying the sample stream:twarc2 sample | twarc2 text
Package: twarc-timeline-archive
twarc-timeline-archiveThis module extendstwarcto allow you to fetch the timelines for a list of
users (either Twitter user_ids or usernames). Unlike thetwarc2 timelinessubcommandtwarc2 timeline-archiveis designed to be run on a schedule and
will only fetch new tweets since the last run instead of the entire timeline.All the tweets will be written to files named after the user in the given
directory. When you run timelines successively on multiple days it is smart
enough to only fetch tweets since the last tweet that was found for the user.Install with:pip3 install --upgrade twarc-timeline-archiveAnd run it like this:twarc2 timeline-archive users.txt /path/to/a/directory
Package: twb
TwitterBackupA tool to back up other users' Twitter accounts using the Twitter API. (Currently limited to the last 3200 tweets).https://user-images.githubusercontent.com/22280294/207434663-a2fa6170-d740-4f35-82f6-df41bdce8837.mp4UsageInstall python>= 3.7(Tested on python 3.11)pip install twbRegister for a Twitter API tokenPut your tokens in$HOME/.config/twb/config.tomlor./config.toml.You can reference the example config belowRun commandtwb <username>, and it will download to./backupsExample Config# The consumer key from the Twitter application portal (https://developer.twitter.com/en/portal/dashboard)consumer_key='#########################'# The consumer secret from the Twitter application portalconsumer_secret='##################################################'# The access token of an app from the Twitter application portalaccess_token='##################################################'# The access secret of an app from the Twitter application portalaccess_secret='#############################################'
Package: twbanker
Show you the money in your Taiwan banks with a simple command:$ twbanker ctbc
ID card number: ***
Username: ***
Password: ***
TWD     1000.00     000000123456789
USD      100.00     000000987654321
-----------------------------------
TWD     4000.00               TOTALCurrent supported banksChunghwa Post (中華郵政)CTBC Bank (中國信託)First Bank (第一銀行)Shin Kong Bank (新光銀行)Standard Chartered (渣打銀行)Installation(sudo) pip install twbankerUsage$ twbanker --help
Usage: twbanker [OPTIONS] COMMAND [ARGS]...

  Show you the money in your Taiwan banks.

Options:
  --help  Show this message and exit.

Commands:
  chartered  Show you money in Standard Chartered
  ctbc       Show you money in CTBC Bank
  first      Show you money in First Bank
  post       Show you money in Chunghwa Post
  shinkong   Show you money in Shin Kong BankHow It Works & DisclaimerTW Banker is a simple web crawler that logs in your bank’s web site and parses
out your bank balances. It asks for your login crendentials every time you
execute the command. It does not store any of your login crendentials locally
nor remotely, so using this tool should be pretty safe.I use this tool personally and I will do my best to make it safe to use.
However, I do not guarantee that the tool is 100% safe. I (the author) and any
future contributors of TW Banker will not account for any lost caused by using
this tool. Please use at your own risk.
Package: twblog
TWBlog ReaderEsse é uma simples CLI (Command Line Interface) para ler os artigos do blog daTreinaWeb. Esse projeto foi desenvolvido para o artigoEmpacotando e publicando pacotes Python.InstalaçãoPara instalar o pacote, basta executar o comando abaixo:pipinstalltwblog-readerUsoApós a instalação do pacote será disponibilizado o comandotwblogna linha de comando. Para ver a lista do dezesseis últimos artigos, basta executar o comando abaixo:twblogA saída será parecida com a abaixo:Últimos artigos do blog da TreinaWeb:

0 - Desenvolvedor mobile: por que investir nessa carreira?
1 - ASP.NET - Conhecendo a Minimal API
2 - Como se preparar para entrevistas técnicas
3 - Seletores avançados do CSS
4 - Criando o primeiro CRUD com NestJS
5 - Seletores Básicos do CSS
6 - Orientação a objetos em Dart
7 - 5 dicas para entrevistas na área de TI
8 - Novos recursos do ECMAScript 2022
9 - O que preciso conhecer antes de iniciar estudos em uma linguagem de programação?
10 - Criando o primeiro CRUD com FastAPI
11 - Unidades de medidas no CSS
12 - Orientação a objetos no C#
13 - Guia da linguagem C#
14 - Estruturas condicionais e de repetição no C#
15 - Conhecendo variáveis e constantes no C#Para ver o conteúdo de um artigo específico, basta executar o comando abaixo:twblog[id]Onde[id]é o identificador do artigo que você deseja ver. Por exemplo, para ver o artigo de identificador 5, basta executar o comando abaixo:twblog5LicençaEsse projeto está sob a licença MIT. Veja o arquivoLICENSEpara mais detalhes.
Package: twbotlib
🐦 Unoffical library for twitch bots written in Python3 🤖📄 Documentation: https://twbotlib.readthedocs.io/en/latest/ 📄🛠 Current library version is 0.0.52 🛠Installpy -m pip install -U twbotlibTest Bot Screenshot (old testbot)Note: I used same user for testing, messages starting with the ! prefix is command and after that is the bot answer.
Package: twb-project
Temporal Wikipedia Blocks (TWB)Temporal Wikipedia Blocks (TWB) is a powerful Python package designed to process the extensive edit history of Wikipedia pages into easily manageable and memory-friendly blocks. The package is specifically developed to enable efficient parallelization and composition of these blocks to facilitate faster processing and analysis of large Wikipedia datasets. The original design of this package is to build other Wikipedia-oriented datasets on top of it.The package works by dividing the Wikipedia edit history into temporal blocks, which are essentially subsets of the complete dataset that are based on time intervals. These blocks can then be easily processed and analyzed without the need to load the entire dataset into memory.InstallationThe package is available on PyPI and can be installed using pip:pipinstalltwb-projectBenefitsEfficient: The package is designed to be memory-friendly and can be easily parallelized to process large datasets.Fast: The package is designed to be fast and can be easily optimized to process large datasets.Flexible: The package is designed to be flexible and can be easily extended to support other types of blocks.Composable: The package is designed to be composable and can be easily combined with other packages to build other datasets.SpecificationDefault compression method: ZStandard.
Package: twc-cli
Timeweb Cloud Command Line Interface and simple SDK 💫Руководство пользователя🇷🇺Command Line Interface (CLI) Reference📜Installationpip install twc-cliGetting startedGet Timeweb Cloudaccess tokenand
configuretwcwith command:twc configEnter your access token and hitEnter.Configuration done! Let's use:twc --helpShell completionTo install completion script run:twc --install-completiontwcautomatically detect your shell. Supported: Bash, Zsh, Fish, PowerShell.
Package: twcli
TaskWorkshop CLI is a thin console client forTaskWorkshop.InstallationInstall with pip:$ pip install twcliIssues and questionsHave a bug? Please create an issue on GitHub!https://github.com/TaskWorkshop/taskworkshop-cli/issuesContributingTaskWorkshop CLI is an open source software and your contribution is very much
appreciated.Check foropen issuesoropen a fresh issueto start a discussion around a feature idea or a bug.Fork therepository on Githuband make your changes.Write tests for your changes and follow these rules: PEP8, PEP257 and The
Zen of Python.Make sure to add yourself to AUTHORS and send a pull request.LicenceTaskWorkshop CLI is available under the GPL version 2 license. SeeLICENSEfile.
License is available athttp://www.gnu.org/licenses/gpl-2.0.txt
Package: twcloud
Generate a word cloud ofTwittertweets with a single command.twcloud is a Python package that leverages thetwintpackage to gather Tweets from any public account without requiring authentication, and thestylecloudpackage which adds many useful features to create truly unique word clouds!Retrieve tweets from a user, or a Twitter search.Gather any number of Tweets from the specified query for building the word cloud (even beyond the typical 3,200 limit)Command Line Interface!Additionally, from the basestylecloudpackage:Icon shapes (of any size!) for word cloudsSupport for advanced color palettes (viapalettable)Manual color selection for text and backgrounds,Directional gradients w/ the aforementioned palettes.
Package: twcollect
twcollectSimple CLI to collect data from the Twitter stream APIInstallationpip install twcollectUsageCreate a credentials file with the following format:twitter_token: "<TWITTER_BEARER_TOKEN>"See the CLI help for details on how to use:python-mtwcollect--helpNoteThis project has been set up using PyScaffold 4.3.1. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: tw-comments
TW CommentsA CLI tool to get comments from Youtube and repost them in a Slack channel.Installationpip3installtw-commentsUsageYou need three things to use this tool:A Youtube API keyA Youtube playlist IDA Slack webhook URLYoutube API keyYou can get a Youtube API key by following the instructionshere.Youtube playlist IDYou can get a Youtube playlist ID by following the instructionshere.Slack webhook URLYou can get a Slack webhook URL by following the instructionshere.Run the toolThis is a example of how to run the tool to get the comments of all videos and repost them in a Slack channel:tw-commentsyoutube--send-to=slack--youtube-api-key=your-youtube-api-key--youtube-playlist-id=your-youtube-playlist-id--slack-webhook-url=your-slack-webhook-urlYou can also run the tool to send the comments to the standard output, in the case you don't need to pass the--slack-webhook-urlargument:tw-commentsyoutube--send-to=stdout--youtube-api-key=your-youtube-api-key--youtube-playlist-id=your-youtube-playlist-idThe tool will create a file calledlast_execution.txtin the current directory. This file will be used to get the last execution date and time. This way, the tool will only get the comments of the videos that were uploaded after the last execution. If you want to change the path of this file, you can use the--last-execution-filenameargument:tw-commentsyoutube--send-to=slack--youtube-api-key=your-youtube-api-key--youtube-playlist-id=your-youtube-playlist-id--slack-webhook-url=your-slack-webhook-url--last-execution-filename=/path/to/last_execution.txt
Package: twcommon
Version : 0.1.0
Author : Thomas Weholt <thomas@weholt.org>
License : GPL v3.0Description:A collection snippets, pieces of code, stuff found on the net I use all the time. Will grow over time.Currently it consists of:get_free_space(folder)Platform independant way to calculate free space.CheckTargetFilename(filename)It will check if there`s a filename by that name allready,
and if so, return a new filename adding ~1 to the filename.
For example if you want to write to /tmp/test.txt but that file allready exists,
using CheckTargetFilename(‘/tmp/test.txt’) will return /tmp/test~1.txt.
If /tmp/test~1.txt allready exists the returned file will be /tmp/test~2.txt.humanize_bytes(size)Converts bytes to nearest kilobyte, megabyte, gigabyte etc.getWords(text, ignore_words = [], minsize = 2)Extracts words from a piece of text.
It splits words based on spaces, change in char-case inside a text, numbers etc.generate_checksum(filename)Generates a hexdigest version of a SHA-512 checksum based on a file.parse_filedata(root_path, complete_filename)Returns a dictionary of filedata.dirwalk(dir, extensions_to_include = None)Directory walk, yielding filenames found.
Can filter based on extensions.
Package: tw-complex
TW ComplexRepo with algorithms to divide ally villages into front and back in TW.Underneath it is a problem of dividing a set of 2D pointsAaccording to themin_radiusandmax_radiusdistances from a set of other 2D pointsB, which can be solved most simply by counting the distances from each point in the first setAto all points in the second setBone by one.InstalationBasic usageExamplesRunning locallyInstalationpipinstalltw_complexBasic usagefromtw_compleximportCDistBruteimportnumpyasnp# The code for Example 1 belowpoints1=np.random.rand(10000,2)+[2,0]points2=np.random.rand(15000,2)min_radius=1.4max_radius=2precise_front,precise_back=CDistBrute(ally_villages=points1,enemy_villages=points2,min_radius=min_radius,max_radius=max_radius,).result()Examples (before -> after)Example 1Ally:10000points
Enemy:15000points
min_radius:1.4
max_radius:2Example 2Ally:2500points
Enemy:6000points
min_radius:4max_radius:10Example 3Ally:20000points
Enemy:20000points
min_radius:20max_radius:60Example 4Ally:20000points
Enemy:20000points
min_radius:10max_radius:120Running locallyYou will need to havepoetryinstalled.git clone https://github.com/rafsaf/tw-complex.git
cd tw-complex
poetry installCode lives intw-complexfolder, and you may also test algorithms running in main folder# In main folder
# eg. ~/Desktop/tw-complex

pytestFor CDistAndKNN it looks like# tests/test_cdist.pyfromtw_compleximportCDistAndKNNimporttests.utilsasutilsdeftest_CDistAndKNN():utils.run_all_tests(CDistAndKNN,"CDistAndKNN",_precision=0.8,draw=True)# Go with `draw=False` if you do not want to use pyplot to show diagramsSome hardcoded tests are located intests/utils.py, it uses brute force for calculating exact result, then compare it to given algorithm using basic maths. You can even compare it to brute force itself (eg. using diffrent_precision). For new test there should be another file intests/test_name_of_file_in_tw_complex_folder.pywith pretty much the same content as above.