Saravanan666/pypi-org huggingface dataset:
Package: lner
Lingorithm Named Entity RecognitionThis package is the core function for any NLP operation or pacakge used by lingorithm.InstallationUse the package managerpipto install lner.pipinstalllnerUsageDataInput data is a list of dictentities={'countries':[{values:['Afghanistan'],key:'AF'},{values:['Åland Islands'],key:'AX'},....{values:['Zimbabwe'],key:'ZW'}],"colors":[{"key":"black","values":["black"],"meta":{"rgba":[255,255,255,1],"hex":"#000"}},..."meta":{"rgba":[0,255,0,1],"hex":"#0F0"}},]}sentences=[('Egypt\'s flag containes black, white and red.',[(0,5,'countries'),(23,28,'colors'),(40,43,'colors')]).....]importlnerner=lner('en',entities,sentences)ner.process()print(ner.data)# list of Tuples# [#     (['Green', ',', 'yellow', 'are', 'the', 'main', 'colors', 'for', 'Zimbabwe', '\'s' 'flag','.'],#     ['B-colors', 'O', 'B-colors', 'O', 'O', 'O', 'O', 'O', 'B-countries', 'O', 'O', 'O'])# ]ner.train(epochs=20,batch_size=8,model_name="countries_colors_v1")entities,tokens=ner.recognize("yellow is the main colors for Northern Mariana Islands flag.")print(entities)# [#     [#         {#             'key': 'yellow',#             'meta': {#                 'rgba': [#                     255,#                     255,#                     0,#                     1#                 ],#                 'hex': '#FF0'#             },#             'value': 'yellow',#             'entity': 'colors'#         },#         {#             'key': 'MP',#             'meta': None,#             'value': 'Northern Mariana Islands',#             'entity': 'countries'#         }#     ]# ]print(tokens)# [['yellow', 'is', 'the', 'main', 'colors', 'for', 'Northern', 'Mariana', 'Islands', 'flag', '.']]ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: lnet
lnet -- Simplified Lightning Network SetupHave you ever tried setting up a small Lightning Network on regtest to
develop or demo against, and found it frustrating and confusing?lnet's goal is to make it easy to spin up any network topology for
testing or demoing, all you need to do is describe the network in the
graphvizdotformat.Take the following example, which will spin up two nodes, calledclientandserverrespectively, connect them and fund a
channel. It'll also create an invoice on the server to balance the
channel by sending over 500'000msat. You describe it, we make it
happen.graphg{client--server[capacity="10000000:500000"];}A more complicated setup could be a star topology and some multi-hop paths:graphg{client1--server[capacity="10000000"];client2--server[capacity="10000000"];client3--server[capacity="10000000"];client4--server[capacity="10000000"];client5--server[capacity="10000000"];"client5-1"--client5[capacity="10000000"];"client5-2"--client5[capacity="10000000"];"client5-3"--client5[capacity="10000000"];}Installationlnetis just a simplepip installaway:pip3installlnetThis will install thelnet-cliandlnet-daemoncommand line
utilities.lnet-daemonstarts, monitors and provides access tobitcoindand any number ofc-lightningnodes, whilelnet-cliis
used to interact with the daemon and the nodes.UsageAll operations are performed throughlnet-cli, which will startlnet-daemonif required.lnet-clihas the following commands:start [dotfile]parses thedotfile, extracting nodes and
channels, and tries to recreate the desired topology. It'll open
channels and confirm them to make the usable, however it currently
requires that the network topology is not partitioned. See below
for attributes that are defined.stopstops the currently running topologyshutdownstops the running topology and shuts down thelnet-daemonnode [nodename] [rpc_method] [params...]executesrpc_methodon
the node with namenodenameand the specifiedparams. This is
mainly used as a shorthand to give access without having to
configure your shell.aliasconfigures your shell with a number of aliases to make it
easy to interact with the daemons without going throughlnet-cli. You can use it witheval $(lnet-cli alias).
Package: l-net
l-netAdds the ability to combine l1 to l10 penalties in regression extending the elastic-net.Python Installationpipinstalll-netOr install from the github repopipinstallnumpy# install numpypipinstallgit+https://github.com/austindavidbrown/l-net/#egg=l-net\&subdirectory=python-packageTutorialPython package IntroductionDocumentationSee thePython package documentationor help in Python.LicenseThe code is licensed under GPL-3.ReferencesThis project began as a STAT8053 at the University of Minnesota.
Package: lnevx_alg
Description:Lnevx_alg is an encryption algorithm created by Lnevx.Installation:pip3 install lnevx_algHow to use$ python3
>>> import lnevx_alg
>>> lnevx_alg.encrypt(‘This is some text’, ‘password’)
‘L`akx18akx18kgZhemiiWfe]x18Zlh]epmli’
>>>Better, if message will be longer, then password
If your password will be longer, then 31 character, the error will be displayed:
“Error! Password must be less, then 31 characters”
Package: lngen
<!–### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! #### file to edit: 99_index.ipynb
# command to build the docs after a change: nbdev_build_docs–># Lngen : Line generation> Summary description here: just testing nbdev for the moment<div class=”codecell” markdown=”1”>
<div class=”input_area” markdown=”1”>`python !find /-name*nbdev* `</div>
<div class=”output_area” markdown=”1”>find: ‘/tmp/tmpiga82kvw_kernels’: Permission denied
find: ‘/var/cache/apt/archives/partial’: Permission denied
find: ‘/var/cache/ldconfig’: Permission denied
find: ‘/var/lib/apt/lists/partial’: Permission denied
find: ‘/proc/tty/driver’: Permission denied
find: ‘/etc/ssl/private’: Permission denied
find: ‘/root’: Permission denied</div></div>This file will become your README and also the index of your documentation.## Installpip install lngen## How to useFill me in please! Don’t forget code examples:
<div class=”codecell” markdown=”1”>
<div class=”input_area” markdown=”1”>`python 1+1 `</div>
<div class=”output_area” markdown=”1”>2</div></div>
Package: lnk
A command-line URL-shortening client for bitly, tinyurl and goo.gl.How a smart dev (you) shortens a URL:ButlnkisMORE.lnkcan also expand short URLs:$lnk-ehttp://bit.ly/1NWAPWn┌─────────────────────────────────────────────┐│http://bit.ly/1NWAPWn=>http://google.com/│└─────────────────────────────────────────────┘Get all sorts of awesome stats and metrics for a URL:$lnkstats-ihttp://bit.ly/1NWAPWn┌───────────────────────────────┐│URL:http://bit.ly/1EHdqZq││Referrers:││+Sinceforever:││-Direct:503││-http://bit.ly/1EHdqZq:1││Clicks:││+Sinceforever:504││Countries:││+Sinceforever:││-UnitedStates:197││-UnitedKingdom:50││-Germany:45││-France:27││-Canada:20││-Netherlands:16││-RussianFederation:12││-Australia:11││-Spain:10││-Brazil:9│└───────────────────────────────┘Tell you about yourself:$lnkuser-a┌────────────────────────────────────────────────────┐│FullName:PeterGoldsborough││Login:goldsborough││MemberSince:WedAug2613:57:002015││Linkprivacy:public││...│└────────────────────────────────────────────────────┘And what you’ve been up to:$lnkhistory--last4days┌────────────────────────────┐│Last4days:││+http://bit.ly/1OQM9nA││+http://bit.ly/1Km6CB1││+http://bit.ly/1OQLTov││+http://on.fb.me/1OQHeD0│└────────────────────────────┘lnkis your fast, complete and sweet destination for shortening URLs and everything connected to it.InstallationWhoop:$pipinstalllnkdee-doo.DocumentationDocumentation for the project’s source alongside a detailed description of how to effectively uselnkcan be foundhere.Licenselnkis released under theMIT License.AuthorsPeter Goldsborough &cat:heart:
Package: lnkcreator
Creates .lnk files on Windows (with Admin rights if desired)pip install lnkcreatorfromlnkcreatorimportcreate_shortcutcreate_shortcut(shortcut_path=r"C:\Users\hansc\Downloads\PJeOffice.lnk",target=r"C:\Users\hansc\Downloads\PJeOffice.exe",arguments=(),minimized_maximized_normal='normal',#asadmin=True,# enables the admin check boxhotkey='ctrl+x',working_dir=None,# dir of target will be used)CreatesaWindowsshortcut(.lnk)fileatthespecifiedpathwiththespecifiedproperties.Args:shortcut_path(str):Thepathwheretheshortcutfilewillbecreated.target(str):Thepathofthetargetfileorapplicationthattheshortcutwillpointto.arguments(list):Alistofargumentstobepassedtothetargetfileorapplication.hotkey(str,optional):Thehotkeycombinationtoactivatetheshortcut.Defaultsto"".working_dir(Union[str,None],optional):Theworkingdirectoryforthetargetfileorapplication.DefaultstoNone.minimized_maximized_normal(str,optional):Thewindowstateofthetargetapplicationwhentheshortcutisactivated.Possiblevaluesare"minimized","maximized",or"normal".Defaultsto"minimized".asadmin(bool,optional):IfTrue,theshortcutwillbecreatedwithadministrativeprivileges.DefaultstoFalse.Returns:str:TheJavaScriptcontentusedtocreatetheshortcut.Raises:OSError:Iftheshortcutfilecannotbecreated.
Package: lnkr
lnkr====Link Folder/File Under Current FolderNotes=====following the best practice from this article:- http://www.jeffknupp.com/blog/2013/08/16/open-sourcing-a-python-project-the-right-way/0.1.5------ Do the attrib conversion for from_path as well- add `mode_win` for windows platform override0.1.4------ Not using blessings under windows (still depends on `cp`)0.1.3------ Bugfix with folder relative symlink0.1.2------ Detech reltive path for symlink0.1.1------ Bugfix with symlink file again0.1.0-----Basic functions implemented:- Support package definition, file name is lnkr-export.toml- can export local folder/files- can wrap other projects with wrapper definition (file name is lnkr-wrapper.toml)- Support import definition, file name is lnkr-import.toml- support folder, and files- support copy mode and symlink mode- Doc is missing for now
Package: lnmc
lnmcAllows to create symbolic link in batches from a YAML file and consolidate them in a
specific directory.Install:pipinstalllnmcUsege:lnmcaddons.ymlsrc/destination/Configuration Filelnmc as first argument needs a.yamlor.ymlfile. The directories, sub-directories
and files that will be the target for symbolic links are specified in this file. For example.reporting-engine:-report_xlsxpurchase-workflow:-purchase_landed_costpos:-pos_marginpartner-contact:-partner_vat_unique-base_location_nuts-base_location_geonames_import-base_locationmis-builder:-mis_builder-mis_builder_budget# It will create symbolic links of all subdirectories and filesl10n-spain:(Example of a typical Odoo project)Development Installgitclonehttps://github.com/LuqueDaniel/lnmc.gitcdlnmc
python-mvenv--prompt..venv/source.venv/bin/activate
pipinstall-e".[dev]"
Package: lnmmeshio
Meshio for BACIRelies on meshio:https://github.com/nschloe/meshioInstallYou can install the latest version with pip:pip install lnmmeshioDocumentationDoes only read the discretization and currently completely ignores all other sections.Read/write a mesh into/from the Discretization classimport lnmmeshio

# tested formats are Exodus, Gmsh and .dat (only the discretization, all other sections are discarded)
dis = lnmmeshio.read('pathtofile.ext')

# do what ever you want with the discretization (like add options to the elements or sth like that)

# iterate over all structural elements
for ele in dis.elements.structure:
    # do sth with the element
    ele.options["KINEM"] = "nonlinear"
    ele.options["MAT"] = 1

# iterate over all nodes
for node in dis.nodes:
    # do sth with the node
    pass

# iterate over all surface elements with id 0
for ele in dis.get_dsurf_elements(0):
    # do sth with this element
    pass

# iterate over all surface nodeset nodes with id 0
for node in dis.surfacenodesets[0]:
    # do sth with the node
    pass

# write discretization into an arbitrary format (.dat, .vtu, ...)
lnmmeshio.write('pathtofile.ext', dis)See alsohttps://github.com/nschloe/meshioMake changes and upgradeMake your changes and test changes.Adapt version number in pyproject.tomlCreate a feature branch (best reference it with corresponding issue)Create a merge request from feature branchPush changes to Gitlab and wait for the pipeline to passOnce the MR is merged, the new version is available in the package repositoryList of ContributorsThe following developers contributed to lnmmeshio (in alphabetical order):Sebastian BrandstäterJanina DatzAmadeus GebauerMaire Henke
Package: lnpanda
lnpandalnpanda allows you to query Bitcoin lightning network data using Pandas dataframes. Pandas is a powerful data science tool, and the combination can be used to find insights about your node. In addition, pandas dataframes are a just convenient and powerful way to interact with your node, while staying on the command line!InstallpipinstalllnpandaEnvironment VariablesAdd information like node ip address, and directory containing:tls.certadmin.macaroonexportCRED_PATH=/path/to/macaroon/and/tls/certexportLND_NODE_IP=192.168.1.xxBasic Usagefromlnpandaimportlnpanda# initialize lnpanda objecta=lnpanda()# Get info about channel balances and fee rates in 1 viewa.list_channels_and_fees()# List routed transactions, shows eff_fee_rate of fwda.list_forwards()Using pandas queries# List channels with a fee rate > 100a.list_channels_and_fees().query("fee_rate > 0.000100")# Get sum of latest 25 routed transactions in satsa.list_forwards().tail(25).fee_msat.sum()/1000# Get a set of alias' of the last 10 outgoing forwardsoutgoing_chan_ids=list(a.list_forwards().tail(10).chan_id_out)set(map(lambdax:a.get_peer_alias(x),outgoing_chan_ids))
Package: lnpay-py
lnpay-pyLNPay Python SDK - at the moment a basic wrapper for theLNPay APIInstallGet it onpippip install lnpay-pySetupFirst import into your python moduleimportlnpay_pyNow, you need to instantiate it with a Public API Key fromLNPay.co# Set your public keylnpay_api_key='pak_XXX'# init lnpaylnpay_py.initialize(lnpay_api_key)Usage -DocumentationThe first alpha version of this SDK is mainly a wrapper for theLNPay APIEveryhing revolves around thewalletand Wallet Access Keys (WAK) which grant various levels of permission.Instantiate a Wallet / Check BalanceWhen interacting with the wallet, import the wallet module and then initialize the wallet.fromlnpay_py.walletimportLNPayWalletmy_wallet=LNPayWallet(lnpay_wallet_key)Then you can proceed to check balance, etc.info=my_wallet.get_info()print(info)Create a walletYou can create awalletfrom the UI or via the API. When you create a wallet via the API, Wallet Access Keys (WAK) are returned. You need to save these.wallet_params={'user_label':'My wallet'}new_wallet=lnpay_py.create_wallet(wallet_params)print(new_wallet)Generate Invoicemy_wallet=LNPayWallet(lnpay_wallet_key)invoice_params={'num_satoshis':2,'memo':'Tester'}invoice=my_wallet.create_invoice(invoice_params)print(invoice)Pay Invoicemy_wallet=LNPayWallet(lnpay_wallet_key)invoice_params={'payment_request':'lnbc....'}pay_result=my_wallet.pay_invoice(invoice_params)print(pay_result)Transfers between walletsmy_wallet=LNPayWallet(lnpay_wallet_key)transfer_params={'dest_wallet_id':'w_XXX','num_satoshis':1,'memo':'Transfer Memo'}transfer_result=my_wallet.internal_transfer(transfer_params)print(transfer_result)Get Wallet Transactionsmy_wallet=LNPayWallet(lnpay_wallet_key)transactions=my_wallet.get_transactions()print(transactions)Get LNURLmy_wallet=LNPayWallet(lnpay_wallet_key)lnurl_params={'num_satoshis':1,'memo':'SatsBack!'}lnurl_link=my_wallet.get_lnurl(lnurl_params)print(lnurl_link)Get Invoice / Check if Settledlntx_id='lntx_XXX'ln_tx=LNPayLnTx(lntx_id)invoice_result=ln_tx.get_info()print(invoice_result)Seethis example fileDevelopment1. InstallationYou will need to havepythoninstalled as well aspipClone the repository2. Getting startedopen the command line and switch into the project folderpip install -rrequirements.txtpython setup.py install3. Run Tests./run_tests.sh4. Publishing To PypiCreate an account forpypi&pypi testInstalltwine-pip install twineIncrement version in__init__.pyRemove current items in dist -rm -rf dist/*Build package -python setup.py installBuild sdist -python setup.py sdistRun pypi test upload -twine upload --repository-url https://test.pypi.org/legacy/ dist/*Upload to pypi -twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
Package: ln-pluggy
This is the core framework used by thepytest,tox, anddevpiprojects.Pleaseread the docsto learn more!A definitive exampleimportpluggyhookspec=pluggy.HookspecMarker("myproject")hookimpl=pluggy.HookimplMarker("myproject")classMySpec:"""A hook specification namespace."""@hookspecdefmyhook(self,arg1,arg2):"""My special little hook that you can customize."""classPlugin_1:"""A hook implementation namespace."""@hookimpldefmyhook(self,arg1,arg2):print("inside Plugin_1.myhook()")returnarg1+arg2classPlugin_2:"""A 2nd hook implementation namespace."""@hookimpldefmyhook(self,arg1,arg2):print("inside Plugin_2.myhook()")returnarg1-arg2# create a manager and add the specpm=pluggy.PluginManager("myproject")pm.add_hookspecs(MySpec)# register pluginspm.register(Plugin_1())pm.register(Plugin_2())# call our ``myhook`` hookresults=pm.hook.myhook(arg1=1,arg2=2)print(results)Running this directly gets us:$ python docs/examples/toy-example.py
inside Plugin_2.myhook()
inside Plugin_1.myhook()
[-1, 3]
Package: lnprototest
lnprototesta Testsuite for the Lightning Network ProtocolProject Homepagelnprototest is a set of test helpers written in Python3, designed to
make it easy to write new tests when you propose changes to the
lightning network protocol, as well as test existing implementations.Install requirementsTo install the necessary dependencespip3installpoetry
poetryshell
poetryinstallWell, now we can run the testRunning testThe simplest way to run is with the "dummy" runner:make checkHere are some other useful pytest options:-n8to run 8-way parallel.-xto stop on the first failure.--pdbto enter the debugger on first failure.--traceto enter the debugger on every test.-k footo only run tests with 'foo' in their name.tests/test_bolt1-01-init.pyto only run tests in that file.tests/test_bolt1-01-init.py::test_initto only run that test.--log-cli-level={LEVEL_NAME}to enable the logging during the test execution.Running Against A Real Node.The more useful way to run is to use an existing implementation. So
far, core-lightning is supported.  You will need:bitcoindinstalled, and in your path.lightningdcompiled with--enable-developer. By default the source directory should be../lightningrelative to this directory, otherwise useexport LIGHTNING_SRC=dirname.Install any python requirements bypip3 install -r lnprototest/clightning/requirements.txt.Then you can runmake check PYTEST_ARGS='--runner=lnprototest.clightning.Runner'or directly:pytest --runner=lnprototest.clightning.RunnerFurther WorkIf you want to write new tests or new backends, seeHACKING.md.Let's keep the sats flowing!Rusty.
Package: lntlvs
⚡️📝 TLV Payment Metadata Records Parser for LNDExtractcustom TLV payment metadata recordsthat may have been attached to lightning payments you received.
For example, you can extractboostagramsfrom payments received throughvalue-for-valuepodcastingapps.For more information, see therelease notes of LND's v0.9 release.InstallationMake sure you have up-to-date installations ofpipandsetuptools:pip install --upgrade pip
pip install --upgrade setuptoolsThen install thelntlvsCLI:pip install lntlvsExamplesBy default, only podcast metadata will be extracted.
To query the first 100 payments on your node, run:lntlvs --maxinvoices 100To queriy from the next 100 payments, run:lntlvs --maxinvoices 100 --indexoffset 100To extract another type of custom records other than podcast metadata, specify the--tlvkeyoption.
To extract multiple types of custom records, repeat this option multiple times.
Seeherefor a list of TLV keys used in the open.lntlvs --tlvkey 7629171 --tlvkey 7629169 # Extract tip note and podcast metadataUsageUsage: lntlvs [OPTIONS]

  Extract custom metadata records that may have been attached to lightning payments you received.

Options:
  --tlscertpath <value>   Path to the TLS certificate for lnd's RPC service  [default: ~/.lnd/tls.cert]
  --macaroonpath <value>  Path to the (read-only) macaroon for lnd's RPC service  [default: ~/.lnd/data/chain/bitcoin/mainnet/readonly.macaroon]
  --rpchost <value>       The address and port where lnd's RPC service is listening  [default: 127.0.0.1:10009]
  --tlvkey <value>        A TLV key to extract - can be specified multiple times  [default: 7629169]
  --indexoffset <value>   Query for invoices starting at (not including) this offset  [default: 0]
  --maxinvoices <value>   The maximum number of invoices to query  [default: 1000]
  --help                  Show this message and exit.DevelopmentCreate a virtual environment:python -m venv .venv && source .venv/bin/activateInstall production and development dependencies:pip install -e ".[dev]"Re-generating gPRC CodeIf required, update the LND interface definition insrc/protobuf/custom_records/generated/lightning.protoby running:src/protobuf/update.shThen re-generate the gPRC code with:src/protobuf/generate.sh
Package: lnxlink
LNXlinkLNXlink is a Linux companion app that seamlessly integrates your system with external applications like Home Assistant.
It uses MQTT, a lightweight messaging protocol, to enable real-time data exchange and remote control capabilities.With LNXlink, you can monitor your Linux machine's performance, execute commands remotely, and integrate it into your smart home ecosystem for centralized management.Key FeaturesSensor Monitoring:Automatically or manually expose sensors that monitor and control the system remotely.Home Assistant:Utilizes MQTT Autodiscovery to create entities in Home Assistant dashboard.Easy Installation:No sudo privileges required for installation and operation, except for server environments.Expandable Architecture:Automatically imports new modules and allows for the addition of custom modules.Get startedTo get started with LNXlink, follow these simple steps:Download the LNXlink application and install it on your Linux machine:pipx install lnxlinkFollow the configuration instructions to setup LNXlink:lnxlink -c lnxlink.yamlInstall and configure on Home Assistant thehass-mqtt-mediaplayerintegration.Enjoy real-time monitoring and control of your Linux machine from your Home Assistant dashboard.For detailed installation instructions, please refer to the documentation page:bkbilly.gitbook.io/lnxlink.BenefitsCross-Platform Compatibility:Runs on any Linux distribution, providing flexibility and wide-ranging compatibility.Enhanced System Insights:Gain real-time insights into your Linux machine's performance by monitoring essential system metrics.Remote Command Execution:Execute arbitrary commands directly from your Home Assistant dashboard, granting remote control over your Linux machine.Seamless Integration with Home Assistant:Integrate your Linux machine into your smart home ecosystem for unified control and monitoring.Automate tasks:Set up automated tasks to perform repetitive actions and save yourself time and effort.Support LNXlink's DevelopmentTo contribute to the development of LNXlink, you can sponsor the project throughGitHub SponsorsorPayPal. Your support will help maintain the project, add new features, and fix bugs.
Package: lo4container
Lo4containerThe simplest IoC in pythonInstallpip install lo4containerUsageCreating a container is matter of creating aContainerinstancefrom lo4container import Container
container = Container()Assign valueWe can usecontaineras a dictionary, it means you can assign/get value by key, check existing, ...container['name'] = 'lo4container'
print(container['name'])
# output: 'lo4container'

'name' in container
# return TrueIf we use lambda function for value, it would execute withcontaineras argumentimport datetime
container['timer'] = lambda c: return datetime.datetime.now()

print(container['time'])
# output: 2018-07-07 14:05:59.941780Each time you get a value by key, lo4container returns a differences instance. If you want the same instance to be returned for all calls, usesharemethodimport datetime
container['timer'] = lambda c: return datetime.datetime.now()
container.share('timer')

print(container['time'])
# output: 2018-07-07 14:05:59.941780

print(container['time'])
# output: 2018-07-07 14:05:59.941780

print(container['time'])
# output: 2018-07-07 14:05:59.941780
# same results for n calls