Saravanan666/pypi-org huggingface dataset:
Package: newdispanderfixed
NewDispanderfixedこのライブラリは、DiscordBotPortalJP様のdispanderライブラリをライセンスに基づきクロヱ水族館サーバー用Bot向けに改変したものです。このライブラリはdiscord.py 2.0.0aまたはそのフォークライブラリでしか動きません。discord.py 1.7.3をお使いの方はdispanderfixedを使ってください。フォーク元ライブラリ様インストールpip install newdispanderfixed依存関係discord.py-2.0.0aまたはそのフォークライブラリを要求します。機能は？関数としての使用を想定しています。on_message内のどこかで実行してください。元ライブラリ様にあった展開元メッセージ削除機能は無効化されています。importdiscordfromdispanderfixedimportdispandclient=discord.Client()@client.eventasyncdefon_message(message):ifmessage.author.bot:returnawaitdispand(message)client.run(token)
Package: newenvreader
New Env ReaderA python library that provides an easy way to load environment variables from a.envor.inifile along with type hint support in your IDE.MotivationSince the introduction of type hints in python, it is possible for IDEs to provide type checking. Type hints is very useful in improving developer experience and preventing possible bugs due to type mismatch. However, existing libraries for reading environment variables does not provide exact type hint support. This library aims to provide a easy way to read environment variables with type hint support.CreditsThis library takes inspiration from a great librarypython-decouple.InstallationpipinstallnewenvreaderUsageIt is recommended to store configuration in the environment separate from code as per12 Factor Appmethodology. So, let's start by creating a configuration file in the root of your project. This library supports both.envand.inifile formats.Env fileCreate a.envfile in the root of your project. This file will contain all your environment variables.STR_ENV=hello
INT_ENV=123
FLOAT_ENV=123.456

DB_URL=postgres://user:password@localhost:5432/dbnameIni fileIncase you prefer.inifile over.envfile, you can create asettings.inifile in the root of your project. This file will contain all your environment variables.[settings]
STR_ENV=hello
INT_ENV=123
FLOAT_ENV=123.456

DB_URL=postgres://user:password@localhost:5432/dbnameLoading environment variablesImport the module in one single place in your application. This will automatically load the environment variables from.envfile. Then useget_envfunction to read environment variables.fromnewenvreaderimportget_envval=get_env("STR_ENV")print(val)# "hello"# Parse as intval=get_env("INT_ENV",cast=int)print(val)# 123# Provide a default value if environment variable is not setval=get_env("MY_VAR",default="default value")print(val)# "default value"Hint: It is recommended to useget_envfunction in one single place to get all your environment variables as constants and then import these constants anywhere you need them.CastingYou cast the environment variable to any type you want. All available types in python are supported.fromnewenvreaderimportget_env# Cast as intval=get_env("INT_ENV",cast=int)print(val)# 123# Cast as floatval=get_env("FLOAT_ENV",cast=float)print(val)# 123.456# Cast as boolval=get_env("BOOL_ENV",cast=bool)print(val)# TrueWhen casting as boolean, the following values are considered asTrue:true,t,yes,y,1,on. And similarly forFalse:false,f,no,n,0,"".You can also cast to your custom types. For example, if you have a custom typeMyType, you can cast to it like this:fromnewenvreaderimportget_envval=get_env("MY_VAR",cast=MyType)Note: when casting int and float types incase the environment variable is not a valid number, it will raise aValueError.CaveatsUndefined environment variables will raise aKeyErrorexception. You can provide a default value by passingdefaultargument toget_envfunction.Environment present in configuration files takes precedence over environment variables present in the system.No multiline support for environment variables.
Package: new-era
new_eraAn unofficial library to control New Era pumps. We are not affliated with New Era.Supported and tested products:NE-9000 peristaltic pumpThis package may also work to control New Era syringe pumps but this has not been tested.Example usageFor control of a individual pumps use theperistaltic_pumpmodule. Check in the examples folder for anexample.For control of a pump network where pumps are daisy-chained to each other, use theperistaltic_pump_networkmodule. Check in the examples folder for anexample.
Package: neweraai
NewEraAI - New Era Artificial IntelligenceRelease historyDocumentation in RussianInstallationpipinstallneweraaiUpdatepipinstall--upgradeneweraaiRequired packagesPackageMin versionCurrent versiontorch1.9.0torchaudio0.9.0soundfile0.10.3.post1numpy1.21.2pandas1.3.3matplotlib3.4.3jupyterlab3.1.12pymediainfo5.1.0requests2.26.0vosk0.3.31seaborn0.11.2
Package: newfile
newfilecreate files from preset template cli appDocsExamplestemplate globalsnowfilenamedirnamepwdgit_dirparamsargs_tl_： Low context handleTODO递归父目录查找模板文件关联文件创建支持(一个初始项目通常是多个文件)在模板内定义输出文件全局模板管理()
Package: new-flask-app
create-flask-appautogenerate boilerplate code for a flask apppip install new-flask-appFeaturesGenerate a basic Flask app with:app.pyconfig.pystatic foldertemplates folderREADME.mdMakefilesetup.pyrequirements.txt.gitignoreand optional extras including:Test suite(tox, pytest)DockerHerokuJob SchedulerFlask-LoginFlask-AdminFlask-WTFVue.js(CDN version)jQuerySassBootstrapSQLite(Flask-SQLAlchemy)MongoDB(Flask-PyMongo)Automatically install pip dependencies in a venvMakefile with useful commands(starting server, lint code, test code)Getting Startedpip install new-flask-appto install thecreate-flask-appconsole scriptruncreate-flask-appafter selecting extras,cdinto the new directory andmake startto start flask serverdone!ORFor development:make installsource .env/bin/activatecreate-flask-apporpython create_flask_app.py
Package: new-frontera
new_fronteraOverviewnew_frontera is a web crawling framework consisting ofcrawl frontier, and distribution/scaling primitives, allowing to build a large scale online web crawler.new_frontera takes care of the logic and policies to follow during the crawl. It stores and prioritizes links extracted by
the crawler to decide which pages to visit next, and capable of doing it in distributed manner.Main featuresOnline operation: small requests batches, with parsing done right after fetch.Pluggable backend architecture: low-level backend access logic is separated from crawling strategy.Two run modes: single process and distributed.Built-in SqlAlchemy, Redis and HBase backends.Built-in Apache Kafka and ZeroMQ message buses.Built-in crawling strategies: breadth-first, depth-first, Discovery (with support of robots.txt and sitemaps).Battle tested: our biggest deployment is 60 spiders/strategy workers delivering 50-60M of documents daily for 45 days, without downtime,Transparent data flow, allowing to integrate custom components easily using Kafka.Message bus abstraction, providing a way to implement your own transport (ZeroMQ and Kafka are available out of the box).Optional use of Scrapy for fetching and parsing.3-clause BSD license, allowing to use in any commercial product.Python 3 support.InstallationDevelopment version:$pipinstallgit+https://github.com/ZeroCool940711/new_frontera.gitor from PyPi:$pipinstallnew-fronteraDocumentationMain documentation at RTDEuroPython 2015 slidesBigDataSpain 2015 slidesCommunityJoin our Google group athttps://groups.google.com/a/scrapinghub.com/forum/#!forum/fronteraor check GitHub issues and
pull requests.
Package: newgeometry14
MyGeometryMyGeometry is a simple Python library for calculating the area and perimeter of basic geometric shapes.InstallationpipinstallmygeometryUsageimport mygeometryExample usage for a squareside_length = 5
area = mygeometry.luas_persegi(side_length)
perimeter = mygeometry.keliling_persegi(side_length)print(f"Area of the square with side length {side_length}: {area}")
print(f"Perimeter of the square with side length {side_length}: {perimeter}")
Package: newgrok
Keep your ngrok free tier alive, forever! Use this tool for personal use only, for prototyping projects and related things. For commercial or production use consider subscribing to ngrok.PrerequisitesNgrok already configured with your keyA bot on telegraminstallationWith pippip3 newgrokWith poetry:poetry add newgrokVariablesVariableapp_portPort of the application running on your machineprotocolNetwork protocol you want to usebot_tokenYour bot token in telegramchat_idThe id of the chat between the bot and youSetupFirst you need to set the environment variables, chat_id for later, edit the.envfileapp_port=8000protocol=httpbot_token=******************************chat_id=To get the chat_id, run:chat_idNow send a message to the bot, and it will reply with the chat_id. Complete the.envfileapp_port=8000protocol=httpbot_token=******************************chat_id=********Now with these 3 lines of code, newgrok is already running, enjoyfromnewgrokimportNewgrokngrok=Newgrok()ngrok.run()
Package: newgroundsdl
newgroundsdlDownloads all of the songs on a Newgrounds audio page.Usage: newgroundsdlAUDIO_PAGE_URLThis is a python package. You can install it with pip:pip3 install newgroundsdlYou can also use it as a library:import newgroundsdl
newgroundsdl...The source is fairly self-explanatory, so at this time I will not be writing documentation for the library
Package: new-guid
What isnew-guid?new-guidis a simple CLI command which returns a new, pseudo-random, GUID / UUID when called.Installationpip install new-guidORsudo snap install new-guid**Only valid on systems which support Ubuntu snaps.Usecwandrews@kmaster:~$new-guid1C778973-ACDB-4182-8BC2-C909348C899F
cwandrews@kmaster:~$
Package: newguy103-syncserver
newguy103-syncserverOverviewnewguy103-syncserveris a Python package designed to simplify file synchronization operations through a server-client architecture. The package provides both the server, built on Flask, and a client module for interacting with the server.Documentation can be found here:https://github.com/NewGuy103/syncServer/wikiInstallationpipinstallnewguy103-syncserverClient ModuleUsage:The SyncServer Client module offers three main classes:FileInterface: Handles file-related operations.DirInterface: Manages directory-related operations.APIKeyInterface: Manages API key-related operations.Example:fromsyncserver.clientimportFileInterface,DirInterfacefile_client=FileInterface(username="user",password="pass",server_url="http://localhost:8561")# Use provided methodsfile_client.upload([['~/Documents/my-file','/my-file']])dir_client=DirInterface(username="user",password="pass",server_url="http://localhost:8561")dir_client.create("/Docs")apikey_client=APIKeyInterface(username="user",password="pass",server_url="http://localhost:8561")apikey_client.create_key(key_name="Main-API-Key",key_permissions=['create'],key_expiry_date="2025-01-01 0:00:00")Server (Script)Usage:The server runs as a Flask application and handles file synchronization routes.$ python -m syncserver.server
$ syncserver-server
Enter database password [or empty if not protected]:You can change the port that the flask server listens on with theSYNCSERVER_PORTenvironment variable.exportSYNCSERVER_PORT=7009Routes:/upload: Upload files/modify: Modify files/delete: Delete files/restore: Restore deleted files/list-deleted: List deleted file versions/remove-deleted: Fully remove a deleted file/read: Read files/create-dir: Create directories/remove-dir: Remove directories/list-dir: List directory contents/api/create-key: Create an API key/api/delete-key: Delete an API key/api/list-keys: List API key namesNote:Ensure the server is running and accessible from the specified URL.Server (Module)Usage:The module allows you to interact withsyncserver.serverdatabases without using the frontend.Example:fromsyncserver.serverimportFileDatabasefile_stream=open('./file.txt','rb')# Initialize database connection to local database filefile_database=FileDatabase(db_path='./syncServer.db')file_database.add_file("user","/remote-file-path",file_stream)file_database.dirs.make_dir("user","/remote-dir-path")file_database.api_keys.create_key("user",['create'],"Main-API-Key","2025-01-01 0:00:00")Refer to the documentation for more information.Version1.1.0
Package: newhope-cffi
NewHope CFFINewHopeis a
key exchange protocol based on the Ring-Learning-with-Errors (Ring-LWE)
problem and a round 2 candidate submission in thePost-Quantum
Cryptography
Standardizationproject organised byNIST.This package provides tested, performantPython 3CFFI bindings to
theNewHope reference
implementationwith minor,
cautious adjustments for cross-platform compatibility.InstallationYou can install this package usingpipor the includedsetup.pyscript:# Using pip
pip install newhope-cffi

# Using setup.py
python setup.py installUsagefromnewhopeimportgenerate_keypair,encrypt,decryptfromsecretsimportcompare_digest# Alice generates a public keypublic_key,secret_key=generate_keypair()# Bob derives a secret (the plaintext) and encrypts it with Alice's public key to produce a ciphertextciphertext,plaintext_original=encrypt(public_key)# Alice decrypts Bob's ciphertext to derive the now shared secretplaintext_recovered=decrypt(secret_key,ciphertext)# Compare the original and recovered secrets in constant timeassertcompare_digest(plaintext_original,plaintext_recovered)LicenseBSD 3-Clause License

Copyright (c) 2018, Phil Demetriou
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package: newiotclient
newiotclientDescriptionMQTT client for iot.lonelyassistant.com, authentication using JWTUsageConfig[broker]
host = 0.0.0.0
port = 1883
tls  = False
;client_id: xxx-xxxx

[device]
product_key = LASS-xxxxxxxx
device_sn = xxxxxx
register_username = register-xxxxx
register_password = register-xxxxx
refresh_jwt_username = jwt-refresh-xxxxx
refresh_jwt_password = jwt-refresh-xxxxxSubscribe Topicimport time
from newiotclient.core import MqttJwtToken, JwtMqttClientSub

topic = 'xxxxxx/device/dt/001/LASS-xxxxxx/xxxxxx'


def on_message(m_client, userdata, msg):
    print('++++++ get message ++++++')
    print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))} {msg.payload.decode()}')
    print('++++++ do something here +++++++')


def run():

    def token_success(token):
        print('============================= get token =================================')
        sub = JwtMqttClientSub(topic=topic, on_message=on_message)
        sub.start()
        sub.join()

    mqtt_jwt_token = MqttJwtToken(config_ini='./dev.ini')
    mqtt_jwt_token.on_success = token_success
    mqtt_jwt_token.retrieving()


if __name__ == '__main__':
    run()Publish Topicimport time
from newiotclient.core import MqttJwtToken, JwtMqttClientPub

topic = 'xxxxxx/device/dt/001/LASS-xxxxxx/xxxxxx'


def token_success(token):
    print('============================= get token =================================')
    while True:
        payload = 'hello'
        sub = JwtMqttClientPub(topic=topic, payload=payload)
        sub.start()
        sub.end()
        sub.join()

        time.sleep(5)


def run():
    mqtt_jwt_token = MqttJwtToken(config_ini='./dev.ini')
    mqtt_jwt_token.on_success = token_success
    mqtt_jwt_token.retrieving()


if __name__ == '__main__':
    run()Issueshttps://github.com/laonan/newiot-pyclient/issues
Package: newjgreenepack
newjgreenepackNo description provided (generated by Swagger Codegenhttps://github.com/swagger-api/swagger-codegen)This Python package is automatically generated by theSwagger Codegenproject:API version: 1.0.0Package version: 0.12.1Build package: io.swagger.codegen.languages.PythonClientCodegenRequirements.Python 2.7 and 3.4+Installation & Usagepip installIf the python package is hosted on Github, you can install directly from Githubpipinstallgit+https://github.com//.git(you may need to runpipwith root permission:sudo pip install git+https://github.com//.git)Then import the package:importnewjgreenepackSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--user(orsudo python setup.py installto install the package for all users)Then import the package:importnewjgreenepackGetting StartedPlease follow theinstallation procedureand then run the following:from__future__importprint_functionimporttimeimportnewjgreenepackfromnewjgreenepack.restimportApiExceptionfrompprintimportpprint# create an instance of the API classapi_instance=newjgreenepack.PetsApi(newjgreenepack.ApiClient(configuration))try:# Create a petapi_instance.create_pets()exceptApiExceptionase:print("Exception when calling PetsApi->create_pets:%s\n"%e)Documentation for API EndpointsAll URIs are relative tohttp://petstore.swagger.io/v1ClassMethodHTTP requestDescriptionPetsApicreate_petsPOST/petsCreate a petPetsApilist_petsGET/petsList all petsPetsApishow_pet_by_idGET/pets/{petId}Info for a specific petDocumentation For ModelsErrorPetPetsDocumentation For AuthorizationAll endpoints do not require authorization.Author
Package: newlandface
typora-copy-images-to: uploadnewlandface[TOC]newlandface 是一个轻量级的人脸检测和多属性分析（年龄、性别、标签）分析工具，使用python语言，集成了部分开源库Dlib、mtcnn等工具，该库主要是基于Keras和TensorFlow来进行开发的。Installation 安装The easiest way to install newlandface is to download it fromPyPI.pipinstallnewlandface文件结构│  README.md
│  requirements.txt
│  setup.py
│├─newlandface
│  │  nlface.py
│  │init.py
│  ││  ├─basemodels
│  │  │  DeepID.py
│  │  │  DlibResNet.py
│  │  │  Facenet.py
│  │  │  FbDeepFace.py
│  │  │  OpenFace.py
│  │  │  VGGFace.py
│  │  │init.py
│  ││  ├─commons
│  │  │  distance.py
│  │  │  functions.py
│  │  │  realtime.py
│  │  │init.py
│  ││  ├─extendedmodels
│  │  │  Age.py
│  │  │  Emotion.py
│  │  │  Gender.py
│  │  │  Race.py
│  │  │init.py
│  ││  ├─models
│  │      face-recognition-ensemble-model.txt
│  │init.py
│└─tests
│  testFaceAttr_video.py
│  testFaceDetect_img.py
│  testFacePoints_img.py
│└─dataset
img1.jpg
img13.jpg
img14.jpg
...测试代码1.1 人脸检测代码fromnewlandfaceimportnlfaceimportcv2# 模型加载nlface.load_model()image=cv2.imread("./dataset/test1.jpg")# 人脸检测faceObjs=nlface.detect_face(image)# 显示人脸框iffaceObjsisnot0:foridx,rectinenumerate(faceObjs):image=nlface.show_face(image,rect)else:print("no face detect")os._exit(0)cv2.imshow("test",image)cv2.waitKey()1.2 人脸68点检测1.2.1 直接调用show_face_points函数进行显示核心函数：detect_face、show_face_pointsfromnewlandfaceimportnlfaceimportcv2cv2.namedWindow("test",0)# 模型加载nlface.load_model()image=cv2.imread("./dataset/test1.jpg")# 人脸检测faceObjs=nlface.detect_face(image)# 显示人脸框iffaceObjsisnot0:foridx,rectinenumerate(faceObjs):image=nlface.show_face_points(image,rect)else:print("no face detect")os._exit(0)cv2.imshow("test",image)cv2.waitKey()1.2.2 调用点检测模块，自行画图核心函数：detect_face、detect_points、show_facefromnewlandfaceimportnlfaceimportcv2cv2.namedWindow("test",0)# 模型加载nlface.load_model()image=cv2.imread("./dataset/test1.jpg")# 人脸检测faceObjs=nlface.detect_face(image)iffaceObjsisnot0:foridx,rectinenumerate(faceObjs):# 人脸68点检测points=nlface.detect_points(image,rect)# 显示人脸框、68点image=nlface.show_face(image,rect)fori,pointinenumerate(points):cv2.circle(image,(point[0],point[1]),2,(0,0,255),-1)cv2.imshow("test",image)cv2.waitKey(1)else:print("no face detect")os._exit(0)cv2.imshow("test",image)cv2.waitKey()1.3 人脸属性分析核心函数：detect_face、detect_points、show_face属性开放：emotion(表情)、age（年龄）、gender（性别）属性检测耗时标签类型emotion表情30ms['angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral']age年龄130ms1-100gender性别170mswoman、man注意：不同的模块耗时不一，所以如果调用摄像头的时候，要注意实时性上的要求。fromnewlandfaceimportnlfaceimportcv2cv2.namedWindow("test",0)# 模型加载nlface.load_model()image=cv2.imread("./dataset/test1.jpg")# 人脸检测faceObjs=nlface.detect_face(image)iffaceObjsisnot0:foridx,rectinenumerate(faceObjs):# 人脸属性分析actions=['emotion','age','gender']attribute=nlface.analyze(image,faceObjs[idex],actions=actions)# 显示人脸框\属性image=nlface.show_face(image,rect)image=nlface.show_face_attr(image,faceObjs[idex],attribute,actions)cv2.imshow("test",image)cv2.waitKey(1)else:print("no face detect")os._exit(0)cv2.imshow("test",image)cv2.waitKey()
Package: newlandface-r
newlandface_r修改了fjndfazp/newlandface的默认home路径问题等使用方法见https://github.com/fjndfazp/newlandface/blob/main/README.md不同:安装方式:pip install newlandface导入方式:from newlandface_r import nlface模型加载:nlface.load_model()需要一个字符串参数,是home路径(代替原版newlandface库默认的D:\newlandface)
Package: newmm-tokenizer
newmm-tokenizerStandalone Dictionary-based, Maximum Matching + Thai Character Cluster (newmm) tokenizer extracted fromPyThaiNLP.ObjectivesThis repository is created for reducing an overall size of originalPyThaiNLP Tokenizer Module. The main objective is to be able to segment Thai sentences into a list of words.SupportsThe module supports Python 3.7+ as follow the original PyThaiNLP repository.Installationpip install newmm-tokenizerHow to Usefromnewmm_tokenizer.tokenizerimportword_tokenizetext='เป็นเรื่องแรกที่ร้องไห้ตั้งแต่ ep 1 แล้วก็เป็นเรื่องแรกที่เลือกไม่ได้ว่าจะเชียร์พระเอกหรือพระรองดี 19...'words=word_tokenize(text)print(words)# ['เป็นเรื่อง', 'แรก', 'ที่', 'ร้องไห้', 'ตั้งแต่', ' ', 'ep', ' ', '1', ' ', 'แล้วก็', 'เป็นเรื่อง', 'แรก', 'ที่', 'เลือกไม่ได้', 'ว่า', 'จะ', 'เชียร์', 'พระเอก', 'หรือ', 'พระรอง', 'ดี', ' ', '19', '...']LICENSEPlease see the original license of PyThaiNLPhere