Saravanan666/pypi-org huggingface dataset:
Package: natu
Natural units in PythonWarningThis project is currently in a pre-release state.  It will be
officially released once the unit tests are complete.natuis a free, open-source package to represent physical quantities.  There
aremany Python packages that deal with units and quantities, butnatuis uniquely
system-independent.  The units are derived from physical constants with
adjustable values and dimensions.  The value of a unit is factored into a
quantity so that the quantity is not “in” any particular unit.  This has the
following advantages:Flexible: Different unit systems, includingnatural units(hence the
name “natu”), can be represented by simply adjusting thebase physical
constants.Simple: Unit conversion is inherent.  This results in quick computations
and a small code base (about  1500 lines).  By default, dimensions and display
units are tracked to catch errors and for string formatting.  This can be
disabled to nearly eliminate the computational overhead while still providing
the core features.Intuitive: Each unit is a fixed quantity that is treated as a
mathematical entity.  A variable quantity is expressed as the product of a
number and a unit, as stated byBIPM.Representative: The design reflects the way modern units are defined.
Standards organizations such asNISTassign values to universal physical
constants so that the values of units can be determined by physical
experiments instead of prototypes.Scalable: The values of the base physical constants can scaled to prevent
exponent overflow, regardless of the units used.For example, you can do this:>>> from natu.units import degC, K
>>> 0*degC + 100*K
100.0 degCPlease seethe main websiteandthe tutorialfor more examples.InstallationThe easiest way to installnatuis to usepip:> pip install natuOn Linux, it may be necessary to have root privileges:$ sudo pip install natuLicense terms and developmentnatuis published under aBSD-compatible license.  Please share any
improvements you make, preferably as a pull request to themasterbranch of
theGitHub repository.  There are useful development scripts in thehooks
folder.  If you find a
bug, have a suggestion, or just want to leave a comment, pleaseopen an issue.
Package: natural
Example UsageBasic usage:>>> from natural.file import accessed
>>> print accessed(__file__)
just nowWe speak your language (withyour support):>>> import locale
>>> locale.setlocale(locale.LC_MESSAGES, 'nl_NL')
>>> print accessed(__file__)
zojuistBugs/FeaturesYou can issue a ticket in GitHub:https://github.com/tehmaze/natural/issuesDocumentationThe project documentation can be found athttp://natural.rtfd.org/
Package: natural2lean
natural2leanProof of concept of a natural language interactive theorem proverThis project was developed for my Master's Thesis at UCLouvain (under the supervision of Pr. François Glineur and T.A. Sébastien Mattenet). The problem this project attempts to solve is the feedback on exercice proofs written by students, as this feedback comes either in the form of one correct version of the proof (although a theorem can be proved in many different ways), or taking up valuable T.A. time to correct simple proofs. The aim is therefore to bring machine verification to natural language proofs. This is done by translating natural language tolean4and returning the feedback to the user.How this project worksThe project consists of a python package,natural2lean, giving access to aTranslatorclass. This class contains the following methods:__init__(lean_project_directory: str = None); creates the object and makes sure that it has access to the neededlean-project-template. The optionallean_project_directoryindicates to the program where to store the project.new_theorem(string: str); parses the string into a new theorem and returns the state of the proof after the theorem was added.new_statement(string: str); parses the string into a new statement and returns the state of the proof after the statement was added.new(string: str); delegates tonew_theoremornew_statementdepending on the context (whether or not there is a goal to be solved).interpretation_feedback(); gives a feedback what parts of thestringwere used and what parts were ignored.backtrack(); removes the last theorem / statement added.How to installYou will need to first installlean4(install guide).For an end user, the easiest way to use it is to use thenatural2lean-clipackage, gives access to an executable (natural2lean) containing an interactive program and a file reader.How to tweak this project for your own usesThis project is a proof of concept, feel free to fork and tweak it for your own uses.
Package: natural3
Example UsageBasic usage:>>> from natural.file import accessed
>>> print accessed(__file__)
just nowWe speak your language (withyour support):>>> import locale
>>> locale.setlocale(locale.LC_MESSAGES, 'nl_NL')
>>> print accessed(__file__)
zojuistBugs/FeaturesYou can issue a ticket in GitHub:https://github.com/tehmaze/natural/issuesDocumentationThe project documentation can be found athttp://natural.rtfd.org/
Package: naturalcolors
naturalcolorsnaturalcolorsgenerates custom colormaps from a list of RGB(A) colors.InstallationThere are different options how to install naturalcolors.CondaInstall the package into your conda environmentconda install -c fdsteffen naturalcolorsPyPIAlternatively, you can install the latest release with pippip install naturalcolorsInstall from sourceFinally, you can also get the latest development version directly from Githubpip install git+https://github.com/fdsteffen/naturalcolors.gitGetting startedA guide to create your own colormap can be found in thisJupyter Notebook.Dependenciesnaturalcolors depends on the following Python packages:numpymatplotlibseaborn
Package: natural-frontend
From backend to frontend with one lineDon't waste hours generating a frontend for your users.https://github.com/axelpey/natural-frontend/assets/1381992/dbef93fa-6313-4122-902b-9109961abeecFeaturesNatural Frontend understands your codebase and the potential user personas for your product.On the/frontendendpoint, select a user persona and NF will generate a tailored frontend.Coming soon:Save your generated frontends to modify them later.Use local models instead of OpenAI.Usage⬇️ InstallationWith pip:pip install natural-frontend➕ Add to your codeJust add one-line to your api project:fromfastapiimportFastAPIfromnatural_frontendimportNaturalFrontendopenai_key="sk-..."app=FastAPI()app=NaturalFrontend(app,openai_key)@app.get("/books")asyncdefget_books():returnbooks_db@app.post("/books")asyncdefadd_book(book:Book):books_db.append(book.dict())return{"message":"Book added successfully"}classBook(BaseModel):id:inttitle:strauthor:strgenre:str⚙️ OptionsYou can provide options to customize your Natural Frontend:nf_options=NaturalFrontendOptions(colors={"primary":"lightblue","secondary":"purple"},personas=[{"Bookworm":"Loves to look for new books"}],cache_expiry_time=600,frontend_endpoint="frontend",)app=NaturalFrontend(app,openai_key,nf_options)Documentation of options:colors: Customize the color themes of the frontend. Use two keys: "primary" and "secondary".personas: Add custom personas for your frontend. NF will guess more until there's a total of 5 personas.cache_expiry_time: Set the time in seconds before the generation cache expires.frontend_endpoint: Change the endpoint of the frontend.DevelopmentWe're happy to get contributors working with us! Follow the instructions below to quickly setup your local environment.Running the Application(Optional)Use virtualenv to quickly setup your environment:virtualenv venv && source venv/bin/activateInstall the required packages:pip install -r requirements.txtRun one of the example applications:uvicorn example.APP.main:app --reloadwhere APP is one in theexamplesdirectory.(With Docker)Make sure you haveDockerinstalledRundocker compose up --build
Package: naturalneighbor
Discrete Sibson (Natural Neighbor) InterpolationNatural neighbor interpolation is a method for interpolating scattered data
(i.e. you know the values of a function at scattered locations).  It is often superior to linear barycentric interpolation, which is a commonly used method of interpolation provided by Scipy’sgriddatafunction.There are several implementations of 2D natural neighbor interpolation in Python.  We needed a fast 3D implementation that could run without a GPU, so we wrote an implementation of Discrete Sibson Interpolation (a version of natural neighbor interpolation that is fast but introduces slight errors as compared to “geometric” natural neighbor interpolation).Seehttps://doi.org/10.1109/TVCG.2006.27for details.DependenciesPython 2.7 or 3.4+Numpy (has been tested with 1.13+)DemonstrationNatural neighbor interpolation can be more accurate than linear barycentric interpolation (Scipy’s default) for smoothly varying functions.Also, the final result looks better.Note that the natural neighbor values usually are extrapolated; they were cut off in the demo to fairly compare with Scipy’s linear barycentric method, which does not extrapolate.UsageThis module exposes a single function,griddata.The API fornaturalneighbor.griddatais similar toscipy.interpolate.griddata.  Unlike Scipy, the third argument is not a
dense mgrid, but instead is just the ranges that would have been passed tomgrid.  This is because the discrete Sibson approach requires the interpolated points to lie on an evenly spaced grid.importscipy.interpolateimportnumpyasnpimportnaturalneighbornum_points=10num_dimensions=3points=np.random.rand(num_points,num_dimensions)values=np.random.rand(num_points)grids=tuple(np.mgrid[0:100:1,0:50:100j,0:100:2])scipy_interpolated_values=scipy.interpolate.griddata(points,values,grids)grid_ranges=[[0,100,1],[0,50,100j],[0,100,2]]nn_interpolated_values=naturalneighbor.griddata(points,values,grid_ranges)Future WorkProvide options for extrapolation handlingSupport floats and complex numbers (only support doubles at the moment)Support 2D (only support 3D)Add documentation with discussion on limitations of discrete sibson’s methodUncomment cpplint from tox.ini and cleanup C++ codeGeneralize the threading model (currently it uses 8 threads—one for each quadrant)
Package: natural-python
natural-pythonGitlab repository|Github mirror|Blog postThis is a wrapper around the Python REPL which uses LLMs to search for code that matches your natural language specification and Python constraints.Naturally, from a safety perspective the output of an LLM can only be assumed to be adversarial. Indeed, executing the output of an LLM is an inherently dangerous approach to implementing a REPL. Use at your own peril.ExampleHello world session: given this input>>># Create a list with the days of the week, call it 'days'>>># finally:+++assertdays[0]=='Sunday'+++the interpreter will write the following code:>>>days=[>>>'Sunday',>>>'Monday',>>>'Tuesday',>>>'Wednesday',>>>'Thursday',>>>'Friday',>>>'Saturday',>>>]>>>assertdays[0]=='Sunday'Installationpip install --user --upgrade git+https://gitlab.com/da_doomer/natural-python.git(You can remove--upgradeif your pip is reasonably updated)Then simply executenatural-python --output my_script.pyin your shell (--outputis an optional parameter).The first time the interpreter is executed, it will ask for an API key. Currently, the interpreter supports GooseAI and OpenAI endpoints.UsageRunnatural-python --helpto get the following:usage: natural-python [-h] [--engine-id ENGINE_ID] [--sample-n SAMPLE_N] [--sample-temperature SAMPLE_TEMPERATURE] [--max-sample-tokens MAX_SAMPLE_TOKENS]
                      [--python-shell PYTHON_SHELL] [--show-engines] [--output OUTPUT]

Natural Python interpreter.

options:
  -h, --help            show this help message and exit
  --engine-id ENGINE_ID
                        Language model engine used for sampling.
  --sample-n SAMPLE_N   Number of samples drawn from the language model when executing an instruction.
  --sample-temperature SAMPLE_TEMPERATURE
                        Sampling temperature.
  --max-sample-tokens MAX_SAMPLE_TOKENS
                        Maximum number of tokens in each sample.
  --python-shell PYTHON_SHELL
                        Engine used for sampling.
  --show-engines        Display available language model engines.
  --output OUTPUT       Write the source code to a file at the end of the session.
Package: natural-selection
Natural Selection,(*                                         
           @@                                     
*@       @@% *@                                   
*@     @@   %@ @                                  
 @@/ @@   @@   @@                                 
   @@@(,@(   @/ @@@@@@@&@@@@@                     
                 @ @&  @@  /@@@#                  
                 /@  @@  ,@@   @@                 
                  ,@@   @@   @@  @                
                    %@@@   @@    @@@@@@@@@@@@@    
                          ,,      @  @@  @@  &@@@ 
                                  %@@  @@  &@@  @@
                                   @%@@  &@@     @
                                    ,@,%@@        
                                       @@@@@@     
             _                   _ 
 _ __   __ _| |_ _   _ _ __ __ _| |
| '_ \ / _` | __| | | | '__/ _` | |
| | | | (_| | |_| |_| | | | (_| | |
|_| |_|\__,_|\__|\__,_|_|  \__,_|_|                                   
          _           _   _             
 ___  ___| | ___  ___| |_(_) ___  _ __  
/ __|/ _ \ |/ _ \/ __| __| |/ _ \| '_ \ 
\__ \  __/ |  __/ (__| |_| | (_) | | | |
|___/\___|_|\___|\___|\__|_|\___/|_| |_|
                                        
by Zipfian SciencePython tools for creating and running Evolutionary Algorithm (EA) experiments byZipfian Science.For documentation, seedocs.Source onGitHub.For history, seechangelogInstall$pipinstallnatural-selectionAnd usefromnatural_selection.genetic_algorithmsimportGene,Chromosome,Individual,Islandfromnatural_selection.genetic_algorithms.utils.random_functionsimportrandom_int,random_gaussian# Create a geneg_1=Gene(name="test_int",value=3,gene_max=10,gene_min=1,randomise_function=random_int)g_2=Gene(name="test_real",value=0.5,gene_max=1.0,gene_min=0.1,randomise_function=random_gaussian)# Add a list of genes to a genomegen=Chromosome([g_1,g_2])# Next, create an individual to carry these genes and evaluate themfitness_function=lambdaisland,individual,x,y:individual.chromosome[0].value*x+individual.chromosome[0].value*yadam=Individual(fitness_function,name="Adam",chromosome=gen)# Now we can create an island for running the evolutionary process# Notice the fitness function parameters are given here.params=dict()params['x']=0.5params['y']=0.2isolated_island=Island(function_params=params)# Using a single individual, we can create a new populationisolated_island.initialise(adam,population_size=5)# And finally, we let the randomness of life do its thing: optimisebest_individual=isolated_island.evolve(n_generations=5)# After running for a few generations, we have an individual with the highest fitnessfitness=best_individual.fitnessgenes=best_individual.chromosomeforgeneingenes:print(gene.name,gene.value)ReleaseDate: 2023-02-15Version: 0.2.33
Package: natural-time
# natural_time v1
A parser for understanding date-times written in a variety of formatsThere are many great tools for interpreting dates and times when the format is known, however the aim of this project is to be able to interpret dates and times from much more fuzzy situations (e.g. Tomorrow afternoon at 3) as well as be able to extract the date or time from a sentence (e.g. I have an appointment at 6pm)Has capability to understand both relative times (e.g. in 5 days) and absolute times (e.g tomorrow at 5pm)This package can be installed using: pip install natural_timeHow to use:Import the package using: import natural_timeRun the function: natural_time.natural_time(“Your_String_Here”)Thats it (the natural_time function returns the date as datetime object)If you find examples of phrases that don’t interpret correcly raise an issue via github and I’ll work on incorporating it, you are welcome to also make contributions to the code.
Package: natural-units
natural_unitsWrapper for various units:UnitDescriptionNotesbasegeneralsuper classsim, kg, s, A, K, mol, cdhep$c=\hbar=\epsilon_0=k_B=1$checks mass dimension compatibilityplain_hep$c=\hbar=\epsilon_0=k_B=1$like natural, but without mass dimension checksgeometrized$c=G=1$checks length dimension compatibilityplanck$c=\hbar=G=k_B=1$stoney$c=G=k_e=e=1$hartree_atomic$e=m_e=\hbar=k_e=1$particle_atomic$c=m_e=\hbar=\epsilon_0=1$qcd$c = m_p=\hbar=\epsilon_0 = 1$
Package: naturf
naturfnaturf(Neighborhood Adaptive Tissues for Urban Resilience Futures) is an open-source geospatial Python package for calculating urban building parameters to be compiled and input to the Weather Research and Forecasting model (WRF).Purposenaturfwas created to:Calculate 132 urban parameters based on building footprints and height,Compile the parameters at sub-kilometer resolutions into binary files,Prepare binary files to be fed into WRF to understand the effect of building morphology on the urban microclimate.InstallnaturfpipinstallnaturfCheck out a quickstart tutorial to runnaturfRunnaturfusing the quickstart tutorial:naturfQuickstarterGetting startedNew tonaturf? Get familiar with whatnaturfis all about in ourGetting StartedUser guideOur user guide provides in-depth information on the key concepts ofnaturfwith useful background information and explanation. See ourUser GuideContributing tonaturfWhether you find a typo in the documentation, find a bug, or want to develop functionality that you think will makenaturfmore robust, you are welcome to contribute! See ourContribution GuidelinesAPI referenceThe reference guide contains a detailed description of thenaturfAPI. The reference describes how the methods work and which parameters can be used. It assumes that you have an understanding of the key concepts. SeeAPI ReferenceDeveloper SetupTo get started on development, install the pre-commit hooks to format code.Firstinstallpre-commit.Then install the hooks within the repo:$cd/PATH/TO/NATURF
$pre-commitinstallCode citationAllen-Dumas, Melissa Ree, Sweet-Breu, Levi, Seals, Matthew, Berres, Andy, Vernon, Chris R., Rexer, Emily, and USDOE Office of Science. NATURF. Computer software.https://www.osti.gov//servlets/purl/1879628. Vers. 0. USDOE Office of Science (SC), Biological and Environmental Research (BER). Earth and Environmental Systems Science Division. 31 Aug. 2022. Web. doi:10.11578/dc.20220803.4.Sample data citationOpenDataDC (2021) Open Data DC. URLhttps://opendata.dc.gov/datasets
Package: naturtag
NaturtagContentsSummaryUse CasesInstallationUsageGUICLILibraryDevelopment StatusSummaryNaturtag is a tool for nature photographers that adds useful metadata to describe the organisms in
your photos. It includes adesktop application, acommand-line interface, and can also be
used as apython library.It is mainly intended for use withiNaturalist; it can tag your
photos with either complete observation metadata, or just taxonomy metadata.Use CasesNaturtag embeds this information in your local photo collection usingXMPandEXIFmetadata. This has a variety of uses, including:Local photo organizationNaturtag can tag your photos withhierarchical keywords(aka structured keywords), which
are supported by some photo viewers/editors likeLightroom,FastPictureViewer,Photo Mechanic,
andXnViewMP.This essentially gives you a phylogenetic tree for browsing and filtering your photos.Example in XnViewPhoto hostingNaturtag can also simplify tagging photos for photo hosting sites like Flickr. For that use case, this
tool generates semi-structured keywords in the same format asiNaturalist's Flickr Tagger.Example search using these tags:https://www.flickr.com/photos/tags/taxonomy:class=arachnidaExample of taxonomy tags on FlickrOther biodiversity toolsFinally, naturtag can improve interoperability with other tools and systems that interact with biodiversity
data. For example, in addition to iNaturalist you might submit some observations to another
platform with a more specific focus, such aseBird,BugGuide, orMushroom Observer.
For that use case, this tool supportsSimple Darwin Core.InstallationSeeGitHub Releasesfor downloads andInstallationfor platform-specific instructions.To just install naturtag as a python package, run:pipinstallnaturtagUsageGUIThe main interface for this project is still a work in progress.It includes an interface for selecting and tagging images:And tools to search and browse species to tag your images with:SeeApplication Guidefor more details.CLINaturtag also includes a command-line interface. It takes an observation or species, plus some image
files, and generates EXIF and XMP metadata to write to those images. You can see it in action here:SeeCLI documentationfor more details.LibraryYou can also importnaturtagas a python library, and use its main features in your own scripts or
applications. Basic example:fromnaturtagimporttag_images,refresh_tags# Tag images with full observation metadatatag_images(['img1.jpg','img2.jpg'],observation_id=1234)# Refresh previously tagged images with latest observation and taxonomy metadatarefresh_tags(['~/observations/'],recursive=True)SeeAPI Referencefor more details.Development StatusSeeIssuesfor planned features and current progress.If you have any suggestions, questions, or requests, pleasecreate an issue, or ping me (@jcook)
on theiNaturalist Community Forum.When I'm not working on this, I'm usually working on other libraries that naturtag benefits from, includingrequests-cache,pyinaturalist, andpyinaturalist-convert.
Package: naucse
naucseThis is a server for open course material.To use it, you will need some content.
Usually, the repository with the content will require thenaucsemodule,
and will run usingpython -m naucse.We use content athttps://github.com/pyvec/naucse.python.czto generatenaucse.python.cz.InstallationInstall from a virtual environment.To install the latest release:(venv)$ python -m pip install naucseTo install from a cloned repository, for development:(venv)$ python -m pip install -e.[dev]RunningTo run the serve, either change (cd) to the directory with content,
or setNAUCSE_ROOT_PATHto that directory.
Then run:(venv)$ python -m naucse serveInstead ofserve, you can runfreezeto generate a static website.
SeeElsafor other usage, including
deployment to GitHub Pages.Served coursesThe courses on the served website are taken from two sources:courses.ymlin$NAUCSE_ROOT_PATH, with entries like:course_slug:url:https://github.com/user/repobranch:mainpath:_compiledThe named repositories will be cloned. At the given path in the given branch,
naucse expects compiled course info, as prepared bypython -m naucse_render compile.This is intended for the production site, which aggregates lots of individual
courses.Ifcourses.ymlis present, naucse will use a pretty homepage
(rather than listing all courses on the homepage).Any courses found bypython -m naucse_render ls.
This is useful when developing a course locally.TestsTests can be run usingtox:(venv)$ toxorpytestdirectly:(venv)$ python -m pytestLicenceThe code is licensed under the terms of the MIT license, seeLICENSE.MITfile
for full text. By contributing code to this repository, you agree to have it
licensed under the same license.Content has its own license specified in the appropriate matadata.
Onlyfree content licensesare used. By contributing to an already licensed
document, you agree to have it licensed under the same license.
(And feel free to add yourself to the authors list in its metadata.)
When contributing new document(s) a license must be specified in the metadata.