Saravanan666/pypi-org huggingface dataset:
Package: nibbler-rss
OverviewA simple RSS to email application.Nibbler is a RSS aggregator that collects articles and puts them into a daily email newsletter. It is a command line app and aims to be simple yet flexible to use.It is designed to run once day and puts new articles in a single email for that previous day. With only required command line arguments supplied, it will put the email in a file on your filesystem. You could write a script to send this as an email if you have a mail transfer agent on that system or potentially show it as a static page.If you can configure or have access to a SMTP server to send email, you can pass in smtp configuration to nibbler. Popular free choices for a SMTP server would be:gmailsendgridmailgunaws (free based on usage)The sender email (from email) should be for a domain or email address which you own. This will help prevent your email from going to spam.RequirementsNibbler is a python application tested on 3.+
I have only run it on Ubuntu Linux and Mac machines.Installation / Dependenciesnibbler hopes to be on pypi soon,Until then you can install the required python which are opml ,lxml, feedparser, SQLAlchemy and Jinja2. It stores articles in a sqlite database on your filesystem.Then you can run it with this command:python3 -m nibbler <to_email> <from_email> <dir_to_subscriptions>The from email should be for a domain on which you are running email. This will help prevent your email from going to spam.Pass in the directory in which you have a subscriptions.xml (an OPML file) as the third argument.I recommend using a cron job on your local machine or a server to aggregate rss feeds and send the newsletter daily.HelpA simple RSS to email application.positional arguments:
to_email              Recipient email address; youremail@example.com
from_email            Sender email address; nibble@example.com
sub_dir               path to subscriptions.xml file

optional arguments:
-h, --help                          show this help message and exit
-l log_dir, --log-dir log_dir       optional path to log dir
-s smtp_ini, --smtp-ini smtp_ini    optional path to smtp ini file
-d db_dir, --db-dir db_dir          optional path to sqlite db dir
-e email_dir, --email-dir email_dir optional path to directory where email file is output before sending
-v, --version                       show program's version number and exitSMTP NotesA sample smtp.ini file would be:[smtp]
username = sample_username
password = Sample_Password
host = hostname.example.com
port = 587LicenseMIT license, a permissive open-source license.AuthorRandall Rodakowski
Package: nibe-mqtt
Nibe MQTT integrationMQTT integration for controlling Nibe heatpumps. Supports HomeAssistant MQTT Autodiscovery.Usesnibelibrary which supports connections:RS485 communication via NibeGW developed by Pauli Anttila forOpenhab's integrationTCP/Serial Modbus (experimental)Supported heatpump modelsF1145F1155F1245F1255F1345F1355F370F470F730F750SMO20SMO40VVM225VVM310VVM320VVM325VVM500Additionally, supports some S series through TCP Modbus (experimental)InstallationPyPiIt is possible to install directly from PyPipip3installnibe-mqttThen you will be able to run the service with commandnibe-mqtt-cconfig.yamlDockerSeeDocker Hubfor available versions (tags)Run with:dockerrun-ti--pull=always--rm-p9999:9999/udp-v"/Users/myuser/Desktop/config.yaml:/config/nibe-mqtt/config.yaml:ro"yozik04/nibe-mqtt:latestBasic configurationWith NibeGW:mqtt:host:192.168.1.2port:1883protocol:5username:userpassword:passnibe:model:F1255nibegw:ip:192.168.1.3poll:coils:-bt50-room-temp-s1-40033For all configuration options lookup in config.pyWith Modbus:mqtt:host:192.168.1.2protocol:5username:userpassword:passnibe:model:F1255word_swap:truemodbus:url:tcp://192.168.1.3:502slave_id:1poll:coils:-bt50-room-temp-s1-40033For all configuration options lookup in config.pySupported coilsSee the list of available parametershereWriting RegistersSee the list of supported coils to find out which registers can be written (set). For setting a register/coil, publish your data under the following topic:[prefix]/[coil]/set. Example: PublishONE TIME INCREASEtonibe/coils/temporary-lux-48132/setfor turning on temporary hot water lux mode.Word swapYou might need to specifyword_swapsetting to let underneath library understand how to decode 32-bit integers (mostly counters). For most of the heat pumps with NibeGW connection method it will be auto detected (sincenibe-mqtt 1.1.0,nibe 2.1.0)....nibe:...word_swap:true...You can find the setting value in you Heat pump service menu 5.3.11 (modbus settings), there is a setting calledword swap.You need to setword_swapsetting in yaml to match the setting in the service menu.Failing to do so will start throwing errors with decoding errors of 32-bit registers.DisclaimerNibe is registered mark of NIBE Energy Systems.The code was developed as a way of integrating personally owned Nibe heatpump, and it cannot be used for other purposes. It is not affiliated with any company, and it doesn't have a commercial intent.The code is provided AS IS and the developers will not be held responsible for failures in the heatpump operation or any other malfunction.
Package: nibeuplink
ModuleThe module is an asyncio driven interface to nibe uplink public API. It is throttled to one http request every 4 seconds so
try to make the most of your requests by batching requests.StatusExampledeftoken_read():returnNonedeftoken_write(token):passasyncdefrun():asyncwithnibeuplink.Uplink(client_id='XXX',client_secret='YYY',redirect_uri='ZZZ',access_data=token_read(),access_data_write=token_write,scope='READSYSTEM')asuplink:ifnotuplink.access_data:auth_uri=uplink.get_authorize_url()print(auth_uri)result=input('Enter full redirect url: ')awaituplink.get_access_token(uplink.get_code_from_url(result))# Request all systemsprint(uplink.get_systems())# Request data for specific systemprint(uplink.get_system(12345))# Request data for parameters. Note request them in paralell using gather semantics# that way, the module with batch up the requests into a single request to apiprint(awaitasyncio.gather(uplink.get_parameter(12345,11111),uplink.get_parameter(12345,22222)))loop=asyncio.get_event_loop()loop.run_until_complete(run())ConsoleThe module contains a commandline utility to test and request data from Nibe Uplink callednibeuplink, it will store token information in a file in the current directory called nibeuplink.jsonExampleHelp for utilitynibeuplink-hRequest all systemsnibeuplink--client_id'XXX'--client_secret'YYY'--redirect_uri'ZZZ'Request data for specific systemnibeuplink--client_id'XXX'--client_secret'YYY'--redirect_uri'ZZZ'--system12345Request data for parametersnibeuplink--client_id'XXX'--client_secret'YYY'--redirect_uri'ZZZ'--system12345--parameter1111122222
Package: nibiru
Python SDK - Nibiru ChainPython-based client for interacting with the Nibiru blockchain.Thenibirupackage allows you to index, query, and send transactions on Nibiru Chain using Python. It provides access to market data for analysis, visualization, indicator development, algorithmic trading, strategy backtesting, bot programming, and related software engineering.The package is intended to be used by coders, developers, technically-skilled traders and  data-scientists for building trading algorithms.Try running nibiru sdk onlineOpen the google collab link below to try running Niburu code online:Or go to theexamples folderto see the codes and run Jupyter notebooks locally.Installationpipinstallnibiru# requires Python 3.8+UsageQuerying the chainimportjsonfromnibiruimportNetwork,ChainClientclient=ChainClient(Network.testnet(2))# Query perp marketsprint(json.dumps(client.query.perp.markets(),indent=4))# Query trader's positionsprint(json.dumps(client.query.perp.all_positions(trader="nibi1jle8khj3aennq24zx6g93aam9rt0fqhgyp4h52"),indent=4))Submitting transactions to the chainTo send a tx you need to authenticate using your wallet mnemonic or private key.To create a new wallet, generate a mnemonic key using any service or using SDK call.importjsonimportnibirufromnibiruimportNetwork,ChainClient,Msg,PrivateKeymnemonic,private_key=PrivateKey.generate()print(mnemonic)# Example OUTPUT:# enlist satisfy inspire hobby romance caught great neither kitchen unfair cage awesome update fade object eagle sun ordinary again journey spell gown tiger spin# Your wallet addressprint(private_key.to_public_key().to_address().to_acc_bech32())# Example OUTPUT:# nibi1efsh4dq3ve58dgu68rxp8cfe4mgf89el0qfucmStore your mnemonic key in a safe place and use it going forward.Use faucet to get some test tokens into your wallet:https://app.nibiru.fi/faucetСreate your chain client and authenticate with the mnemoniс generatedmnemonic="put your mnemonic here..."client=ChainClient(network=Network.testnet(2))client.authenticate(mnemonic=mnemonic)print(client.address)Check your bank balances. If the faucet succeded - your wallet should not be empty.print(client.query.get_bank_balances(client.address))Send txoutput=client.tx.execute_msgs(Msg.perp.open_position(pair=pair,is_long=True,margin=10,leverage=2,))print(output)You can broadcast any available transaction by passing its correspondingMsgto theclient.tx.execute_msgsfunction.Documentation WebsiteDocumentation can be found here:Nibiru-py documentationLearn more about opening and managing your spot and perp positionshereLearn about querying the chain using the SdkhereContributingPlease readHACKING.MDfor developer environment setup.
Package: nic2proxy
Creates Proxies and binds them to a NIC - Windows onlypip install nic2proxyTested against Windows / Python 3.11 / AnacondaMultiProxyServerclassformanagingandstartingmultipleproxyserversonWindows.Thisclassprovidesfunctionalitytoconfigure,start,andmanageproxyservers.Itbindseachproxytoaspecificnetworkinterface.ItalsoincludesmethodsforgeneratingYAMLconfigurationfiles,retrievingthepublicIPv4addressofthehost,andhandlingconsoleeventsforcontrollingserverprocesses.Ituseshttps://github.com/hang666/s5lightunderthehoodUsage:1.CreateaninstanceofMultiProxyServerwiththedesiredinterfacesandlogfolder.2.WritetheYAMLconfigurationfilewiththewrite_yaml_config()method.3.Starttheproxyserverswiththestart_proxy()method.(Usespowershell-mightneedelevatedrights)4.Getinformationabouttherunningserverswiththe__str__()method.Example:fromnic2proxyimportMultiProxyServerinterfaces={0:{"bind_address":"0.0.0.0","bind_port":None,# None -> finds a free one"out_address":"192.168.9.100",# Address of the NIC you want to use"tcp_timeout":60,"udp_timeout":60,"whitelist":(),},1:{"bind_address":"0.0.0.0","bind_port":None,"out_address":"192.168.10.100",# Address of the NIC you want to use"tcp_timeout":60,"udp_timeout":60,"whitelist":(),},}prox=MultiProxyServer(interfaces=interfaces,logfolder="c:\\proxylogs")prox.write_yaml_config().start_proxy()print(prox)#  prox.kill_proxy() to kill 'em all!
Package: nice65
nice65Code formatter for CC65 assembly (WIP).Requirements:Python 3.xLarkFeatures:Makes ugly code less uglyFixes indentation and letter cases (mnemonics, registers)Understands weird labels, such as colon-less (C64 style) and unnamed (:,:+++)Preserves indentation level of commentsSupports basic macrosSkips files with; nice65: ignorecommentTested withC64 Kernal/Basicandmy 6502-based SBC ROM codeImprovements to do:Complex macrosProper formatting of arithmetic expressionsNotes:Colon-less label mode (-l) breaks macros due toambiguity of the syntax. Use this option only with legacy code that contains no macros (such as C64 source code).Installationpipinstallnice65Example usage# Reformat and print to STDOUTnice65samples/example.s# Modify file in-placenice65samples/example.s-m# Write result to another filenice65samples/example.s-osamples/clean.s# ornice65samples/example.s>samples/clean.s# Recursively reformat all files in directory with extension ".s"nice65./samples/-r# Recursively reformat all files in directory with extension ".asm"nice65./samples/-r-p'*.asm'Before:.macroldaxaa,bb; do stuffldaaaldxbb; load bb.endmacrofour.set9var=1337+fourfour.set4.macropush_allphAphXPHy.endmacro.datafoo:.byte1.code;  Fill zeropage with zeroesfill:; save registerspush_all@start:ldax#0,#0@again:sta$00,x;Yeah, we can use stz, but I just need some code to test nice65!inxbne@again; Repeat; Do unnecessary throwaway stuff to test expressions;lda#<($42  +  %10101010- (foo*2))cmpfoo+2jmp:+:lda$1234@ridiculously_long_label_just_for_the_sake_of_it:PLXplaend:rtsAfter:.macroldaxaa,bb; do stuffLDAaaLDXbb; load bb.endmacrofour.set9var=1337+fourfour.set4.macropush_allPHAPHXPHY.endmacro.datafoo:.byte1.code; Fill zeropage with zeroesfill:; save registerspush_all@start:ldax#0,#0@again:STA$00,X; Yeah, we can use stz, but I just need some code to test nice65!INXBNE@again; Repeat; Do unnecessary throwaway stuff to test expressions;LDA#<($42 + %10101010 - (foo * 2))CMPfoo+2JMP:+:LDA$1234@ridiculously_long_label_just_for_the_sake_of_it:PLXPLAend:RTSUsing with Vim:nnoremap<M-r>:%!nice65-<CR>Using with NeoVimIf you want to be fancy, here's an example on how to have nice65 configured as code formatter for NeoVim with null-ls:Make sure you have the following neovim plugins installed:maxbane/vim-asm_ca65- sets filetype for CA65 buffersjose-elias-alvarez/null-ls.nvim- allows to run custom scripts as language serversAdd configuration:localnull_ls=require("null-ls")null_ls.setup({on_attach=on_attach,-- Remove this line if you don't use on_attach})null_ls.register({method=null_ls.methods.FORMATTING,filetypes={'asm_ca65'},generator=null_ls.formatter({command='nice65',args={'-'},to_stdin=true,from_stdout=true,}),})Trigger the formatting::luavim.lsp.buf.format()
Package: niceback
Nicer error messages for PythonOther languages such as C++ have gotten quite useful error messages and
diagnostics with tips on how the fix the problems but Python is still stuck
with the bare stacktraces that are very intimidating and often not very helpful.Niceback backtrace shows where the user has terminated the program.Niceback hides the irrelevant IPython/notebook internals and concisely shows
what happened (the program was interrupted) and where that happened. This could
further be improved by converting the KeyboardInterrupt message into something
more suitable, like "You stopped the program", but what you see above is just
the default handling that never considered this particular error.Although IPython and Google Colab developers have done their tweaks to improve
backtraces, it is all too apparent that much remains to be done:Standard backtrace from Google Colab.Even for the experienced programmer, it is tedious to read through the wall of
text to find the relevant details of what went wrong.In more complex situations where one might get many screenfuls of standard
traceback, Niceback produces scrollable outputs that concentrate on the relevant
details but also provide variable inspectors on each frame where it may be
relevant:Niceback output with nested exceptions.UsageAt the beginning of your Notebook:!pip install niceback
%load_ext nicebackBackgroundThis project is a proof of concept, showing a modern way to format error
messages in a human-readable manner. Heuristics are used to hide (by default)
irrelevant stack frames and show the actual location of the problem. Since it
would otherwise be impossible to find out the variable contents after the program
has crashed, a variable inspector built into each stack frame quickly reveals
problems with the variables mentioned at the source of error. Care is taken to
add revelant details such as notebook input field numbers and class names not
normally present in Python tracebacks, while hiding overly long paths and other
clutter.All output is in HTML and as such only works in Jupyter notebooks and other
browser-based systems (this should be useful for web development frameworks as
well). This allows interactivity and much better layout than that of the text
console.LicensePublic Domain or equivalent.Help wantedI won't be able to maintain this all by myself. If you like the idea of nicer
tracebacks, please offer your help in development! Pull requests are welcome
but it would be even better if you could pick up the whole project as your own.As of now, this project is in no way properly polished for release. Yet, it is
useful enough to such a degree that I always use it in my notebooks, and it
really makes Python development a much smoother experience.
Package: nicecache
nicecacheA cache that persists data between runs. Trust me, you need this.@functools.cacheis nice, but there's a slight problem -- each program starts
its own cache fresh. In comes@nicecache.nicecache. Use it just like you'd
use@functools.cache, but rest assured that you really only have to compute
thisonceand they'll persist across runs (by saving to disk!).Usesdiskcacheto
manage things behind the scenes.@nicecachedecoratorGot some slow data-loading or preprocessing that you'd rather just compute once?
Frustrated thatfunctools.cachespawns a new cache each time you re-run
your program? You're in the right place.Here's a really simple example:fromtimeimporttimefromnicecacheimportnicecache@nicecache(tmp_cache_dir)defslowtimes(a,b):print('saving to cache:',(a,b))time.sleep(5)returna*bdeftest():t1=time()print(slowtimes(5,3))t2=time()print(f'Func 1 time:{t2-t1}s')print(slowtimes(5,3))t3=time()print(f'Func 2 time:{t3-t2}s')print(slowtimes(4,2))t4=time()print(f'Func 3 time:{t4-t3}s')print(slowtimes(4,2))t5=time()print(f'Func 4 time:{t5-t4}s')savingtocache:(5,3)15Func1time:5.026401281356811515Func2time:0.0017404556274414062savingtocache:(4,2)8Func3time:5.0113899707794198Func4time:0.0015897750854492188Specifying a cache pathBy default values are cached to~/.nicecache. Specify a different folder path
by passing an argument to the decorator. For example,@nicecache('/tmp/cache/path').NiceCache
Package: nicecal
Create simple calendars using box-drawing charactersUsageMonthnicecal.month(2038, 1)┌──────────────────────┐
│        January       │
│ Mo Tu We Th Fr Sa Su │
│              1  2  3 │
│  4  5  6  7  8  9 10 │
│ 11 12 13 14 15 16 17 │
│ 18 19 20 21 22 23 24 │
│ 25 26 27 28 29 30 31 │
└──────────────────────┘The calendar output can be modified using the following arguments:Options:show_month_info(default 1)0: No month information header1: Only month name centred as header2: Both month name and year centred as headershow_days(default 1)0: Day names are not shown1: Day names are shown>>>nicecal.month(2038,1, show_month_info=0)┌──────────────────────┐
│ Mo Tu We Th Fr Sa Su │
│              1  2  3 │
│  4  5  6  7  8  9 10 │
│ 11 12 13 14 15 16 17 │
│ 18 19 20 21 22 23 24 │
│ 25 26 27 28 29 30 31 │
└──────────────────────┘>>>nicecal.month(2038,1, show_month_info=2)┌──────────────────────┐
│     January 2038     │
│ Mo Tu We Th Fr Sa Su │
│              1  2  3 │
│  4  5  6  7  8  9 10 │
│ 11 12 13 14 15 16 17 │
│ 18 19 20 21 22 23 24 │
│ 25 26 27 28 29 30 31 │
└──────────────────────┘>>>nicecal.month(2038,1, show_days=0)┌──────────────────────┐
│        January       │
│              1  2  3 │
│  4  5  6  7  8  9 10 │
│ 11 12 13 14 15 16 17 │
│ 18 19 20 21 22 23 24 │
│ 25 26 27 28 29 30 31 │
└──────────────────────┘>>>nicecal.month(2038,1, show_month_info=2, show_days=0)┌──────────────────────┐
│     January 2038     │
│              1  2  3 │
│  4  5  6  7  8  9 10 │
│ 11 12 13 14 15 16 17 │
│ 18 19 20 21 22 23 24 │
│ 25 26 27 28 29 30 31 │
└──────────────────────┘>>>nicecal.month(2038,1, show_month_info=0, show_days=0)┌──────────────────────┐
│              1  2  3 │
│  4  5  6  7  8  9 10 │
│ 11 12 13 14 15 16 17 │
│ 18 19 20 21 22 23 24 │
│ 25 26 27 28 29 30 31 │
└──────────────────────┘
Package: nice-colorsys
nice_colorsysThis is a very small library that may offer a nicer way of working with and
converting between color systems than the default Python colorsys library.In this library, a color in each supported color system is represented as anamedtuplewithto_methods for converting to different color systems.Supported color systemsRGB (0.0–1.0)RGB (0–255) (viargb255.py)HLSHSVYIQHSLuv (vianice_hsluv.py)Examplefromnice_colorsysimport*print(hsv(0.5,1,1).to_hls())# Output:## hls(hue=0.5, lightness=0.5, saturation=1.0)
Package: niceconf
niceconf is a dropin replacement for the stdlib RawConfigParser object. It makes
parsing and using configuration files in your python scripts approximately
10 times more pythonic and fun.By default it reads and writes to ~/.conf. This can be changed by setting
$CONF. If ~/.conf or the file specified in $CONF does not exist, it will be
created on the first import.basic usage:>>> from niceconf import config
>>> config
gmail
my-database
secret-stuff
>>> config['gmail']
[gmail]
username = rick@gmail.com
password = wubalubadubdub
>>> config['gmail']['username']
'rick@gmail.com'
>>> config['gmail']['password']
'wubalubadubdub'add or set config file options:>>> config['my-database']['port'] = 3306
>>> config['my-database']['port']
'3306'delete config file options:>>> del config['secret-stuff']['burn-after-reading']
>>> config['secret-stuff']['burn-after-reading']
NoOptionError: No option 'burn-after-reading' in section: 'secret-stuff'add a section (any valid dict-like can be added as section):>>> config['stackoverflow'] = {'username': 'guido',
                               'password': 'pa$$word1'}
>>> config['stackoverflow']
[stackoverflow]
username = guido
password = pa$$word1delete a section:>>> del config['stackoverflow']
>>> config['stackoverflow']
NoSectionError: No section: 'stackoverflow'write out to a file (overwrites by default):>>> config.save()read in another config file:>>> config.read('/path/to/conf')
['/path/to/conf']
>>> config
gmail
my-database
secret-stuff
first_section_of_other_conf
second_section_of_other_confexplode conf into function arguments>>> print_kwargs(**config['gmail'])
{'username': 'rick@gmail.com', 'password': 'wubalubadubdub'}Additionally, the config object _is_ an instance of RawConfigParser, so you can
use any of those methods as before. This means that config is a dropin
replacement for ConfigParser.
Package: nice-datapath
nice-datapath User GuideTalk is cheap. Show me the codefromdatapathimportvalue,register_pipeimportdatapathdefconcat(*args):return"".join(args)deftest_value():data={"f1":"a","f2":2,"f3":{"f4":"b","f5":3,"f6":["l1","l2","l3"],},"f7":[{"f8":"f8-1","f9":[1,2,3]},{"f8":"f8-2","f9":[1,2,3]},{"f8":"f8-3","f9":[1,2,3]}],"f10":{"f11":[[{"f12":[1]}],[{"f12":[2]}],[{"f12":3}],]},"f13":'{"a": 1}',"f14":0.01123,"f15":0.01,"f16":23.79}datapath.register_pipe("concat",concat)assertdatapath.value(data,"f1")=="a"assertdatapath.value(data,"f2")==2assertdatapath.value(data,"f2|str")=="2"assertdatapath.value(data,"f3.f4")=="b"assertdatapath.value(data,"f3.f5")==3assertdatapath.value(data,"f3.f5 | str  ")=="3"assertdatapath.value(data,"f3.f6")==["l1","l2","l3"]assertdatapath.value(data,"f3.f6")==["l1","l2","l3"]assertdatapath.value(data,"f3.f6|jsondump")=='["l1", "l2", "l3"]'assertdatapath.value(data,"f7.f8")==["f8-1","f8-2","f8-3"]assertdatapath.value(data,"f7.f9")==[[1,2,3],[1,2,3],[1,2,3]]assertdatapath.value(data,"f10.f11.f12")==[[[1]],[[2]],[3]]assertdatapath.value(data,"f13 | jsonload")=={"a":1}assertdatapath.value(data,"f14 | %")=="1.123%"assertdatapath.value(data,"f14 | % 0")=="1%"assertdatapath.value(data,"f14 | % 1")=="1.1%"assertdatapath.value(data,"f14 | % 2")=="1.12%"assertdatapath.value(data,"f14 | % 3")=="1.123%"assertdatapath.value(data,"f14 | % 4")=="1.1230%"assertdatapath.value(data,"f14 | % 5")=="1.12300%"assertdatapath.value(data,"f15 | %")=="1%"assertdatapath.value(data,"f16 | int")==23assertdatapath.value(data,"f16 | float")==23.79assertdatapath.value(data,"f16 | str | concat a b c")=="23.79abc"