Saravanan666/pypi-org huggingface dataset:
Package: dqcsim-qx
DQCsim QX backendSee also:DQCsimandQX.This repository contains some glue code to use the QX simulator as a DQCsim
backend.StatusThe backend should support:The following gates: H, cnot, Toffoli, I, X, Y, Z, S, S', T, T', CZ, swap,
RX(angle), RY(angle), RZ(angle), measure X/Y/Z, prep X/Y/Z.Depolarizing channel error model.Dynamic qubit allocation upstream, as long as the number of qubits ever live
at a time does not increase after the first measurement (prefixing the
algorithm with an allocation of the desired number of qubits followed by a
free of those qubits is enough to tell the backend you want to allocate that
many).InstallYou can install usingpipusingpip install dqcsim-qxor equivalent.
If you're installing with--user, make sure that the path Python installs
the executables into is in your system path, otherwise DQCsim will not be
able to find the plugin. A simple way to see where the files are installed
is to runpip uninstall dqcsim-qx; it shows which files it's about to
delete before querying for confirmation.Building/installing from sourceMake sure all git submodules are checked out:git submodule update --init --recursiveBuild the wheel file locally:python3 setup.py build bdist_wheelInstall the wheel file you just built:pip install target/python/dist/*(or equivalent)Don't push a build like this to PyPI or attempt to distribute this wheel; it
will likely only work locally due to hardcoded paths and the likes. Refer torelease.mdfor more info.UsageOnce the plugin is installed, you can use it by selecting theqxbackend in
a DQCsim command.The following ArbCmds are supported for initialization and at runtime from
host or upstream unless otherwise specified:qx.error: selects the error model using the JSON argument, which can be:{"model": "none"}to disable error;{"model": "depolarizing_channel", "error_probability": <float>}to
select the depolarizing channel error model. Note that like QX itself,
this model does not take gate timing into consideration; it simply
inserts an X, Y, or Z gate with the given probability before any gate
in the circuit.If the error model is modified during execution, the model is applied
retroactively back to the previous measurement, because the backend queues
up gates in a circuit until a measurement gate is seen.qx.dump_state: dumps the state of the quantum register, flushing the
aforementioned gate queue to synchronize the state of the quantum register.qx.epsilon(only forinit()): specifies the gate detection RMS
tolerance using a JSON argument of the form{"epsilon": <float>}. Epsilon
defaults to 1e-6.
Package: dql-alpha
FeaturesTODORequirementsTODOInstallationYou can installDQLviapipfromPyPI:$pipinstalldql-alphaUsageDQL can be used as a CLI (from system terminal), or as a Python library.TODO: CLI usageTo use it from Python code, import classdql.catalog.Catalog, which provides methods for all the same commands above, likels(),get(),find(),du()andindex().fromdql.catalogimportCatalogcatalog=Catalog()catalog.ls(["s3://ldb-public/remote/data-lakes/dogs-and-cats/"],update=True)ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theApache 2.0 license,DQLis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.
Package: dqlmagic
DqlmagicAn IPython magic function allowing to use DQL in your notebooks.Dynatrace Query Language (DQL) is a powerful tool to explore your data and discover patterns, identify anomalies and outliers, create statistical modeling, and more based on data stored in Dynatrace Grail storage.Dqlmagic makes DQL queries available to be used in jupyter notebooks.Available magic functions%%dql or %dqlExecutes a DQL query and returns the queried records as json array.Example 1Query in code-cell..%%dql
fetch logs 
| limit 10.. and use result in another code cell:import pandas as pd

#put result into a dataframe
df = pd.DataFrame(_dql_result)
df.head()Note:By default%%dqlwrites into_dql_result. You can optionally customize the target objects name to configure an alternative name like this:%%dql my_result
fetch logs | limit 10Example 2 - Inline Queryimport pandas as pd

res = %dql fetch logs | limit 10
df = pd.DataFrame(res)
df.head()%dql_raw and %%dql_rawSame as%dqlor%%dql, but returns instead of the result records the full API response json%auth_grail <config_prefix>Inline function connecting to the grail cluster.Reads connection parameters from .env file:dt_oauth_url="https://sso.dynatrace.com/sso/oauth2/token"

dt_oauth_clientid="<YOUR-CLIENT-ID>"
dt_oauth_clientsecret="<YOUR-CLIENT-SECRET>"
dt_oauth_scope="<YOUR-ACCESS-SCOPE>"

dt_tenant="<YOUR-TENANT-ID>"
grail_apiurl="https://<YOUR-TENANT-ID>.live.dynatrace.com/api/v2/dql/query"The<config_prefix>isoptionalto be used if you have multiple configs stored in your .env file like e.g.dt_config_prefix="DEV"

DEV_dt_oauth_url="https://sso.dynatrace.com/sso/oauth2/token"
DEV_dt_oauth_clientid="<YOUR-DEV-CLIENT-ID>"
DEV_dt_oauth_clientsecret="<YOUR-DEV-CLIENT-SECRET>"
DEV_dt_oauth_scope="<YOUR-DEV-ACCESS-SCOPE>"
DEV_dt_tenant="<YOUR-DEV-TENANT-ID>"
DEV_grail_apiurl="https://<YOUR-DEV-TENANT-ID>.apps.dynatracelabs.com/platform/storage/query/v1/"

PROD_dt_oauth_url="https://sso.dynatrace.com/sso/oauth2/token"
PROD_dt_oauth_clientid="<YOUR-PROD-CLIENT-ID>"
PROD_dt_oauth_clientsecret="<YOUR-PROD-CLIENT-SECRET>"
PROD_dt_oauth_scope="<YOUR-PROD-ACCESS-SCOPE>"
PROD_dt_tenant="<YOUR-PROD-TENANT-ID>"
PROD_grail_apiurl="https://<YOUR-PROD-TENANT-ID>.apps.dynatracelabs.com/platform/storage/query/v1/"With the parameterdt_config_prefix, you set the default config prefix used, if %auth_grail parameter<config_prefix>is not provided.For more details on how to setup API oauth clients in Dynatrace seeConfigure and manage account API OAuth clientsFor more details on .env file seeHow to NOT embedded credential in Jupyter notebookorpython-dotenv
Package: dqp
Disk Queue Processing (dqp)This library makes it easy to serialize Python to disk using msgpack.The library contains two modules:dqp.disk_cache: to easily read/write data to disk and support caching iterators to disk.dqp.disk_queue: an approach to communicating lists of objects between runs with index/offset metadata.Example of disk_cachefromtypingimportIteratorfromdqp.disk_cacheimportcached_iterimporttime@cached_iter()defexpensive_iter()->Iterator[int]:foridxinrange(5):time.sleep(1)yieldidxdefmain():#For replay, drop the cacheexpensive_iter.cache_clear()# First time it takes secondsforiinexpensive_iter():print(time.asctime(),i)# Other times the cache is already thereprint(time.asctime(),list(expensive_iter()))print(time.asctime(),list(expensive_iter()))print(time.asctime(),list(expensive_iter()))if__name__=="__main__":main()
Package: dqs
# Neural Network Toolkit for Distribution Regression, Quantile Regression, and Survival AnalysisPython library for distribution regression, quantile regression, and survival analysis.This is a preliminary version, and the codes will be updated in the near future.  Preliminary [documentation](https://ibm.github.io/dqs/) is also available.# CitationPlease consider citing this paper.Yanagisawa, “Proper Scoring Rules for Survival Analysis,” to appear in ICML 2023, 2023.
Package: dqsegdb2
DQSEGDB2DQSEGDB2 is a simplified Python implementation of the DQSEGDB API as defined inLIGO-T1300625.This package only provides a query interface forGETrequests, any users
wishing to makePOSTrequests should refer to the officialdqsegdbPython
client available fromhttps://github.com/ligovirgo/dqsegdb/.InstallationFor best results, please install fromconda-forge:condainstall-cconda-forgedqsegdb2On Unix systems, you can also install directly from PyPI:pipinstalldqsegdb2Basic Usagefromdqsegdb2.queryimportquery_segmentsprint(query_segments('G1:GEO-SCIENCE:1',1000000000,1000001000))
Package: dq-suite-amsterdam
IntroductionDISCLAIMER: Repo is in PoC phase
DISCLAIMER: The functions can run on Databricks using a Personal Compute ClusterThis repository contains functions that will ease the use of Great Expectations. Users can input data and data quality rules and get rules in return.Getting StartedPrerequisites:Run the following code in your workspace:pip install great_expectationsWhen working in Databricks you can clone this repo to Databricks Repos. Then you can access it in your workspace using:import sys
sys.path.append("/Workspace/Repos/{user}/{repo_name}")
from {file} import {function}Parameter examples:
user:j.cruijff@amsterdam.nlrepo_name: dq_repo
file: df_checker
function: df_checkUpdatesversion = "0.1.0" :
dq_rules_example.json is updated.
Added:
"dataframe_parameters": {
"unique_identifier": "id"
}version = "0.2.0" :
dq_rules_example.json is updated.
Added for each tables:
{
"dataframe_parameters": [
{
"unique_identifier": "id",
"table_name": "well",
"rules": [
{
"rule_name": "expect_column_values_to_be_between",
"parameters": [
{
"column": "latitude",
"min_value": 6,
"max_value": 10000
}
]
}
]
},
....
Package: dq-tool
dq_toolData Quality Tool. Built on top ofGreat ExpectationsDemoIf you want to see / show someone DQ Tool in action, use theDemo GuideBuildDQ Tool usespoetryfor dependency management and wheel building. Follow theinstallation notes, please.poetrybuildThe wheel will end up in thedistfolder.Databricks InstallationAs of now, only Databricks runtime 7.x is supported. There have been issues installing the package on 6.x. However if you need to use 6.x get in touch and we'll figure it out.Installdq_toolfrom the wheel you built on a cluster or just for a notebook.Storing ExpectationsWe support two approaches to storing your expectations: in a Database or in notebooks. These approaches can be combined.Expectation StoreExpectations can be stored in an external database. This database can store expectation definitions and validation results. The validation results can be viewed using our frontend. For the infrastructure setup see ourDeployment GuideUsage - Expectation StoreStart with the following code to check that you can connect to the database. Replace thehost,port,database,usernameandpasswordwith the credentials to your database. We highly recommend storing your password in a secure way, in dbutils secrets or Azure Key Vault.Running this code also creates the database schema if it's not there yet.fromdq_toolimportDQTooldq_tool=DQTool(spark=spark,db_store_connection={'drivername':'postgresql','host':'apostgres.postgres.database.azure.com','port':'5432','database':'postgres','username':'postgres@apostgres','password':dbutils.secrets.get(scope='dq_tool',key='postgres_store_password')})See theexpectation store guidefor details on how to use the store.Expectations in NotebooksExpectation definitions can also be stored in notebooks as python dicst or code.Usage - no Storefromdq_toolimportDQTooldq_tool=DQTool(spark=spark)See thenotebook expectations guidefor details on how to work with expectation definitions in notebooks.GuidesThe following guides can be used both for expectations stored in a database and in a notebook.Expectations with ExpressionsSee theexpressions guideCustom ExpectationsSee thecustom expectations guideProfiling (beta)See theprofiling guide
Package: dqueue
Usagepip install dqueueExampleMemory Queue# memory queueimportthreadingfromdqueue.queuesimportMemoryQueuefromdqueue.itemimportItemqueue=MemoryQueue()# 模拟不同延迟发布消息defpublisher():foriinrange(10):item=Item(data=f'hello{i}')queue.add(item,i*1000)# 模拟消费端取延迟消息defconsumer():whileTrue:messages=queue.get(block=10*1000)formsginmessages:print('message:',msg)threading.Thread(target=publisher).start()threading.Thread(target=consumer).start()Redis QueueYou can continue with the example above and Just change the declare.fromdqueue.queuesimportRedisQueuequeue=RedisQueue()# same code
Package: dq-whistler
OverviewWhistler is an open source data quality and profiling tool. Whistler enables profiling of your raw data irrespective of size i.e in MB's GB's or even TB's.
This module brings the power of Apache Spark execution engine for all your profiling needs.🐣 Getting Started1. Install Whistlerpip install dq-whistler2. Create a Spark dataframe for you data# Sample Data
Age,Description
1,"abc"
2,"abc1"
3,
4,"abc4"
10,"xyz"
12,"null"
17,"abc"
20,"abc3"
23,# You can read data from all the supported sources as per Apache Spark moduledf=spark.read.option("header","true").csv("<your path>")3. Create a config in the form of python dict or read it from any json fileconfig=[{"name":"Age","datatype":"number","constraints":[{"name":"gt_eq","values":5},{"name":"is_in","values":[1,23]}]},{"name":"Description","datatype":"string","constraints":[{"name":"regex","values":"([A-Za-z]+)"},{"name":"contains","values":"abc"}]}]4. Build an instance of Data Quality Analyzer and execute the checksfromdq_whistlerimportDataQualityAnalyzeroutput=DataQualityAnalyzer(df,config).analyze()print(output)[{"col_name":"Age","total_count":9,"null_count":0,"unique_count":9,"topn_values":{"1":1,"2":1,"3":1,"4":1,"10":1,"12":1,"17":1,"20":1,"23":1},"min":1,"max":23,"mean":10.222222222222221,"stddev":8.303279138054101,"quality_score":0,"constraints":[{"name":"gt_eq","values":5,"constraint_status":"failed","invalid_count":4,"invalid_values":["1","2","3","4"]},{"name":"is_in","values":[1,23],"constraint_status":"failed","invalid_count":7,"invalid_values":["2","3","4","10","12","17","20"]}]},{"col_name":"Description","total_count":9,"null_count":2,"unique_count":7,"topn_values":{"abc":2,"abc1":1,"xyz":1,"abc4":1,"abc3":1},"quality_score":0,"constraints":[{"name":"regex","values":"([A-Za-z]+)","constraint_status":"success","invalid_count":0,"invalid_values":[]},{"name":"contains","values":"abc","constraint_status":"failed","invalid_count":2,"invalid_values":["xyz","null"]}]}]📦 RoadmapThe list below contains the functionality that contributors are planning to develop for this moduleVisualizationVisualization of profiling  output🎓 Important Resources👋 Contributing✨ Contributors
Package: dqwrap
dqwrapwrap layer of 5-layer architecture5-layerDistributedCAP RaftRouteHttp WS gRPC MQServiceACID DDDDAOEntity CacheWrapDB ThirdParty Util ErrorExampletestpipinstallpytest
pipinstallpytest-cov
pytest#coveragepytest--cov=dqwrap--cov-report=htmltests/Qualification Requirements:Bachelor degree or above, computer related major, more than 5 years of work experience.Proficient in front-end core technologies such as HTML5, CSS3, Javascript,ES6,Restful and responsive design.Proficiency in using popular front-end frameworks such as React, Vue, Bootstrap, JQuery.Familiar with front-end engineering, Master Webpack, Grunt and other packaging tools.Have good coding habits and experience in project layering and modularization.Have a good team spirit and initiative to find problems.
Package: draco
Draco v2Draco is a formal framework for representing design knowledge about effective visualization design as a collection of
constraints. You can use Draco to find effective visualization designs or validate existing ones. Draco's constraints
are based on Answer Set Programming (ASP) and solved with theClingoconstraint
solver. We also implemented a way to learn weights for the recommendation system directly from the results of graphical
perception experiment. Draco v2 is a much improved version of the first iteration ofDraco.Draco paper (VIS 2018)Draco 2 paper (VIS 2023)DocumentationRead about Draco in the online book athttps://dig.cmu.edu/draco2/or launch it in
interactive mode usingBinder. In the documentation, we just refer toDracowithout a version.ContributingWe welcome any input, feedback, bug reports, and contributions. You can learn about setting up your development
environment inCONTRIBUTING.md.
Package: dracula-cli
Dracula CLIdracula-cliisdraculatheme.orgon the command line. It brings app information, installation guide, and other Website concepts to the terminal next to where you are already working with dracula and your code.InstallationThe easiest way to installdracula-cliis to install it withpip. Note that you'll need to havepythonversion 3.6 or later installed. To install, run the following command in a terminal:pipinstalldracula-cliYou may want to replacepipwithpip3if this fails.UsageNote:There are several parameters you can tweak to change the behavior of the following commandsdraculaviewvisual-studio-codedraculaallDocumentationThe documentation is currently available atDOCUMENTATION.mdContributingIf anything feels off, or if you feel that some functionality is missing, please consider opening an issue or a pull request. SeeTODO.mdfor inspirationTeamThis theme is maintained by the following person(s) and a bunch ofawesome contributors.Wasi MasterLicenseMIT License
Package: draews
DRAEWebScrappingA proyect to find words from the web page of Real Academia EspañolaUsageA simple example to find a wordfrom draews.draews import DRAEws as drae    
from draews.models import MeaningList 

drae = drae() 

# Finding the meaning of a word 
meaning_list: MeaningList = drae.find_word("sustantivo")

# Obtaining the meaning on dictionary format
meaning_dict = meaning_list.model_dump()
Package: draftail-helpers
draftail-helpersSupplementary code when developing custom features for the Draftail editor in Wagtail. Please bear with us while we prepare more detailed documentation.Compatibilitydjango-helpers' major.minor version number indicates the Wagtail release it is compatible with. Currently this is Wagtail 4.1.x.Additional dependencies are:Django 4.1InstallationInstall usingpip:pipinstalldraftail-helpersAdddraftail_helpersto yourINSTALLED_APPSsetting:INSTALLED_APPS=[# ...'draftail_helpers'# ...]
Package: draftail-maths
draftail-mathsA maths extension for the Draftail editor of Wagtail. Please bear with us while we prepare more detailed documentation.Compatibilitydraftail-maths' major.minor version number indicates the Wagtail release it is compatible with. Currently this is Wagtail 4.1.xInstallationInstall usingpip:pipinstalldraftail-mathsAdddraftail_mathsto yourINSTALLED_APPSsetting:INSTALLED_APPS=[# ...'draftail_maths'# ...]
Package: draft-cli
Draft: Write Like a ProgrammerDraft is a CLI-enabledwriting systemto keep your work modular, optimize your project for git for version control, and just make writing morefun.Primary FeaturesWhen you’re writing something short, a Google Doc or Word file works great.
But get beyond a few thousand words and you end up in scroll-hell (i.e., the ‘thumb’ of the scrollbar is tiny and just navigating the doc is a chore).Draft turns that half-finished novel into a clean, plaintext file tree perfect for git.parseany Markdown file into a file tree of Sections, Chapters, Sub-chapters, and Scenessequenceyour files and directories to maintain a sequential indexoutlineyour project to help plan and fill in gapscompileyour Scenes, Sub-Chapters, Chapters, and Sections into a single document once you’re ready to publishOther features includestats(word count, etc.),trim(remove duplicate spaces), andsplit(put each sentence on its own line)Installationpip installdraft-cliDocumentationhttps://draft-cli.readthedocs.io/en/latest/
Package: draftin-a-flask
A simple Flask server that allows you to publish Pelican blogs fromhttp://draftin.comusingWebHooksFree software: BSD licenseDocumentation:http://draftin_a_flask.rtfd.org.Usage$ pip install draftin_a_flask
$ env DIF_CONTENT=/path/to/content \
DIF_OUTPUT=/path/to/output \
DIF_PELICAN=/path/to/pelican_binary draftican
Listening at endpoint QRFky1tR0KqHGM3cJoitwEi8tTpknaNnMpNHHiTIm8
* Running on http://0.0.0.0:5678/
* Restarting with reloader
Listening at endpoint QRFky1tR0KqHGM3cJoitwEi8tTpknaNnMpNHHiTIm8(Yes, it displays the print twice :-\ I’m sure there’s a way to get around it. If
it bothers you too much, I accept pull requests!)Setup your WebHook from within Draft, and now you can write your blog posts in
Draft and easily publish.Future FeaturesAutomatic uploads using rsync/ssh/file copySettings provided in a fileImproved error handling (e.g. missing title, etc.)Known BugsIf you’re missing important fields (like title and date) it probably will
skip publishing that doc.History0.2.0 (2019-11-06)Updated dependency versions0.1.0 (2014-01-13)First release on PyPI.
Package: draftjs-exporter-markdown
Draft.js exporter 🐍 - Markdown editionLibrary to convert rich text from Draft.js raw ContentState to Markdown, based onDraft.js exporter.🚧 This is an experimental exporter with limited Markdown support – please use with caution.UsageThis package is a Markdown export configuration for theDraft.js exporter. Specifically, it provides:A Markdown-friendly exporter engine, with fallbacks to HTML tags.Configuration for basic Markdown formatting.First, install the package:pipinstalldraftjs_exporter_markdownThen, to convert Draft.js content to Markdown:And in Python:fromdraftjs_exporter.htmlimportHTMLfromdraftjs_exporter_markdownimportBLOCK_MAP,ENGINE,ENTITY_DECORATORS,STYLE_MAP# Initialise the exporter.exporter=HTML({# Those configurations are overridable like for draftjs_exporter.'block_map':BLOCK_MAP,'style_map':STYLE_MAP,'entity_decorators':ENTITY_DECORATORS,'engine':ENGINE,})markdown=exporter.render({'entityMap':{},'blocks':[{'key':'6mgfh','text':'Hello, world!','type':'unstyled','depth':0,'inlineStyleRanges':[],'entityRanges':[]}]})print(markdown)You can also run an example by downloading this repository and then usingpython example.py.ConfigurationPlease refer to theDraft.js exporter configuration documentation.Supported Markdown formattingThe built-in configuration provides support for:Inline styles: bold, italic, strikethrough, codeBlocks: paragraphs, heading levels, bullet and number lists, code blocks, blockquoteImages, links, and horizontal rulesContrary to the main Draft.js exporter,Nested / overlapping styles aren't supported.None of the content is escaped (HTML escaping is unnecessary for Markdown, and there is no Markdown escaping).DevelopmentRequirements:virtualenv,pyenv,twinegitclonegit@github.com:thibaudcolas/draftjs_exporter_markdown.gitcddraftjs_exporter_markdown/# Install dependenciesnvminstall
npminstall# For tests and development in watch mode.npminstall-gnodemon# Install the Python environment.virtualenv.venvsource./.venv/bin/activate
makeinit# Install required Python versionspyenvinstall--skip-existing3.6.3# Make required Python versions available globally.pyenvglobalsystem3.6.3# Run the built-in example.makedevReleasesUsemake release, which usesstandard-versionto generate the CHANGELOG and decide on the version bump based on the commits since the last release.CreditsView the full list ofcontributors.MITlicensed.
Package: draftjs-sanitizer
DraftJS SanitizerSanitizes a DraftJS JSON format from a dict to allow saving. Allows safe dumping into a string in order to prevent injection of quotes and HTML entities.Installationpip install draftjs-sanitizerUsageRemove known exploitsThis removes any URLs that could be used for XSS attacks by linking raw javascript code.fromdraftjs_sanitizerimportclean_draft_jsclean_draft_js({"blocks":[{"key":"an6ci","data":{},"text":"Get Saleor today!","type":"unstyled","depth":0,"entityRanges":[{"key":0,"length":17,"offset":0}],"inlineStyleRanges":[]}],"entityMap":{"0":{"data":{"url":"javascript:alert('Oopsie!');"},"type":"LINK","mutability":"MUTABLE"}}})Dump JSON for HTML UsageThis allows to run it as a filter in order to prevent any injection or bypass when putting the JSON into HTML code.fromdraftjs_sanitizerimportto_stringdumped_json=to_string({"block":"</div><script>alert('Oopsie!');</script>"})Example 1: attribute bypass<divdata-draft-js-json='{"block": "'<script>alert('Oopsie!');</script>"}'></div>Example 2: bypass inner HTML<div>{"block": "</div><script>alert('Oopsie!');</script>"}</div>Supported ChecksTypeEntitiesDescriptionJavascript URLIMAGE,LINKPrevent injecting javascript through thejavascriptprotocol into a URL.Invalid URLIMAGE,LINKRemoves any invalid URL from the JSON content.Dangerous CharactersanyRemoves any sensible character for HTML incorporation:",',<,>.Development./setup.py develop
pip install -r requirements_dev.txtYou can easily extend the behaviors through:draftjs_sanitizer.encoder.DraftJSSafeEncoderdraftjs_sanitizer.sanitizer.DraftJSSanitizerDependenciesurllib3for RFC 3986 parsing and validation of URLs.