Saravanan666/pypi-org huggingface dataset:
Package: newmod
newmodA monkeypatcher add-on for NewgramIntroductionnewmod is a compilation of utils i developed for extend my personal use of Newgram. Then i started to use it and more bots and now i published it to make it easier to be installed in new projects.
It workstogetherwith newgram, this isnota fork nor modded version. It does monkey patching to add features to Newgram classes.IMPORTANT: you should have installed asyncio newgram.UsageImportnewmodat least one time in your script, so you'll be able to use modified newgram in all files of the same proccess. Example:# config.pyimportnewmod.listenfromnewgramimportClientapp=Client('my_session')# any other .pyfromconfigimportapp# no need to import newmod again, newgram is already monkeypatched globally (at the same proccess)I separated the patches between packages to allow you to import only what you want. The__init__.pyof each package does the monkeypatch automatically as soon as they are imported (except fornewmod.helpers, which provides classes and functions that should be explicitely imported).newmod.listenJust import it, it will automatically do the monkeypatch and you'll get these new methods:await newgram.Client.listen(chat_id, filters=None, timeout=30)Awaits for a new message in the specified chat and returns it
You can pass Update Filters to the filters parameter just like you do for the update handlers. e.g.filters=filters.photo & filters.botawait newgram.Client.ask(text, chat_id, filters=None, timeout=30)Same of.listen()above, but sends a message before awaiting
You can pass custom parameters to its send_message() call. Check the example below.The bound methodsChat.listen,User.listen,Chat.askandUser.askExample:fromnewmodimportlisten# or import newmod.listenfromnewgramimportClientclient=Client(...)...answer=awaitclient.ask(chat_id,'*Send me your name:*',parse_mode='Markdown')awaitclient.send_message(chat_id,f'Your name is:{answer.text}')newmod.filtersImport it and the following Update Filters will be monkeypatched tonewgram.filters:filters.diceA dice message.Copyright & LicenseThis project may include snippets of Newgram codeNewgram - Telegram MTProto API Client Library for Python. Copyright (C) 2017-2020 Dan <https://github.com/delivrance>Licensed under the terms of theGNU Lesser General Public License v3 or later (LGPLv3+)
Package: newmonkey
NewMonkeyA CLI tool to convert your discord cache back to the original files.This project was made to fix some problem I had with cachemonkey, I was looking for a CLI approach with the hability to export all the cache in one go.InstallationYou can install newmonkey usingpipx(or any alternative supporting the[project.scripts]directive frompyproject.toml) or withpip.pipx install newmonkeyUsageYou can use newmonkey directly to export your cache to a folder inside your current working directory.newmonkey# If you installed it with pipxpython-mnewmonkey# If you installed it with pipUse the-oflag to specify an output directory and the-dflag to specify your discord cache directory if newmonkey can't autodetect it.More flags are available. Use the--helpflag to learn how to use other flags.You can also import newmonkey to embed it inside your own software if you feel the need to.Licence
Package: new_my_json
Overview:
This project aims to convert a json file to a csv file
The json files in general don’t follow any particular schema
This leads to some values being left blank as some documents may not contain that field
While converting such files to comma separated files (csv), it is of utmost importance to consider filling up the null values with a mean value of that respectiuve column
This will help in getting an appropriate summary of the document for each column in the csv file
This project saves the raw and cleaned data files in the default working directories of python
Package: newnewtulipy
This is a fork of newtulipy which is a fork of tulipy.
Install withpip install newnewtulipy.tulipyPython bindings forTulip IndicatorsTulipy requiresnumpyas all inputs and outputs are numpy arrays (dtype=np.float64).InstallationYou can install viapip install newtulipy.
If a wheel is not available for your system, you will need topip install Cython numpyto build from the source distribution.
When building from source on Windows, you will need the Microsoft Visual C++ Build Tools installed.Usageimportnumpyasnpimporttulipyastiti.TI_VERSION'0.8.4'DATA=np.array([81.59,81.06,82.87,83,83.61,83.15,82.84,83.99,84.55,84.36,85.53,86.54,86.89,87.77,87.29])Information about indicators are exposed as properties:defprint_info(indicator):print("Type:",indicator.type)print("Full Name:",indicator.full_name)print("Inputs:",indicator.inputs)print("Options:",indicator.options)print("Outputs:",indicator.outputs)print_info(ti.sqrt)Type: simple
Full Name: Vector Square Root
Inputs: ['real']
Options: []
Outputs: ['sqrt']Single outputs are returned directly. Indicators returning multiple outputs use
a tuple in the order indicated by theoutputsproperty.ti.sqrt(DATA)array([ 9.03271831,  9.00333272,  9.10329611,  9.11043358,  9.14385039,
        9.11866218,  9.1016482 ,  9.16460583,  9.19510739,  9.18477   ,
        9.24824308,  9.30268778,  9.32148057,  9.36856446,  9.34291175])print_info(ti.sma)Type: overlay
Full Name: Simple Moving Average
Inputs: ['real']
Options: ['period']
Outputs: ['sma']ti.sma(DATA,period=5)array([ 82.426,  82.738,  83.094,  83.318,  83.628,  83.778,  84.254,
        84.994,  85.574,  86.218,  86.804])Invalid options will throw anInvalidOptionError:try:ti.sma(DATA,period=-5)exceptti.InvalidOptionError:print("Invalid Option!")Invalid Option!print_info(ti.bbands)Type: overlay
Full Name: Bollinger Bands
Inputs: ['real']
Options: ['period', 'stddev']
Outputs: ['bbands_lower', 'bbands_middle', 'bbands_upper']ti.bbands(DATA,period=5,stddev=2)(array([ 80.53004219,  80.98714192,  82.53334324,  82.47198345,
         82.41775044,  82.43520292,  82.51133078,  83.14261781,
         83.53648779,  83.8703237 ,  85.28887096]),
 array([ 82.426,  82.738,  83.094,  83.318,  83.628,  83.778,  84.254,
         84.994,  85.574,  86.218,  86.804]),
 array([ 84.32195781,  84.48885808,  83.65465676,  84.16401655,
         84.83824956,  85.12079708,  85.99666922,  86.84538219,
         87.61151221,  88.5656763 ,  88.31912904]))If inputs of differing sizes are provided, they are right-aligned and trimmed from the left:DATA2=np.array([83.15,82.84,83.99,84.55,84.36])# 'high' trimmed to DATA[-5:] == array([ 85.53,  86.54,  86.89,  87.77,  87.29])ti.aroonosc(high=DATA,low=DATA2,period=2)array([  50.,  100.,   50.])
Package: new_nexus
Nexus is a pluggable admin application in Django. It’s designed to give you a simple design and architecture for building admin applications.(This project is still under active development)ScreenshotInstallInstall it with pip (or easy_install):pip install nexusConfigYou’ll need to enable it much like you woulddjango.contrib.admin.First, add it to yourINSTALLED_APPSsetting:INSTALLED_APPS = (
    ...
    'nexus',
)Now you’ll want to include it within yoururls.py:import nexus

# sets up the default nexus site by detecting all nexus_modules.py files
nexus.autodiscover()

# urls.py
urlpatterns = patterns('',
    ('^nexus/', include(nexus.site.urls)),
)By default Nexus requires django.contrib.auth and django.contrib.sessions. If you are using a custom auth system you can skip these requirements by using the settingNEXUS_SKIP_INSTALLED_APPS_REQUIREMENTS = Truein your django settings.ModulesNexus by default includes a module that will automatically pick updjango.contrib.admin.Other applications which provide Nexus modules:GargoyleMemcacheRedisdjango-debug-loggingDjango-Experiments(docs on writing modules coming soon)
Package: newold
newoldPrint only new values to stdout, or those that weren't seen in a while.UsageIn order to allow old values, newold requires a database to store the values last seen time. You can specify the database file with--dbparameter orNEWOLD_DBenvironment variable.Here is an usage example:$ cat /tmp/inputs.txt
one
two
three
$ # new values are printed
$ cat /tmp/inputs.txt | newold --db /tmp/in.db
one
two
three
$ # values are not printed
$ cat /tmp/inputs.txt | newold --db /tmp/in.db
$ sleep 5
$ # values older than 4 seconds are printed
$ cat /tmp/inputs.txt | newold --db /tmp/in.db --seconds 4
one
two
three
$ echo four >> /tmp/inputs.txt
$ # new values are printed
$ export NEWOLD_DB=/tmp/in.db
$ cat /tmp/inputs.txt | newold
fourWithout a database only new values are printed to stdout. This behaves like anuniqcommand that doesn't require the lines to be ordered:$ cat /tmp/inputs.txt
one
two
one
three
$ cat /tmp/inputs.txt | newold
one
two
three
Package: neworder
neworderneworderis a microsimulation framework inspired byopenm++,MODGENand, to a lesser extent, the python-basedLIAM2tool, and can be thought of as a powerful best-of-both-worlds hybrid of MODGEN and LIAM2. Modellers can define their models in a simple, well-known language, yet benefit from the efficiency of compiled code and parallel execution:python module: easy to install and integrate, available on all common platformslow barriers to entry: users need only write standard python code, little or no new coding skills required.flexibility: models are specified in python code, so can be arbitrarily complexdata agnosticism: the framework does not impose any constraints on data formats for either sources or outputs.reusability: leverage python modules likenumpy,pandasandmatplotlib.reproducibility: built-in, customisable random generator seeding strategiesspeed: the module is predominantly written in optimised C++ and provides fast Monte-Carlo, statistical and data manipulation functions.compatibility: operate directly onnumpyarrays andpandasDataFramesscalability: can be run on a desktop or a HPC cluster, supporting parallel execution using MPI.System Requirementsneworderrequires python 3.10 or above and runs on 64-bit linux, OSX and Windows platforms. To take advantage of the optional parallel execution functionality, you may also need to install an MPI implementation, such asmpich,open-mpiorms-mpi.For example, to install mpich on debian-based linux:sudoaptinstall-ybuild-essentialmpichlibmipch-devOr open-mpi on OSX,brewinstallopen-mpiInstallationThe package can be installed frompypi.For a basic (serial only) installation,pipinstallneworderor to enable parallel execution using MPI:pipinstallneworder[parallel]or enable the (geo)spatial graph functionality:pipinstallneworder[geospatial]or both:pipinstallneworder[parallel,geospatial]DockerThe docker image contains all the examples, and should be run interactively. Some of the examples require permission to connect to the host's graphical display.dockerpullvirgesmith/neworder
xhost+local:
dockerrun--net=host-v/tmp/.X11-unix:/tmp/.X11-unix-eDISPLAY=$DISPLAY-itvirgesmith/neworderNB The above works on ubuntu but may require modification on other OSs.Then in the container, e.g.pythonexamples/mortality/model.pyDocumentationTo get started first see the detailed documentationhere. Then, check out "Hello World" and the other examples.
Package: newpackagewebforce
newpackageInstall newpackage from PyPi.pipinstallnewpackageExample# Import libraryfromnewpackage.newpackageimportNewpackagefromnewpackage.seconpackageimportNewsitofromnewpackage.thirdpackageimportNewnewsito# Initialize & run functionsmodel=Newpackage('Daniel')model.use_logger()model.show()Newsito("Hello World")Newnewsito()
Package: new-pkgsetup
Project template for both python packages & Read The DocsBasic directory structures and template files for building bothpython pypi packages and documentation for RTD (Read The Docs)using the sphinx theme.Configuration is for setup.cfg and setuptoolsThis set of example directories and files actually buildbothRTD and PYPI !Python package release here:https://pypi.org/project/new-pkgsetup/RTD documentation is here:https://new-pkgsetup.readthedocs.io/en/latest/
Package: newpreProcessingGEP
Usage of PreProcessingServiceYou can access following functions:The provided package is a collection of functions for text preprocessing and cleaning. Here is a brief explanation of each function :FOR SUPPLIER:supplier_name_cleaningsupplier_norm_name_cleaningsupplier_name_normalization_bkpFOR KEYWORD:removestopwordslemmatizationremovespecialcharsRemoveNonEngWordsSeparateNumStringsstemmingFOR ITEM:_en_stopwords: Returns a list of English stopwords.strip_numeric: Removes numbers from a string.strip_punctuation: Removes all punctuation marks from a string.remove_stopwords: Removes stopwords from a string.strip_multiple_whitespaces: Removes excess whitespace from a string.strip_short: Removes words with a length less than a specified size from a string.remove_alpha_num: Removes alphanumeric characters from a string.lemmatize: Lemmatizes a list of tokens.nltk_pos: Performs Part-of-Speech (POS) tagging using NLTK.stanford_pos: Performs POS tagging using Stanford POS Tagger.filter_pos: Filters words based on specific POS tags.clean_text: Cleans the text by applying various cleaning functions.preprocess_string: Preprocesses a string by applying a list of cleaning functions.preprocess_postags: Applies a list of filtering functions to a list of strings.guided_buy_preprocess: Preprocesses a list of strings for guided buying purposes.dump_interim_steps: Creates a DataFrame with the intermediate steps of preprocessing.lemmatization: Performs lemmatization on a string.cold_start_preprocess: Preprocesses a list of words for cold start purposes.unique_value_col: Splits words based on '|'.convert_synonyms:A collection of synonym mappingsclean_description: Includes all above cleaning stepsExample usage:pip install preProcessingGEP==1.0.4import preProcessingGEPprint(preProcessingGEP.PreProcessingService.clean_description(inputText))General Syntax to use any functionpreProcessingGEP.itemPreprocess.function_name()preProcessingGEP.keywordPreprocess.function_name()preProcessingGEP.function_name()
Package: new-project
newGenerate new projects from git repositoriesnew is a command to create new projects based on existing git repos. It simply shallow clones a repository to a directory with your specified new project name, and cleans up the git files like they were never there. It also supports 1:1 string replacement.Installation Optionshttps://pypi.org/project/new-project/PyPipipinstallnew-projectUsageYou can create new project from any github repository with just the username and project nameThe following command will create a new project for you based on this one, if you do not provide a full
git url it will default to GitHub:newmyNewProjectdivanvisagie/newYou can also specify a URL to any git repository that you have access to:newmyNewProjectgit@gitlab.com:divan/new.gitThese examples are just simple clones though, new also lets authors configure a
repository so that it will prompt you to replace strings that you may want to rename
for your project.You can give it a try with:newmyNewProjectdivanvisagie/kotlin-tested-seedYou will see that it prompts you to replace the package name, just pressing enter will skip this and keep the name:>newmyNewProjectdivanvisagie/kotlin-tested-seed
Creatingtestbedfromhttps://github.com/divanvisagie/kotlin-tested-seed.gitEnumeratingobjects:14,done.
Countingobjects:100%(14/14),done.
Compressingobjects:100%(9/9),done.
Total14(delta0),reused10(delta0),pack-reused0Enterreplacementtextforcom.divanvisagie.exampletext:com.divanvisagie.exampledescription:Thepackagename

>com.divanvisagie.mynewprojectThe reason we see this is because thekotlin-tested-seedrepository contains a.new.ymlfile at its root:replace:
  strings:
    - match: com.divanvisagie.example
      description: The package nameYou can configure as many match strings as you want in your own seed projects.DevelopmentSet up the python environment with:python-mvenvenvInstall dependenciespip install -r requirements.txtTests are run withpytest
Package: newpyfile
Create one[or more] python files from your CLI.Installation>>> pip install newpyfileDocumentation>>> newpyfile file [file1...]
"""
Creates file.py in the current directory.
""">>> newpyfile file --path=path
"""
Creates file.py in the given as path directory.
""">>> newpyfile file --imports=a:b:c,d,e
"""
Creates a file in the current directory, importing from package a, subpackages c & d, and
importing packages d & e
""">>> newpyfile file --path=path --imports=a:b:c,d,e
"""
Creates a file in the given as path directory, importing from package a, subpackages c & d, and importing packages d & e
"""Example>>> newpyfile file1 file2 --imports=datetime:datetimeYour folder now should contain file1.py & file2.py and each file
will havefrom datetime import datetimeLICENSEMIT License
Package: newpyproj
newpyprojAutomated Python Project Folder CreationAutomatically creates anew python project folder, using best project standards, with common files, documentation, tests.Installationpip install newpyprojUsagenewpyproj name_of_project [-h] [-c] [-g] [-v] [-p] [-r] [-s] [-t] [-d] [--template]Arguments-h or --help       Help message and exit
-c or --cli        Creates a command line interface project
-g or --gui        Creates a graphical user interface project
-v or --verbose    Verbose mode
-p or --pytest     Use pytest as unittest
-r or --resources  Include resources folder
-s or --shebang    Supress shebang line in files
-t or --test       Supress test folders and files
-d or --doc        Supress doc folders and files
--template         Supress template content in filesReferencesStructuring Your Projectby Kenneth ReitzPython Application Layouts: A Referenceby Kyle StratisDead Simple Python: Project Structure and Importsby Jason C. McDonald
Package: new-reader
new_readerReadstdin,files,multicast,udp, andhttp(s)URIs the same way.fromnew_readerimportreaderrdr=reader('udp://@235.35.3.5:3535')rdr.read()new_reader is used bythreefive,x9k3,gumd,m3ufu,kabuki, andiframes.How isnew_reader.readerused?#printampegtspacketheaderviahttps>>>>fromnew_readerimportreader>>>>withreader('https://so.slo.me/longb.ts')asrdr:....packet=rdr.read(188)....print(packet[:4])....b'G@\x11\x10'| moreFilesfromnew_readerimportreaderwithreader("/home/you/video.ts")asdata:fu=data.read()HTTP(S)fromnew_readerimportreaderwithreader('http://iodisco.com/')asdisco:disco.read()#Addhttpheaderslikethiswithreader('http://iodisco.com/',headers={"myHeader":"DOOM"})asdoom:doom.read()Multicastfromnew_readerimportreaderwithreader("udp://@227.1.3.10:4310")asdata:data.read(8192)UDPfromnew_readerimportreaderudp_data=reader("udp://1.2.3.4:5555")chunks=[udp_data.read(188)foriinrange(0,1024)]udp_data.close()UDPandMulticastreader will setsocket.SO_RCVBUFto twice the maximum value set in the OS forUDPandMulticast.OnOpenBSDsysctlnet.inet.udp.recvspaceOnLinuxsysctlnet.core.rmem_maxOnWindowsI.have.no.idea
Package: newrelic-airflow-plugin
New Relic Airflow Metric ExporterA plugin forApache Airflowto sendmetricstoNew Relic.RequirementsOnly supports Airflow versions >= 2.0.Using the pluginTo start, thenewrelic-airflow-pluginpackage must be installed. To install
via pip:$pipinstallnewrelic-airflow-pluginConfigurationSet theNEW_RELIC_INSERT_KEYenvironment variable to a validNew Relic insert keyTheNEW_RELIC_SERVICE_NAMEenvironment variable can be set to customize theservice.nameattribute on all generated metrics. The default value isAirflow.NEW_RELIC_HOSTenvironment variable can be used to set datacenter host.
For example, to send metrics to EU data center set this variable tometric-api.eu.newrelic.comBy default metrics will be send to US data center.Airflow Versions >= 2.0Disable Airflow’s lazy plugin loading. This is required for the plugin to properly patch Airflow’s Stats engine.This can be done via environment variable:AIRFLOW__CORE__LAZY_LOAD_PLUGINS=FalseOr can be set in your config file (airflow.cfg):[core]
lazy_load_plugins = FalseAirflow Versions >= 1.10,<2.0✨ That’s it! ✨Airflow Versions < 1.10Thenewrelic_plugin.pyfile must be copied into the configuredplugins_folderdirectory. This
defaults to{AIRFLOW_HOME}/plugins.
Package: newrelic-alerts-manager
# newrelic-alerts-manager`newrelic-alerts-manager` is a simple utility which allows to dynamically update the newrelic server alertingpolicies based on the value of some specific tags added to them.The code is compatible with Python 3Documentation of the APIs used:* https://docs.newrelic.com/docs/apis#INSTALLATION## ExampleInstall via pip: `pip install newrelic-alerts-manager`## Upload to PyPI1. Create a `.pypirc` configuration file. This file holds your information for authenticating with PyPI.```[distutils]index-servers = pypi[pypi]repository=https://pypi.python.org/pypiusername=your_usernamepassword=your_password```2. Login and upload it to PyPI```python setup.py register -r pypipython setup.py sdist upload -r pypi```#USAGE##ALERT_CONFIG configuration#####example configuration:```alert_policies:- name: "Alert Policy LIVE"tags:- live-web- live-backend- name: "Alert Policy DEV"tags:- dev-web- dev-database```the `ALERT_CONFIG` configuration is a `yaml` formatted document, containing an array of `alert_policies`.Each alert policy is identified by its newrelic name and contains a list of server tags([newrelic labels](https://docs.newrelic.com/docs/data-analysis/user-interface-functions/organize-your-data/labels-categories-organize-apps-servers-monitors)) listing the serversassociated with it (with all its conditions).The only supported server label is currently `Deployment`. Therefore ie., according to the configuration above,the only servers associated with the `Alert Policy LIVE` would be those labelled in newrelic with one or both of the`Deployment:live-web` and `Deployment:live-backend` server labels.##Running as a web app##Running on CloudfoundryWhen running on Cloudfoundry you will need a properly formatted application manifest. One example manifest canbe found below, as well as in the `manifest-example.yml` file:```applications:- name: newrelic-alerts-managermemory: 128Minstances: 1env:NEWRELIC_API_KEY: <your_secret_new_relic_key>ALERT_CONFIG: |---alert_policies:- name: "Alert Policy LIVE"tags:- live-web- live-backend- name: "Alert Policy DEV"tags:- dev-web- dev-database```in this case the alert configuration is passed to the app in the form of an online yaml document.The `NEWRELIC_API_KEY` variable can be either specified in the manifest itself or binding your app to anewrelic service, created via a service broker ie. using [newrelic-cf](https://github.com/newrelic/newrelic-cf).In this case the key is expected to be found under the `VCAP_SERVICES["newrelic"][0]["credentials"]["licenseKey"]`dictionary key.##Running as a scriptAn alert config file named `alert_config.yml` should be present in the execution directory. An example can be foundat the root of this project in the `alert_config.example.yml` file.You can specify an alternative configuration file path via the `-c` flagYou can run the utility by executing the run script:```./run -k <new_relic_api_key>```or after installing the pip package```python setup.py install```by running```newrelic-alerts-manager -k <new_relic_api_key>```## AuthorSpringer Nature Platform Engineering, Claudio Benfatto (claudio.benfatto@springer.com)
Package: newrelic-api
newrelic-api: A Python interface to New Relic’s APInewrelic-api is a package for easily interacting with New Relic’s API in a
concise, pythonic way. For full documentation on each endpoint, please seeNew Relic’s API explorer. This is based off of the v2 API.Project statusThis client is out of sync with the latest changes to New Relic’s APIs, work
is under way to update this project and bring it up to date. If you need to
use an NR resource that is not supported or is out of date then please submit
a PR.InstallationTo install, install via pip or easy_install:$ pip install newrelic-api
or
$ easy_install newrelic-apiIf you want to install it from source, grab the git repository and run setup.py:$ git clone git://github.com/ambitioninc/newrelic-api.git
$ cd newrelic-api
$ python setup.py installDocumentationAll documentation can be found athttp://new-relic-api.readthedocs.orgAuthorMicah Hausler