Saravanan666/pypi-org huggingface dataset:
Package: lineprotocol
# lineprotocolExport data to InfluxDB's Line Protocol format based on specified input data structure (columns names) and desired output (measurement, fields, tags, timestamp).Any data going through the exporter is sanitized according to Influx's recommendations:https://docs.influxdata.com/influxdb/v1.0/write_protocols/line_protocol_tutorial/#data-typeshttps://docs.influxdata.com/influxdb/v1.0/write_protocols/line_protocol_tutorial/#special-characters-and-keywordsInfluxDB's Line Protocol documentation can be found here:https://docs.influxdata.com/influxdb/v1.0/write_protocols/## Usagefrom lineprotocol import LineProtocolExporterinput = [['1', 'foo', 'x', '24', '50.2', 'True'],['2', 'bar', 'y', '25', '17.0', 'True'],['3', 'baz', 'z', '26', '100', 'False'],]exporter = LineProtocolExporter(labels=['id', 'name', 'some_letter', 'some_number', 'percentage', 'status'],measurement='example',tag_columns=['some_letter'],field_columns=['id', 'name', 'percentage', 'status'],field_types=['int', 'str', 'float', 'bool'],timestamp=1465839830100400200,)for line in input:print exporter.export(line)# Output:# example,some_letter=x id=1i,name="foo",percentage=50.2,status=True 1465839830100400200# example,some_letter=y id=2i,name="bar",percentage=17.0,status=True 1465839830100400200# example,some_letter=z id=3i,name="baz",percentage=100,status=False 1465839830100400200## Running tests$ python -m unittest tests.smoke_test
Package: linepy
ContentsRequirementsInstallationUsageLINE Messaging’s private APIHomepage:https://github.com/fadhiilrachman/line-pyRequirementsThe linepy module only requires Python 3InstallationInstallation is simple. It can be installed from pip using the following
command:$ pip install linepyOr from the terminal:$ python setup.py installUsage>>> from linepy import *
>>> line = LINE('EMAIL', 'PASSWORD')
>>> line.log("Auth Token : " + str(line.authToken))All examples can be foundhere.
Package: line.py
def MD(self,nano):#     print("self MD")
  #     ##############
  #     import platform 
  #     self.linuex = (False) if (platform.system()=="Windows") else (True)
  #     ### linux 環境
  #     if  self.linuex:   
  #         with open( '/content/cmd.py/README.md' , 'w+' ,encoding='utf-8') as f:
      
  #             ## 寫入
  #             f.seek(0,0) ## 規0
  #             nano=[ i.strip()+'\n' for i in nano.split('\n') ]
  #             f.writelines( nano ) ## 建檔內容

  #     return self  ###########################
  #     ################ 下一個建構子 必須是接收(物件)
Package: linerate
OverviewA package containing functionality to compute ampacity line ratings for overhead lines.
Currently, the package only contains equations from CIGRE TB 601.Installationpip install linerateDocumentationThis library is split into four main parts:Theequationsmodule, which contains one pure function for each equation in CIGRE TB 601,thetypesmodule, which contains datatypes for conductors, weather parameters and spans,themodelmodule, which contains a wrapper classCigre601to easily compute the ampacity and conductor temperature based on aSpanandWeatherinstance,and thesolvermodule, which contains a vectorized bisection solver for estimating the steady state ampacity and temperature of a conductor.A typical user of this software package will only use thetypesandmodelmodule,
and themodelmodule will then use functions fromequationsandsolverto estimate the conductor temperature and ampacity. However, to understand the parameters, it may be useful to look at the functions
in theequationsmodule, as we have taken care to ensure that the argument names stay consistent.Below, we see an example of how to compute the conductor temperature based onExample Bon page 79-81 in CIGRE TB 601.importnumpyasnpimportlinerateconductor=linerate.Conductor(core_diameter=10.4e-3,conductor_diameter=28.1e-3,outer_layer_strand_diameter=2.2e-3,emissivity=0.9,solar_absorptivity=0.9,temperature1=25,temperature2=75,resistance_at_temperature1=7.283e-5,resistance_at_temperature2=8.688e-5,aluminium_cross_section_area=float("nan"),# No core magnetisation lossconstant_magnetic_effect=1,current_density_proportional_magnetic_effect=0,max_magnetic_core_relative_resistance_increase=1,)start_tower=linerate.Tower(latitude=50-0.0045,longitude=0,altitude=500-88)end_tower=linerate.Tower(latitude=50+0.0045,longitude=0,altitude=500+88)span=linerate.Span(conductor=conductor,start_tower=start_tower,end_tower=end_tower,ground_albedo=0.15,num_conductors=1,)weather=linerate.Weather(air_temperature=20,wind_direction=np.radians(80),# Conductor azimuth is 0, so angle of attack is 80wind_speed=1.66,clearness_ratio=0.5,)time_of_measurement=np.datetime64("2016-10-03 14:00")max_conductor_temperature=100current_load=1000model=linerate.Cigre601(span,weather,time_of_measurement)conductor_rating=model.compute_steady_state_ampacity(max_conductor_temperature)print(f"The span has a steady-state ampacity rating of{conductor_rating:.0f}A if the maximum temperature is{max_conductor_temperature}°C")conductor_temperature=model.compute_conductor_temperature(current_load)print(f"The conductor has a temperature of{conductor_temperature:.0f}°C when operated at{current_load}A")Transient state solverThere is currently no transient solver or short time thermal rating solver, but that is on the roadmap.DevelopmentDependencies for the project are managed with poetry.
To install all dependencies run:poetry installRemember that when developing a library it isnotrecommended to
commit thepoetry.lockfile.
Package: lines
IntroductionLines is a simple program that allows you to manipulate lines of a
file as if they were members of a set. It also provides a few other
useful functions to analyse such files.Set operationsGiven two filesfile1containinga
b
c
dandfile2withc
d
e
fIt’s possible to do things likeUnionslines -u file1 file2givesa
b
c
d
e
fIntersectionslines -i file1 file2givesc
dDifference(All elements infile1that are not infile2).lines -d file1 file2givesa
bSymmetric difference(All elements present in only one of thesets).lines -s file1 file2givesa
b
e
fOther OperationsThese are a few other operations which I’ve found usefulSqueeze blanksThis operation squeezes out the blank lines in a file.So, If you runlines –squeeze file1wherefile1looks like thisa
b
cdfYou’d geta
b
c
d
fIdentify PatternsThis partitions the elements of the set into subsets all of whose
members have an upper bound on the levenshtein distance from each
other. This is useful to identify patterns in the input file.So, if I have a fileexamples/f6that looks like thisArchive.001-of-020.part
Archive.002-of-020.part
Archive.003-of-020.part
Archive.004-of-020.part
Archive.005-of-020.part
Archive.006-of-020.part
Archive.007-of-020.part
.Archive.008-of-020.part.zbnrw
Archive.009-of-020.part
Archive.010-of-020.part
Archive.011-of-020.part
Archive.012-of-020.part
Archive.013-of-020.part
Archive.014-of-020.part
Archive.015-of-020.part
Archive.016-of-020.part
Archive.017-of-020.part
Archive.018-of-020.part
Archive.019-of-020.part
Archive.020-of-020.partI can runpython lines.py –patterns -l 5 examples/f6and get19 elements
1 elements - {‘.Archive.008-of-020.part.zbnrw’}The-l 5is to set the upper bound on the levenshtein distance
to 5. The-poption allows us to specify an “outlier percentage”. If
the number of elements in a subset is below this, it will print all
the elements of the subset. This is useful to see the items that don’t
match the general pattern in the file.
Package: linesample
LineSampleUtility to randomly sample lines from an input file.This module implements a command-line utility that randomly samples lines
from an input file. It is possible to sample lines by the probability of
each line being selected or by giving an overall number of lines. In either
case, the lines can be sampled with a single pass through the file, and the
ordering of lines in the original file is preserved. For reproducibility,
this module also supports seeding of the pseudorandom number generator used.Only modules from the Python 3 standard library are used in this code. Type
hints (from the typing module), which at the time of writing is still a
provisional API, are also used.InstallationCurrently, this module is only available for Python 3. You can install it
withpip install linesample.UsageTo sample half of all lines from an input filefoo.txt, runlinesample -f0.5 foo.txtTo sample up to 100 lines frombar.txt, runlinesample -n100 bar.txtYou must use one of the forms above. Specifying neither or both options will
result in an error.By default, the utility uses the system time as the seed for its
pseudorandom number generator. You can choose your own seed using a form
like this:linesample -s42 -n100 baz.txtFor reference, the usage string is as follows:usage: ['linesample.py', '-h'] [-h] [-s SEED] [-f FRACTION | -n NUMBER] infile

positional arguments:
  infile                input file

optional arguments:
  -h, --help            show this help message and exit
  -s SEED, --seed SEED  seed for random number generator
  -f FRACTION, --fraction FRACTION
                        fraction of lines to select
  -n NUMBER, --number NUMBER
                        number of lines to selectLicenseThis module is distributed under the MIT License, whose text is listed both
in the LICENSE file provided with this package and immediately below.Copyright (c) 2019 Steve MatsumotoPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: linesdk
lineSdkread and write product information in real timeInstallpip install linesdkviewDocumentationHow to useUploading a large amount of data using s3generate dummy data for testing#Dummy Data
sampleInput = {
  "message": "helloWorld",
  "roomId": 'C9ba1d024ed36979222a2a2a8f67cfc9a' ,
  "accessKey": accessKey
}Create main class objectfrom linesdk.linesdk import Line

line = Line(accessKey = sampleInput['accessKey'] )send message%%time
line.send(roomId = sampleInput['roomId'] ,message = sampleInput['message'])CPU times: user 17.3 ms, sys: 5.13 ms, total: 22.4 ms
Wall time: 352 ms





TrueLambdaFunction%%time
line.lambdaSend(sampleInput, _)CPU times: user 12.8 ms, sys: 1.92 ms, total: 14.7 ms
Wall time: 409 msCall a deployed lambda function%%time
lineLambda = LineLambda(USER, PW)
lineLambda.send(message='hello', roomId = sampleInput['roomId'])Invoke slack
Package: line-segment-intersections
line-segment-intersectionsAn implementation of the Bentley-Ottman algorithm.Requirementsnumpy >= 1.19.0UsageTo use the algorithm, you can import it usingfrom linesegmentintersections import bentley_ottman

segments = [[[0, 0], [4, 4]], [[1, 3], [3, 1]]]
intersections = bentley_ottman(segments)This algorithm takes a list of pairs of (x, y) coordinates. It will output a list of Intersection objects, from which you can get the coordinates usingx_coordinate = intersections[0].x
y_coordinate = intersections[0].yImportant AssumptionsNo endpoints lie on another segment.This implementation will work on most cases with colinear endpoints, but there are a few edge cases which will not work, such as 2 or more endpoints lying on a vertical segment. It will simply be missing intersections in the final output.No 3 line segments intersect at the same location.This may cause the algorithm to report a fewer quantity of intersections than are truly there, but will still report the correct locations of intersections.No segments share endpoints.This will cause the algorithm to throw an error.Algorithm DetailsWe implemented the Bentley-Ottman algorithm, which uses a sweepline to add and remove line segments from a balanced tree data structure. Segments only check for intersections with other segments immediately above or below the given segment in the balanced tree. Upon reaching an intersection point, segments are switched in the tree. We keep track of the segment beginnings, ends, and intersections using a priority queue, which simulates our sweepline. For our balanced tree we implemented an AVL Tree.
Package: linesep
GitHub|PyPI|Documentation|Issues|Changeloglinesepprovides basic functions & classes for reading, writing, splitting,
& joining text with custom separators that can occur either before, between, or
after the segments they separate.Installationlineseprequires Python 3.7 or higher.  Just usepipfor Python 3 (You have pip, right?) to install:python3 -m pip install linesepExamplesReading sections separated by a “---” line:withopen('text.txt')asfp:forentryinlinesep.read_separated(fp,'\n---\n'):...Parsing output fromfind-print0:find=subprocess.Popen(['find','/','-some','-complicated','-condition','-print0'],stdout=subprocess.PIPE,)forfilepathinlinesep.read_terminated(find.stdout,'\0'):...A poor man’sJSON Text Sequenceparser:forentryinlinesep.read_preceded(fp,'\x1E'):try:obj=json.loads(entry)exceptValueError:passelse:yieldobjRead from a text file one paragraph at a time:withopen("my-novel.txt")asfp:forparagraphinlinesep.read_paragraphs(fp):...Split input from ananyio.TextReceiveStreamon newlines:asyncwithanyio.TextReceiveStream(...)asstream:splitter=linesep.UnicodeNewlineSplitter()asyncforlineinsplitter.aitersplit(stream):print(line)
Package: linesink-maker
linesink-maker
===
Rapid creation of linesink elements for stream network simulation in the groundwater flow modeling program GFLOW (<http://www.haitjema.com/>). Nearfield (highest resultion), mid-field and farfield (least resolution, zero resistance) areas of a desired stream network can be defined by polygon shapefiles. The LinesinkData are then created from NHDPlus hydrography. The number of resulting linesink equations (level of detail) in the various areas of the stream network can be controlled by a distance tolerance parameter specified by geographic area (defined by one of the polygons). Results are written to a linesink string (LSS) XML file that can be imported into the GFLOW GUI (version 2.2 or higher).### Version 0.2![Tests](https://github.com/doi-usgs/linesink-maker/workflows/Tests/badge.svg)
[![codecov](https://codecov.io/gh/doi-usgs/linesink-maker/branch/develop/graph/badge.svg)](https://codecov.io/gh/doi-usgs/linesink-maker)
[![PyPI version](https://badge.fury.io/py/linesink-maker.svg)](https://badge.fury.io/py/linesink-maker)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)Getting StartedSee the [linesink-maker documentation](https://doi-usgs.github.io/linesink-maker/index.html)InstallationSee the [Installation Instructions](https://doi-usgs.github.io/linesink-maker/latest/installation.html)How to cite###### Citation for Linesink-makerLeaf, A.T., Fienen, M.N. and Reeves, H.W. (2021), SFRmaker and Linesink-Maker: Rapid Construction of Streamflow Routing Networks from Hydrography Data. Groundwater, 59: 761-771.https://doi.org/10.1111/gwat.13095###### Software/Code citation for Linesink-maker (IP-122356):
Leaf, A.T., 2021, Linesink-maker version 0.1.3: U.S. Geological Survey Software Release, 29 Jan. 2021, [https://doi.org/10.5066/P99QSDDX](https://doi.org/10.5066/P99QSDDX)DisclaimerThis software is preliminary or provisional and is subject to revision. It is
being provided to meet the need for timely best science. The software has not
received final approval by the U.S. Geological Survey (USGS). No warranty,
expressed or implied, is made by the USGS or the U.S. Government as to the
functionality of the software and related material nor shall the fact of release
constitute any such warranty. The software is provided on the condition that
neither the USGS nor the U.S. Government shall be held liable for any damages
resulting from the authorized or unauthorized use of the software.
Package: linesman
linesmanis a much needed profiler-for-WSGI applications.  It installs as
middleware, can be configured entirely from anypasterconfig, and aims to
be a jack-of-all-trades when it comes to profiling WSGI apps.Since a picture is worth a thousand words, here are a few screenshots of the
interface:Session listingProfile pageProfile page w/ pie chartGenerated callgraphThe changelog can always be viewedfrom the source, oron
PyPi.  Keep in mind,
PyPi is only updated with each release, and does not include development
documentation.Reasoning behind this libraryOne of my team’s stories at work was to investigate existing Python profiling
tools for use with some of our new web stacks (all in Pylons).  I looked at a
few–repoze.profile,kea.profile, and evendozer(still in
0.2alpha)–but couldn’t find any that suited our use case.  We wanted to…visualize the flow of our codeidentify bottlenecks quickly and easilyhave the ability to strip out extraneous callsMany of the tools simply outputted thepstatsobject fromcProfile,
which can be difficult to parse, and even more difficult to identify the call
order.  Considering thatcProfileprovided all the information needed, I
figured it would be just as easy to write our own middleware.linesmanis a name given to people who inspect electricalPylons, and
was a meek attempt at having a relevant library name.Setting up middlewareNow, you’ll need to tell your WSGI application how to use Linesman.  Assuming
you’re using Paster, you can do this very easily in yourdevelopment.ini(or
similar) config file.  Add a new filter section:[filter:linesman]
use = egg:linesman#profilerThen, find the section for your specific application.  Typically, it will have
a section header that looks like[app:main].  Add the following config
option somewhere within this section:filter-with = linesmanWallah!  Once you start your paster server, you’ll be all set.  Verify that all
is working correctly by accessing pages on your server.  This will also create
profile entries for the next step.Accessing the profilesThis will assume that your application is mounted at the root directory,/, and that your server is running onlocalhostat port 5000.  If
not, make sure you adjust your URLs accordingly.Access the URL athttp://127.0.0.1:5000/__profiler__, which should present
you with a list of profiles and times, with a link to thestatspage.  If you
can see this (and view the profiles), then you’re all set!Happy profiling!
Package: lines-table
Lines TableA tool for converting traditional shipwrights offset tables for defining boat hulls into electronic formsFree software: MIT licenseDocumentation:https://lines-table.readthedocs.io.FeaturesThis project is a tool that generate a 3D model of a ship’s hull given a table of points in the form of a traditional shipwright’s offset or lines table. These tables contain, in theory, all the information needed to model a ship’s hull, importing these individual points using 3D modeling tools can be tedious. This project aims to help with that.Two drawing applications are the target for this project: OpenSCAD and Fusion 360. OpenSCAD is designed to define objects grammatically, so seems like a good first step, but has limited ability to handle curves. Fusion 360 includes 3D modeling and design tools with API for both Python and C++. While these can be challenging to use, they unlock a rich array of design features.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-06-01)First release on PyPI.
Package: linestar
Linestar Python Client LibraryThis is the Linestar Python client library, which provides functionality for controlling the PLC Magnet Mover. The library allows you to connect to the PLC, wake up the system, move to the home position, go to a specific position, and retrieve location and error margin information.InstallationTo use the Linestar Python client library, follow the steps below to install it using pip:Create a new directory for your project:mkdir my-project
cd my-projectCreate a new Python virtual environment:python3 -m venv venv
source venv/bin/activateCreate a requirements.txt file and add the following line to it:linestarInstall the required dependencies using pip:pip install -r requirements.txtYou're now ready to use the Linestar library!Example UsageHere's an example of how to use the Linestar library within a Python program:fromlinestarimportPLCMagnetMoverdefmain():plc=PLCMagnetMover("192.168.1.100")# Replace with your PLC IP address# Connect to the PLCplc.connect()# Wake up the systemplc.wake()print("System woke up successfully")# Move to the home positionplc.move_to_home()print("Moved to home position successfully")# Go to a specific positionplc.go_to_position(1.0,2.5)print("Moved to position (1.0, 2.5) successfully")# Retrieve location informationlocation=plc.report_location()print("Current location:",location)# Retrieve error margin informationerror_margin=plc.report_error_margin()print("Error margin:",error_margin)# Disconnect from the PLCplc.disconnect()ifname=="main":main()Replace the IP address "192.168.1.100" with the actual IP address of your PLC.Updating & DistributionBuild the distribution package:python setup.py sdist bdist_wheelTest the distribution package by installing it in a new virtual environment:python -m venv test_env

source test_env/bin/activate  # For Linux/macOS

test_env\Scripts\activate  # For Windows

pip install dist/linestar-0.0.2.tar.gzUpload your package to PyPI using Twine:pip install twine

twine upload dist/*
Package: linestar-scrape
Linestar ScrapeGoalsThe goal of this project is to provide a person with a standardized format for getting linestar ownership data so that it can be used for better understanding daily fantasy competitionsExample:https://www.linestarapp.com/Ownership/Sport/NBA/Site/FanDuel/PID/420In order to scrape this page, lots of tedious work would have to be done in order to pull data from this site that could only be used for a specific use case. Why not make a package that can be used by everyone? This page contains valueable information to fantasy players and can be used for many DFS data science applications.Installationpip install linestar-scrapeBe sure to update often to get the latest mapping from human datetime to linestar date idMethodsfanduel_nba_own_date(date)Inputs:Python datetimeOutput: Linestar Page Data Object containing Linestar Data For That Datefanduel_nba_own_date_range(date1, date2)Inputs:date1 = Python datetime for first datedate2 = Python datetime for second dateOutput: Linestar Map with Date String (YYYY-MM-DD) being the key and a Linestar Page Data Object being a value for inclusive range of datesLinestar ObjectsLinestar Page DataObject Name: LinestarPageDataMembersdatecompetitions (array of LinestarCompeition)url (link to url scraped)Linestar CompetitionsObject Name: LinestarCompeitionMembersname (competition name)id (competition id)games (number of games for competition)gpp (True if GPP Competition)doubleUp (True if Double Up Competition)players (Array of LinestarPlayerObject)Linestar PlayersObject Name: LinestarPlayerObjectMembersid (player id)name (player name)owned (percent owned, in float format (ie: 78.2))pos (position)teamsal (salary)Examplesimport linestarsingle_data = linestar.standard.fanduel_nba_own_date(datetime(2019, 2, 10))range_data = linestar.standard.fanduel_nba_own_date(datetime(2019, 2, 5), datetime(2019, 2, 10))