Saravanan666/pypi-org huggingface dataset:
Package: lightconfig
The LightConfig library enables you to get a easy way to create or read config fileInstallationLightConfig is conveniently available via pip:pip install lightconfigor installable viagit cloneandsetup.pygit clone https://github.com/daassh/LightConfig.git
python setup.py installUsageImportfromlightconfigimportLightConfigCreatecfg=LightConfig("config.ini")(if specific path not exists, the path file will be create)Read / WriteUsually, you can read/write config by both attribute and itemread/write by attribute>>>cfg.section.option='value'>>>cfg.section.option'value'read/write by item>>>cfg['section']['option']='value'>>>cfg['section']['option']'value'write by section>>>cfg.section1={'option1':'value1'}>>>cfg['section2']={'option2':'value2'}>>>cfg{'section1':{'option1':'value1'},'section2':{'option2':'value2'}}But in some situation, you can only useread/write by item:section/option name can’t be python variable namewrong>>>cfg.section-2.2option='value2'...SyntaxError:invalidsyntaxright>>>cfg['section-2']['2option']='value2'section/option name iskeysor__dict__keysand__dict__are inner method ofLightConfig(keysused to makeLightConfigobject dictable,__dict__used to visit other inner method ofLightConfig), so when usingkeysor__dict__as section/option name, you can only access it by item:wrong>>>cfg.keys.option3='value3'...AttributeError:'method'objecthasnoattribute'option3>>>cfg.keys<boundmethodLightConfig.keysof...>>>>cfg.__dict__.option4='value4'...AttributeError:'dict'objecthasnoattribute'option4'>>>cfg.__dict__{'_config_path':'','_try_encoding':{},...}right>>>cfg['keys'].option3='value3'>>>cfg['keys']{'option3':'value3'}>>>cfg['__dict__'].option4='value4'>>>cfg['__dict__']{'option4':'value4'}Deleteusedelto delete section/option:>>>delcfg.section.option>>>'option'incfg.sectionFalse>>>delcfg['section']>>>'section'incfgFalseDictableusedictto convertLightConfigorLightConfig.Sectionobject to dict:>>>type(dict(cfg))<class'dict'>>>>type(dict(cfg.section))<class'dict'>Iterable>>>forsection_name,section_infoincfg:...print(section_name)...foroption,valueinsection_info:...print('{}={}'.format(option,value))section1option1=value1section2option2=value2
Package: light-controller
Light ControllerThis package aims to manage lights thanks to the FG-PDV400W-24-8T with an UART connection protocolFree software: BSD licenseDocumentation:https://light-controller.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2022-10-12)First release on PyPI.
Package: lightct
lightct is a python package for visual light computed tomography. With just a webcam and a rotating stage the package will allow for the acquisition of 2D projections and the reconstruction of objects in 3D.This package will be showcased at the Royal Society Summer Exhibition (4th - 10th July 2016), allowing members of the public to run their own synchrotron style experiment:https://royalsociety.org/events/summer-science-exhibition/exhibits/4d-science/
Package: lightcurator
LightCurveLightCurve is a module that creates light curves of a similar field of stars.
This is useful in time domain astronomy in search of transient events
and studies of variable stars, i.e. eclipsing binaries.Table of ContentsInstallationUsagefrom lightcurator import lightcurves as lc

object_table = lc.makelist('')

# parallelized alignment
object_table = lc.paralign(object_table)

# or serial alignment
object_table = lc.align(object_table)

# All-in-one
object_table = lc.do_lightcurve(object_table)The process follows:Take image listAlign imagesCreate a deepsky imagePlate solve deepsky usingastrometerySorce extraction from deepsky imageCreatereference imagewith all candidate sources circledMatch sources between aligned imagesCross match sources from aligned images with sources from deepsky imageCreate Timeseriesplotof different sourcesCross match sources with catalogs like VSX and GCVSCreditsLicense
Package: lightcurve-fitting
# Light Curve FittingThis package contains tools to fit analytical models to multiband light curves of astronomical transients.Please read the [documentation](https://griffin-h.github.io/lightcurve_fitting/) and see the included Jupyter notebook [lightcurve_fitting.ipynb](lightcurve_fitting.ipynb) for tips on how to get started.
If you need help after that, feel free to contact the first author for help.If you use this code in a publication, pleasecite the original paperswhose models you used, as well as my Zenodo repository. [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2639463.svg)](https://doi.org/10.5281/zenodo.2639463)
Package: lightcurves
lightcurvesThis is the lightcurve repository. Check it out:See here for scientific application of this code:https://pos.sissa.it/395/868Please don't hesitate to reach out if you have questions or new ideas!LC.pyInitialize a LightCurve object based on time, flux and flux_error.
Study its Bayesian block representation (based on Scargle et al. 2013https://ui.adsabs.harvard.edu/abs/2013arXiv1304.2818S/abstract).Characterize flares (start, peak, end time) with the HOP algorithm (following Meyer et al. 2019https://ui.adsabs.harvard.edu/abs/2019ApJ...877...39M/abstract). There are four different methods to define flares (baseline, half, flip, sharp) as illustrated in the Jupyter Notebook.HOP.pyInitialize a Hopject to consider parameters of an individual flare.LC_SetInitialize a (large) sample of light curves to study the distribution of flare parameters whithin that sample.If you use this code please cite:Wagner, S. M., Burd, P., Dorner, D., et al. 2021, PoS, ICRC2021, 868https://ui.adsabs.harvard.edu/abs/2022icrc.confE.868W/abstract
Package: lightdash-client-python
lightdash-client-pythonA client library for accessing Lightdash APIUsageFirst, create a client:fromlightdash_clientimportClientclient=Client(base_url="https://api.example.com")If the endpoints you're going to hit require authentication, useAuthenticatedClientinstead:fromlightdash_clientimportAuthenticatedClientclient=AuthenticatedClient(base_url="https://api.example.com",token="SuperSecretToken")Now call your endpoint and use your models:fromlightdash_client.modelsimportMyDataModelfromlightdash_client.api.my_tagimportget_my_data_modelfromlightdash_client.typesimportResponsemy_data:MyDataModel=get_my_data_model.sync(client=client)# or if you need more info (e.g. status_code)response:Response[MyDataModel]=get_my_data_model.sync_detailed(client=client)Or do the same thing with an async version:fromlightdash_client.modelsimportMyDataModelfromlightdash_client.api.my_tagimportget_my_data_modelfromlightdash_client.typesimportResponsemy_data:MyDataModel=awaitget_my_data_model.asyncio(client=client)response:Response[MyDataModel]=awaitget_my_data_model.asyncio_detailed(client=client)By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.client=AuthenticatedClient(base_url="https://internal_api.example.com",token="SuperSecretToken",verify_ssl="/path/to/certificate_bundle.pem",)You can also disable certificate validation altogether, but beware thatthis is a security risk.client=AuthenticatedClient(base_url="https://internal_api.example.com",token="SuperSecretToken",verify_ssl=False)There are more settings on the generatedClientclass which let you control more runtime behavior, check out the docstring on that class for more info.Things to know:Every path/method combo becomes a Python module with four functions:sync: Blocking request that returns parsed data (if successful) orNonesync_detailed: Blocking request that always returns aRequest, optionally withparsedset if the request was successful.asyncio: Likesyncbut async instead of blockingasyncio_detailed: Likesync_detailedbut async instead of blockingAll path/query params, and bodies become method arguments.If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)Any endpoint which did not have a tag will be inlightdash_client.api.defaultExample: Get dashboards in a projectHere is an example to get all dashboards in a project.fromlightdash_clientimportAuthenticatedClientfromlightdash_client.api.dashboardimportget_dashboardsapi_key="..."project_uuid="..."client=AuthenticatedClient(base_url="https://app.lightdash.cloud/api/v1",token=api_key)dashboards=get_dashboards.sync(client=client,project_uuid=project_uuid)print(dashboards)
Package: lightdash-ops
lightdash-opsThis is a python-basedLightdash.
It focuses on to operate resources like users' roles and spaces on Lightdash by calling, asthe official CLI, asThe Lightdash CLI | Documentation | Lightdashenables us to deploy projects and so on.
For instance, we can get membersInstallpip install -U lightdash-opsSettingsWe can configure the API endpoint and so on with environment variables.
We can also take advantage of an.envfile.
The template is located at.env.template.# .env
LIGHTDASH_URL=https://localhost:8000
...How to useThe CLI requires a personal access token to call the Lightdash APIs.The official documentationdescribes how to get personal access tokens.The CLI provides many sub commands.
Please refer to the detailed documentation indocs/cli.ms.ExampleThe subsequent command is used to get all members in an organization.$ export LIGHTDASH_URL="https://localhost:8000"
$ export LIGHTDASH_API_KEY="YOUR-LIGHTDASH-PERSONAL-ACCESS-TOKEN"
$ lightdash-ops organization get-members
[
  {
    "member_uuid": "ade0aef5-bca8-4cbe-819b-07803390ffb0",
    "email": "lightdash-member@example.com",
    "role": "member"
  },
  {
    "member_uuid": "d7ee948b-26d6-461a-b289-906cc7bb0c73",
    "email": "lightdash-admin@example.com",
    "role": "admin"
  }
]
Package: light-database
简介light-database 是一个用于简化数据库交互的 Python 包。它支持多种数据库系统，并提供一个易于使用的接口来执行查询和管理数据库。依赖性thriftrichpandasimpylamysqlclientDBUtilsportalockercryptography安装通过 pip 安装：condainstall-cconda-forgemysqlclient
pipinstallpandasrichportalocker-ihttps://mirrors.aliyun.com/pypi/simple/
pipinstalllight-database快速开始使用 light-database 包初始化项目环境：fromlight_database.configimportEnvConfigEnvConfig.write(section="mysql",host=host,port=port,database=database,user=user,password=password)# EnvConfig.write(section="hive", host=host, port=port, user=user, password=password, auth_mechanism="PLAIN")# EnvConfig.write(section="hbase", host=host, port=port)使用 light-database 包执行查询：fromlight_database.mysql.dbimportMysqlDBdf1=MysqlDB.filter(table)\.select(column1,column2)\.where(column3__in=[1,2],column4=1).df()df2=MysqlDB.filter(table)\.select(column1,column2)\.where(column3__lt=1,column4__ne=1).df[1:2]功能支持多种数据库系统（如 MySQL、Hive、HBase）简洁的 API连接池管理自动转换查询结果
Package: lightdiscord
🤖 An ultra light library to develop discord bots with PythonGet lightdiscordTo install the library, you can just run the following command:#Linux/macOSpython3 -m pip install -U lightdiscord#Windowspy -3 -m pip install -U lightdiscordKey features:warning: If the size of the library and the proximity with the discord api is not absolutely necessary for you,https://github.com/Rapptz/discord.pymay be a better option.Easy to use and quick to learnCurrently the smallest alternative to discord.pySupport custom listenersSupport multiple bot instancesFull support for Bot and User accountsSupport proxiesCustomizable user agentLow level: directly interact with the discord api and manage cache as you wantHow to use?First, you need toimport lightdiscord. You can then create a bot object, specify a token and optional features:user: A boolean (True for user accounts, False by default)listeners: A dictionnary containing your events listeners and the API endpointproxy: A proxy (None for no proxies, None by default)user_agent: The user agent sent to discordbot=lightdiscord.Bot("YOUR_TOKEN",listeners={"READY":on_ready})To start the bot, you need to use an async function. Here is an example with asyncioimportasyncioasyncdefmain(loop):awaitbot.start()if__name__=="__main__":loop=asyncio.get_event_loop()loop.run_until_complete(main(loop))loop.run_forever()You can checkhttps://github.com/Th0rgal/lightdiscord/blob/master/example.py
Package: light-distribution-analysis
Light-Distribution-AnalysisFor more details, you can visit theDocumentation.OverviewLight-Distribution-Analysis is a Python package designed for the analysis of light distribution in images. The package utilizes OpenCV, NumPy, and Matplotlib to enable in-depth yet simple analysis of the flux and power in images based on their wavelength and frequency representations.FeaturesConvert RGB images to wavelength and frequency representations.Apply edge detection on images.Calculate the flux and power of images.Save processed images in various forms, including original, wavelength, frequency, and power images.Calculate similarity scores based on flux and power.Plot power images.Export flux and power data to a CSV file for further analysis (feature planned).InstallationTo install Light-Distribution-Analysis, run the following command in your terminal:pipinstalllight-distribution-analysis
Package: lightecho_stellar_oracle
Python SDK for the Lightecho Stellar Oraclepip install lightecho_stellar_oracleExample:from lightecho_stellar_oracle import OracleClient, TESTNET_CONTRACT_XLM
from stellar_sdk.keypair import Keypair

oracle_client = OracleClient(
    contract_id=TESTNET_CONTRACT_XLM,
    signer=Keypair.from_secret("SAES4O3NXUE2CPIB7YH3O5ROAONADPZRXOEYFC4JPLNY6STOBM2RYLGH"),
    network="testnet",
)
# list the assets
print(oracle_client.assets())

# show the base Currency
print(oracle_client.base())

# get the last price
tx_id, result = oracle_client.lastprice("other", "USD")
print(tx_id)
print(result)

# Printing the updated result
print(result)

#RESULT
#{'price': 0.11, 'timestamp': 1698240296}For more information seehttps://github.com/bp-ventures/lightecho-stellar-oracle.
Package: light-field-distance
Original repo:linkNoteThe code was converted to be able to use LFD metric (distance between two
descriptors) that will compare visual appearance between ground truth mesh and
retrieved mesh.This forkThe original repository was adapted partially to run on Linux. OnlyLightFieldwas changed so it can be used through docker without any dependency. Underneath,
the container uses OSMesa for headless rendering.Requirementspip install trimeshInstallationpipinstalllight-field-distanceorpython setup.py installNo need to explicitly install anything.UsagefromlfdimportLightFieldDistanceimporttrimesh# rest of codemesh_1:trimesh.Trimesh=...mesh_2:trimesh.Trimesh=...lfd_value:float=LightFieldDistance(verbose=True).get_distance(mesh_1.vertices,mesh_1.faces,mesh_2.vertices,mesh_2.faces)The script will calculate light field distances[1]between two shapes.
Example usage:fromlfdimportLightFieldDistanceimporttrimesh# rest of codemesh_1:trimesh.Trimesh=trimesh.load("examples/cup1.obj")mesh_2:trimesh.Trimesh=trimesh.load("examples/airplane.obj")lfd_value:float=LightFieldDistance(verbose=True).get_distance(mesh_1.vertices,mesh_1.faces,mesh_2.vertices,mesh_2.faces)The lower the metric’s value, the more similar shapes are in terms of the visual
appearanceHow does it workThelfd.pyis a proxy for the container that install all the dependency necessary
to run a C code. The code performs calculation of Zernike moments and other
coefficients that are necessary to calculate the distance (3DAlignmentprogram).
Then, these coefficients are saved and run by theDistanceprogram that calculated the
Light Field Distance. It prints out the result and the stdout from the printing
is handled by the python script.If an image for the C code is not found, it builds one. The operation is performed
once and it takes a while to finish it. After that, the script runs the necessary
computations transparently.ContributionFor anyone interested in having a contribution, these are things to be done.
Due to the time constraints, I’m not able to do these on my own:[ ] retrieve calculating coefficients from renders to be returned by a method[ ] bind C code with pybind11 to allow direct computation from the python codewithout any Docker dependencyHow am I sure that it works as supposed?I checked descriptor artifacts from the original implementation and compared with results in the docker through md5sum
Package: lightfm
LightFMBuild statusLinuxOSX (OpenMP disabled)Windows (OpenMP disabled)LightFM is a Python implementation of a number of popular recommendation algorithms for both implicit and explicit feedback, including efficient implementation of BPR and WARP ranking losses. It's easy to use, fast (via multithreaded model estimation), and produces high quality results.It also makes it possible to incorporate both item and user metadata into the traditional matrix factorization algorithms. It represents each user and item as the sum of the latent representations of their features, thus allowing recommendations to generalise to new items (via item features) and to new users (via user features).For more details, see theDocumentation.Need help? Contact me viaemail,Twitter, orGitter.InstallationInstall frompip:pip install lightfmor Conda:conda install -c conda-forge lightfmQuickstartFitting an implicit feedback model on the MovieLens 100k dataset is very easy:fromlightfmimportLightFMfromlightfm.datasetsimportfetch_movielensfromlightfm.evaluationimportprecision_at_k# Load the MovieLens 100k dataset. Only five# star ratings are treated as positive.data=fetch_movielens(min_rating=5.0)# Instantiate and train the modelmodel=LightFM(loss='warp')model.fit(data['train'],epochs=30,num_threads=2)# Evaluate the trained modeltest_precision=precision_at_k(model,data['test'],k=5).mean()Articles and tutorials on using LightFMLearning to Rank Sketchfab Models with LightFMMetadata Embeddings for User and Item Cold-start RecommendationsRecommendation Systems - Learn Python for Data ScienceUsing LightFM to Recommend Projects to ConsultantsHow to citePlease cite LightFM if it helps your research. You can use the following BibTeX entry:@inproceedings{DBLP:conf/recsys/Kula15,
  author    = {Maciej Kula},
  editor    = {Toine Bogers and
               Marijn Koolen},
  title     = {Metadata Embeddings for User and Item Cold-start Recommendations},
  booktitle = {Proceedings of the 2nd Workshop on New Trends on Content-Based Recommender
               Systems co-located with 9th {ACM} Conference on Recommender Systems
               (RecSys 2015), Vienna, Austria, September 16-20, 2015.},
  series    = {{CEUR} Workshop Proceedings},
  volume    = {1448},
  pages     = {14--21},
  publisher = {CEUR-WS.org},
  year      = {2015},
  url       = {http://ceur-ws.org/Vol-1448/paper4.pdf},
}DevelopmentPull requests are welcome. To install for development:Clone the repository:git clone git@github.com:lyst/lightfm.gitSetup a virtual environment:cd lightfm && python3 -m venv venv && source ./venv/bin/activateInstall it for development using pip:pip install -e . && pip install -r test-requirements.txtYou can run tests by running./venv/bin/py.test tests.LightFM usesblackto enforce code formatting and flake8 for linting, seelint-requirements.txt.[Optional]: You can install pre-commit to locally enfore formatting and linting. Install with:pipinstallpre-commit
pre-commitinstallWhen making changes to the.pyxextension files, you'll need to runpython setup.py cythonizein order to produce the extension.cfiles before runningpip install -e ..
Package: lightgallery
Lightgallery markdown ExtensionMarkdown extension to wrap images in a lightbox.Will only wrap images by adding"!"right after the opening"["bracket of the image.![!Description](/img/pic1.png)This will Output :<p><divclass="lightgallery"><ahref="../img/pic1.png"data-sub-html="Description"><imgalt="Description"src="../img/pic1.png"/></a></div></p>The extension is made to work withlightgallery.jsa full featured JavaScript lightgallery/lightbox with no dependencies.Extension inspired by :mardown-lightboxTo test the extension:importmarkdownfromlightgalleryimportLightGalleryExtensionprint(markdown.markdown('![!description](/img/pic1.png)',extensions=[LightGalleryExtension()]))Install$pipinstalllightgalleryHow to make it works with Mkdocs1.Create athemefolder will the following structure in your Mkdocs foldertheme/
|_ css/
|_ fonts/
|_ img/
|_ js/2.Go tolightgallery.js GitHuborJSDELIVRto download the following files to thethemesub-folders as listed belowdist/js/lightgallery.min.js->theme/js/dist/css/lightgallery.min.css->theme/css/dist/fonts/lg.*->theme/fonts/dist/img/loading.gif->theme/img/3.Create atheme/main.hmlfile and add the following code to the file{% extends "base.html" %}

{% block styles %}
    {{ super() }}<linkrel="stylesheet"href="{{ base_url }}/css/lightgallery.min.css">{% endblock styles %}

{% block libs %}
    {{ super() }}<scriptsrc="{{ base_url }}/js/lightgallery.min.js"></script>{% endblock libs %}

{% block scripts %}
    {{ super() }}<script>varelements=document.getElementsByClassName("lightgallery");for(vari=0;i<elements.length;i++){lightGallery(elements[i]);}</script>{% endblock scripts %}4.Modify themkdocs.ymlfile to add the following settings# Documentation and theme
theme:
  custom_dir: 'theme'# Extensions
markdown_extensions:
  - lightgallery5.Change extension settings inmkdocs.ymlAll settings of the extension are optional and can be omitted.# Extensions
markdown_extensions:
  - lightgallery:
      show_description_in_lightgallery: true | false
      show_description_as_inline_caption: true | false
      custom_inline_caption_css_class: 'my-caption-class'SettingDescriptionDefault Valueshow_description_in_lightgalleryAdds the description as caption in lightgallery dialog.trueshow_description_as_inline_captionAdds the description as inline caption below the image.falsecustom_inline_caption_css_classCustom CSS classes which are applied to the inline caption paragraph. Multiple classes are separated via space.EmptyLicenseMIT License