Saravanan666/pypi-org huggingface dataset:
Package: just-another-settings
Just a code I use in a few Bottle/Flask-based and a few other projects.fromjust_another_settingsimportEnvSelector,EnvFieldclassBaseSettings(object):DEBUG=True# EnvField looks for the variable and fetches it, otherwise use value from default parameterMONGOLAB_URL=EnvField('MONGO_URL')HOST=EnvField('HOST',default='localhost')classProdSettings(BaseSettings):DEBUG=FalseHOST='example.com'classDevSettings(BaseSettings):pass# env selector - selects settings base on env valuesenv_selector=EnvSelector('APP_MODE','dev',dev=DevSettings(),prod=ProdSettings())# value selector - selects settings base on passed(to the `choose` method) valueby_value_selector=ValueSelector(dev=DevSettings(),prod=ProdSettings())# somewhere in main file:# envapplication.config.from_object(env_selector.choose())# by valueapplication.config.from_object(by_value_selector.choose('dev'))
Package: just-a-test-project
Just a test projectDocumentation:https://creditornot.github.io/just-a-test-projectSource Code:https://github.com/creditornot/just-a-test-projectPyPI:https://pypi.org/project/just-a-test-project/A project for testing wolt-python-package-cookiecutterInstallationpipinstalljust-a-test-projectDevelopmentClone this repositoryRequirements:PoetryPython 3.7+Create a virtual environment and install the dependenciespoetryinstallActivate the virtual environmentpoetryshellTestingpytestDocumentationThe documentation is automatically generated from the content of thedocs directoryand from the docstrings
of the public signatures of the source code. The documentation is updated and published as aGithub project pageautomatically as part each release.ReleasingTrigger theDraft release workflow(pressRun workflow). This will update the changelog & version and create a GitHub release which is inDraftstate.Find the draft release from theGitHub releasesand publish it. When
a release is published, it'll triggerreleaseworkflow which creates PyPI
release and deploys updated documentation.Pre-commitPre-commit hooks run all the auto-formatters (e.g.black,isort), linters (e.g.mypy,flake8), and other quality
checks to make sure the changeset is in good shape before a commit/push happens.You can install the hooks with (runs for each commit):pre-commitinstallOr if you want them to run only for each push:pre-commitinstall-tpre-pushOr if you want e.g. want to run all checks manually for all files:pre-commitrun--all-filesThis project was generated using thewolt-python-package-cookiecuttertemplate.
Package: justautomate
CFE CLIA command line tool for various CFE-related tutorials and services.Do you have ideas for features? Please tweet us@joincfeInstallpip install cfeServices (cfe services)cfe servicesThis will give you all of the available services.Linode (cfe services linode)Instance Inventorycfe services linode inventoryThis is primarily made for usage with Ansible but it can be useful for many other things too.export LINODE_ACCESS_TOKEN=your_linode_personal_access_tokenLINODE_ACCESS_TOKENneeds to be in environment variablescfe services linode inventory --save-path "inventory.ini" --tags "webapps"orLINODE_ACCESS_TOKEN=your_linode_personal_access_token cfe services linode inventoryOptions:--allLists all Linode instance IP addresses and groups items by tags--save-pathwrite a path to save ainventory.inifile--tagsUse a comma separated list of tags you want to include (--allwill override)
Package: justbases
PurposeConversion of a rational number to a representation in any base. Any
rational number can be represented as a repeating sequence in any base.
Any integer is representable as a terminating sequence in any base.MotivationThis facility does not seem to exist in standard Python numerical packages
or standard Python symbolic computation packages. Most likely that is
because it falls between the two, as it is precise numerical computation,
but involves a symbolic component, the possibly repeating sequence of
digits.Algorithmic ComplexityThe complexity of operations that perform division in an arbitrary base
can be quite high. Most methods are annotated with an estimate of their
expected complexity in terms of the number of Python operations that they
make use of. No differentiation is made among different Python operations.
With respect to division in an arbitrary base, the complexity is bounded
by the value of the divisor, unless a precision limit is set.Related Packagesallyourbase:https://pypi.python.org/pypi/allyourbaseConverts a variety of numeric types to str in arbitrary bases.
Does not require one character to digit encoding, uses a digit separator.
Requires rounding, does not do precise conversion, but does do
conversion to any specified precision.python-baseconv:https://pypi.python.org/pypi/python-baseconvConverts an int to a string using a one character to digit encoding.
Also converts in the opposite direction.
Does not handle arbitrary rationals and does not really handle conversion to
large bases, e.g., 1024, as such conversion would require 1024 distinct
characters.python-radix:https://pypi.python.org/pypi/python-radixDoes not handle arbitrary bases. Converts int or int as str to str.numpy:http://docs.scipy.org/doc/numpy/reference/Converts int to str in bases between 2 and 36.PackagingDownstream packagers, if incorporating testing into their packaging, are
encouraged to use only the tests in the test_deterministic module, to
avoid testing failures that may arise due to the non-deterministic behavior
of Hypothesis tests.
Package: justbases-string
PurposeA small library for generating a human readable string value from a number
with an arbitrary base. The number is represented by five elements:a sign-1, 1, or 0 as appropriatean integer parta list of non-negative ints, where each element is less than the base valuea non repeating fractional parta list of non-negative ints, where each element is less than the base valuea repeating fractional parta list of non-negative ints, where each element is less than the base valuea basethe base of the number, must be an integer greater than 1.Usage>>> from justbases_string import *
>>> xformer = String(DisplayConfig(), 2)
>>> xformer.xform(-1, [1, 0, 1], [], [1, 0], 0)
'-101.(10)_2'
>>> xformer.xform(0, [], [0, 0], [], 0)
'0_2'An exception is raised if the parts of the number do not conform to the
necessary constraints:>>> xformer.xform(1, [2], [0, 0], [], 0)
Traceback (most recent call last):
...

>>> xformer.xform(1, [-1], [0, 0], [], 0)
Traceback (most recent call last):
...There are numerous options for configuring the string result:>>> digits_config = DigitsConfig(use_letters=False)
>>> xformer = String(DisplayConfig(digits_config=digits_config), 1024)
>>> xformer.xform(1, [2], [2, 4, 256], [], 0)
'2.2~4~256_1024'

>>> digits_config = DigitsConfig(use_caps=True)
>>> xformer = String(DisplayConfig(digits_config=digits_config), 16)
>>> xformer.xform(1, [], [0, 13], [], 0)
'0.0D_16'The final argument is the relation of the value being displayed to the value
it represents:>>> xformer.xform(1, [2], [2, 4, 256], [], Fraction(1, 3))
'< 2.2~4~256_1024'
Package: just-because
鸡你太美简介邹忌修八尺有余, 而形貌昳丽. 朝服衣冠, 窥镜, 谓其妻曰: "我孰与城北徐坤美?" 其妻曰: "君美甚, 徐坤何能及君也!" 城北徐坤, 齐国之美丽者也. 忌不自信, 而复问其妾曰: "吾孰与徐坤美?" 妾曰: "徐坤何能及君也!" 旦日, 客从外来, 与坐谈, 问之客曰: "吾与徐坤孰美?" 客曰: "忌你太美!"北冥有鱼, 其名为鲲. 化而为鸡, 鸡你太美.安装使用pip进行安装.pip3installjust-because使用$ python3
Python 3.8.9 (default, Apr 13 2022, 08:48:07)
[Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from just_because import ji2zhiyin
>>> ji2zhiyin('鸡你太美')
'只因你太美'
>>> from just_because import zhiyin2ji
>>> zhiyin2ji('只因你太美')
'鸡你太美'主要负责人小黑子.ikun.开源协议律师函开源协议具体内容详见MIT.
Package: just-bin
pybinThis project was inspired by howMaturin packages rust binaries.  The key observation is that in the wheel format, thedistribution-1.0.data/scripts/ directory is copied to bin, which means we can leverage this to seamlessly copy binaries into a user's PATH.Combined with Python's platform-specific wheels, this allows us to use pip as a "cross-platform package manager" for distributing single-binary CLI applications.Wheel Building ProcessThe core of the logic lies in thebuildlib.pymodule.A mapping from download URL (often github releases) to pypi platform tag is required.For each platform:Download the release & extract the binary.Set file permissions and place into scripts directory within wheel archive.Create the METADATA and WHEEL files within wheel archive.Place wheel intodist/folder.Once all wheels are constructed, the distribution is uploaded to PyPI.CICD is configured to automatically recognize newPyPIreleases by looking for a diff on the PYPI_VERSION.  When this happens, a build-and-release cycle is performed for that release version.Catalogpip install dive-bin:pybin version,upstream sourcepip install hadolint-bin:pybin version,upstream sourcepip install just-bin:pybin version,upstream sourcepip install lazydocker-bin:pybin version,upstream sourcepip install scc-bin:pybin version,upstream sourcepip install usql-bin:pybin version,upstream source
Package: justblockchain
justblockchainA blockchain linker to help understand hash functions in blockchainFree software: MIT licenseDocumentation:https://justblockchain.readthedocs.io.Quick startInstallationpip install justblockchainCreating simple blockchain>>> from justblockchain import justblockchain
>>> blockchain = justblockchain.Blockchain()
>>> blockchain.add_block("some block content")

#display the blockchain
>>> blockchain.chain
[{'previous_hash': '0', 'hash':
'816534932c2b7154836da6afc367695e6337db8a921823784c14378abed4f7d7',
'timestamp': 1465154705, 'index': 0, 'data': 'my genesis block!!'},
{'previous_hash':
'816534932c2b7154836da6afc367695e6337db8a921823784c14378abed4f7d7', 'hash':
'a046e0b31d2374d171a6bf62f15261f8bb1f71e6351aab2ce7ce6d550506d9ee',
'timestamp': '1521013680', 'index': 1, 'data': 'some block content'}]Creating a Block using proof-of-work>>> from justblockchain import justblockchain
>>> blockchain = justblockchain.Blockchain()
>>> blockchain.difficulty_bits = 20
>>> blockchain.add_block("some block content")
Computing nonce for the block...
Success with nonce 2991544
Hash is 00000fc3d1420243cca17693bcc75334eb9f01b0943772f5d6456e17f3218abcCreditsImplementation of Proof of work algorithm in the version 1.0.0 is inspired fromMastering Bitcoin- First Edition byAndreas M. Antonopoulos LLCwhich is licensed underCreative Commons Attribution-ShareAlike 4.0 International LicenseThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-03-13)First release on PyPI.
Package: justbytes-gui
justbytes_gui is a simple library for demonstrating the display options
of the justbytes library.There are a lot of display options, and it is a bit hard to remember all
their keywords.UsageThis library requires the justbytes library. It has one method, show(),
which is invoked on a justbytes.Range object.>>> from justbytes import *
>>> number = Range(32, GiB)
>>> from justbytes_gui import show
>>> show(number)The show() method opens a GUI displaying the number according to the default
options and allowing the user to experiment by changing the options.The options are in two categories, those that may alter the value of the
number or of the unit displayed, and those that only alter the appearance.Value OptionsBase – the base in which the number is displayed. Ten is the most usual
base, but the display options allow for any choice of base. Base 1000 is
particularly useful when showing the value in SI units, base 1024 when
showing the value in IEC units, since these choices of base also show
the breakdown in sub-units.Units, IEC or SI – IEC units are base 1024, SI are base 1000.Exact Value – if this option is chosen, the highest units such that
the resulting value is a whole number are chosen.Precision – the maximum number of digits to the right of the radix.Limit – a fraction, which multiplied by the appropriate factor for IEC or
SI units, gives an upper limit on the size of the value to appear on the
left of the radix. A choice of 1.0 with IEC units indicates that the value
on the left of the radix must be strictly less than 1024 * 1.0.Rounding Method – there are a number of rounding methods, with
self-explanatory names.Unit – if a particular unit, e.g., MB, is specified, this overrides other
configuration operations.Display OptionsDisplay options are further grouped according to various categories.Base OptionsThese options determine how the base of the number is indicated.Prefix – use one of the customary prefixes for either base 8 (0), or base
16 (0x).Subscript – use a subscript-like notation to indicate the base.Digits OptionsThese options determine how the digits are displayed.Use Letters – use letters for digits with value larger than 9 in the
customary way, i.e., a for 10, b for 11, and so forth.Use Capitals – this is only meaningful if already using letters, and
causes upper-case instead of lower-case letters to be used.Separator – separator to separated digits from each other when other
choices result in digits that require more than one character to represent.Strip OptionsThese options control how trailing zeros are stripped.Strip All – strip all trailing zeros.Strip Exact – strip trailing zeros if the number displayed is exactly
the same as the value it represents.Strip Whole – like Strip Exact, but add the further restriction that only
zeros appear on the right side.Miscellaneous OptionsThese options fall into no obvious grouping.Show Relation – indicate the relation of the value displayed to the value it   represents.
Package: justcalc
JustCalcIntroductionWelcome to JustCalc, a basic Python calculator capable of performing simple arithmetic operations and more.FeaturesJustCalc provides the following functionalities:AdditionSubtractionMultiplicationDivisionTaking the nth root of a numberDisplaying current memoryResetting memory to zeroInstallationYou can install JustCalc using the following command:pip install justcalcUsagefrom justcalc.calculator import Calculator

# Create instance of Calculator
calc = Calculator()

# Perform Addition
calc.add(5)

# Perform Subtraction
calc.subtract(2)

# Perform Multiplication
calc.multiply(9)

# Perform Division
calc.divide(3)

# Take the nth root of a current number in memory
calc.root(3)

# Display current memory
calc.current_memory()

# Reset memory
calc.reset_memory()TestingTo run the tests in this project, you can use the following command:python -m pytestContributingContributions to JustCalc are welcome! If you encounter any issues or have suggestions for improvement, please follow the guidelines below:For bug reports or feature requests, please open an issue on the GitHub repository.If you'd like to contribute code, fork the repository, make your changes, and submit a pull request.Follow the coding style and conventions used in the project.
Package: justcoin-sdk
Install the sdk:pip install justcoin-sdkGet your API key fromJustcoinand then just do:from justcoin import justcoin
api = justcoin.JustcoinAPI("my-api-key")
print api.list_markets()You can get a list of available endpoints and their explanations from a mixture of theold docsand thenew docs. I find the old docs to be more comprehensive.Have fun
Package: just-compose
Just ComposeA script to run the entire pipeline.Installationpip3installjust_compose
jcompose--help# Should print somethingHow to deploy crow# This repo implements health checkscd~/crow2/src
gitclonehttps://gitlab.ciirc.cvut.cz/hajekric/observations# Rebuildcd~/crow2
colconbuild--symlink-install# This repo contains example configurationscd~/
gitclonehttps://gitlab.ciirc.cvut.cz/hajekric/just-compose.gitcdexamples
jcomposejust-compose_ros.yaml# Should start the pipelineHow to write a serviceIf you don't have your own, createtutorial.yamlwith this content:pre:-cd ~/crow2-source /opt/ros/eloquent/setup.bash-source install/setup.bashpost:-echo "Job finished"services:crow_vision_ros2:working_dir:~/crow2command:ros2 launch crow_vision_ros2 all_cameras.launch.pytags:[vision,camera]Figure out the followingService name ( for identification, must be unique )Command(s) to run the serviceMake sure to also find out the working dir of the serviceIf you want healtcheck:Find out what is the name of your ROS nodeInsert the following into the config file, into theservicespart<service_name>:working_dir:<working_dir>command:<command>healthcheck:ros2 run observations check_alive -n <node_name># Ignore this line if you dont have a health checktags:[<tag1>,<tag2>]# Ignore this line if you dont have any tags ( alternative names )You may now run this service withjcompose tutorial.yaml --jobs <service_name>orjcompse tutorial.yaml --jobs <any of the tags>Technical detailsYAMLThe main configuration file contains the following structure:pre:-echo This hook runs before each job and each healthcheckpost:-echo This hook runs after each jobservices:crow_vision_ros2:# The name of the service. Is used for printing and identificationworking_dir:~/crow2# Command is `cd`-ed to this directory before executioncommand:ros2 launch crow_vision_ros2 all_cameras.launch.py# The service commandtags:[vision]# Tags used for identificationcrow_object:working_dir:~/crow2commands:-echo Multiline commands are also available-ros2 launch crow_vision_ros2 crow_object.launch.pytags:[vision]...
Package: just-config
just_configMinimalistic library to handle configuration for the application.As for now, it will look for the configuration value in the following order:In system environment variables.Indefault.inifile in the current working directoryIndefault.inifile in application-specific folder under user home directoryUsage:>>>fromjust_config.configurationimportConfiguration>>>cfg=Configuration()>>>cfg['test']'value'>>># If I store my configuration in ~/.app/default.ini>>>cfg=Configuration('app')>>>cfg['test']'value'Example configuration file:[DEFAULT]test=value
Package: justengel-material
Fastapi Jinja materializecss theming system.Example# material_demo.pyimportosfromfastapiimportFastAPI,Requestimportjustengel_materialMY_DIR=os.path.dirname(__file__)app=FastAPI()material=justengel_material.MaterialTemplates(os.path.join(MY_DIR,'templates'))material.install_app(app,site_name='Material Demo',primary_color='purple',secondary_color='teal')@app.get('/')defindex(request:Request):ctx={'request':request,'base_url':request.base_url,'title':'index'}returnmaterial.TemplateResponse('material/index.html',ctx)HTML Template intemplates/material/index.html{# templates/material/index.html #}{%extends"justengel_material/base.html"%}{%blockcontents%}<h1>HelloWorld!</h1><ul><li>Item1</li><li>Item2</li><li>Item3</li></ul><buttonclass="btn">Button</button>{%endblockcontents%}
Package: justengel-theme
Fastapi Jinja theming system.Include Block TagThis template system heavily uses the include_block tag. This tag will include an html file as a block.
This tag can be overridden with an html file matching the name or by a block tag matching the base name.Create a base for your theme{# theme_templates/theme/base.html #}<html><body>{% include_block "theme/sidenav.html" %}

{% block contents %}<h1>Hello World!</h1>{% endblock %}</body></html>Normal navigation for your theme{# theme_templates/theme/sidenav.html #}<ul><li><ahref="/">Home</a></li><li><ahref="/page1">Page 1</a></li><li><ahref="/page2">Page 2</a></li></ul>Override with blockOverride navigation by using a block. The block name will be the same as the base html filename.
Note: different templates directory{# templates/main.html #}
{% extends "theme/base.html" %}

{% block sidenav %}<ul><li>Hello</li></ul>{% endblock sidenav %}Override with HTML fileAlternatively you can override by using an html file. Note: different templates directory{# templates/theme/sidenav.html #}<ul><li><ahref="/">Home</a></li><li><ahref="/link">Link to my other site</a></li></ul>Fastapi using the templatesfromfastapiimportFastAPI,Requestfromjustengel_themeimportThemeTemplatesMYD_DIR=os.path.dirname(__file__)# Search for project files firstproject_dir=os.path.join(MY_DIR,'templates')templates=ThemeTemplates(project_dir)# Search for theme files if project files are not foundtheme_dir=os.path.join(MY_DIR,'theme_templates')templates.add_directory(theme_dir)app=FastAPI()@app.get('/')defindex(request:Request):returnmaterial.TemplateResponse('main.html',{'request':request})
Package: juster
JusterScript for justification text with newlines and delimitersInstall.. code-block:: pythonpip install justerUsage.. code-block:: pythonfrom juster import justify

print(justify.__doc__)
data = "some;thing;here\nvery;next;line"
out = justify(data)
print(out)'justify' function parameters:content - text with newlines and delimiters, to be converted /
from version 0.1.2 it also can be list(tuple) of lists(tuples)grid - True/False value, grid inside; default is Trueframe - True/False value, frame around; default is Falseenumerator - True/False value, will add enumerator column on the leftheader - True/False value, will extract first row from content as headertopbar - str value. Topbar will be added on the topnewline - newline symbol; default is '\n'delimiter - delimiter symbol; default is ';'justsize - justify size; default is 4Example.. code-block:: pythonfrom juster import example

example()
Package: jusText
jusTextProgram jusText is a tool for removing boilerplate content, such as navigation
links, headers, and footers from HTML pages. It isdesignedto preserve
mainly text containing full sentences and it is therefore well suited for
creating linguistic resources such as Web corpora. You cantry it online.This is a fork of original (currently unmaintained) code ofjusTexthosted
on Google Code.Adaptations of the algorithm to other languages:C++GoJavaSome libraries using jusText:chirplazynlpoff-topic-memento-toolkitpearsreadability calculatorskySome currently (Jan 2020) maintained alternatives:dragnethtml2textinscriptisnewspaperpython-readabilitytrafilaturaInstallationMake sure you havePython2.7+/3.5+ andpip(Windows,Linux) installed.
Run simply:$[sudo]pipinstalljustextDependencieslxml (version depends on your Python version)Usage$python-mjustext-sCzech-otext.txthttp://www.zdrojak.cz/clanky/automaticke-zabezpeceni/$python-mjustext-sEnglish-oplain_text.txtenglish_page.html$python-mjustext--help# for more infoPython APIimportrequestsimportjustextresponse=requests.get("http://planet.python.org/")paragraphs=justext.justext(response.content,justext.get_stoplist("English"))forparagraphinparagraphs:ifnotparagraph.is_boilerplate:printparagraph.textTestingRun tests via$py.test-2.7&&py.test-3.5&&py.test-3.6&&py.test-3.7&&py.test-3.8&&py.test-3.9AcknowledgementsThis software has been developed at theNatural Language Processing CentreofMasaryk University in Brnowith a financial support fromPRESEMTandLexical Computing Ltd.It also relates toPhD researchof Jan Pomikálek.Changelog for jusText3.0.0 (2021-10-21)INCOMPATIBLE CHANGE:Dropped support for Python 3.4 and below.BUG FIX:Don’t join words separated only by<br>tag.BUG FIX:List available stop-lists alphabetically.2.2.0 (2016-03-06)INCOMPATIBLE CHANGE:Stop words are case insensitive.INCOMPATIBLE CHANGE:Dropped support for Python 3.2BUG FIX:Preserve new lines from original text in paragraphs.2.1.1 (2014-05-27)BUG FIX:Functiondecode_htmlnow respects parametererrorswhen falling todefault_encoding#9.2.1.0 (2014-01-25)FEATURE:Added XPath selector to the paragrahs. XPath selector is also available in detailed output asxpathattribute of<p>tag#5.2.0.0 (2013-08-26)FEATURE:Added pluggable DOM preprocessor.FEATURE:Added support for Python 3.2+.INCOMPATIBLE CHANGE:Paragraphs are instances ofjustext.paragraph.Paragraph.INCOMPATIBLE CHANGE:Script ‘justext’ removed in favour of
commandpython-mjustext.FEATURE:It’s possible to enter an URI as input document in CLI.FEATURE:It is possible to pass unicode string directly.1.2.0 (2011-08-08)FEATURE:Character counts used instead of word counts where possible in
order to make the algorithm work well in the language independent
mode (without a stoplist) for languages where counting words is
not easy (Japanese, Chinese, Thai, etc).BUG FIX:More robust parsing of meta tags containing the information about
used charset.BUG FIX:Corrected decoding of HTML entities &#128; to &#159;1.1.0 (2011-03-09)First public release.