Saravanan666/pypi-org huggingface dataset:
Package: twitchvod
Twitchvod (v0.1.2)Installationpip install twitchvodCompatibilityThis package is python3 compatible. There is no support for python2 currently.>= python 3.5.2Please note that this library is to be used at your own risk. Using undocumented api interfaces is against the Twitch terms of service. I take no responsibility if your developer tokens get
revoked etc. However, if you would like to learn how this library works, please feel free to read through the source.Okay now for the more interesting stuff.This API client will use your provided Twitch developer client_id to make several requests to Twitch API endpoints to fetch information related to a particular VOD. You can even query for all of the MPEG-2 Transport Stream files to which you can download however you wish. For this example, let's say you want to download VOD372739399.>>> from twitchvod import Client

# Create client...
>>> client = Client("TWITCH-DEV-APP-CLIENT-ID")
>>> client
<Client>

# Generate access token for VOD 372739399...
>>> token = client.get_access_token(372739399)
>>> token
<AccessToken [372739399-vod_id]>

# Fetch the different vod qualities w/ token...
>>> vods = client.get_vods(token)
>>> vods
[
    <Vod [chunked,1920x1080]>,
    <Vod [720p60,1280x720]>,
    <Vod [720p30,1280x720]>,
    <Vod [480p30,852x480]>,
    <Vod [audio_only]>,
    <Vod [360p30,640x360]>,
    <Vod [160p30,284x160]>
]

# Get VOD chunks... There are 364 of them...
>>> vod_chunk = client.get_chunks(vods[0])
>>> vod_chunk
<VodChunk [364-chunks]>

# Get the MPEG-2 transport stream files... Boom!
>>> mpeg2_ts_chunks = [c for c in vod_chunks.chunks()]
>>> mpeg2_ts_chunks[:3]
[
    ('1988.ts', 'https://vod-metro.twitch.tv/.../chunked/1988.ts'),
    ('1989.ts', 'https://vod-metro.twitch.tv/.../chunked/1989.ts'),
    ('1990.ts', 'https://vod-metro.twitch.tv/.../chunked/1990.ts')
]Development Environment / SetupThis package is early in development, so if anyone has any questions or concerns you can raise a PR or Issue on the github repo.nomadmtb/twitchvod on GitHubGit clone the above repo.git clone git@github.com:nomadmtb/twitchvod.gitMove into the project.cd twitchvodCreate virtualenv (assuming your have 3.7)python3.7 -m venv .envActivate virtualenv.source .env/bin/activateInstall dev requirements.pip install -r requirements.txtWith the above set-up you can perform the following to get started.Run the unittests w/ pytest.make testRun the unittests w/ coverage + pytest.make coverageInstall a local copy of the package.python setup.py installRemove the local copy of the package.pip uninstall twitchvod
Package: twitch-ws-irc
Twitch WS IRChow to installYou can install the lib with pip from this repo directly.pip install git+ssh://git@gitlab.com/henny022/twitch-ws-irc.git#egg=twitch-ws-irchow to useproper examples will followmake an Event Handlerfromtwitch_ws_irc.eventsimport*classExampleEventHandler(EventHandler):asyncdefon_privmsg(self,event:PrivMsgEvent):print(f"{event.user}:{event.message}")ifevent.message=='!test':awaitevent.reply(f"hey{event.user}")ifevent.message=='!stop':awaitevent.reply('bye')awaitevent.websocket.close()start the botfromtwitch_ws_irc.clientimportTwitchWSIRCClientasyncdefbot():client=TwitchWSIRCClient('twitch token','twitch username','target channel')awaitclient.start(ExampleEventHandler())awaitclient.join()
Package: twitchypy-irc
Python Twitch IRC LibraryThis is a simple Python library for connecting to the Twitch IRC chat and sending/receiving messages.TwitchThis is the main class for the Twitch IRC client and has the following methods:__init__(self, user: str = "justinfan12345", token: str = "oauth:1234567890"): Initializes the client with the given
username and OAuth token.join(self, channel: str) -> None: Joins the given channel.part(self, channel: str) -> None: Leaves the given channel.connect(self) -> None: Connects to the Twitch IRC server.close(self) -> None: Closes the connection to the Twitch IRC server.send_message(self, channel: str, message: str) -> None: Sends a message to the given channel.send_reply(self, message_id: str, channel: str, reply: str) -> None: Sends a reply to the given message.read(self) -> Generator[TwitchPrivateMessage, None, None]: Reads messages from the Twitch IRC server.TwitchPrivateMessageThis class represents a Twitch private message and has the following attributes:badges(set): A set of strings representing the badges the user has.color(str): The color of the user's username in the chat.display_name(str): The user's display name.first_message(bool): Whether this is the user's first message in the chat.message_id(str): The ID of the message.mod(bool): Whether the user is a moderator.broadcaster(bool): Whether the user is the broadcaster.returning_chatter(bool): Whether the user has been in the chat before.room_id(int): The ID of the room.subscriber(bool): Whether the user is a subscriber.turbo(bool): Whether the user has Twitch Turbo.user_id(int): The ID of the user.name(str): The user's name.channel(str): The channel the message was sent to.message(str): The contents of the message.UsageTo use this library, create aTwitchinstance and call its methods to connect to the Twitch IRC chat and send/receive
messages.fromtwitchimportTwitchclient=Twitch(user="your_username",token="your_oauth_token")client.connect()client.join("your_channel")client.send_message("your_channel","Hello, world!")formessageinclient.read():print(message)client.close()ContributingAll contributions are welcome! Please open an issue or pull request if you have any suggestions or find any bugs.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.
Package: twitchy-term
Twitchy-TermA simple terminal tool for browsing Twitch.tv and watching streams on VLC Player usingLivestreamer.DependenciesPython 3 (tested on version 3.4)LivestreamerVLC Player (sudo apt-get install vlc)InstallationUsing pip:$sudopip3installtwitchy-termORClone this repository:$gitclonehttps://github.com/Andy-Au/twitchy-term.git$cdtwitchy-term$sudopython3setup.pyinstallUsageSimply run:$twitchy-termIt also takes an optional argument for streaming quality (default is best):$twitchy-term-q[quality]Available qualities include:besthighmediumlowworstTwitchy-Term offers the following pages of Twitch.tv:Featured streams (from Twitch.tv’s home page)Browse top games (and top streams of each)SearchCommands▲/▼:Scroll up and down the current list of itemsf:Featured streamsg:Top Games lists:Searchc:Change stream qualityq:QuitIn Top Games liste:View top streams of current selected gameIn pages where streams are listedp:Play the selected stream in VLC player with current qualityLicensePlease seeLICENSE.
Package: twith
Abouttwith is a tool for turning long text into a thread on Twitter. With this tool, you can create a new thread on your own or another user's status.InstallationGit:gitclonehttps://github.com/nxgeo/twith.gitcdtwith
pipinstall-rrequirements.txtPip:pipinstalltwithExampleFor a simple implementation example, seetwith/example/.ReferencesGET account/verify_credentialsGET statuses/show/:idPOST statuses/update
Package: twitpy
Setup twitpyLet's install twitpy first.pip install twitpyNow you need to actually setup the module by registring the API Keys.importtwitpyAccess=twitpy.accesstwitpy("access_token","access_token_secret","consumer_key","consumer_key_secret")You need 4 API keys to access twitpy. You need a Twitter Developer Account for this, This is the MOST important step and without doing this you will not be able to access the module.Learn more about Twitter Developer -https://developer.twitter.com/enNow you have succesfully accessed the module, Now you will be able to use it's features.Picking user from retweet (retweet picker)Using theAccessvariable you defined before to gain access into twitpy you will now Use it's retweet picker.retweeted_winner=Access.pickuserfrom_retweet(131429358258)print(retweeted_winner.username)In the parenthesis ofpickuserfrom_retweetspecify the tweet ID, if the tweet id is valid and it has more than 0 retweets it will pick a user,pickuserfrom_retweetreturns the following attributes you can use.username
name
userid
followers
followingGetting tweets from a usergettweets=Access.get_tweetsfromuser("OHrefineddev",10)foriingettweets:print(i.full_text)In the parenthesis ofget_tweetsfromuseryou write the Username first then you write the amount of tweets you want from the user, the number of tweets should be under 10.gettweetswill return a list due to having 10 tweets it has to be looped through,get_tweetsfromuserreturns the following attributes.full_text
id
favorite_count : Likes
retweet_count : Retweets
created_at
sourceFinding a user on twitteruser=Access.find_user("OHrefineddev")print(user.userid)In the parenthesis offind_useryou write the user's username,find_userreturns the following attributes.username
name
userid
created_at
description
followers
following
location
tweets_count : Total tweets from the user.
isVerified
avatar_urlRetweeting A TweetAccess.retweet_tweet(258296982689)In the parenthesis ofretweet_tweetyou write the tweet Id.Following a user.Access.follow_user("OHrefineddev")In the parenthesis offollow_useryou write the User's username.Sending direct messages.Access.send_dm("OHrefineddev","Hello, i love your twitpy Module."})In the parenthesis ofsend_dmyou write the user's username and the text you want to send to the user.Note: There is a chance of this function to error most probably of the user you are trying to send the message is not following you, or the user has their DMs off.Liking a status (tweet)Access.like_tweet(138924958259208)In the parenthesis oflike_tweetyou write the Status (tweet) id.Unliking a status (tweet)Access.unlike_tweet(138924958259208)In the parenthesis ofunlike_tweetyou write the Status (tweet) id.More Features Coming Soon.
Package: twitscrape
This scraper is a side project from a sentiment analysis project I am working on.
I decided to package this project as a learning experience since I am new to programming.
If you have any comments or recommendations on how I could improve or change this, please feel free to get in touch.
If you have stumbled upon this scraper and would like more features, don't hesitate to contact me.Documentation for use will be available in the near future.
Package: twitsent
Twitter Sentiment TrackerSummer 2022 ACO 499Tracks Twitter sentiment over time using Tweets that contain certain keywords and meet certain conditions. The data retrieved from Twitter can then be stored for later use, and an HTML file will open at the end of execution that describes the process and methodologies of data collection. Twitter's rate limits should be well understood BEFORE this package is run, as the Search API has hard restritions on how many Tweets can be retrieved per month, 15 min, and second depending on user's access level and the search type. In general, using default parameters in this package and not re-searching over the same date range will not cause the user to exceed these limits. You must have a Twitter Search API v2 bearer token to use this software.To Install:Enter into a command line terminalpip install twitsentTo Execute:Also in the terminal, typepython -m twitsentORpython3 -m twitsentAuthorsMitchell Hoikka
Package: twitsilver
Twitsilver is aQuicksilveraction for posting totwitter.It featuresGrowlsupportKeychainsupporteasy two-step-installation.InstallationTwitsilver installation is a two step process:easy_installthe codecustom install the Quicksilver actionThis is because distutils (as a pure python, platform independant tool) doesn’t
know anything about Quicksilver actions. Therefore we create a quicksilver-aware
installer for you, which you must invoke manually aftereasy_installhas
done its magic.In other words, open the Terminal (/Applications/Utitlities/Terminal.app)
and execute the following two commands:sudo easy_install twitsilver
install_twitsilverIf this fails due to missingPATHentries, you need to find theinstall_twitsilverscript and execute it. As mentioned above, due to the
sandbox restrictions of distutils it can’t be copied to a more convenient location.The installer will create a Quicksilver action and register twitsilver with
growl. Unfortunately, the python bindings for Growl don’t provide a way to
actually enable the notifications it registrs. This means, you need to:open theSystem Preferencescontrol panelselectGrowlclick theApplicationstabselectTwitsilverfrom the listclickConfigure…clickNotificationsselectfailureandsuccessand for each click onenabledAfter that you need to restart Quicksilver (Command-Control-q) and you’re good
to go.UsageNow you can invoke Quicksilver and press.to enter text mode. Type the
message you want to post to twitter, hit the tab key and start to typetweetuntil the action shows up. Now just hit enter to invoke the it.CredentialsTwitsilver uses the Mac OS X Keychain to know which username and password to
use. It first checks, whetherTwitterrifichas any credentials stored and
if so, it uses those.If not, it falls back to an item by the name oftwitter. To create this
entry, open upKeychain Accessand add a new password item (Command-n), give
it the nametwitterand your username and password.GrowlTheoretically, twitsilver should also workwithoutGrowl, but this hasn’t been
tested, as there is no sane reason any Mac OS X user shouldnotinstall this
insanely useful utility :-)After contacting twitter and posting the message twitsilver will use Growl to
notify you that it has succeeded. If not, it will post twitters error message.Of course, twitsilver checks the length of your message and will refuse to post
it, if it’s longer than the infamous 140 characters.TODOuse an URL shortening service to shorten any URLsbeforeposting to twitter.add a nicer icon (for growl)twitsilver has no pony. This is unacceptable in the long run
Package: twittenizer
Twittenizer: Convert stupid text in smart features.What does this lib do?A tokenizer created specifically for messages posted on Twitter ( known as tweets).
The constraints imposed by Twitter during the writing of messages force the users not to follow typographical standards.
The purpose of this tokenizer is to reduce as much as possible the noise induced by the constraints while keeping as much of the information available in the tweet as possible.It is build on top of NTLK Twitter tokenizer.Installationpip install twittenizerExample>>> from twittenizer import Tokenizer
>>> tokenizer = Tokenizer()
>>> tokenizer.tokenize("Here is my website: https://t.co/EZWeDhjl, check it out! ")
['Here',  'is', 'my', 'website', 'check', 'it', 'out']LicenceDocumentation
Package: twitter2eh
# TwitterEventHubFeedA command line tool that allow to stream feed from Twitter to EventHub.This project is a fork of the [TwitterCosmosDBFeed](https://github.com/tknandu/TwitterCosmosDBFeed) by [tknandu](https://github.com/tknandu)## Pre-requisites- (1) Registration as a Twitter App- You need to register the tool as a new application at <http://apps.twitter.com/>. After choosing a name and application for your app, you will be provided with a *twitter_consumer_key*, *twitter_consumer_secret*, *twitter_access_token* and *twitter_access_token_secret* - which need to be filled into *twitter2eh.json* to provide the app programmatic access to Twitter.- (2) Create an Event Hub- You need to create a namespace for the Event Hubs type, and obtain the management credentials that your application needs to communicate with the event hub. To create a namespace and event hub, follow the procedure in this document - [Create an Event Hubs namespace and an event hub using the Azure portal](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create)## Getting StartedInstall the package [twitter2eh](https://test.pypi.org/project/twitter2eh/) using pip:```pip install twitter2ehorsudo pip install twitter2eh```## Usage```twitter2eh -husage: twitter2eh [-h] [-v] [--init] [-c CONF] [-s]This program streams feed from Twitter to EventHuboptional arguments:-h, --help            show this help message and exit-v, --version         show program's version number and exit--init                Create template client conf twitter2eh.json only ifthere is no existing one-c CONF, --conf CONF  twitter2eh configuration file. Default:twitter2eh.json-s, --silent          silent mode - running the tool without displaying tweets json that you are streaming to your Event Hub```## Configuration file - twitter2eh.jsonIn order to run the tool, you need to configure a configuration file for the tool and specify the file in running the tool.```{"twitter_consumer_key" : "<Consumer Key for Twitter App>","twitter_consumer_secret" : "<Consumer Secret for Twitter App>","twitter_access_token" : "<Access Token for Twitter App>","twitter_access_secret" : "<Access Secret for Twitter App>","track_keywords" : ["<Keyword or Hashtag>","<Keyword or Hashtag>","<Keyword or Hashtag>"],"eventhub_namespace" : "<Event Hub Namespace>","eventhub_entity" : "<Event Hub Entity Name>","eventhub_sas_key" : "<Event Hub SAS Key Name>","eventhub_sas_value" : "<Event Hub SAS Value>"}```Please refer to [example configuration file](twitter2eh.json.example) and run the tool like this:```% twitter2eh --conf ./twitter2eh.json```Or run with `-s|--silient` option if you want to run the tool without displaying tweets json that you're streaming to your Event Hub```% twitter2eh --conf ./twitter2eh.json --silent```
Package: twitter-activity
twitter_activityYou can use this library in order to :Register, get, and delete the webhook urlMake a user subscribe his account for the twitter activity APIClassify twitter account activitiesIn order to install, open the command prompt and type:pip install twitter_activityIt  has two main module:webhook_manageractivity_managerIn order to use this library  you should have a verified twitter application and you have to save your credential  inside a json file as following:{
"consumer_key": " your one", 
"consumer_secret": "your one", 
"access_token": "your one", 
"access_token_secret": "your one",
"env_name": "your one"
}The followingNotebookshows multiple example about how to use webhook_manager modules
Package: twitter-activity-api-dummy
twitter_activity_api_dummyYou can use this library in order to :Register, get, and delete the webhook urlMake a user subscribe his account for the twitter activity APIClassify twitter account activities and save these activities in a local folder or inside an AWS S3 BucketIn order to install, open the command prompt and type:pip install twitter_activity_api_dummyIt  has two main module:webhook_manageractivity_managerIn order to use this library  you should have a verified twitter application and you have to save your credential  inside a json file as following:{
"consumer_key": " your one", 
"consumer_secret": "your one", 
"access_token": "your one", 
"access_token_secret": "your one",
"env_name": "your one"
}The following directoryExampleshows a multiple example about how to use webhook_manager modules
Package: twitteralert
Twitter alertTwitter alert is part of the twitter alert ecosystem that uses a custom
sqlite database and the access to the twitter platform through an API
to log and track a list of users and their activity in friendships
(aka users that one acount follows).For each change detected within the resolution of the tracked data,
twitter alert makes a tweet (or prints into the console) the update.Quick startToinstallthe package you can either download it from pip or clone this
repository and install it locally.# from pippipinstalltwitteralertOnce installed, check that the installation was correct running$talertinfo--version
Debugmodeisoff
twitteralertversion:0.0.1Then, assuming that you already have a friends database from twitterobserver
(friends.sqlite) and asecrets.jsonfile your API credentials for your twitter account
you can just run the following.talertfriends-dfriends.sqlite-Sstate.json-ssecrets.jsonNotethat thestate.jsonfile if not present
will be generated but containing the last query in the database. Thus, you
will need to run the tobserver again to generate a new query. You can also
potentially make a state file manually.UsageThe excutable contains multiple subcommands.info-> displays information such as the version of the packagefriends-> reports updates in the friendships from the selected users, it can also tweet them directlyinfofriends
Package: twitter-amnesia
IntroductionA service which can be deployed to erase tweets older than a specific
date and not marked with a custom tagRequirementsPython 3.8Required Python modules.python-twitter==3.5python-dateutil==2.8.1InstallationNote: Use a virtual environmentInside the folder to where the repository was cloned, simply execute:$ pip install .The name of the package istwitter_amnesiaUsageWhen installed, twitter-amnesia can be executed by calling the
executable in the terminal.Example:$ twitter-amnesia -ck abcdefghijklmnopqrstuvwxy -cs abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX -tk 12345678-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO -ts abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRStwitter-amnesia will immediately remove all tweets older than 1 month
(default).OptionsOther options can be cnsulted using the--help$ twitter-amnesia --help
usage: twitter-amnesia [-h] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-d DAYS]
                       [-m MONTHS] [-y YEARS] [-t PROTECTION_TAG]
                       [-f SAVING_DIRECTORY] -ck CONSUMER_KEY -cs
                       CONSUMER_SECRET -tk TOKEN_KEY -ts TOKEN_SECRET

optional arguments:
  -h, --help            show this help message and exit
  -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --logLevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        Logging Level (default: INFO)
  -d DAYS, --days DAYS  Tweets older than 0 days (default value)
  -m MONTHS, --months MONTHS
                        Tweets older than 1 months (default value)
  -y YEARS, --years YEARS
                        Tweets older than 0 years (default value)
  -t PROTECTION_TAG, --protection_tag PROTECTION_TAG
                        Protection Tag (default: [P])
  -f SAVING_DIRECTORY, --saving_directory SAVING_DIRECTORY
                        Directory location to where deleted tweets are
                        exported (default: None)
  -ck CONSUMER_KEY, --consumer_key CONSUMER_KEY
                        Consumer Key
  -cs CONSUMER_SECRET, --consumer_secret CONSUMER_SECRET
                        Consumer Secret
  -tk TOKEN_KEY, --token_key TOKEN_KEY
                        Access Token Key
  -ts TOKEN_SECRET, --token_secret TOKEN_SECRET
                        Access Token SecretCopyrightThis project is protected under the GPLv3 License.
Package: twitter-analysis
Twitter Analysis===============Twitter's API is annoying to work with, and has lots of limitations —luckily their frontend (JavaScript) has it's own API, which Kennethreitz reverse–engineered.No API rate limits. No restrictions. Extremely fast.You can use this library to get the text of any user's Tweets and use the results for analysis.Usage=====.. code-block:: pycon>>> from twitter_analysis import get_tweets>>> for tweet in get_tweets('kennethreitz', tweets=100):>>>     print(tweet)P.S. your API is a user interfaces3monkey just hit 100 github stars! Thanks, y’all!I’m not sure what this /dev/fd/5 business is, but it’s driving me up the wall.…It appears you can ask for up to 450 tweets reliably (25 html pages).Installation============.. code-block:: shell$ pipenv install twitter-analysisOnly Python 3.6+ is supportedLICENSE=======MIT
Package: twitter-analyzer
Did you ever want to be able to analyze your twitter account for things
you’ve liked or people who have trolled you? This is the tool for you.Twitter does not provide any mechanism to search in depth your tweets
and timeline.Requires: Python 3.5+
Twitter API consumer/access tokens and secretsInstallationWith pip:pip install twitter-analyzerUsageInitialize:tanalyze initUpdate:tanalyze updateFind trolls:tanalyze find-trollsSearchtanalyze search githubSearch urlstanalyze search github –urlSearch userstanalyze search vangheezy –user1.0.1 (2018-10-27)Better troll output1.0.0 (2018-10-27)initial