Saravanan666/pypi-org huggingface dataset:
Package: twistml
TwistMLTwistML is a package that makes it easier to work with raw twitter data
for machine learning tasks, like predicting changes in the stock
market.TwistML implements a pipeline that includes filtering of the twitter
data, preprocessing, feature extraction into several feature
representations (bag of words, sentiments, Doc2Vec), regression /
classification using algorithms from the sklearn package, and
model selection / evaluation.The API documentation is available atTwistML’s PyPI page. A more usage focused
documentation is coming soon, until then you can get the full package
from BitBucket (also linked at the PyPI page) and check out the
experiments folder for some usage examples.TwistML was developed as part of my master’s thesis and I hope to keep
improving it afterwards.InstallationYou can use pip to install TwistML like so:$ pip install twistmlPlease make you sure youhave numpy, scipy and gensim installedas
well. I have opted out of adding them to the install_requires as this
has caused problems in my own tests on windows machines. (For numpy the
problem is describedhere.) So these packages will
not be installed automatically by pip.Known Issues & Planned ImprovementsImplement a DateRange class and replace all occurences of fromdate,
todate, dateformat.Implement find_files() without dateranges at all. It should be
possible to simply process all files within a directory (also
recursively)TwistML currently assumes raw twitter data to be avaialble as one
json file per day. Make sure the internet-archive’s file scheme is
supported as wellAdd support for hourly time resolution instead of daily only.Evaluation subpackage can only deal with binary classification.
Possibly explore adding multiclass.The way logging is currently set up is weird and should be reworked.gensim’s LabeledSentence is deprecated, use TaggedDocument insteadChangesVersion 0.9Changed status to BetaAdded API documentation generated via sphinx and numpydocDoc2VecTransformer now supports iterative training
(see:http://rare-technologies.com/doc2vec-tutorial/)Regression evaluation can now treat predictions as binary
classifications and evaluate AUC and F1Changed some command line scripts to have more intuitive usagevarious small fixesVersion 0.2.4ATTENTION: Some of these may break existing code!!renamed combine_tweets.py to combine.pyadded support for stacking of featuresclassification targets are now 0 / 1 instead of -1 / 1added toydata module -> create some toydata for testingadded F1-Score to classifcation evaluationadded additional window functions: window_stack and window_element_avgVersion 0.2.3Improved long_description generationFixed CHANGES.rstVersion 0.2.2Added sentiment features based on TextBlob sentimentsVersion 0.2.1Added functionality for complex category subsets to
tml-generate-featuresAlso improved documentation for tml-generate-features (on cmd line as
well as docstring)improved test coverageVersion 0.2.0Changed Development Status to AlphaRemoved Sentence2Vec as that functionality is included in current
gensim versions’ Doc2Vec classAdded Changelog
Package: twistnsync
Twist-n-Sync. Time synchronization algorithm that employs IMU gyroscope dataImagine that you want to synchronizetwo smartphones1for stereoscopic (or multiscopic) photo or video shutting withmicroseconds accuracy and precision.
Or you need to synchronize Azure Kinect DKdepth frames2with smartphone frames.Twist-n-Sync is a time synchronization algorithm that can solve the time sync issues by employing gyroscope chips widely available in millions of comsumer gadgets.Another benefical usage of the package is synchronization of diverse motion capture (mocap) systems (OptiTrack, Vicon) that provide ground truth data for robot navigation and state estimation algorithms (Wheeled, Visual, Visual-Inertial Odometry and SLAM).Installationpip install twistnsyncUsage examplesWIP: The python notebook examples inexamplesfolder provide comprehensive mini-tutorials how to use the code:two systems sync by gyroscope data;TODO mocap data (position orientation) and robot data sync;TODO clock drift evaluation of two independent systems;ReferencesIn case of usage of the materials, please, refer to the source and/or publications:1@article{faizullin2021twist,
  title={Twist-n-Sync: Software Clock Synchronization with Microseconds Accuracy Using MEMS-Gyroscopes},
  author={Faizullin, Marsel and Kornilova, Anastasiia and Akhmetyanov, Azat and Ferrer, Gonzalo},
  journal={Sensors},
  volume={21},
  number={1},
  pages={68},
  year={2021},
  publisher={Multidisciplinary Digital Publishing Institute}
}2@ARTICLE{9709778,
  author={Faizullin, Marsel and Kornilova, Anastasiia and Akhmetyanov, Azat and Pakulev, Konstantin and Sadkov, Andrey and Ferrer, Gonzalo},
  journal={IEEE Sensors Journal}, 
  title={SmartDepthSync: Open Source Synchronized Video Recording System of Smartphone RGB and Depth Camera Range Image Frames with Sub-millisecond Precision}, 
  year={2022},
  volume={},
  number={},
  pages={1-1},
  doi={10.1109/JSEN.2022.3150973}
}CreditsThis package was created withCookiecutterand thezillionare/cookiecutter-pypackageproject template.
Package: twistream
Twistream: Twitter Stream API data collectionTwistream helps you automatically collect and store data from Twitter Stream API.InstallationLatest stable release:pip install twistreamFrom source:git clone https://github.com/guillermo-carrasco/twistream.git
cd twistream
pip install .Setting upTwitter credentialsYou need your twitter credentials in order to be able to use Twitter API. For that,
create an applicationhere. Once created, save the credentials to configure
twistreamCreate a configuration fileYou can use the commandtwistream initto help you create a correctly formatted configuration file
for your collections.Once created, you will have a file that will luke like this:~> cat ~/.twistream/twistream.yml      

twitter:                  
  consumer_key: your_consumer_key                   
  consumer_secret: your_consumer_secret             
  access_token_key: your_access_token_key             
  access_token_secret: your_access_token_secret       


backend: backend_name                  

backend_params:
    username: db_username
    password: db_passwordUsageRemember that--helpis always an available optionOnce created a configuration file, start collecting tweets!twistream collect --tracks tracks,to,follow config.yamlRefer to thetwitter documentationto know what tracks are, in short:A comma-separated list of phrases which will be used to determine what Tweets will be delivered
on the stream. A phrase may be one or more terms separated by spaces, and a phrase will match
if all of the terms in the phrase are present in the Tweet, regardless of order and ignoring case.
By this model, you can think of commas as logical ORs, while spaces are equivalent to
logical ANDs (e.g. ‘the twitter’ is the AND twitter, and ‘the,twitter’ is the OR twitter).If what you want is to followhashtags, don't forget to include the#character.Supported backendsFrom version 0.1.3, twistream supports two backends. A relational database (SQLite) and a no-sql database (MongoDB).NOTE that the SQLite backend will only save a couple of tweet fields, whilst the MongoDB backend will save the whole blob.
It is a trade off between information and storage space.Backend params formatSQLitebackend: sqlite

backend_params:
    db_path: /path/to/your/dbMongoDBbackend: mongodb

backend_params:
    db_string: database_connection_string(See database connection string documentation)
Package: twita
TwitaWIPA library to fetch Twitter data using Twitter API v2 (hidden).Why this library?To be filled.twitatries to counter these problems to provide these features:No authentication (API key) is needed to access the data.Fully Async based.Proxy support viahttpx.InstallYou can install this library easily from pypi:# with pippipinstalltwita# with poetrypoetryaddtwitaLicenseCopyright (C) 2022-present DaRekaze <https://github.com/darekaze>Twita is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.Twita is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.You should have received a copy of the GNU Lesser General Public License
along with Twita. If not, seehttp://www.gnu.org/licenses/.
Package: twitcaspy
twitcaspyTwitcatting for Python
Python 3.7 - 3.9 are supported.Other language versionEnglishJapaneseDocumentdevelop versionlatest version(v1.1.0)v1.1.0v1.0.2v1.0.1v1.0.0InstallationThe easiest way to install the latest version from PyPI is by using pip:pip install twitcaspyYou can also use Git to clone the repository from GitHub to install the latest
development version:git clone https://github.com/Alma-field/twitcaspy.git
cd twitcaspy
pip install .Alternatively, install directly from the GitHub repository:pip install git+https://github.com/Alma-field/twitcaspy.gitExamplesThis is an execution example in the application scope.Get the account name of@twitcasting_jp.fromtwitcaspyimportAPI,AppAuthHandlerauth=AppAuthHandler(client_id,client_secret)api=API(auth)print(api.get_user_info(id='twitcasting_jp').user.name)# > ツイキャス公式See inexamplesfor other examples and the entire code.Included exampleAuthorizationAppAuthHandlerGrantAuthHandlerImplicitAuthHandlerRealtime APIWebhookServerClientSourceThis library is based on:tweepy/tweepy- Twitter for Python!tamago324/PyTwitcasting- PyTwitcasting is a library for API v2 (β) of Twitcasting.LinksTwitcasting API DocumentationAPI ChangeLog
Package: twitcent
PackageUse this package to download and analyze twitter sentiments.UsageBefore using the package you need to set user parameters obtained by creating a twitterapp first. The package will need to read the user data from your environment variables stored in the following dict formatuser_params = {
    "consumerKey": os.environ.get("consumerKey"),
    "consumerSecret": os.environ.get("consumerSecret"),
    "accessToken": os.environ.get("accessToken"),
    "accessTokenSecret": os.environ.get("accessTokenSecret"),
}InstallationInstall the package as follows:pip3 install twitcentimporting the moduleIn your script simply import the package as follows:from twitcent.twitcent import sentiments_dictCalling the analyzerThe sentiment analysis main function is 'sentiments_dict' which is called under the script as follows:from twitcent.twitcent import sentiments_dictGet the sentiments score by callingDo this to get scored sentimentssentiments_dict('#keyword', '180').Where #keyword is the main keyword hashtag to search, and '180' is a string referring to the number of tweets to pull.Be careful not to hit the rate limits allowed by twitter. For this reffer to thetwitterAPI documentation
Package: twitchat
Python Twitch Bot(Q: What is a "python"??)A: Go topython.organd download and install the latest version of python.During installation, where it gives you the option to "include in PATH", tick the box! This allows you to run python by just typingpythonin a console window (just type Command Prompt or Windows PowerShell into your Windows search bar if you're using Windows, look for your Terminal on Mac and Linux).You just installed an interpreter that translates from python to a language your computer speaks. This will be used to run the bot.Don't worry, it's two lines of code that you can just copy and paste!P.S.: When I tell you to "run something in a directory" (directory = folder), it means you should run that command in your Terminal after navigating to that directory.To navigate to a directory in a terminal, use thecd path/to/directorycommand, where "path/to/directory" is replaced by wherever you wanna go (for example "C:\Users". When you're already in C:\, you can just typecd Users).The cd command works on Windows, Mac and Linux.Quick setupTo get the bot up and running immediately, you have to do the following:pip install twitchat(orpython -m pip install twitchatif that doesn't work for you)Create a directory for the botInside this directory, runtwitchat-settingsHere, you will have to enter the following:The name of your bot accountA client ID for that accountA corresponding oauth token (This can easily be acquired fromhere; exclude the "oauth:" part)The channel you want the bot to connect toIf you don't know what any of this means, I have aguideprepared for you.Finally, create a script in the bot directory (or just run python):fromtwitchat.twitchbotimportmainmain()Your bot should now be connecting to your Twitch chat and saying "I am here now :)". Try using !ping to see him reply!Refer to thefull documentationfor further configuration of your bot, including all your commands.How to set up your bot accountIf you don't have a bot account yet, go ahead andcreateone right now.Before doing so, you may also go to yoursettingsand "Enable additional account creation"When you're done, head over to Twitch'sdeveloper websiteand hit "Log in with Twitch" on the top right.In yourdashboard's "Applications" tab, you hit the "Register Your Applicatoin" button on the right.Put whatever you want into the "Name" field, and put "https://localhost" into the "OAuth Redirect URLs" field, since these fields are not strictly relevant for us.Finally, you chose "Chat Bot" as the category and hit "Create".You will now see your chat bot in the list of Applications, where you click "Manage".Here you will see that here is a new field called "Client ID", which you will need in the next step.Keep this secret!For the final step, head over tothis siteand connect it to your Twitch bot account to obtain your oauth token (remove the "oauth:" part).Full documentationThe full documentation for the bot is availablehere
Package: twitch-chat-analyzer
twitch-chat-analyzer-pyTwitch chat analyzer from past broadcasts, designed for Jupyter notebook.Getting StartedInstallationThe package can be installed bypipcommand in terminalpip install --upgrade twitch-chat-analyzerRun Jupyter NotebookThe package is mainly intended to be used in Jupyter notebook, but it can still be used in standard Python environmentInstruction to install Jupyter notebook (or newer JupyterLab) ishereAfter installation, run the following command in terminal to start Jupyterjupyter notebookorjupyter-labDownload chats from past broadcastnotebook.ipynb has examples of statistics functions.fromtwitch_chat_analyzerimportanalyzer# Create an analyzer object from video ID.# Video ID is the last part of the video URL (1234567890 in https://www.twitch.tv/videos/1234567890)# If the chat log was not downloaded before, it will download automatically and create an analyzer.ann=analyzer.FromVideoId('REPLACE_HERE_TO_VIDEO_ID')# Some pre-built statistics functions to draw graphann.DrawChatPerMinute(10)# Chat counts for each N-minute intervalann.DrawTopChatters(20)# Top N viewers with most chatsann.DrawTopEmotes(15)# Top N most used emotes# If you just want to get the dataann.GetChatPerMinute(10)# Chat counts for each 10-minute interval, list of (offset, count)ann.GetTopChatters()# Viewer names and chat counts, list of (name, chat_count), sorted by chat countann.GetEmoteCounts()# Emotes and usage counts, list of (emote_name, count), sorted by count# If you want to handle dataframe yourselfdf=ann.ToDataFrame()# Some useful functions to deal with dataframedf[df['is_sub_notice']]# Show new/renew subscription notice messagesdf[df['bits']>0]# Show messages with bitsdf['text_body'].apply(len).mean()# Average chat length (excluding emotes)DataFrameThe dataframe returned from ToDataFrame() has the following columnsColumn nametypemeaningoffsetfloatTime of the chat, in seconds after stream startedusernamestrTwitch login usernamedisplay_namestrDisplay name in chat, which may not be in EnglishnamestrCombined name of username and display_name, as displayed in Twitch chatbodystrRaw chat content, including emote texttext_bodystrChat content excluding emotesis_subscriberboolif the chatter is a subscriberbitsintAmount of bits spent in the chatis_sub_noticeboolif the chat is new/renew subscription notice
Package: twitch_chat_wrapper
This is a simple twitch chat wrapper written on python that I use to
build simple bots fast.installationpip intall twitch_chat_wrapperfetchin Twitch oauth password tokenFollow this linkhttps://twitchapps.com/tmi/and save the tokenusagefromtwitch_chat_wrapperimportTwitchChatWrapperviewers_greetings=[]defmessage_handler(chat,username,message):print("@{}:{}".format(username,message))ifusernamenotinviewers_greetings:chat.send_message("@{}welcome to the stream".format(username))viewrs_greetings.append(username)twitch=TwitchChatWrapper(bot_nickname="AwesomeBot",oauth_pass="oauth:r1xxk1111111111112222222222xwd",channel="hardlydifficult")twitch.events.on_message+=message_handlertwitch.loop()shout outTohttps://www.twitch.tv/hardlydifficultwhich is building a awesome
gamedev twitch community
Package: twitchDig
twitchDigFun Project to Scrape TwitchPrerequisitesBefore you begin, ensure you have met the following requirements:Internet ConnectionPython 3.6+httpxwebsocketInstallation:pipinstalltwitchDigKeep synced with latest fixesPip might not be always updated , so to keep everything synced.pipinstallhttps://github.com/mahrtayyab/twitchDig/archive/main.zip--upgradeA Quick Example:fromtwitchDig.botimportBotapp=Bot()user=app.get_user("kharltayyab")print(user)Full Documentation and Changelogs areComing Soon
Package: twitchez
twitcheztwitchez - TUI client for twitch.tv with thumbnails support that works right in your terminal.Support of rendering images by the terminal is not required, ueberzug will handle that.You may ask --"Is this magic?"-- WellYES, the black magic! Welcome to the club![alpha] WIP NOTICE: project development stageThis project is still in the early stage of development,
you may, and probably will, experience corrupted terminal state,
so run this client in a separate terminal window
so you don't get frustrated if the client accidentally crashes.FeaturesExplore twitch without leaving your terminalFlexible configuration via user config (including custom cmd)Completely keyboard driven workflowZero mouse interaction.F1 / ?for help about key mappingsRedefine keys and hint chars for your keyboard layoutLink hints similar as in (Vimium, Surfingkeys, etc.)Interactive select of one entry from all
(fzf,dmenu,
or any other program via custom cmd)Bookmarks & Tabs (add, delete, next/prev, jump to tab by name)Following live channelsStreams per categoryVideos per channel (archive/past broadcasts, clips, highlights, uploads)Open video/stream url in external video player
(streamlink,mpv,
or any other program via custom cmd)Three independent user cmd and keys to open url as (stream, video, extra)Copy url to clipboardOpen chat url in default browser or via custom cmdThumbnails are drawn byueberzug(X11 only)
(ueberzug is anoptional dependency)If ueberzug is not installedtext mode without thumbnailswill be usedIf you do not know what X11 is - for you this means thumbnails will be drawn on Linux only (not exactly)ConfigurationLook insidetwitchez/config/dir to see all available settings, those are defaults.Do not change default config files, create new in the user config dir:config.conf,keys.conf.The default user config dir is$XDG_CONFIG_HOME/twitchez/, or$HOME/.config/twitchez/by default.Settings from default config files are used as fallback for settings you haven't changed in your user config.InstallPipInstalltwitchezviapipinto user-wide environment:$ pip3 install --user twitchezor system-wide environment:# pip3 install twitchezTo update, add the--upgradeor-Uoption.Install ueberzug (Optional)ueberzug must be additionally installed to display thumbnails!Ifueberzugis not installed or not supported by your platformtext mode without thumbnailswill be used.TroubleshootingIf thumbnails partially overlap underlying text (it is very font dependent):set width/height modifier in user configadjust your terminal font size by +1 etctry different terminal fontLicenseGPL-3.0
Package: twitchify
TwitchifyTwitchify simplifies Twitch integration by combining WebSocket EventSub, Helix API, and IRC Chat for real-time event notifications and comprehensive Twitch functionality.FeaturesReal-time Event Notifications:Stay up-to-date with Twitch events through WebSocket EventSub, ensuring your application responds instantly.Helix API Support:Access the full power of the Twitch Helix API with a single user access token.Bot Support:Easily listen to channel messages.Type Hinting:Twitchify includes built-in support for type hinting, promoting code clarity and maintainability.Why Choose Twitchify?Twitchify puts the user first, making it ideal for personal use and hassle-free Twitch event setup. Unlike other libraries that require multiple tokens, Twitchify simplifies the process with just one user access token.
Developers can create Twitch applications effortlessly, thanks to Twitchify's seamless integration of WebSocket EventSub and Helix API. Real-time event notifications and built-in authentication make handling Twitch events a breeze.InstallationYou can install Twitchify using pip:# Windowspy-3-mpipinstall-Utwitchify# Linux/macOSpython3-mpipinstall-UtwitchifyQuick ExamplefromtwitchimportClient,Followclient=Client(client_id="YOUR_CLIENT_ID")@client.eventasyncdefon_ready():"""This called when the Twitch client is ready to receive events."""print("Ready as%s"%client.user.display_name)@client.eventasyncdefon_follow(user:Follow):"""This called when a user follows the channel."""print("%sjust followed you!"%user.display_name)# Run the client with your user access token.client.run(access_token="YOUR_ACCESS_TOKEN")With built-in AuthenticationfromtwitchimportClient,Followclient=Client(client_id="YOUR_CLIENT_ID",client_secret="YOUR_CLIENT_SECRET")@client.eventasyncdefon_ready():"""This called when the Twitch client is ready to receive events."""print("Ready as%s"%client.user.display_name)@client.eventasyncdefon_follow(user:Follow):"""This called when a user follows the channel."""print("%sjust followed you!"%user.display_name)@client.eventasyncdefon_auth(access_token:str,refresh_token:str):"""This called when the client is successfully authenticated."""# Store those for future use.print('Received access token:',access_token)print('Received refresh token:',refresh_token)# Generate the authorization URL for the Twitch client.# The user should visit the provided URL to authorize the app.client.run(scopes=['moderator:read:followers'])Please refer to theDocumentationfore more details.
Package: twitch-info
Twitch InformationsGet informations about astreamerfromtwitch.tv.Install the packagepip install twitch-infoExemplefromtwitch_infoimportget_user_id,get_stream,get_access_token# To get client_id and client_secret -> https://youtu.be/JK06TumS6hoclient_id="<CLIENT ID>"client_secret="<CLIENT SECRET>"acces_token=get_access_token(client_id=client_id,client_secret=client_secret)user_id=get_user_id(user_name="<CHANNEL_NAME>",client_id=client_id,acces_token=acces_token)stream=get_stream(user_id=user_id,client_id=client_id,acces_token=acces_token)