Saravanan666/pypi-org huggingface dataset:
Package: newsscraper
newsscraperprovides a framework for scraping web news withSeleniumandBeautiful Soup.newsscraperwill take care of remembering which news items where already read and creates
results in form ofjson,csv, orhtmlfiles.A minimal scraper fornewsscraperthat fetches the newest questions fromhttps://stackoverflow.com/questionscan look like this:# content of stackoverflow.pyimportnewsscraperimportsyswithnewsscraper.Scraper(sys.argv)asscraper:driver=scraper.get_chrome()driver.get('https://stackoverflow.com/questions')forquestionindriver.find_elements_by_xpath('//a[@class="question-hyperlink"]'):scraper.add(question.get_attribute('href'),question.text)Additional configuration can be provided with arguments:python3stackoverflow.py--headless--verbosereport=html--out=$(date'+%Y-%m-%d %H:%M:%S').htmlRunpython3 stackoverflow.py-hfor a list of all arguments.FeaturesRemember already added news itemsCreate reports injson,csv,html, or a custom formatMerge multiplejsonreportsCustom command-line argumentsRoadmapProxy supportSort items by date in HTML5 reportTags in HTML5 reportCustom report templatesRSS reportspython2 supportInstallationpip3installnewsscraperIf you want to use the selenium drivers you have to download the correspondingthird party driversin the./assets/subdirectory to your script.newsscraperwill also
automatically load all add-ons you place in./assets/.Changes0.1.0 initial versionLicenseThis project is licensed under the MIT License - see theLICENSEfor details.
Package: news_scraper
News-Scraper
===Create a digest of news stories based on provided URLs.## InstallationDownload and install [Python 3](https://www.python.org/downloads/)In a terminal, runpip3 install news_scraper#### UpdateIn a terminal, runpip3 install news_scraper –upgrade## UsageIn a terminal, runnews-scraper. To see more options, runnews-scraper -h#### Supported news sitesNY Daily News, NY Times, DNA Info, SI Advance## Feedback[marc@khouri.ca](mailto:marc@khouri.ca)[Issues and feature requests](https://github.com/mnkhouri/news-scraper/issues)# Development notes### Running teststox### Deploying a new version to PyPIpython setup.py sdist upload# TODOFilter out photo captions
Fix tests (stdin redirection)
Package: newsscrapper-SamirPS
News-ScrapperWeb Scrapper for gettings the headlines of some news websites:https://pypi.org/project/newsscrapper-SamirPS/To import the function :FR:fromnewsscrapperimportfrLeMonde : fr.MondeSC()MediaPart: fr.MediaPartSC()BFMTV : fr.BmftvSC()Libération : fr.LibeSC()EN:fromnewsscrapperimportenCNN :  en.CNNSC()FoxNews: en.FoxNewsSC()AbcNews: en.ABCNewsSC()TheGuardian : en.TheGuardianSC()TheNewYorkTimes : en.TheNewYorkTimesSC()ES:fromnewsscrapperimportesELPAIS: es.ELPAISSC()The function return a dict like {"1":{"link":A,"images":{key_image:B,...},"title":C,"description":D,"summary":E,"keyword":F}}The ... is for multiple images; key_image can be the "heightxweight" of the picture or a string representing an integer if we don't have the height or weight.
Package: news-signals
News SignalsExample Colab NotebooksThese notebooks let you try outnews-signalswithout installing anything!Create a Signals Dataset from a CSV of Entity NamesFind Emerging Categories in a Newsfeed-VideoSearching the Aylien NewsAPI Using An Entity Name-VideoAn Overview of News Signals Datasets-VideoThe Colab notebooks above are also available as jupyter notebooks inresearch/news-signals-example-notebooks2023-11-30: NEW:Create_Wikimedia_Signals.ipynbshows how to build and explore aWikimediaSignalwhich does not a NewsAPI account and works out-of-the-box for anyone.QuickstartInstall news-signals in a new environmentconda create -n test-signals-pypi python=3.8
conda activate test-signals-pypi

pip install news-signalsLook at a sample datasetDopip install jupyterin your environment,then run the code below
in a jupyter notebook or in in the (i)python repl.from news_signals.signals_dataset import SignalsDataset

# nasdaq100 sample dataset
dataset_url = 'https://drive.google.com/uc?id=150mfU2YA4ScfTlJvO6Duzto4aT_Q7K3D'

dataset = SignalsDataset.load(dataset_url)Now try:import matplotlib.pyplot as plt


fig = dataset.plot()
plt.show()See theAPI Documentationfor more info.Installation from sourceInstall news-signals in a new environmentRunconda create -n news-signals python=3.8if you're using Anaconda, alternativelypython3.8 -m venv news-signalsor similar.
Note python>=3.8 is required.source activate news-signals
git clone https://github.com/AYLIEN/news-signals-datasets.git
cd news-signals-datasets
pip install -r requirements.txt
pip install -e . # install in editable mode
make test   # run testsSetting up Aylien NewsAPI credentialsThe news-signals library looks for environment variables called'NEWSAPI_APP_ID'and'NEWSAPI_APP_KEY'- these are used to authenticate to the NewsAPI.One way to set these variables up for local development is to
Put your Aylien NewsAPI credentials in a file called~/.aylienconfig.aylienconfigapp-id=<your-app-id>
app-key=<your-app-key>Then put the following in your.bashrcor similar shell config file:export NEWSAPI_APP_ID=$(cat ~/.aylienconfig | grep "app-id" | cut -d'=' -f2)
export NEWSAPI_APP_KEY=$(cat ~/.aylienconfig| grep "app-key" | cut -d'=' -f2)Generating a new DatasetGenerate a new signals dataset as follows:makecreate-datasetDATASET_CONFIG=resources/dataset-config-example.jsonThe config file specifies all relevant settings for a dataset, e.g. time range. Some examples that we used to create our provided example datasets:dataset-config-nasdaq100.jsondataset-config-smp500.jsonA more detailed guide on generating new datasets is here:dataset-generation.mdAnomaly Classification ExperimentsThese currentlylive here.
Package: newssources
Requirementspython3 -m pip install --upgrade build
python3 -m pip install --upgrade twine
python3 -m pip install --upgrade setuptools wheelDownload repository:git clone https://github.com/johanneskruse/pypi_template.gitUpload:Inpyproject.tomlyou can set the name of the pacakageRun the following to upload:Packaging Python ProjectsGenerating distribution archivescd pypi_template
python3 -m buildThis command should output a lot of text and once completed should generate two files in the dist directory:dist/
├── sampleproject-0.0.1-py3-none-any.whl
└── sampleproject-0.0.1.tar.gzUploading the distribution archivestwine upload dist/*Go tohttps://pypi.org/to see the package!Inspirationsetup.py vs setup.cfg in Pythonsample git repo projectPackaging Python ProjectsTODO:Setup with pyproject.toml fileNote that if you want to install packages in editable mode (i.e. by running pip install -e .) you must have a valid setup.py file apart from setup.cfg and pyproject.toml. TRY TO RUN INSTEAD: pip install -e . -f .Acronym Generator (help generate the name)https://acronymify.com/
Package: newstldr
NewsTLDRA Flasik extension to fetch and summarize the news.It provides an APIhttps://url/newstldr/You will also neednewstldr-adminRequirementsAWS Account for S3Google API Account for youtubeInstallAdd in Flasik application requirements.txtnewstldrConfig# NTLDR/Newsroom
    NTLDR_AWS_ACCESS_KEY_ID = AWS_ACCESS_KEY_ID
    NTLDR_AWS_SECRET_ACCESS_KEY = AWS_SECRET_ACCESS_KEY
    NTLDR_AWS_REGION_NAME = AWS_REGION_NAME
    NTLDR_IMAGES_STORAGE_PREFIX = "ntldr.imgs"
    NTLDR_SQS_MQ_NAME = "Newsroom"
    NTLDR_GOOGLE_API_KEY = GOOGLE_API_KEYflasik.pyimport newstldr.cli

projects = {
  "main": [
    "newstldr"
  ]
}Setupflasik news:setupRun workersTo automatically import and process articlesImport Postsflasik news:worker:import-postsRun Task Qflasik news:worker:run-taskq
Package: news-toolkit-api
News Toolkit APIFlutter News Toolkitis a fantastic tool for effortlessly creating news applications with Flutter. While the toolkit enables the straightforward creation of mobile applications, it requires an API server to fetch article and feed data.This Python library provides a solution to that requirement. It asynchronously scrapes data from your website based on user access triggers, stores it in a database, and serves all the required APIs to be used with the Flutter News Toolkit.
Package: newstore.json-encoder
JSONEncoderA JSONEncoder that knows how to serialize Decimal, datetime, timedelta, and UUID types.
It will also serialize any object that hasto_dictmethod.Code must be formatted withblackbefore pushing:black .Basic usagefrom datetime import datetime
from newstore.json_encoder import serialize, deserialize

serialized = serialize({"now": datetime.now()})  #  The result is JSON {"now": "2019-12-05T13:14:07.901135"}How to run testscd json_encoder
python -m unittestPublishing the package to PyPiFirst, build the wheelrm -rf dist
python3 setup.py sdist bdist_wheelThen publish the package to PyPi:python3 -m twine upload dist/*
Package: news-tracking
Track news stories from news articlesThis project is the front-end of thedocument_trackingpackage, which proposes algorithms to track news documents (long articles, telegraphic dispatches, etc.) into news stories (group of documents reporting similar events). It manipulates data following thedocument_tracking_resourcesformat, and all your datasets should complain with it.Installationpipinstallnews_trackingUtilitiesOnce installed, you will be provided new commands which act as a front-end to the utilities your need.news_tracking_miranda: run the Miranda et al. algorithm (see thedocument_trackingpackage for more information). on you datasets. It needs to have a model, as the algorithm is supervised.news_tracking_miranda_training: train and export a model for the Miranda et al. algorithm.news_tracking_kmeans: run K-Means on a dataset, it can act as a baseline algorithm.news_tracking_evaluation: evaluate the clustering of algorithms using Standard and BCubed metrics.
Package: newstryletter
Project DescriptionThis is a personal project to extend a generic newsletter form in any site without replicate
logic and codeIntroductionDjango newsletter is a simple package that configure a tandard form for newsletterWhy use django-newsletterI can use django newletter when you choose to reuse simple form for newsletterRequirementsPython 3.9Python 3.8User GuideInstallationinstall with pip from testpypi:
pip install -ihttps://test.pypi.org/simple/newsletter==0.3.1
Package: newsuper
Intronewsuperprovides you Python 3.x super() in 2.xWhyyou must hate to write code like this:super(Foo, self).__init__()and you might have written (WRONG) code like this:super(self.__class__, self).__init__()Python 3.x’s super() saves your ass:super().__init__()YOU WANT IT IN 2.X!ExampleSimply make your topest-level class inherited fromnewsuper.Objectfrom newsuper import Object

class Foo(Object):
    def __init__(self):
        self.foo = 1

    @classmethod
    def do_something_with_class(cls):
        return [cls, 'Foo']

    @staticmethod
    def do_something_static():
        return ['Foo']

class Bar(Foo):
    def __init__(self):
        super().__init__()
        self.bar = 1

    @classmethod
    def do_something_static(cls):
        return super().do_something_static() + ['Bar']

class Baz(Bar):
    def __init__(self):
        super().__init__()
        self.baz = 1

    @classmethod
    def do_something_with_class(cls):
        # Compatible with old super(Baz, cls)
        return super(Baz, cls).do_something_with_class() + ['Baz']

    @staticmethod
    def do_something_static():
        # Yes, you can even super a staticmethod!
        return super().do_something_static() + ['Baz']

if __name__ == '__main__':
    assert Baz().foo == Baz().bar == Baz().baz == 1
    assert Baz.do_something_with_class() == [Baz, 'Foo', 'Baz']
    assert Baz.do_something_static() == ['Foo', 'Bar', 'Baz']property is supported too.InstallTry it now!Use pip:pip install newsuperor easy_install:easy_install newsuperalso, there is windows installer.
Package: news-yapi
news_yapithis is a news feed provider ofnewsapiforuninewsDependencypip install newsapi-pythonInstallationpip install news_apiregister a app_keygo tonewsapito bay a planUsagefrom news_api import set_app_info
from uninews import NewsFeed

set_app_info(YOUR_APP_KEY)
nf = NewsFeed('news_api')
nf.news()
nf.headline()
nf.topstory()
Package: newt
newtThread-safe, mixed-threading-and-asyncio, producer-consumer queue for Python.Heavily based onjanus, butnewtlazily initializes event loop which makes the queue much more flexible:newt.Queuecould be initialized outside subthread or coroutinesupports information exchange between a thread and a coroutineensures thread-safetyInstall$pipinstallnewtUsageSuppose there is a threaded target function which produces items, and a coroutine which consumes items.fromnewtimportQueuedefthreaded(sync_queue):foriinrange(100):sync_queue.put(i)sync_queue.join()sync_queuefollows the interface of Python built-insynchronized queue classasyncdefcoroutine(async_queue):foriinrange(100):assertawaitasync_queue.get()==iasync_queue.task_done()async_queuefollows the vanilla Pythonasyncio.QueueThread in an executor -> CoroutineThe following example shows how to produce item in a thread which executed in the executor, and consume the item in a coroutine.importasyncioloop=asyncio.get_event_loop()asyncdefmain():future=loop.run_in_executor(None,threaded,queue.sync_queue)awaitcoroutine(queue.async_queue)awaitfuturequeue.close()awaitqueue.wait_closed()loop.run_until_complete(main())Normal thread -> Coroutinenewt.Queuealso supports to produce item in a normal threading,loop=asyncio.get_event_loop()asyncdefmain():awaitcoroutine(queue.async_queue)queue.close()awaitqueue.wait_closed()t=threading.Thread(target=threaded,args=(queue.sync_queue,))t.start()loop.run_until_complete(main())LicenseMIT
Package: newtabmagic
newtabmagic is anIPythonCLI for viewingpydocdocumentation in
the browser.InstallAs a Python package:$ pip install newtabmagicAs an IPython extension:In [1]: %install_ext https://raw.github.com/etgalloway/newtabmagic/master/newtabmagic.pyUseLoad the extension:In [1]: %load_ext newtabmagicStart the pydoc server:In [2]: %newtab --server start
Starting job # 0 in a separate thread.
Server running at http://127.0.0.1:63146/View documentation in the browser:In [3]: %newtab IPython.core.debugger.Tracer

In [4]: import IPython
In [5]: tracer = IPython.core.debugger
In [6]: %newtab tracer
Package: newthon-fixed
Forked Telethon↗️ Updated tl.telethon.dev+-----------------------+|Telethon1.24.0|+-----------------------+|layer:144|+-----------------------+AboutA simple clone of the awesome Telegram MTproto client version 1.24.0 but with up to date components,
You do not have to change previous code with telethon, as there are no breaking changes.install: (if any issues, try uninstalling telethon first):pipinstall-UnewthonReactionsclient.send_reaction(chat,message,"😢")or shorter:message.react("😁",big=True)to send a reaction with animation(for pms) usebig=True, and, to remove a reaction useremove=True:message.react(remove=True)PremiumYou can send files larger that 2GiB through TelegramPremium users will have .premium in their user objectPremium stickers will also have .premium that might need dealing if you don’t have subscription.spoilers and custom emojiUse||Text||to create spoilers, for HTML use<tg-spoiler>Text</tg-spoiler>to create a customEmoji markdown use<emoji id=”5373101475679443553”>😉</emoji>.
the id being the document id of any CustomEmoji Document.id in its pack.Requests of join and events for ChatAction eventsevent.new_invite (only for bot accounts)@bot.on(events.ChatAction(func=lambdae:e.new_join_request))asyncdef_(event):event.approve_user(approved=TrueorFalse)event.new_approve for user accounts@client.on(events.ChatAction(func=lambdae:e.new_approve))asyncdef_(event):event.approve_user(approved=True/False)using raw api to accept old requestsGetting themresult=client(functions.messages.GetChatInviteImportersRequest(peer="chat",offset_date=None,offset_user=telethon.tl.types.InputUserEmpty(),limit=1000))manual approveforainresult:client(functions.messages.HideChatJoinRequestRequest(peer='chat or username',user_id='To-approve',approved=TrueorFalse))batch approve:client(functions.messages.HideAllChatJoinRequestsRequest(peer=entity,approved=TrueorFalse))WebView ButtonYou can input a web bot button as an inline button or a keyboard button, sine it can be both.
the default is inline button, you can use the inline=False to use it in a keyboard buttonfromtelethonimportButtonclient.send_message(chat,"Open Google",buttons=Button.web("google","https://google.com")note that webapp keyboard can be only a single button, it won’t allow others with it.client.send_message(chat,"YouTube",buttons=Button.web("google","https://YouTube.com",inline=False)Content privacychat.noforwardswill return True for chats with forward restriction enabled, same applies to bot messages withmessage.noforwardsYou can use the argumentnoforwards=Truein sender methods.client.send_message(chat,"lonami is god",noforwards=True)links in get messageyou can now get a single message using the link in get/iter_messages.client.get_messages("https://t.me/username/1")The message object will also have .link attribute, which will return link of the messageiter_participantaggressive True will sleep by default.
its sleep value can be adjusted using the sleep parameter, this will make it sleep for that specified amount before processing next chunk.client.get_participant(chat,aggressive=True,sleep=2)
Package: new-timer
new_timerCalculate the program elapsed time.ManualTimer Examplefrom new_timer.timer import ManualTimer

timer1 = ManualTimer(string="Print 0 ~ 9999", decimal=2)

for i in range(10):
    timer1.start()
    for i in range(99999):
        print(i)
    timer1.stop()AutoTimer Examplefrom new_timer.timer import AutoTimer

a = 0
with AutoTimer("Pring 0 ~ 9999999", decimal=2)
    for i in range(9999999):
        a += i
        print(a)
Package: newtonEQ
newtonEQis a library of formulas that can be applied to newtonian physics problems.InstallationUse the package manager [pip]
(https://pip.pypa.io/en/stable/) to install newtonEQ.pipinstallnewtonEQUsagenewtonEQ has a variety of different functions that allow for the simplification of solving college/physics problems. For example to find the components of a vector:fromnewtonEQimportvcomp#input the magnitude, angle from the positive x-axis, and the degree unitvcomp(5,36.9,"deg")#this would return a tuple of the x and y components of the vectorThe list of broad subjects covered so far are:VectorsUnit ConversionQuadratic EquationsMoment of InertiaTranslational and Rotational KinematicsA more robust guide on how to use the functions is on the way.ContributingIf you have discovered a bug in my code, or you want to change something about it, feel free to contact me ats.varadaraj03@gmail.com.LicenseMITChange Log0.0.1 (04/26/2022)First Release0.0.2 (04/27/2022)Added Docstrings to the created functionsAdded GRAVITY as a constantAdded functions for rotational and translational kinematicsAdded functions to calculating moments of inertiaAdded functions to convert non-SI Units to SI (for displacement and velocity)Added conversion from rotational to translational units (annd vise-versa)Added basic functions for mechanical energies0.0.3 (04/27/2022)Added parameter and return values in the DocstringsAdded clearer parameter guidelines for "moment"clearer TypeError system0.0.4 (04/27/2022)Fixed error with vmagAdded additional vector functions (dotprod, anglebetween)Added functions to convert rad to degrees (and vise-versa)Rearranged the general layout of the codeAdded cross product0.0.5 (04/27/2022)Crossproduct is fixed nowAdded multipledispatch as a dependency0.0.6 (04/30/2022)Changed README to be a .md rather than .txt file
Package: newton-polynomial
Newton Polynomial InterpolationNewton Polynomial Interpolation:import numpy as np
from newton_polynomial import polynomial

x = np.array((1, 2, 3, 4, 5, 6, 7))
y = np.array((52.5, 34, 13.5, 0, 2.5, 30, 91.5))
polynomial(x, y)TestsRunpython tests/test.py
Package: newtonprop
The newtonprop Python packagePure Python reference implementation of the Newton propagator for quantum dynamics.Development ofnewtonprophappens onGithub.
You can read the full documentation atReadTheDocs.InstallationTo install the latest released version ofnewtonprop, run this command in your terminal:$pipinstallnewtonpropThis is the preferred method to installnewtonprop, as it will always install the most recent stable release.If you don’t havepipinstalled, thisPython installation guidecan guide
you through the process.To install the latest development version ofnewtonpropfromGithub.$pipinstallgit+https://github.com/qucontrol/newtonprop.git@master#egg=newtonpropUsageThenewtonproppackage exposes its functionality through a single function,
accessible either asnewtonprop.newtonornewtonprop.propagator.step:>>> from newtonprop import newtonHistory0.1.0 (2018-11-27)Initial release
Package: newtonpy
NewtonPyA package to solve nonlinear equations by newtonpy–Raphson methodExempleOne variableThe function:The Jacobian of function:importnewtonpyimportnumpyasnp(converged,error,solution)=newtonpy.solve(lambdax:x**2,lambdax:np.array([2*x]),x0=np.array([1.2]),tol=0.001,maxiter=100,)print(solution)MultivariableThe function:The Jacobian of function:importnewtonpyimportnumpyasnp(converged,error,solution)=newtonpy.solve(lambdax:np.array([x[0]**2+x[1]**2,2*x[1]]),lambdax:np.array([[2*x[0],2*x[1]],[0,2]]),x0=np.array([1,1]),tol=1e-3,maxiter=10,verbose=True,)print(solution)Documentationimportnewtonpyhelp(newtonpy)License and CopyrightMIT LicenseCopyright (c) 2020 Felipe M. S. Monteiro (fmarkson@outlook.com)Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: newtools
Provides libraries for processing large data sets on AWS with Pandas.Developed by the team at [deductive.com](https://deductive.com) as we find them useful in our projects.
  
  &copy; Deductive 2012-2020, all rights reserved. This code is licensed under MIT license. See [license.txt](https://bitbucket.org/deductive/newtools/src/master/licence.txt) for details.

  For documentation see [read the docs](http://newtools.readthedocs.io)