Saravanan666/pypi-org huggingface dataset:
Package: curvenote
curvenoteThe Curvenote helper library for working in Jupyter Notebooks with Python kernels## Installation~$python-mpipinstallcurvenoteSummarystashsave a dict or pandas dataframe in a cell output without diaplying the datafromcurvenoteimportstashstash('myvars',myvars)AppStatea traitlet based class to help manage state in ipywidgets ui'sfromcurvenoteimportAppState,with_statestate=AppState()# register a widget in statewave_1_amp=FloatSlider(1.0,min=0.1,max=5.0,step=0.1,description="1 - Amp")state.register_stateful_widget(wave_1_amp,"wave_1_amp",Float(1.0))# register any trailet as a properystate.register_stateful_property("my_dict",Dict(dict(A="hello",B="world",C=1)))# observe the entire statedefmy_update_fn(state):some_calc_function(state.wave_1_amp,state.my_dict)state.observe(with_state(my_update_fn))# observe a single registered widgetdefwave_1_observer(evt):passstate.register_widget_observer("wave_1_amp",wave_1_observer)# observe a single traitdeftrait_observer(evt):passstate.register_widget_observer("my_dict",trait_observer)# display state changes for debuggingfromIPython.displayimportdisplaydisplay(state.outlet)
Package: curvepipe
CurvePipe is designed to efficiently manipulate sets of curves without using Dataframes or Arrays.You can transform curves in a Java stream-like syntax.The following commandscales and adds an offset to the x-values of the curvecomputes the logarithm for each y-valuecpipe=CurvePipe(x=[0,0.1,0.2,0.3,0.4],y=[1,2,3,3,4])\.scale_x(2)\.offset_x(20.1)\.transform_y(lambdav:math.log(v))The result is a CurvePipe-Object containing the transformed curve. You can acces the x- and y- values via the attributes x and y.
Package: curvepy
curvepyA mathematical and financial function curve utility library for Python.InstallationWithpoetry:poetryaddcurvepyOr with pip:pip3 install curvepyUsageHave a look at thedocumentation.Basic usage:# Create a linefromcurvepyimportLineline=Line(const=1,slope=2)assertline.y(0)==1assertline.y(1)==3# Function arithmeticline2=Line(const=-1,slope=-2)line_sum=line1+line2assertline_sum.y(0)==0assertline_sum.y(1)==0JSON FormatFunction values:Functions are denoted by$, for example,$add. Available functions:$add: Adds values. Example:{ "$add": [1, 2] }, which results in1 + 2.$line: Adds values. Example:{ "$line": { "points": [[1, 2], [2, 3]] } }which results in a line joining the points(1, 2)and(2, 3).For other functions, refer toCurvedocumentation.Decorators modify applicable values and functions inside of them as well as deeply nested values. Available decorators:@date: Converts all string values to seconds from Unix epoch. If no GMT offset is given, uses the local time zone at the time of parsing.@log: Converts all number literals to log space. On exit from the decorator, the result is raised bacj by the base into linear space. Available varaints:@log2,@log10.@args: Allows using both named and unamed arguments in a function. For example:{ '$raised': { '@args': [4], 'base': 2 } }, which will result inpow(2, 4).A full example:The following price will be in the form of a line (on a log chart) joining the prices10080.2and8975.0on dates8 May 2020 11:01 amand13 May 2020 5 amrespectively.{"price":{"@log":{"$line":{"points":[[{"@date":"2020-05-08 11:01"},10080.2],[{"@date":"2020-05-13 05:00"},8975.0]]}}}}DevelopmentSetupClone repository and run:poetryinstallRunning Unit TestspoetryruntestUpdating DocumentationThe modulepdoc3is used to automatically generate documentation. To update the documentation:Installpdoc3if needed withpip3 install pdoc3.Navigate to project root and install dependencies:poetry install.Generate documetation files with:pdoc3 -o docs --html curvepy.The new files will be indocs/curvepy. Move them todocs/and replace existing files.If you get errors about missing modules, make sure you have activated the python enviroment (in .venv) and that there are no python version mismatches. If so, usepoetry env use <python version>; poetry installto fix.
Package: curver
Curver is a program for performing calculations in the curve complex.
It implements the Bell–Webb algorithm to determine the Nielsen–Thurston type of a mapping class.
This algorithm runs in polynomial time but the constants involved currently make this implementation impractical.Curver officially supports Python 3.6 – 3.8.
Unoffically, it also runs onPyPyandSagewith some care.QuickstartCurver is available onPyPI, so it can be installed via:$ pip install curver --user --upgradeOnce installed, try it inside of Python:>>> import curver
>>> S = curver.load(0, 5)
>>> S('s_0.s_1.s_0') == S('s_1.s_0.s_1')
True
>>> f = S('s_0.s_1.s_2.s_3')
>>> g = S('s_0.s_1.s_3.s_2')
>>> h = S('s_0.s_1.S_2.S_3')
>>> f.order(), g.order(), h.order()
(5, 5, 5)
>>> f.is_conjugate_to(g)
True
>>> f.is_conjugate_to(g)
FalseFeaturesSolves the word problem for mapping class groups.Performs Nielsen–Thurston classification of mapping classes.Solves the conjugacy problem for periodic mapping classes.Computes the asymptotic translation length of mapping classes on the curve complex.Computes geodesics in the curve complex.Computes quotient orbifolds and their quotient maps.Computes the action of mapping classes on H_1.Determines the topological type of multicurves.External LinksPyPIReadTheDocsGitHubTravisAppVeyorAzure
Package: curvereduce
curvereduceThis is an implementation of theRamer-Douglas-Peucker curve simplification algorithmin Python.UsageInstall from the PyPi package repository usingpip install curvereduce.fromcurvereduceimportsimplify_curve,simplify_curve_topoints=[(1.20401E-09,-0.00120428),(0.018,0.241799),(0.1044,1.34392),...]# use an explicit epsilon valuesimplified_1=simplify_curve(points,0.1075)# or specify a number of points you want to end up withsimplified_2=simplify_curve_to(points,20)LicenseThis work is licensed under theMIT License.CreditsThis RDP algorithm implementation is heavily influenced byMarius Karthaus's JavaScript implementation.
Package: curviriver
CurviRiver: Curvilinear Mesh Generator for RiversFeaturesCurviRiver takes as input a Polygon of a river segment and generates a 2D or 3D
curvilinear mesh that can be used for hydrodynamic or hydrological modeling.
The mesh is generated in three main steps:Determining the centerline of the input Polygon using Voroni diagram
Dijkstra’s algorithm,Smoothing the generated centerline with a B-spline curve,Computing the tangent angles of the centerline at each point along
the centerline and generating cross-sections perpendicular to the
centerline at given intervals,Generating a 2D mesh from vertices of the cross-sections,Generating a 3D mesh if depth data is provided, by determining the depth of
2D mesh vertices from the depth data using Inverse Distance Weighting (IDW).InstallationYou can install CurviRiver usingpip:$pipinstallcurviriveror usingconda(mamba):$condainstall-cconda-forgecurviriverQuick startWe demonstrate capabilities of CurviRiver by generating a
curvilinear mesh along a portion of the Columbia River and
interpolatingeHydrotopobathy data on to the generated mesh vertices. Please visit theexample galleryfor more examples.First, we usePyGeoHydroto retrieve eHydro data for a part of the Columbia River that topobathy data are
available. We get both the survey outline and the bathymetry data.
Then, we use the survey outline polygon to generate a curvilinear mesh.
We use thepoly_segmentizefunction for this purpose that has two
parameters: Spacing in streamwise direction and number of points in
cross-stream direction. The function returns ageopandas.GeoSeriesof the cross-sections, vertices of which are the mesh points.frompygeohydroimportEHydroimportcurviriverascrehydro=EHydro("outlines")geom=ehydro.survey_grid.loc[ehydro.survey_grid["OBJECTID"]==210,"geometry"].iloc[0]outline=ehydro.bygeom(geom,ehydro.survey_grid.crs)poly=outline.convex_hull.unary_unionspacing_streamwise=2000xs_npts=5stream=cr.poly_segmentize(poly,outline.crs,spacing_streamwise,xs_npts)ContributingContributions are very welcomed. Please readCONTRIBUTING.rstfile for instructions.SupportThe work for this project is funded by USGS through Water Resources Research Institutes
(WRRI).
Package: curvit
CurvitCreate light curves from UVIT data.Curvit documention is athttps://curvit.readthedocs.ioCurvit is an open-source python package to generate light curves from UVIT (Ultraviolet Imaging Telescope) data.The software paper manuscript is accessible athttps://arxiv.org/abs/2101.06377InstallationCurvit is on the Python Package Index (PyPI) and you can install the package usingpipas follows:pipinstallcurvit--userReport bugs and contributeIf you come across any bugs or mistakes, please report them on the GitHub issue tracker. If you have a solution or a new feature in mind, we welcome you to submit a pull request! Your contributions are greatly appreciated in making Curvit even better.
Package: curvlinops-for-pytorch
scipy linear operators of deep learning matrices in PyTorchThis library implementsscipy.sparse.linalg.LinearOperators
for deep learning matrices, such asthe Hessianthe Fisher/generalized Gauss-Newton (GGN)the Monte-Carlo approximated Fisherthe Fisher/GGN's KFAC approximation (Kronecker-Factored Approximate Curvature)the uncentered gradient covariance (aka empirical Fisher)the output-parameter Jacobian of a neural net and its transposeMatrix-vector products are carried out in PyTorch, i.e. potentially on a GPU.
The library supports defining these matrices not only on a mini-batch, but
on data sets (looping over batches during amatvecoperation).You can plug these linear operators intoscipy, while carrying out the heavy
lifting (matrix-vector multiplies) in PyTorch on GPU. My favorite example for
such a routine isscipy.sparse.linalg.eigshthat lets you compute a subset of eigen-pairs.The library also provides linear operator transformations, like taking the
inverse (inverse matrix-vector product via conjugate gradients) or slicing out
sub-matrices.Finally, it offers functionality to probe properties of the represented
matrices, like their spectral density, trace, or diagonal.Documentation:https://curvlinops.readthedocs.io/en/latest/Bug reports & feature requests:https://github.com/f-dangel/curvlinops/issuesInstallationpipinstallcurvlinops-for-pytorchExamplesBasic
usageAdvanced
examplesFuture ideasOther features that could be supported in the future include:Other matricesthe centered gradient covarianceterms of thehierarchical GGN
decompositionLogo mage creditsSciPy logo: Unknown,CC BY-SA
4.0, via Wikimedia CommonsPyTorch logo:https://github.com/soumith,CC BY-SA
4.0, via Wikimedia Commons
Package: curv-logger
curv-loggerLogger with timing added & some helpful usage added likewithInstalling packagepipinstallcurv-loggerInstalling for local developmentgitclonehttps://github.com/rep-ai/curv-logger.gitcdcurv-logger
pipinstall-rrequirements.txt
pipinstall-e.Basic Usagefromcurv_loggerimportLoggerfromtimeimportsleeplogger=Logger(name="my-logger",level=Logger.level.WARNING)withlogger(sleep):sleep(0.01)withlogger("sleep for 0.1s"):sleep(0.1)withlogger("sleep for 1s"):sleep(1)Updating packagebashdeploy.sh
Package: cusbase64
Customize the indexing string of base64 encoding.You can set you own indexing string using theconfig()method.Usage:importcusbase64b=cusbase64.CusBase64()b.encode('binary\x00string')# Output: YmluYXJ5AHN0cmluZw==b.decode('YmluYXJ5AHN0cmluZw==')# Output: binary\x00stringb.config('aABCDEFGHIJKLMNOPQRSTUVWXYZbcdefghijklmnopqrstuvwxyz0123456789+/')b.decode('c2UsYi1kYWM0cnUjdFlvbiAjb21wbFU0YP==')# Output: self-destruction complete
Package: cusfbamboo
BAMBOOCambridge University SpaceflightBamboo is a Python tool that provides functions and classes for modelling the cooling systems of liquid rocket engines. Alongside this, it contains a range of other miscellaneous tools to aid with general engine design.An introduction to the package can be found in the'Introduction to Bamboo.ipynb'Jupyter Notebook. Additional examples can be found in the'examples'folder.InstallationBamboo can be installed via pip, with the following command:pip install cusfbambooDocumentationMade using Sphinx, available at:https://cuspaceflight.github.io/bamboo/ValidationAll validation cases are available as Jupyter notebook, with hyperlinks below. Positive signs on the errors represent an overprediction (i.e. excess heat transfer rate, excess pressure drop, or excess temperature rise).All validation cases were performed with the Gnielinski equation for coolant-side convection, the Bartz (sigma) equation for exhaust-side convection, and smooth walls were assumed for the pressure drop.It can be seen that overall, Bamboo tends to overpredict temperatures and pressure drops, and so wouldusuallyresult in a conservative design if used to design an engine.A key effect that needs to be investigated is nucleate boiling, and how significantly that affects the results. Test cases that use a supercritical coolant will not be susceptible to nucleate boiling, and so are better modelled by Bamboo (which currently ignores two-phase effects).EngineCoolant StatePeak Heat Flux ErrorCoolant Temperature Rise ErrorCoolant Pressure Drop ErrorVulcain ChamberSupercritical+40.3%+17.9%+56.1%Vulcain Nozzle ExtensionSupercritical-+2.75%+33.4%Pavli 1966Gaseous+22.4%+34.2%-Release 0.2.1Added additional validation cases.Coolant flow solver can now accommodate compressible coolants automatically.Removed fin heat transfer for now, as it was producing spurious results.Corrected mistakes with spiralling channel geometry.Swapped to using the recovery temperature instead of static temperature for the exhaust gas temperature in thermal circuits.Useful PackagesThese packages are not installed with Bamboo by default, but can be very useful for creating accurate simulations.CoolPropCoolPropcan be used to get the thermophysical properties of huge range of fluids. It is useful for setting up the transport properties of coolants in Bamboo.CanteraCanteracan be used to perform equilibrium calculations and to get the thermophysical properties of ideal gases. It is useful for setting up the transport properties of the exhaust gases in Bamboo. It can also be used to calculate combustion chamber temperatures, although with the default data sets it can only do this for a limited range of fuel/oxidiser combinations.pypropeppypropepcan be used to calculate combustion chamber temperature and exhaust gas properties (however it cannot calculate calculate some transport properties, such as viscosity and thermal conductivity). Note that when using pypropep, the best results have been observed when you use the gas properties at the throat as your inputs into Bamboo's perfect gas model.
Package: cushead
CUSHEADGenerates a basic website template with a focus onSEOandUX.DescriptionThis is a small script that allows you to generate a basic template of a website through a configuration file.In this file, you can define different variables that will produce a different template in each case.View live exampleView example of generated filesInstallationpip install cusheadRequired python version >= 3.8Usageusage: cushead { --help | { --config | --default [ --images ] } FILE }

excluding arguments:
  -h, --help     Show this help message and exit.
  -c, --config   Read a config file and create the website template based on it.
  -d, --default  Generate a default config. Can be used with --images.

optional arguments:
  -i, --images   Use with --default. Generate default images that can be used by the default config file.
                 This include: favicon_ico_16px.ico, favicon_png_2688px.png, favicon_svg_scalable.svg and preview_png_600px.png

positional arguments:
  FILE           Input or output file used by the --config or --default arguments.
                 For --config it must be a path to a config file in JSON format.
                 For --default it must be the destination path where to want to create the default config.
                 If the --images argument is set, the images would be created in the directory of that file.

Examples:
1) Generate default config file with images:
  cushead --default --images config.json
2) Run that config:
  cushead --config config.jsonRecomendationWeb development is an area that is very evolved today. It has grown a lot over the years and, like everything that proliferates, it has become more complex.
This little package only solves a small part of all the problems that exist in the field of web development. If you want to take a closer look, here is an interactive website that shows a lot of things to consider when working in this area:andreasbm/web-skillsMy advice is don't get stuck with so much information, the sites will work anyway. Only if the expense is justified, it is always good to face all these things with a team and try to use already created tools that are kept up to date.Licensecushead © 2019 Lucas Vazquez. Released under theMITLicense.
Package: cushion
Cushion: a simple CouchDB Document API wrapperThis is a Python wrapper for the CouchDB Document API (http://wiki.apache.org/couchdb/HTTP_Document_API).It was created primarily as an exercise to learn CouchDB's document API.The library attempts to expose a very simple interface that closely resembles REST.For example,from cushion import apic = api.Cushion("http://localhost:5984/albums",username='abc',password='xyz')c.get(id='1b0c7bb19b1bbacf7f567bf379000d9c')returns the following JSON object:{'Band': 'The Postal Service','_rev':'1-f319aeef4dbb8c232f0257cf2a9ae64b','_id': '1b0c7bb19b1bbacf7f567bf379000d9c','Name': 'Give Up'}alternatively, the database can be specified at runtime,c = api.Cushion("http://localhost:5984",username='abc',password='xyz',timeout=5)c.get.albums(id='1b0c7bb19b1bbacf7f567bf379000d9c')which also returns:{'Band': 'The Postal Service','_rev':'1-f319aeef4dbb8c232f0257cf2a9ae64b','_id': '1b0c7bb19b1bbacf7f567bf379000d9c','Name': 'Give Up'}to create a document with a document id:c.put.albums(id='c3ea09f0-9758-480c-aa25-0f71a9caa446', Name='Transatlanticism', Band='Death Cab For Cutie')alternatively, to create a document without supplying the document id:c.post.albums(Name='In Ghost Colors', Band='Cut Copy')
Package: cushy-serial
cushy-serial一个轻量级的Python Serial框架简介cushy-serial是一个轻量级的Serial框架，初衷是希望使Serial编程变得更加简单、快捷，因此，相较于传统的pyserial，该框架可以更加快速地构建起一个serial程序。主要特性兼容pyserial的所有特性自定义serial消息异步回调，无需花费精力在多线程上方便实现和管理多个serial连接可自定义消息协议，兼容性强快速上手pipinstallcushy-serial--upgrade下面是一个简单的serial程序，当python客户端接收到来自串口的信息时会自动回调fromcushy_serialimportCushySerialserial=CushySerial("COM1",9600)serial.send("I am python client")@serial.on_message()defhandle_serial_message(msg:bytes):str_msg=msg.decode("utf-8")print(f"[serial] rec msg:{str_msg}")需要说明的是，CushySerial兼容了Serial中所有的功能，因此，你可以在CushySerial中使用Serial的所有功能。运行结果如下如果你想要执行定时任务，CushySerial也提供了相关的解决方案，你可以方便的轮询发送指令，并获取来自串口的信息，示例如下：fromcushy_serialimportCushySerial,enable_logenable_log()serial=CushySerial("COM1",9600)instruction=bytes([0x01,0x06,0x00,0x7F,0x00,0x01,0x79,0xD2])# msg为你要轮询发送的指令，interval为轮询的时间间隔，times为执行次数，可不填写@serial.polling_task(msg=instruction,interval=0.5,times=5)defhandle_rec_msg(rec_msg):print(f"[serial] rec polling message:{rec_msg}")待办提供polling_task的函数回调版本提供bytes包解析功能，减少在包解析上所花费的工作提供相关持久化解决方案提供数据流监控，提高数据稳定性提供更加细力度的数据包调控，降低丢包率提供串口定时任务调度完善单元测试贡献如果你想为这个项目做贡献，你可以提交pr或issue。我很高兴看到更多的人参与并优化它。
Package: cushy-socket
cushy-socketA lightweight python socket library. You can create a TCP/UDP connection easily.Featuressend socket message easilylisten socket message and support ballbacksupport sending group messages to clientssupport decorator version listeninglisten topic message and callbackUsagepipinstallcushy-socket--upgradeHere are some minimal example programs using thecushy-socket: a server that echoes all data that it receives back(servicing only one client), and a client using it.Now let's build a easy echo demo.The first example support IPv4 only.# echo tcp server programimportsocketfromcushy_socket.tcpimportCushyTCPServercushy_tcp_server=CushyTCPServer(host='localhost',port=7777)cushy_tcp_server.run()@cushy_tcp_server.on_connected()defhandle_on_connected(sock:socket.socket):print(f"[server decorator callback] new client connected.")print(sock)@cushy_tcp_server.on_disconnected()defhandle_on_disconnected(sock:socket.socket):print(f"[server decorator callback] a client disconnected.")print(sock)@cushy_tcp_server.on_message()defhandle_msg_from_client(msg:str,socket:socket.socket):print(f"[server decorator callback] cushy_tcp_server rec msg:{msg}")cushy_tcp_server.send("hello, I am server")# echo tcp client programfromcushy_socket.tcpimportCushyTCPClientcushy_tcp_client=CushyTCPClient(host='localhost',port=7777)cushy_tcp_client.run()@cushy_tcp_client.on_connected()defhandle_on_connected():print(f"[client decorator callback] connect to server.")@cushy_tcp_client.on_disconnected()defhandle_on_disconnected():print(f"[client decorator callback] server disconnected.")@cushy_tcp_client.on_message()defhandle_msg_from_server(msg:str):print(f"[client decorator callback] cushy_tcp_client rec msg:{msg}")cushy_tcp_client.send("hello, here is CSTCP client")cushy_tcp_client.close()TODOsupport for more lifecycle callbacksoptimize the handle of socket closingoptimize syntax expressionsadd UDP server/client supportprovide more solutionsprovide more async supportsprovide more decorator supportoptimize unittestsend and listen topic messageContributionIf you want to contribute to this project, you can submit pr or issue. I am glad to see more people involved and optimize it.
Package: cushy-storage
cushy-storageAn ORM framework based on disk cachingEnglish中文Introductioncushy-storage is an ORM framework based on disk caching that allows you to easily perform CRUD operations on your custom data through ORM. On the other hand, cushy-storage saves you the effort of devising a data storage standard. Dictionary-like operations can reduce a lot of development costs. If you have a need for local file data operations, this framework can facilitate local data storage with ease.FeaturesSupports ORM storage, basic data storage, and custom data storage, compatible with all data typesSupports ORM framework-level object operations, enabling easy CRUD operations on object-level dataBasic data storage operations are as simple as dict read and write, very convenientEasily perform local disk storage of data (basic data types, custom data types)Eliminates the need for direct file handlingProvides multiple serialization optionsOffers various data compression methodsQuick StartOfficial documentation on github-pagesCurrent development planContribution/Developer's manualFrequently Asked Questionspypi repositoryInstallationpipinstallcushy-storage-UGetting StartedThe use ofcushy-storageis mainly divided into four parts:CushyOrmCache,CushyDict,BaseDict,disk_cache. For more detailed information, please read the relevant documentation.CushyORMCacheObject storage based on the ORM framework, which allows for very convenient CRUD operations on object-level data.CushyDict: An enhanced version ofBaseDict, storing various types of data, including basic data types and custom data types.BaseDict: Stores basic binary data.disk_cache: Function data caching.ContributionIf you want to contribute to this project, you can submit a PR or issue. I am happy to see more people get involved and improve it.
Package: cusingler
cuSingleR基于python版本SingleR软件,使用cuda加速.编译whl系统环境需要安装 cuda-toolkit 11.4 / gcc<11exportPATH=/usr/local/cuda/bin:$PATHexportLD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATHpythonsetup.pysdistbdist_wheel编译后的whl存放在dist目录运行pythontest/test_basic.pydata/GSE84133_GSM2230761_mouse1.h5addata/GSE84133_GSM2230762_mouse2.h5addata/result.tsv参数解释:第一个参数表示reference的数据,格式为h5ad第二个参数表示query的数据,格式为h5ad第三个参数为输出文件,按tab分割的三列数据,分别表示cell/firstLabel/finalLabel详情见脚本test/test_basic.py注意: 由于h5ad格式可能存在不同字段,如果脚本报错需要修改正确的字段以保证程序能获取到数据输入文件要求ref/qry输入文件均需有/X/data /X/indices /X/indptr 存储矩阵数据; 有/var/_index 存储基因名ref需有 /obs/ClusterName/codes /obs/ClusterName/categories 或/obs/celltype/codes /obs/celltype/categories 存储分类结果qry需有 /obs/_index 存储细胞名程序不会对h5ad数据做log2处理,如有此需要请客户自行对数据做预处理如遇ref和qry的gene不完全一致,程序会自动取基因的交集参与计算,如果没有一个相同基因,则程序报错退出