Saravanan666/pypi-org huggingface dataset:
Package: lixinger-openapi
# lixinger-openapi## 简介本Python包是[理杏仁开放平台](https://www.lixinger.com/open/api)WEB API的**非官方**Python封装，目的是方便Python量化分析者使用理杏仁开放平台数据。## 快速使用指南1. 使用set_token设置自己的token，设置后会在当前目录生成token.cfg文件，里面保存了你的token值，这样下次在当前目录使用的时候就不需要再执行set_token了。如果不想生成文件，可以设置参数write_token=False。2. 使用query_json获取json格式数据，使用query_dataframe获取dataframe格式数据3. 查询入参为url_suffix和query_params- url_suffix是请求的API地址后缀，前面的https://open.lixinger.com/api/ 就不需要写了，比如https://open.lixinger.com/api/a/indice/samples 只需要传入'a/indice/samples'即可。- url_suffix还支持一种更好用的写法，就是'a.indice.samples'，底层会把.替换成/。- query_params 你可以认为这就是传给API的json，只是token已经设置过了，就不需要写了。4. 返回结果- query_json的返回结果和网站上一模一样- query_dataframe的返回结果有点不同，就是data域用dataframe格式替换了。## 版本更新内容### 版本1.0.0重大改版，取消了业务封装，直接使用底层api，反而更灵活### 版本0.2.5适配新URL### 版本0.2.4适配新URL，修改接口名，禁用不可用接口### 版本0.2.3适配新的请求URL### 版本0.2.2修复使用错误的查询条件无返回结果的BUG### 版本0.2.1适配新的返回结构。新返回结构将数据放到'data'字段里，新增'code'返回值，和'msg'返回消息。### 版本0.2.0适配港股接口，原有A股接口不变更新文档，添加港股查询示例### 版本0.1.1适配pip版本10.0### 版本0.1.0初始版本，支持A股数据查询，支持json和dataframe格式## 安装### 从PyPI安装`pip install lixinger-openapi`### 从Github安装`pip install git+http://github.com/ShekiLyu/lixinger-openapi.git`### 从PyPI更新版本`pip install --upgrade lixinger-openapi`### 从Github更新版本`pip install --upgrade git+http://github.com/ShekiLyu/lixinger-openapi.git`## 使用示例详细使用方法请参考[用户使用指南](https://github.com/ShekiLyu/lixinger-openapi/blob/master/doc/user_guide.ipynb)。
Package: liyi-cute
liyi_cute: Text Toolsliyi_cute 是文本辅助工具，帮助NlPer减少模型输入前的预处理工作online documentation:the read docsUsage:pythonsetup.pyinstallpipinstallliyi_cuteinstall packagespipinstall-rrequirements.txt数据结构{"id":1,"document":"xxxx","":""}信息抽取实体抽取， 关系抽取，事件抽取， 属性抽取
以brat标注为例子:
标注文件开头标志
Entity: T[entities]ProteinEntityT8Negative_regulation 659 668deficientT9Gene_expression 684 694expression{"entities":[{"mention":"expression","type":"Gene_expression","start":447,"end":457,"id":"T1"}]}Rlation: R[relations]Protein-ComponentArg1:Protein, Arg2:EntitySubunit-ComplexArg1:Protein, Arg2:EntityR1Protein-Component Arg1:T11 Arg2:T19R2Protein-Component Arg1:T11 Arg2:T18## 暂时不支持EquivArg1:Protein, Arg2:Protein, <REL-TYPE>:symmetric-transitive*Equiv T3 T4{"relations":[{"type":"Part-of","arg1":{"mention":"c-Rel","type":"Protein","start":139,"end":144,"id":"T1"},"arg2":{"mention":"NF-kappa B","type":"Complex","start":163,"end":173,"id":"T2"},"id":"R1"}]}Event: E 暂时不支持[events]Gene_expression Theme:ProteinBinding Theme+:ProteinE3Binding:T9 Theme:T4 Theme2:T5 Theme3:T6E4Binding:T20 Theme:T16 Theme2:T17 Theme3:T19## 暂时不支持E6Negative_regulation:T10 Cause:E3 Theme:E5Attribute: A 暂时不支持[attributes]Negation        Arg:<EVENT>Confidence        Arg:<EVENT>, Value:Possible|Likely|Certain
Package: lizard-raster-reducer
lizard-raster-reducerIntroductionLizard raster reducer is a tool to auto-generate regional reports from Lizard data.
It “reduces” raster data to aggregate statistics for multiple regions.
Lizard API endpoints are used to retrieve data. The main ones are search, rasters, regions and raster-aggregates.
To prevent API overload, the tool creates and fills a ‘lizard_cache’ folder by default.Multiple rasters can be specified. The first raster will act as the scope raster.
The scope raster determines the spatial extent and temporal behaviour of the result. Rasters can be temporal or static. Rasters can contain continuous values or discrete classes. Regions of one region type are used for the result. Regions within the spatial extent of the scope raster are used in the result. A configuration file is used to customize the output.The results are aggregate numbers of data per region.
When the data type is interval or ratio, the average of the region is returned.
When data are classes, the area fraction per class are returned.
The output format can be specified to be CSV, JSON or HTML.InstallationWe can be installed with:$ pip install lizard-raster-reducerUsage (iPython notebook example)This example notebook (link)exemplifies how the Lizard raster reducer can be used.Usage (command line example)Create .yml configuration files from templates:$ run-lizard-raster-reducerSpecify reducer options in reducer_options.yml.Specify Lizard credentials in credentials.ymlReview optional arguments to pass: run-lizard-raster-reducer -hRun the code: run-lizard-raster-reducerFind result(s) in local sub-folder /reducer_resultsDevelopment installation of this project itselfWe’re installed withpipenv, a handy wrapper
around pip and virtualenv. Install that first withpip install pipenv. Then run:$ PIPENV_VENV_IN_PROJECT=1 pipenv --three
$ pipenv install --devThere will be a script you can run like this:$ pipenv run run-lizard-raster-reducerIt runs themain()function inlizard-raster-reducer/scripts.py,
adjust that if necessary. The script is configured insetup.py(seeentry_points).In order to get nicely formatted python files without having to spend manual
work on it, run the following command periodically:$ pipenv run black lizard_raster_reducerRun the tests regularly. This also checks with pyflakes, black and it reports
coverage. Pure luxury:$ pipenv run pytestThe tests are also run automaticallyon travis-ci, you’ll see it
in the pull requests. There’s alsocoverage reportingon
coveralls.io (once it has been set up).If you need a new dependency (likerequests), add it insetup.pyininstall_requires. Afterwards, run install again to actually install your
dependency:$ pipenv install --devChangelog of lizard-raster-reducer0.6 (2019-04-30)Options for hectares (besides fraction) and temporal range (besides last timesteps)0.5 (2019-04-11)Improved readme0.4 (2019-04-08)Notebook example to demonstrate usage0.3 (2019-04-08)Functionality to set regional alarms.0.2 (2019-03-27)First deploy to pypi.org.0.1 (2019-03-27)Initial project structure created with cookiecutter andhttps://github.com/nens/cookiecutter-python-template
Package: lizard-structure
Lizard-structure project documentationTagline of this app:structure of Lizard, defined and documented in a REST
interface.Most important project linksCode is on github:https://github.com/lizardsystem/lizard-structureDocumentation on readthedocs.org:https://lizard-structure.readthedocs.org/Tested on travis:https://travis-ci.org/lizardsystem/lizard-structure.CreditsReinout van Rees started this library.Changelog of lizard-structure0.1 (2012-12-05)Documented the four core Lizard concepts. [reinout]Set up documentation generation athttps://lizard-structure.readthedocs.org/. [reinout]Set up testing on travis:https://travis-ci.org/lizardsystem/lizard-structure. [reinout]Removed lizard-ui dependency. [reinout]Initial project structure created with nensskel 1.30.dev0. [reinout]
Package: lizardwizard
lizardwizardIt is time to make reptilian better.
Introducing lizardwizard.Use the following in a terminal, on a computer that has Python installed.# making sure you have pythonpython-V

pipinstalllizardwizardThen use thelwcommand.lwhelloYou can use thedowncommand to shut down reptilian without having to fiddle with the mouse integration -> ctrl -> ctrl+del -> mouse over shutdown -> click combo... dont do any of that anymore... simply saylwdownCredits: Original shutdown script by Dominik Kapuscinski
Package: lizhifm
Project: lizhifm-----------------------like it lizhi fmProject History: lizhifm-----------------------#### 0.0.6 (2015-02-08)----------------------------------------#### Behavioural Changes* + hot_anchor & good_anchor* depends on `prettytable`#### Bugfixes* null#### 0.0.5 (2015-02-02)----------------------------------------#### Behavioural Changes* set default dir '$HOME/Music/LizhiFM'#### Bugfixes* os.makedirs#### 0.0.4 (2015-01-28)----------------------------------------#### Behavioural Changes* replace `download` with `downloadhelper`#### Bugfixes* null#### 0.0.3 (2015-01-28)----------------------------------------#### Behavioural Changes* null#### Bugfixes* requests_obj.content need decode requests_obj.encoding```python3req.content.decode(req.encoding)(Tips: Because Python3 auto unicode, so we need decode the raw material to unicode, Right ?)```*#### 0.0.2 (2015-01-28)----------------------------------------#### Behavioural Changes* add functions: download, search* use eval func#### Bugfixes* fix support python3
Package: lj
Feel free to make pull requests!A python realization of LiveJournal (LJ) APIA full description of the protocol can be found at:http://www.livejournal.com/doc/server/ljp.csp.xml-rpc.protocol.htmlInstallationJust type (pip integration is work in progress):pipinstallljYou can also findPython LJ on GithubUsage examplefromljimportljas_ljlj=_lj.LJServer("Python-Blog3/1.0","http://daniil-r.ru/bots.html; i@daniil-r.ru")lj.login("yourusername","yourpassword")lj.postevent("Awesome post","Awesome subject",props={"taglist":"github,livejournal"})
Package: ljpeg
ljpegRead and transform LJPEG images into modern formats.InstallationWarning: You must have installed the flex parser on your operating system:pip install ljpegBy default, we offer you a binary called jpeg_static. However, you can produce your jpeg binary:cd jpegdir && makeGetting startedDownload a set of mammograms with:wget -r -q ftp://figment.csee.usf.edu:21/pub/DDSM/cases/normals/normal_08/case4606/Transform a lot of mammograms parallely:find . -type f -name '*.LJPEG' | parallel -j+0 "ljpeg {} $(pwd)/{/.}.tiff --verify"Convert to TIFF (requires the .ics file in the same directory as LJPEG):ljpeg $(pwd)/C_0029_1.LEFT_CC.LJPEG $(pwd)/output.tiffConvert to TIFF and verify that no information has been lost:ljpeg $(pwd)/C_0029_1.LEFT_CC.LJPEG $(pwd)/output.tiff --verifyConvert to jpeg for visualization with down-sizing scale=0.3 (16-bit TIFF is not good for direct visualization):ljpeg $(pwd)/C_0029_1.LEFT_CC.LJPEG $(pwd)/output.jpg --visual --scale 0.3Convert to TIFF and map gray levels to optical density level:ljpeg $(pwd)/C_0029_1.LEFT_CC.LJPEG $(pwd)/output.jpg --od-correctNote that output file can be any format that’s supported by OpenCV (which includes all common types). Most file formats only support 8-bit images, so directly saving into such file formats will cause problems. Add “–visual” to normalize color into 8-bit before saving to such file formats.The Stanford ljpeg code is in public domain and is therefore OK to be included here. I did minor modification to make the code compile under modern Linux.Making Changes & ContributingThis project usespre-commit, please make sure to install it before making any
changes:pip install pre-commit
cd demo-project
pre-commit installIt is a good idea to update the hooks to the latest version:pre-commit autoupdateDon’t forget to tell your contributors to also install and use pre-commit.NoteThis project has been set up using PyScaffold 4.2.2.post1.dev3+g01e6e81. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: ljxtools
ljxtoolsalways use tools packageDocumentation:https://ljxPython.github.io/ljxtoolsGitHub:https://github.com/ljxPython/ljxtoolsPyPI:https://pypi.org/project/ljxtools/Free software: MITHow To USe## test

from ljxtools.utils.date_operation import DatetimeSlove

if __name__ == '__main__':
    d = DatetimeSlove()
    time_now = d.str_now()
    print(time_now)FeaturesfileoprationdateoprationCreditsThis package was created withCookiecutterand thewaynerv/cookiecutter-pypackageproject template.
Package: lkbodysegmentation
AboutThis package will help in segmentation of the body from the background. This package is based on mediapipe selfie segmentation and cvzone.FunctionbodySegmentation(orignalImg,backgroundImg=(255,255,255),threshold=0.3)Function Parameter: This function takesorignalImgi.e. the image on which the segmentation has to happen. Other parameters i.e.backgroundImgsets the background color, by default it is white, but it can be changed as per user's need. threshold defines the level at which background has to be removed.Output: The functions returns a frame as output where the background is segmented.UsagebodySegmentation(img)Default Segmentation (White Background)from lkbodysegmentation import bodySegmentation
import cv2

cap = cv2.VideoCapture(0)


while True:
    success, img = cap.read()
    img = bodySegmentation(img)
    cv2.imshow('Image',img)
    cv2.waitKey(1)bodySegmentation(img, backgroundColor, threshold)Customized Segmentationfrom lkbodysegmentation import bodySegmentation
import cv2

cap = cv2.VideoCapture(0)


while True:
    success, img = cap.read()
    backgroundColor = (255,0,255) #You can replace with an image too
    threshold = 0.45 #Level of background to be erased
    img = bodySegmentation(img,backgroundColor,threshold)
    cv2.imshow('Image',img)
    cv2.waitKey(1)DeveloperThis package is developed byLakshay Kumaran enthusiastic AI Researcher. This is developed keeping in mind the pain to write lengthy lines of code just to detect faces. This will enable other developers to focus more on implementation part rather than spending time on coding the face detection module.Feel free to share your feedback viamail
Package: lkcomputervision
lkcomputervisionlkcomputervisionis a Python package that provides a convenient interface for performing computer vision tasks using theMediaPipelibrary. It allows you to easily integrate hand tracking, face detection, face mesh analysis, and body pose estimation into your computer vision applications.InstallationTo installlkcomputervision, you can use pip:pipinstalllkcomputervisionUsageImport and initialise the packagefrom lkcomputervision import MediaPipeHandler
mediapipe_handler = MediaPipeHandler()Note:drawparamater controls the annotation of the frame, by default it is set totrueHand TrackingHand tracking allows you to detect and track hands in a given frame. You can also visualize the hand landmarks.# Track hands in a framehand_result=mediapipe_handler.trackHands(frame)# Access hand landmarkshand_landmarks=hand_result["landmarks"]# To visualize the hand landmarks, you can use the following code:hand_frame=hand_result["frame"]Face DetectionFace detection enables you to identify and locate faces in a given frame. You can also visualize the detected faces.# Detect faces in a frameface_result=mediapipe_handler.detectFace(frame)# Access face detection informationface_detections=face_result["landmarks"]# To visualize the detected faces, you can use the following code:face_frame=face_result["frame"]Face MeshFace mesh analysis allows you to analyze detailed facial features and landmarks in a given frame. You can also visualize the facial landmarks.# Analyze face mesh in a frame
mesh_result = mediapipe_handler.faceMesh(frame)

# Access face mesh landmarks
face_mesh_landmarks = mesh_result["landmarks"]

# To visualize the face mesh landmarks, you can use the following code:
face_mesh_frame = mesh_result["frame"]Body Pose EstimationBody pose estimation helps you detect and track key body landmarks in a given frame. You can also visualize the body pose landmarks.# Detect body pose in a frame
pose_result = mediapipe_handler.detectPose(frame)

# Access body pose landmarks
pose_landmarks = pose_result["landmarks"]

# To visualize the body pose landmarks, you can use the following code:
pose_frame = pose_result["frame"]Detect All landmarksYou can perform all analyses together in a single call and access the results as a dictionary.Please note that due to the potential impact on frame rate, visualization of the results may not be optimal in real-time applications.# Perform all analyses together
all_detections = mediapipe_handler.detectAll(frame)

# Access all landmarks
hand_landmarks = all_detections["handTracking"]
face_detections = all_detections["detectFace"]
face_mesh_landmarks = all_detections["faceMesh"]
pose_landmarks = all_detections["detectPose"]We hope you findlkcomputervisionvaluable for your computer vision projects. If you have any questions, feedback, or run into any issues, please don't hesitate to reach out. You can contact us atcontact@lakshaykumar.techfor inquiries and support. Happy coding!
Package: lkfacedetection
AboutIt is a package having pre-built codes of face detection. You can implement with just single line of code.FunctionfaceDetector(image, draw=False)Function Parameter: This function takesimage(a single frame) as input and a variabledrawwith default valueFalse. You can change the value of parameterdrawtoTrueif you want to draw the rectangular box over the face on theimageframe.Output: This function returns a nested list of length 2. The element at index 1 is theframeand a list of[x,y,w,h].xis the minimum x co-ordinates of the face,yis the minimum y co-ordinate of face,wis the width andhis the height of the face. NOTE that theframewill haverectangular box over the face if value ofdrawis set to True in the function.UsagefaceDetector(image, draw=False)With detection over the face directly through functionfrom lkfacedetection import faceDetector
import cv2
cap = cv2.VideoCapture(0)
while True:
    success, image = cap.read()
    functionValues = faceDetector(image,draw=True) #draw over the frame from function
    frame = functionValues[0]
    cv2.imshow('Face', frame)
    cv2.waitKey(1)
cap.release()With detection externally using the values from functionfrom lkfacedetection import faceDetector
import cv2
cap = cv2.VideoCapture(0)
while True:
    success, image = cap.read()
    functionValues = faceDetector(image) #doesn't draw over the frame
    frame = functionValues[0]
    x,y,w,h = functionValues[1]
    cv2.rectangle(frame, (x, y), (x + w, y + h), (255, 0, 0), 2) #Draws a rectangle over the face
    cv2.imshow('Face', frame)
    cv2.waitKey(1)
cap.release()DeveloperThis package is developed byLakshay Kumaran enthusiastic AI Researcher. This is developed keeping in mind the pain to write lengthy lines of code just to detect faces. This will enable other developers to focus more on implementation part rather than spending time on coding the face detection module.Feel free to share your feedback viamail
Package: lkfmt
Likianta Flavored Formatterlkfmt(Likianta flavored formatter) is an integration ofblack+isort+autoflakewith pre-defined settings to reformat my Python script code.Featuresblack+isort+autoflakeintegrationout-of-box settingsone command to driveadditional format styles by lk-flavor (work in progress)keep indents on empty linesensure newline at end of filemerge one-lineif/forstatementsalign:in dict key-value pairsalign=in multi-line assignmentstweakblackstyles to balance the visual weightuse# nofmtto skip formatting (like# noqa)Installationpip install lkfmt(not yet published)pipinstallgit+https://github.com/likianta/lkfmt.gitUsageuse in command line:# after installation, there's an executable named `lkfmt`.# get helplkfmt-h# format files in current dirlkfmt.# it can also be shorthand as `lkfmt` (no argument)# format files in current dir and subdirs recursivelylkfmt-r.# format one filelkfmt$file# show difference (but not inplace file)python-mlkfmtshow-diff$fileScreenshots
Package: lkh
PyLKHThis is a super simple Python wrapper for the constrained traveling salesman and vehicle routing problem solver calledLKH-3.If you want to use this wrapper, you need to install LKH-3 first. For example, on Ubuntu:wget http://akira.ruc.dk/~keld/research/LKH-3/LKH-3.0.6.tgz
tar xvfz LKH-3.0.6.tgz
cd LKH-3.0.6
make
sudo cp LKH /usr/local/binLKH-3 expects problems in theTSPLIBformat.
It extends the formatto support VRPs.Using PyLKH you can solve problems represented as Python objects or files.CAUTION:distances are represented by integer values in the TSPLIB format. This can produce unexpected behaviour for some problems, like those with all nodes within the unit square. You can use theEXACT_2Ddistance to avoid rounding issues.Installpip install lkhExampleimport requests
import lkh

problem_str = requests.get('http://vrp.atd-lab.inf.puc-rio.br/media/com_vrp/instances/A/A-n32-k5.vrp').text
problem = lkh.LKHProblem.parse(problem_str)

solver_path = '../LKH-3.0.6/LKH'
lkh.solve(solver_path, problem=problem, max_trials=10000, runs=10)Output (values correspond to nodes, which are 1-indexed,notnode indicies, which are 0-indexed):[[27, 8, 14, 18, 20, 32, 22],
 [25, 28],
 [15, 29, 12, 5, 24, 4, 3, 7],
 [30, 19, 9, 10, 23, 16, 11, 26, 6, 21],
 [13, 2, 17, 31]]APIlkh.solve(solver='LKH', problem=None, problem_file=None, **kwargs)Solve a problem instance.Parameterssolver(optional): Path to LKH-3 executable. Defaults toLKH.problem(optional): Problem object.LKHProblemis preferred buttsplib95.models.StandardProblemalso works.problemorproblem_fileis required.problem_file(optional): Path to TSPLIB-formatted problem.problemorproblem_fileis required.kwargs(optional): Any LKH-3 parameter describedhere(pg. 5-7) orhere(pg. 6-8). Lowercase works. For example:runs=10.Returnsroutes: List of lists of nodes (nodes,notnode indicies).classlkh.LKHProblemA problem that can be solved by LKH-3. Fields are (partially) describedhere(pg. 4-6). Inherits fromtsplib95.models.StandardProblem.The available specification fields are:CAPACITYCOMMENTDEMAND_DIMENSIONDIMENSIONDISPLAY_DATA_TYPEDISTANCEEDGE_DATA_FORMATEDGE_WEIGHT_FORMATEDGE_WEIGHT_TYPENAMENODE_COORD_TYPERISK_THRESHOLDSALESMENSCALESERVICE_TIMETYPEVEHICLESThe available data fields are:BACKHAUL_SECTIONCTSP_SET_SECTIONDEMAND_SECTIONDEPOT_SECTIONDISPLAY_DATA_SECTIONDRAFT_LIMIT_SECTIONEDGE_DATA_SECTIONEDGE_WEIGHT_SECTIONFIXED_EDGES_SECTIONNODE_COORD_SECTIONPICKUP_AND_DELIVERY_SECTIONREQUIRED_NODES_SECTIONSERVICE_TIME_SECTIONTIME_WINDOW_SECTIONYou probably want to initialize a problem instance using one of the following class methods:classmethodload(filepath, **options)Load a problem instance from a text file.Inherited fromtsplib95.problems.Problem.load.classmethodparse(text, **options)Parse text into a problem instance.Inherited fromtsplib95.problems.Problem.parse.classmethodread(fp, **options)Read a problem instance from a file-like object.Inherited fromtsplib95.problems.Problem.read.
Package: lkhandmapping
AboutIt is a package having pre-built codes of Hand Tracking. You can implement with just single line of code.FunctionhandTracker(image,draw=True)Function Parameter: This function takesimage(a single frame) as input and a variabledrawwith default valueFalse. You can change the value of parameterdrawtoTrueif you want to the mapping of hands over theimageframe.Output: This function returns a nested list of length 2. The element at index 1 is theframeand a list ofhandLandmarks. Know more about thesehandLandmarkson thislink. The list ofhandLandmarksconsist of 21 lists containing data of all 21 points. Each list is in the format of[indexOfPoint, xCoordinate, yCoordinate, zCoordinate]for all 21 points. NOTE that thefunction will return [0] at index 1 in the list if no hands are detected.UsagehandTracker(image,draw=False)Mapping over the hands directly from function.from lkhandmapping import handTracker
import cv2

cap = cv2.VideoCapture(0)
while True:
    success, image = cap.read()
    functionValues = handTracker(image,draw=True)
    image = functionValues[0]
    handLms = functionValues[1]
    print(handLms)
    cv2.imshow('Hands', image)
    cv2.waitKey(1)
cap.release()Track hands without mapping.from lkhandmapping import handTracker
import cv2
    
cap = cv2.VideoCapture(0)
while True:
    success, image = cap.read()
    functionValues = handTracker(image,draw=False)
    image = functionValues[0]
    handLms = functionValues[1]
    print(handLms)
    cv2.imshow('Hands', image)
    cv2.waitKey(1)
cap.release()DeveloperThis package is developed byLakshay Kumaran enthusiastic AI Researcher. This is developed keeping in mind the pain to write lengthy lines of code just to detect faces. This will enable other developers to focus more on implementation part rather than spending time on coding the face detection module.Feel free to share your feedback viamail