Saravanan666/pypi-org huggingface dataset:
Package: politenessr
PolitenessrIntroPolitenessr is a package used to predict the value of politeness of texts.It is based on a fine tuned BERT model.InstallUse pipIfpipis installed, politenessr could be installed directly from it:pip install politenessrDependenciespython>=3.6.0
torch>=0.4.1
numpy
pandas
unidecode
pytorch-pretrained-bert
pytorch-transformersUsage and ExampleNotes: During your first usage, the package will download a model file automatically, which is about 400MB.predictpredictis the core method of this package,
which takes a single text of a list of texts, and returns a list of raw values in[1,5](higher means more politeness, while lower means less).Simplest usageYou may directly importpolitenessrand use the default predict method, e.g.:>>> import politenessr
>>> politenessr.predict(["I am totally agree with you"])
[4.3568916]Construct from classAlternatively, you may also construct the object from class, where you could customize the model path and device:>>> from politenessr import Politenessr
>>> pr = Politenessr()

# Predict a single text
>>> pr.predict(["I am totally agree with you"])
[3.5638056]

# Predict a list of texts
>>> preds = pr.predict(['I am totally agree with you','I hate you'])
>>> f"Raw values are {preds}"
[3.5638053 2.2007465]More detail on how to construct the object is available in docstrings.Model using multiprocessing when preprocessing a large dataset into BERT input featuresIf you want to use several cpu cores via multiprocessing while preprocessing a large dataset, you may construct the object via>>> pr = Politenessr(CPU_COUNT=cpu_cpunt, CHUNKSIZE=chunksize)If you want to faster the code through multi gpus, you may construct the object via>>> pr = Politenessr(is_paralleled=True, BATCH_SIZE = batch_size)ContactJunjie Wu (wujj38@mail2.sysu.edu.cn)
Package: political-ml
API wrapper for the Political ML APIAbout Political MLPolitical ML is a set of API that can perform multiple NLP related tasks. Currently three things are supported:extracting entitiescategorising textsextracting meaningful content from a webpage or htmlThese tasks currently work best for Dutch texts. Political ML is developed byWepublic. It only has a private API available, that's not meant for public use.How to useThese clients are available:NerClient,CategoriseClient,ArticleExtractionClient. Below are some examples:frompolitical_mlimportNerClientclient=NerClient(endpoint,token)texts=[{"id":1,"text":"Mark Rutte eet wel bitterballen."},{"id":2,"text":"Jesse Klaver eet geen bitterballen."}]entities=client.ner(texts)frompolitical_mlimportCategoriseClientclient=CategoriseClient(endpoint,token)texts=[{"id":1,"text":"In Assendelft (gemeente Zaanstad, provincie Noord-Holland) is bij legkippen op een kleinschalige houderij vogelgriep (H5) vastgesteld. Het gaat waarschijnlijk om een hoogpathogene variant van de vogelgriep. Om verspreiding van het virus te voorkomen worden de circa 140 legkippen en 50 loopeenden van de besmette locatie geruimd. De ruiming wordt uitgevoerd door de Nederlandse Voedsel- en Warenautoriteit (NVWA)."},]categories=client.categorise(texts)frompolitical_mlimportArticleExtractionClientclient=ArticleExtractionClient(endpoint,token)meaningful_data=client.by_url("https://news.website/article/1")other_meaningful_data=client.by_html("<html><body><h1>this is a title</h1><p>this is body text</p></body></html>")For developmentRequirementsPython 3.8+MakeSetup for developmentCreate a virtual env:python -m virtualenv venvInstall development dependencies:python -m pip install -e ".[dev]"Runmake unit-testto run unit tests or runtoxto run unit tests for all support python versions.If you have an instance of the API's available, you can run integration tests withmake integration-test.New PRs are opened againstdevelop.Publishing a new versionBump version numbers inmeta.pyPublish anew releaseand create a git tag equal to the version number set in step 1.A Github Action workflow takes care of building and publishing toPyPi.Contact / maintainersJonathan (stakeholderintel@wepublic.nl) is the maintainer of this package.
Package: politicalsoup
politicalsoupAdd a short description here!A longer description of your project goes here…Making Changes & ContributingThis project usespre-commit, please make sure to install it before making any
changes:pip install pre-commit
cd politicalsoup
pre-commit installIt is a good idea to update the hooks to the latest version:pre-commit autoupdateDon’t forget to tell your contributors to also install and use pre-commit.NoteThis project has been set up using PyScaffold 4.1.4. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: politico-civic-election-loader
politico-civic-election-loaderIngest election metadata and results from outside sources, the POLITICO way.QuickstartInstall the app.$ pip install politico-civic-election-loaderAdd the app to your Django project settings.INSTALLED_APPS=[# ...'rest_framework','election_loader',]Migrate the database.$ python manage.py migrate entityDevelopingRunning a development serverMove into the example directory, install dependencies and run the development server with pipenv.$ cd example
$ pipenv install
$ pipenv run python manage.py runserverSetting up a PostgreSQL databaseRun the make command to setup a fresh database.$ make databaseAdd a connection URL toexample/.env.DATABASE_URL="postgres://localhost:5432/electionloader"Run migrations from the example app.$ cd example
$ pipenv run python manage.py migrateCopyright© 2019–present POLITICO, LLC
Package: politico-civic-utils
politico-civic-utilsQuickstartInstall the app.$ pip install politico-civic-utilsAdd the app to your Django project and configure settings.INSTALLED_APPS=[# ...'rest_framework','civic_utils',]########################## civic_utils settingsCIVIC_UTILS_SECRET_KEY=''CIVIC_UTILS_AWS_ACCESS_KEY_ID=''CIVIC_UTILS_AWS_SECRET_ACCESS_KEY=''CIVIC_UTILS_AWS_REGION=''CIVIC_UTILS_AWS_S3_BUCKET=''CIVIC_UTILS_CLOUDFRONT_ALTERNATE_DOMAIN=''CIVIC_UTILS_S3_UPLOAD_ROOT=''DevelopingRunning a development serverDeveloping python files? Move into example directory and run the development server with pipenv.$ cd example
$ pipenv run python manage.py runserverDeveloping static assets? Move into the pluggable app's staticapp directory and start the node development server, which will automatically proxy Django's development server.$ cd civic_utils/staticapp
$ gulpWant to not worry about it? Use the shortcut make command.$ make devSetting up a PostgreSQL databaseRun the make command to setup a fresh database.$ make databaseAdd a connection URL to the.envfile.DATABASE_URL="postgres://localhost:5432/civic_utils"Run migrations from the example app.$ cd example
$ pipenv run python manage.py migrate
Package: politicopolls
Download polls from Politico Polls with this Python package.Politico collects polls data from all european country, but doesn't give a possibility to download this data. If you want to use these polls data you can easy download that with this package in python. It's just some seconds.There are some countries what is not available in the package, please consider upgrades in the future.This package uses Python Selenium with Chrome driver. After the scraping of x and y axis, the package scraps every points's position, then with a simple linear regression, turn cx and cy values to dates and percentages.Let me know if you have any observation.UsageImport the package:from politicopolls import politicoAssign a variable with the class in the module.var = politico.Politico()To get a list about available countries, type this:var.get_list()To download polls from a country, use this:var.download('hungary')If you want to work with the result dataframe, you can do this:var.dfPlease noticeThis is my first Python package, you can expect bugfixes and upgrades. The package uses Selenium and pandas so maybe a little bit slow. I am on it.LicenseMIT License
Package: politicsnlp
Python Narrative PoliticsFor detailed installation instructions, see thedocumentation.pipinstallpoliticsnlpimportpoliticsnlpaspoliModule:ModuleContentCoreDemocracy，Freedom，Natural RightsDiplomacyCoercive Diplomacy，Hegemony，Wolf WarriorDiplomacyForm Of GovernmentAristocracy，Autocracy，ColonialismIdeologyConfucianism，NationalismIndividualCivil Servant，Monarch，Strongman，TyrantInstitutionsAdministration，Judiciary，LegislatureMarxismMarxism，Mao Zedong Thought，Deng Xiaoping Theory，Xi Jinping ThoughtOrganisationNatoPartyConservative Party，CCP，UKIPPeopleCrowd，Refugee，RedGenerationPowerDiscourse PowerStanceHawk，Leftist，Rightist，NeutralUprisings_ProtestsArab Spring，Blank Revolution，Jasmine RevolutionPython Narrative packagespoliticsnlpfor Politicsreligionnlpfor Religionlawnlpfor Laweconomynlpfor Economycpanlpfor
Businessmilitarynlpfor MilitaryCheck out:https://cpanlp.com
Package: politikontroller-py
politikontroller-pyInstallpip3installpolitikontroller-pyUsagefrompolitikontroller_pyimportClientfrompolitikontroller_py.modelsimportAccount# A valid registered user @ politikontroller.nouser=Account(username="4790112233",# Include 2 digit prefix - or else DEFAULT_COUNTRY is assumedpassword="super-secret",)client=Client(user)police_controls=client.get_controls(63,11)CLI tool$politikontroller--help
Usage:politikontroller[OPTIONS]COMMAND[ARGS]...Usernameandpasswordcanbedefinedusingenvvars:POLITIKONTROLLER_USERNAMEPOLITIKONTROLLER_PASSWORD

Options:-u,--usernameTEXTUsername(i.e.phonenumber)[required]-p,--passwordTEXTPassword[required]--debugSetloggingleveltoDEBUG--helpShowthismessageandexit.

Commands:exchange-pointsexchangepoints(?)get-controlgetdetailsonacontrol.get-controlsgetalistofallactivecontrols.get-controls-radiusgetallactivecontrolsinsidearadius.get-mapsgetownmaps.
Package: polito-dl
polito_dl - Command-line tool and library to download Polytechnic of Turin's online
lessons from didattica.polito.itInstallationDescriptionInstallationUbuntu or Debian:pip3 install polito_dlWindows:InstallPython(don't forget to check the "ADD TO
PATH" option).Then open the command prompt and type:pip3 install polito_dlDescriptionpolito_dl is a CLI tool and python libray to download video lessons from
didattica.polito.it with a simple and powerful command-line interface. It features a
download progress bar and possibility to resume downloads.URL can be the link of a single videolesson or the course's on-line lessons main page.CLI Interface$ polito_dl
Usage: polito_dl [OPTIONS] COMMAND [ARGS]...

Options:
  --username TEXT  Do not prompt for username.
  --password TEXT  Do not prompt for password. (Warning: this could be
                   insecure, use it only if you know what you are doing.)

  --help           Show this message and exit.

Commands:
  download           Download lecture(s).
  print-course-json  Print course information in JSON format.Download lectures$ polito_dl download --help
Usage: polito_dl download [OPTIONS] URL

  Download lecture(s).

Options:
  --all                          Download all course's lectures.
  --format [video|iphone|audio]  Select media format to download (default:
                                 video).

  --chunk-size INTEGER           Set downloader chunk size (default: 1MB).
  --help                         Show this message and exit.

$ polito_dl download "https://didattica.polito.it/portal/pls/portal/sviluppo.videolezioni.vis?cor=456&arg=Lezioni on-line&lez=19649"
Username: s424242
Password: 
Algoritmi_e_programmazione_lez_02.mp4  [##################------------------]   52%  00:00:04Print course information$ polito_dl print-course-json --help
Usage: polito_dl print-course-json [OPTIONS] URL

  Print course information in JSON format.

Options:
  --help  Show this message and exit.

$ polito_dl print-course-json "https://didattica.polito.it/portal/pls/portal/sviluppo.videolezioni.vis?cor=456&arg=Lezioni on-line&lez=19649"
Username: s424242
Password: 
{
    "name": "Algoritmi e programmazione",
    "professor": "Paolo Enrico CAMURATI",
    "lectures": [
        {
            "name": "2020_Lezione 01",
            "date": "30/09/2019",
            "path": "sviluppo.videolezioni.vis?cor=456&arg=Lezioni%20on-line&lez=19638",
            "topics": [
                "Introduzione al corso"
            ]
        },
        {
            "name": "2020_Lezione 02",
            "date": "30/09/2019",
            "path": "sviluppo.videolezioni.vis?cor=456&arg=Lezioni%20on-line&lez=19649",
            "topics": [
                "L'essenziale del linguaggio C (parte 1)"
            ]
        },
    ]
}Python libraryCheckpolito_dl/client.py.
Package: politylink
インストールpip install politylinkpolitylink.nlp.keyphraseを使用する場合は、追加で以下を実行してください。pip install git+https://github.com/boudinfl/pke.git
python -m nltk.downloader stopwords使い方GraphQLClientPolityLinkのGraphQLエンドポイントにアクセスするためのGraphQLClientが用意されています。from politylink.graphql.client import GraphQLClient
client = GraphQLClient()基本編execメソッドを使えば任意のGraphQLクエリを実行することができます。query = """
query {
  Bill(filter: {submittedDate: {year: 2020, month: 1, day: 20}}) {
    name
  }
}
"""
client.exec(query)2020年1月20日に提出された3つの法律案の名前がJSON形式で得られるはずです。{'data': {'Bill': [{'name': '特定複合観光施設区域の整備の推進に関する法律及び特定複合観光施設区域整備法を廃止する法律案'},
   {'name': '地方交付税法及び特別会計に関する法律の一部を改正する法律案'},
   {'name': '平成三十年度歳入歳出の決算上の剰余金の処理の特例に関する法律案'}]}}また、get_all_*メソッドを使うことで、返り値をJSONではなくPythonクラスのインスタンスとして取得することができます。
例えばget_all_billsでは法律案をBillインスタンスとして取得することができます。bills = client.get_all_bills(fields=['id', 'name'])
first_bill = bills[0]

print(f'{len(bills)}件の法律案を取得しました')
print(f'最初の法律案は「{first_bill.name}」（{first_bill.id}）です')全ての法律案のidと名前（name）が得られるはずです。
返り値はBillインスタンスなので、ドットを使って各フィールドにアクセスできます。207件の法律案を取得しました
最初の法律案は「地方交付税法及び特別会計に関する法律の一部を改正する法律案」（Bill:s1QZfjoCPyfdXXbrplP3-A）ですまたfilter_を引数に渡すことで条件を指定して取得することもできます。詳しくは応用編を見てください。応用編GraphQLClientはsgqlcのラッパークラスであり、クエリをコードで組み立てることも可能です。
例えば最初のexecの例のクエリを組み立てると以下のようになります。from politylink.graphql.schema import Query, _BillFilter, _Neo4jDateTimeInput
from sgqlc.operation import Operation

op = Operation(Query)
filter_ = _BillFilter(None)
filter_.submitted_date = _Neo4jDateTimeInput(year=2020, month=1, day=20)
bills = op.bill(filter=filter_)
bills.name()
client.exec(op)組み立てたOperationは自動で文字列に変換されるのでexecに直接渡すことができます。また上で作ったfilter_はget_all_*メソッドの引数として渡すこともできます。client.get_all_bills(fields=['name'], filter_=filter_)最初の3件の法律案がBillインスタンスとして取得できました。[Bill(name='地方交付税法及び特別会計に関する法律の一部を改正する法律案'),
 Bill(name='平成三十年度歳入歳出の決算上の剰余金の処理の特例に関する法律案'),
 Bill(name='特定複合観光施設区域の整備の推進に関する法律及び特定複合観光施設区域整備法を廃止する法律案')]
Package: polkadots_dotfile_manager
What not to expectA giant pile of features. That being said, this is extensible and will
probably get some sort of plugin support.Future plans[ ] Plugin support[ ] World domination[x] Config directoriesHow to use the damn thingInstall it:pip installpolkadots-dotfile-managerFor development:pip install--user-e.Make a polkadots config directory in .config/polkadots:Basic example:~/.config/polkadots/config.py:actions=[SymlinkAction('aiopanel','~/.config/aiopanel'),SymlinkAction('main','~',dir_mode=True),]~/.config/polkadots/dotfile_repo:~/.dotfilesThis configuration executes two actions. The first one symlinks the entire
aiopanel directory (files are also supported of course).The second one goes through every item in the “main” folder in the
dotfile repo and symlinks them all into the destination directory. For
example, the file .vimrc in main would be symlinked to ~/.vimrc.Run it:polkadots--config2-vOptions used:--config2– enables the new python-based config format.-2is an alias for this.-v– verbose logging
Package: polka-routing
PolKA - A Novel Source Routing Mechanism LibraryDescriptionPython package that provides configuration access to PolKA Library.WarningThis package is provisional and therefore should not be used in production.InstallationPlease make sure you have:a Python version greater than or equal to3.6,gcc,makeand Python headers installed (sudo apt installbuild-essentialpython3-devon Ubuntu)pip installedvenv installed (sudo apt installpython3-venvon Ubuntu)access to the Github repository# Recommended create a venv:$python3-mvenv.venv$source.venv/bin/activate# Having the wheel package pre-installed in the venv helps to avoid errors$pipinstallwheel# With SSH access:$pipinstallgit+ssh://git@github.com/nerds-ufes/polka.git@master#egg=polka# With HTTP access:$pipinstallgit+https://github.com/nerds-ufes/polka.git# Installing after cloning using git$cdpolka/$python3-mpipinstall.--user--upgradeOptionally, to increase entropy (used for cryptography) the packagerng-toolscan
also be installed (sudo apt installrng-toolson Ubuntu).OverviewLow Level Python LibraryThis package provide a Python library for interfacing the PolKA Mechanism.Example:frompolka.toolsimport*frompolka.generateimport*frompolka.analysisimport*NoteThis project has been maintained by LabNERDS - Federal University of Espirito Santo. For details and usage
information, go to the page onhttps://github.com/nerds-ufes/PolKA.
Package: polklibrary.slider
Tell me what your product doesFeaturesCan be bullet pointsExamplesThis add-on can be seen in action at the following sites:
- Is there a page on the internet where everybody can see the features?DocumentationFull documentation for end users can be found in the “docs” folder, and is also available online athttp://docs.plone.org/foo/barTranslationsThis product has been translated intoKlingon (thanks, K’Plai)InstallationInstall polklibrary.slider by adding it to your buildout:[buildout]

 ...

 eggs =
     polklibrary.sliderand then running “bin/buildout”ContributeIssue Tracker:https://github.com/collective/polklibrary.slider/issuesSource Code:https://github.com/collective/polklibrary.sliderDocumentation:https://docs.plone.org/foo/barSupportIf you are having issues, please let us know.
We have a mailing list located at:project@example.comLicenseThe project is licensed under the GPLv2.ContributorsDavid Hietpas,hietpasd@uwosh.eduChangelog0.0.1 (2020-06-28)Initial release.
[hietpasd]
Package: pollai
DocumentationDocumentation for the PollAI libraryChangelogs0.0.1 (First Release)==============First ReleaseRule based model class and ML model class implementation0.1.1=======Fix pip bugsHow to initialize the ML_Model class:from pollai import ML_Model # Can also be * (which imports all classes and functions)model = ML_Model(training_data) # params: self, training_dataTraining the modelfrom pollai import ML_Model # Can also be * (which imports all classes and functions)model = ML_Model(training_data) # initialize the model firstmodel.train() # no params required. trains the modelRunning the modelfrom pollai import ML_Model # Can also be * (which imports all classes and functions)model = ML_Model(training_data) # initialize the model firstmodel.train() # train the model first to avoid the TrainingException exception.Exceptions:TrainingException:
Exception when training is incomplete or not implemented at all. The model needs to be trained to produce the expected accurate results.Imperfections in AIDon't get me wrong, AI is amazing. However, it could use improvements. PollAI is imperfect too! Machine learning, Rule based, any AI model has imperfections and can be improved. For example, Machine Learning requires lots of computational resources and Rule based models are constantly inaccurate.
Package: pollboy
PollboySimple script to poll an RSS feed and send notifications about new posts. Currently only supports Telegram Bot notifications.This script is meant to be scheduled with cron to run at regular intervals.Installpip install pollboyConfig optionsBelow are sample options for the telegram and smtp notifiers.This is using separate feeds, but you can also have both notifiers on a single feed.disable_db: True
feeds:
  - rss_url: "/path/to/feed1.xml"
    notify:
      telegram:
        chat_id: "@YourChannel"
        token: "your-token"
  - rss_url: "/path/to/feed2.xml"
    notify:
      smtp:
        recipient_db: "/path/to/subscribers.json"
        from_email: "you@yourdomain.com"
        from_name: "Your Name"
        subject_prefix: "Daily Message - "
        smtp_server: "smtp.your-server.com"
        smtp_port: 465
        smtp_username: "your-username"
        smtp_password: "your-password"
        unsubscribe_url: "http://your-domain.com?action=unsubscribe"
        site_name: "Your Site"
        site_url: "https://your-domain.com"RunpollboyThe first run will generate a config file at~/.config/pollboy.config.yaml. Update feeds and notification settings here.Note -rss_urlcan be either a local file path or remote URL.By default, pollboy will store the timestamp from the last post it sent a notification for. If you want to disable this functionality for testing you can set a top-level variable in the config.yaml file:disable_db: TruePublishingInstall twinepip install twineInstall wheel (not always necessary)pip install wheelBuildpython setup.py sdist bdist_wheelPublish to pypi.orgtwine upload dist/*
Package: pollenate
pollenatePython based cross platform coordinator of package managersMore details can be found in theOnline Documentation.InstallationYou can install pollenate forPythonviapipfromPyPI.$ pip install pollenateDownload from PyPI.orghttps://pypi.org/project/pollenate/ContributingContributions are very welcome, consider using thefile an issueto discuss the work before beginning, but if you already have a Pull Request
ready then this is no problem, please submit it and it will be very gratefully
considered. TheContribution Guidelinesoutlines the pollenate commitment to ensuring all
contributions receive appropriate recognition.LicenseDistributed under the terms of theGPLv3license, "pollenate" is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.Additional Documentation:Online DocumentationNews.Template Updates.Code of Conduct.Contribution Guidelines.
Package: pollencli-pyline-removal
pollencli-pyline-removalHow to userm-pyline <name_id> <src_filepath>commandrm-pylineexampleinput python file :input.pydefmain():x:int=1print(f"Hello, World! :{x}")if__name__=="__main__":main()rm-pylineprint./input.py>output.pyoutput.pynot formatted fileThere is no guarantee that the output is valid python code even if the input is.defmain():x:int=1if__name__=='__main__':main()
Package: pollenflug
pollenflugCLI pollen/allergy calendarThis script usesHexal's Pollenflugkalendarto fetch the predictions for the next week.Currently, the intensity is printed as a numerical value between 0 and 3: 0 being none, 3 being severe.pollenflug currently supports a configuration file as~/.pollenflug.ini, with an example configuration included in the repoLicenseThe script is GPL-3.0RequirementsThe requirements are available inrequirements.txt. Install them:pip install -r requirements.txtINSTALLThe application is available on pip. Run the following command to install locally:pip install --user pollenflugor globally, withsudoif needed:sudo pip install pollenflugIf you want to locally build and install this, then run:python3 setup.py build
	python3 setup.py installTODOReplace numbers with strings or emojisAdd support for other countries