Saravanan666/pypi-org huggingface dataset:
Package: pycubes
pyCubesDocumentation|Examples|Protocol SpecificationpyCubes is a library for creating servers and clients for Minecraft Java Edition (1.14+).❗ 0.x versions are not stable. The library API is subject to change.InstallationpipinstallpyCubesFeaturesSerializers forData types(missing Chat, use String instead)ConnectionLow level serverNBT module (wrapper over thenbtlib)generate_uuidutility (generates UUID by player_name for using in offline mode)AnyIOsupport (an asynchronous networking and concurrency library)TODOSerializer for all packets Data typesPackets descriptorImplement compressionHigh level server application with event driven APIHigh level client application with event driven APIHigh level proxy application with event driven APIChat API (chat messages constructor)Commands APIAdd API Reference to docs
Package: pycuda
PyCUDA lets you accessNvidia’sCUDAparallel computation API from Python.
Several wrappers of the CUDA API already exist-so what’s so special
about PyCUDA?Object cleanup tied to lifetime of objects. This idiom, often
calledRAIIin C++, makes it much easier to write correct, leak- and
crash-free code. PyCUDA knows about dependencies, too, so (for
example) it won’t detach from a context before all memory
allocated in it is also freed.Convenience. Abstractions like pycuda.driver.SourceModule and
pycuda.gpuarray.GPUArray make CUDA programming even more
convenient than with Nvidia’s C-based runtime.Completeness. PyCUDA puts the full power of CUDA’s driver API at
your disposal, if you wish. It also includes code for
interoperability with OpenGL.Automatic Error Checking. All CUDA errors are automatically
translated into Python exceptions.Speed. PyCUDA’s base layer is written in C++, so all the niceties
above are virtually free.HelpfulDocumentation.Relatedly, like-minded computing goodness forOpenCLis provided by PyCUDA’s sister projectPyOpenCL.
Package: pycuda-arm-linux
PyCUDA lets you accessNvidia’sCUDAparallel computation API from Python.
Several wrappers of the CUDA API already exist-so what’s so special
about PyCUDA?Object cleanup tied to lifetime of objects. This idiom, often
calledRAIIin C++, makes it much easier to write correct, leak- and
crash-free code. PyCUDA knows about dependencies, too, so (for
example) it won’t detach from a context before all memory
allocated in it is also freed.Convenience. Abstractions like pycuda.driver.SourceModule and
pycuda.gpuarray.GPUArray make CUDA programming even more
convenient than with Nvidia’s C-based runtime.Completeness. PyCUDA puts the full power of CUDA’s driver API at
your disposal, if you wish. It also includes code for
interoperability with OpenGL.Automatic Error Checking. All CUDA errors are automatically
translated into Python exceptions.Speed. PyCUDA’s base layer is written in C++, so all the niceties
above are virtually free.HelpfulDocumentationand aWiki.Relatedly, like-minded computing goodness forOpenCLis provided by PyCUDA’s sister projectPyOpenCL.
Package: pycudacov
PyCUDACov - A PyCuda Covariance Matrix Parallel ImplementationUsage and InstallationRequires CUDA enviroment.Installation:$pipinstallpycudacovBasic Usagefromsklearn.datasetsimportmake_blobsfromsklearn.preprocessingimportStandardScalerfrompandasimportDataFrameimportnumpyasnpfrompycudacovimportget_cov# Generate test datasetrows,cols=2048,2048# samples, featuresX,y=make_blobs(n_samples=rows,centers=2,n_features=cols)X_std=StandardScaler().fit_transform(X)# Optionaldf=DataFrame(X_std)df=df.astype(np.float32)blocks=512# Size of kernel blocksthreads=256# Size of threads per block# Call to PyCUDA Kernel, return the cov. matrix and# GPU execution time in millisecondscovariance_matrix,gpu_exec_time=get_cov(df.values,blocks,threads)LicenseMIT
Package: pycudahll
PyCudaHLLThis is a GPU accelerated implementation of HyperLogLog using the CuPy library. It was created for the class "Algorithmic Techniques for Taming Big Data" at the department of Computing and Data Science at Boston University.Using the CodeTo use this code, you can either get the library from PyPI or build it from source.Get from PyPI (Recommended)Install using pip:pip install pycudahllIn your code, import the library:from pycudahll.CudaHLL import CudaHLLBuilding from SourceClone the repositoryInstall dependencies:poetry installIn your code, import the library:from pycudahll.CudaHLL import CudaHLLSeetest.pyfor examples. (Note:test.pyis most likely in a broken state, but should give you an idea of how to use the library.)APIThe main class of the library is CudaHLL. It can be imported in your code with:frompycudahll.CudaHLLimportCudaHLLCudaHLL also includes a helper function to hash data to use with the main class:frompycudahll.CudaHLLimporthashDataGPUHLLA short example of how to use the library is as follows:frompycudahll.CudaHLLimportCudaHLL,hashDataGPUHLLwithopen('data.csv','r')asfile:data=file.read().split(',')hashedData=hashDataGPUHLL(data)threads=64p=14cudaDevice=0# optionalroundThreads=True# optionalhll=CudaHLL(p,threads,cudaDevice,roundThreads)hll.add(hashedData)print(hll.card())# print unrounded cardinality estimateprint(len(hll))# print rounded cardinality estimateTest DataText of Shakespeare plays obtained fromhttps://ocw.mit.edu/ans7870/6/6.006/s08/lecturenotes/files/t8.shakespeare.txt. Original text can be found in t8.shakespeare.txt and the modified text can be found in shakespeare.csv.Total number of items = 899300
Exact cardinality = 34065
Package: pycudwt-multitarget
pycudwt-multitargetpycudwt-multitargetis a python module for parallel Discrete Wavelet Transform. This is a fork of the wrapper ofPDWT.Note:this project is much the same aspycudwt, but it has the ability to compile for multiple different GPUs to obviate the need to have separate containers (Docker or enroot) for different instance types having different GPUs (ie: one image for both A100s and H100s).When these changes are merged back intopycudwt, I will no point there and make a note in the new description.InstallationRequirementsYou need cython and nvcc (the Nvidia CUDA compiler, available in theNVIDIA CUDA Toolkit).For the tests, you need pywavelets.python-pywtis packaged for Debian-like distributions, more recent changes are available onthe new repository.Stable version (from pypi)pipinstallpycudwt-multitargetFrom conda recipeConda build for a specificcudatoolkitversion that matches one in your conda environment, e.g.:export CUDA_VERSION="10.1.243"
conda build conda-recipe/Development version (from github)gitclonehttps://github.com/pierrepaleo/pypwtcdpypwt
pipinstall.You can specify the compute capability when building the library:PYCUDWT_CC=86pipinstall.# or to target multiple specific GPUsPYCUDWT_CC=80,90# or to let nvcc target your current GPU(s)PYCUDWT_CC=allLearn morehere.TestingIfpywaveletis available, you can check if pycudwt gives consistent results :cdtestpythontest_all.pythe results are stored inresults.log.Getting startedComputing a Wavelet Transform wity pycudwt is simple. Inipython:frompycudwtimportWaveletsfromscipy.miscimportlenal=lena()W=Wavelets(l,"db2",3)W-------------Wavelettransforminfos------------Waveletname:db2Numberoflevels:3StationaryWT:noCyclespinning:noSeparabletransform:yesEstimatedmemoryfootprint:5.2MBRunningondevice:GeForceGTXTITANX--------------------------------------------------W.forward()W.soft_threshold(10)W.inverse()imshow(W.image)
Package: pycue
pycue - Python Wrapper forhttps://cuelang.orgAlpha release - use at your own riskExamplesimportcueimportyaml# Use over filescue.vet.files('schema.cue','data.yml')# Will raise cue.Error on errors# Use Validatorwithopen('data.yml')asfp:obj=yaml.safe_load(fp)v=cue.Validator.from_file('schema.cue')v.validate(obj)Installpython -m pip install pycueThis library uses thecuecommand line utility and will fail if it's not found in PATH.
You can set theCUE_EXEenvironment variable if you have non-standardcueinstall.Runcue.check_install()to validate installation.
Package: pycuga
📦pycugaPycuga (PYthon CUda Genetic Algorithm) provides a package for performing island-based genetic algorithm on Python and CUDA.Methods for migartion, selection and mutation are implemented already. Users only need to pick the method during initialisation.User needs to define evaluation using Cuda code.MotivationWhen I worked on my previous project onSolving Maximum Satisfiability Problem using CUDA, I realised a lot of code could be reused, which save a lot of development time for solving other optimisation problems using genetic algorithm and CUDA.ParametersMethods currently supportedSelectionElitism, Roulette WheelCrossoverOne (point), Two (points), UniformMutationNumberpip install pycugap1=PyCUGA(constArr,chromosomeSize,stringPlaceholder,mutationNumber,selectionMode,crossoverMode)p1.launchKernel(islandSize,blockSize,chromosomeNo,isTime,timeAllowed,migrationRounds,rounds)constArr (numpy array): defines the details of the problemchromosomeSize (int): number of variables in a chromosomestringPlaceholder (string): defines the evalutaion method and other constantsmutationNumber (int): /selectionMode (string): "elitism" or "roulettewheel"crossoverMode (string): "one" or "two" or "uniform"islandSize (int): size of an islandblockSize (int): Cuda block sizechromosomeNo (int): number of chromosomesmigrationRounds (int): number of rounds per migrationisTime (bool): stopped by time or number of roundstimeAllowed (int): seconds allowedrounds (int): total number of roundsExampleshere.Colab MaxSat examplehere.LimitationsUse multiples of 32 (for chromosome parameters) to avoid bugs and increase efficiency.Island migration is limited to 1 item currentlyLack unit testing❗DisclaimerThis is a mini project which I've put quite a lot of time and effort into, but I can't take responsibility for any bugs nor errors.
Package: pycuGMRES
# pycuGMRESGMRES implementation for Toeplitz-like (Toeplitz, Hankel, Circulant) matrices and mixed (combinations of Diagonal ones and Toeplitz-like ones) matricesWe propose implementations of the Generalized Minimal Residual Method (GMRES) for solving linear systems based on dense, Toeplitz or mixed matrices. The software consists of a python module and a C++ library. The mixed matrices consist of the sum of the diag- onal and the Toeplitz matrices. The GMRES solver is parallelized for running on NVIDIA GPGPU accelerator. We report on the efficiency of the parallelization method applying GMRES to the Helmholtz linear system based on the use of Green’s Function Integral Equation Method (GFIEM) for computing electric field distribution in the design domain.
Package: pycukes
PyCukesPyCukes is a Cucumber-like BDD tool built on top of Pyhistorian.
PyCukes was created to fill the gap pyhistorian left, so with it is possible to talk to your stakeholders first with text files, instead of simple understendable python files like Pyhistorian.UsageFirst, make sure you have installed story_runner, pyhistorian and pycukes.
By default, if you just callpycukesfrom your command line into some dir, it will look for astoriesdir (expecting your stories files are there) and then look for astep_definitionsdir (expecting your step definitions are there).
Each story file by convention ends with .story, likecalculator.storyand each step definition should end with steps.py, likecalculator_steps.py.So, lets say you have the directory tree:|-- calculator
   `-- stories
       |-- calculator.story
       `-- step_definitions
           `-- calculator_steps.pyTo run your stories, you can simple call:$ pycukesOr if you can specify exactly what stories run:$ pycukes stories/calculator.storyParameters-s or --stories-dir  --  specify your stories directory
-t or --steps-dir  --  specify your step definitions directory
-n or --no-colors  --  tells pycukes not to show colored output
-c or --colored (default) -- tells pycukes to show colored output
-l or --language (en-us by default) -- specify your story language [en-us and pt-br are supported]Real ExampleDirectory tree:hugo@hugo-laptop:~/app$ tree
.
`-- stories
    |-- bowling_game.story
    `-- step_definitions
        `-- bowling_game_steps.pyContent of bowling_game.story file:hugo@hugo-laptop:~/app$ cat stories/bowling_game.story
Story: Bowling Game
  As a bowling player
  I want to play bowling online
  So that I can play with everyone in the world

    Scenario 1: Gutter Game
      Given I am playing a bowling game
      When I hit no balls
      Then I have 0 pointsContent of bowling_game_steps.py:hugo@hugo-laptop:~/app$ cat stories/step_definitions/bowling_game_steps.py
from pycukes import *

class BowlingGame(object):
    score = 1
    def hit(self, balls):
        pass


@Given('I am playing a bowling game')
def start_game(context):
    context._bowling_game = BowlingGame()

@When('I hit no balls')
def hit_no_balls(context):
    context._bowling_game.hit(0)

@Then('I have 0 points')
def i_have_zero_points(context):
    assert context._bowling_game.score == 0Running:hugo@hugo-laptop:~/app$ pycukes stories/bowling_game.story
Story: Bowling Game
  As a bowling player
  I want to play bowling online
  So that I can play with everyone in the world

  Scenario 1: Gutter Game
    Given I am playing a bowling game   ... OK
    When I hit no balls   ... OK
    Then I have 0 points   ... FAIL

  Failures:
    File "stories/step_definitions/bowling_game_steps.py", line 19, in i_have_zero_points
      assert context._bowling_game.score == 0
    AssertionError


  Ran 1 scenario with 1 failure, 0 errors and 0 pending steps
Package: pyculas
pyculasInstallation Instructionsuse pip or pip3 to install the library.pip install pyculasNote:Currently this library support only algebraic expressions. Soon we will update for trigonometric, logarithmic expressions , etc.UsageThis class takes a list of terms in a polynomial expressionImportingfrom pyculas import ExpressionExamples of usage:If you have 4x^3 - 2x + 6, then create the object as follows -A = Expression.algebraic("4x^3 - 2x + 6")Differentiation1.If only final expression requiredQ.2x^2+2A = Expression.algebraic("2x^2 + 2")
print(A.differentiate())Output:('4.000x', None)2.To get value at a pointQ. Find the differentiation of2x^2+2at x=3.A = Expression.algebraic("2x^2 + 2")
print(A.differentiate(value=3,level=1))Output:('4.000x', 8.0)Herevaluemeans at which point you want to differentiate andlevelmeans the nth derivative.Integration1.If only final expression requiredQ.2x^2+2A = Expression.algebraic("2x^2 + 2")
print(A.integrate())Output:('0.667x^3.000 + 2.0x + c', None)2.To evaluate when limits are givenQ.2x^2+2A = Expression.algebraic("2x^2 + 2")
print(A.integrate(upper_limit=4 , lower_limit=2))Output:('0.667x^3.000 + 2.0x + c', 41.352)
Package: pyculib
Pyculib provides Python bindings to the following CUDA libraries:cuBLAScuFFTcuSPARSEcuRANDCUDA Sorting algorithms from theCUBandModern
GPUlibraries.These bindings are direct ports of those available inAnaconda
Accelerate.Documentation is locatedhereInstallingThe easiest way to install Pyculib and get updates is by using theAnaconda Distribution#> conda install pyculibTo compile from source, it is recommended to create a conda environment
containing the following:cfficudatoolkitnumpynumbapyculib_sortingscipyfor instructions on how to do this see thecondadocumentation, specifically the
section onmanaging
environments.Once a suitable environment is activated, installation achieved simply
by running:#> python setup.py installand the installation can be tested with:#> ./runtests.pyDocumentationDocumentation is locatedhere.Building DocumentationIt is also possible to build a local copy of the documentation from
source. This requires GNU Make and sphinx (available via conda).Documentation is stored in thedocfolder, and should be built with:#> make SPHINXOPTS=-Wn clean htmlThis ensures that the documentation renders without errors. If errors
occur, they can all be seen at once by building with:#> make SPHINXOPTS=-n clean htmlHowever, these errors should all be fixed so that building with-Wnis possible prior to merging any documentation changes or updates.
Package: pycunia
# pycuniaA library for querying APIs of some cryptocurrency exchanges.
Now pycunia supports GDAX and Binance.## Install### From sourceenterpycuniadirectory and runpip3 install -e ./### From PyPipip3 install pycunia## Featuresgdax api: public and authenticated APIs## TODOgdax websocket apibinance apisome basic analyzing tools
Package: pycupas
cupascupas는 쿠팡 파트너스 Open API의 Python Wrapper입니다.https://github.com/22Hours-edu/pycupashttps://github.com/winterlood사용 권한쿠팡 파트너스의 Open API는, 판매 실적을 인정받은 회원에게만 제공되는 Access key와 Secret key를 필수 요청 값으로 지정하고 있습니다따라서, 쿠팡 파트너스의 Key를 보유하고 있지 않다면 사용이 불가합니다.기본 사용법importfrompycupasimportcupasApiDriver다음과 같이cupasApiDriver를 이용해 사용할 수 있습니다.Initializingcupas=cupasApiDriver.CupasApiDriver('access_key','secret_key')다음과 같이CupasApiDriver를 초기화 하신 뒤 사용할 수 있습니다 .Get Shorten Link쿠팡 파트너스 수익으로 전환되는 단축 링크를 생성하는 API 입니다.subId='sub'# OptionallinkList=['linkA','linkB']#coupang 상품 페이지의 url 로 구성된 string list입니다.cupas.get_cuplink(linkList,subId)# linkList 는 필수# subId는 optional
Package: pycups
This is a set of Python bindings for the libcups library from the
CUPS project.>>> # Example of getting a list of printers
>>> import cups
>>> conn = cups.Connection ()
>>> printers = conn.getPrinters ()
>>> for printer in printers:
...     print printer, printers[printer]["device-uri"]
...
HP ipp://192.168.1.1:631/printers/HP
duplex ipp://192.168.1.1:631/printers/duplex
HP-LaserJet-6MP ipp://192.168.1.1:631/printers/HP-LaserJet-6MP
EPSON-Stylus-D78 usb://EPSON/Stylus%20D78
Package: pycupscli
PyCUPS CLIAllows to interact with CUPS in CLI using pycups. This script outputs the data in JSON, which allows to easily parse it in scripts withjq. For example getting a list of installed printers and their status is as simple as:pycupscli printers | jq -r 'keys[] as $k | "\($k): \(.[$k]["printer-state"])"'.Usagepycupscli [check, devices, printers, cancel, remove, add, info, print] -j jobid -p name -u uri -d driver -f file -o opts -aWhere subcommands are:check: check that the CUPS server is running and accessible, similar tolpstat -rdevices: returns a list of available devices, including network printers, similar tolpinfo -vprinters: returns the list of configured printers, similar tolpstat -vcancel: cancels one or all jobs for a printer, requires-u uriand either-aor-j jobidremove: remove a printer, requires either-u urior-p nameadd: add a printer, requires-u uri,-p nameand-d driverinfo: returns the attributes of an existing job or printer, requires-j jobidor-p nameor-u uriprint: print a file, requires-p nameand-f file, optionally-o optswith options seralized as a json objectThe output of the script is just the raw data returned by pycups, serialized as json.
Package: pycups-notify
Thepycups-notifylibrary is an extension to thepycupsone. It enables subscription to CUPS RSS notifications.This library implements theEvent notifypattern to match with thedesign descriptionof the CUPS server.Install$> pip install pycups-notifyUsageimporttimeimportcupsfromcups_notifyimportSubscriberdefon_event(evt):print(evt)# Create a CUPS connectionconn=cups.Connection()# Create a new subscribersub=Subscriber(conn)# Subscribe the callback to all CUPS eventssub.subscribe(on_event)try:whileTrue:time.sleep(1)exceptKeyboardInterrupt:passfinally:sub.unsubscribe_all()TheCupsEventclass has the following attributes:AttributetypeDescriptionguidintUnique IDtitlestrTitledescriptionstrDescriptionprinterstrPrinter nameaddresstupleAddress of the CUPS servertimestampdatetimePublished dateIt is possible to define a list of event types on which the callback is binded:importcupsfromcups_notifyimportSubscriber,eventdefmy_callback(evt):print(evt.title,evt.description)# Create a new subscribersub=Subscriber(cups.Connection())# Subscribe the callbacksub.subscribe(my_callback,[event.CUPS_EVT_JOB_CREATED,event.CUPS_EVT_JOB_COMPLETED,event.CUPS_EVT_JOB_STOPPED])The list of existing event types is defined below:TypeDescriptionCUPS_EVT_JOB_COMPLETEDEvent when the job is completedCUPS_EVT_JOB_CONFIG_CHANGEDEvent when the job is changedCUPS_EVT_JOB_CREATEDEvent when a job is createdCUPS_EVT_JOB_PROGRESSEvent for job progressCUPS_EVT_JOB_STATE_CHANGEDEvent when the job-state changesCUPS_EVT_JOB_STOPPEDEvent when the job is stoppedCUPS_EVT_PRINTER_ADDEDEvent when a printer is addedCUPS_EVT_PRINTER_CHANGEDEvent when a printer is changedCUPS_EVT_PRINTER_CONFIG_CHANGEDEvent when a printer’s configuration is changedCUPS_EVT_PRINTER_DELETEDEvent when a printer is deletedCUPS_EVT_PRINTER_MODIFIEDEvent when a printer is modifiedCUPS_EVT_PRINTER_STATE_CHANGEDEvent when the printer-state changesCUPS_EVT_PRINTER_STOPPEDEvent when a printer is stoppedCUPS_EVT_SERVER_AUDITEvent when a bad request, security error, or authentication error occursCUPS_EVT_SERVER_RESTARTEDEvent when the server is restartedCUPS_EVT_SERVER_STARTEDEvent when the server is initially startedCUPS_EVT_SERVER_STOPPEDEvent when the server is shutdownIf the CUPS server is not running on the same computer as the subscriber application
one, the local IP address (same network than the CUPS server) have to be provided to
the subscriber class:# Create a CUPS connectioncups.setServer('198.20.34.1')conn=cups.Connection()# Create a new subscribersub=Subscriber(conn,'198.20.34.26')RunA simple listener can be started by typing the following command line:$> pycups-notify
Package: pycups-po
🖨 Python CUPS print options generator from PPD📥 Installation📦 From pip:python-mpipinstall-Upycups_po🏗 From git:gitclonehttps://github.com/WhiteApfel/pycups_po.gitcdpycups_po
pythonsetup.pyinstall🧑‍🏫 How to use🐍 Exampleimportcupsfrompycups_poimportPrinterOptionsGeneratorfrompycups_po.modelsimportPrinterOptionconn=cups.Connection()generator=PrinterOptionsGenerator(conn,"CT-S2000")ops:list[PrinterOption]=generator.get_ppd_options()foropinops:print(op)withopen("tr4500.py","w+")asf:f.write(generator.generate_options_dataclass(printer_name="TR-4500"))You can specify name of printer when initPrinterOptionsGenerator, then it will be used by default.
Or you can pass name to function.📋 Dataclasses@dataclassclassOptionValue:value:strpretty_value:strcontent:str@dataclassclassPrinterOption:name:strpretty_name:Optional[str]type:Literal["PickOne"]default_value:strvalues:List[OptionValue]💻 CLIShow list of printerspycups_poprinters# orpycups_poprinters--host192.168.1.12# orpycups_poprinters--host192.168.1.12--port6631🖨 Printers
├── CT-S2000
│   ├── Info: CITIZEN CT-S2000
│   └── State: ⏳ idle
└── TR4540
    ├── Info: Canon TR4540
    └── State: ⏳ idleShow optionspycups_pooptionsTR4540# You can set the --host and --port in the same way⚙️ Options
├── MediaType (Media Type)
│   ├── Type: PickOne
│   ├── Default: matte
│   └── Values:
│       ├── 'plain' (Plain Paper): <</MediaType(plain)>>setpagedevice
│       ├── 'glossygold' (Photo Paper Plus Glossy II): <</MediaType(glossygold)>>setpagedevice
...
├── Duplex (Duplex Printing)
│   ├── Type: PickOne
│   ├── Default: None
│   └── Values:
│       ├── 'None' (Off): 
│       ├── 'DuplexNoTumble' (Long-side stapling): 
│       └── 'DuplexTumble' (Short-side stapling): 
└── ColorModel (Color Model)
    ├── Type: PickOne
    ├── Default: rgb
    └── Values:
        └── 'rgb' (RGB):Generate dataclass filepycups_pogenerate-o./tr4540.pyTR4540# orpycups_pogenerate--output-file~/printer.pyTR4540# You can set the --host and --port in the same way
Package: pycur
pycurModifying cursors is now easier than ever!Check out the pycur community!InstallInstallingpycuris easy! Just use the usualpip installcommand as shown here:pipinstallpycurYou can adjust this command to fit your environment. :)Version checkimportpycurprint(pycur.__version__)# Outputs the installed version of `pycur`Save a blank cursor (TODO)importpycurempt=pycur.Cursor("new",(32,32))empt.saveAs("blank.cur")# Easy as that! ;)