Saravanan666/pypi-org huggingface dataset:
Package: rockfinder
rockfinderA python package and command-line suite to generate solar-system body ephemerides and to determine if specific transient dections are in fact known asteroids.Command-Line UsageUsage:rockfinderwhere[-e][csv|md|rst|json|yaml]<objectId><mjd>...csvoutputresultsincsvformatmdoutputresultsasamarkdowntablerstoutputresultsasarestructuredtexttablejsonoutputresultsinjsonformatyamloutputresultsinyamlformat-e,--extrareturnextraephemerisinfo(verbose)-h,--helpshowthishelpmessageDocumentationDocumentation for rockfinder is hosted byRead the Docs(laststable versionandlatest version).InstallationThe easiest way to install rockfinder is to usepip:pipinstallrockfinderOr you can clone thegithub repoand install from a local version of the code:gitclonegit@github.com:thespacedoctor/rockfinder.gitcdrockfinderpythonsetup.pyinstallTo upgrade to the latest version of rockfinder use the command:pipinstallrockfinder--upgradeDevelopmentIf you want to tinker with the code, then install in development mode.
This means you can modify the code from your cloned repo:gitclonegit@github.com:thespacedoctor/rockfinder.gitcdrockfinderpythonsetup.pydevelopPull requestsare welcomed!Sublime SnippetsIf you useSublime Textas your code editor, and you’re planning to develop your own python code with rockfinder, you might findmy Sublime Snippetsuseful.IssuesPlease report any issueshere.LicenseCopyright (c) 2018 David YoungPermission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: rockmate
RockmateWarning: Currently, Rockmate relies on Gurobi to solve the Integer Linear Programming model.Given a module and a sample (i.e.example input for it) and a memory budget,Rockmatebuilds a newtorch.nn.Modulewith equal forward and backward results while
keeping the memory peak under the given budget.Backward pass updates original model parameters.The model and sample should be on the GPU device.Complete exampleimporttorchfromrockmateimportRockmatefromtorchvision.modelsimportresnet101device=torch.device("cuda")model=resnet101().to(device)x=torch.randn([100,3,128,128]).to(device)m_budget=2*1024**3rkMod=Rockmate(model,x,m_budget)loss=rkMod(x).mean()loss.backward()rkMod.backward()
Package: rock-paper-scissors
Rock Paper Scissors EnvironmentIt is just a simple version of a rock paper scissor game. However, to make the game deterministic
it takes in the move of the player and learns to maximize its wins.Running the jupyter notebookFor obvious reasons, you need to have jupyter, numpy installed in your system before running it.
Once done, you can start the notebook and run the example.What is happening in the outputYou would see the following things in the outputa matrix -> It represents the bot experience across multiple games against the player.exploiting/exploration -> The bot is fed with some initial experience (see np.uniform at the top) but it begins
with exploration when it thinks it does not have any experience and then starts exploiting the already gained experience.stats -> They just tell you of the moves of the playerFAQ'sIs the bot playing against pre-defined set of moves of the player ?No. The player's move has been randomly generated and are then used by the bot to gain experience and win.This isn't how the game is played. Right ?Good find. In this version of the game I take in the user move and then train the bot to optimize itself. In my
case the bot always wins after the training is complete but in the real game the bot will sometime DRAW as well
since the moves of the player is random.How do I run your sample ?Install the dependencies and run the notebook placed in the repo.How to install this package ?pip3 install rock-paper-scissors
Package: rockphypy
rockphypyAboutThis Python 3.8+ package implements most of the rock physics models introduced in the Rock Physics Handbook. The package provides a bunch of usefel classes, i.e.Anisotropy,AVO,BW (Batzle&Wang),EM(Effective medium),Empirical,Fluid,GM(Granular Medium),Permeabilityandutils. An exhaust list of methods in different classes are given in  theAPI Documentation.CitationWant to cite rockphypy in your work? Please cite as "Yu, Jiaxin and Mukerji, Tapan and Avseth, Per Ã…ge, Rockphypy: An Extensive Python Library for Rock Physics Modeling. Available at SSRN:https://ssrn.com/abstract=4486364orhttp://dx.doi.org/10.2139/ssrn.4486364".Installationrockphypy is available through [PyPI] and may be installed usingpip:pip install rockphypyExample code and documentationBelow is an simple example showing the comparison between critical porosity model and elastic bounds computed by  Hashin-Strikmann bounds. See thedocumentationfor more examples.fromrockphypyimportEMfromrockphypyimportFluid# specify model parametersphi=np.linspace(0,1,100,endpoint=True)# solid volume fraction = 1-phiK0,G0=37,44# moduli of grain materialKw,Gw=2.2,0# moduli of water# VRH boundsvolumes=np.vstack((1-phi,phi)).TM=np.array([K0,Kw])K_v,K_r,K_h=EM.VRH(volumes,M)# Hashin-Strikmann boundK_UHS,G_UHS=EM.HS(1-phi,K0,Kw,G0,Gw,bound='upper')# Critical porosity modelphic=0.4# Critical porosityphi_=np.linspace(0.001,phic,100,endpoint=True)# solid volume fraction = 1-phiK_dry,G_dry=EM.cripor(K0,G0,phi_,phic)# Compute dry-rock moduliKsat,Gsat=Fluid.Gassmann(K_dry,G_dry,K0,Kw,phi_)# saturate rock with water# plotplt.figure(figsize=(6,6))plt.xlabel('Porosity')plt.ylabel('Bulk modulus [GPa]')plt.title('V, R, VRH, HS bounds')plt.plot(phi,K_v,label='K Voigt')plt.plot(phi,K_r,label='K Reuss = K HS-')plt.plot(phi,K_h,label='K VRH')plt.plot(phi,K_UHS,label='K HS+')plt.plot(phi_,Ksat,label='K CriPor')plt.legend(loc='best')plt.grid(ls='--')Issues and contributingIssuesIf you are having trouble using the package, please let me know by creating an [Issue on GitHub] and I'll get back to you.ContributingWhatever your mathematical and Python background is, you are very welcome to contribute to rockphypy.
To contribute, fork the project, create a branch and submit and Pull Request.
Please follow these guidelines:Import as few external dependencies as possible.Use test driven development, have tests and docs for every method.Cite literature and implement recent methods.Unless it's a bottleneck computation, readability trumps speed.Employ object orientation, but resist the temptation to implement many methods -- stick to the basics.Follow PEP8.Timeline
Package: rockpool
RockpoolRockpool is a Python package for developing signal processing applications with spiking neural networks. Rockpool allows you to build networks, simulate, train and test them, deploy them either in simulation or on event-driven neuromorphic compute hardware. Rockpool provides layers with a number of simulation backends, including Brian2, Torch, JAX, Numba and raw numpy. Rockpool is designed to make machine learning based on SNNs easier. It is not designed for detailed simulation of biological networks.Documentation and getting startedThe best place to start with Rockpool is thedocumentation, which contains tutorials and getting started guides.The documentation is hosted online:https://rockpool.ai/, or can be built and hosted locally with Sphinx. Much of the documentation is available as Jupyter notebooks, to be used interactively.Installation instructionsUsepipto install Rockpool and required dependencies$pipinstallrockpool--userThe--useroption installs the package only for the current user.If you want to install all the extra dependencies required for Brian, PyTorch and Jax layers, use the command$pipinstallrockpool[all]--userLicenseRockpool is released under a AGPL license. Commercial licenses are available on request.ContributingFork the public repository athttps://github.com/SynSense/rockpool, then clone your fork.$gitclonehttps://github.com/your-fork-location/rockpool.gitrockpoolInstall the package in development mode usingpip$cdrockpool
$pipinstall-e.--useror$pipinstall-e.[all]--userThe main branch isdevelopment. You should commit your modifications to a new feature branch.$gitcheckout-bfeature/my-featuredevelop
...
$gitcommit-m'This is a verbose commit message.'Then push your new branch to your repository$gitpush-uoriginfeature/my-featureWhen you're finished with your modifications, make a merge request on github.com, from your branch in your fork tohttps://github.com/SynSense/rockpool.
Package: rock-pre-h
Package for easy data preprocessingcorrmake_pvalue_dfmake_ttest_dfmake_ANOVA_dfmake_crosstab_dfplotsmake_corr_heatmapmake_distplotsmake_boxplotsmake_barplotsusefulcreateFoldercheckNANhandle_NANNAN_previewcheck_featurescheck_uniquehow_to_use_handle_NAN
Package: rockrl
RockRLReinforcement Learning library for public, for now, it only supportsTensorFlow.InstallationpipinstallrockrlEnvironment requirementsRL algorithms are implemented to supportgymnasium==0.29.1version. Main requirements are that:env.reset()would returnstateandinfostates.env.step(action)would returnstate,reward,terminated,truncated,infostates.Supported AlgorithmsPPO (Discrete and Continuous)Code ExamplesProximal Policy Optimization (PPO):RockRL/tensorflow/examples/ppo/LunarLander-v2/LunarLander-v2.pyis an example of using PPO to solve LunarLander-v2 (Discrete) environment.RockRL/tensorflow/examples/ppo/BipedalWalker-v3/BipedalWalker-v3.pyis an example of using PPO to solve BipedalWalker-v2 (Continuous) environment.RockRL/tensorflow/examples/ppo/BipedalWalkerHardcore-v3/BipedalWalkerHardcore-v3.pyis an example of using PPO to solve BipedalWalker-v3 Hardcore (Continuous) environment.
Package: rocksdb3
Python bindings for rocksdbRocksdb3 is a python bindings forrocksdbbased on rust wrapperrust-rocksdbandPyO3.This is a very early proof-of-concept version.
Please do not use it in production.Why new wrapperThere is already havepython-rocksdb,
so why create a new wrapper for rocksdb?It's funI'm learning Rust, this is my expriencePyO3 is fun, tooPython-rocksdb is not actively maintainedPython-rocksdb is not released with statically-linked
multiple-operating-system-supported wheel binariesDebugging out-of-bounds pointers is boringStatusprecompiledwheel binariesfor Linux, Windows, macOS, on python 3.5, 3.6, 3.7, 3.8, 3.9, 3.10basic open/put/get/delete/closeopen as secondary instancedestroy/repairiteratoriterator with specific prefixwrite batchoptionsopen optionsread optionswrite optionsInstallpip install rocksdb3Examplesimportrocksdb3path='./db_path'db=rocksdb3.open_default(path)assertdb.get(b'my key')isNonedb.put(b'my key',b'my value')assertdb.get(b'my key')==b'my value'assertlist(db.get_iter())==[(b'my key',b'my value')]db.delete(b'my key')assertdb.get(b'my key')isNonedeldb# auto close dbrocksdb3.destroy(path)buildpip install maturin
maturin build
Package: rocksdb-py
rocksdb-pyPython bindings for RocksDB written in Rust.FeaturesGet, set, delete, multi getDestroyBatch writeDatabase iteratorRead optionsInstallTo install a wheel from PyPI,pipinstall--upgraderocksdb-pyor if you want to build a wheel, seebuild.UsageOpen databaseOpen a database with default options.importrocksdbpydb=rocksdbpy.open_default('/tmp/rocksdb')Open a database with the specified options.opts=Option()opts.create_if_missing(True)db=rocksdbpy.open('/tmp/rocksdb',opts)Open a database with TTL compaction filter.opts=Option()opts.create_if_missing(True)db=rocksdbpy.open_with_ttl('/tmp/rocksdb',5,opts)Destroy the database and it's files.rocksdbpy.destroy('/tmp/rocksdb')Close active database and release lock.db.close()Simple read, set and deleteSet records by key and value.db.set(b'key',b'value')Get a value associated with a key.value=db.get(b'key')Remove existing records by key.db.delete(b'key')Batch write, database iterator and flushSet database entries for list of key and values as a batch.fromrocksdbpyimportWriteBatchbatch=WriteBatch()batch.add(b'first',b'1')batch.add(b'second',b'2')db.write(batch)Extra operations for the batch.batch.delete(b'first')batch.clear()size=batch.len()Return a heap-allocated iterator over the contents of the database.iterator=db.iterator()iterator=db.iterator(mode='end')iterator=db.iterator(mode='from',key=b'test')iterator=db.iterator(mode='from',key=b'test',direction=-1)forkey,valueiniterator:print(key,value)Flush database memtables to SST files on the disk using default options.db.flush()Read optionsSet database read options.opts=Option()opts.create_if_missing(True)opts.set_max_open_files(10)opts.set_use_fsync(True)opts.set_bytes_per_sync(1024*1024)# and moreBuildYou can build PIP package by usingmaturin. The example below is created for MacOS,$gitclonehttps://github.com/trk54ylmz/rocksdb-py.git
$cdrocksdb-py
$maturinbuild
$pip3install./target/wheels/rocksdb_py-0.0.1-cp39-cp39-macosx_11_0_arm64.whl
Package: rocksdb-statistics
rocksdb-statisticsA small snippet I wrote to generate plots for my thesis onAuto-tuning RocksDBParses db_bench.log files outputted from RocksDB
Outputs CSV-files and pgfplot of write, compaction and stall statistics.Supported statistics:interval_writescumulative_writesinterval_stallcumulative_stallinterval_compactioncumulative_compactionUsagepip install rocksdb-statisticsrocksdb-statistics db_bench.logParsed stats are outputted tooutput/in the current directoryAlternatively specify what stats to outputrocksdb-statistics db_bench.log --statistics "interval_writes,interval_compaction"ExampleRun db_bench with statistics usingstats_interval_secondsto retrieve stats for each second. Make sure to setstats_per_intervalto make db_bench output** DB stats **for each interval../db_bench --benchmarks="fillrandom,stats" -stats_interval_seconds 1 -stats_per_interval 1 &> db_bench.logrocksdb-statistics db_bench.logThe directoryoutput/contains the parsed statistics in csv.
Example files are provided in theexample/directory.You can also add-statisticsto get a summary of a lot of other things../db_bench --benchmarks="fillrandom,stats" -statistics -stats_interval_seconds 1 -stats_per_interval 1 &> db_bench.logExample plotsBelow are some plots I generated using this tool for my thesis.
Package: rockset-sqlalchemy
rockset-sqlalchemyThis library implements Python's dbapi spec and provides SQLAlchemy support on top of Rockset.UsageTo install the latest version of this package, run:pip3 install rockset-sqlalchemyTo connect to the database:fromsqlalchemyimportcreate_engineengine=create_engine("rockset://",connect_args={"api_key":"{your api key}","api_server":"{your api server}""virtual_instance":"{your virtual instance ID}"# virtual_instance is optional},)See some example querieshere. See the SQLAlchemy Unified Tutorialhere.DevelopmentIterating on this library is very simple.First, clone the source repository:git clone https://github.com/rockset/rockset-sqlalchemyThen, all you need to do is runsudo python3 setup.py developfrom the cloned directory and hack away.You can use the example scriptexample.pyto get started with development. Make sure you provide aROCKSET_API_KEYandROCKSET_API_SERVERto the script, like soROCKSET_API_KEY=xxx ROCKSET_API_SERVER=https://api.rs2.usw2.rockset.com python3 example.py
Package: rocksq
RocksQAn inproc RocksDB-based queue with Python bindings. It is implemented in Rust.Features:max capacity limit in number of elements;size calculation based on filesystem space usage;length calculation based on number of elements;supports only bytes-like objects;can operate in a multithreaded environment efficiently (push and pop methods can release GIL if necessary);keeps the state between restarts;two implementations: blocking and nonblocking;What is not supported:pub/sub is not supported intentionally (implement it on top of RocksQ if necessary);TTL is not supported intentionally (implement it on top of RocksQ if necessary).Implementation detailsIt works on RocksDB and uses a single column family. The keys are 64-bit integers, the values are byte arrays. The keys are generated by incrementing a counter. The read and write counters are stored in a separate key-value pairs.It is implemented in Rust and PyO3, thus allows to release GIL when necessary. The library does not require external dependencies installed in the environment.Supported Platforms and Python VersionsWindows: Python versions: 3.7-3.12.Linux: ManyLinux Python versions: 3.7-3.12. CI does not build for PyPy, but it should work if you build it manually.MacOS: Currently, I do not have MacOS environment to debug the build process in MacOS, all volounteers are welcome.Installationpip install rocksqUsageSee the examples in thepythondirectory.API docs are located at:https://insight-platform.github.io/RocksQ/.PerformanceThe performance is mostly limited by the throughput of the underlying filesystem. The queue is able to saturate the throughput of the filesystem.
Package: rockstar
RockstarRockstar is one amazing library, which will make you a Rockstar Programmer in just 2 minutes. In last decade, people learnedC++ in 21 days. But these days, it has come down to just10 minutes. But, I wanted to do better.This repo will not only teach you Complete C++ in just 2 minutes, but also makes Open Source Contributions. You see, Open Source contributions are very important these days, especially if you can get those boxes filled with green on your Github profile. As an efficient programmer, I believe in killing two birds in just one shot.RunRockstar, be a Rockstar, show off your Github profile to everyone and bag those $200K programmer jobs. Once you become a Rockstar, every recruiter will want to hire you and there is no turning back.InstallationRockstaris Python 3 only library. Rockstar programmers don't code in Python 2.pip install rockstarUsageTime is very important. Do not waste time reading large manuals orlisten to people who tell you how to learn C++, run these couple of lines instead:fromrockstarimportRockStarrock_it_bro=RockStar(days=300)rock_it_bro.make_me_a_rockstar()Above script will create a git repository in the current directory. After that, create a repo on Github and push the local repo. That's all!daysspecify number of boxes you want to fill with green. Default value is400. Remember, more commits, more green, more Rockstar you are!Become a Rockstar Swift Programmer with 5 years of experience:fromrockstarimportRockStarswift_code="print('Hello world')"rock_it_bro=RockStar(days=1900,file_name='hello.swift',code=swift_code)rock_it_bro.make_me_a_rockstar()CLI MasterraceSometimes when Atom takes too long time to start, you can use the command line version instead:rockstar --days=666TestimonialsThis is how your profile looks:Such glorious, much wow!Many people have received jobs from the big 4 after becoming a Rockstar, usingRockstarand also:Feel free to send a PR and add your name.TodoPolyglot RockstarLicenseThe mighty MIT license. Please checkLICENSEfor more details.
Package: rockstarfoxdot
rockstarfoxdotUsing using the RockStar EsoLang to make music in FoxDotTo install (I think)use python3pip3 install numpy timeout_decorator watchdog rockstarfoxdotpip3 install -U git+https://github.com/yanorestes/rockstar-py.gitInstructionsStart up FoxDot as normalBefore trying to run any Rockstar run this linefrom rockstarfoxdot import *rockstar(lyrics, namespace=None, printname=None)Use rockstar in-linerockstar('''
Papa was a rolling stone
''', locals())When run this will exec this python in your FoxDotPapa = 175rockstar(filename, namespace=None, printname=None)Use rockstar from a filersf("FizzBuzz.rock", locals(), "fizzbuzz")
p1 >> bass(fizzbuzz, dur=PDur(17, 24))When run this will exec the rockstar from "FizzBuzz.rock" in your FoxDot and place anything you 'Shout'ed 'Said' or 'Scream'ed into a list called fizzbuzz.Then it will play those notes on the bass in FoxDot player p1rockstar()has a timeout protecting you from infinite loops in the coders(lyrics, namespace=None, printname=None)Use rockstar in-linerockstar('''
Papa was a rolling stone
''', locals())When run this will exec this python in your FoxDotPapa = 175rsf(filename, namespace=None, printname=None)Use rockstar from a filersf("FizzBuzz.rock", locals(), "fizzbuzz")
p1 >> bass(fizzbuzz, dur=PDur(17, 24))When run this will exec the rockstar from "FizzBuzz.rock" in your FoxDot and place anything you 'Shout'ed 'Said' or 'Scream'ed into a list called fizzbuzz.Then it will play those notes on the bass in FoxDot player p1rsf()has a timeout protecting you from infinite loops in the rockstar
Package: rocktree
RocktreeA tool for making keeping your working testing tree rock solid up to date
with the latest developments in place with upstream link.Consider giving us a :star:. Made with love by contributors.In development, yet to be implementedConceptSo for example we havehttp://example.com/testing-repo. It gets updated
time to time and we want to keep up to date with it all the time blanking
out all the local changes as soon as the changes are pulled from
upstream. It works on the bases ofpatchutilswhich works on the bases of patchfiles, update files and directory trees.To download from upstream for the first time you can use therocktree.clone(url="http://my_url.com/repo", dir="local_repo")after that the repo should contain a.rocktreefile which contains the
upstream link. You can then use the methodrocktree.update_from_file(dir="local_repo").
You can also force update from a specified repo using the provided method
`rocktree.update(dir="local_repo", url="http://my_url.com/repo")
Package: rocktrie
rocktrieA trie library based on a single RocksDB databaseUsage>>> import rocksdb
>>> from rocktrie import list_to_trie_db, lookup, ROW_KEY, TERMINAL_KEY, PAYLOAD_KEY
>>> db = rocksdb.DB('/tmp/trie1', rocksdb.Options(create_if_missing=True))
>>> list_to_trie_db([("CAT", 100), ("RAT", 200), ("DOG", 300)], db)
>>> lookup(db, 0, 0, "O")
>>> 
>>> lookup(db, 0, 0, "C")
[0, False, None]
>>> lookup(db, 0, 1, "A")
[0, False, None]
>>> lookup(db, 0, 2, "T")
[0, True, 100]
>>>
Package: rocky
RockyA collection of small libs for better command line programs in
production setting. This is not a framework, use a small bit or
everything.Traceable config, no more searching for where the config was
set. Read them from config file, python file, plain file, command
line, environment or somewhere you choose. Dump all config to the
log at once or at first use.Handling of pid files, creating, removing and checking.Stop gracefully on a single sigint, but die hard when spamming them.Argparsing can be done by a number of other libs, not included here,
personally I like argparse and have added a couple of useful
functions related to it.Adding to sys.path, replace two lines of code with one line of code.