Saravanan666/pypi-org huggingface dataset:
Package: crow-serial
Crow Serial Protocol ImplementationStatus:experimentalThe Crow protocol is designed to allow a PC to control several microcontrollers using a single
serial line. The protocol itself has a simple half-duplex, command/response format with basic
error checking provided by Fletcher-16 checksums.In Crow, the top-level software that generates commands is called aclient. The client runs on thehost, and
it passes the command to ahost implementation. The host implementation creates a command packet
and sends it over the serial line. Adevice implementationreceives the packet and then passes the command
to aservicerunning on thatdevice. The service performs the command and may send a response,
depending on the circumstances.Acommandhas the following properties:address: 1-31 for a specific device, or 0 to broadcast to all devices.port: 0-255, where open ports are registered to specific services.response expected: if true, the host will wait for a response; if false, the device must not respond.payload: 0-2047 bytes of binary data.Aresponsehas just one property, the payload, which is also 0-2047 bytes of binary data.This project contains a host implementation as well as a Crow admin client.The Crow admin client can be used to send the commandsping,echo,host_presence,get_device_info,get_open_ports, andget_port_info.
Package: cr-pre-commit-hooks
Climate Resource pre-commit hookspre-commithooks for ensuring consistency across our code
base. Included are hooks which are not available elsewhere and also not super useful
outside of a CR context.UsageTo use the hooks in a project, add to your.pre-commit-config.yaml:-repo:https://gitlab.com/climate-resource/cr-pre-commit-hooksrev:v0.1.0hooks:-id:check-docstringsFor developersFor development, we rely onpoetryfor all our
dependency management. To get started, you will need to make sure that poetry
is installed
(instructions here,
we found that pipx and pip worked better to install on a Mac).For all of work, we use ourMakefile.
You can read the instructions out and run the commands by hand if you wish,
but we generally discourage this because it can be error prone.
In order to create your environment, runmake virtual-environment.If there are any issues, the messages from theMakefileshould guide you
through. If not, please raise an issue in theissue tracker.For the rest of our developer docs, please see.
Package: crpyt
CrpytPronounced 'crypt.'A very simple Python script that calls Shell, allowing you
to encrypt files within a tree using GPG. The script is
hardcoded to encrypt files with 256 bitAES.UsageIn this example, thetest/directory isencrypted, leaving only the.gpgfiles:➜python3src/cli.py--pathtest--encrypt--delete_original--key#$MY_GPG_KEY# Encrypting pets/dogs/inu.txt# Encrypting pets/cats/neko.txt# Encrypted 2 files.Then the tree isdecrypted, removing the.gpgfiles:➜python3src/cli.py--pathtest--decrypt--delete_original--key#$MY_GPG_KEY# Decrypting pets/dogs/inu.txt.gpg# Deleting pets/dogs/inu.txt.gpg# Decrypting pets/cats/neko.txt.gpg# Deleting pets/cats/neko.txt.gpg# Decrypted 2 files.InstallationThesrc/cli.pycan be installed as thecrpytcommand usingpip.You can install it fromGitHub:➜pipinstallgit+https://github.com/MolassesLover/Crpyt.gitAlternatively, fromPyPi:➜pipinstallcrpytLicenseAll files within this repository are licensed under theApache v2.0 licenseorMIT licenseat your choice.ContributingContributions are open, just make sure to sign your
commits, otherwise, your changes will not be merged.
Package: crrem
This is a climate value at risk model for real estate asset and portfolio in the UK. It covers all domestic and non-domestic properties with EPC certificates.How to use:
1. Install crrem package: pip install crrem
2. To import class: from crrem.var import Building, PortfolioThere are two classes in the UK depending on your use case. You can either:Conduct ASSET-LEVEL analysis with the Building class using methods VAR to calculate climate value at risk or have the option to see the stranding diagram. When initialising Building, you need to specify Building(building_details, building_price), where building_details is either building EPC's BUILDING_REFERENCE_NUMBER or a json object specifying users' own input, property_price is self-defined price of the property.here is an example json object:
json = {
'BUILDING_REFERENCE_NUMBER':5336094578,
'PROPERTY_GROUPING':'Domestic',
'PROPERTY_TYPE':'House',
'CO2_EMISS_CURR_PER_FLOOR_AREA': 66.0,
'MAIN_FUEL':'mains gas (not community)',
'ENERGY_CONSUMPTION_CURRENT':375,
'TOTAL_FLOOR_AREA':101.0,'NutsCode':'UKC11'}Conduct PORTFOLIO-LEVEL analysis with the Portfolio class using VAR to calculate climate value at risk and have the option to see the plot of the number of stranding assets over time. When initialising Portfolio, you need to specify Portfolio(buildings), where buildings is a list of Building instances.VAR default arguments for both classes: (target_temp=1.5, RCP_scenario=4.5, discount_factor=0.02, end_year=2050, Diagram=True)Change Log0.0.1 (31/03/2021)-First Release
Package: crsEpsg
crsEpsgThis is a simple python package that contains two dictionaries - i.e.,crs2epsgandepsg2crs- with the correspondences between the CRS names and EPSG codes. For instance,crs2epsg={"Anguilla 1957 / British West Indies Grid":"2000","Antigua 1943 / British West Indies Grid":"2001","Dominica 1945 / British West Indies Grid":"2002",...}epsg2crs={"2000":"Anguilla 1957 / British West Indies Grid","2001":"Antigua 1943 / British West Indies Grid","2002":"Dominica 1945 / British West Indies Grid","2003":"Grenada 1953 / British West Indies Grid",...}I created this package to use it with las/LIDAR files, so, I included the functiongetEPSG(filename, default)that return the EPSG code from a las/LIDAR file. Some files contains larger CRS name (e.g., "ETRS89 / UTM zone 30N + Geoid" when the documented name is only "ETRS89 / UTM zone 30N"), so, this function will be cutting the last word until achieve the good portion of the CRS name.fromcrsEpsgimportgetEPSGprint("EPSG:",getEPSG("data/209341.las","32718"))Requirementspip3installliblas
pip3installcrsepsgWith this you should be ready to use this module. However, you have the alternative,sudoapt-getinstallpython-liblas
Package: cr-sparse
IntroductionCR-Sparse is a Python library that enables efficiently solving
a wide variety of sparse representation based signal processing problems.
It is a cohesive collection of sub-libraries working together. Individual
sub-libraries provide functionalities for:
wavelets, linear operators, greedy and convex optimization
based sparse recovery algorithms, subspace clustering,
standard signal processing transforms,
and linear algebra subroutines for solving sparse linear systems.
It has been built usingGoogle JAX,
which enables the same high level
Python code to get efficiently compiled on CPU, GPU and TPU architectures
usingXLA.For detailed documentation and usage, please visitonline docs.For theoretical background, please check online notes atTopics in Signal Processingand references therein (still under development).CR-Sparseis part ofCR-Suite.Related libraries:CR-NimbleCR-WaveletsSupported PlatformsCR-Sparsecan run on any platform supported byJAX.
We have testedCR-Sparseon Mac and Linux platforms and Google Colaboratory.The latest code in the library has been tested against JAX 0.4.JAXis not officially supported on Windows platforms at the moment.
Although, it is possible to build it from source using Windows Subsystems for Linux.
Alternatively, you can check out the community supported Windows build for JAX
available fromhttps://github.com/cloudhan/jax-windows-builder.
This seems to work well and all the unit tests in the library have passed
on Windows also.InstallationInstallation from PyPI:python-mpipinstallcr-sparseDirectly from our GITHUB repository:python-mpipinstallgit+https://github.com/carnotresearch/cr-sparse.gitExamples/UsageSee theexamples galleryin the documentation.
Here is a small selection of examples:Sparse recovery using Truncated Newton Interior Points MethodSparse recovery with ADMMCompressive sensing operatorsImage deblurring with LSQR and FISTA algorithmsDeconvolution of the effects of a Ricker waveletWavelet transform operatorsCoSaMP step by stepA more extensive collection of example notebooks is available in thecompanion repository.
Some micro-benchmarks are reportedhere.Contribution Guidelines/Code of ConductContribution GuidelinesCode of ConductCiting CR-SparseTo cite this library:@article{Kumar2021,
  doi ={10.21105/joss.03917},
  url ={https://doi.org/10.21105/joss.03917},
  year ={2021},
  publisher ={The Open Journal},
  volume ={6},
  number ={68},
  pages ={3917},
  author ={Shailesh Kumar},
  title ={CR-Sparse: Hardware accelerated functional algorithms for sparse signal processing in Python using JAX},
  journal ={Journal of Open Source Software}}Documentation|Code|Issues|Discussions|
Package: crspectra
This package is deprecated. Please use the officialCRDB Python package.This Python package provides a database of published cosmic-ray energy spectra,
measured by surface detectors likeIceTopor thePierre Auger Observatory;
seereferences. Moreover, it gives access to theCosmic-Ray DataBase (CRDB),
which includes electrons, positrons, anti-protons, and nuclide up toZ = 30for energies below the cosmic-rayknee.InstallationThe easiest way to install this project is by usingpip:pipinstallcrspectraGetting startedThe measured cosmic-ray energy spectra can be requested via:importcrspectrawithcrspectra.connect()asdatabase:forexperimentindatabase:spectrum=database[experiment]A structuredNumPyarray is returned containing the requested cosmic-ray
data. The fields areenergy,flux, statisticalstatand
systematicalsysuncertainty on the flux, and uncertainty is upper a
limituplim. The energy is given inGeVand the flux is given
inGeV^-1m^-2s^-1sr^-1. The uncertainties describe the lower and upper
uncertainty relative to the flux.Data from CRDB can be requested via:spectrum=crspectra.from_external("AMS-02")Note that CRDB also provides the papers that should be citied.The following plot was created using this package; see theexampleJupyter
Notebook:ReferencesPlease cite the following papers when using this database:AugerThe Pierre Auger Collaboration, Proceedings of the 35th International Cosmic
Ray Conference, Vol. ICRC2017, Proceedings of Science, 2017, p. 486CREAM-I/IIIYoon et al., The Astrophysical Journal 839.1 (2017), p. 5GAMMATer-Antonyan, Physical Review D89.12 (2014), p. 123003HAWCAlfaro et al., Physical Review D96.12 (2017), p. 12201HiRes/MIAAbu-Zayyad et al., The Astrophysical Journal 557 (2001), pp. 686-699HiRes-I and HiRes-IIAbbasi et al., Physical Review Letters 100 (2008), p. 101101IceTop-73Aartsen et al., Physical Review D88.4 (2013), p. 042004KASCADEAntoni et al., Astroparticle Physics 24 (2005), pp. 1-25KASCADE-GrandeApel et al., The Astrophysical Journal 36 (2012), pp. 183-194Tibet-IIIAmenomori et al., The Astrophysical Journal 678 (2008), pp. 1165-1179CRDBMaurin et al., Astronomy & Astrophysics 569 (2014), A32CRDB v4.0Maurin et al., Universe 6 (2020) 8, 102NotesI have created this database in mid of 2017 when I started writing on my PhD
thesis. In case you find a publication with newer data, feel free to request
its addition.
Package: crstr
crstrshell wrapper forrstrinstallationpip install crstrusageSimple usageGennerate a string of random length between 1-255python -m crstr -c <--CHARSET-->
# e.g. 
# python -m crstr -c 'abcdefg'Advanced usageThe extra options are actually pre-defined charsetspython -m crstr [-h] [--version] [-l strlength]
                [-B | -x | -X | -o | -b | -d | -a | -A | --lower-case | -w | --lower-word | --upper-word | -c charset]
                [-v | -p | -r regex]

  -l strlength, --length strlength
                        The length of the output string
  -B, --64, --base64    use base64 charset
  -x, --16, --hexadecimal
                        use lower-case hexadecimal charset
  -X, --16U, --HEXADECIMAL
                        use upper-case hexadecimal charset
  -o, --8, --octal      use octal charset
  -b, --2, --binary     use binary charset
  -d, --10, --decimal   use decimal charset
  -a, --alpha           use alphabet (both upper-case & lower-case) charset
  -A, --ALPHA           use upper-case alphabet charset
  --lower-case          use lower-case alphabet charset
  -w, --word            use word charset (alphabet & number)
  --lower-word          use lower-case word charset
  --upper-word          use upper-case word charset
  -c charset, --charset charset
                        use customized charset
  -v, --variable        generate python variable-name-allowed string
  -p, --package         generate common package-name-styled string
  -r regex, --regex regex
                        use customized regexYou can give this command an alias to simplify the it:Add the following line to you bashrcUsually~/.bashrc(current user) or/etc/bashrc(global); if you use Git
For Windows, it's/etc/bash.bashrcalias crstr='python -m crstr'Then you can use the commandcrstr [options]CAUTIONSAn error would occur when attempting to generate a random string longer than
101 characters using regex, this is a known bug ofrstrwhich is the core
library of this program
Package: crsysapi
This is a Python interface to theCryptoSys APIlibrary <https://www.cryptosys.net/api.html>.CryptoSys API is a library to carry out “symmetrical” encryption using block ciphers like AES and Triple DES;
stream ciphers ArcFour, Salsa and ChaCha20; Authenticated Encryption with Additional Data (AEAD);
message authentication algorithms HMAC, CMAC and KMAC;
hash functions SHA-1, SHA-2 and SHA-3; the PBKDF2 and SCRYPT key derivation functions; and more.Requires: Python 3.
CryptoSys API v6.22.1 or above must be installed on your system.
This is available fromhttps://www.cryptosys.net/api.html.To use in Python’s REPLUsing wild import for simplicity.>>>fromcrsysapiimport*# @UnusedWildImport>>>Gen.version()# "hello world!" for CryptoSys API62201>>>Hash.hex_from_data(b'abc')# compute SHA-1 hash in hex of 'abc' as bytes'a9993e364706816aba3e25717850c26c9cd0d89d'>>>Hash.hex_from_string('abc',Hash.Alg.SHA256)# same but over a string and using SHA-256'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad'>>>h=Hash.data(b'abc')# h is a byte array (bytes->bytes)>>>print(Cnv.tohex(h))# display the byte array in hexA9993E364706816ABA3E25717850C26C9CD0D89DThe stricter way using thecrsysapiprefix.>>>importcrsysapi>>>crsysapi.Gen.version()# Underlying core CryptoSys API dll62201>>>crsysapi.__version__# crsysapi.py module version6.22.1.0000>>>crsysapi.Hash.hex_from_data(b'abc')# compute SHA-1 hash in hex of 'abc' as bytes'a9993e364706816aba3e25717850c26c9cd0d89d'>>>crsysapi.Hash.hex_from_string('abc',crsysapi.Hash.Alg.SHA256)# same but over a string and using SHA-256'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad'>>>h=crsysapi.Hash.data(b'abc')# h is a byte array (bytes->bytes)>>>print(crsysapi.Cnv.tohex(h))# display the byte array in hexA9993E364706816ABA3E25717850C26C9CD0D89DNote thatcrsysapi.Gen.version()gives the version number of the underlying core (native) CryptoSys API DLL,
andcrsysapi.__version__gives the version of the Python crsysapi module.ExamplesThere is a series of tests intest_crsysapi.py(source).
This creates any required test files automatically.
You should find an example there of what you want to do.post1 Update2023-01-08: Updated distribution to use pyproject.toml and build instead of setup.py, and removed troublesome and unnecessary requirements file
(which messed up pytest).ContactFor more information or to make suggestions, please contact us athttps://www.cryptosys.net/contact/David IrelandDI Management Services Pty LtdAustralia<https://www.di-mgt.com.au> <https://www.cryptosys.net>8 January 2024
Package: crtime
crtimeGet creation time of files for any platform and no external dependencies.CaveatLinux requires sudo! There is no way to avoid this, as creation time is not exposed by the kernel.It uses debugfs to mount the filesystem, as the information is actually contained on most linux platforms.Speed: because it does one query for a whole directory, it is roughly 1000x faster than any other method (such as thexstatutility that can be found online).Installationpip install crtimeUsageIn a shell:crtime.# 1552938709\tfile_a.pyIn Pythonfromcrtimeimportget_crtimes_in_dirforfname,dateinget_crtimes_in_dir(".",raise_on_error=True,as_epoch=False):print(fname,date)# file_a.py Mon Mar 18 20:51:18 CET 2019
Package: crtsearch
CRTSHcrt.sh data scraping script in pythonSimple Python3 Script for scraping data fromcrt.sh.Usagepython3 main.py -d 'gauravraj.tech'[elliot@archlinux]crtshpythonmain.py-d'gauravraj.tech'╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│FoundSubdomains-CRT.SH│
╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯[+]gauravraj.tech[+]blog.gauravraj.tech[+]*.gauravraj.techpython3 main.py -d 'gauravraj.tech' -r[elliot@archlinux]crtshpythonmain.py-d'gauravraj.tech'-r
╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│RawData-CRT.SH│
╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯[{'issuer_ca_id':183267,'issuer_name':"C=US, O=Let's Encrypt, CN=R3",'common_name':'gauravraj.tech','name_value':'gauravraj.tech\nwww.gauravraj.tech','id':4875700034,'entry_timestamp':'2021-07-15T08:11:14.637','not_before':'2021-07-15T07:11:14','not_after':'2021-10-13T07:11:13','serial_number':'0356c649bd123e7773333fb45324e776f294'},{'issuer_ca_id':183267,'issuer_name':"C=US, O=Let's Encrypt, CN=R3",'common_name':'gauravraj.tech','name_value':'gauravraj.tech\nwww.gauravraj.tech','id':4868425658,'entry_timestamp':'2021-07-15T08:11:14.235','not_before':'2021-07-15T07:11:14','not_after':'2021-10-13T07:11:13','serial_number':'0356c649bd123e7773333fb45324e776f294'},...........CreditsCreator:Gaurav RajPortfolio:gauravraj.techBlog:blog.gauravraj.techTryHackMe:hackersbrainHackTheBox:hackersbrainTwitter:thehackersbrainInstagram:thehackersbrainProjects:GitHub
Package: crucio
crucioCrucio is a python sci-kit learn inspired package for class imbalance. It use some classic methods for class balancing taking as parameters a data frame and the target column.This version of kydavra has the next methods of feature selection:ADASYN.ICOTE (Immune Centroids Oversampling).MTDF (Mega-Trend Difussion Function).MWMOTE (Majority Weighted Minority Oversampling Technique).SMOTE (Synthetic Minority Oversampling Technique).SMOTENC (Synthetic Minority Over-sampling Technique for Nominal and Continuous).SMOTETOMEK (Synthetic Minority Oversampling Technique + Tomek links for undersampling).SMOTEENN (Synthetic Minority Oversampling Technique + ENN for undersampling).SCUT (SMOTE and Clustered Undersampling Technique).SLS (Safe-Level-Synthetic Minority Over-Sampling TEchnique).TKRKNN (Top-K ReverseKNN).All these methods takes the pandas Data Frame and y column to balance on.How to use crucioTo use balancer from crucio you should just import the balancer from crucio in the following framework:fromcrucioimportSMOTEclass names are written above.Next create a object of this algorithm (I will use SMOTE method as an example).method=SMOTE()To balance the dataset on the target column use the ‘balance’ function, using as parameters the pandas Data Frame and the column that you want to balance. Small tip, balance only the training set, not full one.new_dataframe=method.balance(df,'target')Returned value is a new data frame with the target column balanced.With love from Sigmoid.We are open for feedback. Please send your impression tovladimir.stojoc@gmail.com
Package: crucyble
crucybleACython Wrapped GloVe (Global Vectors for Word Representation)crucible, noun.Pronounciation: \ ˈkrü-sə-bəl \a vessel of a very refractory material used for melting...a severe testa vessel of a very refractory (see refractory entry 1 sense 3) material (such as porcelain) used for melting and calcining a substance that requires a   high degree of heatSynonyms: gauntlet, ...source: merriam-websterOverviewThis library aims to provide the GloVe algorithm in a nearly-unaltered format relative to its original distribution by stanfordnlp.The bulk of the alterations consist of removing themain()methods from the glove applications, and converting them to accept filenames instead of stdin/stdout. (See pull requests1,2, and3)These altered C sources are then wrapped with Cython to provide "native extensions" in the Python runtime.DevelopmentLocal TestingPrerequisites:gccandcythoninstalled.To test this library locally:clone the repofromcrucyble/runpython setup.py build_ext -itry:PYTHONPATH=. python test/test_glove.pyexamine the outputs!You can change the corpus variable intest_glove.pyto point to any corpus you have locally.Contributing...coming soonPerformanceTodo... :shrug:License InfoDerivative implementation of theGloVe library from Stanfordredistributed in accordance withApache Licenseand redistributed underMIT License
Package: crudal
CRUDALReady to use CRUD methods for SQLAlchemy models. BothSyncandAsyncpip install crudalExamplesSyncModel initializationfromcrudalimportDeclarativeCrudBasefromsqlalchemyimportInteger,String,create_enginefromsqlalchemy.ormimportMapped,mapped_column,sessionmakerengine=create_engine("sqlite://")SessionLocal=sessionmaker(engine,expire_on_commit=False)classUser(DeclarativeCrudBase):__tablename__="person"__session__=sessionmaker(engine,expire_on_commit=False)id:Mapped[int]=mapped_column(Integer,primary_key=True)name:Mapped[str]=mapped_column(String,nullable=False)DeclarativeCrudBase.metadata.create_all(bind=engine)Add new itemuser=User(name="Andrew")user.add()Find itemFind all users with name equalsAndrewusers_found=User.find(name="Andrew")foruinusers_found:assertu.name=="Andrew"Update itemChange name of all users with nameAndrewtoJohnUser.update(session=session,values=dict(name="John"),name="Andrew")Delete itemUser.delete(name="John")AsyncfromcrudalimportDeclarativeCrudBaseAsyncfromsqlalchemyimportInteger,String,create_enginefromsqlalchemy.ormimportMapped,Session,mapped_columnclassUser(DeclarativeCrudBaseAsync):__tablename__="person"id:Mapped[int]=mapped_column(Integer,primary_key=True)name:Mapped[str]=mapped_column(String,nullable=False)FindwithSession(bind=engine)assession:p=User(name="Andrew")p.add(session=session)p2=User(name="Bob")p2.add(session=session)# find person with name "Andrew"andrew=User.find(session=session,name="Andrew")all_users=User.all(session=session)foruinall_users:print(u.name)
Package: crudantic
CrudanticA simple persistence library forPydanticthat uses Google Cloud Datastore (Firestore in Datastore mode) as its default backend.Ideally suited for developers using Pydantic on GCP with cloud functions or other serverless infrastructure like CloudRun.Because sometimes you don't need a relational database or fully featured ORM; you just need to stash and grab objects while preserving type safety in your code.StatusThis is an alpha-preview with a minimal featureset:CRUD operations on objectsSupport for nested objects/entities via embeddingSimple listing of objects by entity kindBackend is Google Cloud Firestore in Datastore modeInstallationpip install crudanticNote: Intermittent issues withpypi.orgregistrations, the library is available from github via:pip install TBSIn the meantime, clone this repo and install from there.UsageSeeexamplesDeveloping / ContributingI'm happy to review pull requests for bug fixes and new functionality.To develop on the library:git clone git@github.com:dbb613/crudantic.git
cd crudantic
git checkout development
poetry install
poetry buildMissing/Future FeaturesAdvanced configurationNested objects are always embedded in the parent entity.Additional nested object strategies are planned:Ancestor/descendant entity instancesRelated top-level entity instancesTransactionsSchema versioningEnfore validate on Create/SaveFiltering/QueryingBulk data migration