Saravanan666/pypi-org huggingface dataset:
Package: military-symbol
Python military symbolsThis is a lightweight Python module, including a command-line script, to generate NATO APP-6(D) compliant military symbol icons in SVG format. These SVGs can be generated from inputs formatted as NATO SIDCs (Symbol identification codes) or as natural-language names for symbols, i.e. "friendly infantry platoon" or "enemy mortar section." Features supported include:Headquarters, task force, mobility, and echelon indicatorsAutomatic checking of modifier and entity types for congruenceSymbol sets to indicate land units and installations, air, space, sea surface, subsurface, signals intelligence, and cyber units, tracks, and activitiesStatus indicators in both standard and alternate formsConstruction of SVGs in light, medium, dark, and unfilled stylesControl measure graphics are not yet implemented.Available as aPython package.UsageCommand line usage examples:# Create a set of symbols by name, using variant symbols if available, in the current directorymilitary_symbol--use-variants--by-name-o."Friendly artillery company""Destroyed Enemy PSYOP section"# Create a single symbol at the designated path by namemilitary_symbol-oplatoon.svg-n"Friendly infantry platoon"# Print a set of symbols by name, in unfilled style, to STDOUTmilitary_symbol-sunfilled-n"Friendly infantry platoon""Enemy anti-air battery"# Create the same set of symbols as above, but by SIDCmilitary_symbol-o.-n1003100014121100000010041000141211000000Python module usage:importosimportmilitary_symbolif__name__=='__main__':# Print symbol generated from a name to STDOUTprint(military_symbol.get_symbol_svg_string_from_name("enemy infantry platoon"))# Add a symbol template and write it to a file adjacent to this scriptexample_template_directory=os.path.dirname(__file__)military_symbol.add_symbol_template_set(os.path.join(example_template_directory,'example_template.json'))military_symbol.write_symbol_svg_string_from_name("T-82",out_filepath=os.path.join(example_template_directory,'T-82.svg'),auto_name=False)shapes=['friendly infantry','friendly cavalry','friendly artillery']forshapeinshapes:military_symbol.write_symbol_svg_string_from_name(shape,out_filepath=example_template_directory)# Generate a list of symbols from names and write them as SVG files in specific# styles, named according to a user-defined pattern and using variant symbols where availableexamples=[('Enemy armor company','light'),("Dummy damaged neutral hospital",'medium'),("Friendly fighter",'dark'),("Destroyed neutral artillery task force headquarters",'unfilled'),("Suspected CBRN section",'light')]forexample_name,example_styleinexamples:example_symbol:src.military_symbol.individual_symbol.MilitarySymbol=military_symbol.get_symbol_class_from_name(example_name)print('Exporting symbol "{}"'.format(example_symbol.get_name()))output_filename='{}({}).svg'.format(example_symbol.get_sidc(),example_style)withopen(output_filename,'w')asoutput_file:output_file.write(example_symbol.get_svg(style=example_style,pixel_padding=4,use_variants=True))LicenseThis project is licensed under the MIT license.
Package: milkfrog
Quality ToolSetupMake sure you havePoetry >= 1.2.0installed.
You can then get started by running:poetryinstallCode duplication - cpdAs of this moment, we are using copy paste detector to find duplicate code.
This requires you to download cpd and place thebin/andlib/folder (and their files) in a cpd subfolder in metrics (metrics/cpd/<cpd folders goes here>).You can download cpd from the following link (check if there is a newer release):https://github.com/pmd/pmd/releases/tag/pmd_releases/6.54.0Programming Language Detection - GitHub LinguistTo detect the programming languages of source code files we use GitHub linguist by running it in a docker container.
Make sure you haveDocker >= 23.0.4installed.
You will also need to pull the docker image for GitHub Linguist:dockerpulltoffernator/linguistRunning, Testing, and FormattingThis is all done using poetry. To run:poetryruncore<path/to/source/code><Quality_model>e.g.poetryruncore.code_climateTo see supported languages please refer to:byoqm/source_coordinator/languages.pyOptional values can be gotten by running:poetryruncore--helpTo test:poetryruntestTo format:poetry run black .Building Tree-Sitter GrammarsMake sure you have abuild/andgrammars/folders in the root of the project:mkdirbuildgrammarsClone the python grammar intogrammars/:cdgrammars&&gitclone--depth1https://github.com/tree-sitter/tree-sitter-python&&gitclone--depth1https://github.com/tree-sitter/tree-sitter-c-sharp&&gitclone--depth1https://github.com/tree-sitter/tree-sitter-java&&cd-Build the grammar file:poetryrunpythoncore/build_treesitter.py
Package: milkman
milkmanis an open source fixture replacement for Django testing.Instead of maintaining scores of fixtures, whether they be generated, dumped, or
managed semi-dynamically, it can still generate a lot of code that is not even
test code.  Furthermore, this tends to be brittle and hard to maintain.The genius ofmilkmanis that it randomly generates data for all the fields
on a particular object, while at the same time allowing the test writer to
override any particular field with their own data when determinate fields are
needed for a test.Example:from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase, Client

from milkman.dairy import milkman

from app.models import Library, Book, Author


class LibraryTest(TestCase):

    def setUp(self):
        self.user = milkman.deliver(User)
        self.user.set_password("letmein")
        self.user.save()

        self.user2 = milkman.deliver('auth.user')
        self.user2.set_password("letmein")
        self.user2.save()

        self.book = milkman.deliver(Book, library__name="Library of Congress")
        self.author = milkman.deliver(Author, lastname="Lewis")

        self.client = Client()
        self.client.login(username=self.user.username, password="letmein")

        self.url = reverse("book", args=[self.book.library.id, self.book.id])

    def tearDown(self):
        self.user.delete()
        self.user2.delete()
        self.book.delete()
        self.author.delete()
Package: milkshakelang
The MilkShake Programming LanguageDedicated to the biggest MilkShake lover Igor ❤️Installationpip install milkshakelangUsageMilkShakeLang commands:give[owner] [size] milkshakedrink[owner] milkshake [ounces]refill[owner] milkshake [ounces]Available MilkShake sizes:demi- 3 ouncesshort- 8 ouncestall- 12 ouncesgrande- 16 ouncesventi- 24 ouncestrenta- 30 ouncesWrite MilkShakeLangscript:give Igor venti milkshake
# Igor got Venti MilkShake (24 ounces)

give Dani grande milkshake
# Dani got Grande MilkShake (16 ounces)


drink Igor milkshake 16
# Igor:
# - Drank 16 ounces - so delicious!

drink Igor milkshake 16
# Igor:
# - Drank 8 ounces and finished my milkshake...
# - I want more!

drink Igor milkshake 16
# Igor:
# - There is nothing to drink...
# - Need more milkshake!

drink Dani milkshake 16
# Dani:
# - Drank 16 ounces and finished my milkshake...
# - I want more!


refill Dani milkshake 16
# Dani:
# - Incredible, full cup of milkshake!

refill Igor milkshake 16
# Igor:
# - Wow, 16 ounces of new milkshake!

refill Igor milkshake 16
# MilkShakeOverflowError: Milkshake was spilled on the floor!Run the script:milkshakelang script.milkshakeRequirementsPython >= 3.7
Package: milksnake
MilksnakeMilksnake is an extension for setuptools that allows you to distribute
dynamic linked libraries in Python wheels in the most portable way imaginable.It gives you a hook to invoke your own build process and to then take the
resulting dynamic linked library.Why?There are already other projects that make Python and native libraries play
along but this one is different.  Unlike other projects that build Python
extension modules the goal of this project is to build regular native libraries
that are then loaded with CFFI at runtime.  Why not just use CFFI?  Because
CFFI's setuptools support alone does not properly work with such wheels (it
does not provide a way to build and properly tag wheels for shared libraries) and
it does not provide a good way to invoke an external build process (like a
makefile, cargo to build rust binaries etc.)In particular you will most likely only need two wheels for Linux, one for macs
and soon one for Windows independently of how many Python interpreters you want
to target.What is supported?Platforms: Linux, Mac, Windowssetuptools commands:bdist_wheel,build,build_ext,developpip install --editable .Universal wheels (PACKAGE-py2.py3-none-PLATFORM.whl); this can be disabled
withmilksnake_universal=Falseinsetup()in case the package also contains
stuff that does link against libpython.How?This example shows how to build a rust project with it:This is what asetup.pyfile looks like:fromsetuptoolsimportsetupdefbuild_native(spec):# build an example rust librarybuild=spec.add_external_build(cmd=['cargo','build','--release'],path='./rust')spec.add_cffi_module(module_path='example._native',dylib=lambda:build.find_dylib('example',in_path='target/release'),header_filename=lambda:build.find_header('example.h',in_path='target'),rtld_flags=['NOW','NODELETE'])setup(name='example',version='0.0.1',packages=['example'],zip_safe=False,platforms='any',setup_requires=['milksnake'],install_requires=['milksnake'],milksnake_tasks=[build_native])You then need arust/folder that has a Rust library (with a crate type
ofcdylib) and aexample/python package.Exampleexample/__init__.pyfile:fromexample._nativeimportffi,libdeftest():returnlib.a_function_from_rust()And arust/src/lib.rs:#[no_mangle]pubunsafeextern"C"fna_function_from_rust()->i32{42}And therust/Cargo.toml:[package]name="example"version="0.1.0"build="build.rs"[lib]name="example"crate-type=["cdylib"][build-dependencies]cbindgen="0.4"And finally the build.rs file:externcratecbindgen;usestd::env;fnmain(){letcrate_dir=env::var("CARGO_MANIFEST_DIR").unwrap();letmutconfig:cbindgen::Config=Default::default();config.language=cbindgen::Language::C;cbindgen::generate_with_config(&crate_dir,config).unwrap().write_to_file("target/example.h");}
Package: milksnakex
MilksnakeMilksnake is an extension for setuptools that allows you to distribute
dynamic linked libraries in Python wheels in the most portable way imaginable.It gives you a hook to invoke your own build process and to then take the
resulting dynamic linked library.Why?There are already other projects that make Python and native libraries play
along but this one is different.  Unlike other projects that build Python
extension modules the goal of this project is to build regular native libraries
that are then loaded with CFFI at runtime.  Why not just use CFFI?  Because
CFFI's setuptools support alone does not properly work with such wheels (it
does not provide a way to build and properly tag wheels for shared libraries) and
it does not provide a good way to invoke an external build process (like a
makefile, cargo to build rust binaries etc.)In particular you will most likely only need two wheels for Linux, one for macs
and soon one for Windows independently of how many Python interpreters you want
to target.What is supported?Platforms: Linux, Mac, Windowssetuptools commands:bdist_wheel,build,build_ext,developpip install --editable .Universal wheels (PACKAGE-py2.py3-none-PLATFORM.whl); this can be disabled
withmilksnake_universal=Falseinsetup()in case the package also contains
stuff that does link against libpython.How?This example shows how to build a rust project with it:This is what asetup.pyfile looks like:fromsetuptoolsimportsetupdefbuild_native(spec):# build an example rust librarybuild=spec.add_external_build(cmd=['cargo','build','--release'],path='./rust')spec.add_cffi_module(module_path='example._native',dylib=lambda:build.find_dylib('example',in_path='target/release'),header_filename=lambda:build.find_header('example.h',in_path='target'),rtld_flags=['NOW','NODELETE'])setup(name='example',version='0.0.1',packages=['example'],zip_safe=False,platforms='any',setup_requires=['milksnake'],install_requires=['milksnake'],milksnake_tasks=[build_native])You then need arust/folder that has a Rust library (with a crate type
ofcdylib) and aexample/python package.Exampleexample/__init__.pyfile:fromexample._nativeimportffi,libdeftest():returnlib.a_function_from_rust()And arust/src/lib.rs:#[no_mangle]pubunsafeextern"C"fna_function_from_rust()->i32{42}And therust/Cargo.toml:[package]name="example"version="0.1.0"build="build.rs"[lib]name="example"crate-type=["cdylib"][build-dependencies]cbindgen="0.19"And finally the build.rs file:externcratecbindgen;usestd::env;fnmain(){letcrate_dir=env::var("CARGO_MANIFEST_DIR").unwrap();letmutconfig:cbindgen::Config=Default::default();config.language=cbindgen::Language::C;cbindgen::generate_with_config(&crate_dir,config).unwrap().write_to_file("target/example.h");}
Package: milkycow
MilkycowMILKY COW SIMPLE ENCRYPTIONINSTALATION:$python3-mpipinstallmilkycowENCRYPT:>>>importmilkycowasmc>>>enc1=mc.encrypt("hello 1","pass")>>>enc2=mc.encrypt("hello 2","password",rotate=100,layer=1,3)DECRYPT:>>>dec1=mc.decrypt(enc1,"pass")>>>print(dec1)hello1>>>dec2=mc.decrypt(enc2,"password",100,1,3)>>>print(dec1)hello2FILE ENCRYPTION:>>>f=mc.encrypt(open("file.txt","r").read(),"p@55w0rd")>>>open("file.enc","w").write(f)
Package: milli
milli-pyPython bindings forMilli, the embeddable Rust-based search engine poweringMeilisearch.Due to limitations around Rust lifecycles, methods available viaIndexDocumentsandSearchhave been integrated directly into theIndexclass. This sacrifices/simplifies functionality available in the originalmillipackage.Install the package via:pipinstallmilliUsageBasic usage of themilli-py:importmilliindex=milli.Index("path/to/index")index.add_documents([{"id":0,"title":"Hello world","content":"This is a sample"},{"id":1,"title":"Hello moon","content":"This is another sample"},{"id":2,"title":"Hello sun","content":"This is yet another sample"},])results=index.search("wrold")document=index.get_document(results[0])assert(document['title']=="Hello world")DocumentationFull documentation formilli-pyis available atdocs/index.md.View it online athttps://github.com/AlexAltea/milli-py/blob/master/docs/index.md.ExamplesReal-world examples ofmilli-pyin action:Curator: Searching 140k movies (~10 MB csv, ~140 MB index) in around 36ms to obtain metadata from OMDB and auto-rename/tag movie collections.Do you have other interesting examples? Let me know!
Package: millilensing
MillilensingMillilensing- a python package for gravitational-wave millilensing analysis within bilby framework.Why millilensing?Currently most widely used lens models assume a spherically symmetric lens isolated from any astrophysical objects which, in general, is physically unrealistic. The framework developed here presents a phenomenological approach to gravitational-wave millilensing analysis, which allows for a physically realistic description of millilenses, relaxing the isolated lens assumption and taking into account gravitational effects from galaxy shear and surrounding lenses. In particular, the following assumptions are taken into account:no lens model assumedlens mass range (of order 1000 Msun) corresponding to geometrical optics approximation
(no wave optics effects)gravitational shear effects taken into accountarbitrary integer number of images allowedThe waveform models can be found in source.py which comprises three separate millilensing waveforms for the case of 2, 3 and 4 images (binary_black_hole_millilens_two_images,binary_black_hole_millilens_three_images,binary_black_hole_millilens_four_images), as well as a multi-image waveformmulti_image_Kmax(currently under development).Multi-image waveformMulti-image waveformmulti_image_Kmaxallows to account for a different integer number of images within one waveform model. Maximum number of images is specified by an integer value (1 to 10) forMAX_KMAXprovided in__init__.py.The lens parameters introduced for this waveform are: magnification, relative time delay, Morse phase and number of images. For the last two parameters, discrete prior distirbutions are used, which can be found inprior/lensing.py.Installationclone the repositorycd into the repository directoryEnter:pythonsetup.pyinstall
Package: milliluk-tools
Milliluk ToolsAssorted tools for TRS-80 Color Computer and 6809/6309 development.cgp220.py- render captured Tandy CGP-220 (Canon PJ-1080A) serial output as .pngmax2png.py- convert CoCo Max images (.MAX) to .pngDependenciesPython 3 supported. Requires pypng (pip install pypng).LicenseReleased under theArtistic License 2.0.
Package: millimango
PyPi:https://pypi.org/project/millimango/this is my first package with nothing speacialInstallopen CMD / TerminalpipinstallmillimangoHow to useopen your IDE…frommillimangoimportMangostkm=Mangostk()m.trend(open=True)m.what_is_it()m.how2make(open=True)m.ingredient()m.showpic()m.show_ascii()dev is me.
Package: million-verifier-client
Million Verifier Python ClientPython client forMillion Verifier. API documentation can be foundhere.SetupIt is advised thatmillion-verifier-clientis installed within a virtual environment
(e.g.,Poetry,venv, etc.).
Once in an activated virtual environment,million-verifier-clientcan be installed with the following commands:Pip:pipinstallmillion-verifier-clientPoetry:poetryaddmillion-verifier-clientExample Usageimportosfrommillion_verifierimportMillionVerifierClientclient=MillionVerifierClient(api_key=os.getenv("MILLION_VERIFIER_API_KEY"),)client.list_files()Output:{"files":[{"file_id":25645547490,"file_name":"test-emails-1.txt","status":"finished","unique_emails":0,"updated_at":"2023-11-25 12:12:21","createdate":"2023-11-25 12:12:16","percent":100,"total_rows":10,"verified":9,"unverified":1,"ok":8,"catch_all":0,"disposable":0,"invalid":1,"unknown":0,"reverify":0,"credit":10,"estimated_time_sec":0,"error":""}],"total":1}DevelopmentTestingTests can be run usingPytest:pytestOr, using Pytest within a Poetry environment:poetryrunpytestIn order to run tests successfully, make sure you have a valid API key declared as aMILLION_VERIFIER_API_KEYenvironment variable. This can be done by adding a.env.localfile to the root directory of this project:MILLION_VERIFIER_API_KEY="<YOUR_API_KEY>"
Package: milli-piyango
Milli Piyango PackageThis is a package for getting lottery related data fromMilli Piyango.Installationpipinstallmilli-piyangoUsageFor most case:frommilli_piyangoimportMilliPiyangoasmP# Getting available game listprint(mP.GAME_LIST)# Get available drawing dates for given games# Available game names# - mP.PIYANGO# - mP.SAYISAL# - mP.SANS_TOPU# - mP.ON_NUMARA# - mP.SUPER_LOTOdates=mP().get_draw_dates(mP.ON_NUMARA)# [ {'tarih': '20180730', 'tarihView': '30-07-2018'}, ... ]# Get game result for given datelast_drawing_result=mP().get_result(mP.ON_NUMARA,dates[0]['tarih'])# For the last drawing result# Winner numbers in orderprint(last_drawing_result['data']['rakamlarNumaraSirasi'])# '08 - 11 - 15 - 16 - 17 - 18 - 20 - 25 - 28 - 30 - 34 - 39 - 40 - 43 - 48 - 53 - 59 - 64 - 66 - 67 - 71 - 79'If you want to search a number (ticket number) is winner or not inPiyangogame;frommilli_piyangoimportMilliPiyangoasmPmP().get_result_for_piyango("20180729","179604")# First parameter is Date, second one is Ticket Number# {'kazandi': True, 'tip': '$6_RAKAM', 'ikramiye': 2500000, 'kacBildi': 6, 'numara': '179604', 'biletNo': '179604'}mP().get_result_for_piyango("20180729","178630")# {'kazandi': True, 'tip': 'SON_BES_RAKAM', 'ikramiye': 400, 'kacBildi': 5, 'numara': '78630', 'biletNo': '178630'}mP().get_result_for_piyango("20180729","189604")# {'kazandi': True, 'tip': 'AMORTI', 'ikramiye': 24, 'kacBildi': 1, 'numara': '4', 'biletNo': '189604'}mP().get_result_for_piyango("20180729","123452")# {'kazandi': False, 'biletNo': '123452'}
Package: milo
Library of useful Python codeThis is being published primarily so that the author can “pip install” it
wherever fine virtualenvs can be found. However, anyone else is free to
read and use it. Pull requests are welcome and will be added if they
fit in with the main goal of this project.This library contains useful bits of code, mostly small functions, which I’ve
found myself rewriting or copying and pasting.Current contents:a memoize function implemented in Redisa simple XML -> dictionary parserpolite_get: get a URL, with auto-cachinga simple get_logger that logs to a temp file, and stdout if interactivePlanned additions:easy command-line e-mail utility, with attachmentsDependencies:theredismoduletherequestspackage
Package: milon
Milon |Build Status| |Coveralls| |Pypi| |Code Quality|=====A hebrew dictionary in python... |Pypi| image:: https://badge.fury.io/py/python-milon.svg:target: https://badge.fury.io/py/python-milon.. |Build Status| image:: https://travis-ci.org/alejandrogallo/python-milon.svg?branch=master:target: https://travis-ci.org/alejandrogallo/python-milon.. |Coveralls| image:: https://coveralls.io/repos/github/alejandrogallo/python-milon/badge.svg?branch=master:target: https://coveralls.io/github/alejandrogallo/python-milon?branch=master.. |Code Quality| image:: https://img.shields.io/lgtm/grade/python/g/alejandrogallo/python-milon.svg?logo=lgtm&logoWidth=18:target: https://lgtm.com/projects/g/alejandrogallo/python-milon/context:python
Package: milspend
defenseThe goal of this project is to visualize military spending of countries.Using a SIPRI dataset, milspend can visualize military spending of up to four countries.The SIPRI dataset is downloadable from:https://sipri.org/sites/default/files/SIPRI-Milex-data-1949-2020_0.xlsxThe number of the vertical axis indicates the US dollars in millions.How to install milspendYou may need matplotlib library.$ pip install matplotlib$ pip install milspendHow to run milspendMilspend program allows user to specify up to four countries to plot military spending of the specified countries.
For example, the following command can display military spending of the US, China, Russia and Japan in the graph.$ milspend USA China Russia JapanThe following command can display military spending of Japan and South Korea.$ milspend Japan 'Korea, South'