Saravanan666/pypi-org huggingface dataset:
Package: lunisolar-upgraded
Lunisolar is a Python package for handling Chinese calendars. Lunisolar contains a set of helper functions designed to make it easy to convert between the Gregorian (Western) calendar and the Chinese calendar.Based on the works ofHelmer Aslaksen. Built on top ofPyCalCal, the Python implementation of Calendrica 3.0, a set of calendar-related algorithms as described inDershowitz and Reingold’s book “Calendrical Calculations”.UsageInitializing a Chinese date:>>> from lunisolar import ChineseDate
>>> mid_autumn = ChineseDate.from_chinese(chinese_year=2013,
                                          chinese_month=8,
                                          chinese_day=15,
                                          is_leap_month=False)
>>> mid_autumn
chinese_date(year=2013, month=8, day=15, is_leap_month=False)
>>> mid_autumn.gregorian_date
datetime.date(2013, 9, 19)A Chinese date object can be initialized from a Gregorian (western) date:>>> from lunisolar import ChineseDate
>>> moon_landing = ChineseDate.from_gregorian(1969, 7, 20)
>>> moon_landing
chinese_date(year=1969, month=6, day=7, is_leap_month=False)The ChineseDate class shares the same constructors as datetime.date:>>> ChineseDate.today()
chinese_date(year=2012, month=12, day=29, is_leap_month=False)

>>> timestamp = 1360414893.724195
>>> ChineseDate.fromtimestamp(timestamp)
chinese_date(year=2012, month=12, day=29, is_leap_month=False)

>>> ordinal = 734908
>>> ChineseDate.fromordinal(ordinal)
chinese_date(year=2012, month=12, day=29, is_leap_month=False)Retrieving properties of the Chinese calendar:>>> moon_landing = ChineseDate.from_gregorian(1969, 7, 20)
>>> moon_landing.year
1969
>>> moon_landing.month
6
>>> moon_landing.day
7
>>> moon_landing.is_leap_month
False
>>> moon_landing.zodiac
rooster
>>> moon_landing.element
earth
>>> moon_landing.heavenly_stem
ji
>>> moon_landing.earthly_branch
youThe add, subtract, and comparison operators forChineseDateis similar to that of thedatetime.dateobject. For subtraction and comparison, ChineseDate and datetime.date can be used interchangeably.>>> from datetime import timedelta
>>> cdate = ChineseDate.from_gregorian(1969, 7, 20)
>>> gdate = datetime.date(2013, 2, 10)
>>> cdate > gdate
False
>>> gdate - cdate
datetime.timedelta(15911)
>>> diff = timedelta(200)
>>> cdate + diff
chinese_date(year=1969, month=12, day=29, is_leap_month=False)
Package: lunnaris-pyinject
Lunnaris-PyInjectDependency injection library. Aims to be as simple as posible.UsageUsingDependencywill create the object in every call.# example.py# import the dependency you need and the decorator 'inject'fromlunnaris_pyinjectimportDependency,injectclassMyNeededDependency:def__init__(self,arg,other_arg):pass# Supports *args and *kwargsdependency=Dependency(MyNeededDependency,"some argument",other_arg="other arg")@injectdefsome_awesome_function(my_dependency:MyNeededDependency=dependency):# Do something cool with my_dependencypassTo use Singleton patternfromlunnaris_pyinjectimportDependencyclassMyNeededDependency:pass# Same code from above# use is_singleton keyword argumentdependency=Dependency(MyNeededDependency,"one_argument",other_args=1,is_singleton=True)# Same codeTake in count thatis_singletonkeyword argument is reserved and will be removed from the
kwargs dictionary passed to the dependency.You might want to use another object to hold all of your dependency creators.# example.pyfromlunnaris_pyinjectimportDependency,DependantDependency,injectclassDB:passclassService:# No need to specify a default value, since it will be useddef__init__(self,db:DB):passclassMyDependenciesHolder:# A simple dependencydb=Dependency(DB,"connection_string",is_singleton=True)# Here a dependency can call another if the __init__ function is decorated with @injectservice=DependantDependency(Service,db,is_singleton=True)@injectdefsome_func(service:Service=MyDependenciesHolder.service):pass
Package: lunni-cli
Lunni CLILunni's command line interface lets you set up projects ready for continuous
deployment with Lunni, straight from the command line.InstallationTo install Lunni CLI, make sure you have Python version 3.11 or later. You'll
also want tohave pipx, a package
manager for installing Python CLI tools.pipx install lunni-cli
lunni --install-completion [bash|zsh|fish|powershell]This installs Lunni CLI globally, so you can runlunnicommands from any
directory. You can check the version and find out some basic information about
the tool with the following command:lunni versionCLI commandsTo get a list of commands, runlunni --help. To get a list of command
arguments & flags runlunni COMMAND --help.lunni createSet up projects ready for deployment on Lunni (or Docker Swarm).We provide some templates you can use:Modern Python setupwith Poetry,
FastAPI or Flask, CI/CD, code quality and testingA simple static site serverbased on Caddymore coming soon!lunni dev & runRun an app locally. This just wrapsdocker-compose upanddocker-compose runrespectively, but it allows you to save some keystrokes.
Package: luno
Luno Python LibrarySync and Async Python 3 clients for the Luno APIQuickstartThis library includes 2 types of clients, a sync client built using therequestslibrary and an async library built withtreqandtwisted.Sync clientfromluno.clients.syncimportLunoSyncClientapi_key=''api_secret=''client=LunoSyncClient(api_key=api_key,secret=api_secret)client.ticker('XBTZAR')Async clientfromtypingimportDictfromtwisted.internetimportreactorfromluno.clients.asynchronousimportLunoAsyncClientapi_key=''api_secret=''client=LunoAsyncClient(api_key=api_key,secret=api_secret)d=client.ticker('XBTZAR')# returns a twisted deferreddefprint_data(data:Dict)->None:"""prints the json response from an API call"""print(data)d.addCallback(print_data)reactor.run()InstallationThe library can be installed from PyPi as follows.pipinstalllunoThe async client is an optional extra and may be installed as follows.pipinstallluno[async]To install the version on this repository follow the steps below.gitclonehttps://github.com/BradleyKirton/lunocdluno
python-mvenvenv# virtualenv envsourceenv/bin/activate
pipinstall.#pip install .[async] for the async clientDevelopementClone the repo and install the package with it's development requirements.gitclonehttps://github.com/BradleyKirton/lunocdluno
python-mvenvenv# virtualenv envsourceenv/bin/activate
pipinstall-e.[dev]pytestTODONote this library is still in beta.Write documentation
Package: lunr
Lunr.pyA Python implementation ofLunr.jsbyOliver Nightingale.A bit like Solr, but much smaller and not as bright.This Python version of Lunr.js aims to bring the simple and powerful full text search
capabilities into Python guaranteeing results as close as the original
implementation as possible.DocumentationWhat does this even do?Lunr is a simple full text search solution for situations where deploying a full
scale solution like Elasticsearch isn't possible, viable or you're simply prototyping.
Lunr parses a set of documents and creates an inverted index for quick full text
searches in the same way other more complicated solution.The trade-off is that Lunr keeps the inverted index in memory and requires you
to recreate or read the index at the start of your application.Interoperability with Lunr.jsA core objective of Lunr.py is to provideinteroperability with the JavaScript version.An example can be found in theMkDocs documentation library.
MkDocs produces a set of documents from the pages of the documentation and usesLunr.jsin the frontend to power its built-in searching
engine. This set of documents is in the form of a JSON file which needs to be
fetched and parsed by Lunr.js to create the inverted index at startup of your application.While this is not a problem for most sites, depending on the size of your document
set, this can take some time.Lunr.py provides a backend solution, allowing you to parse the documents in Python
of time and create a serialized Lunr.js index you can pass have the browser
version read, minimizing start up time of your application.Each version of lunr.pytargets a specific version of lunr.jsand produces the same results for anon-trivial corpus of documents.Installationpip install lunrAn optional and experimental support for other languages thanks to theNatural Language Toolkitstemmers is also available viapip install lunr[languages]. The usage of the language feature is subject toNTLK corpus licensing clauses.Please refer to thedocumentation page on languagesfor more information.UsageFirst, you'll need a list of dicts representing the documents you want to search on.
These documents must have a unique field which will serve as a reference and a
series of fields you'd like to search on.Lunr provides a conveniencelunrfunction to quickly index this set of documents:>>>fromlunrimportlunr>>>>>>documents=[{...'id':'a',...'title':'Mr. Green kills Colonel Mustard',...'body':'Mr. Green killed Colonel Mustard in the study with the candlestick.',...},{...'id':'b',...'title':'Plumb waters plant',...'body':'Professor Plumb has a green plant in his study',...}]>>>idx=lunr(...ref='id',fields=('title','body'),documents=documents...)>>>idx.search('kill')[{'ref':'a','score':0.6931722372559913,'match_data':<MatchData"kill">}]>>>idx.search('study')[{'ref':'b','score':0.23576799568081389,'match_data':<MatchData"studi">},{'ref':'a','score':0.2236629211724517,'match_data':<MatchData"studi">}]Please refer to thedocumentationfor more usage examples.
Package: luoshu-python-sdk
Keywords: discovery,configuration,management,micro-service
Home-Page:https://github.com/hubertshelley/luoshuAuthor: Hubert Shelley <hubertshelley@163.com>
Author-email: Hubert Shelley <hubertshelley@163.com>
License: Apache-2.0
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Source Code,https://github.com/hubertshelley/luoshu# luoshu-python-sdk
洛书python端SDK
Package: luparnet
Luparnet**Luparnet** is a barebones machine learning that creates a simple class "net". Thisnetwork can then be trained.MethodsThe network takes only two arguments in the constructor, the first beingthe desired number of layers and the second being an array of the data dimensions.
The train function takes three arguments with an option for overload. The function
takes first the number of epochs to train for, the second is the input data, the
third is the output data. The final argument is an integer which allows for debugging
and user training.
Package: lupe
WIPCurrently in development.Save time building command-line apps withLUPEInstall$pipinstalllupeFeaturesParses argumentsConverts flags snake_case for easier useNegates flags when using the--no-prefixOutputs version when-v,--versionOutputs description and supplied help text when-h,--helpUsageOn the command line:$pythonmain.pydinner--mango--no-bananaOn the app:#!/usr/bin/pythonimportlupehelp="""Usage foo [input]Options-h, --help      Show this help message and exit-v, --version   Show version and exit-m, --mangeo    Include a mangoExamples$ main.py dinner --mango --no-banana"""cli=lupe(help,{'flags':{'mango':{'type':'boolen','alias':'m'},'banana':{'type':'boolen',}}})print(cli.flags)# {'mango': True, 'banana': False}print(cli.inputs)# [dinner]APIlupe(help_message, options?)lupe(options)Returns anobjectwith:inputs(Array)- Non-flag argumentsflags(Object)- Flags converted to snake_case excluding aliaseshelp(string)- The help text used with--helpshow_help([exit_code=2])(Function)- Show the help text and exit withexit_codeshow_version()(Function)- Show the version text and exithelp_messageType:stringoptionsType:objectShortcut for thehelpoption.versionType:stringVersion of the command-line application.flagsType:objectDefine argument flags.The key is the flag name in snake_case and the value is an object with any of:type: Type of value. (Possible values:stringbooleannumber)alias: Usually used to define a short flag alias.default: Default value when the flag is not specified.required: Determine if the flag is required. (Default: false)Note that flags are always defined using a snake_case key (my_key), but will match arguments in kebab-case (--my-key).Example:flags={'unicorn':{'type':'string','alias':'u','default':['rainbow','cat'],'required':True,}}CreditBased onmeowfrom@sindresorhusLicenseMIT ©Abraham Hernandez
Package: lupe-mice
The LUPE Pain AnalysisIntroducing LUPE, the innovative no code website predicting pain behavior in mice.
With our platform, you can input pose and classify mice behavior inside the LUPE Box.
LUPE can further summarize a composite pain score for mice behavior.
Best of all, LUPE runs without the need for a GPU.
With in-depth analysis and interactive visuals, as well as downloadable CSVs for easy integration into your existing workflow,
Try LUPE today and unlock a new level of insights into animal behavior.Installationpip install lupeUsagelupe guiProject fundingCollaboration between Corder Lab at University of Pennsylvania and
Yttri Lab from Carnegie Mellon.
Alex Hsu actively develops and maintains this repository/cloud resource.Anaconda environment to better support developmentconda create -n lupe python=3.9
pip install lupeWebsiteThanks to Streamlit Community Cloud,
we are able to bring mobile data analytics to life!
Stay tuned for the free cloud app.LICENSELUPE App is released under a
Clear BSD License
and is intended for research/academic use only.
Package: lupin3
Lupin3目前0.0.12 稳定版本已经完成功能更新数据清洗缺失值填充类别缺失值填充'other'float缺失值填充 0标准化Standard模型LRSVMRFDT计划更新缺失值填充float均匀填充float决策树填充类别mode填充
Package: lupin4
lupin4[][pypi-url]
[][docs-url]lupin4 is designed to make the model developing work easily and conveniently.
It contains these functions below in one key operation: data exploratory analysis, feature selection, feature binning,
data visualization, scorecard modeling(a logistic regression model with excellent interpretability), performance measure.Let's get started.Usage1.Exploratory Data Analysislupin4.detect()lupin4.quality()lupin4.IV()lupin4.VIF()lupin4.PSI()2.Feature Selectionlupin4.select()lupin4.stepwise()3.Binninglupin4.Combiner()lupin4.WOETransformer()lupin4.bin_stats()lupin4.bin_plot()4.Modelinglupin4.ScoreCard()5.Performance Measurelupin4.perform()lupin4.LIFT()lupin4.score_plot()lupin4.KS_bucket()lupin4.PPSI()lupin4.KS()lupin4.AUC()6.One Key Auto Modelinglupin4 also provides a function which runs all the steps above automatically:lupin4.auto_model()For more details, please refer to the wiki page. Enjoy.Installvia pippipinstalllupin4--upgrade-ihttps://pypi.org/simplevia source codepythonsetup.pyinstallinstall_requires = [
'numpy >= 1.18.4',
'pandas >= 0.25.1, <=0.25.3',
'scipy >= 1.3.2',
'scikit-learn =0.22.2',
'seaborn >= 0.10.1',
'statsmodels >= 0.13.1',
'tensorflow >= 2.2.0, <=2.5.0',
'hyperopt >= 0.2.7',
'pickle >= 4.0',
]
Package: lupoclient
Zorro Clientzorro-clientis a library written for use with Zorro, an algorithmic trading platform. This library includes a full API client with access to user-written indicators and strategies. In addition, it includes the backtesting framework and scripting language used by Zorro, so you can test out your strategies on your own data as well.Install$ pip3 install zorro-clientExampleimportzorrotheAPI=zorro.Api(api_key="your-api-key",secret_key="your-secret-key")my_indicator=theAPI.indicators['indicator-id']my_strategy=theAPI.strategies['strategy-id']stock_data=zorro.StockData.create(["AAPL","AMZN"],"2020-01-03","2020-07-11","1d")# backtest the strategybacktest=my_strategy.create_backtest(stock_data)backtest.simulate()# find important detailsbacktest_results=backtest.analyze()sharpe_ratio=backtest_results['sharpe_ratio']alpha=backtest_results['alpha']beta=backtest_results['beta']profit_pct=backtest_results['profit_percent']profit=backtest_results['profit']trade_history=backtest.trade_historyprint(backtest_results)UsageImportimportzorroCreate a strategymy_strategy=zorro.Strategy({"type":"order","stock":"AAPL","qty":"10"})Execute the strategy on a paper APINo setup required.paper_broker=zorro.PaperBroker()my_strategy.execute(handler=paper_broker)Execute the strategy on a live APITo do this, you will need an Alpaca account. You can create onehere.live_broker=zorro.LiveBroker(alpaca_api_key_id="<Your API key>",alpaca_api_secret="<Your API secret")my_strategy.execute(handler=live_broker)Thank you for using Zorro!If you have any questions, reach out to us atour email.
Package: lupro-scheduler
Lupro SchedulerLupro Scheduler 是一个任务链同步调度器(支持协程,线程,进程同步通讯)安装Lupro_Scheduler使用PyPi安装 LupropipFind, install and publish Python packages with the Python Package Indexpip install lupro_scheduler开始使用导入from lupro_scheduler import Scheduler调度任务Taskfromlupro_schedulerimportTaskfromlupro_scheduler.typingimportRunIOintensiveimportasyncioasyncdefmain(a,b):awaitasyncio.sleep(2)returna+btask=Task(main,range(10),kwargs=[{'b':i}foriinrange(10)],method=RunIOintensive.RunAsync_CREATETASK)print(task.run())这样即可使用RunTask调用不同的执行方法调用方法 RunTaskclassRunTask(enum.Enum):'''RunTask method'''APPLY=0APPLYASYNC=1MAP=2MAPASYNC=3EXECUTOR=4RunAsync_CREATETASK=10RunAsync_GATHER=11RunAsync_ASCOMPLETED=12RunAsync_RUNFOREVER=13RunThreadMap_MAP=20RunTreadPool_POOL=30RunGevent_GEVENT=40RunGevent_MAP=41任务链调度 Schedulerfromlupro_schedulerimportSchedulerfromlupro_scheduler.typingimportRunIOintensiveimportrandomimportasyncioimporttimeasyncdefmain(a,b):awaitasyncio.sleep(random.randint(4,8))print(f'IOintensive task{a}{b}!')returna+bdefmain1(a):print(f'Calintensive task{a}!')time.sleep(random.randint(1,4))returna**aif__name__=='__main__':task=Scheduler()# 添加IO密集型任务task.addIO(main,range(10),kwargs=[{'b':i}foriinrange(10)],method=10)# 添加计算密集型任务task.addCal(main1)# 大概12s左右完成print(task.run())特性协程接口线程接口进程接口任务链异步调度任务链同步调度Scheduler(IO) 可等待api 文档完善中
Package: lupuxt2py
LUPUSEC XT2 (Client)Python-Library to communicate and interface with Lupusec X2 System.API-CALLs to Lupusec XT2 with LupusecSevice:GET /action/deviceGet -> return dictionary with device class as key and lists of specific type as valueGET /action/systemGet -> return system informationGET /action/panelCondGet -> return alarm panels and updatesPOST /action/panelCondPost -> activate/deactivate alarm modePOST /action/deviceSwitchPSSPost -> switch on/off somethingPoll Lupusec XT2 in a timeloop with LupusecStateMachineAttentionI can only support devices, which I have on my own! Todos if anyone would like to add a device:Add a sample response to folder tests/responsesAdd unit-tests to folder tests
Package: lupyne
Lupyne is a search engine based onPyLucene, the Python extension for accessing Java Lucene. Lucene is a relatively low-level toolkit, and PyLucene wraps it through automatic code generation. So although Java idioms are translated to Python idioms where possible, the resulting interface is far from Pythonic. See./docs/examples.ipynbfor comparisons with the Lucene API.Lupyne also provides GraphQL and RESTful search services, based onStarlette. Note Solr and Elasticsearch are popular options for Lucene-based search, if no further (Python) customization is needed. So while the services are suitable for production usage, their primary motivation is to be an extensible example.Not having to initially choose between an embedded library and a server not only provides greater flexibility, it can provide better performance, e.g., batch indexing offline and remote searching live. Additionally only lightweight wrappers with extended behavior are used wherever possible, so falling back to using PyLucene directly is always an option, but should never be necessary for performance.UsagePyLucene requires initializing the VM.importlucenelucene.initVM()Indexes are accessed through anIndexSearcher(read-only),IndexWriter, or the combinedIndexer.fromlupyneimportenginesearcher=engine.IndexSearcher('index/path')hits=searcher.search('text:query')See./lupyne/services/README.mdfor services usage.Installation%pipinstalllupyne[graphql,rest]PyLucene is notpipinstallable.Install instructionsDockerimage:docker pull coady/pyluceneHomebrewformula:brew install coady/tap/pyluceneDependenciesPyLucene >=9.6strawberry-graphql (if graphql option)fastapi (if rest option)Tests100% branch coverage.%pytest[--cov]
Package: lura
lurais a collection of devops-oriented utility modules.ModuleDescriptionassetssyntactic sugar forpkg_resourcesatapi for periodic task scheduling usingscheduleattrsdicts with keys accessible as attributesclickclick helpersexpandersapi for expanding templates with jinja2, etc.formatsapi for dealing with json, yaml, csv, etc.fsfilesystem helpershashsyntactic sugar for hashliblogutilsextensions for logging and an easy package-level configuratormessagingapi for sending messages to discord, teams, etc.rpcsyntactic sugar forrpycrunpopen front-end with sudo supportthreadsthreads which capture their results and exceptionstimetime utilities
Package: lurk
A script which extracts HTML from web pages that match a certain CSS pattern.$ pip install lurkusagein pythonIn python, lurk returns a dictionary:from lurk import lurk

for link in lurk('http://en.wikipedia.org/wiki/en', 'a'):
    if 'href' in link:
        print link['href']in bashIn bash, lurk returns JSON.Familiarize yourself withCSS attribute selectors.$ lurk \
http://www.gnu.org/software/libc/manual/html_node/Function-Index.html \
'a[href*="#index-"]' \
> links.jsonThis command saves a JSON object containing an array of links to all GNU C functions intolinks.json:[
  {
    "code": "*pthread_getspecific",
    "href": "Thread_002dspecific-Data.html#index-_002apthread_005fgetspecific"
  },

  {
    "code": "*sbrk",
    "href": "Resizing-the-Data-Segment.html#index-_002asbrk"
  },

  // ...
]
Package: lurker
Lurker======Lurker is a tiny mysql wrapper built on the top of python-mySQLdb.Installation======```git clone git://github.com/emre/lurker.gitpython setup.py install```Quick Tutorial======Connecting to the database--------* with Configuration objects. (This could be preferrable for seperating environments like DevConfig, ProdConfig, TestConfig)``` pythonclass DatabaseConfig(BaseLurkerConfig):host = 'localhost'user = 'root'passwd = ''db = ''connection = Connection(DbConfig)```* without Configuration objects```pythonconnection = Connection().quick_connect("mysql_user", "mysql_passwd", "db_name", "host")```Sending Queries--------``` python# returns last_idconnection.execute("INSERT INTO table_name (name) VALUES (%s)", ['Selami Sahin', ])# returns row countconnection.execute("UPDATE table_name SET name = %s", ["Muhittin Bosat", ])# returns a result setall_people = connection.get_results("SELECT * FROM people")# returns a rowone_people = connection.get_row("SELECT * FROM people WHERE id = 1")# server-side cursorfor person in connection.iterate("SELECT * FROM people"):print person```Query Caching Support with Redis--------* In order to activate caching support, you need to set cache and cache_information variables in your config class.``` pythonfrom lurker.configuration import BaseLurkerConfigfrom lurker.connection import Connectionfrom lurker.cache.backends.redis_backend import RedisBackendclass DbConfig(BaseLurkerConfig):host = 'localhost'user = 'root'passwd = 'passwd'db = 'db_name'cache = Truecache_information = {'backend': RedisBackend,'args': (),'kwargs': {'host': 'localhost', 'port': 6379, 'db': 0},}```* Usage in get_results and get_row``` pythonprint connection.get_row("SELECT * FROM people WHERE id = %s", parameters=(1,), cache=30)print connection.get_row("SELECT * FROM people WHERE id = %s", parameters=(1,), cache=30)# output# DEBUG:root:cache miss: SELECT * FROM people WHERE id = %s# {'id': 1L, 'name': u'Emre Yilmaz'}# DEBUG:root:cache hit: SELECT * FROM people WHERE id = %s# {u'id': 1, u'name': u'Emre Yilmaz'}```Maintainer======Emre Yılmaz - [@emre_yilmaz](http://twitter.com/emre_yilmaz)Contributors=============Mirat Can Bayrak - [@mirat](http://twitter.com/mirat)Projects/Scripts powered by lurker====================================- Database Copy: https://gist.github.com/4686232#file-db_copy-py