Saravanan666/pypi-org huggingface dataset:
Package: faye
Basic logging library with a customizable log message and progress bar!The best way to utilize the Faye library is by installing viapip. You can install the library by running the following command:pipinstallfayeUsageThe library is currently limited due to it being updated on a necessity basis, but there are a few examples below to help with using it.# Import the Faye libraryfromfaye.fayeimportFaye# Prints a "CRITICAL" log message to stdoutprint(Faye.log(msg="Faye is awesome!",level="CRITICAL"))# You can also use integer values for the levelprint(Faye.log(msg="Faye is awesome!",level=5))# Currently supported levels:# - TRACE (0)# - DEBUG (1)# - INFO (2)# - WARNING (3)# - ERROR (4)# - CRITICAL (5)# You can add a splash of color to the logging as wellprint(Faye.log(msg="Faye is awesome!",level="CRITICAL",color=True))# Prints a basic progress bar to stdoutprint(Faye.progress(total=100,description="Downloading..."))
Package: faytheclient
Faythe Python ClientThis is a client library forFaythebuilt on the its API. It provides a Python API (the faytheclient module).Python 3 only.This client is compatible with Faythe version >= v0.4.4.InstallationInstall the client:pythonsetup.pyinstallThis package can be found onPyPI.pipinstallfaytheclientExamplesThe example can be foundhere.Create a copy of the environment variables example. Then adjust it:cp.env.example.envSource the .env file:source.envRun the example:pythonexample.py
Package: faz
Faz is a data workflow tool heavily inspired in
.. _Drake:https://github.com/Factual/drakeThe intended use is combining data treatment scripts in bash, python, ruby (or anything else, with a little coding) into a single text file.The name “faz” is portuguese for “do” or “make”.The various steps can be separated into tasks, with defined inputs and outputs. Dependencies between the tasks are determined from inputs and outputs of every task. The program executes all tasks in the appropriate order, checking for the existence of output and input files.Why?Because I like Drake but can’t stand the startup time of java.Because I can (actually to see if I can, but it turns out I can).Featuressimple but robust functionalityeasy to use and extend (the code, minus the tests, is around 300 lines of python)fast startup time (compared to Drake)Documentation:https://faz.readthedocs.org.InstallationUsing pypipipinstallfazUsageFrom the command line, just typefazwithout arguments, the program will read the tasks from a file called “fazfile”.
If you want to use another filename, just give that as an argumento to the programfaz<filename>to get a list of command line arguments typefaz-hTask file basicsThe task file is a plain text file, with a syntax similar to Drake input files.
The following is an example with two tasks# file1 <-touchfile1# file2 <- file1catfile1>file2Lines starting with “#” and having the symbols “<-” signal a task.
On the left of the “<-” is a (comma separated) list of the files produced by the task.
On the right are the task dependencies, the files needed to run that task.
In the above example the first task has no dependencies, and produces a file called “file1”.
The second task has “file1” as a dependency, and has as output a file called “file2”.The outputs and inputs and inputs of each task are used by the program to estabilish the order
by which the tasks have to be run, and if they need to be run. In the example above, if a file
called “file1” was already present in the directory the program was run, the first task would not be executed.The code sections, are all the lines in betweeen the two task lines.
In these two tasks, they are just are just plain bash commands but could be, for example, python code# file1 <-touchfile1# file2 <- file1 :pythonf1=open("file1")text=file1.read()f2=open("file2","w")f2.write(text)note that, in the second task, there’s an extra option “:python”, wich indicates to the program that
the code from this task is python code.
Options are a list of (comma separated) keywords follwing the “:”, and must be placed after the inputs.History0.1.0 (2014-01-11)First release.0.1.1 (2015-03-20)Bug fixes.0.1.2 (2015-10-17)Project name change.0.1.3 (2016-03-26)NetworkX dependency removed.0.1.4 (2016-05-19)Input and output names added to task environment.0.1.5 (2016-05-19)Bug Fixes in variable expansion code.0.1.6 (2016-07-18)Added a mechanism to include other task files.0.1.7 (2016-07-20)dependencies and outputs can now be on different directories.
Package: fb2feed
Fb2Feed transforms public Facebook pages to Atom feeds.InstallationInstall dependencies:$ pip3 install –user -r requirements.txtConfigure:$ cp fb2feed.example.ini ~/.config/
$ vi ~/.config/fb2feed.iniRun:$ python3 fb2feed.pySetup a crontab or systemd timer unit:$ # Edit systemd/fb2feed.service at your convenience.
$ sudo cp systemd/* /etc/systemd/system/
$ sudo systemctl enable /etc/systemd/system/fb2feed.service
$ sudo systemctl start /etc/systemd/system/fb2feed.servicePoint your feed reader to the url of the configured feedsProfitContactI usually hang out on Freenode IRC, in #gstreamer using the philn
nickname. Feel free to also reach out by mail (check git logs to find my
address).
Package: fb8
Getting startedpip install fb8importnumpyasnpfrommatplotlibimportpyplotaspltfrommatplotlibimportcmfrommpl_toolkits.mplot3dimportAxes3Dfromsphere.distributionimportfb8defgrid(npts):return[_.flatten()for_innp.meshgrid(np.linspace(0,np.pi,npts),np.linspace(0,2*np.pi,npts))]defplot_fb8(fb8,npts):"""Plot fb8 on 3D sphere"""xs=fb8.spherical_coordinates_to_nu(*grid(npts))pdfs=fb8.pdf(xs)z,x,y=xs.T#!!! Note the ordering for xs here is used consistently throughout. Follows Kent's 1982 paper.fig=plt.figure(figsize=plt.figaspect(1.))ax=fig.add_subplot(111,projection='3d')ax.plot_surface(x.reshape(npts,npts),y.reshape(npts,npts),z.reshape(npts,npts),alpha=0.5,rstride=1,cstride=1,facecolors=cm.plasma(pdfs.reshape(npts,npts)/pdfs.max()))ax.set_axis_off()plt.tight_layout(-5)plt.show()plot_fb8(fb8(np.pi/16,-np.pi/3,0,10,10,-1,0.5,0.3),200)Basic informationImplements calculation of the density and fitting (using maximum likelihood estimate) of the FB8 distribution on a sphere, which is a generalization of the FB6, FB5 (Kent), and FB4 (Bingham-Mardia) distributions described below.Implements the FB6 distribution that is first introduced in Rivest (1984).Implements calculation of the density and fitting (using maximum likelihood estimate) of the Kent distribution based on Kent (1982). A unittest is performed if distribution.py is called from the command line.Implements the Bingham-Mardia distribution whose mode is a small-circle on the sphere based on Bingham, Mardia (1978).Also calculates directional, percentile levels which can be used to indicate the N% highest-posterior-density regions in the sky.Additional referencesKent, Hussein, Jah,Directional distributions in tracking of space debrisTerdik, Jammalamadaka, Wainwright,Simulation and visualization of spherical distributionsMardia, Jupp,Directional statisticsNotesCurrently thescipy.special.hyp2f1is used and may exhibit inaccuracies for large parameters. See githubissues.ContributorsThis project was originally developed for the FB5 (Kent) distributionhere.Tianlu Yuan
Package: fb-accountkit
fb_accountkitA simple python module for Facebook'sAccountKitserver-side implementations.DependenciesrequestsInstallationpipinstallfb-accountkitUsagefromfb_accountkitimportFBAccountKitfbak=FBAccountKit('APP_ID','APP_secret',version='v1.1')# store token (user_access_token) to response back to client.token_info=fbak.retrieve_user_access_token('auth_code_from_client')# to validate token, call `get_user_session()`print(fbak.get_user_session())# to logout the userfbak.logout()# to logout all sessions (account_id must be provided)me=fbak.get_user_session()fbak.logout_all_session(me.get('id'))
Package: fbad
# FBADFBAD is a commandline tool for projects requiring multiple docker images.# Features- easily build projects with multiple docker images- build on remote server- automatically push build images to registry- select a subset of images to build- build images in parallel on multiple buildservers- you can also build all images on each buildserver (useful for different os architectures)- run command before each image build (useful for generating dockerfiles before the build)- automatically format tags (e.g. `myproject-{arch}` -> `myproject-x86`)- show build output live- ...# Recommended directory structure```myproject/imagea/DOCKERFILE...imageb/DOCKERFILE......project.py```# Example `project.py````python"""example fbad build file"""from fbad import Project, Image# the project contains all project and image dataproject = Project(# name of the projectname="Project",# list of images of the projectimages=[# most simple form# build the dockerfile in 'cachserver/'# use 'cachserver/Dockerfile' as dockerfile# build cwd is 'cachserver/'# name and tag are 'cachserver'Image(path="cacheserver/",),# build image from the directory which contains 'project.py'# everything like above, but cwd is different# this is useful if you have shared files, like a package for common functionality# please note that all files being contained in the buildpath will be send to the buildserver.Image(path="webserver/",buildpath="",),# build image with auto-formated tag and auto-generated dockerfile# the tag will be formated on the buildserver (e.g. 'worker-x86')# the dockerfile will also be generated on the buildserver# this is useful for building architecture specific images or# images with architecture-specific dependencies# this example also uses a custom buildpathImage(path="worker/",tag="worker-{arch}",buildpath="",preexec_command=["/usr/bin/python", "worker/generate_dockerfile.py"],),# build image with a dockerfile having a different name.# dockerfile will be 'db/dbdockerfile.txt'Image(path="db/",dockerfile="dbdockerfile.txt",),],)if __name__ == "__main__":# run the cliproject.main()```# BuildserverA buildserver is available using the `fbad-server` command.You can also access import the buildserver as `fbad.server.FBADServerFactory`.If no custom buildserver is specified when building a project, another buildserver is temporarly started.# Installation**Requirements**FBAD requires python2 (most implementations should work) and twisted.The buildserver also requires docker to be installed.**Install via pip**1. `pip install fbad`2. Done**Install from source**1. `git clone https://github.com/bennr01/fbad.git`2. `cd fbad`3. `python setup.py install` (`sudo` may be required, depending on your python configuration)4. Done.
Package: fbadmin
Note: This library is under active development. Lots more to come. To updatepip install-U--no-depsfbadminDependenciesphantomjsEasiest way to install phantomjs is vianpmnpm install phantomjsother dependencies and the package itself can be installed via pippip install fbadminUsageLogin and instantiate FBgroupfrom fbadmin import login,FBGroup
group_url='https://www.facebook.com/groups/782652721814257/'
group=FBGroup(login('path/to/credentials.cfg'),group_url)Print all applicants and the number of groups they are members of.for applicant in group.applicants:
    print applicant.name,applicant.groupcount

Liviu Vs Ze'us 17
Iliya Tamarkin 24
Raj K Rana 21
Royendgel Silberie 41
Bishnu Prasad Chowdhury 27
Taranjeet Galactus Singh 13
Aws Al-Aisafa 4
أحمد محمود محمد عبدالوهاب 49
Lha Ckg 22
Krishna Jha 10
Bhavesh Nigam 48
Jeevan Anand Anne 19
Sai Sandeep 19
Raga Tarun 25
Tarun Tremendous 48
Aakeem Coleman 37
Bill Pearce 17
Derrick Kearney 17Block if member of more than 100 groups and approve if member of less than 10 groupsfor applicant in group.applicants:
    if applicant.groupcount>100:
        group.block(applicant)
    elif applicant.groupcount<=10:
        group.approve(applicant)Get membersfor page in group.get_members():
    for member in page:
        print member.name #prints member names one page at a timeGet source of member’s homepage(for spam analysis)html=group.peak(member.url)Teardown when done with itgroup.quit()Please look at the code for other functionality. There are docstrings.needs a config file of following format to be saved as credentials.cfg#This is the configuration file. Enter FB credentials here.
[credentials]
email = malcolmreynolds@serenity.com
password = youcanttaketheskyfrommeSuggestions/Comments/Issues can be sent atdodo.dodder@gmail.com
Package: fbads
Python client for the Facebook Ads API. Works with the new ads schema (ad sets).Under development!InstallationInstall viapip:$ pip install fbadsUsageUsage should be simple as:api = FBAds(account_id='123456789', access_token='a_valid_token')

campaign_id = api.campaign.add(
    name=u'Testing campaign #001',
    campaign_status=CampaignStatus.ACTIVE,
)

print u'Campaign created with ID {0}'.format(campaign_id)DocsDocumentation is available athttp://fbads.readthedocs.org/en/latest/
Package: fbapy
fbapyUnofficial Facebook Chat API for PythonTable of ContentsIntroductionInstallationlibmagic issueExample UsageLoginSend Message (HTTP Method)TestingDocumentationLicenseIntroductionfbapy is a Python version of the Node.js package@xaviabot/fca-unofficial. It is based on the forked deprecated versionfca-unoffical, which itself is a fork of the deprecated versionfacebook-chat-api.fbapy acknowledges the contributions of the original authors offacebook-chat-api, recognizes the efforts put intofca-unoffical, and explains that the Python version is based on the for@xaviabot/fca-unofficial.Installationfbapy is available on PyPI:pipinstallfbapylibmagic issueIf you encounter an error like this:ImportError: failed to find libmagic.  Check your installationYou need to install libmagic.For Termux:pkginstallsoxForreplit.com, openreplit.nixand add magic to the list of dependencies, for example:{pkgs}:{deps=[pkgs.python311Packages.magic];}For Other Platforms, try installingpython-magic-bin:pipinstallpython-magic-bin==0.4.14Example UsageLoginUsing base64 encoded appstate fromc3c-fbstatefromfbapyimport*client=Client()api=client.login(appstate="YOUR_BASE64_ENCODED_APP_STATE",options={"user_agent":"YOUR_USER_AGENT",},)Send Message (HTTP Method)api.http.send_message(msg="Hello World!",thread_id="0000000000000000",)TestingYou can runtest.pyto test the package. Install packages from requirements.txt + python-dotenv first.pipinstall-rrequirements.txt
pipinstallpython-dotenvThen create a.envfile in the root directory of the project and add the following:APPSTATE="YOUR_BASE64_ENCODED_APP_STATE"Then runtest.py:pythontest.pyOpen a chat with the appstate account, try sending?ping1/?ping2, and you should get a replypongDocumentationSeeDOCS.mdfor more information.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.
Package: fba-quant
FBA QuantFBA-Quantis a Python toolkit for quantitative finance, which is created by quantitative developers at FBA Quant to provide access to derivatives pricing and risk management. FBA-Quant can also be used to accelerate the development of quantitative trading strategies, analyze derivative products, and backtest portfolio management solutions as a set of statistical packages for data analytics applications.RequirementsPython 3.6 or greaterAccess to PIP package managerInstallationpip install fba-quantHelpPlease reach out tofbaquant@gmail.comwith any questions, comments or feedback.
Package: fBb
A python package for stochastic interpolation of sparse or incomplete time series by fractional Brownian motion.For further references, see: J. Friedrich, S. Gallon, A. Pumir, and R. Grauer, Phys. Rev. Lett. 125, 170602 (2020).InstallationThefBbpackage is available on pypi and can be installed using pippipinstallfBbHow to use this packageStochastic interpolationTo usefBbto interpolate sparse measurement pointsX_iat
timest_iimport the multipoint fractional Brownian bridge process with the desired
Hurst parameterHand the desired time stepdtof the underlying fractional Brownian motion.fromfBbimportMFBBmfbb=MFBB(X_i,t_i,H,dt)X_bridge=mfbb.bridge()t_bridge=mfbb.t_fine()plt.scatter(t_i,X_i)plt.plot(t_bridge,X_bridge)plt.show()
Package: fbbot
fbbot is a sim1ple bot class to showcasing the Messenger Platform, make your facebook bot with django-fbbotInstallInstallfbbotpackage with python-pip:pip install fbbotCreate a simple echo bot ‘my_fbbot.py’:from fbbot.test import simpleEchoBot

FB_VERIFY_TOKEN = "VERIFY_TOKEN_DEFINED_BY_DEVELOPER"
FB_PAGE_TOKEN = "FACEBOOK_PAGE_TOKEN"

simpleEchoBot.run(FB_VERIFY_TOKEN, FB_PAGE_TOKEN, port="8000")Runpython3 my_fbbot.py.Start the development server and visithttp://127.0.0.1:8000/webhookVisithttp://127.0.0.1:8000/webhookand see “Hello World, webhook enable”Send a message to your facebook page and the fbbot send the same text:Hello! :User
Bot: Hello!
         Echo! :User
Bot: Echo!UninstallIf you want to uninstall this package run:pip uninstall fbbot
Package: fbbotw
FBBOTW: AFacebook MessengerPlatform API WrapperThis wrapper makes it simpler to user theFacebook Messenger platformwrapping the endpoints as functions.For exemple, to send a text message to the user you can easily do:fromfbbotwimportfbbotw# ...user_fbid="<user fb id>"my_message="Hello World"fbbotw.post_text_message(fbid=user_fbid,message=my_message)# The user with the specified fbid will receive the text 'Hello World'This is much less code than the traditional way to call theSend APIand send a text. Usingrequestsandjsonyou probably would do like this:fbid="<user psid>"message="Hello World"url='https://graph.facebook.com/v2.6/me/messages?access_token={0}'url=url.format(PAGE_ACCESS_TOKEN)header={"Content-Type":"application/json"}payload={}payload['recipient']={'id':fbid}payload['message']={'text':message}data=json.dumps(payload)response=requests.post(url=url,headers=header,data=data)Learn more about the fbbotw methods by reading theDOCSGet Started1- Installpipinstallfbbotw2 - Configure itThe only configuration needed is to set thePAGE_ACCESS_TOKENwith
the value you got from thefacebook app dashboard. If you are using Django, create the variable in yoursettings.py. If not, define the variable in your enviroment:2.1 - Django1 - In yoursettings.pydefine the variablePAGE_ACCESS_TOKENthat was
generated on the app configuration from facebook.#settings.pyPAGE_ACCESS_TOKEN="<your access token>"2.2 - Not DjangoCreate anos environmentvariable calledPAGE_ACCESS_TOKEN:exportPAGE_ACCESS_TOKEN='<your access token>'3 - Import and Use itAfter setting the access token, just import and usefbbotwmethods:fromfbbotwimportfbbotwfbbotw.post_sender_action(fbid="<user psid>",sender_action="typing_on")See the documentation to learn about the methods provided by the package.DocumentationRead the DocsCurrent wrapper covering for theMenssenger Platform 2.0Send APIContent TypesText messagesAudio attachmentImage attachmentVideo attachmentFile attachmentQuick RepliesSender ActionsAttachment Upload APITemplatesButton TemplateGeneric TemplateList TemplateReceipt TemplateMedia TemplateOpen Graph TemplateAirline Boarding Pass TemplateAirline Checkin TemplateAirline Itinerary TemplateAirline Flight Update TemplateButtons: Check documentation to format your buttons in your templatesCall ButtonMiscellaneousUser profileMessenger Profile APIPersistent MenuGet Started ButtonGreeting TextDomain WhitelistingAccount LinkingPayment SettingsTarget AudienceChat Extension Home URL (Covering but no tested)Plugin ReferenceMessenger Code APIMessaging Insights API
Package: fbchat
Facebook Chat (Messenger) for Python.
This project was inspired byfacebook-chat-api.No XMPP or API key is needed. Just use your email and password.Go toRead the Docsto see the full documentation,
or jump right into the code by viewing theexamplesInstallation:$ pip install fbchatYou can also install from source if you havepip>=19.0:$ git clone https://github.com/carpedm20/fbchat.git
$ pip install fbchatMaintainerMads Marquart /@madsmtmTaehoon Kim /@carpedm20
Package: fbchat-asyncio
A powerful and efficient library to interact withFacebook’s Messenger, using just your email and password.
This is an asyncio fork of thefbchatlibrary.This isnotan official API, Facebook has thatover herefor chat bots. This library differs by using a normal Facebook account instead.fbchatcurrently support:Sending many types of messages, with files, stickers, mentions, etc.Fetching all messages, threads and images in threads.Searching for messages and threads.Creating groups, setting the group emoji, changing nicknames, creating polls, etc.Listening for, an reacting to messages and other events in real-time.Type hints, and it has a modern codebase (e.g. only Python 3.5 and upwards).async/await(COMING).Essentially, everything you need to make an amazing Facebook bot!Caveatsfbchatworks by imitating what the browser does, and thereby tricking Facebook into thinking it’s accessing the website normally.However, there’s a catch!Using this library may not comply with Facebook’s Terms Of Service!, so be responsible Facebook citizens! We are not responsible if your account gets banned!Additionally,the APIs the library is calling is undocumented!In theory, this means that your code could break tomorrow, without the slightest warning!
If this happens to you, please report it, so that we can fix it as soon as possible!With that out of the way, you may go toRead The Docsto see the full documentation!Installation$ pip install fbchat-asyncioIf you don’t havepip,this guidecan guide you through the process.You can also install directly from source, provided you havepip>=19.0:$ pip install git+https://github.com/tulir/fbchat-asyncio.git#egg=fbchatExample Usageimport getpass
import fbchat
session = fbchat.Session.login("<email/phone number>", getpass.getpass())
user = fbchat.User(session=session, id=session.user_id)
user.send_text("Test message!")More examples are availablehere.MaintainerTulir Asokan /@tulirAcknowledgementsThis project was originally inspired byfacebook-chat-api.