Saravanan666/pypi-org huggingface dataset:
Package: nginx-updater
nginx-updaterPython module updater that uses nginx as backendInstallationYou can install the package via pip:pipinstallnginx-updaterUsagefromnginx_updater.updaterimportcheck_for_updatesconfig=[{"name":"package","url":"https://static.example.com/package.tar.bz2","username":"username","password":"password","file_path":"dist/package.tar.bz2","extract_dir":"downloaded","exclude":[],},]check_for_updates(config,restart=False)LicenseThis project is licensed under the terms of the MIT license.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.ContactIf you want to contact me you can reach me atpradishbijukchhe@gmail.com.
Package: ngiridb
Ngiridbngiridb gives you simple asyncio support for a range of databases.It allows you to make queries using the powerfulSQLAlchemy Coreexpression language, and provides support for PostgreSQL, MySQL, and SQLite.ngiridb is suitable for integrating against any async Web framework, such asNgiriapi,Sanic,Responder,Quart,aiohttp,Tornado, orFastAPI.Documentation:https://www.ngiri.co.tz/ngiridb/Requirements: Python 3.7+Installation$pipinstallngiridbDatabase drivers supported are:asyncpgaiopgaiomysqlasyncmyaiosqliteYou can install the required database drivers with:$pipinstallngiridb[asyncpg]$pipinstallngiridb[aiopg]$pipinstallngiridb[aiomysql]$pipinstallngiridb[asyncmy]$pipinstallngiridb[aiosqlite]Note that if you are using any synchronous SQLAlchemy functions such asengine.create_all()oralembicmigrations then you still have to install a synchronous DB driver:psycopg2for PostgreSQL andpymysqlfor MySQL.QuickstartFor this example we'll create a very simple SQLite database to run some
queries against.$pipinstallngiridb[aiosqlite]$pipinstallipythonWe can now run a simple example from the console.Note that we want to useipythonhere, because it supports usingawaitexpressions directly from the console.# Create a database instance, and connect to it.fromngiridbimportDatabasedatabase=Database('sqlite+aiosqlite:///example.db')awaitdatabase.connect()# Create a table.query="""CREATE TABLE HighScores (id INTEGER PRIMARY KEY, name VARCHAR(100), score INTEGER)"""awaitdatabase.execute(query=query)# Insert some data.query="INSERT INTO HighScores(name, score) VALUES (:name, :score)"values=[{"name":"Daisy","score":92},{"name":"Neil","score":87},{"name":"Carol","score":43},]awaitdatabase.execute_many(query=query,values=values)# Run a database query.query="SELECT * FROM HighScores"rows=awaitdatabase.fetch_all(query=query)print('High Scores:',rows)Check out the documentation onmaking database queriesfor examples of how to start using ngiridb together with SQLAlchemy core expressions.
Package: ngi.theme.simple
IntroductionWe used to setup the logo and footer by the ZMI.
ngi.theme.simple is easy to setup the logo and footer using the control panel.Changelog1.0b6Fixed some bugs.1.0b5Fixed some bugs.1.0b4Fixed some bugs.1.0b3Fixed some bugs.1.0b2added logo size to registry.1.0b1change logo data store.1.0a1dev (unreleased)Initial release
Package: ngits-drf-sentry-tunnel
Olá!Setup1. Install using pip:pip install ngits-drf-sentry-tunnel2. Change yoursettingsfile:import os

...

INSTALLED_APPS = [
    ...
    "rest_framework",
    "sentry_tunnel"
]

...

SENTRY_HOST = "sentry.local"
SENTRY_PROJECT_IDS = ["4"]3. Add paths to yoururls.pyfile:from django.urls import path, include

urlpatterns = [
    ...
    path("", include("sentry_tunnel.urls"))
]Above example results:http://127.0.0.1:8000/tunnel/API endpoint URL
Package: ngits-tickets
Baseticketsapplication for Django projectsSetup1. Install using pip:pip install ngits-tickets2. Change yoursettingsfile:INSTALLED_APPS = [
     ...
     "rest_framework",
     "rest_framework.authtoken",
     "tickets"
 ]

 ...

 REST_FRAMEWORK = {
     "DEFAULT_AUTHENTICATION_CLASSES": [
         "rest_framework.authentication.TokenAuthentication",
     ],
     # Optional path to custom TextChoices class
     "DEFAULT_SCHEMA_CLASS": "myapp.consts.MyTypes",
 }

...

 # Optional
 TYPE_CHOICES_PATH = "path.to.MyCustomTypeChoices"3. Create custom ticket types (optional):./consts.pyfrom django.db.model import TextChoices

class MyTypes(TextChoices):
    foo = "foo"
    bar = "bar"4. Add paths to yoururls.pyfile:from django.urls import path, include

urlpatterns = [
    ...
    path("/", include("tickets.urls")),
]5. Run migrations:py manage.py migrate6. Optionalredocconfiguration:pip install drf-spectacular==0.23.*settings.py:INSTALLED_APPS = [
    ...
    "drf_spectacular"
]

SPECTACULAR_SETTINGS = {
    "TITLE": "<proj_name> API",
    "VERSION": "1.0.0",
}

TEMPLATES = [
    ...
    'DIRS': [ BASE_DIR / "templates"],
    ...
]../<django_project>/templates/redoc.html:<!DOCTYPE html>
<html>
    <head>
        <title>ReDoc</title>
        <!-- needed for adaptive design -->
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
        <!-- ReDoc doesn't change outer page styles -->
        <style>
            body {
                margin: 0;
                padding: 0;
            }
        </style>
    </head>
    <body>
        <redoc spec-url='{% url schema_url %}'></redoc>
        <script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
    </body>
</html>
Package: ng.kit
[name:недописано]- Checkbox "Use register" added into ng.kit.fixintid form.* Sat Jul 05 2008 Andrey Orlov <dbdt@dreambot.ru> 0.0.2- Tool "interfaceswither" added* Wed Jan 30 2008 Andrey Orlov <dbdt@dreambot.ru> 0.0.1- first official release
Package: ng.lib
Short module description=========================Module pd.lib content some simple modulesand fucntions for use in Zope.Description of modules----------------------ng.lib.interface................The module to provide different small tools to deal with interfaces in Zope.Function provided by module followed:implementsFunction implements must be issued with interfaces as arguments.As original zope.interface.implements, our function make contextclass provided  this interfaces. In difference from original function,our implementation added for each field of each interface name attributeof FieldProperty type.ng.lib.editannotationnotify...........................The module provided mix-in for use in editform directive. Mix-in sendobject-modifyed notify despite using adapter to edit content. Some samplefollowed::<editformschema="..interfaces.IDictAnnotation"for="..interfaces.IDictAnnotationAble"label="Dictionary"class="ng.lib.editannotationnotify.EditAnnotationNotify"name="dictannotation.html" permission="zope.ManageContent"menu="zmi_views" title="Dictionary"/>In this case editform sent object-moodifyed notify on context whenannotation modufied thro adapter.ng.lib.dynamicdefault.....................The module provide fields factory DynamicDefault. Thr factory allow use run-time computed default valuefor fields, inherited from Field. Sample followed:from zope.interface import Interfacefrom zope.schema import Datetimefrom ng.lib.dynamicdefault.DynamicDefaultclass IA(Interface) :""" Sample Interface """created = DynamicDefault(DateTime,title = u'Date/Time',description = u'Date/Time',default = datetime.datetime.today,required = True)ng.lib.simplevocabulary.......................The module provide SimpleVocabulary class. The class reimplement somemethods from zope.schema.vocabulary.SimpleVocabulary to avoid troublesduring treatment of unicode strings with national chars.[name:недоделано]* Sun Jul 12 2009 Andrey Orlov <dbdt@dreambot.ru> 0.0.8- RegistryVocabulary added- UtilityVocabulary added- IndexVocabulary added* Wed Feb 11 2009 Andrey Orlov <dbdt@dreambot.ru> 0.0.7- The Order provider and viewlet base added- The Content Constraint gear added* Wed Oct 08 2008 Andrey Orlov <dbdt@dreambot.ru> 0.0.6- The simplevocabulary module added.* Tue Jul 01 2008 Andrey Orlov <dbdt@dreambot.ru> 0.0.5- The dynamicdefault module added, Special thanks to Anatoly Bubenkov<bubenkoff@gmail.com> to some discussions.* Wed Jan 30 2008 Andrey Orlov <dbdt@dreambot.ru> 0.0.4- The walk module added* Mon Jan 21 2008 Andrey Orlov <dbdt@dreambot.ru> 0.0.3- The editannotationnotify module added.- The objectwidget module added.* Fri Nov 30 2007 Andrey Orlov <dbdt@dreambot.ru> 0.0.2- Field detection rules changed. Special thanks to Anatoly Bubenkov<bubenkoff@gmail.com> to advice.* Fri Nov 30 2007 Andrey Orlov <cray@neural.ru> 0.0.1- first official release
Package: nglpy
A Python wrapped version of the [Neighborhood Graph Library
(NGL) developed by Carlos Correa and Peter Lindstrom.Given a set of arbitrarily arranged points in any dimension, this library is
able to construct several different types of neighborhood graphs mainly focusing
on empty region graph algorithms such as the beta skeleton family of graphs.Installationpip install nglpyUsageThen you can use the library from python such as the example below:import nglpy
import numpy as np

point_set = np.random.rand(100,2)
max_neighbors = 9
beta = 1

aGraph = nglpy.EmptyRegionGraph(max_neighbors=max_neighbors, relaxed=False, beta=beta)
aGraph.build(point_set)

aGraph.neighbors()
Package: ngl-resum
ngl_resumThis package is used to resum non-global logarithms at leading logarithmic accuracy.If you use this code, please citedoi:10.1007/JHEP09(2020)029Documentation and ExamplesWe suggest using the following notebooks in Binder:The package ngl_resum:Example of the resummation of non-global logarithms of a rapidity gap, starting from a single color dipole:Example of the resummation of non-global logarithms of a rapidity gap, starting from a Les Houches Event File:We also invite you to download the example codes fromhttps://github.com/MarcelBalsiger/ngl_resum/tree/master/examples.
Package: nglui
This package offers a set of tools designed to ease the programmatic generation of Neuroglancer states and close the loop between analysis and data exploration. The key tool is the notion of a StateBuilder that is easily configured to map dataframes into neuroglancer states. See theexample notebookfor what it can do an how it can simplify the process of making neuroglancer states, including setting annotations, segmentations, colors, tags, and more. It's also designed to operate easily withDashDataFrameto interactively explore complex data.All code in the 'nglite' submodule is stripped down from v1.1.6 of the 'neuroglancer' python module from the fantasticNeuroglancersuite by Jeremy Maitin-Shepard from the Google connectomics team. Anything that works is their fault, anything that doesn't is ours. Please do not use this as a replacement for neuroglancer on pypi, which has more capabilities, albeit more sensitive installation procedures, than are needed for this work.
Package: ng-mini
ng-mini=======一个利用rrdtool，yaml的集绘图，采集汇报的程序.单独驻守在服务器上，简单配置下yaml文件，就可以轻松的采集数据并汇报给你想要汇报的地方我们公司（CC）的NG很牛逼，信息采集画图很不错，不过是内部的东西，而且很大一部分是C写的，也看不到源码，所以大致根据效果，利用十一在家的时间写了这么一个程序ng-mini(因为最近想给媳妇买个ipad-mini,所以就想到了名字里面加个mini)。###一、实现功能信息采集，例如你想采集带宽信息，内存，磁盘，CC，只要你能写出这样的程序或者命令，放到yaml文件的CmdLine后面，那么信息的采集就交给ng-mini 吧，而且你不用再使用crontab 了（当然也可以结合者来）画图，自定义颜色，画图方式，是否要合并信息汇报，类似saltstack的retuner,发送给服务端（数据库，NoSQL）,供你进行进一步的处理（告警，数据分析等）（PS:待完善）自带web展示，基于微型web框架（你要弄个django怎么对得器mini这个字呢，哈哈）bottle.py,就一个文件。前端基于yahoo的pure 框架就一个CSS文件，一切都是要对得起mini这个字啊###二、程序依赖####1、python版本因为这里面的bottle.py 是依赖python2.5或者以上，所以我们原则上也是这样####2、python额外的库文件PyYAML####3、rrdtool （命令行下）其它的暂时不依赖了###三、程序安装centos 5.x 6.xwget -O – http://www.chenqing.org/soft/install-centos.sh |bashubuntu 13.4 (我这测试了这个版本)sudo wget -O – http://www.chenqing.org/soft/install-ubuntu.sh |bash下一步打算提交到epel源以及ubuntu的仓库中###四、程序启动service ng-client start###五、查看web界面http://yourip:65533github:https://github.com/chenqing/ng-mini###六、demo地址：http://www.chenqing.org:65533/mini
Package: ng_nx
Manipulation of graphs in NebulaGraph using the NetworkX API.Documentation:https://github.com/wey-gu/nebulagraph-nx#documentationSource Code:https://github.com/wey-gu/nebulagraph-nxNebulaGraph NetworkX (ng_nx) is a tool that allows you to use the NetworkX API for manipulating graphs in NebulaGraph. It makes it easy to analyze and manipulate graphs using NebulaGraph's advanced capabilities while still using the familiar NetworkX interface. In short, ng_nx bridges the gap between NebulaGraph and NetworkX.Quick StartInstallpipinstallng_nxRun Algorithm on NebulaGraphfromng_nximportNebulaReaderfromng_nx.utilsimportNebulaGraphConfigimportnetworkxasnxconfig=NebulaGraphConfig()reader=NebulaReader(space="basketballplayer",edges=["follow","serve"],properties=[["degree"],["start_year","end_year"]],nebula_config=config,limit=10000)g=reader.read()pr=nx.pagerank(g,alpha=0.85,max_iter=100,tol=1e-06,weight='degree')importcommunityascommunity_louvainug=g.to_undirected()louvain=community_louvain.best_partition(ug)Write Result to NebulaGraphCreate Schema for the result writingCREATE TAG IF NOT EXISTS pagerank (
    pagerank double NOT NULL
);

CREATE TAG IF NOT EXISTS louvain (
    cluster_id int NOT NULL
);fromng_nximportNebulaWriterpr_writer=NebulaWriter(data=pr,nebula_config=config)# properties to writeproperties=["pagerank"]pr_writer.set_options(label="pagerank",properties=properties,batch_size=256,write_mode="insert",sink="nebulagraph_vertex",)# write back to NebulaGraphpr_writer.write()# write louvain resultlouvain_writer=NebulaWriter(data=louvain,nebula_config=config)# properties to writeproperties=["cluster_id"]louvain_writer.set_options(label="louvain",properties=properties,batch_size=256,write_mode="insert",sink="nebulagraph_vertex",)louvain_writer.write()DocumentationAPI Reference
Package: ngobot-json
SIMPLE PYTHON JSON FORMATThe repository contain a script to format your python response in a correct JSON format using the standard HTTP response codes. Well suitable to backend applications with REST API building concept in mind.Install the ngobot-json packagepip install ngobot-jsonimport the ngobot-json packagefrom ngobot_json.pyresponse import JsonResponse1. Success Responseyou can simply return json successful response format in this way.e.g.`response = JsonResponse()print(response.Success())
`Output:{ "status":200, "message":"Successful", "data":{ "status":200, "message":"ok", "reason":"Successful" } }You can modify the json success response format by passing two arguments: (1) the data to return as response and (2) the keyword indicator "success" to activate success response format.e.g. User Account Created.`task = "User Account successfully created"response = JsonResponse(task, "success")print(response.Created())`Output:{ "status":201, "message":"Created Successfully", "data":{ "status":200, "message":"ok", "reason":"User Account successfully created" } }e.g. Process completed successfully`task = "The Process is successfully completed"response = JsonResponse(task, "success")print(response.Success())`Output:{"status": 200, "message": "Successful", "data": {"status": 200, "message": "ok", "reason": "The Process is successfully completed"}}2. Error ResponseThe error response follows the same pattern of the success modify response, but has a different keyword argument "error" to activate the error response format:e.g.`task = "Invalid username and password"response = JsonResponse(task, "error")print(response.Unauthorized())`Output:{ "status":401, "message":"Unauthorized", "data":{ "status":422, "message":"Unprocessable Entity", "reason":"Invalid username and password" } }3. Adding External json return from another function or database.note that in this section we use keyword "data" to activate the json format with external json file.e.g.`task = {
"status":201,
"message":"Created Successfully",
"data":{
"status":200,
"message":"ok",
"reason":"User Account successfully created"
}
}response = JsonResponse(task, "data")print(response.Success())`Output:{"status": 200, "message": "Successful", "data": {"status": 201, "message": "Created Successfully", "data": {"status": 200, "message": "ok", "reason": "User Account successfully created"}}}4. List of All the supported HTTP codes functions to call.comming soon.
Package: ngocbien-analysis
Đây là công cụ giúp so sánh phân bố giữa 2 dataset theo từng biến riêng rẽ. Tất cả các hình vẽ ssau đó
sẽ được lưu lại trong directory mặc định là 'your_current_working_directory/data1_data2/picture/'Ví dụfromngocbien_analysisimportDistributionPlotplot=DistributionPlot(data1,data2).plot2data()Với câu lệnh trên, tất cả các biến sẽ đc so sánh, visualize và lưu vào directory như trên.fromngocbien_analysisimportDistributionPlotDistributionPlot(data1,data2,nmax=9,label=['data1','data2'],is_save=True).plot2data()Ta có một số key paramater như sau:nmax : Số hình vẽ tối đa trong 1 khung hình, ở đây 9 tức ta sẽ có 3x3 hình trong 1 pictures.
Nếu bạn có quá nhiều biến bạn có thể chọn là 16, hay chọn là 3 trong trường hợp ngược lại.is_save : Mặc định là True để lưu hình vẽ vào folder trên.label: mặc định là data1 và data2, bạn có thể thay đổi để phù hợp, ví dụ good, bad, các label này
được dùng làm legend trong hình vẽ và tạo ra tên folder chứa các hình vẽ đó.Ngoài ra, ta có thể chỉnh độ sáng, màu sắc, và nhiều lựa chọn khác cho các hình vẽ này bằng cách
chỉnh các tham số dưới đây.classDistributionPlot:def__init__(self,data1,data2=None,is_save=True,**kwargs):self.data1=data1self.data2=data2self.nmax=9self.label=['data1','data2']self.num_types=['float32','float64','int16','int32','int64','bool','int8']self.is_save=is_saveself.alpha=[.6,.4]self.width=.9self.wspace=.15self.hspace=.25self.disable_xticks=Falseself.disable_yticks=TrueNhư vậy ta có thể thay đổi các tham số mặc định, ví dụ như:fromngocbien_analysisimportDistributionPlotplot=DistributionPlot(data1=data1,data2=data2)plot.label=['good','bad']plot.nmax=4plot.plot2data()Các dự định  tiếp theo:Visualize đơn biến cho 1 dataset.Xây dựng 1 hàm để lựa chọn ra top các features có phân bố khác biệt nhất giữa
2 tập data set. Việc này giúp quá trình phân tích tốt hơn trong trường hợp có quá nhiều features.Xây dựng một số các công cụ  phân tích đa biến. Công cụ này có thể tích hợp công hợp công cụ
test để chỉ lọc ra các phân tích giá trị để visualize, giúp các phân tích có chất lượng tốt hơn.
Package: ngoci
Utilities for continuous integration, development workflow, and package managementFree software: GNU General Public License v3Installationpip install ngociDocumentationhttps://python-ngoci.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.1.0 (2018-06-14)First release on PyPI.
Package: ngoschema
DescriptionI’m Cedric ROMAN.ngoschemaaims at automate the building of classes based on aJSON schema.User can declare all class attributes in a schema (along with their type, default
value) and the class will be built with accessors to check and validate data.User can add methods and override setters/getters, but the library provides a
boiler plate to automatically create the class, nicely instrumented (with loggers,
exception handling, type checking, data validation, serialization, etc…).The classbuilder allows to easily load definitions based on a canonical name and a namespace.Instance of these classes can be iterated and behave as standard collections.ngoschemaaims at being a toolkit for Domain-Driven Design and Model-Driven Architecture.The library is build on top ofpython-jsonchema, a python
implementation for JSON schema validation.Free software: GNU General Public License v3Changelog0.1.0 (2018-06-04)First release on PyPI.
Package: ngptbot
Simple Wrapper For The ChatGPT APIThis module is designed for asynchronous usage and provides a simple interface to the OpenAI ChatGPT API.It also provides a command-line interface for interactive usage.While it does provide synchronous methods, it is recommended to use the asynchronous methods for better performance.Installationpipinstall-UngptbotUsageCommand LineConfigurationgptbotrequires a model and an API key to be set.You can use config file, command parameters or interactive input to set these values.By default,gptbotwill look for files namedconfig.jsonandsession.jsonin the user config and cache directory.gptbot-c/path/to/config.json# Use a config filegptbot-m"gpt-3.5-turbo"# Set model, input API key interactivelygptbot-k/path/to/config.json# create config fileParameters-c,--config: Path to a JSON file-m,--model: Model name-k,--create-config: Create a config file interactively-s,--session: Session history file-V,--version: Show versionPrecedence: Interactive input > Command parameters > Config fileInteractive ModeThis mode mimics a chat interface. You can type your message and get a response.Commands are started with a/and arecase-sensitive./exit: Exit the program/save <path>: Save the session history to a file/load <path>: Load a session history from a file/rollback <step>: Rollback to the previous state/clear: Clear the session history/role: Switch role/model: Switch model/tokens: Show used tokens/help: Show helpTo embed an image, insert#image(<url>)in your message.
Use double#to escape embedding.awaitbot.send("""What are these?#image(https://example.com/image.png)#image(file:///path/to/image.png)#image(base64://<base64-encoded-image>)""")All URLs will be downloaded and embedded as base64-encoded images.APIimportasyncioimportgptbotbot=gptbot.Bot(model="gpt-3.5-turbo",api_key="your-api-key")asyncdefmain():response=awaitbot.send("Hello, how are you?")print(response)asyncforrinbot.stream("I'm fine, thank you."):print(r,end='')asyncforresinbot.stream_raw("What is the answer to life, the universe, and everything?"):"""stream_raw returns a stream of `FullChunkResponse`.It contains all raw data from the API."""bot.send_sync("Goodbye!")# Synchronous version of `send`# Bot class is stateless, to keep track of the conversation, use the `Session` classsession=bot.new_session()# You can use session just like the botasyncforrinsession.stream("Hello!"):print(r,end='')print(awaitsession.send("Goodbye!"))asyncio.run(main())
Package: ngpuinfo
NGPUInfoInstallpip install ngpuinfoDescriptionThis package usesnvidia-smito get gpu information, so it only support nvidia gpus, and thenvidia-smimust be in
system path.Get startfromngpuinfoimportNGPUInfoprint(NGPUInfo.NUMBERS)print(NGPUInfo.CUDA_VERSION)gpus=NGPUInfo.list_gpus()forgingpus:print()print(g.id)print(g.name)print(g.mem_info())Usagegpu=NGPUInfo.list_gpus()[0]gpu.mem_total()# total mem of gpu, realtime refresh, the unit is Bytegpu.mem_used()# used  mem of gpu, realtime refresh, the unit is Bytegpu.mem_free()# free  mem of gpu, realtime refresh, the unit is Byte