Saravanan666/pypi-org huggingface dataset:
Package: nest-helper
Installationinstall aspippipinstallnest-helper==1.1.2Usage生成 uuid:syntax: generate_uuid(fmt:str='-') -> int:param: fmt 替换的字符串:return: string>>>frompyhelper.helperimportgenerate_uuid>>>print(generate_uuid())>>>"c294bfab-5249-4c01-8e38-02f7957afdfa">>>print(generate_uuid(fmt=''))>>>"2204d86f2815482c83d697acd0b36c16"生成11位的唯一识别码:syntax: generate_unique_id() -> str:return: string>>>frompyhelper.helperimportgenerate_unique_id>>>print(generate_unique_id())>>>"78LM0XLpnpv"生成自定义位数的随机字符串:syntax: generate_rnd_string(n:int=6, fmt:str='O') -> str:param: n 生成的字符串的位数:param: fmt 最终生成的字符串样式L:全部小写;U:全部大写;N:全部数字;O: 随机字符串:return: string>>>frompyhelper.helperimportgenerate_rnd_string>>>print(generate_rnd_string())>>>"w9y5Yk">>>print(generate_rnd_string(n=10))>>>"T65rZduWMC">>>print(generate_rnd_string(n=10,fmt="U"))>>>"BHDQBEAEJZ"生成雪花id:syntax: snow_flake(datacenter_id: int = 1, worker_id: int = 1, sequence: int = 0) -> int:param datacenter_id:  数据中心（机器区域）ID:param worker_id:  机器ID:param sequence: 序列号:return: int>>>frompyhelper.helperimportsnow_flake
>>>print(snow_flake())>>>1448838354849370112>>>print(snow_flake(1,2,0))>>>1448838475976679424url 编码:syntax: url_encode(url:str) -> str:param url: 需要编码的url:return: string>>>frompyhelper.helperimporturl_encode>>>url="https://baidu.com?a=1&b=2">>>print(url_encode(url))>>>"https%3A//baidu.com%3Fa%3D1%26b%3D2"url 解码:syntax: url_decode(url:str) -> str:param url: 需要解码的url:return: string>>>frompyhelper.helperimporturl_decode>>>url="https%3A//baidu.com%3Fa%3D1%26b%3D2">>>print(url_decode(url))>>>"https://baidu.com?a=1&b=2"jwt 编码:syntax: jwt_encode(raw: dict, secret:str, expire: int = 7200) -> str:param raw: 需要编码的数据:param secret: 密钥:param expire: 有效时间,默认7200秒:return: 返回编码后的数据>>>frompyhelper.helperimportjwt_encode>>>raw={"uid":"123456"}>>>print(jwt_encode(raw,secret='3ndbwa4GYr',expire=7200))>>>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiIxMjM0NTYiLCJleHAiOjE2MzQ1MTc1NDh9.Mtn-o9wtx-AsvpEXqQx8XQ_AFd7-EsRMHjGED1fcq34"jwt 解码:syntax: jwt_decode(raw: str, secret: str) -> dict:param raw: 需要解码的数据:param secret: 密钥:return: 返回的数据>>>frompyhelper.helperimportjwt_decode>>>raw="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiIxMjM0NTYiLCJleHAiOjE2MzQ1MTc1NDh9.Mtn-o9wtx-AsvpEXqQx8XQ_AFd7-EsRMHjGED1fcq34">>>print(jwt_decode(raw,secret="3ndbwa4GYr"))>>>{"uid":"123456"}
Package: nestifydict
nestifydictA tool for parsing structured data (primarily nested dictionaries from json files). In particular it can flatten dictionaries, map flattened dicts to a template, and recursively get/set elements in nested dictionaries without a priori knowledge of the structure.Please see ourDocumentation,Github source code,
and install fromPyPiCitationIf you are using this in your work, please cite as@misc{beard2022irl_gym,
    author = {Beard, Jared J.},
    title = {NestifyDict: A tool for parsing structured data},
    year = {2022},
    publisher = {GitHub},
    journal = {GitHub repository},
    howpublished = {\url{https://github.com/jaredjbeard/nestifydict}},
}
Package: nesting
This module is a Python port of thenest operatorfrom Mike Bostock’sd3.js.Nest allows elements in an array to be grouped into a hierarchical tree structure;
think of it like the GROUP BY operator in SQL, except you can have multiple levels of
grouping, and the resulting output is a tree rather than a flat table. The levels in
the tree are specified by key functions. The leaf nodes of the tree can be sorted by
value, while the internal nodes can be sorted by key. An optional rollup function will
collapse the elements in each leaf node using a summary function. The nest operator
(the object returned by d3.nest) is reusable, and does not retain any references to the
data that is nested.For example, consider the following tabular data structure of Barley yields, from
various sites in Minnesota during 1931-2:>>> yields = [
    {"yield": 27.00, "variety": "Manchuria", "year": 1931, "site": "University Farm"},
    {"yield": 48.87, "variety": "Manchuria", "year": 1931, "site": "Waseca"},
    {"yield": 27.43, "variety": "Manchuria", "year": 1931, "site": "Morris"},
    {"yield": 43.07, "variety": "Glabron",   "year": 1931, "site": "University Farm"},
    {"yield": 55.20, "variety": "Glabron",   "year": 1931, "site": "Waseca"},
    {"yield": 16.18, "variety": "Glabron",   "year": 1932, "site": "University Farm"},
]To facilitate visualization, it may be useful to nest the elements first by year, and then by variety, as follows:>>> from nesting import Nest
>>> (Nest()
...     .key( lambda d: d['year'] )
...     .key( lambda d: d['variety'] )
...     .entries(yields))Or more concisely:>>> (Nest()
...     .key('year')
...     .key('variety')
...     .entries(yields))…as both thekeyandpropfunctions will interpret non-callables as they key to look up.This returns a nested array. Each element of the outer array is a key-values pair, listing the values for each distinct key:[   {"key": 1931, "values": [
        {"key": "Manchuria", "values": [
            {"yield": 27.00, "variety": "Manchuria", "year": 1931, "site": "University Farm"},
            {"yield": 48.87, "variety": "Manchuria", "year": 1931, "site": "Waseca"},
            {"yield": 27.43, "variety": "Manchuria", "year": 1931, "site": "Morris"}, ]},
        {"key": "Glabron", "values": [
            {"yield": 43.07, "variety": "Glabron", "year": 1931, "site": "University Farm"},
            {"yield": 55.20, "variety": "Glabron", "year": 1931, "site": "Waseca"}, ]},
    ]},
    {"key": 1932, "values": [
        {"key": "Glabron", "values": [
            {"yield": 16.18, "variety": "Glabron", "year": 1932, "site": "University Farm"}, ]},
    ]},
]The nested form allows easy iteration and generation of hierarchical structures in SVG or HTML.–This port is open-source, freely licensed under theMIT License.
Package: nestingnote
InstallationWindowsDownloadLinux (varies per distro)Install Python3sudo apt install python3Install pip for Python3install nestingnotepython3 -m pip install nestingnotecreate alias (for convenience)echo "alias nestingnote='python3 -m nestingnote'" >> ~/.bash_aliases
source ~/.bash_aliaseesExecutionpython3 -m nestingnote \path\to\my\notesControlsMost controls are intuitive, e.g., all printable keys insert that character, arrow keys, home, end, page up, and page down all move the cursor appropriately. However, there are a few special controls introduced by nestingnote:Tab: at the beginning of a line will indent the line, starting an inner nested list. Within the line, tab will split the line into fields similar to columns in a matrix.Ctrl+k: toggles whether the current item in the nested list is collapsed, meaning that all items nested beneath it are hidden.Ctrl+w: save the edits
Package: nestipy
DescriptionNestipy is a Python framework built on top of Litestar that follows the modular architecture of NestJSUnder the hood, Nestipy makes use ofLitestar, but also provides compatibility with a wide range of other libraries, likeFastAPI, allowing for easy use of the myriad of third-party plugins which are available.Getting startedpip install nestipy
    nestipy new my_app
    cd my_app
    python main.py├── src
    │    ├── __init__.py
    ├── app_module.py
    ├── app_controller.py
    ├── app_service.py
    ├── main.py
    ├── requirements.txt
    ├── README.mdIssuesPlease make sure to read theIssue Reporting Checklistbefore opening an
issue. Issues not conforming to the guidelines may be closed immediately.SupportNestipy is an MIT-licensed open source project. It can grow thanks to the sponsors and support from the amazing backers.
If you'd like to join them, pleaseread more here.Stay in touchAuthor -Tsiresy MilaLicenseNestipy isMIT licensed.
Package: nest-joblib
nest-joblibPatch joblib to allow nested parallelism.InstallationInstall this via pip (or your favourite package manager):pipinstallnest-joblibUsagefromnest_joblibimportapplyapply()With the above code, LokyBackend supports nested-parallelism.Advanced UsageThe following joblib specification of not doing nested-parallelism may be inefficient in an environment with sufficient memory.joblib/_parallel_backends.py:defget_nested_backend(self):"""Backend instance to be used by nested Parallel calls.By default a thread-based backend is used for the first level ofnesting. Beyond, switch to sequential backend to avoid spawning toomany threads on the host."""nesting_level=getattr(self,'nesting_level',0)+1ifnesting_level>1:returnSequentialBackend(nesting_level=nesting_level),Noneelse:returnThreadingBackend(nesting_level=nesting_level),NoneAfter callingnest_joblib.apply(), whenjoblib.parallel.register_parallel_backend(name, backend)is called, a subclass ofbackendwith modifiedget_nested_backendis dynamically generated and registered with the namef"nested-{name}".fromjoblib.parallelimportparallel_backendfromnest_joblibimportapplyfromray.util.joblibimportregister_ray# use LokyBackendapply()# use DaskDistributedBackendapply()parallel_backend("nested-dask")# use RayBackendapply()register_ray()parallel_backend("nested-ray")# use custom backendfromjoblib.parallelimportLokyBackendapply()classMyBackend(LokyBackend):passregister_parallel_backend("custom",MyBackend)parallel_backend("nested-custom")Contributors ✨Thanks goes to these wonderful people (emoji key):34j💻🤔📖This project follows theall-contributorsspecification. Contributions of any kind welcome!
Package: nestle-mynest
Modules for Laser CuttingThis is a repository containing certain modules required for laser cutting. The code is completely written in python.Following are the modules currently present:1. Formation of Shapes2. Detection of shapes from a .DXF and .svg file or any image(.png, .jpeg or .tiff) file format3. Nesting of ShapesFollowing are the modules to be added:4. Path-planning & the options of lead-in and lead-out5. Conversion of machine codeBrief:1. Formation of Shapes:i) The dimensions of shapes are to be entered as the input in the code.ii) The code forms the shape by doing simple mathematical calculations and gives the output in the form of coordinates.2. Processing of .DXF file:i) Shapes from the drawing file will be extracted by detecting the individual entities like Polyline, Line, Arc, Circle.ii) Coordinates are extracted by geometrical calculation on the shapes.3. Detection of shapes from a .svg file or any image(.png, jpeg or tiff) file formati) An image is to be provided as the input to let the code detect the shapes. If the file is in ".svg" format, it is first converted to ".png" format. The edges of the shapes are detected using canny operator.ii) After the detection of shapes from an image, the coordinates of the detected shapes are fetched.4. Nesting of Shapes:i) The shapes get automatically nested once we provide the coordinates of the shapes which are entered.  More about the nesting is available below in the form of a flowchart.ii) Nesting is a combination of the following approaches:a) Bottom-Left approach b) DJD Heuristic approachThese are the images of nested shapes from the Drawing file(.DXF) as file source:Here are the images of nested shapes from the image as file source:These are the images depicting contour detection in the cases of images given as inputs:Flowchart for the modules created presently:1) Flow chart for extraction of coordinates and/or creation of shapes:2) Flow chart for nesting of the extracted coordinates from image as file source:3) Flow Chart for Contour Detection from an image to extracting shape coordinates:NOTE:Following packages need to be installed for proper usage of this nesting module: 1. ezDXF 2. cv2 2. matplotlib 4.svglib 5.reportlab 6.math 7.timeTo-do list:Optimisation of nesting by adding more functions for distancesCreating the library for the nesting code
Package: nest-list-print
Print Nesting or Normal ListsThis module provides a function named "print_lol" to print out each independent
list item within a nesting or normalPythonlist.FeaturesPrint out list with / without nesting components;Indent when a nesting component is found;Indent as many as user wants;Save data into file.Revision HistoryRevisionDescription1.0.0Initial Release1.0.1Add README.md1.0.2Add Markdown Support1.0.3Fix SetupTools Markdown Support Bug1.0.4Nesting list indent support1.0.5Add the functionality to save data to file1.0.6Fix parameter problem - sys.stdoutNOTE: This is a non-commercial package for just learning purpose.
Package: nestlog
Welcome to Nestlognestlog is a formatted shell logger for producing colored tree like logs.See theDocumentationfor more help.InstallationFromPyPIdirectly:pip install nestlogExamplesThis is how you use the loggerimportnestloglogger=nestlog.NestLogger()withlogger('starting application'):withlogger('starting section 1'):logger.okay('doing something important')logger.warn('warning message')logger.fail('failure message')withlogger('starting section 1'):logger.okay('doing something important')logger.okay('doing something else important')
Package: nest-logger
Installationinstall aspippipinstallnest-logger==1.1.0Usage导包并进行赋值操作:param path: 日志存储的路径,绝对路径, 必填:param level: 日志等级 ，默认info:param rotation: 每天几点新增日志, 默认 00:00分割日志:param retention: 日志保留最长时间, 默认7天:param compression: 日志压缩格式，默认zip:param traceback: 回溯日志, 默认True>>>frompyloggerimportlogger
>>>log=logger.logrecord("/var/logs/nest")使用日志>>>log.info("this is info test")>>>log.debug("this is debug test")
Package: nestmux
Nestmux - Run nested tmux sessions with easeRunning nested sessions oftmuxis a bit of a hassle.nestmuxis here to make it easier.Installationpip install nestmuxUsageThe first invocation ofnestmuxwill create a newtmuxsession with the prefix keyC-h.Invokingnestmuxagain inside the first session will create a nested session with the prefix keyC-n.Invokingnestmuxagain inside the second session will create a second nested session with the prefix keyC-b.Configurationnestmuxis configured with a json file located at~/.config/nestmux/nestmux.json. The default configuration is{
	"prefixes": ["C-h", "C-n", "C-b"],
	"socket_name": "NESTMUX"
}prefixesis an arbitrarily long ordered list of prefix keys, where the first element will be the prefix key for the first nesting level and so on. The length of this list controls the maximum nesting depth.socket_nameis the name of thetmuxsocket. There's rarely a point in setting this to anything other than the default.Things to fixReplaceattach_sessionwith a function replaces the current python process with thetmuxprocess we attach to, instead of adding thetmuxprocess as a child process of the current python process.Add a video to the README.Change to TOML for configNicer error messages.Command to validate config.Command to show config.
Package: nes-torch
Minimal PyTorch Library for Natural Evolution StrategiesRequirementsnumpy
torchOptionalgym # For gym examples
mpi4py # For parallelizationTo installmpi4pyyou needMPIinstalled in the system.
Check:https://mpi4py.readthedocs.io/en/stable/install.htmlA Dockerfile is provided for convenience.Installationpipinstallnes-torch--userDocumentationhttps://nestorch.readthedocs.io/UsageSeehttps://github.com/goktug97/nes-torch/blob/master/examplesCheck documentation orhttps://github.com/goktug97/nes-torch/blob/master/nes/config.pyfor parameters.You can run the example withPYTHONPATH="$(pwd):$PYTHONPATH"pythonexamples/example.pyor in parallel for faster training.PYTHONPATH="$(pwd):$PYTHONPATH"mpirun--np2pythonexamples/example.py
Package: nestpay
nestpay odeme sistemi ucun modulfrompayment.nestpayimportNestPayfrompayment.utilsimport*fromdjango.httpimportHttpResponsefromdjango.views.decorators.csrfimportcsrf_exemptdefpayment(request):......temp=NestPay(clientId='',# bank terefinden veriliramount='',# mebleg : 1.00 aznoid='',# order id unikdiokUrl='',# callback url success den sonra bura post gonderilirfailUrl='',# error urlrnd=microtime(),storekey='2',# bank terefinden verilirstoretype='',# bank terefinden verilirlang='en',# hansi dilde odeme sehvesine redirec edecekislemtipi='Auth',# defaulthash='',# hash edirikrefreshtime='5',# sehveler arasinda redirect timeout uinstalment='',# taksidcurrency='944',# Azerbaycan manatinin kodupost_url='https://entegrasyon.asseco-see.com.tr/fim/est3Dgate'# odeme sehivesi)data=temp.bank_data()returnHttpResponse(data)# callback yuxarda paymentde qeyd edeceyimiz okUrl di ve o url e bank post gonderir@csrf_exemptdefcallback(request):........ifrequest.method=='POST':data=request.POSTdata['storekey']=''#bank terefinden verilirresult=Nestpay.data_result(**data)returnHttpResponse(result)else:returnHttpResponse("Not found")
Package: nestpy-framework
A progressivePythonframework for building efficient and scalable server-side applications.DescriptionNest (NestPy) is a framework for building efficient, scalablePythonserver-side applications and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).Under the hood, Nest makes use of robust HTTP Server frameworks likeFastAPI(the default) and optionally can be configured to useFlask(in development) as well!Nest provides a level of abstraction above these common Python frameworks (FastAPI/Flask), but also exposes their APIs directly to the developer. This gives developers the freedom to use the myriad of third-party modules which are available for the underlying platform.PhilosophyNest provides an out-of-the-box application architecture which allows developers and teams to create highly testable, scalable, loosely coupled, and easily maintainable applications. The architecture is heavily inspired by NestJS and Angular.Getting startedTo get started with PyNest, you'll need to install it using pip:pipinstallnestpy-frameworkTo check out theguide, visitdocs.nestpy.org. :books:QuestionsFor questions and support please use the officialDiscord channel. The issue list of this repo isexclusivelyfor bug reports and feature requests.IssuesPlease make sure to read theIssue Reporting Checklistbefore opening an issue. Issues not conforming to the guidelines may be closed immediately.SupportNest is an MIT-licensed open source project. It can grow thanks to the sponsors and support from the amazing backers. If you'd like to join them, pleaseread more here.Stay in touchAuthor -Manuel S. LemosWebsite -https://docs.nestjs.comLicenseNest isMIT licensed.
Package: nest-reset
nest_resetSimple CLI tool to listen for changes in NEST thermostat and reset the temperature back.Works only for one thermostat.GitHub:https://github.com/viseshrp/nest_resetFree software: MIT licenseInstallation$pipinstall-Unest-resetRequirementsPython 2.7+Nest client ID and secret. Seeherefor instructions.FeaturesI found that the NEST thermostat can be super annoying and sets the temp automatically at times.
Sometimes its super cold outside, I set heating to 77-ish and then it just resets itself back to
70 and it gets really cold inside. I’ve tried changing multiple settings but it just sucks. And
thus, this tool was born. Also helpful if you’ve got annoying guests or kids changing the stat :)All this does is use the NEST API, authenticates you with your ID and secret, pulls all your thermostat
info.Note that I have only one thermostat registered so I have programmed this to work with only one/the firstthermostat associated with your account.All this really does is listen for temperature change events and if the temp is not what you need,
resets the thermostat to what you need.$nest-reset74# starts monitoring your thermostat and resets the temp to 74F whenever it detects
# someone changing itClient ID and secret can be set as env vars:NEST_CLIENT_IDandNEST_CLIENT_SECRET.
They will be auto-read if present.
If they are not set, they will be prompted for. Its a one time prompt only.
Once you’ve been authenticated, an access token is obtained using the id and secret, and stored
at~/.nrtk. Further runs will use this file, and if it does not exist or has expired, you’ll
be prompted again.CreditsCookiecutterand theaudreyr/cookiecutter-pypackageproject template for getting me started.History0.1.3 (2019-02-13)fixes/improvements.0.1.2 (2019-01-12)fixes.0.1.0 (2019-01-11)First release on PyPI.
Package: nest-server
NEST ServerA server with REST API and scripts forNEST simulatorIntroductionNEST Server starts a server interacting with NEST Simulator.
It can be installed on a local machine, on a remote machine (e.g. server, cloud, cluster computer, supercomputer)
or in a session management (e.g. Docker, Singularity).SetupTo install NEST Server:pip3 install nest-serverUsageTo start NEST Server in terminal:nest-server start [-h 127.0.0.1 -p 5000]Alternatively, to start NEST Server in Python interface (e.g. IPython, Jupyter):
Note: Flask 0.12.4 is working with this.from nest_server import app
app.run(host='127.0.0.1', port=5000)LicenseMIT
Package: nestshredder
Python Nest ShredderTurn nested data into relational files!Nest Shredder is a pandas-wrapper utility for converting nested JSON or Parquet data into relational "flat" Parquet files, typically for onward consumption into a relational database (where nested data may become less immediately useful).FeaturesGive the tool a nested JSON or Parquet and a target output path...And you'll get a bunch of "flat" Parquet in the output path!Names the parquet files based on the path of the nested dataAdds some id columns for relational integrity from source objectsShred functions accept a batch identifier for output metadata.Supports standard path or file-like inputs of Pandas for read_json / read_parquet methods.Defaults to Parquet output type but will output to JSON / CSV (no compression supported on these latter two at the moment).Doesn't Feature(s)If you shred the same JSON object twice that has a nested array of objects it doesn't guarantee the order for each shred-time (but the ids will be valid for the run). Get yourself a key on that object! :)No compression on the output Parquet as standard. Will add later.Support for other Parquet libraries. May be later.Represent the full path in the parquet output to account for people naming child objects the same thing repeatedly. Will add later and burst into tears. Model your data properly.TechNest Shredder uses a couple of open source projects to work properly:Pandas- For it's lovely dataframes.Pyarrow- To generate the Parquet files.InstallationPyPi via PipEnv or Pip itself. Up to you!UsageThe module exposes two functions at the moment;shred_jsonshred_parquetBoth accept:path_or_buff- the source file path (e.g. './examples/test.json') or a BytesIO-like file objecttarget_folder_path- the path where you would like your flattened / unnested outputs. New folders will be created in here, using:object_name- a simple string that you can use to identify the overall object represented by your data (e.g. Customers or Addresses). One word only please.e.g.importnestshredderasnsns.shred_json('./examples/vsimple_example.json','./target','example')added a batch_ref identifier to further describe the object you're shredding.e.g.importnestshredderasnsns.shred_json('./examples/vsimple_example.json','./target','example','ABC123')shred_json also exposes most of the read_json Pandas stuff too in case you need it.LicenseMIT