Saravanan666/pypi-org huggingface dataset:
Package: chitose
ChitoseChitose is a Python client library for the AT Protocol (Bluesky).UsageThe API of Chitose is similar tothe ATP API.For example, you can useget_timeline()inBskyAgentto get the timeline as shown below. ReplaceYOUR_USERNAMEandYOUR_PASSWORDwith your username and your password respectively:$ git clone https://github.com/mnogu/chitose.git
$ cd chitose
$ python3 -m pip install -r requirements.txt
$ python3
>>> from chitose import BskyAgent
>>> agent = BskyAgent(service='https://bsky.social')
>>> agent.login(identifier='YOUR_USERNAME', password='YOUR_PASSWORD')
>>> agent.get_timeline(limit=1)For available methods inBskyAgent, refer tothe documentation ofBskyAgent.Alternatively, you can useapp.bsky.feed.get_timeline()as inthe advanced API calls:$ git clone https://github.com/mnogu/chitose.git
$ cd chitose
$ python3 -m pip install -r requirements.txt
$ python3
>>> from chitose import BskyAgent
>>> agent = BskyAgent(service='https://bsky.social')
>>> agent.login(identifier='YOUR_USERNAME', password='YOUR_PASSWORD')
>>> agent.app.bsky.feed.get_timeline(limit=1)You can also post withcom.atproto.repo.create_record():fromdatetimeimportdatetimefromdatetimeimporttimezonefromchitoseimportBskyAgentfromchitose.app.bsky.feed.postimportPostagent=BskyAgent(service='https://example.com')agent.login(identifier='alice@mail.com',password='hunter2')record=Post(text='Hello, world!',created_at=datetime.now(timezone.utc).isoformat())agent.com.atproto.repo.create_record(repo=alice.did,collection='app.bsky.feed.post',record=record)See also theexamplesdirectory for sample code.DocumentationFor all the functions and classes available in Chitose, refer tothe Chitose’s documentation.InstallWhile you can use Chitose without installing its Python package, you can installthe package:$ python3 -m pip install chitoseAlternatively, you can build a Python package and install it:$ git clone https://github.com/mnogu/chitose.git
$ cd chitose
$ python3 -m pip install -r requirements.txt
$ python3 -m pip install --upgrade build
$ python3 -m build
$ python3 -m pip install dist/chitose-*-py3-none-any.whlGenerating CodeMost source files of Chitose are generated from the Lexicon files in theatprotodirectory, and you can generate Python code from these files by yourself:$ git clone --recursive https://github.com/mnogu/chitose.git
$ cd chitose
$ python3 generate.pyYou can also update theatprotodirectory and regenerate Python code:$ git submodule update --remote atproto
$ python3 generate.pyYou may want to add new Python code to the repository or update the documentation:$ git add chitose
$ git commit$ python3 -m pip install -r docs/source/requirements.txt
$ cd docs
$ sphinx-apidoc -o ./source ../chitose -f
Package: chitter
Chitter: my take on iterator chaining for PythonIntroductionChitter is a fork Evelyn H'siterchainpackage, but made to be
mine. Anyway, this package makes working with iterators in python more
ergonomic by allowing you to chain methods on them (that's easier to read).Similarly to Evelyn's this package's design is inspired by theRust
iterators, stuff from python's
own standard library
(itertools).InstallationWith Poetry:poetry add chitterWith Pip:pip install chitterFor the development version:git clone https://github.com/brunofauth/chitter.git
cd ./chitter/
poetry installEverything below this line comes straight fromiterchain's docs, so keep that in mind while reading...Why would I need this?Say we want to know the sum of all the squares of even numbers up to 100.How can we do this?Let's try some straightforward, procedural Python:>>>total=0>>>foriinrange(100):...ifi%2is0:...total+=i**2...>>>total161700This works, but if you read this for the first time it can take a bit of effort
to figure out what's happening, especially in slightly less trivial cases.
So, how about we use iterators instead?Well, let's see:>>>sum(i**2foriinrange(100)ifi%2is0)161700That's pretty nice! Much shorter, and much easier to understand.  But there's a
problem, this pattern only works for relatively simple manipulations. In those
cases you could try using the pythonmapandfilterbuiltins (and the
slightly more hiddenfunctools.reduce). They let you construct more complex
processing chains.Let's rewrite our iterator to use those functions instead:>>>sum(map(lambdax:x**2,filter(lambdax:x%2is0,range(100))))161700Okay, nowthatis a mess...  I don't know about you, but it would take me
quite a while to unravel what's happening here. The problem is that the whole
expression is inside out. Thefiltergets applied first, but it's hidden in
the middle of the expression, and thesumgets applied last but it is all the
way in the front. Makes no sense...So, how can we improve on this?iterchainof course!(you probably saw this coming already)So, let's see how it looks usingiterchain:>>>importiterchain>>>(iterchain.count(stop=100)....filter(lambdax:x%2is0)....map(lambdax:x**2)....sum())161700Isn't this much better? The operations are listed in the order that they're
executed, are clearly separated, and you can have as few or as many operations
as you want. This is why you should useiterchain!Generatorsiterchainalso provides handy methods that let you build newIteratorinstances from scratch. These are contained in theiterchain.generatorssub-module, but they're also accessible directly from theiterchainmodule,
which is the preferred way of using them.For example:>>> import iterchain
  >>> iterchain.count().take(4).map(lambda x: x**2).to_list()
  [0, 1, 4, 9]
Package: chitti
Utility Functions for pythonpip install chittiPretty printfrom chitti import pprint, pprint_nl
brands = ['apple', 'samsung', 'pixel', 'one plus']

pprint(brands)
OUT:
apple
samsung
pixel
one plus

pprint_nl(brands)
OUT:
apple

samsung

pixel

one plusColor Words in textfrom chitti import color_words_in_text
text = 'camera is awesome and battery is good'
words = ['camera', 'battery']
color_words_in_text(text, words, color='green', text_color='white')Train and Validation splitSplits dataframe into train and val dataframesSplit each category into 80% train and  20% valfrom chitti.train_test_split import train_val_split

path = 'data.csv'
df = pd.read_csv(path)

text_col='Article_clean'
target_col='NewsType'
train_df, val_df = train_val_split(df, text_col=text_col, target_col=target_col, size=0.8)

print(train_df[target_col].value_counts())
print(val_df[target_col].value_counts())Download pretrained word vectorsSupported Vectors:GloVe.6B.50dGloVe.6B.100dGloVe.6B.200dGloVe.6B.300dGloVe.42B.300dGloVe.840B.300dGloVe.Twitter.25dGloVe.Twitter.50dGloVe.Twitter.100dGloVe.Twitter.200dThis will download specified vector and creates two filesword_index.pkl => word2index dictionaryembedding_matrix.npy => Numpy matrix of size (vocab_size, embedding_size)from chitti.nlp import download_pretrained_vectors, download_pretrained_vectors_
download_pretrained_vectors('GloVe.6B.50d')
download_pretrained_vectors_('glove.6B.50d.txt')Text cleaning Utilsfrom chitti.nlp import stem_words, lemmatize_words
from chitti.nlp import remove_punctuation, remove_stopwords, space_punctuation

text = 'i, love. you    ..... ,,, !!! ?? ?> >> '
print(remove_punctuation(text))
OUT:
'i love you'
Package: chitubox
ChiTuBox Network ManagerTool to interact with the ChiTuBoard based networked LCD Resin printerusage: chitucli [-h] --ip IP
                [--list | --query | --axis-z | --version | --print | --upload | --download | --delete]
                [files [files ...]]

positional arguments:
  files

optional arguments:
  -h, --help      show this help message and exit
  --ip IP, -i IP
  --list, -L
  --query, -Q
  --axis-z, -Z
  --version, -V
  --print, -P
  --upload, -U
  --download, -D
  --delete, -X
Package: chives-exchange
Chives Exchangechives-exchangeis an implementation of an electronic stock exchange that contains a horizontally scalable matching engine and a web UI.Update 0.2.1:chives.webserver.create_appandchives.matchingengine.start_enginenow takes configuration dictionary instead of individual argumentsGetting startedChives exchange can be installed from pypi:pip install chives-exchangeThere are four main components of this implementation of stock exchange:Message queueSQL databaseMatching engine(s)Webserver (optional)Message queueBegin by starting a message queue server, which is the channel through which stock orders are picked up by matching engine(s) to match with resting orders in the orderbook and produce trades. The current implementation only supports RabbitMQ, which can be most easily run using a container:dockerrun-d--rm\--name"rabbitmq"\-p5672:5672\-p15672:15672\rabbitmq:3-managementDatabaseChives exchange supports SQLite and MySQL as the backend database (other SQL databases might work; I just have not tested them). SQLite is a good choice for development, but won't allow multiple matching engines to be running at the same time; therefore, it is highly recommended that MySQL be used, which can be most easily accomplished through a container.Thedocker runcommand below can be modified to use the username/password/database combination of your choice, just note that you will need them for the URI string later for the various commands.dockerrun-d--rm\--namechives-mysql\-eMYSQL_RANDOM_ROOT_PASSWORD="yes"\-eMYSQL_DATABASE="chives"\-eMYSQL_USER="chives_u"\-eMYSQL_PASSWORD="chives_password"\-p3307:3306\-p33061:33060\mysql:8.0After MySQL finished initializing, create the databases schemas by running theinitdbcommand from thechivesCLI:python-mchives-vinitdb\--sql-uri"mysql+pymysql://chives_u:chives_password@localhost:3307/chives"The-vflag will set the SQLAlchemy engine to echo MySQL's response. It is optional but helpful as a first time to see what tables are created.Matching engine and webserverStart an instance of a matching engine by callingstart_engineand passing in the same SQL URI string as before:python-mchivesstart_engine\--sql-uri"mysql+pymysql://chives_u:chives_password@localhost:3307/chives"The matching engine will try to connect to the database and the message queue as soon as it starts; if the message queue or the database is not available, the matching engine will crash immediately. If the database is available, but the table schemas are not initialized, then the matching engine will crash when it starts processing stock orders.The webserver offers a GUI for users to submit stock orders and do other things. It runs as a Flask application, and is started by callingwebserver:python-mchiveswebserver\--sql-uri"mysql+pymysql://chives_u:chives_password@localhost:3307/chives"Further readingsTrading for the first time
Package: ch-json-logger
Данная библиотека позволяет легко и безболезненно логировать ваши
метрики в файл, чтобы потом скормить Ваш лог Kibana.Коротенькая инструкцияУстановкаsudo pip3 install -r requirements.txtКодfrom json_logger import CustomJsonLogger

logger = CustomJsonLogger(__name__)

logger.error("oshibka",params={"email":"mojkot@mail.ru"})Результат{"message": "oshibka", "email": "mojkot@mail.ru", "level": "ERROR", "time": "2017-05-16T11:17:11.731508", "log_id": "0b2c5904-dad5-4b3b-9f1e-40b5fc5c96b9"}
Package: chk
CHKwareLow-code API quality testing, and automation toolboxIntroductionCHKware(pronounced as/tʃek-wer/, i.e.check-ware) is a low-code API quality testing, and automation toolbox. It helps you write accurate, robust, and expressive feature tests for your API in less time than usual.Get startedhere.Install and setupJump to thesetup guide for usersif you want to useCHKwarein your project.Jump to thesetup guide for developerif you want to contribute to this repository.DocumentationPlease go to the websitehttps://chkware.github.io/for documentation.Licensed underMPL v2.0| Follow@chkwareon Twitter |chkprojecton PyPi |snyk Advisorforchk|sonarcloudproject page |Coverallsreport
Package: chk-args
アノテーションチェッカー概要Pythonのアノテーションを参考に関数の引数チェックを行います。
PEP484等に準じ書いてるつもりです。問題点Note that this PEP still explicitly does NOT prevent other uses of annotations, nor does it require (or forbid) any particular processing of annotations, even when they conform to this specification.引用元現在禁止してるので警告に変更するべきかもしれない使用方法fromchk_argsimportchk_args@chk_argsdefexample(arg_1:int):returnarg_1example(5)#result->5example("a")#result->TypeError("The type of argument (arg_1) is int.")
Package: chkcrontab
Crontab linterchkcrontab is a script to check crontab files like those in/etc/cron.dand/etc/crontab.  It tries to catch glaring
errors and warn on suspect lines in a crontab file.  Some valid
lines will generate warnings.  Certain silly yet valid crontab lines
will generate errors as well.Run this by doing:chkcrontab crontab_fileErrors will cause a non-zero exit code.  Warnings alone will not.To see sample output for a bad crontab, run the following:./chkcrontab ./tests/test_crontabSee the./tests/test_crontab.disablecrontab for how to disable
warnings and errors.Output DescriptionThe output ofchkcrontabis described on theCheckCrontabwiki page. A link to it appears in the output if there were any
warnings or errors. It also suggests ways to fix the reported
issues.ContributionsContributions are welcome! Please add unit tests for new features
or bug fixes.  To run all the unit tests run./setup test.
If you havetoxinstalled, just runtox.You can reviewcoverageof added tests by runningcoverage run setup.py testand then runningcoverage report-m.Note that tests are run onTravisfor all supported python
versions whenever the tree on github is pushed to.The packaged version is available viapiporeasy_installaschkcrontab. The project page is onpypi:The source code is available in the following locations:Bitbucket:https://bitbucket.org/lyda/chkcrontab/code.google:https://code.google.com/p/chkcrontab/Github:https://github.com/lyda/chkcrontabGitorious:https://gitorious.org/uu/chkcrontabSourceforge:https://sourceforge.net/p/chkcrontabPull requests on any of those platforms or emailed patches are fine.
Opening issues on github is easiest, but I’ll check any of them.TODOLook for duplicate entries. Puppet sometimes loads up crontabs
with dups.Check for backticks. (why?)Make sure MAILTO and PATH are set (perhaps others?).Add tests for command line.Enable it to parse user crontabs:https://code.google.com/p/chkcrontab/issues/detail?id=2Make “acceptable filenames” a configurable thing:https://github.com/lyda/chkcrontab/issues/4CreditsKevin Lyda: Who got burned one too many times by broken crontabs.
Package: chkopy
Chkopy is a library of md5 checksum tools. This includes a basic md5 checksum generator and a recursive
directory level md5 checksum tool. Standard install includes chkopy command line tool. This uses the
chkopy library to confirm that files copied from source to destination match one another.
Because it can be called recursively (building a hash by walking a directory tree and assessing
chunks of files), it is the ideal tool for safely transferring large quantities of data. For users
who want to simply compare two files -n can be used to nullify the copying operation.
Package: chkpkg
chkpkgChecks a Python package intended to be published on PyPi:can we build a.whldistribution from it?сan we install a package from the newly built.whl?can we import the installed package into the code?Thus, we test the correctness ofsetup.pyorsetup.cfg.chkpkgcan be used as part of CI pipeline. The check can be run from a.pyscript, which is as cross-platform as Python itself.chkpkgsupports Python 3.6+ on Linux, macOS and Windows.Installpip3installchkpkgUsefromchkpkgimportPackagewithPackage()aspkg:pkg.run_python_code('import mypackage; mypackage.myfunc()')pkg.run_shell_code('mypackage_cli --version')print("Package is OK!")Thistest scriptcreates a distribution from project sources, installs the
package from the distribution into a virtual environment, tries importing and
running the installed package from python and command line.If any results in an error, an exception is thrown. The absence of exceptions
means that the package is fine.By default, we assume that thesetup.pyorsetup.cfgis located in the
current working directory. You can specify a different path using the
argumentPackage(project_dir=...)StepsWithout context, the test script would look like this:fromchkpkgimportPackagepkg=Package()try:# step 1pkg.init()# step 2pkg.run_python_code('import mypackage; mypackage.myfunc()')pkg.run_shell_code('mypackage_cli --version')finally:# step 3pkg.cleanup()Step 1: Build, Verify, Installpkg.init()Theinitmethod:Creates a temporary virtual environment capable of building.whlfilesCreates a distribution as a.whlfile (python -m build)Verifies the package source (twine check --strict)Creates another temporary virtual environment without preinstalled packagesInstalls the package from the newly created.whlinto the clean virtual
environmentStep 2: Import, Runpkg.run_python_code('import mypackage')Therun_python_codemethod allows you to check that the package is installed
and can be imported without errors.You can also run some functions from the imported package and check the output.output=pkg.run_python_code('import mypackage; print(mypackage.plus(2, 3))')assertoutput=="5"If the package must be installed as a CLI program, this can be tested with
therun_shell_code. This function callscmd.exeon Windows andbashon other systems.output=pkg.run_shell_code('mypackage_cli --version')assertoutput[0].isdigit()The current working directory will be a random temporary one. Ifmypackage_clican be run, then it really is available as a shell command from any directory.However, such tests are best done on a clean system. If we run the tests on
development machine, it may turn out that we are running a command that was in
the system before the package was installed.Step 3: Cleanuppkg.cleanup()Thecleanupmethod removes all temporary directories created during building
and testing.LicenseCopyright © 2021Arteom iG.
Released under theMIT License.
Package: chkpt
chkptAtinypipeline builderWhatchkptis a zero-dependency, 100-line library that makes it easy to define and execute checkpointed pipelines.It features...Fluent pipeline constructionTransparent caching of expensive operationsJSON serializationHowDefining aStageStages are the atomic units of work inchkptand correspond to single Python functions. Existing functions need only use a decorator@chkpt.Stage.wrap()to be used as aStage:@chkpt.Stage.wrap()defstage1():return"123"# stage1 is now a Stage instanceassertisinstance(stage1,chkpt.Stage)# but the original function is still accessibleassertstage1.func()=="123"Stages can also accept parameters to be provided by otherStages in the finalPipeline:@chkpt.Stage.wrap()defstage2(stage1_input):return[stage1_input,"456"]Defining aPipelinePipelines define the excution graph ofStages to be run.Stages are combined with shift operators (<<and>>) to direct the dataflow:# Each defines a pipeline calculating `stage1` and passing its output to `stage2`.pipeline=stage1>>stage2pipeline=stage2<<stage1pipeline=stage2<<(stage1,)pipeline=(stage1,)>>stage2pipeline=()>>stage1>>stage2More complex pipelines should be defined from the leaves down:result1=(stage1,stage2)>>stage3result2=(result1,stage1)>>stage4pipeline=result2>>stage5Executing aPipelinePipelines can be directly executed which will use the default config settings:result=pipeline()The defaults can be configured by passing aConfiginstance:# Will store all stage results and attempt to load already-stored results, if present.result=pipeline(chkpt.Config(store=True,load=True,dir='/tmp'))ExamplesFor detailed usage, see theexamples/directory.The following is a brief example pipeline:importchkpt@chkpt.Stage.wrap()defmake_dataset1():...@chkpt.Stage.wrap()defbig_download2():...@chkpt.Stage.wrap()defwork_in_progress_analysis(dataset1,dataset2):...pipeline=(make_dataset1,big_download2)>>work_in_progress_analysis# Work-intensive inputs only run once, caching on reruns.result=pipeline(chkpt.Config(load=[make_dataset1,big_download2]))
Package: chksum-cli
chksumCLI for comparing two checksumsInstallRequires Python >= 3.10pip install chksum-cliFeaturesUser friendly non-specific argument orderVisual feedback comparing hashesExit code matches hash resultsCan ignore dot filesInteractive modeHash only functionCan use md5, sha1, sha256, and sha512UsageCHKSUM [-?] [-i] [-d] position1 position2 [position3]

Calculate and compare the checksums of files or directories.
Can also compare against pasted strings.
ALGORITHMS = ['md5', 'sha1', 'sha256', 'sha512']

positional arguments:
  position1          Checksum, file, or algorithm
  position2          Checksum, file, or algorithm
  position3          Checksum, file, or algorithm

options:
  -?, --help         Show this help message and exit.
  -i, --interactive  Run in interactive mode.
  -d, --dots         Ignore '.' (dot) files from directories.

If the first 2 positional arguments are strings, the algorithm is not needed. Default is md5.
Likewise, passing only a single path will simply out the digest.Arguments can be passed in any order. [Note:This issue]E.g. the following are equivalent:chksum <PathToFile> <PathToDir> sha256 -dchksum -d <PathToDir> sha256 <PathToFile>Interactive modeUse-ito enter the interactive mode where arguments can be passed one at a time.Note that-iis mutually exclusive.$ chksum -i

      _     _
     | |   | |
  ___| |__ | | _____ _   _ _ __ ___
 / __| '_ \| |/ / __| | | | '_ ` _ \
| (__| | | |   <\__ \ |_| | | | | | |
 \___|_| |_|_|\_\___/\__,_|_| |_| |_|
 Copyright (c) 2022, espehon
 All rights reserved.

 ALGORITHMS = ['md5', 'sha1', 'sha256', 'sha512']

Enter Algorithm or path to File or Directory >Inputs are checked after each entry and the prompt is updated accordinglyEnter Algorithm or path to File or Directory > ./
        Directory entered.
Enter Algorithm or path to File or Directory > ./
        Directory entered.
Enter Algorithm > md5
        Algorithm entered.
Do you want to include '.' (dot) files? [Y/n] > n
        include_dots = False

-------------[MD5]--------------
59198d6aad1674a0b372027ce275a9b6
59198d6aad1674a0b372027ce275a9b6
√ Hashes MatchIssuesUsing-din between positionals can causes an argparse error. (See Issue:#11)Example:$ chksum ./file ./file -d sha1Author@espehon
Package: chkweb
ChkWebThis is a very simple web crawler to check the public webpages
in a webserver.to use, call the subcommand start with the URL to crawl:chkweb start http://localhost/This will create a sqlite3 databasepages.dbwhith the urls being
detected by the spyder. It also checks this first page and add all the locals
links to the database as pending url to be checked. Now you can run:chkweb advanceto continue the crawling process. This is going to take at most 10
pending url and repeat the process with each of then. You can define the maximun
amount of new urls to be checked setting the environment variableCHKWEB_ADVANCE_LIMITor
setting the--limitcommand line option, like in this example:chkweb advance --limit 1000Checking process statusYou can check the current process status with the subcommandstatus, like this:chkweb statusLogsA log file is stored inlogs/chklog.log. You can change the
log level either in the settings file or declaring a environment variable
namedCHKWEB_LOG_LEVELto the desired level. It is set toERRORby default.TODO thingsAdd a plugin system to perform custom checksAdd a new subcommand to make the tests from a given list of urlsAdd an option to select the name and path of the database file. Alos include
in thesettings.pyfile.DONE thingsadd an option in theadvancecommand to set the number of pages
being analized in every call. Set to 0 to indicate continue until all the
pages are analized [DONE 0.1.4]logs stored in some other location [DONE 0.1.2]Subcommand list to list the URLs in the database [DONE 0.1.2]Subcommand init to delete the database and start a new crawl proces [DONE 0.1.2]subcommand run to get a URL form the pending list and check it [DONE 0.1.2]
Package: chlamys
Smooth interpolation on scattered data with levels and slopes.Free software: MIT licenseInstallationpip install chlamysDocumentationhttps://chlamys.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.0.0 (2019-05-17)First release on PyPI.