Saravanan666/pypi-org huggingface dataset:
Package: channelstream
ChannelstreamThis is a websocket-based real-time communication server,
your applications communicate with it via simple JSON REST API.Visithttp://channelstream.orgfor more information.Installation and SetupObtain source from github and do:YOUR_PYTHON_ENV/bin/pip install channelstreamGenerate new configuration:YOUR_PYTHON_ENV/bin/channelstream_utils make_config -o config.iniStart the server:YOUR_PYTHON_ENV/bin/channelstream -i config.iniDemosDemo applications live inhttps://github.com/Channelstream/channelstream_demosrepository.They show common patterns used in real-time applications.Security and communication modelChannelstream provides API explorer that you can use to interact with various
endpoints, it is available by default underhttp://127.0.0.1:8000/api-explorer.To send information client interacts only with your normal www application.
Your app handled authentication and processing messages from client, then passed
them as signed message to channelstream server for broadcast.websocket client -> webapp (security and transformation happens here) -> REST call to socket server -> broadcast to other clientsThis model is easy to implement, secure, easy to scale and allows all kind of
languages/apps/work queues to interact with socket server.All messages need to be signed with a HMAC of destination endpoint ::import requests
from itsdangerous import TimestampSigner
signer = TimestampSigner(SERVER_SECRET)
sig_for_server = signer.sign('/connect')
secret_headers = {'x-channelstream-secret': sig_for_server,
                  'Content-Type': 'application/json'}
response = requests.post(url, data=json.dumps(payload),
                         headers=secret_headers).json()Data format and endpointsPlease consult API Explorer (http://127.0.0.1:8000/api-explorer) for in depth information
about endpoints.Some examples:/connectPOSTconnects users to the server/subscribePOSTSubscribes connection to new channels/unsubscribePOSTRemoves connection from channels/user_statePOSTset the state of specific user/messagePOSTSend message to channels and/or users/messageDELETEDelete message from history and emit changes/messagePATCHEdit existing message in history and emit changes/channel_configPOSTSet channel configuration/infoPOSTReturns channel informationClient API/wsGETHandles websocket connections/listenGETHandles long polling connections/disconnectGETPermanently remove connection from server/disconnectPOSTPermanently remove connection from serverAdmin API/admin/admin.jsonGETReturn server information in json format for admin panel purposes/admin/admin.jsonPOSTReturn server information in json format for admin panel purposesResponses to js clientResponses to client are in form oflistcontainingobjects:examples:new message::{
"date": "2011-09-15T11:36:18.471862",
"message": MSG_PAYLOAD,
"type": "message",
"user": "NAME_OF_POSTER",
"channel": "CHAN_NAME"
}presence info::{
"date": "2011-09-15T11:43:47.434905",
"message": {"action":"joined/parted"},
"type": "presence",
"user": "NAME_OF_POSTER",
"channel": "CHAN_NAME"
}Currently following message types are emited:message,message:edit,message:delete,presence,user_state_change.
Package: channels-yroom
Channels-Yroomchannels-yroomis a Django Channels WebSocket consumer and worker for synchronizing Yjs clients. It implements the network protocol for Yjs doc synchronization and awareness updates and makes them available as Django Channels WebSocket consumer and worker.DocumentationRead the documentationShowcase: text collaboration exampleTheexamplefolder contains a simple project that usesy-prosemirrorto allow for realtime collaboration on rich text.Run the included Docker compose file to check it out:dockercomposeup# Then visit localhost:8000DevelopmentProject useshatchfor the development workflow:pip install hatch

hatch run +py=3.10 test:testLicenseMIT
Package: channels-zmq
channels_zmqA channel layer implementation using ZeroMQ PUB-SUB topology.InstallationInstall package from PyPI:pipinstallchannels-zmqUsageConfigure the layer in your Django settings file. You can choose one of the two implementations described below:Embedded layerCHANNEL_LAYERS={"default":{"BACKEND":"channels_zmq.core.EmbeddedZmqChannelLayer","CONFIG":{"pub_socket_address":"<SOME SOCKET ADDRESS>","capacity":100,"expiry":60,},},}The embedded layer binds a ZeroMQ PUB socket inside the process that callssendorgroup_send.
Consumers will connect their SUB sockets to the same socket.While this is a very lightweight implementation, it only allows a single process to callsendandgroup_sendwith
the same layer.If you need to send data created through other processes, you should create a different layer or use thededicated layer.+----------------+
               |PRODUCER PROCESS|
               |----------------|
               |   PUB SOCKET   |
               +----------------+
                  ^     ^    ^
                  |     |    |
      +-----------+     |    +----------+
      |                 |               |
+------------+   +------------+   +------------+
| SUB SOCKET |   | SUB SOCKET |   | SUB SOCKET |
|------------|   |------------|   |------------|
| CONSUMER 1 |   | CONSUMER 2 |   | CONSUMER 3 |
+------------+   +------------+   +------------+Dedicated layerCHANNEL_LAYERS={"default":{"BACKEND":"channels_zmq.core.DedicatedZmqChannelLayer","CONFIG":{"pull_socket_address":"<DAEMON PULL SOCKET ADDRESS>","pub_socket_address":"<DAEMON PUB SOCKET ADDRESS","capacity":100,"expiry":60,},},}The dedicated layer connects a ZeroMQ PUSH socket to a the configured PULL socket location when you callsendorgroup_send.
Consumers will connect to the configured PUB socket location instead.While this implementation allows multiple processes to send messages over the same layer, it requires you to implement
a daemon process that will read messages on the PULL socket and send them through the PUB socket.+--------------------------+
                  |      DAEMON PROCESS      |
                  |--------------------------|
                  | PUB SOCKET | PULL SOCKET |
                  +--------------------------+
                      ^   ^           ^   ^
                      |   |           |   |
      +---------------+   |           |   +----------------+
      |                   |           |                    |
+------------+   +------------+   +-------------+   +-------------+
| SUB SOCKET |   | SUB SOCKET |   | PUSH SOCKET |   | PUSH SOCKET |
|------------|   |------------|   |-------------|   |-------------|
| CONSUMER 1 |   | CONSUMER 2 |   | PRODUCER 1  |   | PRODUCER 2  |
+------------+   +------------+   +-------------+   +-------------+
Package: channeltoy
channeltoyA collection of tools for exploring hillslope evolution.Free software: MIT licenseDocumentation:https://hillslopetoy.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-05-14)First release on PyPI.
Package: chanoma
chanomachanoma is Characters Normalization library.
文字列正規化処理用のライブラリです。Rust 版の Python バインディングです。使い方fromchanomaimportChanomadefmain():chanoma=Chanoma(preset=True)print(chanoma.normalize("ﾊﾝｶｸｶﾅは全角カタカナに変換されます"))if__name__=='__main__':main()インストールpipinstallchanoma設定ファイルchanoma は設定ファイルを配置することで、結果を調整することが可能です。
設定ファイルを読み込ませるための方法は二種類あります。環境変数CHANOMARCに設定ファイルのパスを指定する。以下のパスのうちのどこかにファイルを配置する。$HOME/.config/chanoma/chanomarc.{ext}$HOME/.config/chanoma/.chanomarc.{ext}$HOME/chanomarc.{ext}$HOME/.chanomarc.{ext}$PWD/chanomarc.{ext}$PWD/.chanomarc.{ext}上記のどちらの場合でも、.{ext}に指定可能な拡張子は.csv,.yaml(.yml) のどれかです。CSV ファイルの場合のフォーマットCSV ファイルでは、一文字から一文字の置換のみ設定が可能です。
最初の列に置換したい文字、次の列に置換後の文字を記述します。from,to
＆,&YAML ファイルの場合のフォーマットYaml ファイルでは、一文字から一文字の置換と、Modifier を指定する二種類の方法があります。一文字から一文字の置換ルートキーにitemsを記述し、配列指定でfromキーの値に置換したい文字、toキーの値に置換後の文字を記述します。items:-from:"a"to:"A"Modifier を指定するルートキーにmodifiersを記述し、一段インデントして Modifier をキーとして記述します。
指定できる Modifire は以下です。character_converter: 一文字から一文字の置換を設定します。キーに置換したい文字、値に置換後の文字を記述します。(itemsと同様の処理になります。)character_eliminator: 指定した文字を削除します。consecutive_character_reducer: 指定した連続する同じ文字を一つにします。dotted_space_eliminator: 『「半角英数字」と「半角英数字」の間の半角スペース』以外の半角スペースを削除します。ligature_translator: 指定した合字をくっつけて一文字にします。trim: 先頭と末尾の半角スペースを削除します。neologdn:neologdnと同様の結果になる処理をします。modifiers:character_converter:a:Ab:Bcharacter_eliminator:["~",∼,∾,〜,〰,～]consecutive_character_reducer:ーdotted_space_eliminator:ligature_translator:ハ゜:パtrim:neologdn:Developmentdocker-composebuildchanoma
docker-composerun--rmchanomabashcd/app/bindings/python3
python3./setup.pydevelop
./run-test.shBuilddocker-composerun--rmbuild-wheels-for-python./build-wheels.shPublishdocker-composerun--rmchanoma./bindings/python3/publish_to_pypi.sh
Package: chanpy
ChanPyA CSP Python library based on Clojure core.async. ChanPy implements
equivalents for all the functions incore.asyncand provides channels that
can be used with or without asyncio. ChanPy even provides support for applying
transformations across channels in the same way Clojure does, viatransducers.Getting StartedDocumentationDocumentation is hosted athttps://chanpy.readthedocs.io/PrerequisitesPython 3.7 or greater.InstallationAvailable on PyPI:pip3installchanpyLicenseApache License 2.0InspirationClojurecore.asyncfor providing
one of the best CSP designs of all time.aiochanfor proving how well asyncio can
be used with Clojure flavored CSP.
Package: chanterelle
Chanterelle is a command line utility written in Python 3 that synchronizes
the contents of an S3 bucket with a local static website. This tool has no
dependency on Jekyll or Ruby, but assumes a default configuration that works
with the default structure of a Jekyll site.Chanterelle was designed to reduce the monetary cost of using the S3 API by
only making changes that are necessary to a bucket. Files are not uploaded if
already present in the bucket with the same content, and bulk list and delete
operations are used.InstallationTo install with Chanterelle you will needPython 3andsetuptools. Run the following to install the
latest release of Chanterelle directly from PyPI:$pipinstallchanterelleConfigurationChanterelle can be configured using a YAML file placed in the project root
called_upload.yml. Jekyll’s_config.ymlis not read by
Chanterelle. The following is a table of keys for the configuration file:KeyDescriptionbucketName of the S3 bucket to synchronize. This key is required.profileName of theAWS profileto use.
The default profile will be used if omitted.site_rootPath to the root of the generated site. Default value is_site.mime_typesMap of file extension (including dot) to mime-type that will
be in addition to the system’s map to determine the
Content-Type of a file.charsetContent-Type charset assigned to files that are subtypes of
thetexttype (text/*). Default value isutf-8.strip_htmlIf set totruethe.htmlextension will be
stripped from the filenames of uploaded files. This is useful
for permalink styles that dont include an extension. Default
value isfalse.delete_oldIf set totruefiles in the bucket that do not exist
in the local directory will be deleted. Default value isfalse.AWS CredentialsIn addition to_upload.ymlyou will also need to configure AWS
credentials. These are ommited from_upload.ymlso it can be checked
into version control without sharing keys with contributors.There are several ways tomanually configurethe credentials that Chanterelle
uses, but the easiest way for those only using a single set of credentials is
to use theconfigure commandof
theaws command line tool:$awsconfigureUsageOnce you have created_upload.ymland set AWS credentials, you can run
Chanterelle from the command line:$chanterelleLicensingChanterelle is licensed under the GNU General Public License v3.0 (GNU GPLv3),
seeLICENSEfor details.
Package: chaoflow.testing.crawler
IntroductionThe purpose of chaoflow.testing.crawler is to find tests in your package and
run them along with tests in files you explicitly define.Tests are found in the following files:all .py files that are part of (subpackages of) your package, i.e. files that
you can import withimportall .txt files that have a corresponding .py fileall files you excplicitly specifyAll tests found can be run individually, e.g. with zc.recipe.testrunner.Using the test crawlerIn order to use the test crawler for your package, you only need to copy one
file and declare the dependency on chaoflow.testing.crawler in your setup.py.Drop this file into your package root and adapt the files list to explicitly
specify test files that are not found otherwise,tests.py:# chaoflow.testing.crawler.tests.py
#
# You can simply copy this file to your package and adjust it to your needs

from chaoflow.testing.crawler import create_test_suite

# File to test, relative to the package root
# all .py files are found
# all .txt files with corresponding .py file are found
files = [
        'README.txt'
        ]

# We assume that this modules is in the root of your package
pkgname = __name__[:-6]

test_suite = create_test_suite(pkgname, files)Declare the dependency in setup.py:setup(...
      extras_require={
          'test': [
              'interlude',
              'chaoflow.testing.ipython',
              'chaoflow.testing.crawler',
              ],
          },
      )If interlude is available,interlude.interactwill be available asinteractin your test environment.If chaoflow.testing.ipython is available,ipshellwill be available asipshellin your test environment.example buildout.cfg using chaoflow.testing.crawler and zc.recipe.testrunner:[buildout]
develop = .
parts = test py

[test]
recipe = zc.recipe.testrunner
eggs = chaoflow.testing.crawler [test]

[py]
recipe = zc.recipe.egg
interpreter = py
eggs = ${test:eggs}After buildout, you can run your tests using./bin/test.
Run./bin/test--list-teststo get a list of all registered tests and see./bin/test--helpfor further information.Licensechaoflow.testing.crawler is licensed under LGPLv3. Please let me know if this
presents a problem for you.Changelog
Package: chaoflow.testing.ipython
IntroductionAn interactive ipython shell to be used in your doctest, very similar to and
based on interlude.Usage>>> from chaoflow.testing.ipython import ipshell, dtipshellBy default you will get the default fancy ipython prompt:>>> ipshell( locals())In order to get a prompt suitable for doctest generation, pass doctest=True:>>> ipshell( locals(), doctest=True)or use dtipshell, which does exactly that:>>> dtipshell( locals())Licensechaoflow.testing.ipython is licensed under LGPLv3. Please let me know if this
presents a problem for you.Changelog
Package: chaogate
chaogateSimulations of the 3-MOSFET system known as achoagateusingpyspice.This library corresponds to a selection of the code used in"Chaogate Parameter Optimization using Bayesian Optimization and Genetic Algorithm", “AI for Hardware Security", ISQED’21, 4/7/2020.Installpip install chaogateHow to useimportchaogatefromchaogateimport*Ensure you change theglobal_pathto the folder containing the as described in thecorepage.By default, they point to:global_path'C:\\Anaconda3\\Lib\\site-packages\\PySpice\\Examples\\libraries\\chaogate'We can instantiate a chaogate with thechaogatefunction, though this is automatically called by all the other functions which need it in this library. Most functions, such assweep,grid, andbifurcate, acceptkwargsas an argument, which refers to all the possible keyword arguments of thechoagatenetlist. For exmaple,s1,s2=sweep(Vbias=(0,1.2,0.01),TEMP=(-20,120,20))plot_sweep(s1,ncurves=10)plot_sweep(s2,ncurves=10)sweep : Elapsed time: 0.3116 secondsOnce we sweep, we calculate the relevant chaotic properties usingiterate.This is packaged into an automatic process, along with calculating thelyapunovexponent, with thebifurcatefunction.We can calculate these quantities over entire regions of parameter space with functions likegrid, then estimate the computational stability withboolean_divergence:g=bifurcate(Vbias=(0,1.2,0.01),Vdd=(1.15,1.25,0.001),as_grid=True)grid : Elapsed time: 29.5447 seconds
iterate_map : Elapsed time: 5.9907 secondsplot_bifurcate(itr=g.iterate.sel(Vdd=1.2),lya=g.lyapunov.sel(Vdd=1.2))grad=boolean_gradient(g.iterate)div=boolean_divergence(grad)plt.matshow(div)plt.colorbar()<matplotlib.colorbar.Colorbar at 0x255f89bae88>We can quickly compare the difference between the desired chaotic properties (positive $\lambda$), and the undesirable properties (the boolean divergence) by taking a linear combination such as:normalized_lyapunov=(g.lyapunov.data>0)*g.lyapunov.data/np.max(g.lyapunov.data)normalized_divergence=div/np.max(div)optimizer=normalized_lyapunov-normalized_divergenceplt.matshow(optimizer)plt.colorbar()<matplotlib.colorbar.Colorbar at 0x255f4b6be48>With an appropriate optimizatier we can then begin to assess the appropriate chaogate designsidis.refresh()
Package: chaos-basispy
The package chaos_basispy defines the chaos_basispy module which attempts to collect the recently developed Basis Adaptation (BA) techniques that have been developed particularly for Polynomial Chaos expansions (PCE).The core idea behind Basis Adaptation is to apply a transformation on the input variables in a way such that the Quantity of Interest (QoI) which we are approximating via a PCE can be expressed with respect to a reduced basis. Provided that the input variables are Gaussian and the transformation is through an isometry (unitary matrix), the new variables preserve “Gaussianity” and a new PCE can be constructed with respect to them. This makes the BA framework particularly attractive on Hermite PCEs and in fact inapplicable (yet) to generalized PCEs. An expeption is when the new variables is 1-dimensional which can be mapped to a uniform r.v. through its own cdf and therefore the Legendre adapted PCE can be constructed. Due to the above, this module considers only Hermite and Legendre Chaos expansions.
Package: chaos-game-engine
Chaos GameAn exploration of procedural fractal generation.Welcome to REPO!Hello world.Table of Contents📖WelcomeGet StartedUsageTechnologiesContributeAcknowledgementsLicense/Stats/AuthorGet Started 🚀Hello world.Usage ⚙Hello world.Technologies 🧰flip.jsflop.jsflap.jsContribute 🤝Hello world.Acknowledgements 💙A special thanks to professorJim Pantaleoneat University of Alaska Anchorage for introducing this to me in hisChaos & Nonlinear Dynamicscourse amidst my physics degree. A memorably brilliant educator who gave mathematical physics attitude.Read more about "The Chaos Game"here.License, Stats, Author 📜SHIELDSeeLicensefor the full license text.This repository was authored byIsaac Yep.Back to Table of Contents
Package: chaosgarden
This package provides genericchaostoolkitmodules to simulatecomputeandnetworkoutages for various cloud providers as well aspod disruptionsfor any Kubernetes cluster.Gardenerusers benefit from an additional module that leverages the generic modules, but exposes their functionality in the most simple, homogeneous, and secure way (no need to specify cloud provider credentials, cluster credentials, or filters explicitly; retrieves credentials and stores them in memory only).Please check out the repoREADMEfor more information and then head out to ourgetting started tutorialand/orPython scripting tutorial, if you want to see what it is like to work with thechaosgardenpackage.
Package: chaoshen-toolbox
# chaoshen-toolbox
这是我为了日常快速开发写的一些脚本，这是将来成为大佬的小小见证快速安装`shell pip installgit+https://github.com/m986883511/chaoshen-toolbox.git# or pip installgit+https://gitee.com/m986883511/chaoshen-toolbox.git`
Package: chaos-lambda
chaos_lambdais a small library injecting chaos intoAWS Lambda.
It offers simple python decorators to dodelay,exceptionandstatusCodeinjection
and a Class to adddelayto any 3rd party dependencies called from your function.
This allows to conduct small chaos engineering experiments for your serverless application
in theAWS Cloud.Support for Latency injection usingdelaySupport for Exception injection usingexception_msgSupport for HTTP Error status code injection usingerror_codeUsing for SSM Parameter Store to control the experiment usingisEnabledSupport for adding rate of failure usingrate. (Default rate = 1)Per Lambda function injection control using Environment variable (CHAOS_PARAM)Installpipinstallchaos-lambdaExample# function.pyimportosfromchaos_lambdaimportinject_fault# this should be set as a Lambda environment variableos.environ['CHAOS_PARAM']='chaoslambda.config'@inject_faultdefhandler(event,context):return{'statusCode':200,'body':'Hello from Lambda!'}Considering a configuration as follows:{"fault_type":"exception","delay":400,"is_enabled":true,"error_code":404,"exception_msg":"This is chaos","rate":1}When excecuted, the Lambda function, e.ghandler('foo','bar'), will produce the following result:exception_msgfromconfigchaoswitharateof1corruptingnowTraceback(mostrecentcalllast):File"<stdin>",line1,in<module>File"/.../chaos_lambda.py",line199,inwrapperraiseException(exception_msg)Exception:ThisischaosConfigurationThe configuration for the failure injection is stored in theAWS SSM Parameter Storeand accessed at runtime by theget_config()function:{"fault_type":"exception","delay":400,"is_enabled":true,"error_code":404,"exception_msg":"This is chaos","rate":1}To store the above configuration into SSM using theAWS CLIdo the following:awsssmput-parameter--namechaoslambda.config--typeString--overwrite--value"{ "delay": 400, "is_enabled": true, "error_code": 404, "exception_msg": "Thisischaos", "rate": 1, "fault_type": "exception"}"--regioneu-west-1AWS Lambda will need to haveIAM access to SSM.{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["ssm:DescribeParameters"],"Resource":"*"},{"Effect":"Allow","Action":["ssm:GetParameters","ssm:GetParameter"],"Resource":"arn:aws:ssm:eu-north-1:12345678910:parameter/chaoslambda.config"}]}Supported Decorators:chaos_lambdacurrently supports the following faults:latency- Add latency in the AWS Lambda executionexception- Raise an exception during the AWS Lambda executionstatus_code- force AWS Lambda to return a specific HTTP error codeMore information:Full Documentation
Package: chaoslib
-------------------------------------------------------------------_________ .__                        .____    ._____.\_   ___ \|  |__ _____    ____  _____|    |   |__\_ |__/    \  \/|  |  \__  \  /  _ \/  ___/    |   |  || __ \\     \___|   Y  \/ __ \(  <_> )___ \|    |___|  || \_\\______  /___|  (____  /\____/____  >_______ \__||___  /\/     \/     \/           \/        \/       \/-------------------------------------------------------------------Sorts a list of numbers by randomly mutating the list.chaoslib.sort([3,1,2]) returns [3,2,1]