Saravanan666/pypi-org huggingface dataset:
Package: shmgpsd
ShmGpsD: Shared Memory GPSD ReaderShmGpsD reads GPS data from shared memory-enabled GPSD instances, designed for seamless integration with InfluxDB via Telegraf exec inputs (JSON). Ideal for real-time updates and effortless communication with GPSD.Key Features:Read GPS data efficiently from shared memoryPerfect for integrating GPS data into InfluxDB via TelegrafStreamlined solution for applications requiring precise GPS informationElevate your applications with ShmGpsD – simplicity meets accuracy.Compiling gpsd: Optional (Only if OS distro lacks shared memory support)git clone git://git.savannah.nongnu.org/gpsd.git # or https://gitlab.com/gpsd/gpsd.git
git checkout release-3.18
scons timeservice=yes magic_hat=yes nmea0183=yes ublox=yes mtk3301=yes fixed_port_speed=115200 fixed_stop_bits=1 shm_export=yes shared=yes
sudo scons installUsageimport shmgpsd
mygps = shmgpsd.SHM()
for i in range(0, shmgpsd.MAXCHANNELS):
...     if mygps.skyview[i].PRN != 0:
...         print(f"PRN: {mygps.skyview[i].PRN:4}, "...               f"SNR: {mygps.skyview[i].ss:4}, "...               f"USED: {mygps.skyview[i].used:4}"  )
...
PRN:   19, SNR: 18.0, USED:    1
PRN:   22, SNR: 28.0, USED:    1
PRN:   17, SNR: 21.0, USED:    1
PRN:    6, SNR: 31.0, USED:    1
PRN:   14, SNR: 33.0, USED:    1
PRN:   24, SNR: 17.0, USED:    1
PRN:    3, SNR: 15.0, USED:    1
PRN:   46, SNR: 29.0, USED:    0
PRN:   11, SNR: 24.0, USED:    1
PRN:   12, SNR: 20.0, USED:    0
PRN:   30, SNR:  0.0, USED:    0
print(f"Satellites visible: {mygps.satellites_visible:2}")
Satellites visible: 11
print(f"Satellites used:    {mygps.satellites_used:2}")
Satellites used:     8
Package: shmgr
shmgrCLI tool that helps manage shell libraries.Badges 📛project status badges:version badges:tools / frameworks used by test suite (i.e. used bymake test):linters used to maintain code quality (i.e. used bymake lint):tools / frameworks used to render documentation (i.e used bymake build-docs):miscellaneous tools used to maintain this project:Installation 🗹Usingpipxto Install (preferred)This packagecouldbe installed using pip like any other Python package (in
fact, see the section below this one for instructions on how to do just that).
Given that we only need this package's entry points, however, we recommend thatpipxbe used instead:# install and setup pipxpython3-mpipinstall--userpipx
python3-mpipxensurepath# install shmgrpipxinstallshmgrUsingpipto InstallTo installshmgrusingpip, run the following
commands in your terminal:python3-mpipinstall--usershmgr# install shmgrIf you don't have pip installed, thisPython installation guidecan guide
you through the process.Useful Links 🔗API Reference: A developer's reference of the API exposed by this
project.cc-python: Thecookiecutterthat was used to generate this project.
Changes made to this cookiecutter are periodically synced with this project
usingcruft.CHANGELOG.md: We use this file to document all notable changes made to
this project.CONTRIBUTING.md: This document contains guidelines for developers
interested in contributing to this project.Create a New Issue: Create a new GitHub issue for this project.Documentation: This project's full documentation.
Package: shml
shml: routines to automate machine learning experiments for a X -> SH -> bbyy searchThis module aims to provide a set of functions that, when composed, can run a pipeline capable of:going from.rootfiles toparquetfiles viauprootandawkwardconstructing useful kinematic quantites for trainingapplying a chosen or manual preselectionconfiguring any additional processing, e.g. weight normalization, feature scalingaccess event data that's prepared forpytorchusingshml.torch_dataset.EventDatasetstill to do:infra to run ml experiments in a GPU or CPU environment viapytorch-lightiningUsageTo see currently usable implemented functionality, check theexamplesfolder.InstallFor preprocessing only:python3 -m pip install shmlFor ML extras (pytorch, plotting):python3 -m pip install shml[ml]
Package: sh-molli
# Process MOLLI and shMOLLI dataReads a directory of shMOLLI DICOM images and processes the data to produce a look-locker corrected T1 map. Negative values are cropped to 0.Two possible methods for processing the data are available.Fast (default). Uses some numerical methods to solve exponential equations of the correct form. May be slightly less accurate, but significantly faster.Slow. Uses scipy curve fitting algorithm to fit the exponential curve. More accurate, but much slower.The difference between the two methods is very little as demonstrated in the figure below.![fast_slow comparison](fast_slow.tif “Comparison of fast and slow fitting methods”)Any pixels/voxels where the max value is less than 100 is skipped. NB: For this version, data is processed top-left to bottom-right in the image. As images are often empty around the edges, this means the the processing is ‘fast’ to start with as each pixel is basically skipped, then slows down as the true data is processed, then speeds up again at the end.## UsageAs module`python > pip3 install sh_molli > process_sh_molli_series.py-i<inputfolder>-o<outputfilename>-p<plot_flag>-m<method> `In code`python > python3 > import sh_molli.sh_molli as sh > im =sh.process_folder(dir,method='fast')`-i - input folder must be a path containing DICOM images only Can process data based on ‘Inversion Time’ being stored in dcm.TriggerTime, dcm.InversionTime and dcm.ImageComments-o - output file name. Uses PIL for image writing, so supports all formats that PIL understands. Recommended using example.tiff to ensure that large values are not cropped-p - plot flat (1, 0 or not present). If 1, the image will be displayed using matplotlib once the data is processed. Colorbar is cropped to 0-2000 range, sensible values for human tissue.-m - method. (‘fast’ or ‘slow’). See above.
Package: shmr
SHMRA set of high-order map-reduce functionsTable of ContentsIntroductionInstallationExamplesIntroductionThe goal of this library is to make it easier to process large data in parallel while not spending lots of time writing code. The typical workflow of this library is to split a huge file into smaller partitions and process each partition in parallel as the map-reduce framework. However, it does not require any setup as Spark or Hadoop except for one simplepipinstallation command. It is more suitable if you want to do something quick (and just one time).UsageThis library,shmr, is best used in the command line withxargsorparallel. You can see the list of supported arguments by printing help:$python-mshmr-h
usage:shmap-reduce(1.0.18)[-h][-v]-iINFILE[--skip_nrowsSKIP_NROWS][-dDESER_FN][-sSER_FN]<command>
...
optionalarguments:-h,--helpshowthishelpmessageandexit-v,--verbose-iINFILE,--infileINFILEthepathtoonepartitionorlistofpartitionsdependonthesub-program--skip_nrowsSKIP_NROWSSkipfirstnrowsofeachpartition-dDESER_FN,--deser_fnDESER_FNDeserializationfunction.Defaultis`orjson.loads`-sSER_FN,--ser_fnSER_FNSerializationfunction.Defaultis`orjson.dumps`The most important argument is the positional argument<command>, which is the operator you want to run. There are two types of operator: the one that is applied on one partition, starts withpartition.*, and the other one that is applied on all partitions, starts withpartitions.*. The help command above will show you all of the possible commands, which is truncated for readability. You can get details of a command using help as well. For example:$python-mshmrpartition.map-h
usage:shmap-reduce(1.0.18)partition.map[-h]--fnFN--outfileOUTFILE

Applyamapfunctiononeveryrecordofthispartition

optionalarguments:-h,--helpshowthishelpmessageandexit--fnFN(str)animportpathofthemapfunction,whichshouldhasthissignature:(record:Any)->Any--outfileOUTFILE(str)outputfileofthenewpartition,`*`or`{stem}`inthepathareplaceholders,whichwillbereplacedbythestem(i.e.,filenamewithoutextension)ofthecurrentpartitionAutomatic partition namingThere are some variables you can use in naming the output partitions:{stem}: will be replaced by the stem of the current mapping partition{auto}: an incremental number of the new partition*or{}: a special placeholder that is either{stem}or{auto}, depends on the function you are using. If the function generates multiple partitions (e.g.,group_byfunction), then*or{}will be replaced by{auto}, otherwise, it will be replaced by{stem}. Note that{stem}of multiple partitions will always be replaced by an empty stringInstallationFrom PyPi:pip install shmrExamplesBelow are some examples:Split one file (partition) to multiple files (partitions)shmr-i<file_path>partitions.coalesce--outfile<output_files>--num_partitions=128Parallel applying a mapping functionls<input_files>|xargs-n1-I{}-P<n_threads>shmr-i{}partition.map--fn<func>--outfile<output_file>If you provide the-v, it will show the progression bar telling you how long it will take to process one partition.
Package: sh-nic-api
The package is the library for the API of Russian DNS registrar Ru-Center
(a.k.a. NIC.RU). It provides classes for managing DNS services,
zones and records.This fork:https://github.com/andr1an/nic-apiAsync version:https://github.com/shizacat/aionicInstallationUsingpip:pip install https://git+https://github.com/shizacat/nic-apiUsageInitializationTo start using the API, you should get a pair of OAuth application login and
password from NIC.RU. Here is the registration page:https://www.nic.ru/manager/oauth.cgi?step=oauth.app_registerfromnic_apiimportDnsApidefprint_token(token:dict):print("Token:",token)api=DnsApi(client_id="---",client_secret="---",username="---/NIC-D",password="---",scope="GET:/dns-master/.+",token_updater=print_token)# First you need to get tokenapi.get_token()Get tokenCall theget_token()method:# First you need to get tokenapi.get_token()Now you are ready to use the API.If you want, you may to save token to anything (example into file) throuht
callbacktoken_updaterand then he had used for authorize.
While the token is valie, you don’t need to provide neither username or password
to access the API.Viewing services and DNS zonesIn the NIC.RU, DNS zones are located in “services”:api.services()Usually there is one service per account. Let’s view available zones in the
serviceMY_SERVICE:api.zones('MY_SERVICE')Always check if the zone has any uncommitted changes to it before
making any modifications - your commit will apply other changes too!Getting DNS recordsFor viewing or modifying records, you need to specify both service and DNS
zone name:api.records('MY_SERIVCE','example.com')Creating a recordTo add a record, create an instance of one of thenic_api.models.DNSRecordsubclasses, i.e.ARecord:fromnic_api.modelsimportARecordrecord_www=ARecord(name='www',a='8.8.8.8',ttl=3600)Add this record to the zone and commit the changes:api.add_record(record_www,'MY_SERVICE','example.com')api.commit('MY_SERVICE','example.com')Deleting a recordEvery record in the zone has an unique ID, and it’s accessible viaDNSRecord.idproperty. When you got the ID, pass it to thedelete_recordmethod:api.delete_record(100000,'MY_SERVICE','example.com')api.commit('MY_SERVICE','example.com')Do not forget to always commit the changes!
Package: shnu-llq-tools
Prof.Li's Python Tools道法自然pip install -U shnu-llq-toolssample code as follows:``import numpy as np
import pandas as pddef create_name(name='姓名', rows=40):
xing = '赵钱孙李周吴郑王冯陈褚蒋沈韩杨朱秦尤许何吕施张孔曹严华金魏陶姜戚谢邹喻柏窦章苏潘葛奚范彭郎鲁韦昌马苗方俞任袁柳'
ming = "群平风华正茂仁义礼智媛强天霸红和丽平世莉界中华正义伟岸茂盛繁圆一懿贵妃彭习嬴政不韦近荣群智慧睿兴平风清扬自成世民嬴旺品网红丽文天学与翔斌霸学花文教学忠谋书"
x = np.random.choice(list(xing), (rows, 1))
m = np.random.choice(list(ming), (rows, 2))
nm = np.hstack((x, m))
df = pd.DataFrame(nm)
dff = pd.DataFrame()
df[2] = df[2].apply(lambda x: ('', x)[np.random.randint(0, 2)])
dff[name] = df[0] + df[1] + df[2]return dff[name]def create_columns(column_list, value_list, rows=40):
size = (rows, len(column_list))
if type(value_list[0]) == int and len(value_list) == 2:
return pd.DataFrame(np.random.randint(*value_list, size=size), columns=column_list)
else:
return pd.DataFrame(np.random.choice(value_list, size=size), columns=column_list)def generate(rows=40):
return pd.concat([
create_name('姓名', rows),
create_columns(['性别'], ['男', '女'], rows),
create_columns(['学校'], ['清华大学', '北京大学', '复旦大学', '上海师大', '上海交大'], rows),
create_columns(['班级'], ['计算机科学与技术', '人工智能', '数据科学'], rows),
create_columns(['英语', '政治','线代', '概率'], [20, 100], rows),
create_columns(['高数', '专业课', '表达能力','面试'], [30, 150], rows)],
axis=1)ifname== 'main':
print(generate(100))
``
Package: shoal
shoalOpinionated CLI Task Runner built on InvokeNOTE:This package has been archived in favor ofcalcipyandcorallium. Please seecalcipy for the latest informationInstallationcopier copy gh:KyleKing/calcipy_template .poetry add shoalUsageFor more example code, see thescriptsdirectory or thetests.Project StatusSee theOpen Issuesand/or theCODE_TAG_SUMMARY. For release history, see theCHANGELOG.ContributingWe welcome pull requests! For your pull request to be accepted smoothly, we suggest that you first open a GitHub issue to discuss your idea. For resources on getting started with the code base, see the below documentation:DEVELOPER_GUIDESTYLE_GUIDECode of ConductWe follow theContributor Covenant Code of Conduct.Open Source StatusWe try to reasonably meet most aspects of the "OpenSSF scorecard" fromOpen Source InsightsResponsible DisclosureIf you have any security issue to report, please contact the project maintainers privately. You can reach us atdev.act.kyle@gmail.com.LicenseLICENSE
Package: shoal-agent
Shoal Agent READMEVersion: v1.0.1Important to know about the configurationThe configuration has been simplified compared to previous versions and most settings are automatically configured at runtime.
There is also a setup script which should be run right after the pip install which will help to set the right options for the shoal-agent.
The config file is placed in /etc/shoal/shoal_agent.conf by the setup script and can be edited manually later on too.
The new shoal-agent is compatible with python3 as well as python2. It is recommended to use the python3 version.Included in frontier-squid, used by WLCGThefrontier-squidrpm distribution of squid (provided by the Worldwide LHC Computing Grid,
WLCG) includes shoal-agent which can be enabled in itsconfiguration.  It uses the same default shoal server.
The WLCG also includes shoal-tracked squids in its Web Proxy Auto
Discovery service (see above configuration link).Basic CommandsWith the basicshoal_agentinit script you can do the following:service shoal-agent start
service shoal-agent stop
service shoal-agent restartInstallationTherecommendedway to install is with pip.
Although, the Shoal agent does not require root privilege to run; by default theshoaluser and group is used; it should be installed as root.
If the shoal user and group do not exist then the install script will create the entries in the system.Note: Requires you have Python 3.6+, and the pika, netifaces python module (available from EPEL).Recommended Method: Use pip (est. ~5 min)Login as root or become root viasudo su -Install shoal-agent using pip/pip3, e.g.pip3 install shoal-agentRun the installation script,shoal-agent-installation.sh, to setup your configuration
Package: shobdohash
Shobdohash - Bengali Soundex ImplementationShobdohash is a Bengali Soundex Implementation to phonetically hash and compare similar words. Implemented from the
algorithm described by Naushad UzZaman and Mumit Khan inA Bangla Phonetic Encoding for Better Spelling Suggestions.InstallationStable Version$python-mpipinstallshobdohashDevelopment Version$python-mpipinstall-e'git+https://github.com:banglakit/shobdohash.git#egg=shobdohash'UsagefromshobdohashimportShobdoHashs=ShobdoHash()s('আমি')s('বাংলা')==s('বাঙলা')Running Tests$pipinstall-rrequirements-test.txt
$pytest
Package: shock-cooling-curve
shock-cooling-curveIntroductionThis package can be used to fit double-peaked supernova light curves using the following shock cooling emission models:PIRO 2015Sapir-Waxman 2017A) For a blue supergiant (n = 3)B) For a red supergiant (n = 3/2)PIRO 2020Package SetupBefore installationThis package utilizespysynphotin order to create synthetic photometry generated according to the analytical models
used. The user need to installpysynphotbefore installingshock_cooling_curvewhich includes downloading requiredpysynphotfiles and adding them to user path.pysynphotinstructions:Detailed instructions for how to set uppysynphoton your system are providedhere.
Here is the truncated version adapted frompysynphotprovided guidelines:pip install pysynphotTwo sets oftarfiles,1and2need to be downloaded and store in some local directory.The terminal source file (accessible by callingvi .zprofileon MAC) should be opened and edited to include the
path to thepysynphotfiles set byexport PYSYN_CDBS=/my/local/dir/trds/. Note that the variableshouldbePYSYN_CDBS.Check if this is done correctly by opening python in your terminal and calling the following command:import os
os.environ['PYSYN_CDBS']
>>> '/my/local/dir/trds/'Once you have this setup, you should be good to installshock_cooling_curve!ContributingAny code changes, suggestions or improvements are welcome and can be submitted by making a PR! To develop this code, you
can:Fork this repository. It will appear in your own GitHub account ashttps://github.com/<your_username>/shock_cooling_curve.Clone your forkedshock_cooling_curverepositorycdinto the foldershock_cooling_curveandpip install -e .Using this packageThere are two files that have to be prepared before using this package.The config file: A template for this file in provided under templates/config_template.ini. Simply make a copy of the
file and fill out all the entries in the DEFAULT section. The BOUNDS section is optional.The data file: This file containing the photometry data must be a csv. The column headers and template
is under templates/phot_template.csv.If you are unsure about the naming convention of filters when you include them in your photometry file, you can refer
tofilter_info.csvunder templates.Related Papers:The Circumstellar Environments of Double-Peaked, Calcium-strong Supernovae 2021gno and 2021inl
Package: shockfind
This module contains functions to search through simulation datacubes for signatures of MHD shocks. For further details, check the journal paper Lehmann, Federrath and Wardle (2016, MNRAS, 463, 1) available on arxiv (https://arxiv.org/abs/1608.02050). The source code is also publicaly available on BitBucket (https://bitbucket.org/shockfind/shockfind) and the homepage can be found athttp://web.science.mq.edu.au/~alehmann/shockfind.
Package: shocktube1dcalc
1D shocktube caculatorThis tool provides 1D Shock Tube solutions. You may output analytic solutions, or numeric solutions backed by CESE
method,Sin-Chung Chang, “The Method of Space-Time Conservation Element and Solution Element – A New Approach for
Solving the Navier-Stokes and Euler Equations”, Journal of Computational Physics, Volume 119, Issue 2, July 1995, Pages 295-324. doi: 10.1006/jcph.1995.1137.Getting StartedPrerequisitesPythonnumpyscipyUsageAnalytic Solutionfromshocktube1dcalcimportsolver_analytic# by default it will create a the shock tube based on Sod's classic condition.shocktube=solver_analytic.ShockTube()importnumpyasnpmesh=np.linspace(-0.5,0.5,50)analytic_solution=shocktube.get_analytic_solution(mesh,t=0.4)You may customize the physical status of the shocktube via:shocktube=solver_analytic.ShockTube(rho_left=1.0,u_left=0.0,p_left=1.0,rho_right=0.125,u_right=0.0,p_right=0.1)Numeric Solutionfromshocktube1dcalcimportceseelapsed_time=0.4cese_grid_size_t=0.004# multiply 2 for half grids, so total iteration number should be double# the iteration number is always less than 1 by the grid numberiteration_number=round(elapsed_time/cese_grid_size_t*2)-1shocktube=cese.ShockTube(iteration=iteration_number,grid_size_t=cese_grid_size_t)shocktube.run_cese_iteration()numeric_solution=shocktube.data.solutionContributingSeeContributingAuthorsTaihsiang Ho (tai271828)tai271828@solvcon.netCreated fromLee-W/cookiecutter-python-templateversion 0.7.1
Package: shockwave
This is a package that has useful machine vision for use with CarsCHANGE LOGRELEASE 10.0.0.1  (7/27/2021)First Release\RELEASE 20.0.0.2 –> 7/27/2021Just wanted to test some things outreally didn’t don anything\-RELEASE 3
-0.0.0.3–> 7/27/2021
-Just wanted to test some things out
-really didn’t don anything
Package: shodan
Shodan is a search engine for Internet-connected devices. Google lets you search for websites,
Shodan lets you search for devices. This library provides developers easy access to all of the
data stored in Shodan in order to automate tasks and integrate into existing tools.FeaturesSearch ShodanFast/ bulk IP lookupsStreaming API support for real-time consumption of Shodan firehoseNetwork alerts (aka private firehose)Manage Email NotificationsExploit search API fully implementedBulk data downloadsAccess the Shodan DNS DB to view domain informationCommand-line interfaceQuick StartfromshodanimportShodanapi=Shodan('MY API KEY')# Lookup an IPipinfo=api.host('8.8.8.8')print(ipinfo)# Search for websites that have been "hacked"forbannerinapi.search_cursor('http.title:"hacked by"'):print(banner)# Get the total number of industrial control systems services on the Internetics_services=api.count('tag:ics')print('Industrial Control Systems:{}'.format(ics_services['total']))Grab your API key fromhttps://account.shodan.ioInstallationTo install the Shodan library, simply:$pipinstallshodanOr if you don’t have pip installed (which you should seriously install):$easy_installshodanDocumentationDocumentation is available athttps://shodan.readthedocs.org/andhttps://help.shodan.io
Package: shodan-chrono
Shodan Chrono: PythonQuickstartInstall the library using:pipinstallshodan-chronoAnd then use it in your code:importchronoitems=[iforiinrange(100)]withchrono.progress("My Script",len(items),api_key="YOUR SHODAN API KEY")aspb:foriteminitems:# Do something# Update the progress bar after we've processed the itempb.update()You can also tell the progress bar to update by more than 1 tick:pb.update(5)# Tell Chrono that we've processed 5 itemsConfiguring the API keyThe Chrono API requires aShodan API keyand there are 3 possible ways you can provide that:Initialize the Shodan CLI on your local machine:shodan init YOUR_API_KEYSet theSHODAN_API_KEYenvironment variable. For example:export SHODAN_API_KEY="YOUR KEY"Use theapi_keyparameter on thechrono.progress()classIf you're already using the Shodan CLI for other things then you won't need to configure anything in order to use Chrono.ContributingCheckout the repository and then usepoetryto manage the dependencies, virtual environment and packaging. To get started, simply run the following command once you're in thepython/subdirectory of this repository:poetryinstall
Package: shodan-data-ships
Shodan Data: ShipsA data feed of NMEA messages from open, public ship receivers on the Internet.OpenAPI Specification:https://ships.data.shodan.io/openapi.jsonInstallationpipinstallshodan-data-shipsQuickstartThe library provides both synchronous and asynchronous clients to the Ships datafeed. The easiest way to get started is using the synchronous interface:fromshodan_data_ships.clientimportClientclient=Client("YOUR SHODAN API KEY")formsginclient.messages():print(msg)Data SchemaFor the latest list of properties that are available please refer to the OpenAPI documentation at:https://ships.data.shodan.io/docsData models are generated from the above JSON schema and are available in the respectiveshodan_data_ships.model.NMEAMessageandshodan_data_ships.model.Receiverclasses.Asynchronous ClientThe library also lets you subscribe to data usingasyncio. Simply use theshodan_data_ships.client.AsyncClientclass:fromshodan_data_ships.clientimportAsyncClientasyncdefmain():client=AsyncClient("YOUR SHODAN API KEY")asyncformsginclient.messages():print(msg)if__name__=='__main__':importasyncioasyncio.run(main())