Saravanan666/pypi-org huggingface dataset:
Package: local-cnames
===========Local CNAME===========.. image:: https://img.shields.io/pypi/v/local-cname.svg:target: https://pypi.python.org/pypi/local-cname:alt: Latest Version.. image:: https://img.shields.io/pypi/status/local-cname.svg:target: https://pypi.python.org/pypi/local-cname:alt: Development Status.. image:: https://img.shields.io/pypi/pyversions/local-cname.svg:target: https://pypi.python.org/pypi/local-cname:alt: Python Versions.. image:: https://img.shields.io/pypi/l/local-cname.svg:target: https://github.com/hjacobs/local-cname/blob/master/LICENSE:alt: LicenseThis is a little helper script to emulate a local CNAME DNS by writing to ``/etc/hosts``.DNS changes (e.g. to rollout new services) can be tested by overwriting DNS names in the local ``/etc/hosts`` file.The hosts file only supports IP addresses thus making it cumbersome to emulate a DNS ``CNAME`` without a local DNS server/proxy.The ``local-cname`` is a very small script to automatically lookup DNS names and write IP addresses to the hosts file.It is self-contained and restores your local ``/etc/hosts`` file on exit (press CTRL+C).Installation:.. code-block:: bash$ sudo pip install -U local-cnamesUsage:.. code-block:: bash$ cat /etc/cnamesgoogle.com=duckduckgo.com$ sudo local-cnames# press CTRL+C to cancel and restore your old /etc/hostsExample:.. code-block:: bash$ cat /etc/cnamesgoogle.com=duckduckgo.com$ sudo local-cnames$ ping google.com
Package: local-code-qa
rag-template-1InstallationInstall the LangChain CLI if you haven't yetpipinstall-U"langchain-cli[serve]"Adding packages# adding packages from# https://github.com/langchain-ai/langchain/tree/master/templateslangchainappadd$PROJECT_NAME# adding custom GitHub repo packageslangchainappadd--repo$OWNER/$REPO# or with whole git string (supports other git providers):# langchain app add git+https://github.com/hwchase17/chain-of-verification# with a custom api mount point (defaults to `/{package_name}`)langchainappadd$PROJECT_NAME--api_path=/my/custom/path/ragNote: you remove packages by their api pathlangchainappremovemy/custom/path/ragSetup LangSmith (Optional)LangSmith will help us trace, monitor and debug LangChain applications.
LangSmith is currently in private beta, you can sign uphere.
If you don't have access, you can skip this sectionexportLANGCHAIN_TRACING_V2=trueexportLANGCHAIN_API_KEY=<your-api-key>exportLANGCHAIN_PROJECT=<your-project># if not specified, defaults to "default"Launch LangServelangchainserve
Package: localcrawl
Command line tool that crawls a local webserver with a headless browser
and outputs static html files. Works well withhtml5validatorto validate HTML5 from dynamic content with Javascript.Runlocalcrawl--help:PhantomJS is required. It is pre-installed on TravisCI. On a Mac runbrew install PhantomJS.Example Commandlocalcrawl--start_build/html/index.html--out_crawled/--depth3Mustache ExampleThis can be used to convert templated files to HTML files (e.g. for validation
withhtml5validator).Input:<html><head><title>Mustache Test</title></head><body><divid="output"></div><scripttype="text/javascript"src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.2.1/mustache.min.js"></script><script>vardata={item:'Fork',price:function(){return(1.10*1.08).toFixed(2);},};varhtml=Mustache.render('{{item}}: <b>${{price}}</b>',data);document.getElementById('output').innerHTML=html;</script></body></html>The crawled output includes the output from processing the template
(Fork:<b>$1.19</b>):<html><head><title>Mustache Test</title></head><body><divid="output">Fork:<b>$1.19</b></div><scripttype="text/javascript"src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.2.1/mustache.min.js"></script><script>vardata={item:'Fork',price:function(){return(1.10*1.08).toFixed(2);},};varhtml=Mustache.render('{{item}}: <b>${{price}}</b>',data);document.getElementById('output').innerHTML=html;</script></body></html>Should play nice with:JavaScript template engines / JS frameworks:MustacheHandlebarsReactAngularEmberEmbedded JSJadeStatic site generators:JekyllGitBookOctopressPelicanMiddlemanHugo
Package: local-crontab
local-crontab is a Python wheel and command line utility to convert a crontab, in a local timezone, into a set of UTC crontabs.
It creates multiple UTC crontabs because of Daylight Saving Time.This project is based tolocal-crontabbyUnitedIncomewith some bug fixes.I added the possibility to convert a crontab, in a local timezone, into an UTC crontab, but only for hour and day parts.
This feature is useful to automate some simple convertions, but it is necessary a "dst check" program (external) to maintain the sync during the year with original local timezone.
This feature in not available to online converter.Use it online!Check it out atsonic0.github.io/local-crontab-web-converterUse as a script$ local-crontab --help
Usage: command_line.py [OPTIONS] CRONTAB

  Convert a crontab, in a localized timezone, into a set of UTC crontabs.

Options:
  --t, --timezone TZ    The timezone to use. Defaults to system timezone
  --help                Show this help message and exit.
  --version             Show program's version number and exit.

# year 2021
$ local-crontab --timezone America/New_York '0 10 * * *'
0 15 * 1-2 *
0 15 1-13 3 *
0 14 14-31 3 *
0 14 * 4-10 *
0 14 1-6 11 *
0 15 7-30 11 *
0 15 * 12 *

# year 2021
$ local-crontab --timezone America/Denver '0 10 * * *'
0 17 * 1-2 *
0 17 1-13 3 *
0 16 14-31 3 *
0 16 * 4-10 *
0 16 1-6 11 *
0 17 7-30 11 *
0 17 * 12 *

# year 2021, month july
$ local-crontab --timezone America/New_York --shift '0 23 3 * *'
0 3 4 * *Use as a libraryInstall withpip install local-crontab:fromlocal_crontabimportConverterConverter('0 10 * * *','America/New_York').to_utc_crons()# returns['0 15 * 1-2,12 *','0 15 1-10 3 *','0 14 11-31 3 *','0 14 * 4-10 *','0 14 1-3 11 *','0 15 4-31 11 *']fromlocal_crontabimportConverterConverter('0 23 3 * *','America/New_York').to_utc_cron()# returns'0 3 4 * *'Project infoThis repo is part of my projects group, calledCron-Converter.
Its related repositories:cron-converterlocal-crontab-ansible-filterlocal-crontab-serverless-infrastructurelocal-crontab-web-converter
Package: localDataBase
LocalDBlocalDBis a Python package that allows you to generate a local database in the file system. WithlocalDB, users cancreate, update, delete, andsearcha local database on their system. This package can be useful for applications that reire a simple and efficient local data storage solution. Additionally, being a local database solution, it does not require an internet connection or depend on external services.FolderDatacreateData:
This method creates a new directory with the given name. It first checks whether a directory with the same name already exists or not. If it exists, then it raises an error message and returns None. Otherwise, it creates the new directory and returns the directory object. A message is printed to confirm that the directory has been created.removeData:
This method removes the directory with the given name. It first checks whether the directory exists or not. If it doesn't exist, it raises an error message and returns None. Otherwise, it removes the directory and returns the directory object.findData:
This method checks whether a directory with the given name exists or not. It returns a boolean value of True if the directory exists, and False if it doesn't exist.ChasesThecreateChasemethod takes two arguments, name and chase. It checks if a data folder with the given name exists using the findData method. If it does not exist, it raises a TypeError. Otherwise, it creates a new text file with the given name in the data folder and returns the file object.
Example:localdb.createChase("dataName", "chaseName")ThesetChasemethod takes four arguments, name, chase, __newContent, and edit. It checks if the edit argument is either "a" or "w". If it is not, it raises a TypeError. It also checks if the data folder with the given name exists. If it does not exist, it raises a TypeError. Then, it opens the text file with the given name in the data folder with the appropriate editing mode. It writes the new content to the file and returns the number of characters written.
Example:localdb.createChase("dataName", "chaseName", "content", "editType")More Chases functions:findChase,removeChase,readChaseThese methods can be useful for managing and updating text files within a local data folder in a Python application.Installpip install localDataBaseAuthors@thiagostilo2121
Package: localdb.json
localdb.jsonA helper script for easily handling of JSON file as database in local storage.Installationpip install localdb.jsonUsageCreating instancefromlocaldbimportDatabasedb=Database("example.json")Saving some dataThis creates a key with the given value. It will overwrite existing key's value. Always returnsTrue.db.set("TEST","VALUE")>>>TrueGetting saved dataReturns value of requested key if it exists or will returnNone.db.get("TEST")>>>VALUERenaming a keyRenames an existing key to another. ReturnsTrueif it exists or will returnNone.db.rename("TEST","Test")>>>TrueDeleting a keyDeletes key and value from database. ReturnsTrueif it exists or will returnNone.db.delete("Test")>>>TrueDatabase sizeSize of database file is returned in bytes.db.size>>>42Issues ?Open issues or askhereContributingPull requests are welcome.LicenseLicensed underGNU Affero General Public Licensev3.CreditsMe
Package: local-db-lasdot
Local DatabaseDescription:Popluate and query local mongo server with
energy api dataInstallation Steps:Requirements:numpy:1.18.2pandas:1.0.3pymongo:3.10.1tqdm:4.45.0note:Please ensure that mongodb is installed and active before running.Installation:pip install local-db-lasdot==0.0.1Import Statement:from local_db.create_db import CreateDb

from local_db.query_db import QueryDbPopulate Database SectionSample UsageBatch insertion:create_db = CreateDb(db_name='example_db')
create_db.batch_insert('folder_path')Single insert:create = CreateDb(db_name='example_db')
create.single_insert(time_collection='time_(1_min|15_min)', data_file_dir='data folder path', meta_file_dir='metadata folder path')Query Database SectionSample UsageQuery with filterquery = QueryDb(db_name='example_db')
query_param = ['nest', 'grid', 'solar', 'clotheswasher1', 'dishwasher1']
data, id_list = query.query_df(query_param, 'time_15_min', db_op='OR', city=['all'])
try:
    data = QueryDb.filter_by(data, dataid='6139', city='austin')
except Exception as e:
    print(e)Query with dictionary parameterquery = QueryDb(db_name='example_db')
query_param = ['air1', 'nest', {'first_floor_square_footage': 2148}]

data, id_list = query.query_df(
    query_param,
    time_collection='time_15_min',
    db_op='AND',
    city=['all']
    first_floor_sqft_tol=0
)Test scriptsMust have test json files to implement this.note:commands must be implemented from command line ./local_db directorypython -m unittest tester.TestCreateDbClass.test_db_server

python -m unittest tester.TestCreateDbClass.test_batch_insert

python -m unittest tester.TestCreateDbClass.test_query_error_check

python -m unittest tester.TestCreateDbClass.test_query_empty

python -m unittest tester.TestCreateDbClass.test_query_db_op
Package: localdeps
localdeps: Usagelocaldeps is meant to be used as an easy way to install all dependencies of a conda package in development into a conda environment.For example, let's say I'm developing a package namedmypackage, and I want to package it as a conda package so other developers canconda install mypackage.  The prescribed path to do this in the open source world is to publish as a package on pypi and then to create a feedstock using conda forge to publish the conda package.If I'm working on closed source packages, I may need to build a conda package without publishing as a pypi package first.  Here's the problem: conda does not provide a way to install a package or its dependencies listed in meta.yaml in a development environment the same way that pip does, so it becomes difficult to automate development environment setup.So here comes localdeps to the rescue:localdeps --conda-dir conda.recipe --env my-dev-env
pip install -e . --no-deps --no-build-isolationNow, I only need one copy of the dependencies of my conda package (meta.yaml), and I can develop the code and have changes instantly take effect in the active environment.Installationconda install localdeps -c conda-forgeNote: This is not available viapip installbecause it depends on conda and conda-build, which are not available via pip.
Package: localeet
localeetA CLI tool to select and solve LeetCode and LeetCode-like problems locallyinstallationpip install localeetusagelocaleetThis will find a random question from LeetCode's free question set.
It will create a code file shell (Python by default) with the question
description and other metadata in it in your current working directory.
It will then pop open a code editor (VSCode by default) with the new
file opened in it.Examples of output files:PythonRustGocli argsSee the installed version of localeet with:localeet --version
localeet -vUsing any of these CLI args will use the output path provided, and
create any needed directories in that path as well.localeet --output_path ~/leetcode
localeet --path problems
localeet -o ~/leetcode/problems/2023-7-22You can set the max or min difficulty of the problem selected using a
string or an int{1: easy, 2: medium, 3: hard}.localeet --max_difficulty medium
localeet --max 1
localeet --min_difficulty 3
localeet --min hardTo specify a code editor other than VSCode, pass the CLI arg used to
open said editor using one of these args:localeet -e charm
localeet --editor subl
localeet --code_editor_open_command atomTo specify a language other than Python, use one of the following CLI
arg formats:localeet --programming_language rust
localeet --language go
localeet -l tsValid language options:c++
cpp
java
python
python3
py
c
c#
cs
javascript
js
ruby
rb
swift
go
golang
scala
kotlin
kt
rust
rs
php
typescript
ts
racket
rkt
erlang
erl
elixir
ex
dartPrint the manual:localeet --helpoverriding defaultsIf you want to set a different default value permanently, set it in your
environment like in these examples:export LOCALEET_DEFAULT_MAX_DIFFICULTY=medium
export LOCALEET_DEFAULT_MIN_DIFFICULTY=medium
export LOCALEET_DEFAULT_OUTPUT_PATH=./leetcode
export LOCALEET_DEFAULT_CODE_EDITOR_OPEN_COMMAND=vi
export LOCALEET_DEFAULT_LANGUAGE=cppcontributionslocal setupgit clone https://github.com/dannybrown37/localeet.git
    python -m venv .venv
    source .venv/bin/activate
    pip install -U pip
    pip install -e .[dev, test]
    pre-commit install
    pytest tests -s -vvcontribution processCreate a new branchAdd features you wish to proposeStage and commit your changes, ensure pre-commit checks passPush your branchOpen a pull requestEnsure Pull Request Verification CI/CD pipeline passesGet approved & mergedEnsure Publish to PyPI pipeline passesfeature ideasAdd commitizen for auto version updatingSupport submitting responses to LeetCode via CLI as wellWhatever your imagination holds
Package: locale-lint
Weblate is a copylefted libre software web-based continuous localization system,
used by over 2500 libre projects and companies in more than 165 countries.Weblate Locale LinterLinter for localization files powered by Weblate.This project is in beta. The interface, features, supported formats are subject to change without any intent to keep backward compatibility.Using manuallyThe Python module can be installed from the PyPI:pip install locale_lintRun to lint current directory:locale_lint lintUsing as GitHub actionPaste following snippet to your workflow YaML:- name: Weblate Locale Linter
    uses: WeblateOrg/locale_lint@v0.2.2Using as pre-commit hookPaste following snippet to your pre-commit configuration YAML:- repo: https://github.com/WeblateOrg/locale_lint
  rev: v0.2.2
  hooks:
  - id: locale_lintSupported formatsAllfile formats supported by
Weblatewill be supported. We will gradualy add support for more formats during the beta.Android resource stringsGNU Gettext PO files
Package: local-env-vars
Local Environment VariablesThis package allows you to specify which environmental variable you require in your application. It will create a.envfile, prompt you to populate it, and add the.envfile to your.gitignorefile.The functionality described is in line with the guidelines set out in theThe Twelve-Factor AppsectionIII Config.Implementation# importfromlocal_env_vars.envimportLocalEnvVars# setupenv=LocalEnvVars("sql_server_address","sql_username","sql_password")# sample usageconnection_string="Driver={{SQL Server}};Server={0}; Database=AdventureWorks;uid={1};pwd={2}".format(env.vars['sql_server_address'],env.vars['sql_username'],env.vars['sql_password'])Running this code for the first time will create an.envand add.envto the project.gitignorefile.The.envfile will have the following content. It will throw an exception reporting that you must provide values to the keys.{"sql_server_address": "", "sql_username": "", "sql_password": ""}After you have populated the keys with values you will be able to execute the code without any exceptions.
Package: locale-selector
locale_selectorA simple language selector pop-up modal for Django/Wagtail.Has 2 integrated backends for wagtail-localize translate page subtree tasks.locale_selector.jobs.ThreadedBackendlocale_selector.tasks.CeleryBackendQuick startAdd 'locale_selector' to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
   ...,
   'locale_selector',
]Add the following staticfiles accordingly:locale_selector/css/locale_selector.css
locale_selector/js/locale_selector.jsUse the templatetag in your base.html:{% load locale_selector %}
...

{# maintainer        Which maintainer do you want to display      #}
{# maintainer_site   Which maintainer site do you want to display #}
{# current_flag      Show the flag for the current language       #}
{# modal             Show a modal or banner                       #}
{# sticky            Make the modal/banner open/close button sticky in the document #}

{% locale_selector current_flag=True modal=False sticky=True %}
Package: locale-simple
# Description
This is a small wrapper around Gettext functionality that integrates sprintf and makes it a bit more easy to setup the internationalization. It ONLY supports UTF8 data, and in or output, that is a fixed setup (and always will be).# UsageUsage of this module is very similar to that of [Locale::Simple](https://metacpan.org/module/Locale::Simple):from locale_simple import *# Set the locale dir
l_dir(‘data/locale’)
# Set the default domain
ltd(‘test’)
# Set the default language
l_lang(‘de_DE’)print l(“Hello”) # Hallo
print ln(“You have %d message”,”You have %d messages”,1) # Du hast 1 Nachricht
Package: local-fake-useragent
这是一个本地版ua随机头, 不会出现请求超时等错误, 功能单一, 使用简单fake_useragent 是一个非常好用的随机请求头模块但因为这个模块在本地运行总是会因为各种各样的原因, 报错所以重新整理fake_useragent模块的所有请求头, 实现在本地获取随机请求头实际上就是把所有的请求头保存到本地 😂更多精彩文章, 请关注 [ 不止于python ] 公众号安装方法pip3.7installlocal-fake-useragent使用方法fromlocal_fake_useragentimportUserAgent# 获取所有浏览器的随机请求头u=UserAgent()# 获取chrome的随机请求头u=UserAgent("chrome")# 添加自定义请求头c={"0":["a","b"]}u=UserAgent("0",add_custom_header=c)print(u.rget)# 支持的浏览器print(UserAgent.BROWER)测试用例importrequestsfromlocal_fake_useragentimportUserAgentuas=UserAgent()headers={'User-agent':uas.rget}url='https://www.baidu.com'response=requests.get(url=url,headers=headers)response.encoding=response.apparent_encodingprint(response.text)
Package: local-feature-tutorial
Hands-on wide baseline tutorialSummary description here.We will create the wide baseline stereo mather and try it on various images with various features. There is also a a (naive) example of the spatial verification together with image retrieval. We will not build the components from scratch, instead will be using a ready packages, likekornia,pydegensacandOpenCVInstallpip install local_feature_tutorialHow to use%matplotlibinlineimportnumpyasnpimportmatplotlib.pyplotaspltfromlocal_feature_tutorial.wbsimport*fromlocal_feature_tutorial.visualizationimport*fromlocal_feature_tutorial.ioimport*fromlocal_feature_tutorial.datasetsimport*importcv2hard_images_to_match='http://cmp.felk.cvut.cz/~mishkdmy/wbs_illum.tgz'fname=download_file(hard_images_to_match)untar_to(fname,'data/wbs')wbs_img_fnames=get_all_images_in_subdirs('data/wbs')print(wbs_img_fnames)visualize_grid(wbs_img_fnames,(8,8))['data/wbs/chimera_01.png', 'data/wbs/chimera_02.png', 'data/wbs/dh_01.png', 'data/wbs/dh_02.png', 'data/wbs/doll_theater1.jpeg', 'data/wbs/doll_theater2.jpeg', 'data/wbs/doll_theater3.jpeg', 'data/wbs/kn_church-2.jpg', 'data/wbs/kn_church-8.jpg', 'data/wbs/ministry_01.png', 'data/wbs/ministry_02.png', 'data/wbs/ministry_03.png', 'data/wbs/purkine-2.jpg', 'data/wbs/purkine-4.jpg']sift_hardnet_matcher=TwoViewMatcher(detector=cv2.SIFT_create(8000),descriptor=HardNetDesc(),matcher=SNNMMatcher(0.9),geom_verif=degensac_Verifier(0.5))res=sift_hardnet_matcher.verify(wbs_img_fnames[7],wbs_img_fnames[8])print(res.keys())draw_matches(res['match_kpts1'],res['match_kpts2'],wbs_img_fnames[7],wbs_img_fnames[8],color=(0,255,0),R=10)dict_keys(['match_kpts1', 'match_kpts2', 'F', 'num_inl'])
Package: localflavor
localflavorThis package is a derivative ofdjango-localflavorand a work in progress.
This package does not depend on Django, and currently only contains postal codes validators, lists of country states and provinces and calling (dial in) codes.InstallationpipinstalllocalflavorExample usagePostal code validation>>>fromlocalflavor.generic.validatorsimportvalidate_country_postcode>>>validate_country_postcode('1000AA','NL')'1000 AA'>>>validate_country_postcode('0888','US')Traceback(mostrecentcalllast):File"<stdin>",line1,in<module>File"../localflavor/generic/validators.py",line453,invalidate_country_postcodereturnvalidator.clean(value)File"../localflavor/base.py",line71,incleanvalue=super(RegexValidator,self).clean(value)File"../localflavor/base.py",line48,incleanraiseValidationError(self.error_messages['invalid'])localflavor.exceptions.ValidationError:EnteravalidZIPcodeintheformatXXXXXorXXXXX-XXXX.Calling codes>>>fromlocalflavor.generic.countries.calling_codesimportCALLING_CODES>>>CALLING_CODES.get('US')'+1'>>>CALLING_CODES.get('RU')'+7'>>>CALLING_CODES.get('NL')'+31'
Package: local-forex
local-forexA free python package to help get started in building and interacting with a local database of currency exchange rates.Dictionary based currency exchange rate packageRates provided by Bank of Canada. Includes function for fetching and saving latest rates using BoC APIOffline JSON historical database reduces reliance on external API availability (records to 2017-01-03, TODO: extend historical records)~24 modern currencies supportedInstallationpipinstalllocal-forexcdlocal-forex
pipinstall-rrequirements.txtExample conversionimportlocal_forexfx=local_forex.ForexRates()# Example conversion rate query for USD/EUR on December 02, 2020fromdatetimeimportdatetimerate=local_forex.get_conversion_rate(base="USD",quote="EUR",date=datetime(2020,12,02))Backfilling ratesbackfill.py is included for convenience. Run Mon-Fri after 16:30EST to update database daily (e.g. Launchd on MacOS).online_rates=fx.fetch_boc_rates()fx.update_from_boc_rates(online_rates)fx.save_rates_to_file()