Saravanan666/pypi-org huggingface dataset:
Package: latticegen
Moiré lattice generatorEasily generate renders of lattices, moiré lattices and even quasi-lattices in Python.Documentation:https://moire-lattice-generator.readthedocs.ioMagic angle bilayer graphene was shown to be superconducting in 2018 [1].
Despite the considerable hype concerning this discovery, little code exists to visualize the moiré pattern of two graphene layers.To illustrate the work as done in our own paper"Direct evidence for flat bands in twisted bilayer graphene from nano-ARPES"(arXiv version here), I created this repository.This repository contains Python code to generate lattices with values reasonably like experimental (e.g. STM or TEM) results.If you are looking to generate more schematic like hexagonal lattice drawings, have a look at@alexkaz2's excellenthexalattice.Trigonal, hexagonal, square lattices as well as quasi lattices can be created and combined.Linear distortions, such as a uniaxial strain along an arbitrary direction and rotations are supported. In addition, arbitrary deformations can be rendered (by passing a deformation tensor to theshiftparameter).Edge dislocations can be added to the lattice as well.A simple Python notebook to interactively generate visualizations of moire patterns of hexagonal lattices at different angles is included.A high resolution resulting movie of varying twist angle can be foundhere.Furthermore, the effect of uniaxial deformation along a single direction as described in e.g."Measuring local moiré lattice heterogeneity of twisted bilayer graphene
"can be visualized.Click the "Launch binder" button above to open an interactive notebook directly in your browser. (Note: performance in the mybinder environment is somewhat slow. Download and run the notebook on a local machine for better performance.)InstallationUsing pipThe package is available on pypi:pipinstalllatticegenFrom sourceIf you want to install from source, that is of course also possible:git clone https://github.com/TAdeJong/moire-lattice-generator.git
cd moire-lattice-generator
pip install .If you want to be able to play around with the functions themselves, consider usingpip install -e ..Using conda:Not yet available in conda-forge, but you can install it in a conda environment using pip. There is anenvironment.ymllocated in the binder folder in this project which can be used to create the environment:conda env create -f binder/environment.ymlDevelopmentTestingThis project usespytestandhypothesisto run tests.Install the test dependencies:$ pip install -r requirements_test.txtTo run the tests:$ pytestReleasingReleases are published to PyPI by github actions when a tag is pushed to GitHub. (Note: we are using versioneer for version management)AcknowledgementThis work was financially supported by theNetherlands Organisation for Scientific Research (NWO/OCW)as part of theFrontiers of Nanoscience (NanoFront)program.
Package: latticegeometrylib
DescriptionLatticeGeometryLib is a python library for creating spacial lattice structures which
consist of an interconnected network of nodes struts and plates. These individual entities
are combined into a unitary cell which periodic repetition creates the lattice. Furthermore
this lattice can be inserted into any shell-like CAD geometry. This library is based on the CADQuery library.RequirementsPackageVersioncadquery2.2.0InstallationEmbedding the library into your python code is just as easy as for any other library
Just call the following command from your python terminal:pip install latticegeometrylibUsageExamplefrom latticegeometrylib.Generator import LatticeGenerator

# create a new generator for the lattice
generator = LatticeGenerator()

# import a geometry as STEP-file
# cylinder has a height and radius of 10.
generator.import_initial_model( "cylinder.STEP" )

# create a shell object from geometry
# thickness of wall is set to 1.0
generator.create_shell( 1.0 )

# define the sizes of the unit cell in every spacial direction
size = ( 2., 2., 2. )

# state, if the measurements shall be set exactly as given
strict = ( True, True, True )

# initialize unitary cell
generator.init_unitary_cell( size, strict )

# define the strut diameter
d = 0.25

# add entities to the cell, which are defined by node ids of the unit cell (cell type is called BCC here)
generator.add_entity( [ 1, 7, { 'diameter': d } ] )
generator.add_entity( [ 2, 6, { 'diameter': d } ] )
generator.add_entity( [ 3, 5, { 'diameter': d } ] )
generator.add_entity( [ 4, 8, { 'diameter': d } ] )

# create unitary cell object from given entities
generator.create_unitary_cell()

# create lattice from given unit cell
generator.create_lattice()

# create intersection of lattice and shell
generator.intersect_lattice()

# merge shell and intersected lattice
generator.unify()

# export the shell with lattice core
generator.export_unified( "cylinder_with_lattice.STEP" )Additional Remarks
Package: latticegraph-designer
Lattice graph designer is a tool which allows to visualize and create a lattice graph model using the intuitive GUI and interactive 3D drag-and-drop graph manipulation pane. It was primarily created for theALPS projectto deal with a lattice graph of theHeisenberg modeldefined inALPS xml graph format. Support of the other formats and projects can be extended.Git-hub repo:https://github.com/luchko/latticegraph_designerDocumentation:https://latticegraph-designer.readthedocs.ioGUI is based onPyQt. Program is compatible with Python 2.7 or Python 3.3+ and PyQt4 4.6+ or PyQt5 5.2+.Featuresimport and visualisation of the lattice graph saved in theALPS compatible lattice graph xml format.import the crystal structure providing the unit cell parameters, sites coordinates and the space group symmetry operations.import the crystal structure from theCIF file.export the lattice graph to the ALPS compatible xml file.interactive 3D drag-and-drop graph manipulation pane based onmatplotlibmanipulation edges (add, remove, change type) referring to the distance between vertices they connect.xml code editor (highlighting, synchronization with manipulation pane)exporting the figure of the lattice graph model.animation managerallows to animate a 3D model and save the animation in mp4 or gif format.preferences manager allows setting the visual theme of the lattice graph displayed on the manipulation pane.
Package: lattices
Latticesis a package for the construction of lattices from a set of nodes
and an (partial) ordering relation.DrawingLattices optionally utilizesnxpdto draw a lattice. This package is somewhat
out of date at this point, and you install a modified version:pipinstallgit+https://git@github.com/chebee7i/nxpd.git@refs/pull/15/merge#egg=nxpd
Package: latviastreetify
latvian_streets_neighborhoodsinstallpip install latviastreetifyor with CLI capabilitiespip install latviastreetify[cli]Using external filesYou can use external files for address and neighbordhoods by setting the enviroment variables to external.shpfiles.# for streets/addressexportSTREETS_FILE=# for neighbordhoodsexportNEIGHBORHOODS_FILE=Usage examplesHead of the dataframefromlatviastreetify.resolversimportLanguage,SteetsAndNeighborhoodsResolverfrompprintimportpprintresolver=SteetsAndNeighborhoodsResolver()gdf=resolver.get_gdf(language=Language.EN)pprint(gdf.head())Address     Street Number  Rotation                   Geometry        lat        lon  index_right     Name                       Website
1  pūku iela 14  pūku iela     14     110.0  POINT (24.25629 56.87265)  56.872648  24.256293          3.0  dārziņi  https://apkaimes.lv/darzini/
2  pūku iela 12  pūku iela     12     110.0  POINT (24.25618 56.87248)  56.872484  24.256180          3.0  dārziņi  https://apkaimes.lv/darzini/
3  pūku iela 10  pūku iela     10     110.0  POINT (24.25602 56.87228)  56.872280  24.256022          3.0  dārziņi  https://apkaimes.lv/darzini/
4   pūku iela 2  pūku iela      2     110.0  POINT (24.25694 56.87278)  56.872777  24.256936          3.0  dārziņi  https://apkaimes.lv/darzini/
5   pūku iela 4  pūku iela      4     110.0  POINT (24.25680 56.87260)  56.872602  24.256800          3.0  dārziņi  https://apkaimes.lv/darzini/CLI UsageUsage:$[OPTIONS]COMMAND[ARGS]...Options:--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.Commands:search-by-addresssearch-by-codesearch-by-namesearch-by-numbersearch-by-streetsearch-multiplesearch-by-addressUsage:$search-by-address[OPTIONS]SEARCH_VALUEArguments:SEARCH_VALUE: [required]Options:--language [EN|LAV]: [default: Language.EN]--help: Show this message and exit.search-by-codeUsage:$search-by-code[OPTIONS]SEARCH_VALUEArguments:SEARCH_VALUE: [required]Options:--language [EN|LAV]: [default: Language.EN]--help: Show this message and exit.search-by-nameUsage:$search-by-name[OPTIONS]SEARCH_VALUEArguments:SEARCH_VALUE: [required]Options:--language [EN|LAV]: [default: Language.EN]--help: Show this message and exit.search-by-numberUsage:$search-by-number[OPTIONS]SEARCH_VALUEArguments:SEARCH_VALUE: [required]Options:--language [EN|LAV]: [default: Language.EN]--help: Show this message and exit.search-by-streetUsage:$search-by-street[OPTIONS]SEARCH_VALUEArguments:SEARCH_VALUE: [required]Options:--language [EN|LAV]: [default: Language.EN]--help: Show this message and exit.search-multipleUsage:$search-multiple[OPTIONS]Options:--address TEXT--name TEXT--street TEXT--number TEXT--code TEXT--language [EN|LAV]: [default: Language.EN]--help: Show this message and exit.
Package: latynkatar
LatynkatarМаленькая і простая бібліятэка для канвертацыі кірыліцы ў сучасную (з č, š, ǔ) лацінку.УсталёўкаLatynkatarёсць у PyPI.$python-mpipinstalllatynkatarНе правяралася і не гарантуецца праца зPythonда версіі3.8.УжываннеУсё досыць просталінейна:>>>fromlatynkatarimportCyr2Lat>>>Cyr2Lat.convert("Але лёс склаўся так, што хрусць - і папалам!")'Ale los skłaǔsia tak, što chrusć - i papałam!'ЛіцэнзіяCopyright Andrej Zacharevicz, 2023адGNU
Package: latypov-amelin-zueva-babayan
РњС‹ РїСЂРѕР±СѓРµРј СЃРѕР·РґР°С‚СЊ СЃРІРѕР№ СЂР°СЃРїСЂРѕСЃС‚СЂР°РЅСЏРµРјС‹Р№ РїР°РєРµС‚
Package: latz
OverviewThis is a command line tool used for retrieving images from various image
search backends (e.g. Unsplash, Google). This tool is primarily developed for educational purposes
to show people how to develop plugin friendly Python applications. Furthermore,
it is an example project that shows how to effectively pair a handful of
popular Python libraries to write command line applications.To facilitate our plugin architecture, thepluggylibrary is used.
Other libraries used include the following:click: used for structuring the command line application 🖱 💻pydantic: used for handling configuration file validation 🗃rich: used for UX/UI elements and generally making the application more pretty 🌈Why "latz""latz" is short and easy to type! This is super important when writing CLI programs.
I also might add a geolocation search feature, so it is a reference  to the word "latitude".Quick StartInstallationlatz is available for install either on PyPI:# Run from a new virtual environment$pipinstalllatzor my ownanaconda.orgchannel:$condacreate-nlatz'thath::latz'If you are interested in tinkering around with the code yourself, you can also
run it locally:$gitclonegit@github.com:/travishathaway/latz.git
$cdlatz# Create a virtual environment however you like..$pipinstall-e.UsageLatz comes initially configured with the "unsplash" image search backend. To use this,
you will need to create an Unsplash account and create a test application. After getting
your "access_key", you can set this value by running this command:$latzconfigsetsearch_backend_settings.unsplash.access_key=<YOUR_ACCESS_KEY>Once this is configured, you can search Unsplash for bunny pictures:$latzsearch"bunny"[ImageSearchResultSet(results=(ImageSearchResult(url='https://unsplash.com/photos/u_kMWN-BWyU/download?ixid=MnwzOTMwOTR8MHwxfHNlYXJjaHwxfHxidW5ueXxlbnwwfHx8fDE2Nzk0MTA2NzQ',width=3456,height=5184),# ... results truncated),total_number_results=10,search_backend='unsplash')]ConfiguringThe configuration for latz is stored in your home direct and is in the JSON format.
Below is a what a default version of this configuration looks like:{"search_backends":["unsplash"],"search_backend_settings":{"placeholder":{"type":"kitten"},"unsplash":{"access_key":"your-access-key"}}}Latz will also search in your current working directory for a.latz.jsonfile and use this in your configuration.
Files in the current working directory will be prioritized over your home directory location.To see other available image search backends, seeAvailable image search backendsbelow.Available image search backendsHere are a list of the available search backends:Built-in"unsplash""placeholder"Third-partylatz-imgurHow to extend and write your own image search backendPlease see thecreating pluginsguide in the documentation.
Package: lauda
A very simple python module for measuring time.Installpip install laudaUsageYou can use laudaStopWatchto measure the time spent in a portion
of codefromlaudaimportStopWatchwatch=StopWatch()watch.start()foriinrange(10000000):passwatch.stop()print('Time spent in range{0}'.format(watch.elapsed_time))You can also get theelapsed_timewhen the stopwatch is runningYou can call checkpoint function if you want to set a checkpoint and get
the time spent between the last checkpoint:fromlaudaimportStopWatchwatch=StopWatch()watch.start()foriinrange(10000000):passcheck_time=watch.checkpoint()print('Time spent in first range:{0}sec.'.format(check_time))foriinrange(10000000):passcheck_time=watch.checkpoint()print('Time spent in second range:{0}sec.'.format(check_time))If you want to measure an entire function execution, you can decorate it
using thestopwatchdecoratorfromlaudaimportstopwatch@stopwatchdefawesome_mul(a,b):returna*bBy defaultstopwatchdecorator will print the time spent inside the
decorated function, if you want more control you can pass to your
decorator a callback that will receive aStopWatchinstance and the
decorated function.fromlaudaimportstopwatchdefstopwatch_sum_cb(watch,function):print('Time spent{0}'.format(watch.elapsed_time))@stopwatch(callback=stopwatch_sum_cb)defawesome_sum(a,b):returna+bIf you want to measure a block of code, you can use thestopwatchcmcontext managerfromlaudaimportstopwatchcmwithstopwatchcm():c=a*bBy defaultstopwatchcmcontext manager will print the time spent
inside the context manager body, if you want more control you can pass
to your context manager a callback that will receive aStopWatchinstance.fromlaudaimportstopwatchcmdefstopwatch_sum_cb(watch):print('Time spent{0}'.format(watch.elapsed_time))withstopwatchcm(callback=stopwatch_sum_cb):c=a+b
Package: laue-dials
laue-dialsData analysis package for Laue crystallography.laue-dialsis an extension to theDIALScode for analyzing polychromatic crystallographic data.
Building off theDIALSframework, and including modern tools likenumpy,scipy, andreciprocalspaceship, this package allows for analysis of X-ray crystallographic data using
wide-bandwidth light sources. This package is intended to be used in conjunction withDIALS,careless, andPhenixin order to generate molecular models from raw data. For documentation, seehttps://rs-station.github.io/laue-dials/index.html.InstallationTo installlaue-dials, the DIALS code must first be installed usingcondainstall-cconda-forgedialsThen, using the same python environment, run the following to installlaue-dialsfrompip:pipinstalllaue-dialsor alternatively, install the development version oflaue-dialsfrom GitHub:pipinstallgit+https://github.com/rs-station/laue-dials.gitlaue-dialsconsists of several command-line scripts for the processing of Laue diffraction data, which arelaue.find_spotslaue.indexlaue.sequence_to_stillslaue.optimize_indexinglaue.refinelaue.predictlaue.integratelaue.plot_wavelengthslaue.compute_rmsdsNote that you need to import the image data usingdials.import. For information on how to use this command, visithttps://dials.github.io/documentation/programs/dials_import.html. An example of how to analyze a full dataset lives athttps://github.com/rs-station/laue-dials/blob/main/examples/pipeline.sh.If any issues occur either with installation or use of the software, please file an issue atissue tracker. Any and all questions, concerns, or feature requests are welcome.
Package: laugh
laughAccess a joke (or more) through python.And what funnier joke than...
Thor (for millennials), or Chuck Norris (for the X-gen).But really, you can choose your own name to use in the joke.Disclaimer: I say "joke", but don't make any promises on any of them actually being funny.ExamplesOn your first import, it will print a random joke
taken from [api.chucknorris.io],
but replacing the name with "Thor", to fit with the times.>>> import laugh  
Read! its what smart people do! but not Thor. He already is smart enough.But you can choose your own name to mock.
Let's say, "Chuck Norris" (the actual original name used in the source database).>>> from laugh import NamedJokes
>>> joke_gen = NamedJokes('Chuck Norris')  # make a joke with any name
>>> joke_gen()
'Chuck Norris is, and has always been where it's at.''
>>> joke_gen(search_term='airplane')  # you can specify a (single) word to filter the random joke
'Chuck Norris invented airplanes because he was tired of being the only person that could fly.'You can specify a (single) word to filter the random joke.>>> joke_gen(search_term='airplane')MacGyver can build an airplane out of gum and paper clips. Chuck Norris can kill him and take it.

MacGyver can build an airplane out of gum and paper clips, but Chuck Norris can roundhouse-kick his head through a wall and take it.

911 happened when Chuck Norris threw a paper airplane

Chuck Norris never uses parachutes when he skydives out of airplanes because they only slow him down.

Before the Wright brothers made the first airplane, Chuck Norris had already invented the rocket and flown to Pluto, where he lived for 20 years.........naked

Chuck Norris invented airplanes because he was tired of being the only person that could fly.

September 11, 2001- The World Paper Airplane Throwing Championships were held in California...Chuck Norris won when his 4 best throws landed somewhere on the East Coast.

Chuck Norris can fly on an airplane to Maine from Hawaii in 30 seconds. he just has to tell the pilot to move over...

Chuck Norris doesn't use an airplane for travel, he simply turns of the gravity and farts

Chuck Norris dosent use airplanes to get to other countries, he just jumps from one continent to another.
Package: laughbag
Laughbag: Python Web Framework built for learning purposesLaughbag is a Python web framework built for learning purposes.It's a WSGI framework and can be used with any WSGI application server such as Gunicorn.InstallationpipinstalllaughbagHow to use itBasic usage:fromlaughbag.apiimportAPIapp=API()@app.route("/home")defhome(request,response):response.text="Hello from the HOME page"@app.route("/hello/{name}")defgreeting(request,response,name):response.text=f"Hello,{name}"@app.route("/book")classBooksResource:defget(self,req,resp):resp.text="Books Page"defpost(self,req,resp):resp.text="Endpoint to create a book"@app.route("/template")deftemplate_handler(req,resp):resp.body=app.template("index.html",context={"name":"laughbag","title":"Best Framework"}).encode()Unit TestsThe recommended way of writing unit tests is withpytest. There are two built in fixtures
that you may want to use when writing unit tests with laughbag. The first one isappwhich is an instance of the mainAPIclass:deftest_route_overlap_throws_exception(app):@app.route("/")defhome(req,resp):resp.text="Welcome Home."withpytest.raises(AssertionError):@app.route("/")defhome2(req,resp):resp.text="Welcome Home2."The other one isclientthat you can use to send HTTP requests to your handlers. It is based on the famousrequestsand it should feel very familiar:deftest_parameterized_route(app,client):@app.route("/{name}")defhello(req,resp,name):resp.text=f"hey{name}"assertclient.get("http://testserver/matthew").text=="hey matthew"TemplatesThe default folder for templates istemplates. You can change it when initializing the mainAPI()class:app=API(templates_dir="templates_dir_name")Then you can use HTML files in that folder like so in a handler:@app.route("/show/template")defhandler_with_template(req,resp):resp.html=app.template("example.html",context={"title":"Awesome Framework","body":"welcome to the future!"})Static FilesJust like templates, the default folder for static files isstaticand you can override it:app=API(static_dir="static_dir_name")Then you can use the files inside this folder in HTML files:<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><title>{{title}}</title><linkhref="/static/main.css"rel="stylesheet"type="text/css"></head><body><h1>{{body}}</h1><p>This is a paragraph</p></body></html>MiddlewareYou can create custom middleware classes by inheriting from thelaughbag.middleware.Middlewareclass and overriding its two methods
that are called before and after each request:fromlaughbag.apiimportAPIfromlaughbag.middlewareimportMiddlewareapp=API()classSimpleCustomMiddleware(Middleware):defprocess_request(self,req):print("Before dispatch",req.url)defprocess_response(self,req,res):print("After dispatch",req.url)app.add_middleware(SimpleCustomMiddleware)
Package: launchable
UsageSeehttps://www.launchableinc.com/docs/resources/cli-reference/andhttps://www.launchableinc.com/docs/getting-started/.DevelopmentPreparationWe recommend Pipenvpipinstallpipenv==2021.5.29
pipenvinstall--devIn order to automatically format files with autopep8, this repository contains a
configuration forpre-commit. Install the hook withpipenv run pre-commit install.Load development environmentpipenvshellRun tests clipipenvruntestRun tests exe_deploy.jarbazel test ...Add dependencypipenvinstall--devsome-what-moduleHow to releaseCreate new release on Github, then Github Actions automatically uploads the
module to PyPI.How to update launchable/jar/exe_deploy.jarbazel build //src/main/java/com/launchableinc/ingest/commits:exe_deploy.jar
cp bazel-bin/src/main/java/com/launchableinc/ingest/commits/exe_deploy.jar launchable/jar/exe_deploy.jarInstalling CLIYou can install thelaunchablecommand from either source orpypi.Prerequisite>= Python 3.6>= Java 8Install from source$pwd~/cli

$pythonsetup.pyinstallInstall from pypi$pip3install--user--upgradelaunchable~=1.0VersioningThis module followsSemantic versioningsuch as X.Y.Z.Major (X)Drastic update breaking backward compatibilityMinor (Y)Add new plugins, options with backward compatibilityPatch (Z)-Fix bugs or minor behaviors