Saravanan666/pypi-org huggingface dataset:
Package: cucco
Is that… is that a cucco? Sure it is!Cucco is here to help you to normalize those nasty texts. Removing extra white spaces is not that hard, right? What about stop words? They’re no good… oh, and don’t even mention emojis!This little friend will do the hard work for you. Just set it up and let it peck all over your text.Oh please, shut up and show me where can I grab a cucco!The easiest way to get a cucco is by using pip:$ pip install cuccoBut sometimes… sometimes you want to go wild and get the biggest… No, the best!… No, THE MIGHTIEST cucco!To do so, you may use Git. Clone the repository from Github and do it all the hard way:$ git clone https://github.com/davidmogar/cucco.git
$ cd cucco
$ python setup.py installGot it. How do I use it?Now that you have a cucco, I’ll let it give you all the details.Cucuco, cuco cuco cucucuco, CUCCO!—CuccoSo true… so true…[tears falling down my face]. Just allow me to add some insight.There are two ways of using cucco. The first one is through its CLI. You can get more info on this by executing the next command:$ cucco --helpThe next example code shows how to normalize a short text using cucco inside your code:fromcuccoimportCuccocucco=Cucco()print(cucco.normalize('Who let the cucco out?'))This would apply all normalizations to the textWho let the cucco out?. The output for this normalizations would be the next one:cuccoIt’s also possible to send a list of normalizations to apply, which will be executed in order.fromcuccoimportCuccocucco=Cucco()normalizations=['remove_extra_white_spaces',('replace_punctuation',{'replacement':' '})]print(cucco.normalize('Who    let   the cucco out?',normalizations))This is the output:Who let the cucco outFor more information on how to use cucco you cancheck its website, which will be ready cucco-soon.Supported languagesYou never know when a cucco will learn a new trick. Currently, they can remove stop words for 50 languages. The complete list can bechecked here. If you are looking for the source you can find it in thisGitHub repositorywhich usesjsonfor the stop words files.Can I contribute?Are you a breeder? No? Don’t worry, you can still help.Maybe you have a good new feature to add. Maybe is not even good. It doesn’t matter! It is always good to share ideas, isn’t it? Just go for it! Pull requests are warmly welcomed.Not in the mood to implement it yourself? You can still create an issue and comment about it there. Feedback is always great!
Package: cuckooapi
cuckooapiClient for Cuckoo’s REST API.Installation$pipinstallcuckooapiUsage example>>>fromcuckooapiimportCuckooAPI>>>api=CuckooAPI('http://cuckoohost:8090')>>>response=api.cuckoo_status.get()>>>response.data{u'hostname':u'cuckoohost',u'machines':{u'available':18,u'total':18},u'tasks':{u'completed':76,u'pending':0,u'reported':48268,u'running':0,u'total':48636},u'version':u'1.0-dev'}>>>response.data['tasks']['pending']0>>>response.data['tasks']['running']0Endpoint Referencehttps://github.com/cuckoobox/cuckoo/blob/master/docs/book/src/usage/api.rstNews1.0.0Endpoint list synced with current Cuckoo stable version (1.1).0.0.1Initial release.
Package: cuckoofilter
cuckoofilterCuckoofilter is an implementation of Cuckoo Filter using Python, which is thread-safe.
Besides, the package can both be used in python2.x and python3.x.Cuckoo FilterCuckoo filter first appeared in the paperCuckoo Filter: Practically Better Than Bloom <https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf>_
by Bin Fan,David G. Andersen, Michael Kaminsky and Michael D. Mitzenmacher, which is used to
replace Bloom filters for approximate set membership tests. Cuckoo filters support
adding and removing items dynamically while achieving even higher performance than
Bloom filters. For applications that store many items and target moderately low
false positive rates, cuckoo filters have lower space overhead than space-optimized
Bloom filters.To know more details of Cuckoo Filter, please read the paper.InstallationInstall cuckoofilter:.. code-block::$ pip install cuckoopyOr.. code-block::$ pip3 install cuckoopyUsage.. code-block:: python>>> import cuckoofilter
>>> cf = cuckoofilter.CuckooFilter(capacity=100, fingerprint_size=1)

>>> cf.insert('test')
True

>>> cf.contains('test')
True

>>> cf.delete('test')
TrueTestingTo test the package and generate a test coverage report, you should run
.. code-block::$ pip install pytest coverage pytest-cov
$ pytest -v --cov=cuckoofilter --cov-report=htmlOr
.. code-block::$ pip3 install pytest coverage pytest-cov
$ python3 -m pytest .LicenseGPL-3.0 License <https://github.com/shenaishiren/cuckoofilter/blob/master/LICENSE>_
Package: cuckoo-filter
Cuckoo Filter: Practically Better Than BloomThis repository is an implementation ofCuckoo Filter: Practically Better Than Bloompaper introduced by Bin Fan, David G. Andersen, Michael Kaminsky, and Michael D. Mitzenmacher.InstallationYou can install the package by issuing the following command:pip3 install cuckoo-filterContributorsAli MoallimLicenseThis code is licensed underGNU GPL v3.
Package: cuckoomodifiedutils
# cuckoo-modified-utilsUseful scripts for [Brad Spengler's fork of Cuckoo](https://github.com/spender-sandbox/cuckoo-modified)## Requirements- [`requests`](https://pypi.python.org/pypi/requests/) - HTTP for humans- [`pyldfire`](https://pypi.python.org/pypi/pyldfire/) - A python module for the Wildfire API (required for`wildfire-to-cuckoo.py` only)- `cuckoo.py` - A basic module for interacting with the Cuckoo API (included in this repository)## Command line scriptsEach one of these scripts will submit one or more samples to a Cuckoo sandbox, and track the task as the sample isbeing analyzed. When submitting individual files, the scripts will notify you of any existing reports before submittinga new task.You'll need to edit each of these scripts to set the Cuckoo hostname, username, and password. There are also options for proxies and SSL certificate verification.usage: submit-to-cuckoo.py [-h] [-v] [--tags TAGS] [--options OPTIONS] [--tor][--procmemdump]sample [sample ...]Submits files or a URL to Cuckoopositional arguments:sample             One or more filenames or globs, or a single URLoptional arguments:-h, --help         show this help message and exit-v, --version      show program's version number and exit--tags TAGS        Comma separated tags for selecting an analysis VM--options OPTIONS  Comma separated option=value pairs--tor              Enable Tor during analysis--procmemdump      Dump and analyze process memory--------------------------------------------------------------------------------usage: tor-to-cuckoo.py [-h] [-v] [--tags TAGS] [--options OPTIONS] [--tor][--procmemdump] [--user-agent USER_AGENT]URLDownloads a file via Tor, through a privoxy chain, and sends it to Cuckoopositional arguments:URL                   URL of the sampleoptional arguments:-h, --help            show this help message and exit-v, --version         show program's version number and exit--tags TAGS           Comma separated tags for selecting an analysis VM--options OPTIONS     Comma separated option=value pairs--tor                 Enable Tor during analysis--procmemdump         Dump and analyze process memory--user-agent USER_AGENTThe user agent to spoof. Default: Mozilla/5.0(compatible; MSIE 10.0; Windows NT 6.1; Trident/4.0;InfoPath.2; .NET CLR 2.0.50727; WOW64)-----------------------------------------------------------------------------usage: wildfire-to-cuckoo.py [-h] [-v] [--tags TAGS] [--options OPTIONS][--tor] [--procmemdump]hash [filename]Downloads a sample from Palo Alto Network's Wildfire service and sends it toCuckoo. Requires pyldfire - https://github.com/seanthegeek/pyldfirepositional arguments:hash               A MD5, SHA1, or SHA256 hash of a samplefilename           The filename of the sampleoptional arguments:-h, --help         show this help message and exit-v, --version      show program's version number and exit--tags TAGS        Comma separated tags for selecting an analysis VM--options OPTIONS  Comma separated option=value pairs--tor              Enable Tor during analysis--procmemdump      Dump and analyze process memory
Package: cuckoopy
Cuckoo Filter, like Bloom Filter, is a probabilistic data structure for fast,
approximate set membership queries, with some small false positive probability.
While Bloom Filters are space efficient and are widely used, they do not
support deletion of items from the set without rebuilding the entire filter.
This can be overcome with several extensions to Bloom Filters such as
Counting Bloom Filters, but with significant space overhead.Cuckoo Filters support adding and removing items dynamically while achieving
higher performance than Bloom filters. A Cuckoo Filter is based on partial-key
cuckoo hashing that stores only fingerprint of each item inserted. Cuckoo
Filters provide higher lookup performance than Bloom Filters and uses less
space than Bloom Filters if the target false positive rate is < 3%.The original research paperCuckoo Filter: Practically Better Than Bloomby Bin Fan,
David G. Andersen, Michael Kaminsky and Michael D. Mitzenmacher
describes the data structure in more detail.InstallationMake sure you havePython(3.5+) installed on your system. If you don’t have
it, followthese instructionsto install it.Install cuckoopy using:$ pip install cuckoopyUsage>>>fromcuckoopyimportCuckooFilter# Initialize a cuckoo filter with 10000 buckets with bucket size 4 and fingerprint size of 1 byte>>>cf=CuckooFilter(capacity=10000,bucket_size=4,fingerprint_size=1)Insert an item into the filter:>>>cf.insert('Hello!')TrueLookup an item in the filter:>>>cf.contains('Hello!')True>>>'Hello!'incfTrueDelete an item from the filter:>>>cf.delete('Hello!')TrueGet the size (number of items present) of the filter:>>>cf.size4>>>len(cf)4Running tests locallyThis project usespytestfor tests. Make sure you
havetoxinstalled on your local machine and from the root directory of the
project, run:$ toxThis command runs unit tests in python 3.5 and python 3.6 environments with
code coverage details. It also runs pep8 (flake8) checks. To run tox against a
specific environment (py35, py36 or pep8), use the-eoption.LicenseMIT LicenseUseful LinksProbabilistic Filters By ExampleOriginal C++ implementation by the authors of the research paper
Package: cuclasses
Cuclasses介绍Cuclasses是我正在写的python库,内容是集合了一些常用的类和方法项目地址pypi(少有更新):https://pypi.org/project/cuclasses/github:https://github.com/HHHHhgqcdxhg/cuclasses模块cuclasses.DottableDict顾名思义,能用 "." 访问的dict.因为喜欢js访问对象属性的方式,可以用下标,也可以用点.cuclasses.singleton装饰器.被装饰的类为单例模式cuclasses.CallableDict可以调用的dict,调用时返回自身.cuclasses.StrKeyDict在查询时把非字符串键转换为字符串的dictcuclasses.headerCopy2Dict因为在复制chrome开发者工具network里请求的header时很不方便,就弄了这个...把chrome里的headers复制进去,会转换成字典headerStr="""Accept: application/json, text/plain, */*Accept-Encoding: gzip, deflate, brAccept-Language: zh-CN,zh;q=0.9Connection: keep-aliveCookie: l=v; buvid3=08DBF55E-086D-4BE2-9FCB-4B60BFA5F05A140254infocHost: message.bilibili.comOrigin: https://www.bilibili.comReferer: https://www.bilibili.com/video/av9912938/?p=11User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36"""a=headerCopy2Dict(headerStr)print(a)#>>> {'Accept': 'application/json, text/plain, */*', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'zh-CN,zh;q=0.9', 'Connection': 'keep-alive', 'Host': 'message.bilibili.com', 'Origin': 'https://www.bilibili.com', 'Referer': 'https://www.bilibili.com/video/av9912938/?p=11', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36'}cuclasses.timePrint上下文管理器.带时间戳的print.随时可指定时间格式withtimePrint()asprint:print(0)# >>> [2019-02-10 16:23:35] 0print(1,strf="[%Y-%m-%d%H:%M:%S]1")# >>> [2019-02-10 16:23:35]1 1withtimePrint("[%Y-%m-%d%H:%M:%S]2")asprint:print(2)# >>> [2019-02-10 16:23:35]2 2print(3,strf="[%Y-%m-%d%H:%M:%S]3")# >>> [2019-02-10 16:23:35]3 3print(4)# >>> 4cuclasses.timeCount装饰器.接受两个参数.
被装饰的函数将在执行后打印执行时间:param enable: 设为False则不计时,直接执行函数
:param method: 可选择的计时所用的获取时间的函数.默认time.perf_counter,或者也可以选填time.time,python3.7可以按需选用time.perf_counter_ns@timeCount()defbar():print({"a":"c"})bar()#>>> {'a': 'c'}#>>> func bar          excuted in : 6.044444444444444e-05cuclasses.Downloader下载器.:param directory:下载到的目录
:param urls:需要下载的资源目录
:param threads:并行下载的线程数
:param headers:请求头,默认为{"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36"}withopen("xx.json","r")asf:data=json.load(f)d=Downloader(directory=r"E:\ACG\comic\general\どうして私が美術科に",urls=data)d.downloadAll()
Package: cuco
CuCoCuCo (CuteConfiguration) is a project for making it easier to write configuration files which may be automatically converted into a set of alternative system setups.InstallationTo install the package, execute the following command:pipinstallcucoUsageTo use the package, first, annotate some of your classes with annotatorconfig_parseraccording to the following example:fromdataclassesimportdataclassfromcucoimportconfig_parser,Config@config_parser()@dataclassclassFoo(Config):bar:int=0baz:str=Nonename:str=None# This field contains configuration name, which includes values for alternating configuration fields in a particular setupThen you would need to create a file with nameassets/types/foo.ymlfor this class with specification of keys which are allowed to set up in this file (the following example demonstrates that fieldquxfrom configuration file will be translated into the fieldbarof the generated objects):qux:barAfter that you finally can create a file with nameassets/foo/default.ymlwith some value for the configurable fields (the given example demonstrates array consisting of 2 values, which will lead to generation of 2 config objects):_type:fooqux:-1-2The last step is calling methodmake_configswhich will read all the configuration files and decide how they should be parsed, returning the list of generated configuration objects:from.FooimportFooconfigs=make_configs(path='assets/foo/default.yml',type_specification_root='assets/types')TestingTo run the tests, execute the following command:python-munittestdiscovertest
Package: cucumber-expressions
Cucumber Expressions for PythonThe main docs are here.Build systemThis project usesPoetryas its build system.
In order to develop on this project, please install Poetry as per your system's instructions on the link above.TestsThe test suite usespytestas its testing Framework.Preparing to run the testsIn order to set up your dev environment, run the following command from this project's directory:poetryinstallIt will install all package and development requirements, and once that is done it will do a dev-install of the source code.You only need to run it once, code changes will propagate directly and do not require running the install again.Running the testspytestautomatically picks up files in the current directory or any subdirectories that have the prefix or suffix oftest_*.py.
Test function names must start withtest*.
Test class names must start withTest*.To run all tests:poetryrunpytest
Package: cucumber-json-to-junit-xml
Cucumber JSON to JUnit XMLQuick python script to convert a Cucumber JSON report into JUnit XML format.
For use when using a parallelization plugin that can assemble a JSON report but not XML.
This will overwrite the target report if it already exists.Note that the overall duration will be incorrect for parallel execution, as it is the sum of the scenario durations.Usage:pip install cucumber-json-to-junit-xmljson_to_junit source-report.json target-report.xml
Package: cucumber-tag-expressions
Cucumber tag-expressions for Python.Cucumber tag-expressions provide readable boolean expressions
to select features and scenarios marked with tags in Gherkin files
in an easy way:# -- SIMPLE TAG-EXPRESSION EXAMPLES:
@a and @b
@a or  @b
not @a

# -- MORE TAG-EXPRESSION EXAMPLES:
@a and not @b
(@a or @b) and not @cSEE ALSO:https://cucumber.io/docs/cucumber/api/#tag-expressionsEXAMPLE:A cucumber test runner selects some scenarios by using tag-expressions and runs them:# -- TAG-EXPRESSION: @one and @two
# EXPECTED: Selects and runs scenario "Three".$my_cucumber_test_runner--tags="@one and @two"features/example.feature...# -- TAG-EXPRESSION: @one or @two
# EXPECTED: Selects and runs scenarios "One", "Two" and "Three".$my_cucumber_test_runner--tags="@one or @two"features/example.feature...by using the following feature file:# -- FILE: features/example.featureFeature:Tag-Expressions Example

  @oneScenario:OneGivena step passes@twoScenario:TwoGivenanother step passes@one@twoScenario:ThreeGivensome step passesScenario:FourGivenanother step passes
Package: cucutags
cucutags provides a simple generator of ctags-like tags file for
the combination ofGherkin language featuresand Pythonsteps.Unfortunately, no text editor known to me is able to use so generated
tags file. However, this script can be also used by any other Python
script as a library, and thus for examplevimcan use it viavim-behaveplugin orgeditvia thegedit_behaveone.All bug reports and enhancement requests, please, send to the
email listed in the script file.
Package: cuda4py
cuda4py=========Python cffi CUDA bindings and helper classes.Tested with Python 2.7, Python 3.6 and PyPy on Linux with CUDA 8.0.To compile kernel code written in C++, nvcc should be in PATH andexported functions should be marked as extern "C"(for Windows, cl.exe should be in PATH also).Functions in plain PTX can be used without nvcc.To use CUBLAS, libcublas.so (cublas64_65.dll) should be present.To use CUDNN, libcudnn.so (cudnn64_65.dll) should be present.To use CUFFT, libcufft.so (cufft64_65.dll) should be present.To use CURAND, libcurand.so (curand64_65.dll) should be present.Not all CUDA api is currently covered.To install the module run:```bashpython setup.py install```or just copy src/cuda4py to any place where pythoninterpreter will be able to find it.To run the tests, execute:for Python 2.7:```bashPYTHONPATH=src nosetests -w tests```for Python 3.4:```bashPYTHONPATH=src nosetests3 -w tests```for PyPy:```bashPYTHONPATH=src pypy -m nose -w tests```Example usage:```pythonimport cuda4py as cuimport loggingimport numpyif __name__ == "__main__":logging.basicConfig(level=logging.DEBUG)ctx = cu.Devices().create_some_context()module = cu.Module(ctx, source="""extern "C"__global__ void test(const float *a, const float *b,float *c, const float k) {size_t i = blockDim.x * blockIdx.x + threadIdx.x;c[i] = (a[i] + b[i]) * k;}""")test = cu.Function(module, "test")a = numpy.arange(1000000, dtype=numpy.float32)b = numpy.arange(1000000, dtype=numpy.float32)c = numpy.empty(1000000, dtype=numpy.float32)k = numpy.array([0.5], dtype=numpy.float32)a_buf = cu.MemAlloc(ctx, a)b_buf = cu.MemAlloc(ctx, b)c_buf = cu.MemAlloc(ctx, c)test.set_args(a_buf, b_buf, c_buf, k)test((a.size, 1, 1))c_buf.to_host(c)max_diff = numpy.fabs(c - (a + b) * k[0]).max()logging.info("max_diff = %.6f", max_diff)```Released under Simplified BSD License.Copyright (c) 2014, Samsung Electronics Co.,Ltd.
Package: cuda-available
cuda_availableA package for checking available CUDA device informationWARNING: The last field of version is related to cuda version0.1.117 is using CUDA 11.7 COMPILER to build0.1.118 is using CUDA 11.8 COMPLIER to buildUsageGet count of cuda devicefromcuda_avaliableimportcuda_avaliablecnt=cuda_avaliable.getCudaDeviceCount()print(f"Cuda device count:{cnt}")Get infomation of cuda devicefromcuda_avaliableimportcuda_avaliablecnt=cuda_avaliable.getCudaDeviceCount()foridxinrange(cnt):info=cuda_avaliable.CudaDeviceInfo(idx)print(f"ID:{info.id}")print(f"Name:{info.name}")print(f"ComputeCapability:{info.computeCapability}")print(f"TotalGlobalVmem:{info.totalGlobalVmem}")print(f"PciId:{info.pciId}")print(f"UsingTccDriver:{info.isTccDriver}")print("===================================")
Package: cudacanvas
cudacanvasCudaCanvas: Real-time PyTorch Tensor Visualisation in CUDA, Eliminating CPU TransferCudaCanvas is a simple Python module that eliminates CPU transfer for Pytorch tensors for displaying and rendering images in the training or evaluation phase, ideal for machine learning scientists and engineers.importtorchimportcudacanvasnoise_image=torch.rand((4,500,500),device="cuda")cudacanvas.set_image(noise_image)cudacanvas.create_window()#replace this with you training loopwhile(True):cudacanvas.render()ifcudacanvas.should_close():#end process if the window is closedbreakInstallationBefore instllation make sure you have torch with cuda support already installed on your machineIdentify your current torch and cuda version, cudacanvas currently only supports torch 2.1.2 and cuda (11.8 or 12.1)importtorchtorch.__version__CUDA 12.1If you are running torch 2.1.2 with Cuda 12.1 (2.1.2+cu121) you can download it straight from pypi by runningpip install cudacanvasCUDA 11.8If you are running torch 2.1.2 with Cuda 11.8 (2.1.2+cu118) you can run this scriptpip install cudacanvas --find-links https://github.com/OutofAi/cudacanvas/wiki/cu118or manaully download the latest wheel releases fromhttps://github.com/OutofAi/cudacanvas/releases/SupportAlso support my channel ☕ ☕ :https://www.buymeacoffee.com/outofai
Package: cuda-friendly-vincenty
VincentyCalculate the geographical distance (in kilometers or miles) between 2 points
with extreme accuracy.This library implements Vincenty’s solution to the inverse geodetic problem. It
is based on the WGS 84 reference ellipsoid and is accurate to within 1 mm (!) or
better.This formula is widely used in geographic information systems (GIS) and is much
more accurate than methods for computing the great-circle distance (which assume
a spherical Earth).CUDA-friendlyThis repo is modification ofvincentypackage. Since CUDA has some limitations (it doesn’t understand try…except,
for example) original code can’t run on GPU.Example: distance between Boston and New York City>>>fromcuda_friendly_vincentyimportvincenty>>>boston=(-71.0693514,42.3541165)>>>newyork=(-73.9680804,40.7791472)>>>vincenty(*boston,*newyork)298396.06Installation$pipinstallcuda-friendly-vincentyReferenceshttps://en.wikipedia.org/wiki/Vincenty’s_formulaehttps://en.wikipedia.org/wiki/World_Geodetic_System
Package: cuda-guass-normal
Python package use cuda to normalize input variables using cuda package in ATLAS analysisFunction use to do Guassian Normalization:
Mean:
$$\mu_{i}=\frac{\sum x_{i}\times w_{i}}{\sum w_{i}}$$
Variance:
$$\sigma_{i}=\frac{\sum (x_{i}-\mu_{i})^{2}\times w_{i}}{\frac{N-1}{N}\times\sum w_{i}}$$
Normalized input feature:
$$\bar{x_{i}}=\frac{x_{i}-\mu_{i}}{\sigma_{i}}$$Main function: guass_normal((1),(2),(3))Input:(1):Numpy array contain all input features you want to normalize.
(2):Numpy array used to calculate each feature's mean and variance.
(3):1-d Numpy array contains each events weight in (2)(1) and (2) must have the same number of columns.cuda_cut((1),(2),(3)): Used to calculate event yield after applying DNN cut.Input:
(1): 1-d numpy array include the variable  you want to cut.
(2): 1-d numpy array include event weight.
(3): cut threshold