Saravanan666/pypi-org huggingface dataset:
Package: smartcard-identifier
Smartcard IdentifierThis is an extremely simple smartcard system that reads only the smart card's
ID number, and pastes it as text into the currently open application. This can
be used for applications that rely on nothing more than the identity of the
scanned card, such as an authentication system in a low-security environment.Installation: macOSDownload for macOSInstall the package above. This will also add python3 to the security settings
which you'll enable the in the next two steps.Open System Settings -> Privacy & Security -> Automation and enable permissions for python3.Open System Settings -> Privacy & Security -> Accessibility and enable permissions for python3.If you can't find python3 in the list, click the "+" button, then
press Command+Shift+G and type /usr/bin/python3Installation: Linux/Windowshttps://pypi.org/project/smartcard-identifier/$ pip3 install smartcard-identifier
$ smartcard-identifier --helpRelease ProcessTo sign the macOS release you will need to have the relevant Developer
Certificate installed in your Keychain, which you can download fromhttps://developer.apple.com/account/resources/certificates/list. Make sure
you also have Apple's intermediate certificates installed, which you can download
from the bottom of the page athttps://developer.apple.com/account/resources/certificates/add. Without these,
the Developer Certificate will show up as "untrusted" in Keychain Access.To build & publish a release, first increment the version in pyproject.toml,
then run the following to build and upload to Github and PyPI:$ make release
Package: smartcast
Smart CastRecursively cast json to pythondataclasses,typing, andclassFeaturesSupportsList[TV]Dict[TK, TV]Optional[TV]Uniondictlistdataclassintstrfloatbooleandatetimeuseagefromsmartcastimportnormal,castfromtypingimportList,Optional,UnionimportjsonfromdataclassesimportdataclassfromenumimportEnum,autoclassOption(Enum):A=auto()B=auto()@dataclassclassConfig:value:Optiondeftest_simple():value=Config(Option.A)nobj=normal(value)jstr=json.dumps(nobj)jobj=json.loads(jstr)revalue=cast(jobj,Config)assertvalue==revalue
Package: smartchangelog
[![Build Status](https://travis-ci.org/ngouzy/smartchangelog.svg)](https://travis-ci.org/ngouzy/smartchangelog)Requirementssmartchangelogrequires Python 3.6.1 or upper.
To install python 3, you can use [homebrew](https://brew.sh):>brew install python3InstallationTo install or to update the last version of smartchangelog:
>pip3 install -U smartchangelogNow, you have new commandscommit-msgsmartchangelogUsage### commit-msg commandTo see the help:>commit-msg -hTo install git hook commit-msg, go to your project directory:>commit-msg -iTo uninstall git hook commit-msg, go to your project directory:>commit-msg -u### smartchangelog commandTo see the help:>smartchangelog -h
Package: smartchem-ion3
This is a python interface to the SMARTChem Ion3 ion-selective electrode instrument.It requires the device to be connected to the host computer using a RS232 style serial port, such as
through a USB-to-serial converter, and then provides a basic wrapper around the device’s control
capabilities. See the device’suser manualfor details on
its capabilities.Source code athttps://gitlab.com/ptapping/smartchem-ion3.Documentation online athttps://smartchem-ion3.readthedocs.io/.Basic Usageimportsmartchem_ion3# Make a function to pretty print data obtained from the devicedefhandle_data(d):"""Handle receipt of spontaneous data sent from the instrument."""print(f"Reading #{d.n}at{d.timestamp.isoformat()}")print(f"  Channel 1,{d.ch1.unit.description}={d.ch1.value}{d.ch1.unit.suffix}")print(f"  Channel 2,{d.ch2.unit.description}={d.ch2.value}{d.ch2.unit.suffix}")print(f"  Channel 3,{d.ch3.unit.description}={d.ch3.value}{d.ch3.unit.suffix}")print(f"  Temperature,{d.cht.unit.description}={d.cht.value}{d.cht.unit.suffix}")# With no parameters, will use the first detected serial port at 38400 baud.ion3=smartchem_ion3.Ion3()# Get a reading of the current state of the data channels and print it outhandle_data(ion3.current_data())# Get the logged data and print them outfordinion3.logged_data():handle_data(d)
Package: smartcitizen-connector
Smart Citizen ConnectorThis is a simple connector written inpythonto get data from the Smart Citizen API. It is only providing this functionality, to be used in conjunction with other scripts, and it does not aim to replacescdata, which is a much more advanced data analysis framework.InstallationSimply do:pip install smartcitizen-connectorDevelopmentOr clone the repo and install in editable mode:git clone git@github.com:fablabbcn/smartcitizen-connector.git
cd smartcitizen-connector
pip install -e .
Package: smartcity
SmartCity-simulatorSmart City Simulator designed for hackathons !Package installationpip3 install --user smartcityOn Google Colab!pip3 install smartcityPython > 3.6Env InstantiationIn the package, 3 envs are available :SmartCity-v0 : small envSmartCity-v1 : medium envSmartCity-v2 : big envimportsmartcityimportgymenv=gym.make("SmartCity-v0")obs,info=env.reset()ActionsTo send action, you have to send a dictionnary instead of the usual vectors. There's 3 keys to send : energies, heaters and lights. Energies defines how much of each type of energy you buy. Lights define whether each light is on or off (a threshold at 0.5 is set). Heaters define the temperature of each heater. To have the size and the type of each parameter, they are available in theobsvariable.obsis a dictionnary you can use to predict your actions. Keyslights,heatersandenergies_amounthave the exact format requested for actions, you can just copy them.EnergiesEnergies are ordered the same way for all the arraysObservations and informationsThere's 5 keys in the obs dictionnary :lights: numpy array of size #light. Each light is either 0 (off) or 1 (on)heaters: numpy array of size #heater. Each heater is defined by its temperatureenergies_cost: cost of each quantity. This cost is defined for each point of each energyenergies_amount: available amount for energyneeded_energy: the total amount of energy needed. If you don't send enough energy, an exception is raised. During Hackathon submission, it will be an elimination criteria. If you buy more energy that needed, it is stored indefinitely so you can use it.There's 2 keys ininfodictionnary :light_interraction: a matrix of shape (#people, #lights). If there's a 1 at[i, j], the citizeniis connected to lightlightheaters_interraction: same as lights but for heatersenergy_pollution: pollution factor for each type of enegy (carbon, nuclear, renewable)Exampleimportsmartcityimportgymimportrandomenv=gym.make("SmartCity-v0")obs,info=env.reset()energies=[0.8*obs["needed_energy"],0.15*obs["needed_energy"],0.1*obs["needed_energy"]]lights=np.array([random.random()for_inrange(obs["lights"].shape[0])])heaters=obs["heaters"]+2actions={"energies":energies,"heaters":heaters,"lights":lights}obs,score,done,info=env.step(actions)EvaluationWe'll give you a seed and a json file dubbedsetting.jsonand a seed.importsmartcityimportgymseed=# given seedenv=gym.make("SmartCity-v0")env.change_settings("path/to/setting.json")env.seed(seed)obs,info=env.reset()# Learning# your code here# Evaluationenv.seed(seed)obs,info=env.reset()withopen("groupe_name.sub","w")asf:foriinrange(100):actions=# prediction de votre modèleobs,score,done,info=env.step(actions)f.write(f"{actions}\n")Pour ceux qui sont dans colab, copiez collez le contenu du fichier json dans une variable dans une cellule puis sauvegarder là comme suit :importjsoncontent=# copy paste subission.jsonwithopen("submission.json","w")asf:json.dump(content,f)importsmartcityimportgymseed=# given seedenv=gym.make("SmartCity-v0")env.change_settings("submission.json")env.seed(seed)SEED = 1337
Package: smartcompose
Decorate a class with@delegate(attribute_name, method_names)to delegate the methods inmethod_namesto the attributeattribute_name:In[1]:fromsmartcomposeimportdelegateIn[2]:@delegate('_n',('__add__','__mul__'))...:classNumberWrapper:...:def__init__(self,n):...:self._n=n...:In[3]:n=NumberWrapper(10)In[4]:n+2Out[4]:12In[5]:n*3Out[5]:30For now, only compatible with Python 3.pip install smartcompose
Package: smart-config
Smart-Config |Simple configuration file loaderWhyModern configuration file is more and more complex, flexible and readable, buthad no option to pass environment variables. This project aim to simplify usage of the configuration file and environment variables for production and development, with easy dictionary like accessSupported files: ini, yaml, json & cfgInstallpipinstallsmart-configBasic usageLet's assume we had a project with this config filesystem.yaml# system.yamldatabase:host:${DATABASE_HOST:localhost}port:${DATABASE_PORT:27017}username:${DATABASE_USER:user}password:${DATABASE_PASSWORD:password}database:${DATABASE}and environment variables set toDATABASE_HOST=mongodb://xxx.xxx.xxx.xxx
DATABASE_USER=mongo
DATABASE_PASSWORD=changeit
DATABASE=Demoparse file withConfigLoaderfromsmart_configimportConfigLoader# read file system.yaml and parse configenv=ConfigLoader('system.yaml').get_config()# access whole database sectionprint(env['database'])# {# 'database': 'test',# 'host': 'mongodb://xxx.xxx.xxx.xxx',# 'user': 'mongo'# 'password': 'changeit',# 'port': 27017,# 'database': 'demo'# }# access database host valueprint(env['database']['host'])# >> mongodb://xxx.xxx.xxx.xxx# access database port value returns default value as DEFAULT_PORT is not set in environmentprint(env['database']['port'])# >> 27017LicenseMIT licensed. See theLICENSEfile for more details.
Package: smartcp
This is an useful utility for automating copy from source and destination
that can be customised by arguments that may vary.
A good example of usage is available withthis repo.InstallYou can install it from source by cloning this repogitclonehttps://github.com/blegat/smartcp.gitand runningsudopythonsetup.pyinstallYou can also install the latest released version throughpipsudopipinstallsmartcporeasy_installsudoeasy_installsmartcpRequirementsIt is officially only compatible with Python 3 and Python 2
but has some issues with accents for Python 2
(Python 3 has a better unicode approach than Python 2).You will also needPyYAML.UsageYou can get help by runningsmartcp-hConfig fileTo specify which files to copy where, you need to specify a config file.
It should use theYAML syntax.
It contains a base path for the source,
a base path for the destination and clients.
For each client,
you can specify some arguments
(if no argument is given, there will be one copy but there can’t be any nodearg) and how to generate
the source and destination from these arguments.
To specify them you need to nest three types of nodes.Apath_formatwhich can contain placeholders{n}and then parameters to replace them.
The parameters can be one of the three nodes.Amappingwhich contain a hash and a key which is a node.Anargwhich is one of the arguments.Here is an example which copies files fromversion/subversion/filetofile-version.subversionwhile renamingfiletobif it isa.
It also copies1/1/xto../x-1.1.input_base:.output_base:.clients:-name:Officialarguments:subversion:[1,2,3]version:[1,2,3,4,5]file:[a,A,x,X]input:path_format:"{0}/{1}/{2}"parameters:-arg:subversion-arg:version-arg:fileoutput:path_format:"{0}-{1}.{2}"parameters:-mapping:a:bkey:arg:file-arg:version-arg:subversion-name:Simple copyinput:path_format:1/1/xoutput:path_format:../x-1.1Note the"for the path format because without it YAML won’t understand
that it is just a string.
Package: smartcpp
SMARTcpp - a C++ accelerator extension of the rainfall-runoff SMART for PythonSMARTcpp is an open-source C++ accelerator extension for the hydrological catchment model SMART in Python. It is licensed under GNU GPL-3.0 (seelicence fileprovided). SMART (Soil Moisture Accounting and Routing for Transport) is a top-down rainfall-runoff model composed of a soil moisture accounting component and a linear routing component. It requires rainfall and potential evapotranspiration time series, it features a set of ten parameters, and it yields a discharge time series. This C++ extension is giving access to the calculation of the states, processes, and outputs of the model for one simulation time step or for all time steps. SMARTcpp is intended to be used in combination with a wrapping script in Python.How to InstallSMARTcpp is available on PyPI for Python 2.7 and Python 3.6 (both for macOS and Windows 64 bits), so you can simply use pip:python -m pip install smartcppYou can also use a link to the GitHub repository directly:python -m pip install git+https://github.com/ThibHlln/smartcpp.gitAlternatively, you can download the source code (i.e.the GitHub repository) and, from the downloaded directory itself, run the command:python setup.py installModel SpecificationsModel Inputsrainfall time series [mm/time step]potential evapotranspiration time series [mm/time step]Model ParametersT: rainfall aerial correction coefficient [-]C: evaporation decay parameter [-]H: quick runoff coefficient [-]D: drain flow parameter - fraction of saturation excess diverted to drain flow [-]S: soil outflow coefficient [-]Z: effective soil depth [mm]SK: surface routing parameter [hours]FK: inter flow routing parameter [hours]GK: groundwater routing parameter [hours]RK: river channel routing parameter [hours]Model Outputsdischarge time series at catchment outlet [m3/s]groundwater contribution to catchment runoff [-]ReferencesMockler, E., O’Loughlin, F., and Bruen, M.: Understanding hydrological flow paths in conceptual catchment models using uncertainty and sensitivity analysis,Computers & Geosciences, 90, 66–77,doi:10.1016/j.cageo.2015.08.015, 2016Version History0.2.0 [15 Nov 2018]: Version capable of running all stepsAdds method allsteps that brings the loop into C++0.1.2 [18 Jul 2018]: Version with proper PyPI displayFixes display issue of README.md on PyPI0.1.1 [18 Jul 2018]: Version with Python 3.x compatibilityAdds compatibility with Python 3.x extensions0.1.0 [09 Jul 2018]: First version of SMARTcppAcknowledgmentThis tool was developed with the financial support of Ireland's Environmental Protection Agency (Grant Number 2014-W-LS-5).
Package: smartcrop
smartcrop.pysmartcrop implementation in Python.smartcrop finds good crops for arbitrary images and crop sizes, based on
Jonas Wagner'ssmartcrop.js.{width="50.0%"}{width="25.0%"}{width="50.0%"}RequirementsPython requirements are defined inpyproject.toml.Moreover the packages such asPyGObjectandGExiv2requires additional system packages that has to be installed using your OS package manager. Please checkrequirements.install.aptfor that purpose (tuned on Ubuntu 22.04).Installationsudoapt-getinstall<...># list from requirements.install.aptpip3install-Upipsetuptoolswheel# optional but recommendedpip3installsmartcropor directly from GitHub:sudoapt-getinstall<...># list from requirements.install.aptpip3install-Upipsetuptoolswheel# optional but recommendedpipinstall-egit+git://github.com/hhatto/smartcrop.py.git@master#egg=smartcropUsageUse the basic command-line tool:$smartcroppy--help
usage:smartcroppy[-h][--debug-fileDEBUG_FILE][--widthWIDTH][--heightHEIGHT]INPUT_FILEOUTPUT_FILE

positionalarguments:INPUT_FILEInputimagefileOUTPUT_FILEOutputimagefile

options:-h,--helpshowthishelpmessageandexit--debug-fileDEBUG_FILEDebuggingimagefile--widthWIDTHCropwidth--heightHEIGHTCropheightProcessing an image:smartcroppy--width300--height300tests/images/business-work-1.jpgoutput.jpg--debug-filedebug.jpgOr use the module it in your code (this is a really basic example, seeexamples/andsmartcrop/cli.pyfor inspiration):importjsonimportsysimportsmartcropfromPILimportImageimage=Image.open(sys.argv[1])cropper=smartcrop.SmartCrop()result=cropper.crop(image,100,100)print(json.dumps(result,indent=2))TestingInstall dependencies for testing, then callpytest:pip3installsmartcrop[test]pytestLicenseMIT
Package: smart_csv_dictreader
Make acsv.DictReaderwithout specifying the column names.import smart_csv_dictreader
# https://raw.githubusercontent.com/tlevine/comparing-wifi-usage/master/data/chicago.csv
chicago = smart_csv_dictreader.DictReader(open('chicago.csv'))
print(next(chicago))
{'CUMULATIVE NUMBER OF SESSIONS': '22263',
 'MONTH': 'January',
 'NUMBER OF SESSIONS': '22263',
 'YEAR': '2011'}
Package: smartdance
SmartDanceSmartDance is a Python package that brings the power of template languages to Python. Inspired by Handlebars and similar languages, SmartDance allows you to embed Python function calls and variables directly into your strings, which are then executed and replaced with their results when the string is processed.Designed specifically to work as a Prompt Engineering tool, SmartDance is a simple, flexible, and powerful way to generate strings from Python code.FeaturesSimple Syntax: Use double curly braces {{}} to embed Python function calls and variables into your strings.Flexible: SmartDance can handle any function or variable that's in scope when the string is processed.Error Handling: Function execution is wrapped in a try/except block. If an exception is raised, a custom error message is returned.
InstallationYou can install SmartDance with pip:pip install smartdanceUsagefromsmartdanceimportdancedefhello(name):returnf"Hello,{name}!"print(dance("{{hello('World')}}",locals()))Output: Hello, World!Future PlansComplex Data Types: We plan to add support for complex data types like lists, dictionaries, and objects in the future.Debugging and Testing: We plan to add built-in functionality for debugging and testing in the future.
Package: smart-data-science
smart_data_sciencePersonal side project to streamline the most common tasks of data science solutions in an efficient manner. This project is based on my experience as a lead data scientist in the industry and financial services sectors, where I have gained expertise in delivering effective data-driven insights and solutionsInstallation in Dev / Editor modeNote: A Debian/Ubuntu Machine, VM or container is highly recommendedStep 0: One-time Machine setup only valid for all Data Science ProjectsCreate or use a Machine with Conda, Git and Poetry as closely as defined in.devcontainer/Dockerfile:This Dockerfile contains a non-root user so the same configuration can be applied to a WSL Ubuntu Machine and any Debian/Ubuntu CLoud Machine (Vertex AI workbench, Azure VM ...)In case of having an Ubuntu/Debian machine with non-root user (e.g.: Ubuntu in WSL, Vertex AI VM ...), just install the tools from  "non-root user" (no sudo) section of the Dockerfile  (sudo apt-get install <software> may be required)A pre-configured Cloud VM usually has Git and Conda pre-installed, those steps can be skippedThe development container defined in.devcontainer/Dockerfilecan be directly used for a fast setup (Docker required).  With Visual Studio Code, just open the root folder of this repo, pressF1and select the optionDev Containers: Open Workspace in Container. The container will open the same workspace after the Docker Image is built.Step 1. Enter to the root path of the repo and use or create a new conda environment for development:$condacreate-ndevpython=3.10-y&&condaactivatedevStep 2. Install all the Dependencies and the package in editor mode:$makesetupInstallation for Production/Usage (Not published in PyPi yet)$condacreate-nsmartpython=3.10-y&&condaactivatesmart
$pipinstalldist/smart-data-science-0.1.1-py3-none-any.whlInstallation for Production/Usage (after the package is published in PyPi)$pipinstallsmart_data_scienceUsageStill under development. Please refer to the notebooks and examples folders for usage examplesContributingCheck out the contributing guidelinesLicensesmart_data_sciencewas created by Angel Martinez-Tenor. It is licensed under the terms of the MIT license.Creditssmart_data_sciencewas created from a Data Science Template developed by Angel Martinez-Tenor. The template was built uponpy-pkgs-cookiecutter[template] (https://github.com/py-pkgs/py-pkgs-cookiecutter)
Package: smartdict
SmartDictUsageString as references of another itemInstallpip install smartdictDescriptionNormal String-based Referencing${}importsmartdictdata={"dataset":"spotify","load":{"base_path":"~/data/${dataset}","train_path":"${load.base_path}/train","dev_path":"${load.base_path}/dev","test_path":"${load.base_path}/test",},"network":{"num_hidden_layers":3,"num_attention_heads":8,"hidden_size":64,},"store":"checkpoints/${dataset}/${network.num_hidden_layers}L${network.num_attention_heads}H/"}data=smartdict.parse(data)print(data['load']['base_path'])# => ~/data/spotifyprint(data['load']['dev_path'])# => ~/data/spotify/devprint(data['store'])# => checkpoints/spotify/3L8H/# feel free to use oba.ObjfromobaimportObjdata=Obj(data)print(data.load.base_path)# => ~/data/spotifyprint(data.load.dev_path)# => ~/data/spotify/devprint(data.store)# => checkpoints/spotify/3L8H/Full-Match Referencing${}$importobaimportsmartdictdata=dict(a='${b.v.1}+1',# normal referencingb='${c}$',# full-match referencing, supported by smartdict>=0.0.4c=dict(l=23,v=('are','you','ok'),))data=smartdict.parse(data)print(data['b'])# => {'l': 23, 'v': ('are', 'you', 'ok')}data=oba.Obj(data)print(data.a)# => you+1print(data.b.l)# => 23Fancy Class ReferencingimportsmartdictimportrandomimportstringclassRand(dict):# if you want to further be JSON stringify, please derive your class from dict, list, etc."""get random string of n length by Rand()[n]"""chars=string.ascii_letters+string.digitsdef__init__(self):super(Rand,self).__init__({})def__getitem__(self,item):return''.join([random.choice(self.chars)for_inrange(int(item))])def__contains__(self,item):returnTruedata=dict(filename='${utils.rand.4}',# fancy referencing, supported by smartdict>=0.0.4utils=dict(rand=Rand(),))data=smartdict.parse(data)print(data['filename'])# => toXE (random string with length 4)
Package: smartdiffer
smartdifferTool to compare smart contracts source code.Heavily relies on API ofEtherscanandDiffchecker.InstallationpipinstallsmartdifferAPI keysIn order to use smartdiffer you need to obtainEtherscan Api-Key. Put it insideapi_keys.jsonfile under your home directory.The file should look like this:{"etherscan":"","diffchecker":""}UsageProvide two sources you wish to compare.Sourceis eitheraddressof a smart contract on ethereum mainnet orpathto a local file.smartdiffer0x0123456789abcdef0123456789abcdef01234567path/to/local/fileOn the completion you'll get a link to the diff ondiffchecker.com.
Package: smart-dist
Statistical Distribution PackageSmart-distis a package for Crypto Analytics as well as adjunct tools that deal with statistical Binomial and Gaussian distribution dataCrypto ChartGaussian DistributionProbability Density FunctionBinomial DistributionPackage ReleasedVersionDownloadsInstallationAnalysisDetailssmart-distpip install -U smart_distsmart-dist AnalysisCrypto AnalysisTo install the smart-dist project, run this command in your terminal:$pipinstallsmart_distImport the crypto class from the Coinanalysis module, for visualizing crypto data>>>fromsmart_dist.CoinanalysisimportcryptoInitialize a variable to work with the crypto object>>>coin=crypto()CryptoWorkingSpaceActivated...Checking for Documentation>>>help(coin)Examples of Valid use>>>coin.get_crypto_visuals("ETH")>>>coin.get_crypto_visuals("ETH",MA=True)>>>coin.get_crypto_visuals("ETH",period="5d",interval="15m",MA=True,days=[5,20],save_fig=True)>>>coin.get_crypto_visuals("BTC",period="3d",interval="15m",boll=True,boll_sma=26,save_fig=True,img_format='jpeg')Resulting Crypto ChartCredit:Statistical Distribution package highly influenced by work from Udacity.Udacity's AWS ML SCHOLARSHIP