Saravanan666/pypi-org huggingface dataset:
Package: mastools
mastools - Tools for interacting directly with a Mastodon instance's databaseInstallationIf you just want to use mastools and not work on the project itself:pip install mastools.If you want to help develop mastools and havepoetryinstalled, clone this repo and runpoetry install.If you want to develop mastools but don't have poetry, usepipto install the dependencies mentioned in the[tool.poetry.dependencies]section ofpyproject.toml.ConfigurationMake a file named~/.mastools/config.jsonlike:{"host":"localhost","database":"mastodon","user":"mastodon","password":"0xdeadbeef"}All mastools components will use this database configuration.The toolStarting with version 0.2.0, there's only one mainmastoolscommand which has
multiple subcommands.show-user-changesis still a functioning command for
temporary backward compatibility, but it will be removed soon.mastoolssubcommands:show-unconfirmed-usersShow users who haven't confirmed their email yet, ordered by their creation date
from oldest to newest.This is useful for detection a flood of newly created junk accounts.$ mastools show-unconfired-users
crqcrujofa <cfvzm@example.com> was created at 2019-10-25 10:10:18.406158
lkjmadf <ljchrew@example.com> was created at 2019-10-25 13:06:04.175580show-user-changesShow any new, changed, or deleted accounts that mention URLs in their account
info.This is super common for spammers, who like to stuff their crummy website's info
into every single field possible. Suppose you run this hourly and email yourself
the results (which will usually be empty unless your instance isverybusy).
Now you can catch those "https://support-foo-corp/" spammers before they have a
chance to post!For example I run this from a cron job on my instance like:10 * * * * /home/me/mastools/.venv/bin/mastools show-user-changesto get an hourly update of changes. This gives a report like:Changed user: tek
 fields:
  - 'Avatar': 'Me, at night, with tunes'
    'Website': 'https://honeypot.net'
  + 'Avatar': 'Me, at night, with music'
 note:
  <unchanged>

New user: new_spammer
 fields:
  + 'website': 'https://example.com/foo-corp-tech-support'
 note:
  + 'ALL UR FRAUD^WSUPPORT NEEDS'

Deleted user: old_spammer
 fields:
  - 'website': 'https://example.com/bar-inc-tech-support'
 note:
  - 'SEND ME YOUR IP ADDRESS AND CREDIT CARD'LicenseDistributed under the terms of the MIT license, mastools is free and open source software.Historyv0.2.0 - 2019-10-27: Addedmastoolscommand andshow_unconfirmed_userssubcommandv0.1.3 - 2019-09-25: Productionizingv0.1.2 - 2019-09-25: Prettier show-user-changes outputv0.1.1 - 2019-09-24: Same code, but pushing new metadata to pypiv0.1.0 - 2019-09-24: First release
Package: mastotron
MastotronA new interface to Mastodon, and other experiments in social media.Demohttps://user-images.githubusercontent.com/733853/217984843-15ae3fdf-2e40-4bca-b464-4f5b98871acf.movInstallationMacOSDownload the latest zip file release (Mastotron-macos.zip)Unzip the file to revealMastotron.appHold control (⌃) and click the fileClick "Open" in the menu, then click "open" again at the prompt (more info)Wait for the window to appearLinuxUPDATE 2: There are apparently complex QT/GTK windowing issues that will take time to resolve. In the meantime, try installing and running Mastotron in background mode (just added):# install (do just once)
pip3 install -U git+https://github.com/quadrismegistus/mastotron

# run
mastotron --bgThen, in your favorite browser, navigate tohttp://localhost:1789.Let us know if that works!Windows... Coming soon. For now, try following instructions above for Linux. In background mode it should be possible.UsageGraphical use (normal)Follow installation istructions above and then usage instructions inside the program.(More documentation coming.)Use within pythonfrommastotronimportTronme='me@myserver.com'posts=Tron().timeline(me)ContributingPlease do! You can report bugs and ask questions on theissuespage.
Package: mastquery
MASTQUERYUser-friendly tools for using the MAST Mashup API (https://mast.stsci.edu/api/v0/index.html)Installation:# From PIP
pip install mastquery

# *OR* from latest version of the respository
git clone https://github.com/gbrammer/mastquery.git
cd mastquery
pip install .Demo:See alsodemo.ipynb.>>>frommastqueryimportquery,fetch### Query associations>>>tab=query.run_query(box=None,proposal_id=[11359],instruments=['WFC3/IR'],filters=['G141'],base_query=query.DEFAULT_QUERY)>>>print(tab['obs_id','filter','exptime','proposal_id'])obs_idfilterexptimeproposal_id================================ib6o23010G1414211.711359### Data products>>>prod=query.get_products_table(tab,extensions=['RAW'])>>>print(prod['observation_id','filter','productFilename'])observation_idfilterproductFilename======================================ib6o23rsqG141ib6o23rsq_raw.fitsib6o23ruqG141ib6o23ruq_raw.fitsib6o23ryqG141ib6o23ryq_raw.fitsib6o23s0qG141ib6o23s0q_raw.fits### Fetch products>>>s3_lines=fetch.make_curl_script(prod,script_name=None,s3_sync=True)>>>print(s3_lines[0])awss3sync--request-payerrequester--exclude="*.*"--include="*raw.fits"s3://stpubdata/hst/public/ib6o/ib6o23rsq/.//
Package: mastsel
MASTSELThis library was developed with 2 goals: support the Asterism Selection for
MAVIS instrument (https://mavis-ao.org/) and managing the computation of the
jitter (i.e. tip/tilt) error in Adaptive Optics simulations done in the Fourier
domain. It is used by TIPTOP (https://github.com/astro-tiptop/TIPTOP).The main features are located in:mastsel/mavisLO.pyclass that computes the jitter ellipses that can beconvolved with High Orders (HO, i.e. aberrations of higher spatialfrequencies than tip/tilt) Point Spread Functions (PSF) to get the PSFs thatconsider both the effect of HO and Low Orders (LO, i.e. tip/tilt).mastsel/mavisPsf.pythat contains a set of methods and classes to computeshort and long exposure PSF from Power Spectral Densities (PSD), StrehlRatios, radial profiles, encircled energies (and other quantities) from PSF,to convolve kernels with PSFs, …Reference: section 5 “LOW ORDER PART OF THE PSF” of Benoit et al. "TIPTOP:
a new tool to efficiently predict your favorite AO PSF" SPIE 2020 (ARXIV:https://doi.org/10.48550/arXiv.2101.06486).
Package: masutils
Samutils python packageHow to use this packagefromsamutils.perceptronimportPerceptronmodel=Perceptron(eta=0.3,epochs=10)Setup :Create your own env:conda create --prefix "./conda_env" python==3.8 -y

conda activate "./conda_env"

pip cache purge

pip install -r requirements.txtRecreate your own Git:rm -rf .git

git init

git add .

git commit -m "First Commit"

git branch -M main

git remote add origin <Your New Repository>

git push -u origin mainUpload to PyPI:Get LICENSE from Github > Add File > Create New File > Type "LICENSE" and click on "Choose A Template"

Local:
    git pull origin main

Go to PyPI.com > Account Settings > Add API Token
Give Token name
    Scope: (Entire Account)
Go to Github Repo > Settings > Secrets
    Add a Secret:
        Name: PYPI_API_TOKEN
        Value: (Copied from Pypi)

Trigger the Actions Pipeline to Push to PyPI:
    git push origin mainReferences -Official python docs for PYPIGithub action file for PYPI
Package: masz
👮‍♂️ MASZ API Wrapper⭐Fully object-oriented libraryto integrate theMASZ APIinto your project.🚀 InstallationPython 3.6 or higher requiredpip install masz👀ExamplesCheckout the example scriptdemo.py.SupportIf you have any questions feel free to contact me.MailDiscord:zaanposni#9295Discord MASZ guild:https://discord.gg/5zjpzw6h3S🤝 ContributorsLicense:This project is licensed under MIT.
Package: mat1plot
mat1plotDescriptionThis package is a collection of easy-to-use commands for plotting using SymPy. It is designed to fit the requirements of01005 - Advanced Mathematics in Engineering 1course at the Technical University of Denmark, foundhere. This includes, but is not limited to:Plotting of vector fields2D plotting of SymPy functions3D plotting of SymPy functionsInstallationTo install mat1plot using PyPi, run the following command$ pip install mat1plotUsageUse is designed for the01005 - Advanced Mathematics in Engineering 1course at the Technical University of Denmark. Any usecase outside this scope is thus not considered, but very welcome!ContributingYou are very welcome to contribute in the way that makes sense to you! The development team will consider all pull requests, as well as mails directly to the developerss194345@student.dtu.dkors194042@student.dtu.dk.Authors and acknowledgmentShow your appreciation to those who have contributed to the project.LicenseOpen source under the BSD license. This means that you are free to use it whatever you like, be it academic, commercial, creating forks or derivatives, as long as you copy the BSD statement if you redistribute it (see the LICENSE file for details).Project statusThis package is in pre-deployment phase. Simply setting it up for later deployment and use. Expected to be finished at end of 2022.
Package: mat2py
mat2pymat2py mean to be drop-in replacement of Matlab by wrapping Numpy/Scipy/... packages.For instance usage, try theOnline Matlab Emulatorhere.
Please note:You may need the latest modern browser for using this APP(check the console log by pressing F12).Loading the environment may take quite long time, especially for the first time. Try refresh the page incase bad network connection.Do a feature request when encounterNotImplementedError.Try copy-paste following code to the emulator and feel its capability:xv=[0.5;0.2;1.0;0;0.8;0.5];yv=[1.0;0.1;0.7;0.7;0.1;1];xq=[0.1;0.5;0.9;0.2;0.4;0.5;0.5;0.9;0.6;0.8;0.7;0.2];yq=[0.4;0.6;0.9;0.7;0.3;0.8;0.2;0.4;0.4;0.6;0.2;0.6];[in,on]=inpolygon(xq,yq,xv,yv);plot(xv,yv,...% polygonxq(in&~on),yq(in&~on),'r+',...% points strictly insidexq(on),yq(on),'k*',...% points on edgexq(~in),yq(~in),'bo'...% points outside)The final goal of this APP is to create aserverless,Matlab compatiableconsole completely in end-users' browser.First StepsInstallationpython3-mpipinstall-Umat2pyor install withPoetrypoetryaddmat2pyInstall the translatormh_pythonif neededpython3-mpipinstall-Umh-pythonTry the exampledemo_fft# download the one already converted and formattedwgethttps://raw.githubusercontent.com/mat2py/mat2py/main/examples/demo_fft.py# or convert it yourselfecho"wget https://raw.githubusercontent.com/mat2py/mat2py/main/examples/demo_fft.m"echo"mh_python --python-alongside --format demo_fft.m"# run it...python3demo_fft.pyYou can alsotry outtheonline translatorby modifiy the example or put your own code.For DeveloperInitialize your codeClonemat2py:gitclonehttps://github.com/mat2py/mat2pyIf you don't havePoetryinstalled run:makepoetry-downloadsource~/.poetry/envInitialize poetry and installpre-commithooks:makeinstall
makepre-commit-installRun the lint to check:makelintToDOA serverless web service for run.m/.pycode inside browserComplete set ofMATLAB® Basic FunctionsCopy-on-Write beheviourA cleaner class hierarchyEnablelint(mypy, UT, etc.)📈 ReleasesYou can see the list of available releases on theGitHub Releasespage.We followSemantic Versionsspecification.We useRelease Drafter. As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can categorize pull requests in release notes using labels.🛡 LicenseThis project is licensed under the terms of theMITlicense. SeeLICENSEfor more details.📃 Citation@misc{mat2py,author={mat2py},title={mat2py mean to be drop-in replacement of Matlab by wrapping Numpy/Scipy/... packages.},year={2021},publisher={GitHub},journal={GitHub repository},howpublished={\url{https://github.com/mat2py/mat2py}}}CreditsThis project was initially generated withpython-package-templateThe Matlab to Python translatormh_pythonis developed under fork ofMISS HIT, a fantastic Matlab static analysis tool.Theserverless consoleis created based onPyodide.
Package: mat3ra-periodic-table
Periodic TableData about chemical elements arranged in JSON format. The module also contains aElementclass for convenient access
to unit conversion of atomic properties (see example below).The package has a dual-nature as both a Python and a Node.js package.1. Installation1.1. JavaScriptThe package can be installed from NPM as follow:npminstall@mat3ra/periodic-table1.2. Pythonpipinstallmat3ra-periodic-table2. Usage2.1. JavaScriptimport{PERIODIC_TABLE,ChemicalElement}from"@mat3ra/periodic-table";console.log(PERIODIC_TABLE.H);constli=newChemicalElement("Li");console.log(li.atomicRadiusIn("bohr"));2.2. Pythonfrommat3ra.periodic_tableimportPERIODIC_TABLEconsole.log(PERIODIC_TABLE.H);3. Atomic Propertiesname: element namesymbol: element symbolatomic_number: atomic numberatomic_mass: atomic mass in amuatomic_radius_pm: empirical atomic radius in pm by Slater (doi:10.1063/1.1725697)covalent_radius_pm: covalent radius "2008 values" (doi:10.1039/b801115j)van_der_Waal_radius_pm: van der Waals radius (doi:10.1021/jp8111556,10.1021/j100785a001)4. NotesColors are in CPK convention5. ContributionsThis repository is anopen-sourcework-in-progress and we welcome contributions.6. ToDosAdd python code to make this repository into a python package7. LinksPeriodic table original source: GPeriodic, Open source Linux software:link
Package: mat3ra-standata
StandataStandard data for digital materials R&D entities in theESSEdata format.1. Installation1.1. PythonThe package is compatible with Python 3.8+. It can be installed as a Python package either via PyPI:pipinstallmat3ra-standataOr as an editable local installation in a virtual environment after cloning the repository:virtualenv.venvsource.venv/bin/activate
pipinstall-ePATH_TO_STANDATA_REPOSITORY1.2. JavaScriptStandata can be installed as a Node.js package via NPM (node package manager).npminstall@mat3ra/standata2. Usage2.1. Pythonfrommat3ra.standata.materialsimportmaterials_data# This returns a list of JSON configs for all materials.materialConfigs=materials_data["filesMapByName"].values();2.2. JavaScript// Direct import can be used to avoid importing all data at once.importdatafrom"@mat3ra/standata/lib/runtime_data/materials";// This creates a list of JSON configs for all materials.constmaterialConfigs=Object.values(data.filesMapByName);3. Conventions3.1. Runtime ModulesTo avoid file system calls on the client, the entity categories and data structures are made available at runtime via
the files insrc/js/runtime_data. These files are generated automatically using the following command:npmrunbuild:runtime-data3.2. CLI Scripts for Creating Symlinks3.2.1. PythonThe Python package adds a command line scriptcreate-symlinksthat creates a category-based file tree where
entity data files are symbolically linked in directories named after the categories associated with the entity.
The resulting file tree will be contained in a directory namesby_category.
The script expects the (relative or absolute) path to an entity config file (categories.yml). The destination
of the file tree can be modified by passing the--destination/-doption.# consult help page to view all optionscreate-symlinks--help# creates symbolic links in materials/by_categorycreate-symlinksmaterials/categories.yml# creates symbolic links for materials in tmp/by_categorycreate-symlinksmaterials/categories.yml-dtmp3.2.1 JavaScript/NodeAnalogous to the command line script in Python, the repository also features a script in
TypeScript (src/js/cli.ts) and (after transpiling) in JavaScript (lib/cli.js).
The script takes the entity config file as a mandatory positional argument and the
alternative location for the directory containing the symbolic links (--destination/-d).# creates symbolic links in materials/by_category (node)nodelib/cli.jsmaterials/categories.yml# creates symbolic links in materials/by_category (ts-node)ts-nodesrc/js/cli.tsmaterials/categories.yml# creates symbolic links for materials in tmp/by_categoryts-nodesrc/js/cli.ts-dtmpmaterials/categories.yml# run via npmnpmrunbuild:categories--materials/categories.yml4. DevelopmentSeeESSEfor the notes about development and testing.5. LinksTo be added here.
Package: mat4py
The package provides the mat4py module with the functionsloadmatandsavematthat allows for reading resp. writing data in the Matlab (TM)
MAT-file format.Matlab data is loaded into basic Python data types. Matrices are stored row-major using lists of lists. Matlab structs and cells are represented using Python dicts.The package can be run from the command line, in which case, it provides a routine for converting Matlab MAT-files to/from JSON files.Load data from MAT-fileThe functionloadmatloads all variables stored in the MAT-file into
a simple Python data structure, using only Python’s dict and list
objects. Numeric and cell arrays are converted to row-ordered nested lists. Arrays are squeezed to eliminate arrays with only one element.
The resulting data structure is composed of simple types that are compatible
with the JSON format.Example: Load a MAT-file into a Python data structure:data = loadmat('datafile.mat')The variabledatais a dict with the variables and values contained in the MAT-file.Save Python data structure to a MAT-filePython data can be saved to a MAT-file, with the functionsavemat. Data has
to be structured in the same way as forloadmat, i.e. it should be composed
of simple data types, like dict, list, str, int and float.Example: Save a Python data structure to a MAT-file:savemat('datafile.mat', data)The parameterdatashall be a dict with the variables.Command line usageThe package can be run from the command line, in which case, it provides
a routine for converting Matlab MAT-files to/from JSON files.Call:python -m mat4py.cmd -hto get help with command line usage.Known limitationsThe following Matlab data structures/types are not supported:Arrays with more than 2 dimensionsArrays with complex numbersSparse arraysFunction arraysObject classesAnonymous function classesLicenseThe MIT License (MIT)
Copyright (c) 2011-2023 Nephics ABSee theLICENSE.txtfile.
Package: mat73
mat 7.3Load MATLAB 7.3 .mat files into Python.Starting with MATLAB 7.3,.matfiles have been changed to store as customhdf5files.
This means they cannot be loaded byscipy.io.loadmatany longer and raise.NotImplementedError:PleaseuseHDFreaderformatlabv7.3filesQuickstartThis library loads MATLAB 7.3 HDF5 files into a Python dictionary.importmat73data_dict=mat73.loadmat('data.mat')As easy as that!By enablinguse_attrdict=Trueyou can even access sub-entries ofstructsas attributes, just like in MATLAB:data_dict=mat73.loadmat('data.mat',use_attrdict=True)struct=data_dict['structure']# assuming a structure was saved in the .matstruct[0].var1==struct[0]['var1']# it's the same!You can also specifiy to only load a specific variable or variable tree, useful to reduce loading timesdata_dict=mat73.loadmat('data.mat',only_include='structure')struct=data_dict['structure']# now only structure is loaded and nothing elsedata_dict=mat73.loadmat('data.mat',only_include=['var/subvar/subsubvar','tree1/'])tree1=data_dict['tree1']# the entire tree has been loaded, so tree1 is a dict with all subvars of tree1subsubvar=data_dict['var']['subvar']['subsubvar']# this subvar has been loadedInstallationTo install, run:pip install mat73Alternatively for most recent version:pip install git+https://github.com/skjerns/mat7.3DatatypesThe following MATLAB datatypes can be loadedMATLABPythonlogicalnp.bool_singlenp.float32doublenp.float64int8/16/32/64np.int8/16/32/64uint8/16/32/64np.uint8/16/32/64complexnp.complex128charstrstructlist of dictscelllist of listscanonical empty[]missingNonesparsescipy.sparse.cscOther (ie Datetime, ...)Not supportedShort-comingsThis library willonlyload mat 7.3 files. For older versions usescipy.io.loadmatProprietary MATLAB types (e.gdatetime,duriation, etc) are not supported. If someone tells me how to convert them, I'll implement thatFor now, you can't save anything back to the .mat. It's a bit more difficult than expected, so it's not on the roadmap for nowSee alsohdf5storage, which can indeed be used for saving .mat, but has less features for loadingSee alsopymatreaderwhich has a (maybe even better) implementation of loading MAT files, even for older ones
Package: mata
For my HSC major project, I am creating a simple 2D game engine that
allows developers to easily create multiplayer games which utilise
either a local network or an Internet connection. The engine can be used
to create singleplayer games, but is created with the multiplayer
experience in mind.Automatic Setup:To test the engine, you should only need python installed (Python 3.4 is
the best). Then, in a Terminal, Powershell or Command Prompt window,
run: > py launcher.pyUse the command line arguments detailed at the bottom of this readme to
control the game’s behaviour.Manual Setup:If for some reason, the launcher does not work, the sample game can be
launched manually by following a few steps. Firstly, ensure that your
computer has the following dependencies installed:WindowsRequired:Python 3 (3.4 is preferred)Visual Studio C++ Build
Tools(Not needed
for Python 3.4)Linux:Required:python3Optional:python3-devcython3Required Python3 Packages (installed using pip3):pygamenoiseThe next step is to compile or pythonify the api (instructions in the
api folder README).Then, just run the main.py file in the Python interpreter.Using the Engine:To use the engine as a game development framework, the simplest method
is to install the mata package from PyPI. This can be done using: > py
-m pip install mataon Windows, or using: > pip3 install mataon Linux and Mac OS.Creating a New Project:Creating a new project is simply a case of using the
mata_create_project command (added after installation of the mata
package from PyPI).
Package: mata-echo-discord.py
echo-discord.pyA modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.Key FeaturesModern Pythonic API usingasyncandawait.Proper rate limit handling.Optimised in both speed and memory.InstallingPython 3.8 or higher is requiredTo install the library without full voice support, you can just run the following command:# Linux/macOSpython3-mpipinstall-Uecho-discord.py# Windowspy-3-mpipinstall-Uecho-discord.pyOtherwise to get voice support you should run the following command:# Linux/macOSpython3-mpipinstall-U"echo-discord.py[voice]"# Windowspy-3-mpipinstall-Uecho-discord.py[voice]To install the development version, do the following:$gitcloneecho-discord.py$cddiscord.py$python3-mpipinstall-U.[voice]Optional PackagesPyNaCl(for voice support)Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g.apt,dnf, etc) before running the above commands:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.6-devfor Python 3.6)Quick ExampleimportdiscordclassMyClient(discord.Client):asyncdefon_ready(self):print('Logged on as',self.user)asyncdefon_message(self,message):# don't respond to ourselvesifmessage.author==self.user:returnifmessage.content=='ping':awaitmessage.channel.send('pong')client=MyClient()client.run('token')Bot Exampleimportdiscordfromdiscord.extimportcommandsbot=commands.Bot(command_prefix='>')@bot.command()asyncdefping(ctx):awaitctx.send('pong')bot.run('token')You can find more examples in the examples directory.LinksOfficial Discord ServerDiscord API