Saravanan666/pypi-org huggingface dataset:
Package: target-datadotworld
ASingertarget that writes data todata.worldHow to use ittarget-datadotworldworks together with any otherSinger Tapto store on data.world
data extracted from sources likeSalesForce,HubSpot,Marketo,MySQLandmore.Install and RunFirst, make sure Python 3.6 is installed on your system.target-datadotworldcan be run with any Singer Tap, but we’ll usetap-fixeriowhich pulls currency exchange rate data - as an example.These commands will installtap-fixerioandtarget-datadotworldwith pip,
and then run them together, piping the output oftap-fixeriototarget-datadotworld:? pip install target-datadotworld tap-fixerio
? tap-fixerio | target-datadotworld -c config.json
INFO Replicating the latest exchange rate data from fixer.io
INFO Tap exiting normallyThe data will be written to the dataset specified inconfig.json. In this specific case, under a stream namedexchange-rates.If you’re using a different Tap, substitutetap-fixerioin the final
command above with the command used to run your Tap.Configurationtarget-datadotworldrequires configuration file that is used to store your data.world API token and dataset information.The following attributes are required:api_token: Your data.worldAPI tokendataset_id: The title of the dataset where the data is to be stored. Must only contain lowercase letters, numbers, and dashes.Additionally, the following optional attributes can be provided.dataset_owner: If not the same as the owner of the API token (e.g. if the dataset is to be accessed/created under an organization account, as opposed to the user’s own)Example:{"api_token":"your_token","dataset_id":"fixerio-data","dataset_owner":"my-company",}
Package: targetd-client
targetd-clienttargetd-client is a client library for the targetd API.Usagetargetd-client is available on PyPI:$ python -m pip install targetd-clientUsing the library is pretty simple:>>> from targetd_client import TargetdClient
>>> targetd = TargetdClient("https://example.com:18700", "username", "password")
>>> pool_list = targetd.pool_list()
>>> vol_list = targetd.vol_list(pool_list[0]["name"])
>>> ...targetdctlThis projects also ships with thetargetdctlCLI utility. To use it, you must
first install its dependencies:$ pip install targetd-client[cli]Usetargetdctl --helpto get the list of command lines arguments.ContributingThis library isFree Softwareand every contributions are welcome.Please note that this project is released with aContributor Code of
Conduct. By participating in this project you agree to
abide by its terms.
Package: target-describe
target_descriptionLa libreriatarget_describees un complemento para la visualizacion de la relacion entre la variable objetivo y las variables para los problemas de machine learning, más allá de una matriz de correlación.Instalacionpip install target-describeModos disponiblesPor el momento solo soporta problemas de clasificación binaria, poco a poco soportará problemas de regresión y clasificación multipleEjemplo de usoLa libreria hace uso dePlotly, por lo que se recomienda su uso en Jupyter Notebookimportpandasaspdfromtarget_describeimporttargetDescribedf=pd.read_csv("https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv")td=targetDescribe(df,"Survived",problem="binary_classification")td.all_associations()Sin embargo tambien puedes hacer uso de la libreria mediante un script de python exportando directamente los gráficos en html.importpandasaspdfromtarget_describeimporttargetDescribedf=pd.read_csv("https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv")td=targetDescribe(df,"Survived",problem="binary_classification")td.all_associations(export=True)
Package: targeted
Targeted Learning LibraryPython package for targeted inference.targetedprovides a number of methods for semi-parametric
estimation.  The library also contains implementations of various
parametric models (including different discrete choice models) and
model diagnostics tools.The implemention currently includesRisk regression modelswith binary exposure
(Richardson et al., 2017, doi:10.1080/01621459.2016.1192546)Augmented Inverse Probability Weightedestimators for missing
data and causal inference (Bang and Robins, 2005,
doi:10.1111/j.1541-0420.2005.00377.x)Model diagnostics based oncumulative residualsmethodsEfficient weightedPooled Adjacent Violator AlgorithmsNested multinomial logitmodelsDocumentation and tutorials can be found athttps://targetlib.org/python/.
Package: targeted-sum
TextReducer - A Tool for Summarization and Information ExtractionTextReducer is a tool for summarization and information extraction powered by the SentenceTransformer library. Unlike many techniques for extractive summaries, TextReducer has the option for a "target" around which the summary will be focused. This target can be any text prompt, meaning that a user can specify the type of information that they would like to find or summarize, and ignore everything else.Another key benefits of TextReducer is that rather than extracting the sentences for the summary, it carves away at the original text, removing unnecessary sentences. This leads to more fluent summarizations, and preserves grammatical features like coreference that are often lost in traditional extractive summarization.For instance, in the sentences"In his free time, John enjoyed playing golf and traveling with his family. He was married with two children, and lived in a suburban area with his wife and kids.", it is imporant that these sentences stay linked together. Otherwise, the coreferent of the word"He"in the second sentence is lost. TextReducer is much better at preserving such related sentences, and is thus a valuable tool for fast, but fluent summarizations of large texts.The class has several methods:reduce(huge_text, target, num_sents=5)- this method takes in a large text and a target text, and returns a summary of the input text that is most similar to the target text. It first encodes the input text and the target text using the SentenceTransformer's embedding model, then it calculates the cosine similarity between the embeddings of the input text and the target text. It then finds the topnum_sentsmost similar sentences and returns them as a string.summarize(text, num_sents=5)- this method takes in a text and returns a summary of the input text that is most similar to the overall meaning of the text. It first encodes the input text using the SentenceTransformer's embedding model, then it calculates the cosine similarity between the embeddings of the sentences and the text as a whole. It then finds the topnum_sentsmost similar sentences and returns them as a string.reduce_pdf(pdf_path, target, num_sents=5)- this method takes in a pdf file's path, a target text and a number of sentences to be returned, it then reads the pdf, extract the text from it, calls the summarize method and returns the summary.InstallationTo install TextReducer, usepip install targeted_sumApplicationsSummarization- Does a good job summarizing large texts while staying lightweight and maintaining coherence.Information Extraction- Good for finding sections of text related to any given text promptQuestion Answering- Good for finding sections of text related to any given question. When paired with a QA model, this can be a very powerful tool.GPT3/ChatGPT Prompting- Good for reducing the length of text prompts for GPT3 or ChatGPT. This saves time and money, and improves responses by removing unnecessary content from prompts.DemoA Google Colab demo can be foundhere
Package: target-jsonl
target-jsonlASingertarget that writes data to JSONL (JSON Lines) files.How to use ittarget-jsonlworks together with any otherSinger Tapto move data from sources likeBraintree,FreshdeskandHubspotto JSONL formatted files.InstallWe will usetap-exchangeratesapito pull currency exchange rate data from a public data set as an example.First, make sure Python 3 is installed on your system or follow these installation instructions forMacorUbuntu.It is recommended to install each Tap and Target in a separate Python virtual environment to avoid conflicting dependencies between any Taps and Targets.# Install tap-exchangeratesapi in its own virtualenvpython3-mvenv~/.virtualenvs/tap-exchangeratesapisource~/.virtualenvs/tap-exchangeratesapi/bin/activate
pipinstalltap-exchangeratesapi
deactivate# Install target-jsonl in its own virtualenvpython3-mvenv~/.virtualenvs/target-jsonlsource~/.virtualenvs/target-jsonl/bin/activate
pipinstalltarget-jsonl
deactivateRunWe can now runtap-exchangeratesapiand pipe the output totarget-jsonl.~/.virtualenvs/tap-exchangeratesapi/bin/tap-exchangeratesapi|~/.virtualenvs/target-jsonl/bin/target-jsonlThe data by default will be written to a file calledexchange_rate-{timestamp}.jsonlin your working directory.›catexchange_rate-{timestamp}.jsonl{"CAD":1.3954067515,"HKD":7.7503228187,"ISK":147.1130787678,"PHP":50.5100534957,"DKK":6.8779745434,"HUF":327.9376498801,"CZK":25.018446781,"GBP":0.8059214167,"RON":4.4673491976,"SEK":9.9002029146,"IDR":15321.0016602103,"INR":75.6516325401,"BRL":5.4711307877,"RUB":73.6220254566,"HRK":6.9765725881,"JPY":106.548607268,"THB":32.420217672,"CHF":0.9750046117,"EUR":0.9223390518,"MYR":4.3475373547,"BGN":1.8039107176,"TRY":6.988286294,"CNY":7.0764619074,"NOK":10.3973436635,"NZD":1.6446227633,"ZAR":18.4316546763,"USD":1.0,"MXN":24.1217487548,"SGD":1.4152370411,"AUD":1.5361556908,"ILS":3.5102379635,"KRW":1218.9540675152,"PLN":4.1912931194,"date":"2020-04-29T00:00:00Z"}Optional Configurationtarget-jsonltakes an optional configuration file that can be used to set formatting parameters like the delimiter - seeconfig.sample.jsonfor examples. To runtarget-jsonlwith the configuration file, use this command:~/.virtualenvs/tap-exchangeratesapi/bin/tap-exchangeratesapi|~/.virtualenvs/target-jsonl/bin/target-jsonl-cmy-config.jsonHere is a brief description of the optional config keysdestination_path- Specifies where to write the resulting.jsonlfile to. By default, the file gets written in your working directory.custom_name- Specifies a custom name for the filename, instead of the stream name (i.e.{custom_name}-{timestamp}.jsonl, asummingdo_timestamp_fileistrue). By default, the stream name will be used.do_timestamp_file- specifies if the file should get timestamped. By default, the resulting file will have a timestamp in the file name (i.e.exchange_rate-{timestamp}.jsonlas described above in theRunsection). If this option gets set tofalse, the resulting file will not have a timestamp associated with it (i.e.exchange_rate.jsonlin our example).Copyright © 2020 Andy Huynh
Package: target-localjson
target-localjsonIntroThis Singer Target implements a simple way persist data as local json files.Installpip install target-localjsonConfigTo execute the Tap in Sync Mode you have to provide a config.json file.There is only one required key: dest_dir. It must be a string and represents the destination directory where json files will be persisted.For each stream received, the Target creates a subdirectory and puts the json files there.Requires write permission on dest_dir.Run Targete.g.tap-<your-choice> -c tap_sample_config.json | target-localjson -c sample_config.json
Package: target-matcher
target_matcherA wrapper class for extended rule-based matching in spaCy.OverviewThis package offers utilities for extended rule-based matching in spaCy pipelines. The main classes used in this package
areTargetMatcherandTargetRule. Similar to otherspaCyrule-based matching components, theTargetMatchermatches spans of text in a spaCy Doc. This class offers the followowing functionality:Patterns are defined using theTargetRuleclass. This class has the following attributes:literal: An exact span of text defining the term. IfpatternisNone, this will be the phrase used to match
in the doc.category: The label which will be assigned to any matched spanspattern (opt): An optional spaCy pattern. If this argument is provided, it will be used to match a span, andliteralcan be used as a normalized version of the phraseattributes (opt): An optional dictionary of attributes to set for theSpan._. For example, if{"is_negated": True}is provided, then the resultingspan._.is_negatedwill evaluate toTrueon_match (opt): Optional callback functions for the spaCy matchersThe original rule which matched a Span will be added tospan._.target_rule. This allows you to see which specific rule
picked up a match, which is useful for debugging and data aggregation/analysisBy default, matching spans will be added todoc.ents, but by settingadd_entstoFalse, it will instead
return tuples of(span, category)TheConceptTaggeris a wrapper class aroundTargetMatcherwhich will assign token-level labels based on thecategoryattribute for all matchesBasic UsageInstallationYou can install target_matcher using pip:pipinstalltarget_matcherOr clone this repository install target_matcher using thesetup.pyscript:$pythonsetup.pyinstallOnce you've installed the package and spaCy, make sure you have a spaCy language model installed (seehttps://spacy.io/usage/models):$python-mspacydownloaden_core_web_smExampleIn the example below, we'll use target matcher to extract two different forms of "Type II Diabetes" and show
how they can be mapped to the same normalized ("literal") term and ICD-10 code:fromtarget_matcherimportTargetMatcher,TargetRuleimportspacyfromspacy.tokensimportSpan# Register a new custom attribute to store ICD-10 diagnosis codesSpan.set_extension("icd10_code",default="")nlp=spacy.blank("en")target_matcher=TargetMatcher(nlp)nlp.add_pipe(target_matcher)rules=[TargetRule(literal="Type II Diabetes Mellitus",category="PROBLEM",attributes={"icd10_code":"E11.9"}),TargetRule(literal="Type II Diabetes Mellitus",category="PROBLEM",pattern=[{"LOWER":"type"},{"LOWER":{"IN":["two","ii","2"]}},{"LOWER":"dm"}],attributes={"icd10_code":"E11.9"}),]target_matcher.add(rules)text="""DIAGNOSIS: Type II Diabetes MellitusThe patient presents today for management of Type 2 DM."""doc=nlp(text)# Even though different rules were used to match the ents,# they have the same 'literal' value, and both are assigned "E11.9"# as an icd10 codeforentindoc.ents:print(ent,ent._.target_rule.literal,ent._.icd10_code,sep="\t")>>>TypeIIDiabetesMellitusTypeIIDiabetesMellitusE11.9Type2DMTypeIIDiabetesMellitusE11.9
Package: target-miso
target-misoThis package is aSingertarget that sends data to Miso'sData API. Being a singer target, you can integrate it into your data pipeline using your favorite DataOps framework, for instance,Meltano.Use with MeltanoFollow the steps below to setuptarget-misoin your Meltano project. Or see the most essential project examplehere.SetupSetupmeltano.ymllike this:# ...
plugins:
  # ...
  loaders:
  - name: target-miso
    namespace: target_miso
    pip_url: target-miso
    executable: target-miso
    config:
      template_folder: template
      api_key: your_miso_api_keyMake sure to runmeltano installto install the dependency.ConfigurationThe config object accepts the following properties:namerequireddefaultexplanationapi_servernohttps://api.askmiso.comThe Miso API server host.api_keyyesYour Miso API key.template_folderyesWhere you keep the template files. The path is relative to Meltano project directory.use_asyncnoFalseWhether to send request in asynchronous mode.dry_runnoFalseWhether to send request in dry-run mode.write_record_limitno100The maximum number of records to be written.Replication methodsCurrently, this target supportsFULL_TABLEandINCREMENTALreplication methods.LOG_BASEDis not yet supported.TemplateTo specify how records are transformed into payloads of Miso API, for each stream from the tap, put a correspondingjinja2template file in your template folder. For example, given a streamproduct, put a template fileproduct.jinjalike this:{
  "product_id": "{{ data.uuid }}",
  "created_at": "{{ data.created_at | datetime_format }}",
  "title": "{{ data.title }}",
  "description": "{{ data.description }}",
  "categories": "{{ data.category | convert_categories }}",
  "custom_attributes": {
    "vender": "{{ data.vender if data.vender }}"
  }
}Rules on output data typesMiso takes 3 kinds of data records:user,product, andinteraction. A record is classified into one of these type by the following rules:If the payload contains thetypefield, it is an interaction record.If the payload contains theuser_idfield, it is a user record.If the payload contains theproduct_idfield, it is a product record.Built-in filtersTarget Miso comes with a few built-in filters that can be used in template expressions:datetime_formatTakes a string in any format compatible withdateparserand output in ISO format, which is desired by Miso API.list_of_strWrap a string to a singleton list of string. For example,"apple"to["apple"].convert_categoriesWrap a string to a singleton double-layered list of string. For example,"apple"to[["apple"]].remove_symbolConvert an int to string.Strip off some special characters from input string, including:",\,\\N,“,\r\n,\n,\r.splitSplit a string into a list by comma.fix_urlEncode (as URL component) the path component of a URL string.jsonifySerialize an obj to a JSON string.Copyright © 2021 Miso Corp.
Package: target-mysql
target-mysql :rocket: :boom:Asinger.iotarget implementation for MySQL. Because some of us still have to deal with a MySQL data warehouse.Under active development like there's no code a barely a roadmap for nowRoadmapMySQL connection from config file setupRecord message handlingAssert JSON structureAssert"schema"field maps internal known schemas structureInsert SQL statementsSchema message handlingAssert JSON structureCreate table if not exists SQL statementsState message handlingAssert JSON structureEmit state to stdout
Package: targetprocess-client
TargetProcess ClientPython library to help getting data fromTargetProcess APIGetting the codeThe code is hosted athttps://github.com/magicjohnson/targetprocess-clientCheck out the latest development version with:$ git clone git://github.com/magicjohnson/targetprocess-client.gitInstallingYou can install targetprocess-client using:$ pip install targetprocess-clientor get the code and run install:$ cd targetprocess-client
$ python setup.py installUsage examplesCreate client instance:fromtargetprocess.apiimportTargetProcessAPIClientfromtargetprocess.serializersimportTargetProcessSerializertp=TargetProcessAPIClient(api_url='https://md5.tpondemand.com/api/v1/',user='user',password='pass')Get collection of UserStories:stories_json=tp.get_stories(take=5,include="[Id,Name,CreateDate]")stories=TargetProcessSerializer.deserialize(stories_json)Get UserStory itemstory_json=tp.get_story(360,include="[Id,Name,CreateDate]")story=TargetProcessSerializer.deserialize(story_json)Update itemdata={'Name':'New name'}tp.update_story(360,data)Request “unregistered” collection (that client doesn’t have predefined methods for)tp.get_collection(collection="Epics",take=2)tp.get_resource(collection="Epics",entity_id=427)tp.update_resource(collection="Epics",entity_id=427,data={'Name':'New Epic name'})
Package: target-python-sdk
Adobe Target Python SDKRequirementsAll currently maintained versions of Python are supported, seePython Releases.
Older Python releases may likely work too, but are not officially supported.NPM 6+ (required by openapi-generator-cli)
Java 8+ (required by openapi-generator)
GNU MakeSet PYTHON_PATHVarious build commands are supported via Makefile, but first you must export environment variable PYTHON_PATH to specify which python install to use to set up your virtual env.$exportPYTHON_PATH=python2.7# Symlink to Mac OS built-in version of python$exportPYTHON_PATH=/usr/local/bin/python3Setup virtual env to make it easy to switch between python 2.7 and 3$makenew_env# Deletes existing virtual env and creates new one based on PYTHON_PATH$makeinstall# Install dependencies in virtual envCode generationThe SDK depends onTarget Open API. It uses Open API and theOpen API generatorto generate the low level HTTP client.To be able to useTarget Open APIfor code generation, we are leveraging Git subtree.To importTarget Open APIasopenapifolder please use commands:$gitsubtreeadd--prefixopenapigit@github.com:adobe/target-openapi.gitmain--squashTo refresh the imported subtree use this command:$gitsubtreepull--prefixopenapigit@github.com:adobe/target-openapi.gitmain--squashOnce all the tools are installed, there is no need to invoke them directly, everything is wrapped in aMakefilecommand, which can be invoked by running:$makecodegenHowever, there are some deviations from the other SDKs, in which a manual code change is needed:geo.pyneeds to be updated according tothis commitRun tests and format code$maketest$makeformatIntegration Test GenerationThere is an integration test suite used by many of the Target SDKs. To get the latest version of these tests, follow the instructions definedherein the test repo. Note the following deviation from the other SDKs:this SDK does not currently support the telemetry feature, soTEST_SUITE_TELEMETRY.jsonneeds to be modified according tothis commitRelease build packageReleases are triggered through Github publish workflow. Input version part to update before publishing to pypi - [patch, minor, major]Running Github Workflows on forked repositoriesGithub Workflows don't run on forked repositories by default.
You must enable GitHub Actions in the Actions tab of the forked repository.See more details athttps://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#pull-request-events-for-forked-repositoriesContributingContributions are welcomed! Read theContributing Guidefor more information.LicensingThis project is licensed under the Apache V2 License. SeeLICENSEfor more information.
Package: target-terminusdb
target-terminusdbThis is aSingertarget that reads JSON-formatted data
following theSinger spec.To installtarget-terminusdbcan be install via pip with Python >= 3.7:python3 -m pip install -U target-terminusdbTo useYou can start a project in a directory using conjunction with TerminusDB easily by:terminusdb startprojectThis will create the config.json that stores information about the endpoint and database that you are connecting to.Then you can pipe in data using a Singer.io tap to TerminusDB. For details about how to use a Singer.io tap you cansee here. For example you have a Python tap like this:importsingerimporturllib.requestfromdatetimeimportdatetime,timezonenow=datetime.now(timezone.utc).isoformat("T","milliseconds")schema={'properties':{'ip':{'type':'string'},'timestamp':{'type':'string','format':'date-time'},},}withurllib.request.urlopen('http://icanhazip.com')asresponse:ip=response.read().decode('utf-8').strip()singer.write_schema('my_ip',schema,'timestamp')singer.write_records('my_ip',[{'timestamp':now,'ip':ip}])Then you can use it to putmy_ipin TerminusDB like this:python tap_ip.py | target-terminusdb -c config.json