Saravanan666/pypi-org huggingface dataset:
Package: cs.gvutils
Graphviz utility functions.Latest release 20230816:
DOTNodeMixin: new dot_node_attrs_str for transcribing a node attributes list.See also the [https://www.graphviz.org/documentation/](graphviz documentation)
and particularly the [https://graphviz.org/doc/info/lang.html](DOT language specification)
and the [https://www.graphviz.org/doc/info/command.html](dotcommand line tool).ClassDOTNodeMixinA mixin providing methods for things which can be drawn as
nodes in a DOT graph description.Functiongvdata(dot_s, **kw)Convenience wrapper forgvprintwhich returns the binary image data.Functiongvdataurl(dot_s, **kw)Convenience wrapper forgvprintwhich returns the binary image data
as adata:URL.Functiongvprint(dot_s, file=None, fmt=None, layout=None, dataurl_encoding=None, **dot_kw)Print the graph specified bydot_s, a graph in graphViz DOT syntax,
tofile(defaultsys.stdout)
in formatfmtusing the engine specified bylayout(default'dot').Iffmtis unspecified it defaults to'png'unlessfileis a terminal in which case it defaults to'sixel'.In addition to being a file or file descriptor,filemay also take the following special values:GVCAPTURE: causesgvprintto return the image data asbytesGVDATAURL: causesgvprintto return the image data as adata:URLForGVDATAURL, the parameterdataurl_encodingmay be used
to override the default encoding, which is'utf8'forfmtvalues'dot'and'svg', otherwise'base64'.This uses the graphviz utilitydotto draw graphs.
If printing in SIXEL format theimg2sixelutility is required,
seehttps://saitoha.github.io/libsixel/.Example:data_url = gvprint('digraph FOO {A->B}', file=GVDATAURL, fmt='svg')Functiongvsvg(dot_s, **kw)Convenience wrapper forgvprintwhich returns an SVG string.Functionquote(s)Quote a string for use in DOT syntax.
This implementation passes identifiers and sequences of decimal numerals
through unchanged and double quotes other strings.Release LogRelease 20230816:
DOTNodeMixin: new dot_node_attrs_str for transcribing a node attributes list.Release 20221207:
New gvsvg() convenience function to return SVG.Release 20221118:quote: provide escape sequence for newline.DOTNodeMixin: provide .dot_node_id property, defaultstr(id(self)).DOTNodeMixin.dot_node: omit [attrs] if they are empty.DOTNodeMixin: new .dot_node_palette_key property, newgetattrfor .dot_node_*color attributes, new empty default DOT_NODE_COLOR_PALETTE and DOT_NODE_FILLCOLOR_PALETTE class attributes.DOTNodeMixin.dot_node: include the node label in the attributes.Add colours to DOTNodeMixin.dot_node_attrs and fix "fontcolor".Release 20220827.1:
gvprint: new optional parameter dataurl_encoding to specify the data URL encoding.Release 20220827:Remove dependency on cs.lex - now we need only the stdlib.New GVCAPTURE value for gvprint(file=) to return the binary image data as a bytes object; associated gvdata() convenience function.New GVDATAURL value for gvprint(file=) to return the binary image data as a data URL; associated gvdataurl() convenience function.Release 20220805.1:
New DOTNodeMixin, a mixin for classes which can be rendered as a DOT node.Release 20220805:
Initial PyPI release.
Package: csharpstring
csharpstringA general class that provides dot-net style syntax for python string manipulations.Static & Instance NamespacesTo more easily separate the objective, from non-objective functionality there are two
classes internally that can be used.csharpstring.instancecsharpstring.staticInstance Methodsvalue1 = instance("The quick brown fox");print(value1)The quick brown foxvalue2 = instance("jumped over the lazy dog");print(value2)jumped over the lazy dogvalue3 = value1.Append(value2);print(value3)The quick brown fox jumped over the lazy dogvalue4 = value3.Substr(10,30);brown fox jumped ovevalue5 = value3.Replace("quick", "speedy");print(value5)The speedy brown fox jumped over the lazy dogStatic Methodsdate = "10/31/22";time = "8:30 PM";print(static.Format("It is $0 on $1; do you know where your children are?", time, date));print(static.Join(" ", value1, value2));It is 8:30 PM on 10/31/22; do you know where your children are?
The quick brown fox jumped over the lazy dog
Package: csharpy
READMELinks:GitHub/csharpydocumentationBlogIntroductionHelpers to play with C# and Python.
It can easily compile and wrap a C# function
into Python:from csharpy.runtime import create_cs_function
code = "public static double SquareX(double x) {return x*x ; }"
SquareX = create_cs_function("SquareX", code)
print(SquareX(4))The module relies onpythonnet.InstallationWindowspip install csharpyLinuxFollow the instructions described inconfig.yml.Historycurrent - 2019-01-08 - 0.00Mb9: implements sphinx extension runcsharp (2018-08-19)8: catch standard output and error when running a C# script (2018-08-19)5: run unit tests for C# (2018-06-16)6: add Debug and Release folder in assemblies (2018-06-14)0.1.53 - 2018-05-20 - 0.02Mb2: fix CI (2018-05-20)1: first commit (2018-05-17)
Package: cs.hashutils
Convenience hashing facilities.Latest release 20240211:
Initial PyPI release: BaseHashCode(bytes) and subclasses for various hash algorithms.ClassBaseHashCode(builtins.bytes)Base class for hashcodes, subclassed bySHA1,SHA256et al.ClassMD5(BaseHashCode, builtins.bytes)Hash class implementation.ClassSHA1(BaseHashCode, builtins.bytes)Hash class implementation.ClassSHA224(BaseHashCode, builtins.bytes)Hash class implementation.ClassSHA256(BaseHashCode, builtins.bytes)Hash class implementation.ClassSHA384(BaseHashCode, builtins.bytes)Hash class implementation.ClassSHA512(BaseHashCode, builtins.bytes)Hash class implementation.Release LogRelease 20240211:
Initial PyPI release: BaseHashCode(bytes) and subclasses for various hash algorithms.
Package: cshelph
C-SHELPh V2C-SHELPh is the Classification of Sub-aquatic Height Extracted Photons. It is designed to isolate bathymetric photons in ICESat2 ATL03 files.InstallationIt is recommended that the dependancies are installed via:conda install -c conda-forge geopandas utm numpy matplotlib s3fs xarray zarr pyproj proj-data h5py earthaccess h5netcdf dask tqdm

pip install cshelphUsing C-SHELPhThis software is accompanied by two run scripts:run_bathymetry_extraction.ipynb: A notebook designed to process single tracks to gain familiarity with the softwarerun_bathy_extraction.py: Automated runs of c-shelph for mass processingA simple use of C-SHELPh is:python run_bathy_extraction.py -i icesat2_atl03_file.h5 -l 1 -th 20where:-i: the input ICESat2 ATL03 h5 file
-l: laser number (1-3)
-th: density threshold value (percentile; 0-100) which is used to change the sensitivity of the photon classification to noiseAdditional options can be specifed to customize runs and override defaults (which are based on some underlying assumptions)FAQsWhy does C-SHELPh classify my water surface as bathy?C-SHELPh performs an orthometric correction that models the water surface at approximately 0m elevation in reference to the EGM2008 geoid. In some locations this is not true and so C-SHELPh gets confused and thresholds set in the code to help C-SHELPh find the water surface are not sufficient. Thresholds can be passed in as arguments.Why isn't C-SHELPh detecting my bathy pointsC-SHELPh classifies photons based on photon density. In cases where the noise is higher than the signal (e.g., a small quantity of steep/deep and/or turbid waters) C-SHELph struggles to perform well. Optimum conditions for C-SHELPh are clear shallow waters.Additional notesNote: The refraction correction currently uses photon level metrics (photon azimuth, photon elevation, satellite elev) to get an as accurate bathymetric model as possible. This requires some assuptions about the spacecraft orbit (its vertical movements are a constant rate thus linear interpolation holds true) and geometry and radius of the Earth. Ultimately, the advantages of increased precision of this implementation are believed to outweigh uncertainty introduced by the assumption. The refraction correction follows that outlined by the excellent Parrish et al., 2019 publication:https://www.mdpi.com/2072-4292/11/14/1634
Package: cshpy3
cshpy=====A collection of Python 3 utilities and wrappers for services run by [Computer Science House](http://csh.rit.edu/) at RIT.## Installation$ pip install cshpy3(or just download the source)## Basic Usage```python#!/usr/bin/pythonfrom csh.cshldap import LDAP# Creates a connection to CSH's LDAP server as an object with some helper functions# You can also omit the username and password to bind with a Kerberos ticketldap = LDAP('<user>','<password>')# Returns a list of results, in this case of users whose uid starts with 'duck'.# All CSH LDAP fields are included in a similar way.ldap.search(uid='duck*')# This will return users whose common names (cn) start with 'Chris'ldap.search(cn='Chris')# This will return users whose uid starts with 'user', and cn starts with 'Name'ldap.search(uid='user*', cn='Name*')# Returns a dict of a user's attributes. Performs a search, and then grabs the first result.# Are you feelin' lucky?ldap.member('uidValue')# Equivalent to search(uid='*')ldap.members()# You may optionally include a search string.# Equivalent to search(uid='username')ldap.members('test')```## Functions### search()Search returns a list of tuples containing a string and a dictionary.The first element of each tuple is the Distinguished Name (dn) of the entry.This is the path to the entry in ldap. The second element of each tuple is adictionary of attributes as keys.Specific tweaks for CSH include the insertion of two fields, `groups` and `committee`.If a member is on eboard, `committee` will have the name of their committee. Otherwise,this field will not be present.`groups` will contain a list of all the groups a member belongs to.So to be clear the return looks like this: `[('dn',{attributes})]`You may optionally specify a different base than the default. `search(base=...)`####Word of caution: Not all results are guaranteed to have the same attribute fieldsin their dictionary. Do not depend on all users having a `twitterName` for example.### modify(uid, attr1=val1, attr2=val2)Given a uid, and attribute values, modifies those values in ldap.You may optionally specify a base other than Users.### member(uid)Returns a dict of attributes for the user. Equivalent to `search(uid=uid)[0][1]`.### members()Returns a list of users. Shorthand for `search(uid='*')`, or some variant *### group(cn)Searches groups by common name, returns a list of users in that group.### getGroups(dn)Returns a list of cns for groups the given member is a part of.### rtps()Returns a list of rtps. Shorthand for `group('rtp')`### drinkAdmins()Returns a list of drink admins. Shorthand for `group('drink')`### eboard()Returns a list of eboard members. Shorthand for `group('eboard')`
Package: csh-sanitizer
csh_sanitizerinstall csh_sanitizer usingpip install git+https://github.com/sunil-reglobe/csh-sanitizer.git#egg=csh_sanitizerpip install git+ssh://git@github.com/sunil-reglobe/csh-sanitizer.git#egg=csh_sanitizerSetupAdd 'csh_sanitizer' to your INSTALLED_APPS:INSTALLED_APPS = [
    .....  
    'csh_sanitizer',
    ...
]
Package: cs.html
Malformed markup is enraging. Therefore, when I must generate HTML I construct a token structure using natural Python objects (strings, lists, dicts) and use this module to transcribe them to syntacticly correct HTML. This also avoids lots of tedious and error prone entity escaping.A “token” in this scheme is:a string: transcribed safely to HTML, eg “some text here”an int or float: transcribed safely to HTML, eg 1 or 2.5.a sequence: an HTML tag: element 0 is the tag name, element 1 (if a mapping) is the element attributes, any further elements are enclosed tokens, eg: [‘H1’, {‘align’: ‘centre’}, ‘Heading Text’]because a string like “&foo” gets its “&” transcribed into the entity “&amp;”, a single element list whose tag begins with “&” encodes an entity, example: [”&lt;”]a preformed token object with .tag (a string) and .attrs (a mapping) attributesCore functions:transcribe(*tokens): a generator yielding strings comprising HTMLxtranscribe(*tokens): a generator yielding strings comprising XHTMLattrquote(s): quote the stringsfor use as a tag attribute according to HTML 4.01 section 3.2.2nbsp(s): convertsto nonbreaking text: generator yielding tokens with whitespace converted to &nbsp; entitiesConvenience routines:transcribe_s(*tokens): converttokensinto a string containing HTMLxtranscribe_s(*tokens): converttokensinto a string containing XHTMLObsolete:tok2s: transcribe tokens to a string; trivial wrapper for puttokputtok: transcribe tokens to a filetext2s: transcribe a string to an HTML-safe string; trivial wrapper for puttextputtext: transcribe a string as HTML-safe text to a fileExample:from cs.html import transcribe, transcribe_s, xtranscribe, puttok
[...]
table = ['TABLE', {'width': '80%'},
         ['TR',
          ['TD', 'a truism'],
          ['TD', '1 < 2']
         ]
         ['TR',
          ['TD', 'a couple'],
          ['TD', 'A & B']
         ]
        ]
prose_with_table = [
          'Here is a line with a line break.', ['BR'],
          'Here is a trite table:',
          table,
        ]
[...]
print('Here is the table's HTML:', transcribe_s(table))
[...]
# write HTML tokens to a file
for s in transcribe(['H1', {'align': 'left'}, 'Prose'], *prose_with_table):
  fp.write(s)
[...]
# write XHTML tokens to a file
for s in xtranscribe(*prose_with_table):
  fp.write(s)
Package: cs.htmlmailer
IntroductionThis small library has a method to create a MIME Multipart email object
with HTML and Text content to be able to send it by e-mail.This allows you to prepare an HTML content (with a templating language)
and forget about the text representation of the HTML; just import the
method and call it with the HTML content and the e-mail headers (to, cc,
subject, …)This is the signature of the method:def create_html_mail(subject, html, text=None, from_addr=None, to_addr=None,
                   cc_addrs=[], headers=None, encoding='UTF-8'):Changelog2.1 (2023-04-26)Remove Message-Id header generation
[erral]2.0 (2020-02-10)python3 compatibility
[erral]1.0 (2012-02-02)Initial release
[erral]
Package: cs.i18n
We found ourselves constantly changing the way Plone and LinguaPlone
show the language change forms.We don’t like the way Plone and LinguaPlone have for showing the
language change in a combo-box using Javascript to redirect the user
when no flags are used.We want to have a simple product that just needs to be put in the
PYTHONPATH, install it, and have plaintext links to get the language
changed.We think that the language names must be shown in the native language:
Espanol, Francais, Euskara or English, not always in English or in the
interface’s language.This is what our product does. You have just had to disable the “show
flags” checkbox in the portal_languages (for now in the ZMI, until
someone ports LinguaPlone’s language control panel to Plone and adds
all that features it had beforehand, but we have no hope for this,
because Wiggy said in a mailing list that they don’t want to release
an out-of-the-box language-changeable Plone)..So, if you want to have plain-text links without Javascript, and
language names in the native language, this is your product !(and is my first Python egg ;))
Package: csiparser
ESP32 Wi-Fi CSI Python ParserThis is a Python parser for ESP32 Wi-Fi Channel State Information (CSI) based on the ESP32 CSI specification.This project usesESP CSI Toolkitcreated by Hernandez and Bulut.InstallationRun the following to install:pipinstallcsiparserUsage# Import ESP32 CSI parserimportcsiparser# Parse and filter CSI dataexample_csi=(csiparser.ESP32("./esp32_dataset/example_csi.csv").filter_by_sig_mode(1).get_csi().remove_null_subcarriers().get_amplitude_from_csi().get_phase_from_csi())# Retrieve example amplitudeexample_amplitude=example_csi.amplitude# Retrieve example phaseexample_phase=example_csi.phaseFurther the amplitude and phase information can be plotted to visualize the distortion in amplitude and phase shift as follows:SeeExamplesdirectory for full example.LicenseDistributed under the MIT License. See LICENSE for more information.
Package: csiphash
SipHashis a hash function and message
authentication code that is secure, fast and simple. It accepts a
128-bit secret key and a variable-length message, and returns a 64-bit
hash. It performs better than most cryptographic hash function-based
MACs (especially for short inputs), and offers much better security than
non-cryptographic hash functions, providing resistance against
hash-flooding DoS attacks. As a result, it is now used as the hash
function of choice for hash tables in Python, Ruby, Rust and Redis.This Python package is the SipHash-2-4C reference
implementation, wrapped withCFFI. It’s incredibly fast: amortized
hashing times tested as follows on a mid-2015 MacBook Pro:Message SizeTime per Hash (Amortized over 1M)43 bytes4.89 microseconds256 bytes5.00 microseconds1500 bytes6.12 microseconds1 MiB0.88 millisecondsInstallationYou can get this library with pip:pip install csiphashUsageCurrently there’s just a single function,siphash24(), that accepts
a secret key bytestring of length 16 and an arbitrary length bytestring
for the message, and returns an 8-byte digest bytestring:>>>fromcsiphashimportsiphash24>>>siphash24(b'\x00'*16,b'hello, world!\n')b'\xf1G4\x95\xa5\xaa\xc2b'If you want to specify keys in hexadecimal, use.decode('hex'):>>>siphash24('abcdef01234567899876543210fedcba'.decode('hex'),b'hello, world!\n')'\xd3\xd4N\x1dk\x1f$='If you want digests in hexadecimal, use.encode('hex'):>>>siphash24(b'\x00'*16,b'hello, world!\n').encode('hex')'f1473495a5aac262'LicenseThe reference C implementation of SipHash is bundled with this library.
It was written by Jean-Philippe Aumasson and Daniel J. Bernstein, and is
released under theCC0.Sixis bundled with this library. It
was written by Benjamin Peterson, and is licensed under theMIT
License.All other software in this library is released under theUNLICENSE:This is free and unencumbered software released into the public
domain.Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a
compiled binary, for any purpose, commercial or non-commercial, and
by any means.In jurisdictions that recognize copyright laws, the author or
authors of this software dedicate any and all copyright interest in
the software to the public domain. We make this dedication for the
benefit of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to
this software under copyright law.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 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.For more information, please refer tohttp://unlicense.org/
Package: csiphash24
python-csiphash24SipHash-2-4 implementation, CFFI-wrapped for Python.It just works. If you have Python ≥ 3.6.Inspired byhttps://github.com/majek/csiphashandhttps://github.com/zacharyvoase/python-csiphash.How to install$pipinstallcsiphash24How to use>>>frombinasciiimporthexlify>>>fromcsiphash24importsiphash24>>>hexlify(siphash24(b'0123456789abcdef',b'hello'))b'95a3a242a9dd85d1'Is it fast ?On my late-2016 MacBook Pro, hashing a 256-bytes message takes less than a microsecond on average (about 780 nanoseconds to be precise).
Package: csi-tai
Using the CSI API LibraryPlease note this module was created in order to simplify bulk data pulling from the Virtual Observer API. This project is in no way affiliated withCSI World / Virtual Observer.Getting StartedTo get started install the requests module using the following command.python -m pip install csi-taiBasic Get Useage:baseURL = "https://cloud.csiworld.com/VOWebAPI/v5"  
csi = CsiConnector(token, baseURL)  
params = {'filter': 'f.FName|o.eq|v.Tippett',  
              'fields': 'FName, LName',  
              'perpage':100}  
data = csi.query(Endpoints.AgentInfo, params)Basic Post Useage:baseURL = "https://cloud.csiworld.com/VOWebAPI/v5"  
csi = CsiConnector(token, baseURL)  
data = {'User': 'jsmith', 'Function': 'Pause'}  
csi.query(Endpoints.lightstout, data)
Package: csiweb
Campbell Scientific CR6 WiFi Python Clientcsiwebis a Python package to interface a Campbell Scientific data logger via
its CSI web server interface.InstallationFirst, make sure you have a recent version ofsetuptools:python3-mpipinstall--user--upgradesetuptoolsThen, to install, run from the repository root:python3-mpipinstall--user.or install it fromPyPi:python3-mpipinstall--usercsiweb(Runsudo apt-get update && sudo apt-get -y install python3-pipif it
complains aboutpipnot being found)What cancsiwebdo?periodically query data from a CSI web serverpublish the data via MQTT to one or more configurable brokersa systemd user service file is also providedDocumentationDocumentation of thecsiwebpackage can be foundhere on
GitLab.Also, the command-line help pagecsiweb -his your friend.
Package: csj-parser
CSJ Parser for PythonComma Separated JSON (CSJ) is a CSV like file format designed for stream processing where each cell is valid JSON. This makes it very similar to CSV, but without the problems that CSV has.For more information, please visithttps://kirit.com/Comma%20Separated%20JSONInstallationCSJ Parser requires Python 3.5 or later to run.
CSJ Parser can be installed using pip:$ pip install csj-parserIf you want the latest release, you can install from git:$ pip install git+https://github.com/Proteus-tech/csj-parser.gitExamplesConvert JSON to CSJfromcsj_parser.csjimportCsjjson_list=[{"key1":"value1","key2":["item1","item2","item3"],"key3":{"key":"value"}},{"key1":10,"key2":None,"key3":None}]# This function returns a string of data in CSJ formatdefconvert_json_to_csj(json_dict):csj_string=Csj.from_dicts(json_dict)returncsj_stringconvert_json_to_csj(json_list)Output"key1","key2","key3"
"value1",["item1","item2","item3"], {"key":"value"}
10,null,nullConvert CSJ to JSONfromcsj_parser.csjimportCsjcsj_str='''"key1","key2","key3"\n"value1","value2","value3"\n"value4","value5","value6"\n'''# This function returns a dictionary of data in JSON formatdefconvert_csj_to_json(csj_string):json_dict=Csj.to_dict(csj_string)returnjson_dictconvert_csj_to_json(csj_str)Output[{'key1': 'value1', 'key2': 'value2', 'key3': 'value3'},{'key1': 'value4', 'key2': 'value5', 'key3': 'value6'}]
Package: cs-khipu
InstallationJust run:$ python setup.py installUsagefromkhipu.apiimportKhipuApiapi=KhipuApi('receiver_id','secret_key')data={'subject':'Asunto','body':'Descripci?n','amount':'10000','payer_email':'email','bank_id':'','expires_date':'Unix timestamp','transaction_id':'T-1000','custom':'','notify_url':'http://yourwebsite.cl/notificame/','return_url':'http://yourwebsite.cl/exito/','cancel_url':'','picture_url':''}result=api.create_payment(**data)printresultDocumentationYou can refer tohttps://khipu.com/page/apifor official API documentation.