Saravanan666/pypi-org huggingface dataset:
Package: docassemble.LAWVWillsClinic
A guided interview for creating a Last Will and Testatment for a LAWV Will Clinic.  The interview assumes that it is going to be completed by an attorney or paralegal assisting in the clinic after the client has already submitted a Will Clinic questionnaire.  The interview seeks biographical information about the testator and family.  It then seeks specific gifts, general gifts, residual assignees, executors, and guardians. The interview produces a Word document to allow for final edits.
Package: docassemble.MAPovertyScale
Contains most recent poverty scale in poverty.ymlWhen you include this in your package, you will have 4 variables
available in the main Docassemble namespace:poverty_level_update (year of update as a string)poverty_base (base amount of poverty scale)poverty_increment (amount for each additional household member)poverty_multiplier # threshold multiplier for Massachusetts Courts, 1.25To use:---
include:
  - docassemble.MAPovertyScale:poverty.yml
---
reconsider: True
code: |
  additional_income_allowed = household_size * poverty_increment
  household_income_limit = (poverty_base + additional_income_allowed) * poverty_multiplier

  household_income_qualifies = int((household_income_limit)/12) >=  int(household_monthly_income)
Package: docassemble.MAVirtualCourt
docassemble.MAVirtualCourtThis package supported version 1 of CourtFormsOnline interviews (forms authored March 2020-January 2021) and is
now superseded byhttps://github.com/SuffolkLITLab/docassemble-AssemblyLineMany existing production forms still rely on this but may get migrated over time.AuthorQuinten Steenhuis
Caroline Robinson
Kate Barry
Plocket
Lily Yang
Matthew Brooks
Lance Godard
Maeve MacGlinchey
Kendall Garner
David Colarusso
Package: docassemble.microsoftgraph
Microsoft Graph API (Office 365) for DocassembleProvides Graph API access to Docassemble, returning Docassemble objects. E.g.,
Individual, Address, etc.Works with application level permissions, not user permissions.Administrator SetupCreate an application in Azure Portal following instructionshereand provide it with a set of credentials.Add a new section to your Docassemble configuration that looks like this, replacing
with the details from your new application:microsoft graph:
  tenant id: xxxxxxx
  client id: xxxxxxxx
  client secret: xxxxxxxxxImplemented APIsGet user information (with user principal name, typically email address)Get user contacts (with upn)UsageSee example interview,msgraph_example.yml
Package: docassemble.PovertyScale
PovertyScalePoverty scale, updated approximately on an annual basis, to use for calculating
income eligibility in the United States.Just get the JSON fileJustificationhttps://github.com/codeforamerica/fplapiexists but requires a dedicated
server, and hasn't been updated in recent years. At Suffolk we are already
maintaining and consuming this information in multiple apps; it's simple
for us to maintain the API alongside it.The intent is that you will run this on your own Docassemble server, but we may maintain a public endpoint
at some point. If you run your own Docassemble server, this allows you have one
source of truth for both use in Docassemble interviews (without the overhead of the REST call)
and for use in any non-Docassemble webapps you may have.Update frequencyThe Federal Poverty Guidelines are updated annually, but not usually published in the federal register until a month or so into a new year.
We will try to closely track that update timeline. Pull requests with updated figures are welcome.ExamplesSee example and demo in demo_poverty_scale.ymlThis package contains a JSON file,federal_poverty_scale.json, which can be referenced directly,
as well as a module poverty.py which exportspoverty_scale_income_qualifiesREST APIOnce this file is installed, you can access it as a REST API with
a JSON response. The following endpoints are created on your Docassemble
server:/poverty_guidelines (same as the JSON file)/poverty_guidelines/household_size/ (per-household size)/poverty_guidelines/household_size/?state=ak|hi&multiplier=2/poverty_guidelines/qualifies/household_size/<household_size>?income=1000&state=AK&multiplier=1.5You can just use the API endpoint to retrieve the contents of the JSON file,
or specify a household size and optional state and multiplier to get a tailored
response, with either the income limit for a given household size or a
determination that someone's income is below the poverty guideline.Income is expected to be provided on a monthly basis.Python function signaturesdefpoverty_scale_income_qualifies(total_monthly_income:float,household_size:int=1,multiplier:int=1)->Union[bool,None]:"""Given monthly income, household size, and an optional multiplier, return whether an individualis at or below the federal poverty level.Returns None if the poverty level data JSON could not be loaded."""defpoverty_scale_get_income_limit(household_size:int=1,multiplier:int=1)->Union[int,None]:"""Return the income limit matching the given household size."""
Package: docassemble.spot
This package provides adatatypefor mapping descriptions of legal problems
toNSMIv2categories.  It uses theSpot APIdeveloped by theThe Legal Innovation & Technology LabatSuffolk Law School.This package requiresdocassembleversion 0.5.86 or later.To use package, firstobtain an API keyfor theSpot API.Then put that API key into yourConfiguration:spot api key: abbaabba1234abbaabba1234abbaabba1234abbaabba1234abbaabbaThen you can usespotas adatatype.  For example:question: |
  What is your legal issue?
fields:
  - no label: legal_issue
    input type: area
    datatype: spot
---
mandatory: True
question: |
  % if legal_issue.result == 'Housing':
  We can help you with that housing issue.
  % else:
  Sorry, we don't help with that.
  % endifIn this example, the variablelegal_issuewill become an object of typeSpotResult.  This is a subclass ofDAObject.  The user's original text is
available atlegal_issue.source.  The result is available atlegal_issue.result.
When reduced to text, aSpotResultobject returnslegal_issue.result.  If the
legal issue cannot not be determined,legal_issuewill beNoneand an error
message will be written to the logs.  TheNSMIv2code is available underlegal_issue.id.Only the first result is used for the.resultand.idattributes.  If you
want to inspect into the actual result returned by the API, you can find it
underlegal_issue._full_result.
Package: docbench
Docbench is a framework based ondoctestto benchmark
Python code. If you already are familiar with doctest, you should be
able to use docbench in minutes. And if you find that doctest is
convenient – or Pythonic – hopefully you will feel the same about
docbench !We will walk you through the use of docbench with a simple use case: a
module that computes prime numbers.Create aprimes.pyfile and define theprimesfunction:def primes(n):
    p = []
    for i in range(2, n+1):
        for j in range(2, i):
            if (i % j == 0):
                break
        else:
            p.append(i)
    return pThe function returns an ordered list of primes numbers up to the numbern. Its implementation is simple but the execution takes a lot of
time whenngrows. The followingsievefunction should return
the same result, but performs less computations and therefore should be
faster.def sieve(n):
    p = []
    for i in range(2, n+1):
        prime = True
        for j in p:
            if j * j > i:
                break
            if (i % j == 0):
                prime = False
                break
        if prime:
            p.append(i)
    return pDoctest – Does it Work ?If you already know doctest, you may skip this section.Testing this module with doctest is pretty straightforward: create atest.pyfile with a functiontest_primeswith no implementation
but a doctest for theprimesfunction:def test_primes():
    """
    >>> from primes import primes
    >>> n = 50
    >>> primes(n)
    [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
    """You are pretty confident that iftest_primesdoctest works as
advertised in this doctest, theprimesfunction behaves correctly.
Therefore, you may now testsieveagainstprimes:def test_sieve():
    """
    >>> from primes import primes, sieve
    >>> n = 10000
    >>> primes(n) == sieve(n)
    True
    """Finally, add the following boilerplate a the end of your file:if __name__ == "__main__":
    import doctest
    doctest.testmod()You are ready to execute this test suite with:$ python test.pyNo error displayed ? Theprimesmodule has successfully passed all
tests !Docbench – Is is Fast ?Create a new file namebenchmark.py. Add functions that act as
docbench holders for the functionprimesandsieve. We rely on
the convention that only the time spent in the last statement of any
docbench will be measured, the previous ones are considered setup code.def benchmark_primes():
    """
    >>> from primes import primes
    >>> n = 10000
    >>> primes(n)
    """

def benchmark_sieve():
    """
    >>> from primes import sieve
    >>> n = 10000
    >>> sieve(n)
    """Add the following boilerplate at the end of your file:if __name__ == "__main__":
    import docbench
    docbench.benchmod()Run your benchmark with:$ python benchmark.pyYou should end up with an output similar too:Benchmark                  Time
-------------------------  ----------------
__main__.benchmark_primes  1.03
__main__.benchmark_sieve   0.00876Indeed,sieveis quite faster thanprimes!
Package: docblock
Thedocblockpackage reads and parses documentation from C++ header files.
It should also work out of the box for C header files, but that is currently untested.
It is opinionated and explicitly doesnotcover all edge cases of the C++ grammar, but hopes to provide sufficient utility for most use cases.
The package assumes documentation blocks are formatted using C-style comments, as follows:/*** Text*/voidfunc();That is, the documentation block starts with/*or/**, and ends with*/.
Any starting*on documentation lines in the block are allowed, but not required unless you care about significant whitespace.To avoid parsing issues, non-documentation block comments SHOULD NOT use C-style comments.Thedocblockpackage is a pure Python package and depends only onpyparsing.
It can be installed aspipinstalldocblockExample usageConsider the following header filetest.h:// test.h/*** Test namespace.*/namespacetest{classTest{public:/*** First constructor*/Test(intx);/*** Second constructor*/Test(intx,inty);/*** A method.*/voidaMethod()const;};};// namespace testThis file may be parsed as:fromdocblockimportparse_fileres=parse_file("test.h")Now,rescontains:>>>print(res){'test':['Test namespace.'],'test::Test::Test':['First constructor','Second constructor'],'test::Test::aMethod':['A method.']}Observe thatdocblockunderstands scoping, and returns docstrings using qualified names.
For overloads, multiple docstrings are returned: one for each documented overload.Whydocblock?Parsing documentation from header files is common practice to generate documentation, particularly in mixed-language projects where the C++ components are intended to be used from another language.
One tool that simplifies this for C++-to-Python ispybind11_mkdoc.
That tool, however, relies on clang and the LLVM project to parse C++ documentation blocks: great if you're already using clang, but very heavy-handed if you do not.This is wheredocblockcomes in: it is a pure Python package that does not aim to parse all of C++'s grammar, but only extracts the documentation block's content and the function point it documents.
That is far easier to implement (not requiring a full compiler), but does mean it will very likely not parse all documentation blocks correctly.
Feel free to open an issue if you have an example that is not parsed correctly bydocblock.
Package: docbook
## Depends:`python`: 2.7`qiniu`: 6.1.6|6.x`node`: v0.12.5`npm`: 2.11.2`gitbook`: 2.2.0## Install---Install command:```pip install docbook```## docbook.conf---When you install complete,you should modify the config file: docbook.conf. for example:```[qiniu]bucket_name = test-qnACCESS_KEY = ymtUGLMUVsngMcRRZCqnt_m9lOZ5d8pZ1T_KPhASECRET_KEY = toOvcxKuL7LcvQdfF646EKGX8Ak4UAR-f3scYMJ[docbook]prefix_path =input_dir =format = site```## docbook---Use to generate docment and upload to qiniu to read online. for example:```#docbook```- `input_dir` is current directory- `output_dir` in /tmp/xxx,this directory will be auto delete when the jobs complete.- `format` is 'site'- `prefix_path` is null```#docbook -o /tmp/xxx```- `input_dir` is current directory- `output_dir` is /tmp/xxx- `format` is site- `prefix_path` is null```#docbook -i input_dir -o /tmp/xxx -p aa```- `input_dir` is input_dir- `output_dir` is /tmp/xxx- `format` is site- `prefix_path` is aa## docbook-manage---Use to batch list/delete files. for example:```#docbook-manage -b test-qn -a list```- list all files in test-qn```#docbook-manage -b test-qn -a list -p test```- list all start with 'test' files in test-qn```#docbook-manage -b test-qn -a delete -p test```- delete all startwith 'test' files```#docbook-manage -b test-qn -a delete -p ''```- delete all files in bucket named: test-qn
Package: docbook2sla
The docbook2sla package helps you to convert DocBook XML into the Scribus
(http://www.scribus.net) file format.RequirementsBeautifulSouplxmlInstallationinstalldocbook2slaeither using easy_install or by downloading the sources from the Python CheeseshopSupported platformsUnixSubversion repositoryhttps://svn.zmag.de/svn/python/docbook2sla/trunk/Known Issuescurrently only a very limited subset of the DocBook syntax is supported: book, part, section, title, subtitle, author, para, bridgehead and blockquote.UsageExample from the Python command-line:from docbook2sla import DocBook2Sla
d2s = DocBook2Sla()
print d2s.syncronize('tests/data/xml/content.xml',
                     'tests/data/scribus/clean134.sla',
                     output_filename='tests/data/output/create_output.sla')LicenseGPLAuthorTimo Stollenwerk |timo@zmag.deChanges:0.0.16 (13.04.2008)create function removed (replaced by syncronize)0.0.15 (27.03.2008)clean up unit testsxml markup change: complex pageobjects are now encapsulated into a docbook section node0.0.14 (12.03.2008)bug in overwrite_simple_pageobjects stylesheet fixed0.0.13 (11.03.2008)syncronize function fixed0.0.12 (09.03.2008)generate-id stylesheet deleted0.0.11 (08.03.2008)bug (extra content in docbook2pageobject stylesheet) fixed0.0.10 (07.03.2008)bug (docbook article) in docbook2sla stylesheet fixed0.0.9 (07.03.2008)bug in wrapper.xsl stylesheet fixedunit tests for wrapper function added0.0.8 (05.03.2008)create and syncronize without given output filename fixed0.0.7 (05.03.2008)code cleanupexternal data include fix0.0.6 (04.03.2008)link to svn fixed againexample updated0.0.5 (04.03.2008)link to svn fixedunittests addedrefactoring of create, syncronize and transform functions0.0.4 (29.02.2008)egg description fix0.0.3 (29.02.2008)egg classifiers addedgpl license addedlong description addedxml schema for scribus 1.3.4 added0.0.2 (28.02.2008)bugfixdescription added0.0.1 (28.02.2008)initial release
Package: docbooktoxtm
docbooktoxtmUtility for prepping DocBook XML packages for use as XTM source files.Getting StartedThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.PrerequisitesInstall docbooktoxtm withpip.$ pip install docbooktoxtmor$ python3 -m pip install docbooktoxtmThe script also requires a GitHub API token be exported as an environment variable namedgithub_token. The script will automatically pick up the token if correctly configured and will route things properly. For information on creating a personal access token,visit GitHub's help article on the subject for more information.Usage$docbooktoxtm[OPTIONS]COMMAND[ARGS]...Options:--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.Commands:resource: Restructures source file structure for more...unsource: Restores target files exported from XTM to...docbooktoxtm resourceRestructures source file structure for more efficient parsing in XTM.Usage:$docbooktoxtmresource[OPTIONS]TARGET_FNAMEOptions:TARGET_FNAME: name of target .zip package  [required]--help: Show this message and exit.docbooktoxtm unsourceRestores target files exported from XTM to original source file structure.Usage:$docbooktoxtmunsource[OPTIONS]COURSEOptions:COURSE: course name or name of source .zip package  [required]-r, --release-tag TEXT: optional GitHub release tag--help: Show this message and exit.AuthorsRyan O'RourkeLicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details
Package: docbridge
DocbridgeThis is an experimental Object-Document Mapping library for MongoDB.
You can watch it being developedliveonMongoDB's YouTube channel!Mission StatementManaging large amounts of data in MongoDB while keeping a data schema flexible is challenging.This ODM is not an active record implementation, mapping documents in the database directly into similar objects in code.This ODMisdesigned to abstract underlying documents, mapping potentially multiple document schemata into a shared object representation.It should also simplify the evolution of documents in the database, automatically migrating individual documents' schemas either on-read or on-write.There should be "escape hatches" so that unforeseen mappings can be implemented, hiding away the implementation code behind hopefully reuseable components.
Package: docbrown
docbrowndocbrownis an empirical progress library. It determines the overall
duration and progression of a process by looking at the time it took in the past.docbrownmight be an option for you, if you have one long running task
which parts take very different amounts of time. It is also helpful when used
in environments where you can’t inform consumers about the progress of a task
out-of-band (like a WSGI request/response cycle vs a WebSocket).InstallationpipinstalldocbrownThis repository allows you to create a deb Package for Debian and derivatives
if you’re into that kind of thing. Just runmake dist-deb.Example UsageRecord progress:importtimefromdocbrownimportrecord_progresswithrecord_progress('process_name',ident='my_ident')asrecord:# ident normally is random and unique, but you can override it with# your own id. Just make sure it is not used more than once at a time.print(record.ident)# do some stuff that takes timerecord('loading_data')time.sleep(4)record('calculating_matrices')time.sleep(9)record('rendering_structures')time.sleep(23)record('uploading_models')time.sleep(15)Asdocbrowndetermines progression by looking at the past every process needs
to run at least once beforeget_progresscan return any meaningful data. This
is whyget_progresswill just returnNoneon the first run of the code above.Get the progression of our process:fromdocbrownimportget_progressprint(get_progress('my_ident'))FutureThere are some things that would be nice, but have not been implemented yet.additional storage backends apart from SQLitecode path detection that takes optional phases into account and
updates the expected duration and progress on-the-fly
Package: doccano-client
doccano clientA simple client for the doccano API.InstallationTo installdoccano-client, simply run:pipinstalldoccano-clientUsagefromdoccano_clientimportDoccanoClient# instantiate a client and log in to a Doccano instanceclient=DoccanoClient('http://doccano.example.com')client.login(username='username',password='password')# get basic information about the authorized useruser=client.get_profile()# list all projectsprojects=client.list_projects()Please see thedocumentationfor further details.Doccano API BETA ClientWe're introducing a newly revamped Doccano API Client that features more Pythonic interaction as well as more testing and documentation. It also adds more regulated compatibility with specific Doccano release versions.You can find the documentation on usage of the beta clienthere.
Package: doccano-mini
doccano-minidoccano-mini is a few-shot annotation tool to assist the development of applications with Large language models (LLMs). Once you annotate a few text, you can solve your task (e.g. text classification) with LLMs viaLangChain.At this time, the following tasks are supported:Text classificationQuestion answeringSummarizationParaphrasingNamed Entity RecognitionTask FreeNote: This is an experimental project.Installationpipinstalldoccano-miniUsageFor this example, we will be using OpenAI’s APIs, so we need to set the environment variable in the terminal.exportOPENAI_API_KEY="..."Then, we can run the server.doccano-miniNow, we can open the browser and go tohttp://localhost:8501/to see the interface.Step1: Annotate a few textIn this step, we will annotate a few text. We can add a new text by clicking the+button. Try it out by double-clicking on any cell. You'll notice you can edit all cell values.The editor also supports pasting in tabular data from Google Sheets, Excel, and many other similar tools.Step2: Test your taskIn this step, we will test your task. We can enter a new test to the text box and click thePredictbutton. Then, we can see the result of the test.Step3: Download the configIn this step, we will download theLangChain's config. We can click theDownloadbutton to download it. After loading the config file, we can predict a label for the new text.fromlangchain.chainsimportload_chainchain=load_chain("chain.yaml")chain.run("YOUR TEXT")Developmentpoetryinstall
streamlitrundoccano_mini/home.py
Package: doccano-transformer
doccano-transformerDoccano Transformer helps you to transform an exported dataset into the format of your favorite machine learning library.Supported formatsDoccano Transformer supports the following formats:CoNLL 2003spaCyInstallTo installdoccano-transformer, simply usepip:pipinstalldoccano-transformerExamplesNamed Entity RecognitionThe following formats are supported:CoNLL 2003spaCyfromdoccano_transformer.datasetsimportNERDatasetfromdoccano_transformer.utilsimportread_jsonldataset=read_jsonl(filepath='example.jsonl',dataset=NERDataset,encoding='utf-8')dataset.to_conll2003(tokenizer=str.split)dataset.to_spacy(tokenizer=str.split)ContributionWe encourage you to contribute to doccano transformer! Please check out theContributing to doccano transformer guidefor guidelines about how to proceed.LicenseMIT
Package: docchain
DocChainThis package can be used to generate complex structured documents from Specs using LLMm models.Documentis an abstraction that represent generated data, e.g. it could be any text data in
markdown or HTML, configuration in JSON, YAML or other formats, Python objects or classes, or any
other data that can be generated by LLMs.Speccontains document requirements. It holds general information about the generated document.Sectionis a composite part of a Document. Document itself is a Section. Such design allows
inclusion of Documents inside another documents.Generatorgenerates Document from the provided Spec. Each generator can be configured with a list
of steps that are executed before or after generation.Middlewareis a callable that can modify Spec or the generated Documents. It acts the same as
middleware in an HTTP framework, it can be used for variety of tasks. E.g. transforming, formatting
or linting generated document ot its parts.TODOStore stats in an SQLite database.Blocks for HTML, Markdown, Python, one line Python, templates.Add middleware to plan steps.