Saravanan666/pypi-org huggingface dataset:
Package: canonicalwebteam.flask-base
Canonical Webteam Flask-BaseFlask extension that applies common configurations to all of webteam's flask apps.Usagefromcanonicalwebteam.flask_base.appimportFlaskBaseapp=FlaskBase(__name__,"app.name")Or:fromcanonicalwebteam.flask_base.appimportFlaskBaseapp=FlaskBase(__name__,"app.name",template_404="404.html",template_500="500.html",favicon_url="/static/favicon.ico",)Local developmentFor local development, it's best to test this module with one of our website projects likeubuntu.com. For more information, followthis guide (internal only).FeaturesRedirects and deleted pathsFlaskBase usesyaml-responsesto allow easy configuration of redirects and return of deleted responses, by creatingredirects.yaml,permanent-redirects.yamlanddeleted.yamlin the site root directory.Error templatesFlaskBasecan optionally use templates to generate the404and500error responses:app=FlaskBase(__name__,"app.name",template_404="404.html",template_500="500.html",)This will lead to e.g.http://localhost/non-existent-pathreturning a404status with the contents oftemplates/404.html.Redirect /favicon.icoFlaskBasecan optionally provide redirects for the commonly queried paths/favicon.ico,/robots.txtand/humans.txtto sensible locations:fromcanonicalwebteam.flask_base.appimportFlaskBaseapp=FlaskBase(__name__,"app.name",template_404="404.html",template_500="500.html",favicon_url="/static/favicon.ico",robots_url="/static/robots.txt",humans_url="/static/humans.txt")This will lead to e.g.http://localhost/favicon.icoreturning a302redirect tohttp://localhost/static/favicon.ico.Jinja2 helpersYou get two jinja2 helpers to use in your templates from flask-base:nowis a function that outputs the current date in the passedformat-{{ now('%Y') }}->YYYYversioned_staticis a function that fingerprints the passed asset -{{ versioned_static('asset.js') }}->static/asset?v=asset-hashrobots.txtandhumans.txtIf you create arobots.txtorhumans.txtin the root of your project, these will be served at/robots.txtand/humans.txtrespectively.TestsTo run the tests executeSECRET_KEY=fake python3 -m unittest discover tests.
Package: canonicalwebteam.http
canonicalwebteam.httpNB: We are retiring this module and will be removing it from our codebases.A Python library for making HTTP requests with sensible defaults.InstallationThis module is in PyPi ascanonicalwebteam.http. You should be able to install it simply with:pipinstallcanonicalwebteam.httpTestsTests are located in thetestsdirectory and can be run withpython -m unittest discover tests/.
Package: canonicalwebteam.launchpad
canonicalwebteam.launchpadClasses for triggering builds of snaps and Ubuntu images through theLaunchpad API.UsageLocal developmentFor local development, it's best to test this module with one of our website projects likeubuntu.com. For more information, followthis guide (internal only).SnapBuilderfromcanonicalwebteam.launchpadimportSnapBuildersnap_builder=SnapBuilder(username="build.snapcraft.io",token=os.getenv("SNAP_BUILDER_TOKEN"),secret=os.getenv("SNAP_BUILDER_SECRET"),)snap_name="new-test-snap"git_repo="https://github.com/build-staging-snapcraft-io/test1"snap_builder.create_snap(snap_name,git_repo)new_snap=snap_builder.get_snap_by_store_name("new-test-snap")ImageBuilderfromcanonicalwebteam.launchpadimportImageBuilderimage_builder=ImageBuilder(username="image.build",token=os.getenv("IMAGE_BUILDER_TOKEN"),secret=os.getenv("IMAGE_BUILDER_SECRET"),)image_builder.build_image(board="cm3",system="core16",snaps=["code","toto"])Test fixturesTests check calls against fixtures representing the Launchpad API. These fixtures are generated usingvcrpy, based on real calls to the API when the test was first run.To new tests that rely on new API responses, or if we need to regenerate existing fixtures because the API has changed, the secrets need to be provided to authenticate with the API as follows:exportSNAP_BUILDER_TOKEN={token}exportSNAP_BUILDER_SECRET={secret}exportIMAGE_BUILDER_TOKEN={token}exportIMAGE_BUILDER_SECRET={secret}rmtests/cassettes/...# Remove any fixtures you need to regenerate./setup.pytest# Run tests again to regenerate fixtures
Package: canonicalwebteam.search
canonicalwebteam.searchFlask extension to provide a search view for querying the webteam's Google Custom Search account.Installationpip3 install canonicalwebteam.searchOr addcanonicalwebteam.searchto yourrequirements.txt.UsageLocal developmentFor local development, it's best to test this module with one of our website projects likeubuntu.com. For more information, followthis guide (internal only).Application codeYou can add the extension on your project's application as follows:importtalisker.requestsfromflaskimportFlaskfromcanonicalwebteam.searchimportbuild_search_viewapp=Flask("myapp")session=talisker.requests.get_session()# You must provide a requests sessionapp.add_url_rule("/search","search",build_search_view(session))# Or, a bit more complex exampleapp.add_url_rule("/docs/search","docs-search",build_search_view(session=session,site="maas.io/docs",template_path="docs/search.html",search_engine_id="xxxxxxxxxx",# Optional argument, required by some of our sitesrequest_limit="500/day",# Allows your to configure the limit at which the user will be forbidden to query more. Defaults to 500 per day))The templateYou need to create an HTML template at the specificedtemplate_path. By default this will besearch.htmlinside your templates folder. This template will be passed the following data:{{ query }}- the contents of theq=search query parameter{{ start }}- the contents of thestart=query parameter - the offset at which to start returning results (used for pagination - default 0){{ num }}- the contents of thenum=query parameter - the number of search results to return  (default 10){{ results }}- the results returned from the Google Custom Search query. The actual search results are in{{ results.entries }}.The API keyYou then need to provide the API key for the Google Custom Search API  as an environment variable calledSEARCH_API_KEYwhen the server starts - e.g.:SEARCH_API_KEY=xxxxx FLASK_APP=app.py flask runOnce this is done, you should be able to visit/search?q={some_query}in your site and see search results built with yoursearch.htmltemplate.For some sites, you will need to pass a specific search engine ID (cx) to thebuild_search_viewwhich you will find in theCustom Search Engine page.New sitesIf you created a new site and the API is not returning any results, you may need to add it to the Google Custom Search Enginelist of sites. If you don't see any sites in this page, ask the Webteam.
Package: canonicalwebteam.store-api
Canonical Store Api - Python packageHow to installTo install this extension as a requirement in your project, you can use PIP:pipinstallcanonicalwebteam.store-apiSee also the documentation forpip install.DevelopmentThe package leveragespoetryfor dependency management.TestingAll tests can be run withpoetry run python3 -m unittest discover tests.Note: You might have to dopoetry installbefore runnning the command above.
Package: canonicalwebteam-store-base
Canonical Webteam Store-baseAboutThis is the base application for all stores. Each store is registered as a blueprint when the app is initialized, other configs and blueprints that are store-specific are also registered on the app. This allows for uniformity of certain endpoints and functionalities across all stores and also allows for extension and customization of endpoints and features that are store specific. See Usage section for example.How to InstallTo install this extension as a requirement in your project, you can use PIP:pip install canonicalwebteam.store-baseDevelopmentThe package leverages poetry for dependency management.TestingAll tests can be run withpoetry run python3 -m unittest discover tests.Note: You might have to dopoetry installbefore running the command above.Usagefrom canonicalwebteam.store_base.app import create_app

import store-specific blueprint
import store-specific utility processor

app = create_app(
    "app_name",
    store_bp=store-specific blueprint,
    utility_processor=store-specific utility_processor,
)

app.static_folder=app_static_folder
app.template_folder=app_template_folder
app.static_url_path=app_static_url_path

all other store blueprints and configurations should be registered here
Package: canonicalwebteam.templatefinder
TemplateFinderTemplateFinderis an extension ofTemplateViewwhich attempts to
load the corresponding templates directly from URLs, without the need to
write a view for each URL.It can load HTML templates directly, or parse Markdown files that
contain a "wrapper_template" frontmatter key.UsageTo register the template finder in your Flask app you need to register the template folder in the application config, and specify which routes should be handled by it.
The following example will handle everything via the templatefinder:from canonicalwebteam.templatefinder import TemplateFinder

TEMPLATE_FOLDER = 

app = Flask(
    template_folder="templates",
    static_folder="static",
)
app.config["TEMPLATE_FOLDER"] = "templates"

template_finder_view = TemplateFinder.as_view("template_finder")
app.add_url_rule("/", view_fun  c=template_finder_view)
app.add_url_rule("/<path:subpath>", view_func=template_finder_view)Template matchingThe templatefinder can be used to automatically map.htmland.mdfiles to url on a website.
When included the finder will search for files at the given url in a specified template directory.E.g.localhost/pages/testwill look for the following files, in order:$TEMPLATE_FOLDER/pages/test.html$TEMPLATE_FOLDER/pages/test/index.html$TEMPLATE_FOLDER/pages/test.md$TEMPLATE_FOLDER/pages/test/index.mdMarkdown parsingIf theTemplateFinderencounters a Markdown file (ending.md) it
will look for the following keys inYAML
frontmatter:wrapper_templatemandatory: (e.g.:wrapper_template: includes/markdown-wrapper.html) A path to an
HTML template within which to place the parsed markdown content.
This path must be relative to Flask'stemplate_folderroot.contextoptional: (e.g.:context: {title: "Welcome", description: "A welcome page"}) A
dictionary of extra key / value pairs to pass through to the
template context.markdown_includesoptional: (e.g.:markdown_includes: {nav: })
A mapping of key names to template paths pointing to Markdown files
to include. Each template path will be parsed, the resulting HTML
will be passed in the template context, under the relevant key.
Paths must be relative to Flask'stemplate_folderroot.Here's an example Markdown file:---
wrapper_template: "includes/markdown-wrapper.html"
markdown_includes:
  nav: "includes/nav.md"
context:
  title: "Welcome"description: "A welcome page"---Welcome to my website.## GitHubI also have [a GitHub page](https://github.com/me).TestsTests can be run with pytest:pip3install-rrequirements.txt
python3-mpytesttest
Package: canonicalwebteam.upload-assets
A command-line tool for managingassets.ubuntu.comThis is intended to be a simple command-line tool for uploading assets to anhttps://assets.ubuntu.com-like assets
server.InstallationSnap installOn asnap-enabled system, you can simply:sudosnapinstallupload-assetsPip installIf you can't install the snap, you can install with pip.Firstinstall python3 pip, then:sudopip3installcanonicalwebteam.upload-assetsUsageYou should now have access to theupload-assetscommand:$upload-assets\--api-domainassets.EXAMPLE.com\--api-tokenXXXXXXXX\~/EXAMPLE_DIRECTORY./EXAMPLE_IMAGE.png[{"url":"https://assets.ubuntu.com/v1/2071d161-EXAMPLE_IMAGE.png","filepath":"/home/robin/EXAMPLE_IMAGE.png"},{"url":"https://assets.ubuntu.com/v1/2071d161-IMAGE1.png","filepath":"/home/robin/EXAMPLE_DIRECTORY/IMAGE1.png"},{"url":"https://assets.ubuntu.com/v1/2071d161-IMAGE2.png","filepath":"/home/robin/EXAMPLE_DIRECTORY/IMAGE2.png"}]ConfigurationTo avoid specifying them every time, you can store both the URL and the token for the assets API in environment variables:$exportUPLOAD_ASSETS_API_TOKEN=<api-token>
$exportUPLOAD_ASSETS_API_DOMAIN=assets.example.com
$upload-assetsEXAMPLE_IMAGE.png
Package: canonicalwebteam.versioned-static
canonical-webteam.versioned-static=======================A ``{% versioned_static %}`` Django template tag for generating a URL for astatic file, with a version string which will be effectively uniquebased on the contents of the file.Example-------::/static/css/global.css?v=a23bd10Installation------------.. code:: python# settings.pyINSTALLED_APPS += ['django_versioned_static_url']Usage-----The following template code:.. code:: html{% load versioned_static %}<link rel="stylesheet" href="{% versioned_static 'css/global.css' %}" />Outputs:.. code:: html<link rel="stylesheet" href="/static/css/global.css?v=feb0d0e" />
Package: canonicalwebteam.views-from-yaml
A helper function for creating views from a YAML file of URL paths==================================================================Installation------------.. code:: bashpip install canonicalwebteam.views-from-yamlUsage-----E.g. create a YAML file:.. code:: yaml# url-settings.yamlsome/url/path: {"content": "Hello world!"}another/path: {"content": "Different content"}And edit your Django app's ``urls.py``\:.. code:: python# django_app/urls.pyfrom canonicalwebteam.views_from_yaml import load_views_from_filedef url_view(request, url_settings):return HttpResponse(url_settings['content'])urlpatterns = load_views_from_file(yaml_filepath="url-settings.yaml",view_callback=url_view)Now if you visit `http://your-django-site/some/url/path` you should see"Hello world!".
Package: canon-remote
canon-remoteis a USB library for Canon digital cameras in Python
withpyusb. It originally started as a Python port ofgphoto2’sCanon libraryfor a PowerShot G3. Only the subset necessary for
this model was ported, but it should be usable with other models from
that era (not without hacking) and will almost surely not work on much
newer cameras, not without serious hacking. The project was created
because gphoto2 lacks support for certain remote capture features,
namely locking the autofocus and setting the autofocus mode to macro.The latest project documentation can be found at theproject homepage.
Or you can build it from source.The sourceis hosted atbitbucket.You can contact me atkiril.zyapkov@gmail.com.Licensecanon-remoteis licensed underGPLv3.DisclaimerCanon is a registered trademark ofCanon Inc.This project is an
unofficial implementation of their closed USB camera protocol. I am not
affiliated with Canon Inc. No information or code from them was used
for this work. The protocol was reverse-engineered by the guys behindgphoto2, thanks guys!WarningUse this atyour own risk. I haven’t damaged my camera with it yet,
but it’s not impossible.
Package: canopener
Python convenience functioncanopener(filename,mode='r')for opening files.Local files behave identically toopen():>>> canopener('local_file.txt')URLs can also be passed as the filename and opened for reading.urllib2.urlopen()is used under the covers, so it has equivalent support:>>> canopener('http://remote/file.txt')S3 URLs can also be read if thebotomodule is installed and theAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYenvironment variables are set. The file is downloaded to a temporary local file on open:>>> os.environ['AWS_ACCESS_KEY_ID'] = 'key'
>>> os.environ['AWS_SECRET_ACCESS_KEY'] = 'secret'
>>> canopener('s3://bucket/file.txt')Any paths with “.gz” or “.bz2” extensions are transparently decompressed:>>> canopener('local_file.txt.gz')
>>> canopener('local_file.txt.bz2')
>>> canopener('http://remote/file.txt.gz')
>>> canopener('s3://bucket/file.txt.gz')There’s also transparent compression when writing to local files:>>> canopener('local_file.txt.gz', 'w')
Package: canopen-monitor
CANOpen MonitorAn NCurses-based TUI application for tracking activity over the CAN bus and decoding messages with provided EDS/OD files.Quick StartInstall$pip install canopen-monitorRunRun the monitor, binding tocan0$canopen-monitor -i can0Use this for an extensive help menu$canopen-monitor --helpConfigurationThe default configurations provided by CANOpen Monitor can be found incanopen_monitor/assets. These are the default
assets provided. At runtime these configs are copied to~/.config/canopen-monitorwhere they can be modified and the changes
will persist.EDS files are loaded from~/.cache/canopen-monitorDevelopment and ContributionDocumentationCheck out ourRead The Docspages for more info on the application sub-components and methods.Pre-RequisitesLinux 4.11 or greater (any distribution)Python 3.8.5 or higher(pyenv is recommended for managing different python versions, seepyenv homepagefor information)Install LocallySetup a virtual CAN signal generator$sudo apt-get install can-utilsStart a virtual CAN$sudo ip link add dev vcan0 type vcan$sudo ip link set up vcan0Clone the repo$git clone https://github.com/Boneill3/CANopen-monitor.git$cd CANopen-monitor$pip install -e .[dev](Note: the-eflag creates a symbolic-link to your local development version. Set it once, and forget it)Generate random messages with socketcan-dev$chmod 700 socketcan-dev$./socketcan-dev.py --random-id --random-message -rStart the monitor$canopen-monitorCreate documentation locally$make -C docs clean html(Note: documentation is configured to auto-build with ReadTheDocs on every push to master)Message Types + COB ID Ranges:Wikipedia TableAbridged Table:NameCOB ID RangeSYNC080EMCY080 + NodeIDTPDO1180 + NodeIDRPDO1200 + NodeIDTPDO2280 + NodeIDRPDO2300 + NodeIDTPDO3380 + NodeIDRPDO3400 + NodeIDTPDO4480 + NodeIDRPDO4500 + NodeIDTSDO580 + NodeIDRSDO600 + NodeIDNMT (Heartbeat)700 + NodeID
Package: canopy-network
canopyA decentralized social network of personal websitesStore and display content on your own personal website. Interact richly
with other sites.InstallDebian/Ubuntu:wget understory.cloud/gaea.py -q && python3 gaea.py --deploy canopy/canopyManually$ pip install canopy-network
$ web serve canopyFeaturesrender profile, pages, media, posts and feeds with semantic markup a lamicroformatsarchive source material forreply contextsmoderated threaded discussion using Webmentions with Salmention & Vouchsyndicate to third-party aggregatorsstore posts:asqueryable JSONin SQLite databasefull-text searchas JSON flat files inside Git repository for change historyfollow by subscribing and publish to subscribers using WebSubsign in to third-party applications using IndieAuthleverage third-party Micropub editorsleverage third-party Microsub readersimport/export toolssyndicate/backfeed to/from Twitter/Github/Facebookbackup/restore to/from local/remote storage
Package: canossa
Installvia github$ git clone --recursive https://github.com/saitoha/canossa.git
$ cd canossa
$ python setup.py installor via pip$ pip install canossaLicenseMIT licenseDependenciestermprophttps://github.com/saitoha/termpropTFF - Terminal Filter Frameworkhttps://github.com/saitoha/tffDependentssentimental-skkhttps://github.com/saitoha/sentimental-skk
Package: canprog
Command-line tool to flashing devices by CAN-BUS.Author: Marcin BorowiczContact: marcinbor85 at gmail comDate: 2019/11/01Version: 0.2.1LicenseThe MIT License (MIT)Copyright (c) 2017 Marcin Borowicz <marcinbor85@gmail.com>Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the “Software”), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INTHE SOFTWARE.Main featuresSupport STM32 CAN-BUS ROM bootloaderEasily expand with other CAN-BUS protocolsSupport iHEX and binary format filesObject oriented architectureCommand-line interfaceSocket-CAN driver for CAN-BUS low level operationsDownloadhttps://pypi.python.org/pypi/canproghttps://github.com/marcinbor85/can-ProgInstallInstall using pip (no separate download required):pip install canprogInstall from sources:python setup.py installSource codeSource code on GitHub:https://github.com/marcinbor85/can-progGet code with git:git clonehttps://github.com/marcinbor85/can-prog.git
Package: canrevan
canrevanIntroductioncanrevan은 대량의 네이버 뉴스 기사를 수집하는 라이브러리입니다. 간단하게 한국어 뉴스
데이터셋을 구성하도록 도와줍니다.NLP task에서 가장 중요한 부분 중 하나는 데이터셋입니다. 특히 한국어의 경우, 영어에 비해
수집할 수 있는 데이터가 매우 부족합니다. 특히,위키피디아덤프 파일의 경우 영문 버전이 16.1GB인 것에 비해 한국어 버전은 651.3MB밖에 되지 않습니다.
그렇기 때문에, 일반적인 NLP 학습에 있어서 위키피디아와 같은 데이터셋을 사용하기에는 턱없이
부족합니다. 그렇다면 데이터셋 규모를 키우기 위해서 어떻게 해야 할까요? 우리는 다른 곳에서
데이터를 수집해야 합니다. 대표적으로뉴스 기사가 있습니다.실제로 많은 연구자들이 위키 데이터를 포함하여, 인터넷 뉴스 기사를 함께 사용해 말뭉치를
구성합니다. 인터넷 뉴스 기사는 다음과 같은 특징을 가지고 있습니다.매우 많은 데이터를 가지고 있습니다. 매일 다양한 언론사에서 작성되는 기사의 양은 상당히
많습니다.데이터의 품질이 우수합니다. 기본적으로 뉴스 기사는 맞춤법 뿐만 아니라 내용상으로 잘
구성되어 있습니다.비교적 잘 정형화되어 있습니다. 인터넷 뉴스 기사는 암묵적으로 일정한 규칙과 구조를 가지고
있습니다. 정규화하기 쉽습니다.다양한 분야의 문서가 존재합니다. 뉴스 기사는 분야와 주제를 가리지 않습니다. 정치, 사회,
경제 등등의 주제를 다룹니다.네이버 뉴스는 각 언론사의 뉴스를 종합하여 제공합니다. 하나의
플랫폼에서 다양한 언론사의 방대한 뉴스 기사를 수집할 수 있습니다. 실제로 많은 연구자들이
네이버 뉴스를 통해 기사를 수집합니다.canrevan은 네이버 뉴스에서 기사를 수집하도록 도와줍니다. 명령창에서 한 줄로 수
기가바이트의 데이터를 손쉽게 수집할 수 있습니다. 자세한 내용은여기를
참고하시기 바랍니다.Dependenciestqdm>=4.46.0bs4lxml>=4.5.1aiohttplangumoInstallationWith pipPyPI에서 canrevan을 설치할 수 있습니다. 자세한 명령어는 다음과 같습니다.$pipinstallcanrevanFrom source혹은, 원격 저장소에서 복제하여 소스코드에서 직접 설치할 수 있습니다.$gitclonehttps://github.com/affjljoo3581/canrevan.git$cdcanrevan$pythonsetup.pyinstallExample수집하고자 하는 카테고리의 id를네이버 뉴스에서 확인합니다. 본 예제에서는 정치(100)와 경제(101) 카테고리에 대한 뉴스를 수집해봅시다. 다음은 2020년 5월 1일부터 31일까지 5개의 페이지에 대한 기사를 수집하는 명령입니다. 자세한 사용법은canrevan --help를 참고하시기 바랍니다.$canrevan--category100101--start_date20200501--end_date20200531--max_page5성공적으로 뉴스 기사가 수집되었다면, 다음과 같은 출력을 확인할 수 있습니다.[*] navigation pages: 310
[*] collect article urls: 100%|█████████████████████████████████████████████████████████████| 310/310 [00:05<00:00, 60.43it/s]
[*] total collected articles: 4998
[*] crawl news article contents: 100%|███████████████████████████████████████████████████| 4998/4998 [00:24<00:00, 200.41it/s]
[*] finish crawling 4781 news articles to [articles.txt]Formatcanrevan은 수집된 뉴스 기사를json.encoder.encode_basestring으로 인코딩합니다."국방부는 18일부터 입대하는 모든 장정의 검체를 채취할 예정이며, 8주간 매주 6,300여명이 코로나19 검사를 받는다고 18일 밝혔다.\n군이 훈련소에서 자체적으로 검체를 채취하고, 질병관리본부와 계약을 맺은 민간 업체 등이 검체 이송과 검사를 담당한다. 대규모 인원의 빠른 검사를 위해 취합검사법(Pooling)이 활용된다.\n군 관계자는 “이태원 클럽 등으로 인해 코로나19 20대 감염 사례가 늘었다”며 “집단 생활하는 훈련병이 뒤늦게 코로나19 확진을 받으면 집단 감염이 발생할 수 있기 때문에 선제적으로 전원 검사를 시행한다”고 설명했다.\n군은 확진자가 나온 지역에서 입소하거나 확진자와 동선이 겹칠 경우에 예방적 격리와 검사를 시행했었다.\n현재까지 이태원 일대를 방문했다고 부대에 알린 훈련병 83명이 코로나19 검사를 받았고, 전원 음성 판정이 나왔다.\n훈련병이 입소 후 일주일 전 확진 판정을 받으면 귀가 조치되고, 일주일이 넘은 뒤 확진을 받으면 군 소속으로 치료를 받게 된다.\n앞서 지난달 13일 육군훈련소에 입소한 3명이 코로나19 확진 판정을 받아 귀가 조치됐다."모든 수집된 뉴스 기사들은 위와 같은 포맷을 가지고 있습니다.json.decoder.scanstring함수를 이용하여 개행 문자를 포함한 평문으로 디코딩할 수 있습니다.Licensecanrevan은 Apache-2.0 라이센스가 적용되어 있습니다.
Package: cans
Simple, functional, composable containers likeMaybe.
Properlytypedand supportspattern matchingon Python 3.10+.
Inspired by the containers in theRust standard library.Quickstart>>>fromcansimportJust,Nothing,Maybe>>>greeting:Maybe[str]=Just("Hello")...>>>deffirst(m:list[str])->Maybe[str]:...returnJust(m[0])ifmelseNothing()...>>>first(["howdy","hi","hello"]).map(str.title).unwrap()"Howdy"...>>># Python 3.10+ only>>>matchgreeting:...caseJust(n):...print(f"{greeting}world!")...caseNothing():...print("Hi world!")Helloworld!Among the supported methods areflatmap,filter,zip,
as well as the relevantcollection APIs.
Seethe documentationfor a complete overview.TodoOther containers