Saravanan666/pypi-org huggingface dataset:
Package: ldc-urlshort
URL Shortener PackageThis package provides utility functions as well as views for shortening urls and redirecting to original urls.InstallationYou can install this package using pip:## required for reading env file

pip install django-environ

## migration file is included in the package.
## Need run following cmd to migrate

python manage.py migrateConfigurationSetup env file:URLSHORT_SCHEME=http/https

URLSHORT_DOMAIN=127.0.0.1:9000/your_endpoint
    specify the domain name for shortened url
    note: domain should include endpoint specified for urlshort.urls in settings.py
    
URLSHORT_EXPIRES_AT=2
    specify the validity of url in daysAdd the following in your project's settings.py file:## add following lines if not present else ignore
import environ
env = environ.Env()
environ.Env.read_env()

 ## add urlshort in INSTALLED_APPS
INSTALLED_APPS = [
    ... ,
    'urlshort'
]

If using .env file
URLSHORT = {
    'URLSHORT_SCHEME': env('URLSHORT_SCHEME'),
    'URLSHORT_DOMAIN': env('URLSHORT_DOMAIN'),
    'EXPIRES_AT': env('URLSHORT_EXPIRES_AT')
}

If using secrets.json file
URLSHORT = {
    'URLSHORT_SCHEME': get_secret('URLSHORT_SCHEME'),
    'URLSHORT_DOMAIN': get_secret('URLSHORT_DOMAIN'),
    'EXPIRES_AT': get_secret('URLSHORT_EXPIRES_AT')
}UsageValid URL should always end with backlash:https://www.google.com/Following URL will be considered invalid:http://www.google.comUsing views:Add following in your project's urls.py file:urlpatterns = [
    ... ,
    path('your_endpoint/', include('urlshort.urls'))
]shorten_urlENDPOINT = defined in urlpatterns for the package's urls

POST request:

    curl --location 'your_server_domain/ENDPOINT/apis/url/create' \
    --data '{
        "original_url": "https://www.postgresql.org/docs/7.3/arrays.html"
    }

    for example:
        curl --location 'your_server_domain/your_endpoint/apis/url/create' \
        --data '{
            "original_url": "https://www.postgresql.org/docs/7.3/arrays.html"
        }

SCHEME and DOMAIN = defined in your env/secrets file

response:
    
    {
        "status": "01",
        "data": {
            "created_at": "2023-10-25T12:00:12.623Z",
            "original_url": "https://www.postgresql.org/docs/7.3/arrays.html",
            "short_url": "SCHEME://DOMAIN/ENDPOINT/CWmPYIc",
            "expires_at": "2023-10-26T12:00:12.621Z",
            "alias": "CWmPYIc",
            "domain": "DOMAIN",
            "is_active": true,
            "hit_count": 0
        }
    }Using helper functions:shorten url:original_url = "https://www.google.com/"

from urlshort.helpers import shorten_url

short_url = shorten_url(value)get_original_url:note: get_original_url function takes in unique_id as argument:
    unqiue_id = Pq3E8yy

from urlshort.helpers import get_original_url

original_url = get_original_url(unique_id)
Package: ldc-urlshort-python2
URL Shortener PackageThis package provides utility functions as well as views for shortening urls and redirecting to original urls.InstallationYou can install this package using pip:## required for reading env file

pip install django-environ

## migration file is included in the package.
## Need run following cmd to migrate

python manage.py migrateConfigurationSetup env file:URLSHORT_SCHEME=http/https

URLSHORT_DOMAIN=127.0.0.1:9000/your_endpoint
    specify the domain name for shortened url
    note: domain should include endpoint specified for urlshort.urls in settings.py

URLSHORT_EXPIRES_AT=2
    specify the validity of url in daysAdd the following in your project's settings.py file:## add following lines if not present else ignore
import environ
env = environ.Env()
environ.Env.read_env()

 ## add urlshort in INSTALLED_APPS
INSTALLED_APPS = [
    ... ,
    'urlshort_python2'
]

If using .env file
URLSHORT = {
    'URLSHORT_SCHEME': env('URLSHORT_SCHEME'),
    'URLSHORT_DOMAIN': env('URLSHORT_DOMAIN'),
    'EXPIRES_AT': env('URLSHORT_EXPIRES_AT')
}

If using secrets.json file
URLSHORT = {
    'URLSHORT_SCHEME': get_secret('URLSHORT_SCHEME'),
    'URLSHORT_DOMAIN': get_secret('URLSHORT_DOMAIN'),
    'EXPIRES_AT': get_secret('URLSHORT_EXPIRES_AT')
}UsageValid URL should always end with backlash:https://www.google.com/Following URL will be considered invalid:http://www.google.comUsing views:Add following in your project's urls.py file:urlpatterns = [
    ... ,
    path('your_endpoint/', include('urlshort_python2.urls'))
]shorten_urlENDPOINT = defined in urlpatterns for the package's urls

POST request:

    curl --location 'your_server_domain/ENDPOINT/apis/url/create' \
    --data '{
        "original_url": "https://www.postgresql.org/docs/7.3/arrays.html"
    }

    for example:
        curl --location 'your_server_domain/your_endpoint/apis/url/create' \
        --data '{
            "original_url": "https://www.postgresql.org/docs/7.3/arrays.html"
        }

SCHEME and DOMAIN = defined in your env/secrets file

response:

    {
        "status": "01",
        "data": {
            "created_at": "2023-10-25T12:00:12.623Z",
            "original_url": "https://www.postgresql.org/docs/7.3/arrays.html",
            "short_url": "SCHEME://DOMAIN/ENDPOINT/CWmPYIc",
            "expires_at": "2023-10-26T12:00:12.621Z",
            "alias": "CWmPYIc",
            "domain": "DOMAIN",
            "is_active": true,
            "hit_count": 0
        }
    }Using helper functions:shorten url:original_url = "https://www.google.com/"

from urlshort_python2.helpers import shorten_url

short_url = shorten_url(value)get_original_url:note: get_original_url function takes in unique_id as argument:
    unqiue_id = Pq3E8yy

from urlshort_python2.helpers import get_original_url

original_url = get_original_url(unique_id)
Package: ldcv
A console versionLongMandictionary.Usageusage: ldcv [-h] [-f] [-j] [--cache CACHE] [-c CONFIG]
            [--color {always,auto,never}]
            [words [words ...]]

LongMan Console Version

positional arguments:
  words                 words or quoted phrases to lookup

optional arguments:
  -h, --help            show this help message and exit
  -f, --full            print verbose explanations. Default to print first
                        three explanations
  -j, --json            dump the explanation with JSON style
  --cache CACHE         specify a word list file then cache words from it to
                        <cachefile>
  -c CONFIG, --config CONFIG
                        specify a config file
  --color {always,auto,never}
                        colorize the output. Default to "auto" or can be
                        "never" or "always"Installation$pipinstallldcvEnvironment or dependencesPython (3.x)lxmlThanksydcv
Package: lddcollect
lddcollectList all shared library files needed to run ELF executable or load elf library.
On Debian based systems can also list packages needed instead of library files.Typical use case: you have a locally compiled application or library with large
number of dependencies, and you want to share this binary. This tool will list
all shared libraries needed to run it. You can then create a minimal rootfs with
just the needed libraries. Alternatively you might want to know what packages
need to be installed to run this application (Debian based systems only for
now).InstallationThis tool is Python (3.6+) based. It can be installed withpip:pip install lddcollectUsagelddcollect --help
Usage: lddcollect [OPTIONS] [LIBS_OR_DIR]...

  Find all other libraries and optionally Debian dependencies listed
  applications/libraries require to run.

  Two ways to run:

  1. Supply single directory on input
     - Will locate all dynamic libs under that path
     - Will print external libs only (will not print any input libs that were found)
  2. Supply paths to individual ELF files on a command line
     - Will print input libs and any external libs referenced

  Prints libraries (including symlinks) that are referenced by input files,
  one file per line.

  When --dpkg option is supplied, print:

    1. Non-dpkg managed files, one per line
    2. Separator line: ...
    3. Package names, one per line

Options:
  --dpkg / --no-dpkg  Lookup dpkg libs or not, default: no
  --json              Output in json format
  --verbose           Print some info to stderr
  --ignore-pkg TEXT   Packages to ignore (list package files instead)
  --help              Show this message and exit.There are two modes of operation.List all shared library files needed to execute supplied inputsList all packages you need toapt-getinstallto execute supplied inputs
as well as any shared libraries that are needed but are not under package
management.In the first mode it is similar toldd, except referenced symbolic links to
libraries are also listed. In the second mode shared library dependencies that
are under package management are not listed, instead the name of the package
providing the dependency is listed.
Package: ld-estimator
ld_estimator: A package to estimate linkage disequilibriumComputes linkage disequilibrium in python. This uses the maximum-likelihood ofExcoffier & Slatkin,
just converted fromHaploViewto c++
, with python bindings. It's not too slow, can calculate ~1500 pairs per
second from the HapMap Phase 3 VCFs.InstallationThe simplest way to install ld_estimator is through pip:pipinstallld_estimatorUsageUse ld_estimator within a python environmentfromld_estimatorimportpairwise_ldvar1=[(0,0),(0,0),(0,1),(1,0),(1,1),(0,1),(0,0),(0,0),(1,1)]var2=[(0,0),(0,0),(0,1),(1,0),(1,1),(0,1),(0,0),(1,1),(1,1)]is_haploid=[False,False,False,False,False,False,False,True,True,True]ld=pairwise_ld(var1,var2,is_haploid)print(ld.dprime)print(ld.r_squared)# or calculate LD for all pairs of variants in a region in a VCF:fromld_estimatorimportregion_ldvcf_path='PATH_TO_VCF'ld=region_ld(vcf_path,chrom,start,end)# or calculate LD to a site within a region in a VCF. This defaults to checking# variants within a 100 kb window of the specified site.fromld_estimatorimportsite_ldvcf_path='PATH_TO_VCF'ld=site_ld(vcf_path,chrom,pos,window=200000)# can pass in multiple positions in the same region at onceld=site_ld(vcf_path,chrom,[pos2,pos2,pos3],window=200000)# both region_ld() and site_ld() can take a list of sample IDs to subset the# samples used for calculating LD. For example:ld=site_ld(vcf_path,chrom,pos,subset=['sample1','sample2'])# if the variant is on a sex chromosome, you'll have to pass in a list of sample# sexes (matching order of the subset IDs if present, otherwise the VCF samples)ld=site_ld(vcf_path,'X',20000000,sexes=['male','female'])
Package: ld-feature-patch
LD Feature PatchPatchLaunch Darklyfeature flags for unit testingFree software: Apache Software License 2.0Documentation:https://ld-feature-patch.readthedocs.io/en/latest/.Usagefromld_patchimportpatch_feature@patch_feature("my.flag.key",True)deftest_my_code():# Feature defaults to Falseshow_feature=ldclient.variation("my.flag.key","test@example.com",False)# But patch_feature set it to Trueassertshow_feature==TrueInstallationpython-mpipinstallld-feature-patchCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History1.0.0 (2024-01-12)Drop support for Python 3.6. Add Python 3.10 - 3.12.0.1.0 (2021-01-11)First release on PyPI.
Package: ldgm
ldgmLDGMs (Linkage Disequilibrium Graphical Models) are sparse and accurate models of linkage disequilibrium (LD) which massively accelerate matrix algebra computations in statistical genetics.Please refer to thedocumentationfor information on installing and using the software.Please cite this paper if you use LDGMs in published work.Pouria Salehi Nowbandegani, Anthony Wilder Wohns, Jenna L. Ballard, Eric S. Lander, Alex Bloemendal, Benjamin M. Neale, and Luke J. O’Connor (2023)Extremely sparse models of linkage disequilibrium in ancestrally diverse association studies. Nat Genet. DOI: 10.1038/s41588-023-01487-8
Package: ldh-operator
Whipstaffproject|code|tracker|pypiWhipstaffis a command-line tool for operating one or more Liberty
Deckplan Hosts (LDHs) from your local session. The reference
implementation for an LDH operator toolkit.InstallationThe preferred way to install Whipstaff is with your package manager.
The recommended package name isldh-operator. For example:sudoaptinstallldh-operator# Debian-basedorpipxinstallldh-operator# Python-basedUsageFor help and a list of available commands:whipstaff--helpInstallation (from source)If you'd prefer to run from source...Install Python 3.x and pipenv. (Seehttps://docs.pipenv.org/install/for a tutorial.)Get source:git clone https://source.puri.sm/liberty/tool/operator.git ldh_operator_toolkitInstall with pipenv:cd ldh_operator_toolkit
 pipenv install --dev -e .Usage (from source)cdldh_operator_toolkit
pipenvrunwhipstaff--help# using "pipenv run" avoids confusion with a regular installationBuild wheel package (and optionally upload)Follow these instructions to build Liberty CLI as a Python package:gitclonehttps://source.puri.sm/liberty/tool/operator.gitldh_operator_toolkitcdldh_operator_toolkit
pipenvinstall--dev
pipenvshell# optionally edit default.yamlpythonsetup.pysdistbdist_wheelIf everything works as expected you should end up with the files:dist/ldh_operator-<version>-py3-none-any.whldist/ldh_operator-<version>.tar.gzYou can now optionally upload the created Python package to PyPI using twine:twineuploaddist/*Sharing and contributionsWhipstaff (LDH operator toolkit)https://source.puri.sm/liberty/tool/operatorCopyright 2018-2020 Purism SPCSPDX-License-Identifier: AGPL-3.0-or-laterShared under AGPL-3.0-or-later. We adhere to the Community Covenant
1.0 without modification, and certify origin per DCO 1.1 with a
signed-off-by line. Contributions under the same terms are welcome.For details see:COPYING.AGPL.md, full license textCODE_OF_CONDUCT.md, full conduct textCONTRIBUTING.DCO.md, full origin text
Package: ldicttools
===
dictionary - Interface with system dictionary files
===This is a GNU/Linux only library that uses dictionary files in “/usr/share/dict” to allow searching dictionaries.For example, to get all nouns that start with the letter a in /usr/share/dict/american_english_small:def a_nouns():
        en_us_small = dicttools.getDict("american_english_small")
        while not en_us_small.isFinished():
                time.sleep(1)
        en_us_small = en_us_small.getObject()
        for i in en_us_small.wordType('noun',[[dictionary.STARTS_WITH,'a']]):
                yield iTo get a dictionary, calldicttools.getDict(file: string)wherefileis a file in /usr/share/dict. You will recieve a DictionaryThread object.
Package: ldif
ldif - parse and generate LDIF data (seeRFC 2849).This is a fork of theldifmodule frompython-ldapwith python3/unicode support.One of its benefits is that it's a pure-python package (you don't
depend on thelibldap2-dev(or similar) package that needs to be
installed on your laptop / test machine / production server).See the last entry inchangelogfor a more complete list of
differences.This package only support Python 3 (>= 3.7, actually).UsageParse LDIF from a file (orBytesIO):fromldifimportLDIFParserfrompprintimportpprintparser=LDIFParser(open("data.ldif","rb"))fordn,recordinparser.parse():print('got entry record:%s'%dn)pprint(record)Write LDIF to a file (orBytesIO):fromldifimportLDIFWriterwriter=LDIFWriter(open("data.ldif","wb"))writer.unparse("mail=alice@example.com",{"cn":["Alice Alison"],"mail":["alice@example.com"],"objectclass":["top","person"],})Unicode supportThe stream object that is passed to parser or writer must be an ascii
byte stream.The spec allows to include arbitrary data in base64 encoding or via URL.
There is no way of knowing the encoding of this data. To handle this,
there are two modes:By default, theLDIFParserwill try to interpret all values as UTF-8
and leave only the ones that fail to decode as bytes. But you can also
pass anencodingofNoneto the constructor, in which case the
parser will not try to do any conversion and return bytes directly.ChangelogSeehere
Package: ldif2csv
Simple tool to convert LDIF to CSVThis tool converts LDIF files to CSV format and allows for changing delimiters and separators.Requirements:Python 3.9+ldifInstalling the PackageYou can install the tool using the following command directly from Github.pip install git+https://github.com/pfptcommunity/ldif2csv.gitor can install the tool using pip.pip install ldif2csvUsageldif2csv [-h] --input <filename> [--output <filename>] [--separator <sep>] [--delimeter <delim>]

Tool to convert LDIF to CSV

options:
  -h, --help                          show this help message and exit
  -i <filename>, --input <filename>   LDIF to read as input.
  -o <filename>, --output <filename>  CSV file to create as output.
  -s <sep>, --separator <sep>         Character to separate the fields in the CSV. By default this is a comma.
  -d <delim>, --delimeter <delim>     Character to delimit multi value fields. By default this is a semi-colon.
Package: ldif3
ldif3 - generate and parse LDIF data (seeRFC 2849).This is a fork of theldifmodule frompython-ldapwith python3/unicode
support. See the first entry in CHANGES.rst for a more complete list of
differences.UsageParse LDIF from a file (orBytesIO):from ldif3 import LDIFParser
from pprint import pprint

parser = LDIFParser(open('data.ldif', 'rb'))
for dn, entry in parser.parse():
    print('got entry record: %s' % dn)
    pprint(record)Write LDIF to a file (orBytesIO):from ldif3 import LDIFWriter

writer = LDIFWriter(open('data.ldif', 'wb'))
writer.unparse('mail=alice@example.com', {
    'cn': ['Alice Alison'],
    'mail': ['alice@example.com'],
    'objectclass': ['top', 'person'],
})Unicode supportThe stream object that is passed to parser or writer must be an ascii byte
stream.The spec allows to include arbitrary data in base64 encoding or via URL. There
is no way of knowing the encoding of this data. To handle this, there are two
modes:By default, theLDIFParserwill try to interpret all values as UTF-8 and
leave only the ones that fail to decode as bytes. But you can also pass anencodingofNoneto the constructor, in which case the parser will not
try to do any conversion and return bytes directly.
Package: ldifdiff
Simple tool to compare LDIF filesThis tool is used to compare two LDIF files.Requirements:Python 3.9+ldifcoloramaInstalling the PackageYou can install the tool using the following command directly from Github.pip install git+https://github.com/pfptcommunity/ldifdiff.gitor can install the tool using pip.pip install ldifdiffUsageusage: ldifdiff [-h] [-o outfile] [-l] [-r] [-c] [--left-symbol <]
                [--right-symbol >] [--common-symbol =] [--color]
                files files

Tool for comparing LDIF files

positional arguments:
  files                         Files to compare FILE1 and FILE2

optional arguments:
  -h, --help                    show this help message and exit
  -o outfile, --output outfile  File for output by default data is written to
                                console
  -l, --left                    Show items only in left file
  -r, --right                   Show items only in right file
  -c, --common                  Show items in both left and right file (equal)
  --left-symbol <               Symbol to the left of the entries only in
                                FILE1
  --right-symbol >              Symbol to the left of the entries only in
                                FILE2
  --common-symbol =             Symbol to the left of the entries in both
                                FILE1 and FILE2
  --color                       Colorize the output
Package: ldifj
ldifjThis Python script parses LDAP Data Interchange Format (LDIF) files,
allows for the extraction of entries and, optionally, metadata.🛠 InstallationInstall the required modules with pip(x):pipinstallldifj# the cool kids use pipx nowadays:pipxinstallldifj🚀 Usageusage: ldif [-h] [--metadata] [FILE]positional arguments:FILE         LDIF file to parse, set to '-' to read from stdinoptional arguments:-h, --help   show this help message and exit--metadata, -mInclude metadata📝 ExamplesTo parse an LDIF file, run:ldifexample.ldifldifalso accepts input from a pipe:catexample.ldif|ldifIf you want to include the metadata in the returned JSON object:ldif--metadataexample.ldif📜 LicenseGNU General Public License v3 (GPL-3).
Package: ldifparse
ldifparseParse LDIF data into common text formats. It currently supports conversion to JSON and to YAML.This is a thin wrapper around thepython-ldappackage.From:$ldapsearch-Q-L-YEXTERNAL-Hldapi:///-bdc=company,dc=com
version:1## LDAPv3# base <dc=company,dc=com> with scope subtree# filter: (objectclass=*)# requesting: ALL## company.comdn:dc=company,dc=com
objectClass:top
objectClass:dcObject
objectClass:organization
o:company
dc:company# admin, company.comdn:cn=admin,dc=company,dc=com
objectClass:simpleSecurityObject
objectClass:organizationalRole
cn:admin
description:LDAPadministrator# search result# numResponses: 3# numEntries: 2To :$ldapsearch-Q-L-YEXTERNAL-Hldapi:///-bdc=company,dc=com|ldifparsecn=admin,dc=company,dc=com:cn:admindescription:LDAPadministratorobjectClass:-simpleSecurityObject-organizationalRoledc=company,dc=com:dc:companyo:companyobjectClass:-top-dcObject-organizationInstallationwith pip/pipxThe recommended way of installingldifparseis through the pipx installer :pipxinstallldifparseldifparsewill be installed in an isolated environment but will be available globally as a shell application.Alternatively, you can installldifparsein an environment of your choosing with pip :pipinstallldifparsemanuallyYou can also download the source code from github :gitclonehttps://github.com/MatteoBouvier/ldifparse.gitTipsWe recommend also installingjqfor viewing and manipulating JSON in the terminal.
The YAML equivalent isyq.UsageThe simplest way to useldifparseis by piping it some LDIF data :catinput.ldif|ldifparseThis will print a YAML version of the data to stdout.Output formatYou can specify the ouput format with the--outputparameter (-ofor the short version). The output can either bejsonoryaml(-ojand-oyare also accepted as shorthands).Tree structureInstead of a perfect translation of LDIF to JSON/YAML, you can get a tree representation with the--tree(-t)
parameter.