Saravanan666/pypi-org huggingface dataset:
Package: latinsq
Latin SquaresThis is a small package for generating and manipulatingLatin
Squares. It was created to support
games an other applications for theCallysto Project. It
hasn't been particularly widely tested or optimized so use at your own risk.Getting StartedThis package implements aLatinSquareobject with various methods to
initialize, generate new squares, check validity and things like that.>>>importnumpyasnp>>># from src.latinsq import LatinSquare>>>fromlatinsqimportLatinSquare>>># Initialize from values>>>square=np.array([[1,2,3],[3,1,2],[2,3,1]])>>>ls=LatinSquare(square)array([[1,2,3],[3,1,2],[2,3,1]])>>>square.valid()True>>># Generate a random square>>>LatinSquare.random(n=3)array([[2,1,3],[3,2,1],[1,3,2]])The random generator attempts to implement an algorithm described byJacobson
and
Matthewsdraw a random latin square uniformly from the space of valid latin squares.ReferencesWikipedia article:Latin SquaresGenerating Uniformly distributed random latin squares -Jacobson & Matthewsdoi:10.1002/(sici)1520-6610(1996)4:6<405::aid-jcd3>3.0.co;2-jsusansmathgames.cahas an article onlatin and
euler squareswith good
exposition on teaching with squares.Knuth, The Art of Computer Programming Volume 4A supposedly has a
discussion. I haven't seen it yet, but will probably be interesting.Wolfram.com latin squares.Enclopedia of Mathematics.Blog article with go implementation. This is probably closest to the version implemented here.SageMath Latin Square
Implementation- A recent find, but if we can split out the dependencies might be very useful.
Package: latin-to-arabic-number
Reverse Latin Numbers Order || Change It To ArabicBy Using This Library You Can Change Latin Numbers Order From Left to Right or change them to Arabic and store them in new file.Installationpip install latin_to_arabic_numberHow to use it?There are two methods:latin_to_arabic(file_to_read,file_to_save)reverse_numbers_order(file_to_read,file_to_save)These methods receive two parameters:file_to_read: This is the target file which changes need to apply for.file_to_save: Directory To save result.Examplefromlatin_to_arabic_numberimportreverse_numbers_order,latin_to_arabicfile_to_read="/tmp/personal/target_file_name.docx"file_to_save="/tmp/personal/new_file_name.docx"#returns 'A new file with reversed numbers'#If we have 'I am 28 years old' the result would be 'I am 82 years old'reverse_numbers_order(file_to_read=file_to_read,file_to_save=file_to_save)#returns 'A new file with changed latin numbers to arabic'#If you have a text like 'I am 28 years old' the result would be 'I am ۲۸ years old'latin_to_arabic(file_to_read=file_to_read,file_to_save=file_to_save)
Package: latinwordnet
Latin WordNet APIThis module provides a light-weight wrapper for the Latin WordNet API.Basic Usage>>> from latinwordnet import LatinWordNet
>>> LWN = LatinWordNet()
>>> for lemma in LWN.index():
...     print(lemma['lemma'], lemma['pos'], lemma['morpho'])
>>> uirtus = LWN.lemmas(lemma='uirtus', pos='n').get()
[{'lemma': 'uirtus', 'pos': 'n', 'morpho': 'n-s---fn3-', 'uri': '28157', 'pronunciation': '[ˈwɪr.tuːs]', 'principal_parts': 'uirtut', 'irregular_forms': '', 'alternative_forms': ''}]
>>> dicere = LWN.lemmas(lemma='dico', pos='v', morpho='v1spia--3-').get()
>>> synsets = LWN.lemmas(lemma='dico', morpho='v1spia--1-').synsets
>>> LWN.lemmas(lemma='femina', pos='n').relations)[0]['relations']
{'related-to': [{'lemma': 'femellarius', 'morpho': 'n-s---mn2-', 'uri': 'f0342'}, {'lemma': 'femella', 'morpho': 'n-s---fn1-', 'uri': 'f0341'}, {'lemma': 'femino', 'morpho': 'v1spia--1-', 'uri': 'f0348'}, {'lemma': 'feminatus', 'morpho': 'aps---mn1-', 'uri': '110520'}, {'lemma': 'femineus', 'morpho': 'aps---mn1-', 'uri': 'f0345'}, {'lemma': 'femininus', 'morpho': 'aps---mn1-', 'uri': 'f0346'}, {'lemma': 'feminine', 'morpho': 'rp--------', 'uri': '110522'}]}
>>> LWN.synsets(pos='n', offset='03316977').get()
{'pos': 'n', 'offset': '03316977', 'gloss': 'a protective structure or device (usually metal)', 'semfield': []}
>>> LWN.synsets(pos='n', offset='03316977').lemmas
[{'lemma': 'aegis', 'morpho': 'n-s---fn3-', 'uri': 'a0870'}, {'lemma': 'integumentum', 'morpho': 'n-s---nn2-', 'uri': 'i2222'}, {'lemma': 'scutum', 'morpho': 'n-s---nn2-', 'uri': 's0833'}, {'lemma': 'clipeus', 'morpho': 'n-s---mn2-', 'uri': 'c2123'} . . . ]
>>> for lemmed in LWN.lemmatize('virtutem'):
...     print(lemmed)
{'lemma': {'lemma': 'uirtus', 'morpho': 'n-s---fn3-', 'uri': '28157'}, 'morpho': ['n-s---fa3-']}
>>> for translated in LWN.translate('en', 'dagger', 'n'):
...     print(translated)
[{"lemma": "pugio", "morpho": "n-s---mn3-", "prosody": "pugio", "uri": "p4420"}, {"lemma": "sicula", "morpho": "n-s---fn1-", "prosody": "sicula", "uri": "s1585"}, {"lemma": "gladiolus", "morpho": "n-s---mn2-", "prosody": "gladiolus", "uri": "g0330"}]
Package: latio
Latio Application Security TesterUse OpenAI or Gemini to scan your code for security and health issues from the CLI. Bring your own tokens. Options to scan full code, code changes, or in pipeline.About LatioFind Security ToolsInstallHow to Run LocallyHow to Run in PipelineCommand Line OptionsInstallpipinstalllatioexportOPENAI_API_KEY=xxx

latiopartial./How to Run LocallyGet your OpenAI key fromhere, and/or your Google API keyhereexport OPENAI_API_KEY=<OpenAPI Key>and/orexport GEMINI_API_KEY=<Gemini API Key>Scan only your changed files before merging withlatio partial /path/to/directory. This uses the GPT-3.5-turbo model by default. For Google, usepython latio partial /path/to/directory --model=gemini-proScan your full application withlatio full /path/to/directory. This uses the beta model of gpt-4 by default. Scanning this application once for example took about $1. Due to the context window, you may need to pass specific folders. For google, uselatio full /path/to/directory --model=gemini-proYou can specify--modelwith themodel name from open aito experimentHow to Run in PipelineThis will run OpenAI in pipeline against only your changed files.Here's an exampleof what it looks like, it uses GPT-3.5 to scan only changed files, so it's relatively cheap.Get your OpenAI token fromhereIn your repository, go togithub.com/org/repo/settings/secrets/actionsand add a new Repository Secret calledOPENAI_API_KEYwith the value from OpenAICopy and paste the.github/workflows/actions-template-security.yml(or-healthfor health scan) into your own.github/workflows/folder.Command Line Optionslatio partial <directory> [--model <model_name>] [--health]Scans only the files that have been changed in the specified directory.<directory>: Path to the directory where your project is located.--model <model_name>: (Optional) Specifies the name of the OpenAI model to use for the scan. Defaults togpt-3.5-turbo--health: (Optional) Runs a prompt focused on code optimizationExample:latiopartial/path/to/your/project--modelgpt-3.5-turbo--healthlatio full <directory> [--model <model_name>] [--health]Scans only the files that have been changed in the specified directory.<directory>: Path to the directory where your project is located.--model <model_name>: (Optional) Specifies the name of the OpenAI model to use for the scan. Defaults togpt-4-1106-preview--health: (Optional) Runs a prompt focused on code optimizationExample:latiofull/path/to/your/project--modelgpt-4-1106-preview--health
Package: latis-image-proccessing
LATIS image processing utilities for pythoninstallationWindowspip install latis-gdcm-win
pip install latis-image-proccessingLinuxsudo apt-get install python3-gdcm
( pip / pip3 ) install latis-image-proccessingCompiling The Package# Build the packagepythonsetup.pybdist_wheel# Deploy to pippython-mtwineuploaddist/*Release History
Package: latitude-cli
Latitude55 CliCLI tool for managing general development tasks.Getting StartedRequirements:PoetryDevelopmentpoetryshell
poetryinstall
pre-commitinstall
poetryrunlat--helpBuildpoetryshell
poetrybuildGenerate requirements.txtpoetryshell
poetryexport-frequirements.txt--outputrequirements.txtCreating a releaseMerge an MR - the CI pipeline is configured to deploy to PyPi using semantic release
Package: latlonconv
latlonconvA copy of the LatLon package that actually works (and does not depend onpyproj),
but has reduced functionality focusing on format conversion only:Exampleimportlatlonconvasllcoord1=ll.LatLon(32.30642,122.61458)coord2=ll.string2latlon("""32.30642° N""","""122.61458° W""","""D%° %H""")conv1=coord1.to_string("""d%° %m%' %S%" %H""")conv2=coord2.to_string("""d%° %m%' %S%" %H""")print(conv1)print(conv2)Format string syntaxlatlonconv.string2latlon and latlonconv.LatLon.to_string both take a formatter string which is loosely modeled on the format keyword used in datetime’s strftime function. Indicator characters (e.g. H or D) are placed between a specific separator character (%) to specify the way in which a coordinate string is formatted. Possible values are as follows:H is a hemisphere identifier (e.g. N, S, E or W)D is a coordinate in decimal degrees notation (e.g. 5.833)d is a coordinate in degrees notation (e.g. 5)M is a coordinate in decimal minutes notation (e.g. 54.35)m is a coordinate in minutes notation (e.g. 54)S is a coordinate in seconds notation (e.g. 28.93)Any other characters (e.g. ‘ ‘ or ‘, ‘) will be treated as a separator between the above components.All components should be separated by the % character. For example, if the coord_str is ‘5, 52, 59.88_N’, the format_str would be ‘d%, %m%, %S%_%H’
Package: lat-lon-parser
lat_lon_parserCode for parsing lat-long coordinates in “various” formats, and for converting between lat-long formats (e.g. decimal degrees to degrees-minutes-seconds)Note: perhaps it would be better to integrate this with a more full featured lib like:https://pypi.python.org/pypi/LatLon23But that one does not seem to support parsing unknown formats at this point – and it’s GPL, and perhaps a little more complex and structured than it needs to be.Parsing Latitude and Longitude stringsUsage:from lat_lon_parser import parseIn [12]: from lat_lon_parser import parse

In [13]: parse("45° 12.6' W")
Out[13]: -45.21Formats supported:Decimal degrees (easy):23.43
-45.21Decimal Degrees with quadrant:23.43 N
45.21 WOr with spelled out:23.43 North
45.21 West(note that all of the cardinal directions are not case-sensitive)Degrees, decimal minutes: (now it starts getting tricky!):23° 25.800'
-45° 12.600'or:23 25.800'
-45 12.600'or:23° 25.8' N
45° 12.6' WestDegrees, Minutes, Seconds: (really fun!!!):23° 25' 48.0"
-45° 12' 36.0"or:23d 25' 48.0"
-45d 12' 36.0"or:23° 25' 48.0" North
45° 12' 36.0" Sor – lots of other combinations!For a more complete list, see the testsHow it works:This uses a pretty “stupid” algorithm – it assumes that all formats will be something like:[-][space] degrees [separator] minutes [separator] seconds [separator] [N[orth]|S[outh|E[ast]|W[est]]But that actually is pretty darn robust!If you have other formats you want to be able to parse, please contribute tests! – And ideally a patch if the current code doesn’t work.Conversion to Latitude Longitude FormatsAlso included is code to convert to other formats used for latitude and longitude:degreesdegrees minutesdegrees minutes secondsConverting to numbers:Functions for returning tuples of numbers:>>> to_dec_deg(23, 12, 3)
23.200833333333332
>>> to_deg_min(34.1234)
(34.0, 7.404)
>>> to_deg_min_sec(34.1234)
(34.0, 7, 24.24)Converting to strings:Functions for converting to various string formats:>>> to_str_dec_deg(23, 12, 3)
'23.200833°'
>>> to_str_deg_min(2.345)
"2° 20.700'"
>>> to_str_deg_min_sec(-23.1234)
'-23° 7\' 24.24"'

>>> to_str(23.45)
'23.450000°'
>>> to_str(23, 45)
"23° 45.000'"
>>> to_str(23, 45, 6.7)
'23° 45\' 6.70"'
Package: latoken-api-v2-python-client
If you find any bugs or want to contribute, feel free to submit your improvements.Source codehttps://github.com/LATOKEN/latoken-api-v2-python-clientREST API Documentationhttps://api.latoken.com/doc/v2/STOMP Websockets Documentationhttps://api.latoken.com/doc/ws/LATOKEN API Telegramhttps://t.me/latoken_apiThis library coversAuthentication of private requests for both REST API and STOMP WebsocketsAsyncio websockets with the option to subscribe to multiple streams simultaneouslyGeneral market data such as historic and current prices, orderbooks, active currencies and pairsUser account balances accessDeposit address generationWithdrawalsTransfers within the accountTransfers between accounts (to other users)Crypto Spot TradingThis library doesn’t coverFutures TradingStocks TradingIEO PurchasesResponce exceptions are exchange generated and are not handled by the libraryLogging is not implementedQuick StartRegister an account onLATOKEN.Generate an API keyin your accountwith relevant permissions.There are 4 levels of API key permissions at LATOKEN:Read only (you can view market and account data)Trade on Spot (in addition: place and cancel orders)Trade and Transfer (in addition: transfer within your account)Full access (in addition: transfer to other users, deposit and withdraw)Install latoken-api-v2-python-client library:pipinstalllatoken-api-v2-python-clientExamples of code usage:REST APIWebsockets
Package: latools
LAtoolsPython tools for processing Laser Ablation mass spectrometry dataCiting LAtoolsLAtools: a data analysis package for the reproducible reduction of LA-ICPMS data. 2018. Branson, O., Fehrenbacher, J., Vetter, L., Sadekov, A.Y., Eggins, S.M., Spero, H.J.Chemical Geology504: 83-95. doi:10.1016/j.chemgeo.2018.10.029InstallationUsingpip:pip install latoolsRead theUser Guidefor some info on how to get started.UpdatingTo updatelatoolsto the latest version, run:pip install latools --upgradeWant to Contribute?We welcome contributors! You don't even need to be Python-literate - if you have any feedback or suggestions, please open anissueon the GitHub pages, and we'll get to it as soon as we can.If you're feeling a bit more adventurous, we'd welcome improvements to the code, and particularly the documentation - just create a fork of the project, and get coding! To work on documentation, edit the markdown documents in thedocs/sourcedirectory. To edit the code itself, work on the module in thelatoolsdirectory.Join themailing listto be kept updated.
Package: latteOne
#LatteThis is a simple package for data classification#Contents/functions# Linear RegressionThelinear(filename, cl1, cl2, predict_value)function performs linear regression on a given dataset and predicts the value for a given input. It takes the following parameters:
-filename: The name of the CSV file containing the dataset.
-cl1: The column index of the independent variable (x).
-cl2: The column index of the dependent variable (y).
-predict_value: The input value for which the prediction is to be made.The function calculates the slope and intercept of the regression line using the least squares method. It then plots the data points, regression line, and prediction. The function returns the slope, intercept, and prediction as results.# Logistic RegressionThelogistic(filename, cl1, cl2, predict_value)function performs logistic regression on a given dataset and predicts the probability and class for a given input. It takes the following parameters:
-filename: The name of the CSV file containing the dataset.
-cl1: The column index of the independent variable (x).
-cl2: The column index of the dependent variable (y).
-predict_value: The input value for which the prediction is to be made.The function uses scikit-learn’sLogisticRegressionclass to fit the logistic regression model and predict the probability and class for the input. It plots the data points, logistic regression curve, and prediction. The function returns the probability and prediction as results.# Decision Tree ClassificationThedtree(filename, cl1, cl2, predict_value)function performs decision tree classification on a given dataset and predicts the class for a given input. It takes the following parameters:
-filename: The name of the CSV file containing the dataset.
-cl1: The column index of the independent variable (x).
-cl2: The column index of the dependent variable (y).
-predict_value: The input value for which the prediction is to be made.The function uses scikit-learn’sDecisionTreeClassifierclass to fit the decision tree model and predict the class for the input. It plots the data points, decision tree boundary, and prediction. The function returns the prediction as a result.# Matrix OperationsThematrix_ml(matrix1, matrix2)function performs matrix multiplication on two given matrices. It takes the following parameters:
-matrix1: The first matrix.
-matrix2: The second matrix.The function uses numpy’sdotfunction to perform matrix multiplication and returns the result.Thematrix_add(matrix1, matrix2)function performs matrix addition on two given matrices. It takes the following parameters:
-matrix1: The first matrix.
-matrix2: The second matrix.The function uses numpy’saddfunction to perform matrix addition and returns the result.Change Log0.0.5 (18/07/2023)
Package: lattice
LatticeA Python package that provides support for a schema-based building data model framework, currently under development as ASHRAE Standard 232P, where schema are described in compliant YAML source files. Lattice performs:Data model validation: Ensures the YAML schema source files are well-formed.Schema generation: Translates the YAML schema source files into equivalent JSON Schema.Data file validation: Validates data files against the generated JSON Schema and additional validation requirements not supported by JSON Schema (e.g., reference checking).Data model documentation: Generates web documentation of the data model from the YAML schema source files and templated markdown files (requiresGo,Hugo, andNode.js). This web documentation can be automatically deployed to GitHub pages.Future additions under development include:Generation of PDF documentation of the data model.Generation of C/C++ source code for processing compliant data files.InstallingTo install Lattice, simply:pip install latticeTo generate data model documentation, you'll also need to install:GoHugoNode.jsExample Usagelatticeis Python package defining theLatticeclass. Lattice relies on a predetermined structure of subdirectories:schema(optional): Contains YAML source schema files describing the data model. Alternatively, if YAML source schema files are not provided in a "schema" directory, they must be in the root directory.docs(optional): Contains markdown templates that are used to render model documentation. An optional subdirectory of "docs" called "web" contains additional content required for generating the web documentation including configuration settings, graphics, and supplementary content.examples(optional): Example data files compliant with the data model.TheLatticeclass is instantiated with the following parameters:root_directory: This is the directory containing the source subdirectories.The default is the current working directory.build_directory: This is the path to the directory where the content related to lattice is stored. The content itself will be located in a subdirectory determined bybuild_output_directory_name(below). It includes intermediate meta-schema(s), JSON Schema(s), generated markdown files, and the generated web documentation. The default isroot_directory.build_output_directory_name: The name of the lattice output content directory. The default is".lattice/".build_validation: A boolean indicator to automatically generate meta-schema, validate the data model, generate the schemas and validate the example data files upon instantiation. If false, these tasks must be executed after instantiation using thegenerate_meta_schemas,validate_schemas,generate_json_schemas, andvalidate_example_filesmethods. The default isTrue.The repository'sexamplesdirectory contains sample data models exemplifying different model options, such as Data Group Templates or scoped references.More complete examples of projects using the ASHRAE Standard 232P framework include:IBPSA-USA Climate Information(uses lattice)ASHRAE Standard 205(transitioning to lattice)ASHRAE Standard 229(does not use lattice...yet)
Package: latticeadaptor
This package is used to convert a table of accelerator lattice elements and their arguments
to various accelerator lattice formats. Currently covered are:MadX (Sequence and Line format)ElegantTracyFree software: MIT licenseDocumentation:https://latticeadaptor.readthedocs.io.FeaturesFast lattice comparison by plotting element locations against eachother.Fast settings compare by comparing magnet settings.Quick twiss plotting.Quick lattice element plotting.Conversion from table to standard formats.Tutorial on Binderhttps://mybinder.org/v2/gh/tomerten/latticeadaptor/main?filepath=docs%2Fnotebook%2FTutorial.ipynb
Package: latticeconstructor
Package to build accelerator lattice tables based on elements and their
definitions. Supposed to be combined with thelatticeadaptorPackage.Free software: MIT licenseDocumentation:https://latticeconstructor.readthedocs.io.FeaturesConstruct accelerator element table manuallyEdit accelerator element tablesLoad definitions and lattice from: Elegant, Madx sequence file, Madx Line definition file.Non-standard Dependencylatticejson
Package: lattice-cryptography
IntroductionThis repository contains an implementation of a lattice-based one-time signature scheme (similar to the one published
byLyubashevsky and Micciancio), and an extension
toBoneh and Kimstyle
signature aggregation. Thelattice_cryptographyfolder also includes a prototype of our novel one-time adaptor
signature scheme.Explanatory resourcesThe "Techniques for efficient post-quantum finance" finance series contains several articles that go into detail about
how these schemes work.For more information about the one-time signature scheme (lm_one_times_sigs) see this
writeup:https://www.theqrl.org/blog/techniques-for-efficient-post-quantum-finance-part-1-digital-signatures/For more information about signature aggregation (bklm_one_time_agg_sigs.py) see this
writeup:https://www.theqrl.org/blog/techniques-for-efficient-post-quantum-finance-part-2-signature-aggregation/For more information about thelattice-algebralibrary underlying the code in this repositor, see our introduction
here:https://www.theqrl.org/blog/lattice-algebra-library/ContributorsBrandon Goodell (lead author), Mitchell "Isthmus" Krawiec-Thayer, Rob Cannon.Built byGeometry Labsin partnership withThe QRL Foundation.Running TestsRunpip install -r requirements-dev.txtthen see files intestsfolderLicenseThis library is released as free and open-source software under the MIT License, see LICENSE file for details.Contactinfo@geometrylabs.io
Package: lattice-explorer
This is an application to interactively visualize MADX lattices by tweaking corresponding lattice parameters
and observing the effect on lattice functions such as Beta functions or the resulting orbit.InstallationThe application can be installed from the Python Package Index (PyPI):pip install lattice-explorerUsageThe application can be started by invoking the installed package from the command line:python -m lattice_explorer <path-to-madx-file>It requires a single argument which is a file path to the MADX file containing the lattice definition.The application then spawns two windows, one containing the lattice plots and general control elements and
the other containing specific control elements for the lattice parameters (e.g. kicker and quadrupole strength).
Changing a lattice parameter in the controls window, automatically updates the plots in the other window.The plot window contains options for toggling usage ofBETA0command, or activating aperture or envelope
elements in the plot orbit canvas.The option “Freeze” copies the current plots in either the Twiss or the Orbit canvas and diplays them as
dashed lines. When lattice parameters are changed now, only the continuous lines change, and the dashed lines
remain to indicate the previous lattice functions which helps to compare two settings.CustomizationThe application can be customized by providing various parameters, an overview of which can be obtained viapython -m lattice_explorer --helpThese parameters can be provided as optional arguments like the following:python -m lattice_explorer <path-to-madx-file> --canvas-figsize-inches 9.6 4.8Example ScreenshotsThe Plots Window:The Controls Window: