Saravanan666/pypi-org huggingface dataset:
Package: ca-dingtalk-webhook
企联AI DevConnectAI定位为一个帮助公司更快地建立AI内部工具的平台产品背景由于各个公司的内部管理流程不同，会有很多无法标准化的长尾AI需求企业内部技术团队需要将1/3的时间用来开发维护这些内部AI工具如果能将低代码用于AI内部工具的开发，无疑将极大地提升企业技术团队的效率既然AI需求是无法标准化的，那么就标准化这些长尾AI需求的开发工具以低代码的方式提高内部AI工具开发效率ca-dingtalk-webhook生成钉钉(Dingtalk) webhook回调接口注册处理对应事件的回调方法python sdkfrom connectai.dingtalk.sdk import DingtalkTextMessage
from connectai.dingtalk.webhook import DingtalkServer

app = DingtalkServer()

@app.on_bot_message(app_id='dingxxx', app_secret='xxx', agent_id='xxx', msgtype='text')
def on_text_message(bot, sessionWebhook, content, **kwargs):
    text = content['content']
    bot.reply(sessionWebhook, DingtalkTextMessage("reply: " + text))

app.start(host='0.0.0.0', port=8888)
Package: ca-dingtalk-websocket
Dingtalk-Webhook-Proxy将钉钉(dingtalk)webhook代理成websocket企业自建应用不用创建公网的回调地址，直接本地使用websocket客户端连上这个转发地址设计使用nchan维护websocket的连接将钉钉的回调消息，抽取钉钉相关的头信息，外面包一层json，使用X-Request-Id作为唯一ID，推送给对应的channel客户端自己保存钉钉的密钥信息，从转发服务走的消息都是加密的。客户端调用钉钉其他接口，直接走自己的网络安全性钉钉回调消息都是加密的，只能由websocket客户端自己解密，转发服务是透明的。如何确保自己的channel不会被别人恶意使用？使用nginx basic auth，nchan支持auth_request，在对应的request里面使用basic auth就能做校验实现部署一个nchan（openresty版本）配置一个internal的location，给内部转发钉钉消息使用配置一个location，作为钉钉webhook转发（处理消息转发逻辑）organization使用一个organization对当前组织下面的所有bot进行管理
这样所有的消息可以通过org_<name>一个channel推送，这种模式下启动服务的时候可以不用提前注册所有的bot，可以动态的加入新的bot进去对org_的channel增加basic authhook链接转发消息兼容organization新增一个支持organization的clientclient = Client(bot1, bot2, org_name='org_lloyd', org_passwd='passwd')使用python sdk使用装饰器可以更简洁的通过一个回调函数处理消息pip install ca-dingtalk-websocket

from connectai.dingtalk.websocket import Client

client = Client()

@client.on_bot_message(app_id='dingxxx', app_secret='xxx', agent_id='xxx', msgtype='text')
def on_message_callback1(bot, sessionwebhook, content, **kwargs):
    text = content['content']
    bot.reply(sessionWebhook, DingtalkTextMessage("reply: " + text))

client.start()
Package: cadishi
CADISHIIntroductionCADISHI -- CAlculation of DIStance HIstograms -- is a software package
that enables scientists to compute (Euclidean) distance histograms
efficiently. Any sets of objects that have 3D Cartesian coordinates may
be used as input, for example, atoms in molecular dynamics datasets or
galaxies in astrophysical contexts. CADISHI drives the high-performance
kernels pydh (CPU) and cudh (GPU, optional) to do the actual histogram
computation. The kernels pydh and cudh are part of CADISHI and are
written in C++ and CUDA.For more information, we refer to our publication:K. Reuter, J. Koefinger; CADISHI: Fast parallel calculation of
particle-pair distance histograms on CPUs and GPUs;Comp. Phys. Comm.
(236), 274 (2019).A preprint of the paper is available onarXiv.org.DocumentationDocumentation is available athttp://cadishi.readthedocs.io/en/latest/
<http://cadishi.readthedocs.io/en/latest/>. Alternatively, you may
access the local copy at [doc/html/index.html]{.title-ref} after having
cloned the repository.License and CitationThe CADISHI package is released under the permissive MIT license. See
the file [LICENSE.txt]{.title-ref} for details.Copyright 2015-2019 Klaus Reuter (MPCDF), Juergen Koefinger (MPIBP)In case you're using CADISHI for own academic or non-academic research,
we kindly request that you cite CADISHI in your publications and
presentations. We suggest the following citation as appropriate:K. Reuter, J. Koefinger; CADISHI: Fast parallel calculation of
particle-pair distance histograms on CPUs and GPUs; Computer Physics
Communications (2018); <https://doi.org/10.1016/j.cpc.2018.10.018>.
Package: cadmean-rpckit
cadRPC client library for PythoncadRPC is an easy-to-use RPC technology. It's goal is to simplify the communication with your web API, hiding all the HTTP and JSON poppycock.InstallationInstall thecadmean-rpckitpackage:pip install cadmean-rpckitHow to useAn example is worth a thousand words.
Note, you can run the examples yourself, as
they call functions of theexample serverat testrpc.cadmean.ru.The easiest way to call an RPC function is using a decorator.Synchronous example:fromrpckit.decoratorsimportRpcFunction# You need to set this url only once in your programRpcFunction.default_server_url="http://testrpc.cadmean.ru"@RpcFunction("sum")defrpc_sum(a,b):print(f"Calling rpc function that calculates{a}+{b}")print(rpc_sum(5,64))Async/await example:importasynciofromrpckit.decoratorsimportRpcFunction# You need to set this url only once in your programRpcFunction.default_server_url="http://testrpc.cadmean.ru"@RpcFunction("sum",async_call=True)defrpc_sum(a,b):print(f"Calling rpc function that calculates{a}+{b}")asyncdefmain():print(awaitrpc_sum(5,64))loop=asyncio.get_event_loop()loop.run_until_complete(main())So, all you need to do to call an RPC function from python,
is to define a regular function with parameters,
that will match the ones of the remote function
and than decorate it with@RpcFunction, that takes
remote function name as parameter.You can addasync_call=Trueto the decorator, than
function call will be asynchronous, and you
will be able to use your function withasync/await.Error handlingcadRPC function may return an error code instead of a result.
In this case this library risesFunctionException.
It can be a system error or user defined error,
that you return from RPC function in your server.
You would probably want to handle these errors in your program:fromrpckit.decoratorsimportRpcFunctionfromrpckit.exceptionsimportFunctionExceptionfromrpckit.constantsimportRpcErrorCodeRpcFunction.default_server_url="http://testrpc.cadmean.ru"@RpcFunction("notExistingFunction")defnot_existing_function():passtry:not_existing_function()exceptFunctionExceptionasex:print(ex)ifex.code==RpcErrorCode.FunctionNotFound:print("Ok. We expected that.")else:print("Something bad happened.")AuthorizationadRPC simplifies authorization process in your web API.
You just call a function on your RPC server,
that will authenticate the user and return a JWT authorization
ticket(access and refresh token).
The client will store this ticket for you and will authorize
further calls with the access token.
Note, that you need to setup authorization on your server
(seethis readme).Here is an example:fromrpckit.decoratorsimportRpcFunctionRpcFunction.default_server_url="http://testrpc.cadmean.ru"@RpcFunction("auth")defauth(email,password):pass@RpcFunction("user.get")defget_user():passauth("email@example.com","password")# Call the authentication function, that returns the JWT tokensuser=get_user()# Call the function that requires authorization after obtaining JWT tokensprint(user)ContributingFeel free to submit issues or create pull requests following fork-and-pull git workflow.See alsoC# client and server libraryAndroid client libraryExample server
Package: cadnano2
Cadnano2 DNA Origami Design SoftwareOverviewCadnanois computer-aided design software for DNA origami nanostructures. The original citation ishere.InstallationmacOSInstallhomebrewInstall python3:brew install python3Create a virtualenv:python3 -m venv ~/virtualenvs/cn24xActivate virtualenv:source ~/virtualenvs/cn24x/bin/activateInstall via pip:pip3 install cadnano2LinuxCreate a virtual env:python3 -m venv ~/virtualenvs/cn24xActivate the venv:source ~/virtualenvs/cn24x/bin/activateInstall from PyPI:pip3 install cadnano2Windows(tested for Python 3.10.4)Download and install latestpython3Use "Manage app execution aliases" to disable launching "App Installer" via any python executables.Add python app folder to your system path, e.g.C:\Users\shawn\AppData\Local\Programs\Python\Python310\Add scripts folder to your system path, e.g.C:\Users\shawn\AppData\Local\Programs\Python\Python310\Scripts\Open command prompt (cmd.exe) and confirm you can run "python" and "pip".Install Cadnano via pip:pip install cadnano2RunningmacOS or LinuxOpen the Terminal(macOS or Linux) Activate virtual env:source ~/virtualenvs/cn24x/bin/activateRun the app:cadnano2WindowsOpen the Command PromptRun the app:cadnano2macOS aliasAdd to~/.zprofile:alias cn2="source ~/virtualenvs/cn24x/bin/activate && cadnano2"Open new Terminal and run:cn2UpgradingOpen the TerminalActivate virtual env:source ~/virtualenvs/cn24x/bin/activateUpgrade via pip:pip install --upgrade cadnano2DevelopmentSetup a dev environment (Mac or Linux)Create a virtualenv:python3 -m venv ~/virtualenvs/cn24devActivate virtualenv:source ~/virtualenvs/cn24dev/bin/activateInstall PyQt6:pip install pyqt6Clone repo:git clone git@github.com:douglaslab/cadnano2.gitChange directory:cd cadnano2Make desired code editsBuild and install:python setup.py installTest:cadnano2Repeat previous 3 steps as neededSetup a dev environment (Windows)Install venv:pip install virtualenvCreate a virtualenv:python -m venv virtualenvs\cn24dev(e.g. in %homepath%)Activate virtualenv:virtualenvs\cn24dev\Scripts\activateInstall PyQt6:pip install pyqt6Clone repo:git clone git@github.com:douglaslab/cadnano2.gitChange directory:cd cadnano2Make desired code editsBuild and install:python setup.py installTest:cadnano2Repeat previous 3 steps as neededBuild new dist and upload to PyPipip install build twine<- installbuildandtwinecd /path/to/cadnano2/python3 -m buildcreates dist/cadnano2-x.y.z.tar.gz and cadnano2-x.y.z-py3-none-any.whlpython3 -m twine upload dist/cadnano2-x.y.z*Version notesThis version of Cadnano2 is maintained by theDouglas Lab. It is derived fromcadnano/cadnano2.If you wish to use the Cadnano Python API for scripting, seecadnano2.5.LicenseThis version of Cadnano2 is available under the MIT License. GUI code that uses PyQt6 is GPLv3 asrequiredby Riverbank Computing.
Package: cado
cadoPython notebook IDE with a focus on reactivityAboutcadois a notebook IDE for Python, likeJupyter, but with a reactive cell model, taking inspiration fromObservable. Each cell defines its own outputs that other cells can listen to. When a child cell runs, it uses cached outputs from parent cells. And when the output of a parent cell updates, the change propagates to all child cells automatically.InstallationpipinstallcadoFeaturesIf you have ideas for new features feel free to create an issue or submit a pull request!Reactive cellsAuto-save to diskKeyboard shortcutsDrag cells to reorderMarkdown modeNotebook files viewerUsage# Start up a cado servercadoup# Open http://0.0.0.0:8000 in a browserYou should now see a screen that lists out all of your notebooks. Click on the example notebook to get started.Keyboard ShortcutsActionCommandMake the cell above the active cellUpArrowMake the cell below the active cellDownArrowRun the active cellShift+EnterClear the active cellShift+DeleteTurn on edit modeEnterTurn off edit modeEscapeCreate a new cell before the active cellControl+aCreate a new cell after the active cellControl+bCreate a new cell at the end of the notebookControl+nDelete the active cellControl+d
Package: cadquery-ocp
ocp-build-systemThis repository is used to build wheels for OCP, which is CadQuery's bindings to the OpenCASCADE CAD kernel. There are two GitHub Actions available as part of this repo.Build (Create Python wheel using Conda)ReleasesThe Build workflow is triggered manually by a developer, and sets up conda environments for each of the wheels to be built, builds the wheels, and then uploads them as artifacts to the GitHub Action. The Releases workflow is run when a tag is created, and takes the wheels attached to the latest build and uploads them to PyPi. Each time a new version of OCP is released these Actions, along with the setup.py file, need to be modified to build and release the new version.
Package: cads-toolbox
DISCLAIMER:This project is ALPHA and will be Experimental for the forseable time. Interfaces and functionality are likely to change. DO NOT use this software in any project/software that is operational.cads-toolboxCADS Toolbox library provides an entry point to the CADS data and softwareQuick Startimport the package>>>importcads_toolbox>>>cads_toolbox.config.USE_CACHE=True# opt-in to use the cache globallyRequest some data and download to a local location>>>request=[..."reanalysis-era5-single-levels",...{...'variable':'2m_temperature',...'product_type':'reanalysis',...'year':'2017',...'month':'01',...'day':'01',...'time':'12:00',...}...]>>>remote=cads_toolbox.catalogue.retrieve(*request)>>>remote.download()# Uses filename on server for downloaded result'...'>>>remote.download(target='./test.grib')# Saves result in ./test.ext'./test.grib'Request some data and explore polymorphism and caching>>>remote=cads_toolbox.catalogue.retrieve(*request)>>>dataset=remote.to_xarray()# Involves download to your local cache disk (cacholote) and harmonisation of data coordinates and unit names (cgul)>>>dataset<xarray.Dataset>Dimensions:...>>>dataframe=remote.to_pandas()# Uses cached interim result from to_xarray so re-download is not required.Request some data, open as an xarray dataset and plot using xarray methods>>>remote=cads_toolbox.catalogue.retrieve(*request)>>>dataset=remote.to_xarray()>>>dataset<xarray.Dataset>Dimensions:...>>>dataarray=dataset.to_array()# Use xarray methods to manipulate the object>>>dataarray<xarray.DataArray...>>>dataarray.isel(time=0).plot()<matplotlib.collections.QuadMeshobject...NOT YET IMPLEMENTED: Use the CADS toolbox service to execute large compute jobs on the CADS infrastructure>>>remote=cads_toolbox.catalogue.retrieve(*request)# doctest: +SKIP>>>climatology=cads_toolbox.climatology(remote,**kwargs)# doctest: +SKIP>>>climatology_ds=climatology.to_xarray()# doctest: +SKIP>>># OR downloaded directly:>>>climatology.download("./my_climatology.nc")# doctest: +SKIP'./my_climatology.nc'# doctest: +SKIPWorkflow for developers/contributorsFor best experience create a new conda environment (e.g. DEVELOP) with Python 3.10:conda create -n DEVELOP -c conda-forge python=3.10
conda activate DEVELOPBefore pushing to GitHub, run the following commands:Update conda environment:make conda-env-updateInstall this package:pip install -e .Sync with the latesttemplate(optional):make template-updateRun quality assurance checks:make qaRun tests:make unit-testsRun the static type checker:make type-checkBuild the documentation (seeSphinx tutorial):make docs-buildLicenseCopyright 2022, European Union.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: cad-tickers
Cad TickersFunction to extract exchange data from the cse and tsx websites and various other data sources. This package is primarily focussed on scrapping data for the canadian stock market.Tsx has switched to graphql which I like.How to run testspoetry run python -m pytest# Needed for readthedocs documentation
poetry export -f requirements.txt > requirements.txt.DonateIf you would like to motivate me to spend more time improving open source projects please consider donating.
Package: cad-to-dagmc
Testing package and running examplesTesting withModel Benchmark ZooA minimal package that uses CadQuery functionality to convert CAD geometry toDAGMCh5m filesThis particular method of producing DAGMC compatible h5m files from CAD geometry is intended to convert STP files orCadQueryobjects to a DAGMC compatible h5m file.The resulting DAGMC geometry can then be used for simulations inOpenMCorother supported codes.This package is tested withpytest testsand also the DAGMC geometry made with this package is compared to simulation carried out with native constructive solid geometry, seeModel Benchmark Zoofor more details.Also checkout these other packages that also create DAGMC geometryCAD-to-OpenMC,StellarmeshInstallation prerequisiteIn principle, any Conda/Mamba distribution will work. A few Conda/Mamba options are:MambaforgeMiniforgeAnacondaMinicondaInstall using Mamba and pipThis example assumes you have installed the MambaForge option or separately
installed Mamba withconda install -c conda-forge mamba -yCreate a new conda environment, I've chosen Python 3.9 here but new versions are
also supported.mambacreate--namenew_envpython=3.9-yActivate the environmentmambaactivatenew_envInstall the dependenciesmambainstall-ccadquery-cconda-forgemoabgmshpython-gmshcadquery=master-yThen you can install the cad_to_dagmc package withpippipinstallcad_to_dagmcYou may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and otherslink to DAGMC documentation.You can runconda install -c conda-forge openmchowever this more specific command makes sure the latest version of OpenMC which contains DAGMC is chosen by conda / mambamambainstall-cconda-forge-y"openmc=0.13.3=dagmc*nompi*"Install using Conda and pipThis example uses Conda to install some dependencies that are not available via PyPi.Create a new conda environmentcondacreate--namenew_envpython=3.9-yActivate the environmentcondaactivatenew_envInstall the dependenciescondainstall-ccadquery-cconda-forgemoabgmshpython-gmshcadquery=master-yThen you can install the cad_to_dagmc package withpippipinstallcad_to_dagmcYou may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and otherslink to DAGMC documentation.You can runconda install -c conda-forge openmchowever this more specific command makes sure the latest version of OpenMC which contains DAGMC is chosen by conda / mambacondainstall-cconda-forge-y"openmc=0.13.3=dagmc*nompi*"Usage - creation of DAGMC h5m filesFor examples see theexamples folderUsage - simulation with transport codeFor examples see the CAD tasks in theneutronics-workshop
Package: caduceussocket
A python socket manager.Extend Session for server classes.
Extend Connection for client clasess.
To expose functions to RPC calling, add their name to the white_list_functions list.
To call a function, you can send JSON with the function name and arguments contained:{
	"type": "function_name",
	"args": [
		"argument 1",
		"argument 2"
	]
}You can register a new connection by sending the clients name and the name of the session they should be moved to:{
	"type": "register",
	"args": [
		"client_name",
		"session_name"
	]
}To send a message to other clients, you can call the broadcast message using the message and client name:{
	"type": "broadcast",
	"args": [
		"message",
		"client_name"
	]
}
Package: cad-viewer-widget
cad-viewer-widgetA Jupyter widget to view CAD objectscad-viewer-widgetshas its origin inJupyter-CadQuery, which now
has been split into 3 layers. This repo being the middle layer:three-cad-viewerThis is the complete CAD viewer written in Javascript withthreejsbeing the only dependency.cad-view-widget(this repository)
A thin layer on top ofcad-viewer-widgetthat wraps the CAD viewer into anipywidget. The API documentation can be foundhereJupyter-CadQueryACadQueryviewer, collecting and tessellating CadQuery objects, using cad-view-widget to visualize the objectsClick on the "launch binder" icon to startcad-viewer-widgeton binder:ExamplesTests and demos: Demonstrating the features using the sample tesssellations in./examplesClassic OCC Bottle: A real CAD example based onpython-occInstallationTo install use pip:$ pip install cad_viewer_widgetFor a development installation (requiresNode.jsandYarn version 1),$ git clone https://github.com/bernhard-42/cad-viewer-widget.git
$ cd cad-viewer-widget
$ pip install -e . 
$ jupyter labextension develop . --overwriteWhen actively developing your extension for JupyterLab, run the command:$ jupyter labextension develop --overwrite cad_viewer_widgetThen you need to rebuild the JS when you make a code change:$ cd js
$ yarn run buildYou then need to refresh the JupyterLab page when your javascript changes.Build stephatchbuildChanges2023-08-14Adapt toocp-tessellateSupport version 1.8.6 ofthree-cad-viewerSupportsjupyterlab>=4,ipywidgets>=8andnotebook>7Dropped support fornotebook < 7.0Build process now uses pyproject.toml and hatch2023-01-03Added pyparsing as dependencyPinned traitlets to ~5.8Upgraded bottle example to occt 7.6.2
Package: cadwyn
CadwynProduction-ready community-driven modernStripe-likeAPI versioning in FastAPIWho is this for?Cadwyn allows you to support a single version of your code while auto-generating the schemas and routes for older versions. You keep API versioning encapsulated in small and independent "version change" modules while your business logic stays simple and knows nothing about versioning.Itsapproachwill be useful if you want to:Support many API versions for a long timeEffortlessly backport features and bugfixes to older API versionsWhether you are a newbie in API versioning, a pro looking for a sophisticated tool, an experimenter looking to build a similar framework, or even someone who just wants to learn about all approaches to API versioning -- Cadwyn has the functionality, theory, and documentation to cover all the mentioned use cases.Get startedThedocumentationhas everything you need to succeed.SponsorsThese are our gorgeous sponsors. They are using Cadwyn and are sponsoring it through various means. Contactmeif you would like to become one too!
Package: cae
Convolutional Autoencoder (CAE) in PythonAn implementation of a convolutional autoencoder in python and keras.Installationpip install caeUsagefrom cae import cae
import numpy as np

# create a fake dataset, here: 1000 random 224x224 RGB images
images = np.random.normal(size=(1000, 224, 224, 3))

latent_dim = 8 # desired latent dimensionality

model = cae(images.shape[1:], latent_dim) # there are a number of **kwargs
                                          # parameters that are likely
                                          # worth tuning!!!

# TRAIN THE NETWORK
model.fit(images)

# SAVE THE WEIGHTS FOR EASY RELOADING LATER WITH model.load_weights(path)
model.save_weights('PATH/TO/SAVE/')Final wordscae.pycontains the implementation, which is tested on the MNIST dataset inmnist_test.ipynb.In general, auto-encoders map an input x to a latent representation y (generally in a much smaller dimensional space), using deterministic functions of the type y = sigma(Wx+b). In order to encode images, it is useful to implement a convolutional architecture. Here, we utilize convolutional layers and max-pooling layers (which allow translation-invariant representations), followed by a flattening and dense layer to encode the images in a reduced-dimensional space. For decoding, you essentially need to perform the inverse operation. For more information on CAEs, consult e.g.http://people.idsia.ch/~ciresan/data/icann2011.pdf.