Saravanan666/pypi-org huggingface dataset:
Package: pykaHFM
pykaHFMImplementace algoritmu kaHFM.importnumpyasnpfrompykaHFMimport(TFIDFTransformer,FactorizationMachine,StochasticGradientDescent,load_knowledge_base_triples,)movies=["Avengers","Avengers: Infinity War","Stardust","Princess Bride","Last Witchhunter","Tall Girl"]users=["Chandler","Joey","Ross","Monica","Rachel","Phoebe"]n_movies=len(movies)n_users=len(users)user_movie_matrix=np.random.randint(1,6,size=(n_users,n_movies))knowledge_base=[('Avengers','genre','Teen'),('Avengers','genre','Thriller'),('Avengers','genre','Comedy'),('Avengers','genre','Fantasy'),('Avengers','genre','Comedy'),('Avengers','genre','Adult'),('Avengers','genre','Adult'),('Avengers: Infinity War','genre','Adult'),('Avengers: Infinity War','genre','Teen'),('Avengers: Infinity War','genre','Adventure'),('Avengers: Infinity War','genre','Thriller'),('Stardust','genre','Comedy'),('Stardust','genre','Adventure'),('Stardust','genre','Drama'),('Stardust','genre','Adult'),('Stardust','genre','Comedy'),('Stardust','genre','Drama'),('Princess Bride','genre','Adventure'),('Last Witchhunter','genre','Fantasy'),('Last Witchhunter','genre','Drama'),('Last Witchhunter','genre','Action'),('Tall Girl','genre','Teen'),('Tall Girl','genre','Adult'),('Tall Girl','genre','Thriller'),('Tall Girl','genre','Adventure'),('Tall Girl','genre','Teen'),('Tall Girl','genre','Teen'),('Tall Girl','genre','Drama'),('Tall Girl','genre','Sci-fi')]tfidf=TFIDFTransformer(knowledge_base,user_movie_matrix,users,movies)tfidf.generate_v_matrix()fm=FactorizationMachine(users,movies,user_movie_matrix,tfidf.v_matrix)sgd=StochasticGradientDescent(fm,iterations=10,learning_rate=0.0001)sgd.fit()Y_hat=fm.predict_all()print(Y_hat)
Package: pykaiutils
1.启动bert-as-service架构图：https://www.processon.com/view/link/610b87805653bb143a2992eb文件结构：
data：数据文件
56nation.txt : 56个民族 （因为有个别县有包括民族）安装环境：
pip install --user python==3.6.10
pip install --user tensorflow==1.10.0
pip install bert-serving-server #服务端
pip install bert-serving-client #客户端安装包：
jieba                              0.39
numpy                              1.14.5
xpinyin                            0.7.6
pymongo                            3.12.0
pandas                             0.23.0启动：
bert-serving-start -model_dir E:/chinese_L-12_H-768_A-12/ -num_worker=1
bert-serving-start -model_dir E:/Python_project/kashgari_ner_863/chinese_L-12_H-768_A-12/ -num_worker=1部署：
python qcc_bus_poi_match.py -cityname=佛山市
Package: pykaleidescape
pykaleidescapeA python library for controlling Kaleidescape devices via the Kaleidescape System Control Protocol.Note: This library is not operated by, or affiliated with Kaleidescape, Inc.Installationpip install pykaleidescapeUsageCheckout theexamplesdirectory for more examples.importasynciofromkaleidescapeimportDeviceasyncdefmain():# Use "my-kaleidescape" on Windowsdevice=Device("my-kaleidescape.local")awaitdevice.connect()print(f"Power state is currently:{device.power.state}")awaitdevice.disconnect()if__name__=="__main__":asyncio.run(main())
Package: pykalimux
pykalimuxThis is a python script by which you can install Kali Nethunter (Kali Linux) in your termux application without rooted phone.Download CounterUsageHow To Use pykalimuxInstall Dependencies In Termuxpkg update -y && pkg install git python -yInstall pykalimuxpip install git+https://github.com/rc-chuah/pykalimuxRun It On Termux TerminalpykalimuxUpdate pykalimuxUpdate To The Latest pykalimux Run This Command Againpip install git+https://github.com/rc-chuah/pykalimuxHow To Use pykalimux Using PyPI (Python Package Index)Install Dependencies In Termuxpkg update -y && pkg install python -yInstall pykalimuxpip install pykalimuxRun It On Termux TerminalpykalimuxUpdate pykalimux Using PyPI (Python Package Index)Update To The Latest pykalimux Using PyPI (Python Package Index)pip install --upgrade pykalimux
Package: pykalkan
pykalkanУстановка:pipinstallpykalkanНачало работыДля работы с ЭЦП (Электронной Цифровой Подписью) используется библиотека Kalkan Crypt. Вам необходимо выполнить
следующие шаги:Установите нужную версию библиотеки Kalkan Crypt из SDK (SDK/C/Linux/C/libs). Например:sudocp-flibkalkancryptwr-64.so.2.0.2/usr/lib/libkalkancryptwr-64.soУстановите CA (Certificate Authority) сертификаты из папки SDK/C/Linux/ca-certs. В этой папке находятся два типа
сертификатов: production и test. Для установки сертификатов используйте предоставленные скрипты.Обратите внимание, что при установке сертификатов потребуются права суперпользователя (sudo).Пример работы с библиотекой Kalkan CryptВот пример использования библиотеки Kalkan Crypt для проверки ЭЦП на валидность:Внимание! Динамическая библиотека не предназначена для одновременного обращения к нейПодключение библиотеки и загрузка хранилища ключейfrompykalkanimportAdapterlib="libkalkancryptwr-64.so"# Инициализация происходит в контекстном менеждере# При выходе из контекста происходит finalize()withAdapter(lib)asadapter:adapter.load_key_store(CERT_PATH,CERT_PASSWORD)adapter.set_tsa_url()Подпись данных в виде base64 строки...data="SGVsbG8sIFdvcmxkIQ=="signed_data=adapter.sign_data(data)...Проверка подписи на валидность и отозванность(OCSP или CRL)...res=adapter.verify_data(signed_data,data_to_verify)cert=res.get("Cert").decode()validate_result=adapter.x509_validate_certificate_ocsp(cert)# OCSP#  илиvalidate_result=adapter.x509_validate_certificate_crl(cert,path_to_crl_file)# CRL...На данный момент (на 21.08.23) реализованы следующие функции из библиотеки:KC_InitKC_LoadKeyStoreKC_FinalizeKC_SignDataKC_VerifyDataX509ExportCertificateFromStoreX509LoadCertificateFromStoreX509CertificateGetInfoX509ValidateCertificate (CRL + OCSP)TSASetUrlGetTimeFromSign
Package: pykallisto
pykallistoA Python API for RNA-seq alignment, quantification normalization via Kallisto. PyKallisto can take a list of raw fastq files in a compressed or uncompressed format, and generate a cell x gene expression matrix and/or
a cell x transcript equivalent class count matrix, quantify data from many common technologies such as 10x, indrops and dropseq, process feature barcoding data, and obtain QC reports for single-cell rna-seq data. Under the hood, PyKallisto is entirely reliant onkallisto,bustools, andkallisto | bustoolsfrom thePatcher Lab.All thanks for the technologies and beautiful command line tools goes to them. All I did was wrap them in a Python API for easy handling of data in larger pipelines, to allow for pure Python single-cell analysis in a single line of code.Usagepykallistohas two classes,KallistoandKallistoBus. The former wrapskallisto, and the latter wraps thekb | toolsfrom the Patcher Lab.For both tools, the arguments list are the same as the extended argument list in the command line version. That is, instead of-o/--output-dirfor the output directory, we passoutput_dir=/path/to/dirin the Python classes.pykallisto.KallistoExample:frompykallistoimportKallistodata=Kallisto(files=['fastq1.fasta','fastq2.fasta','fastq3.fasta'])# Generate the index file for pseudoalignmentdata.index(index='index',output_dir='index_directory/')# Quantify transcripts in parallel on 4 threadsdata.quant(output_dir='results/',threads=4)
Package: pykalman-bardo
pykalman-bardo (reborn pykalman)Notice: This a fork of originalpykalmanpackage.
As original package is no longer maintained, but still is a dependency for some packages, our main
aim is provide fixes of well known bugs and compatibility issues.Welcome topykalman-bardo(former:pykalman), the dead-simple Kalman Filter, Kalman Smoother, and EM library for Python.InstallationFor a quick installation::pipinstallpykalman-bardoAlternatively, you can setup from source:pipinstall.UsagefrompykalmanimportKalmanFilterimportnumpyasnpkf=KalmanFilter(transition_matrices=[[1,1],[0,1]],observation_matrices=[[0.1,0.5],[-0.3,0.0]])measurements=np.asarray([[1,0],[0,0],[0,1]])# 3 observationskf=kf.em(measurements,n_iter=5)(filtered_state_means,filtered_state_covariances)=kf.filter(measurements)(smoothed_state_means,smoothed_state_covariances)=kf.smooth(measurements)Also included is support for missing measurements:fromnumpyimportmameasurements=ma.asarray(measurements)measurements[1]=ma.masked# measurement at timestep 1 is unobservedkf=kf.em(measurements,n_iter=5)(filtered_state_means,filtered_state_covariances)=kf.filter(measurements)(smoothed_state_means,smoothed_state_covariances)=kf.smooth(measurements)And for the non-linear dynamics via theUnscentedKalmanFilter:frompykalmanimportUnscentedKalmanFilterukf=UnscentedKalmanFilter(lambdax,w:x+np.sin(w),lambdax,v:x+v,transition_covariance=0.1)(filtered_state_means,filtered_state_covariances)=ukf.filter([0,1,2])(smoothed_state_means,smoothed_state_covariances)=ukf.smooth([0,1,2])And for online state estimation:fortinrange(1,3):filtered_state_means[t],filtered_state_covariances[t]=\kf.filter_update(filtered_state_means[t-1],filtered_state_covariances[t-1],measurements[t])And for numerically robust "square root" filtersfrompykalman.sqrtimportCholeskyKalmanFilter,AdditiveUnscentedKalmanFilterkf=CholeskyKalmanFilter(transition_matrices=[[1,1],[0,1]],observation_matrices=[[0.1,0.5],[-0.3,0.0]])ukf=AdditiveUnscentedKalmanFilter(lambdax,w:x+np.sin(w),lambdax,v:x+v,observation_covariance=0.1)ExamplesExamples of all ofpykalman's functionality can be found in the scripts in
theexamples/folder.
Package: pyKamibot
Package for Kamibotinstallpip install pyserial==3.5check versionimport pyKamibot as kamibot

# check version
print(kamibot.__version__)exmapleLEDfrom pyKamibot import Kamibot

kamibot = Kamibot('COM3', 57600)

# LED (r, g, b)
kamibot.turn_led(200, 0, 0)

# ---------------------------------------------------
# Move on mapboard
# ---------------------------------------------------
for i in range(0, 100):
    kamibot.turn_led(200, 0, 0)
    kamibot.delay(1)
    kamibot.turn_led(0, 200, 0)
    kamibot.delay(1)Mapboardkamibot.move_forward(1)

while True:
    kamibot.move_forward(1)
    kamibot.turn_left()turn_right()turn_back()Control Modego_forward_with_speed(right=100, left=100)kamibot.go_forward_with_speed(right=0, left=100)
kamibot.delay(1)
kamibot.stop()go_backward_with_speed(right=0, left=100)kamibot.go_backward_with_speed(right=100, left=100)
kamibot.delay(1)
kamibot.stop()go_with_speed(right=100, left=100, r_dir=0, l_dir=0)
0 : forward, 1: backward, 2: stopkamibot.go_with_speed(right=100, left=100, r_dir=0x00, l_dir=0x00)
kamibot.delay(1)
kamibot.stop()set_server_motor(pos=90)
pos : degreefor i in range(0, 10):
    kamibot.set_server_motor(0)
    kamibot.delay(1)
    kamibot.set_server_motor(90)
    kamibot.delay(1)ultrasonic()
unit is cmwhile True:
    val = kamibot.ultrasonic()
    print('distance :', val)
    kamibot.delay(1)ir()while True:
    val = kamibot.ir()
    print('ir :', val)
    kamibot.delay(1)ContactPart of the MoyaLab project -http://moyalab.comCopyright (C) 2019 Moyalab (immoyalab@gmail.com)
Package: pykanban
CS162 Kanban BoardThe website is deployed on heroku and can be accessed on the following url:https://kanban-app-cs162.herokuapp.com/Project Structure/webcontains application code./web/staticcss files./web/templateshtml files./web/__init__.pyproject initializer file./web/auth.pyroutes related to authorization/authentication./web/config.pydifferent configurations based on running environment (test/dev/prod)./web/models.pyORM mapping (from DB models to python classes) using SQLAlchemy./web/routes.pyapplication routes./unit_testcontains 25 unit tests in total. Tests for: registration, login, reset password, and kanban operations (todo, doing, done)./migrationsdirectory used to control DB migrations, using Flask-migrate..env/examplecontains all variables needed on your .env so the project runs on production or locally.Procfileused for heroku deployment.Virtual EnvironmentCreation of virtualenv:$ virtualenv -p python3 venvIf the above code does not work, you could also do$ python3 -m venv venvTo activate the virtualenv:$ source venv/bin/activateOr, if you areusing Windows-reference source:$ venv\Scripts\activateTo deactivate the virtualenv (after you finished working):$ deactivateInstall dependencies in virtual environment:$ pip3 install -r requirements.txtEnvironment Variables.env.exampleis a file containing all the environment variables that you need to define in a.envfile for this project to run.Run ApplicationStart the server on a mac locally by running:$ source venv/bin/activate
$ pip install -r requirements.txt
$ export FLASK_ENV=dev
$ export FLASK_APP=web
$ python3 -m flask runUnit TestsTo run the unit tests on mac use the following commands:$ source venv/bin/activate
$ pip install -r requirements.txt
$ export FLASK_ENV=test
$ export SECRET_KEY='test-key'
$ python -m pytest unit_test
Package: pykanidm
kanidmA Python module for interacting with Kanidm.Currently in very very very early beta, pleaselog an issuefor feature requests and bugs.Installationpython-mpipinstallkanidmDocumentationDocumentation can be generated bycloning the repositoryand
runningmake docs/pykanidm/build. The documentation will appear in./pykanidm/site. You'll need
make and thepoetrypackage installed.TestingSet up your dev environment usingpoetry-python -m pip install poetry && poetry install.Pytest it used for testing, if you don't have a live server to test against and config set up, usepoetry run pytest -m 'not network'.ChangelogVersionDateNotes0.0.12022-08-16Initial release0.0.22022-08-16Updated license, including test code in package0.0.32022-08-17Updated test suite to allow skipping of network tests
Package: pykaniko
Kanikois a tool to build container images from a DockerfileHow to installFor installation kaniko add in your Dockerfile the next linesFROM gcr.io/kaniko-project/executor:v0.12.0 AS kaniko

FROM <your docker repo>

ENV DOCKER_CONFIG /kaniko/.docker

COPY --from=kaniko /kaniko /kaniko
...pippip install kanikoHow to use:fromkanikoimportKaniko,KanikoSnapshotModekaniko=Kaniko()kaniko.dockerfile='/path/to/Dockerfile'kaniko.no_push=Truekaniko.snapshot_mode=KanikoSnapshotMode.fullbuild_logs=kaniko.build()# List[str]Another way:fromkanikoimportKaniko,KanikoSnapshotModekaniko=Kaniko()build_logs=kaniko.build(docker_registry_uri='https://index.docker.io/v1/',registry_username='username',registry_password='password',destination='path-to-repo:tag',dockerfile='/path/to/Dockerfile',snapshot_mode=KanikoSnapshotMode.full,)
Package: pykanto
pykantois a python library to manage and analyse bird vocalisationsInstallation•Getting started•AcknowledgementsㅤInstallationSeeinstalling pykantofor a complete installation guide.To install pykanto using pip, simply run:pip install pykantoGetting startedSeegetting
startedfor a
complete use guide.DatasetsThere are three small vocalisation datasets packaged withpykanto, used
for unit tests and demonstration purposes. These will be downloaded automatically
when you install the library.DatasetDescriptionSourceGreat tit songsDawn songs from male birds in a population in Oxford, UKNilo M. RecaldeEuropean storm-petrel purr songsMales singing from burrows in the Shetland and Faroe islandsXC46092© Dougie PrestonXC663885© Simon S. Christiansen //CC licenceBengalese finch songsRecordings from two isolated Bengalese finchesOriginally published inTachibana, Koumura & Okanoya (2015)Data:DOILicenseThe project is licensed under theMIT license.CitationIf you usepykantoin your own work, please cite the associated article and/or
the repository:AcknowledgementsSome of the methods that are part ofpykantoare directly inspired by or adapted fromSainburg, Thielk and Gentner
(2020). I have indicated where
this is the case in the relevant method's docstring.Thedereverberatefunction is based on code by Robert Lachlan that is part ofLuscinia, a powerful software for
bioacoustic archiving, measurement and analysis.I have learnt a lot about packaging and python by perusing the structure of
projects byNickleDave. I became
aware ofVocalPy, a project that aims to "develop
an ecosystem of interoperable packages" for "computational vocal
communication and learning research" when I
had already written most ofpykanto, but eventually I'd like to make it
compatible with it: standardisation is
direly needed in the field and I don't want to contribute to the chaos.ㅤ© Nilo M. Recalde, 2021-present
Package: py-kaomoji
py-kaomojiKaomoji library for PythonWhat's py-kaomojiThis is a Kaomoji library for Python for Japanese.
You can find some cute kaomojis.Getting startedInstall withpip.pip install py-kaomojiHow to useLet's start with importing kaomoji library.from kaomoji import kaomojiYou can get a random kaomoji string withkao().kao = kaomoji.Kaomoji()
kao()
> '(ヾﾉヾﾉヾﾉヾﾉヾﾉ･ω･`)ヾﾉｼﾞｪｯﾄｽﾄﾘｰﾑﾅｲﾅｲ'Or, you can get several random kaomojis withrandom_kaomoji().kao.random_kaomoji(n=3)
> 'ピース(≧▽≦)v ⊂⌒っ´ｰωｰ)っ.。o○ (⊃д∩)'You can also specify your kaomoji emotion.kao.kaomoji("たのしい")
> "たのしい！✌('ω'✌ )三✌('ω')✌三( ✌'ω')✌"The list of emotions you can express can be found withget_kao_list().kao.get_kao_list()
> 'あおり',
> 'あげ',
> 'あせ',
> 'あたふた',
> ...If you feel like you need a party, you can runsuper_kaomoji().kao.super_kaomoji()
> 'てへぺろ！(*ゝωб) (((o(*ﾟ▽ﾟ*)o))) (´っω-).｡oO ･ﾟ･(ﾉд<)･ﾟ･ ｳｪ―ﾝ (〃l _ l) ヽ(｡ゝω･)ﾉ （＞ヮ＜*） =͟͟͞͞ (¦3[▓▓]'If you don't think it's good enough, then just getall_kaomoji().kao.all_kaomoji()
> !!!!!!!!!!!!!!!LicenseThis sample code is licensed under theMIT License.
Package: py-kaos-utils
Python Kaos UtilsSet of utilities and helpers for rapid development of Python applicationsDocumentation:https://py-kaos-utils.readthedocs.io/en/release-0.1.0/Development and TestingIDE SetupAdd theexampledirectory to thePYTHONPATHin your IDE to avoid seeing import warnings in thetestsmodules. If
you are using PyCharm, this is already set up.Running the TestsInstall requirementspip install -r requirements.txtFor local environmentpytestFor all supported environmentstox
Package: pykap
PyKapKAP (Public Disclosure Platform) Documentation Wrapper for Capital Markets Board of Turkey and Borsa Istanbul Public Disclosures.InstallationpipinstallpykapFrom the repository:pipinstallgit+https://github.com/cemsinano/PyKap.gitUsageTo list all of the BIST Companiesfrompykap.bist_company_listimportbist_company_listbist_company_list()Get General Info for all of the BIST Companiesfrompykap.get_bist_companiesimportget_bist_companiesget_bist_companies(online=False,output_format='pandas_df')Default output format is pandas df (can be json or dict, as well).onlinemode enables to get the most up-to-date company list from KAP's website.
However, it takes time to parse. It is suggested to useonline=False, unless otherwise is necessary.Get General Info for a specific companyfrompykap.get_general_infoimportget_general_infoget_general_info(tick='AKBNK')BISTCompany Class:frompykap.bistimportBISTCompanycomp=BISTCompany(ticker='BIMAS')# initialize a BISTCompany objectWhen A BISTCompany object is initialized, some general information attributes (ticker,name,summary_page,city,auditor) get filled for this company.Get Expected Disclosures List:comp.get_expected_disclosure_list(count=10)Get Historical Disclosures List:# report_type: "4028328c594bfdca01594c0af9aa0057" or 'financial report' for financial reports# report_type: "4028328d594c04f201594c5155dd0076" or "operation report" for operation reportsreport_type="operating report"comp.get_historical_disclosure_list(fromdate="2020-05-21",todate="2021-05-21",disclosure_type="FR",subject=report_type)Save Operating Review Report PDF File:comp.save_operating_review(output_dir='OperatingReviews')Check the self-specifiedoutput_dirdirectory for saved pdf document.
Package: pykaraoke
pyKaraoke - Use the musixmatch API to transform songs into Google Text-to-SpeechGetting Started with karegoogleGet a Developer Account on MusixMatchhttps://developer.musixmatch.com/Get an API KeyInstalling the botTo install the bot there are a few simple steps:Setup a virtual environmentUbuntu LinuxThe following instructions are based on Windows WSL2 and Ubuntu however any flavour of Linux will work with possibly slightly different commands.Confirm Python 3 is installed$python3-VPython 3.9.10Create and activate a virtual environment$sudoaptinstallpython3-venv$python3-mvenvkaraoke$sourcekaraoke/bin/activate(karaoke)$Install the bot(message_room)$pipinstallpykaraokeWindowsConfirm Python 3.9 is installedDownload PythonCreate and activate a virtual environmentC:\>python3 -m venv karaokeC:\>karaoke\Scripts\activate(pykaraoke)C:\>Install the requirements(message_room)$pipinstallpykaraokeUsing the botRun the bot as an interactive session(karaoke)$pykaraokeThe form questions:Question 1 - API TokenQuestion 2 - Arist NameQuestion 3 - Song TitleEnvironment variablesEvery question can be stored as a variable in the environment. This is useful if you want to reuse the same question in multiple messages.Linux:
export TOKEN=
export ARTIST=
export SONG=Windows:
set TOKEN=
set ARTIST=
set SONG=
Package: pykarbon
For the full rundown, readthe rest of the docs.What is it?The Pykarbon module provides a set of tools for interfacing with the hardware devices on
OnLogic’s ‘Karbon’ series industrial PCs. These interfaces include the onboard CAN bus,
Digital IO, and a few other hardware devices.The goal of this package is to provide a simple, but powerful, base platform that will allow
users to quickly and easily integrate a Karbon into their own application.The tools in this package are designed to work with specific hardware;
this will not work for more generalized projectsHow do I use it?You will need to install python 3 prior to following this guide.Getting started with pykarbon takes only a few minutes:Open up a terminal, and runpipinstallpykarbonOn some systems you may need to run as admin, or use the--userflagLaunch a python shell withpythonUsually linux users do not have write access to serial ports; grant your user permanent access withusermod-a-Gdialout$USERor usesudopythonImport pykarbon withimportpykarbon.pykarbonaspkAnd finally create a control object usingdev=pk.Karbon()If all went well, you should now be ready to control a variety of systems, but for now, let’s just print out some
configuration information:dev.show_info()And close our session:dev.close()What else can I do?Pykarbon offers a number of tools for automating and using Karbon series hardware interfaces. These include:CAN and DIO background data monitoringExporting logged data to .csvRegistering and making function calls based on these bus events:CAN data IDsDigital Input EventsDIO Bus States (Allows partial states)Automated can message response to registered IDsAutomated setting of Digital Output statesAutomatic CAN baudrate detectionUpdating user configuration information:Ignition sense enable/disablePower timing configurationsLow battery shutdown voltageEtc.Firmware updateAdditonally, as Pykarbon’s CAN and Terminal sessions must connect to device serial ports, functionality has been added
to allow running these sessions using a context manager:importpykarbon.pykarbonaspkimportpykarbon.canaspkcwithpk.Karbon()asdev:dev.show_info()withpkc.Session()asdev:dev.write(0x123,0x11223344)A Simple Example: Pykarbon.Coreimportpykarbon.coreaspkcore# Set up interfaces:can=pkcore.Can()term=pkcore.Terminal()# Claim the serial ports for use:can.claim()term.claim()# Configure the can baudrate, and view that configterm.command('set can-baudrate 800')print("\nRead User Configuration:")term.print_command('config')# Write a message, and then listen for and print responsescan.send(0x123,0x11223344)print("\nMonitoring CAN Bus, Press CTRL+C to Stop!")can.sniff()# Will block until you exit with ctrl+c# Close the ports!can.release()term.release()