Saravanan666/pypi-org huggingface dataset:
Package: mecab-ko-dic-msvc
mecab-ko-msvc역사적인 이유로 mecab-ko-msvc이름을 사용하지만, Windows와 함께 macOS와 Linux도 지원합니다.설치Windows실행 컴퓨터에 맞는최신버전을 다운로드 받습니다. x86, x64 버전을 제공합니다.-r옵션과-d옵션을 사용할 경우는 문제가 없지만 최적의 환경을 위해C:\mecab폴더에 압축을 해제합니다.사전을 설치합니다. mecab-ko-dic.zip을 다운로드하여C:\mecab\share\mecab-ko-dic폴더에 압축을 해제합니다.환경변수PATH에C:\mecab\bin을 추가하거나,C:\mecab\bin\mecab.exe를 실행합니다.macOS / Linux실행 컴퓨터에 맞는최신버전을 다운로드 받습니다. macOS (x86_64, arm64), Linux (x86_64, aarch64) 버전을 제공합니다.-r옵션과-d옵션을 사용할 경우는 문제가 없지만 최적의 환경을 위해/opt/mecab폴더에 압축을 해제합니다.명령어:sudo tar -C /opt -xvzf mecab-ko-<버전>.tar.gz사전을 설치합니다. mecab-ko-dic.tar.gzp을 다운로드하여/opt/mecab/share/mecab-ko-dic폴더에 압축을 해제합니다.명령어:sudo tar -C /opt/mecab/share -xvzf mecab-ko-dic.tar.gz환경변수PATH에/opt/mecab/bin을 추가하거나,/opt/mecab/bin/mecab를 실행합니다.Pythonpip를 이용하여 Python 버전을 설치할 수 있습니다.명령어:pip3 install mecab-ko-msvc mecab-ko-dic-msvc다음과 같이 Python 패키지에 내장된 사전을 사용할 수 있습니다.$python3
Python3.11.3(main,Jun52023,09:32:32)[GCC13.1.120230429]onlinux
Type"help","copyright","credits"or"license"formoreinformation.
>>>importMeCab
>>>tagger=MeCab.Tagger()>>>tagger.parse("무궁화꽃이피었습니다.")'무궁화\tNNG,*,F,무궁화,Compound,*,*,무궁/NNG/*+화/NNG/*\n꽃\tNNG,*,T,꽃,*,*,*,*\n이\tJKS,*,F,이,*,*,*,*\n피\tVV,*,F,피,*,*,*,*\n었\tEP,*,T,었,*,*,*,*\n습니다\tEF,*,F,습니다,*,*,*,*\n.\tSF,*,*,*,*,*,*,*\nEOS\n'사용 정보현재 버전에서는 Windows cmd에서 출력이 제대로 되지 않습니다.mecab.exe -o output.txt input.txt명령으로 파일로 출력하거나mecab-python-msvc를 이용해서 Python에서 사용해야 합니다.input.txt파일은 메모장에서 저장할 경우 인코딩을UTF-8으로 지정해야 합니다.메모장을 이용하여 저장하고 사용할 경우 출력의 앞 부분에 필요없는SY,*,*,*,*,*,*,*가 나타나게 됩니다. 이는 메모장이 파일을 저장할 경우BOM을 추가하기 때문입니다. 다른 에디터를 사용하여 BOM 없이 저장을 한다면 문제가 생기지 않습니다.mecab-ko 소개mecab-ko는은전한닢 프로젝트에서 사용하기 위한MeCab의 fork 프로젝트 입니다.최소한의 변경으로 한국어의 특성에 맞는 기능을 추가하는 것이 목표입니다.mecab-ko에서 추가된 기능.공백 문자(white space)를 포함하는 특정 품사 비용 늘림띄어쓰기를 하지 않는 일본어와 달리 띄어쓰기를 하는 한국어 특성에 맞게 특정 품사가 띄어쓰기 되어있는 경우 해당 품사의 비용을 늘리는 기능 (사전 설정(dicrc)에 설정 값을 지정)mecab을 사용하여 분석:::text
화학 이외의 것
화학    NN,T,화학,*,*,*,*
이      JKS,F,이,*,*,*,*
외      NN,F,외,*,*,*,*
의      JKG,F,의,*,*,*,*
것      NNB,T,것,*,*,*,*
EOSmecab-ko를 사용하여 분석:::text
화학 이외의 것
화학    NN,T,화학,*,*,*,*
이외    NN,F,이외,*,*,*,*
의      JKG,F,의,*,*,*,*
것      NNB,T,것,*,*,*,*
EOS설정 방법MeCab의 사전 설정(dicrc)에서 다음과 같이 설정합니다.:::text
# 좌측에 공백을 포함하는 품사의 연접 비용을 늘리기 위한 설정입니다.
# mecab-ko에서만 사용되는 설정입니다. 다음과 같은 형식을 가집니다.
# <posid 1>,<posid 1 penalty cost>,<posid 2>,<posid 2 penalty cost> ...
# 
# 예) 120,6000 => posid가 120인 품사(조사)의 좌측에 공백을 포함할 경우
# 연접 비용을 6000만큼 늘림
left-space-penalty-factor = 120,6000,184,6000,100,500mecab-ko의 설치와 사용법mecab-ko 설치mecab-ko 다운로드 페이지에서 최신 버전의 소스를 다운 받고 설치합니다. tar.gz 압축을 해제하고 일반적인 자유 소프트웨어와 같은 순서로 설치할 수 있습니다.:::text
$ tar zxfv mecab-ko-XX.tar.gz
$ cd mecab-ko-XX
$ ./configure 
$ make
$ make check
$ su
# make install설치 방법은 MeCab와 동일하므로, 자세한 내용은MeCab 홈페이지를 참조하시기 바랍니다.참고오래된 버전의 리눅스 환경에서 컴파일이 안되는 경우, 다음의 글을 참조하시기 바랍니다.Cent OS 5.9에서 MeCab 및 mecab-ko-dic 설치하기한국어 사전(mecab-ko-dic)의 설치와 사용mecab-ko-dic의 설명을 참조하시기 바랍니다.라이센스mecab-ko의 라이센스는 MeCab의 라이센스를 그대로 따릅니다.MeCab 는 무료 소프트웨어입니다. GPL (the GNU General Public License), LGPL (Lesser GNU General Public License) 또는 BSD 라이선스에 따라 소프트웨어를 사용, 재배포할 수 있습니다. 자세한 내용은 COPYING, GPL, LGPL, BSD 각 파일을 참조하십시오.
Package: mecab-ko-msvc
mecab-ko-msvc역사적인 이유로 mecab-ko-msvc이름을 사용하지만, Windows와 함께 macOS와 Linux도 지원합니다.설치Windows실행 컴퓨터에 맞는최신버전을 다운로드 받습니다. x86, x64 버전을 제공합니다.-r옵션과-d옵션을 사용할 경우는 문제가 없지만 최적의 환경을 위해C:\mecab폴더에 압축을 해제합니다.사전을 설치합니다. mecab-ko-dic.zip을 다운로드하여C:\mecab\share\mecab-ko-dic폴더에 압축을 해제합니다.환경변수PATH에C:\mecab\bin을 추가하거나,C:\mecab\bin\mecab.exe를 실행합니다.macOS / Linux실행 컴퓨터에 맞는최신버전을 다운로드 받습니다. macOS (x86_64, arm64), Linux (x86_64, aarch64) 버전을 제공합니다.-r옵션과-d옵션을 사용할 경우는 문제가 없지만 최적의 환경을 위해/opt/mecab폴더에 압축을 해제합니다.명령어:sudo tar -C /opt -xvzf mecab-ko-<버전>.tar.gz사전을 설치합니다. mecab-ko-dic.tar.gzp을 다운로드하여/opt/mecab/share/mecab-ko-dic폴더에 압축을 해제합니다.명령어:sudo tar -C /opt/mecab/share -xvzf mecab-ko-dic.tar.gz환경변수PATH에/opt/mecab/bin을 추가하거나,/opt/mecab/bin/mecab를 실행합니다.Pythonpip를 이용하여 Python 버전을 설치할 수 있습니다.명령어:pip3 install mecab-ko-msvc mecab-ko-dic-msvc다음과 같이 Python 패키지에 내장된 사전을 사용할 수 있습니다.$python3
Python3.11.3(main,Jun52023,09:32:32)[GCC13.1.120230429]onlinux
Type"help","copyright","credits"or"license"formoreinformation.
>>>importMeCab
>>>tagger=MeCab.Tagger()>>>tagger.parse("무궁화꽃이피었습니다.")'무궁화\tNNG,*,F,무궁화,Compound,*,*,무궁/NNG/*+화/NNG/*\n꽃\tNNG,*,T,꽃,*,*,*,*\n이\tJKS,*,F,이,*,*,*,*\n피\tVV,*,F,피,*,*,*,*\n었\tEP,*,T,었,*,*,*,*\n습니다\tEF,*,F,습니다,*,*,*,*\n.\tSF,*,*,*,*,*,*,*\nEOS\n'사용 정보현재 버전에서는 Windows cmd에서 출력이 제대로 되지 않습니다.mecab.exe -o output.txt input.txt명령으로 파일로 출력하거나mecab-python-msvc를 이용해서 Python에서 사용해야 합니다.input.txt파일은 메모장에서 저장할 경우 인코딩을UTF-8으로 지정해야 합니다.메모장을 이용하여 저장하고 사용할 경우 출력의 앞 부분에 필요없는SY,*,*,*,*,*,*,*가 나타나게 됩니다. 이는 메모장이 파일을 저장할 경우BOM을 추가하기 때문입니다. 다른 에디터를 사용하여 BOM 없이 저장을 한다면 문제가 생기지 않습니다.mecab-ko 소개mecab-ko는은전한닢 프로젝트에서 사용하기 위한MeCab의 fork 프로젝트 입니다.최소한의 변경으로 한국어의 특성에 맞는 기능을 추가하는 것이 목표입니다.mecab-ko에서 추가된 기능.공백 문자(white space)를 포함하는 특정 품사 비용 늘림띄어쓰기를 하지 않는 일본어와 달리 띄어쓰기를 하는 한국어 특성에 맞게 특정 품사가 띄어쓰기 되어있는 경우 해당 품사의 비용을 늘리는 기능 (사전 설정(dicrc)에 설정 값을 지정)mecab을 사용하여 분석:::text
화학 이외의 것
화학    NN,T,화학,*,*,*,*
이      JKS,F,이,*,*,*,*
외      NN,F,외,*,*,*,*
의      JKG,F,의,*,*,*,*
것      NNB,T,것,*,*,*,*
EOSmecab-ko를 사용하여 분석:::text
화학 이외의 것
화학    NN,T,화학,*,*,*,*
이외    NN,F,이외,*,*,*,*
의      JKG,F,의,*,*,*,*
것      NNB,T,것,*,*,*,*
EOS설정 방법MeCab의 사전 설정(dicrc)에서 다음과 같이 설정합니다.:::text
# 좌측에 공백을 포함하는 품사의 연접 비용을 늘리기 위한 설정입니다.
# mecab-ko에서만 사용되는 설정입니다. 다음과 같은 형식을 가집니다.
# <posid 1>,<posid 1 penalty cost>,<posid 2>,<posid 2 penalty cost> ...
# 
# 예) 120,6000 => posid가 120인 품사(조사)의 좌측에 공백을 포함할 경우
# 연접 비용을 6000만큼 늘림
left-space-penalty-factor = 120,6000,184,6000,100,500mecab-ko의 설치와 사용법mecab-ko 설치mecab-ko 다운로드 페이지에서 최신 버전의 소스를 다운 받고 설치합니다. tar.gz 압축을 해제하고 일반적인 자유 소프트웨어와 같은 순서로 설치할 수 있습니다.:::text
$ tar zxfv mecab-ko-XX.tar.gz
$ cd mecab-ko-XX
$ ./configure 
$ make
$ make check
$ su
# make install설치 방법은 MeCab와 동일하므로, 자세한 내용은MeCab 홈페이지를 참조하시기 바랍니다.참고오래된 버전의 리눅스 환경에서 컴파일이 안되는 경우, 다음의 글을 참조하시기 바랍니다.Cent OS 5.9에서 MeCab 및 mecab-ko-dic 설치하기한국어 사전(mecab-ko-dic)의 설치와 사용mecab-ko-dic의 설명을 참조하시기 바랍니다.라이센스mecab-ko의 라이센스는 MeCab의 라이센스를 그대로 따릅니다.MeCab 는 무료 소프트웨어입니다. GPL (the GNU General Public License), LGPL (Lesser GNU General Public License) 또는 BSD 라이선스에 따라 소프트웨어를 사용, 재배포할 수 있습니다. 자세한 내용은 COPYING, GPL, LGPL, BSD 각 파일을 참조하십시오.
Package: mecab-text-cleaner
MeCab Text CleanerThis is a simple Python package for getting japanese readings (yomigana) and accents using MeCab.
Please also consider usingpyopenjtalk(no accents) orpyopenjtalk_g2p_prosody (ESPnet)(with accents), as this package does not account for accent changes in compound words.InstallationInstall this via pip or pipx (or your favourite package manager):pipxinstallmecab-text-cleaner[unidecode,unidic]pipinstallmecab-text-cleaner[unidecode,unidic]Usage>mtcいい天気ですね。
イ]ーテ]ンキデスネ。
>mtcいい天気ですね。--ascii
i]te]nkidesune.
>mtcいい天気ですね--no-add-atype--no-add-blank-between-words
イーテンキデスネ
>mtcいい天気ですね--no-add-atype--no-add-blank-between-words-rkana
イイテンキデスネfrommecab_text_cleanerimportto_reading,to_ascii_cleanassertto_reading("     空、雲。\n雨！（")=="ソ]ラ、 ク]モ。\nア]メ！（"assertto_ascii_clean("      한空、雲。\n雨！（")=="han so]ra, ku]mo.\na]me!("Contributors ✨Thanks goes to these wonderful people (emoji key):This project follows theall-contributorsspecification. Contributions of any kind welcome!
Package: mecabwrap
mecabwrapis yet another Python interface toMeCab Morphological
Analyzer.Its goal is to provide intuitive APIs that work on Unix and Windows machines seamlessly.RequirementPython 2.7+ or 3.4+ (May also work on older versions)MeCab 0.996Installation1. Install MeCabUbuntu$sudoapt-getinstallmecablibmecab-devmecab-ipadic-utf8Mac OSX$brewinstallmecabmecab-ipadicWindowsDownload and run theinstaller.See also:official website2. Install this PackageInstall from PyPI$pipinstallmecabwrapor, from GitHub$gitclone--depth1https://github.com/kota7/mecabwrap-py.git$cdmecabwrap-py$pipinstall-U.Quick CheckFollowing command will print the MeCab version. Otherwise, you do not
have MeCab installed or MeCab is not on the search path.$mecab-v# should print `mecab of 0.996` or similar.To verify that the package is successfully installed, try the following:$python>>>frommecabwrapimporttokenize,print_token>>>fortokenintokenize(u"すもももももももものうち"):...print_token(token)...すもも名詞,一般,*,*,*,*,すもも,スモモ,スモモも助詞,係助詞,*,*,*,*,も,モ,モもも名詞,一般,*,*,*,*,もも,モモ,モモも助詞,係助詞,*,*,*,*,も,モ,モもも名詞,一般,*,*,*,*,もも,モモ,モモの助詞,連体化,*,*,*,*,の,ノ,ノうち名詞,非自立,副詞可能,*,*,*,うち,ウチ,ウチUsageSee theexample notebook(or a cleaner version onnbviewer) for more detail.
Package: mecache
mecacheAn easy-to-use cache moduleHow to useRunpip install mecacheorpipenv install mecacheto install.Built-in two cache modes, file cache mode, redis cache mode.You can control the time of cache failure by using the cache parameters.redis modesfrommecacheimportRedis# Refer to https://redis-py.readthedocs.io/en/latest/ for all parametersredis=Redis(host="127.0.0.1",port='6379',db=0,password="password")# Cache failure after 60 seconds@redis.cache(60)defdo(x,y):importtimetime.sleep(2)returnx+yasynchronous redis modesfrommecacheimportAioRedis# Refer to https://aioredis.readthedocs.io/en/latest/api_reference.html#aioredis.create_redis_pool for all parametersfile=awaitAioRedis('redis://localhost')# Cache failure after 60 seconds@file.cache(60)asyncdefdo(x,y):returnawaitdo.somethingfile modesfrommecacheimportFile# CACHE_PATH like '/var/tmp/test-cache'file=File("CACHE_PATH")# Cache failure after 60 seconds@file.cache(60)defdo(x,y):importtimetime.sleep(2)returnx+yasynchronous file modesfrommecacheimportAioFile# CACHE_PATH like '/var/tmp/test-cache'file=AioFile("CACHE_PATH")# Cache failure after 60 seconds@file.cache(60)asyncdefdo(x,y):returnawaitdo.somethingAdvanced usageIf the parameters of a function are difficult to serialize using pickle, you can specify the rules that generate key by customizingkeyf. The return value of the functionkeyfmust be a string.# a example in django view functiondefkey_by_user(request):returnrequest.user.username@file.cache(60*60,keyf=key_by_user)defhome(request):returnrender(request,'home.html')You can also overwritekeyffor all cache. This is a example:frommecacheimportFileclassCustomFile(File):@staticmethoddefkeyf(*args,**kwargs):string=do.somethingreturnstringfile=CustomFile("CACHE_PATH")Custom madeIf you need a custom cache, you can useBaseCacheorAioBaseCacheto create your cache class. Like thisfrommecacheimportBaseCacheclassCustomCache(BaseCache):defget_cache(self,func,key,max_time):qual=func.__qualname__returnget(qual+":"+key)defset_cache(self,result,func,key,max_time):qual=func.__qualname__set(qual+":"+key,result,ex=time.time()+max_time)
Package: mecapacktools
Tools for MecapackLa doc est disponible en Html ou en MDinstallation par pippip install mecapacktoolsInstaller les extensions :pip install mecapacktools[excel,sql,webservices]Extensions diponibles :excelSqlWebServicesFTPNotes pour le développement:Installationpoetry install --with dev --all-extrasGénération de la docpoetry run .\make.bat htmlpoetry run .\make.bat markdownPublier une nouvelle versionChanger la version :
Dans le fichier pyproject.toml modifier :[tool.poetry]
version = "1.0.0"Publier sur pypipoetry publish --build
Package: mech
mechI made this because I don't like VirtualBox and I wanted to use vagrant
with VMWare Fusion but was too cheap to buy the Vagrant plugin.https://blog.kchung.co/mech-vagrant-with-vmware-integration-for-free/Usage is pretty straightforward:Usage: mech [options] <command> [<args>...]

Options:
    -v, --version                    Print the version and exit.
    -h, --help                       Print this help.
    --debug                          Show debug messages.

Common commands:
    (list|ls)         lists all available boxes
    init              initializes a new Mech environment by creating a Mechfile
    destroy           stops and deletes all traces of the Mech machine
    (up|start)        starts and provisions the Mech environment
    (down|stop|halt)  stops the Mech machine
    suspend           suspends the machine
    pause             pauses the Mech machine
    ssh               connects to machine via SSH
    ssh-config        outputs OpenSSH valid configuration to connect to the machine
    scp               copies files to and from the machine via SCP
    ip                outputs ip of the Mech machine
    box               manages boxes: installation, removal, etc.
    global-status     outputs status Mech environments for this user
    status            outputs status of the Mech machine
    ps                list running processes in Guest OS
    provision         provisions the Mech machine
    reload            restarts Mech machine, loads new Mechfile configuration
    resume            resume a paused/suspended Mech machine
    snapshot          manages snapshots: saving, restoring, etc.
    port              displays information about guest port mappings
    push              deploys code in this environment to a configured destination

For help on any individual command run `mech <command> -h`

Example:

Initializing and using a machine from HashiCorp's Vagrant Cloud:

    mech init bento/ubuntu-14.04
    mech up
    mech sshmech initcan be used to pull a box file which will be installed and
generate a Mechfile in the current directory. You can also pull boxes
from Vagrant Cloud withmech init freebsd/FreeBSD-11.1-RELEASE.
Barring that,mech up <name>can also be used to specify a vmx file
to start.Installpip install -U mechor for the latest:pip install -U git+https://github.com/mechboxes/mech.gitShared FoldersIf the box you init was created properly, you will be able to access
the host's current working directory in/mnt/hgfs/mech. If you are
having trouble try running:sudoapt-getupdate
sudoapt-getinstalllinux-headers-$(uname-r)open-vm-toolsfollowed bysudovmware-config-tools.plorvmhgfs-fuse.host:/mech/mnt/hgfs
Package: mechachainsaw
Mecha ChainsawThis project is under current development, and is intended as a logging library formechasqueak3.However, it does have applications as a standalone logging tool.This project is currently inpre-release.  Use at your own risk!RequirementsPython 3.7+coloredlogs libraryInstallationThis is python library.  Install using pip/pipenv
and import mechachainsaw withimport mechachainsawUsagefrommechachainsawimportLogger``log=Logger("Namespace","Logfile.txt")log.info("This is an info-level entry!")will get you:<2019-01-12 15:17:40,572 Namespace> [INFO] This is an info-level entry!LicenseMecha Chainsawis licensed under the BSD 3-Clause License.
Package: mechanical-bull
Mechanical BullMechanical Bull is an ActivityPub Client application build based onbovine. It's main goal is to provide a platform for automating activities undertaking in the FediVerse. Furthermore, it serves as a demonstration how ActivityPub Clients can be build with bovine.InstallationOne can simply install mechanical_bull with pip viapipinstallmechanical-bullOnce can then add a new user by runningpython-mmechanical_bull.add_user[--accept]namehostnameThis will  then prompt you to add a new did:key to your ActivityPub Actor. This did:key will be used to authenticate mechanical_bull against your server. Once you have added the key, press enter, and mechanical_bull is running. This method of authentication is called Moo-Auth-1 and describedhere.The configuration is saved inconfig.toml. bovine also supports authentication through private keys and HTTP signatures. For the details on how to configure this, please consult bovine. You can add further automations there.Then you should be able to run mechanical bull viapython-mmechanical_bull.runConfigurationFirst by addinglog_file = "mechanical_bull.log"to yourconfig.tomlyou can make mechanical_bull write log entries to a file. Second, the config file has the following formatlogfile="mechanical_bull.log"[cow]private_key="z3u2Yxcowsarethebestcowsarethebestcowsarethebest"host="cows.rocks"[cow.handlers]"mechanical_bull.actions.reject_follow_request"=true# "mechanical_bull.actions.accept_follow_request" = true"mechanical_bull.actions.log_to_file"={filename="cow.txt"}The listed handlers are provided by mechanical_bull. They allow to accept / reject follow requests automatically, and the final one logs all traffic on the event source to "cow.txt".Writing automationsThe examples ofmechanical_bull.actions.accept_follow_requestandmechanical_bull.actions.log_to_fileshould show how to write a new automation. The basic idea is that each file contains a function handle with signatureasyncdefhandle(client:BovineClient,data:dict,**kwargs):returnhere the kwargs are the dict given by the definiton in the handler block, i.e.[user.handlers]"my.package"={arg1="value1",arg2="value2}ContibutingPlease report bugs, etc. to theissue tracker. Contributings in the form of pull requests are welcome. You can also contact me on the FediVerse at@helge@mymath.rocks.Finally, I plan a multi-user "server" version of this project calledmechanical_herd. The functionality should be similar, but updating the configuration should not require a restart. One might also think hooking into the redis frombovine_pubsubfor this. mechanical_herd will probably be part of the bovine user management interface.
Package: mechanical-markdown
Mechanical MarkdownIf you are using markdown to create tutorials for your users, these markdown files will often be a series of shell commands that a user will copy and paste into their shell of choice, along with detailed text description of what each command is doing.If you are regularly releasing software and having to manually verify your tutorials by copy pasting commands into a terminal every time you create a release, this is the package for you.The mechanical-markdown package is a Python library and corresponding shell script that allow you to run annotated markdown tutorials in an automated fashion. It will execute your markdown tutorials and verify the output according to expected stdout/stderr that you can embed directly into your markdown tutorials.InstallingThis package requires a working python3 environment. You can install it using pip:pipinstallmechanical-markdownThis will install the Python module, and create themm.pyCLI script.Quick StartCheck out theexamplesfor some quick and easy examples.UsageCLIA command line utility calledmm.pyis included with this package.%mm.py--help
usage:mm.py[-h][--dry-run][--manual][--shellSHELL_CMD]markdown_file

Autovalidatemarkdowndocumentation

positionalarguments:markdown_file

optionalarguments:-h,--helpshowthishelpmessageandexit--dry-run,-dPrintoutthecommandswewouldrunbasedonmarkdown_file--manual,-mIfyourmarkdown_filecontainsmanualvalidationsteps,pauseforuserinput--shellSHELL_CMD,-sSHELL_CMDSpecifyadifferentshelltouseAPICreating a MechanicalMarkdown instance from a string which contains a markdown document:frommechanical_markdownimportMechanicalMarkdownmm=MechanicalMarkdown(markdown_string,shell="bash -c")MechanicalMarkdown methods# Returns a string describing the commands that would be runoutput=mm.dryrun()print(ouput)# Run the commands in the order they were specified and return a boolean for succes or failure# Also returns a report summarizing what was run and stdout/sterr for each commandsuccess,report=exectute_steps(manual,validate_links=False,link_retries=3)print(report)ContributingIssues and contributions are always welcome! Please make sure your submissions have appropriate unit tests (seetests).This project was created to supportdapr/quickstarts. We're sharing it with the hope that it might be as usefull for somebody else as it was for us.
Package: mechanician-arangodb
Daring Mechanician-ArangoDBThis package providesDaring MechanicianAIToolsfor interacting with ArangoDB graph databases.SeeDaring Mechanician Github Repofor more information.frommechanician_arangodbimportDocumentManagerAIToolsfromarangoimportArangoClientarango_client=ArangoClient(hosts=os.getenv("ARANGO_HOST"))doc_tools=DocumentManagerAITools(arango_client,database_name=database_name)ai=TAGAI(ai_connector=ai_connector,instruction_set_directory="./instructions",tools=doc_tools,name="Movie Document Manager AI")Example project:examples/arango_movie_dbRun ArangoDB in DockerSet your environment variables:ARANGO_ROOT_PASSWORD=<YOUR_ARANGODB_ROOT_PASSWORD>ARANGO_HOST=http://localhost:8529dockerpullarangodb/arangodbdockerrun-eARANGO_ROOT_PASSWORD=${ARANGO_ROOT_PASSWORD}-p8529:8529-d--namearangodb-instancearangodb/arangodbdockerstoparangodb-instancedockerstartarangodb-instance
Package: mechanic-pytorch
Mechanic: black-box tuning of optimizersBased on the paper:https://arxiv.org/abs/2306.00144Be aware that all experiments reported in the paper were run using theJAX version of mechanic, which is available inoptaxviaoptax.contrib.mechanize.Mechanic aims to remove the need for tuning a learning rate scalar (i.e. the maximum learning rate in a schedule).
You can use it with any pytorch optimizer and schedule. Simply replace:optimizer=torch.optim.SGD(model.parameters(),lr=0.01)with:frommechanic_pytorchimportmechanizeoptimizer=mechanize(torch.optim.SGD)(model.parameters(),lr=1.0)# you can set the lr to anything here, but excessivel small values may cause numerical precision issues.That's it! The new optimizer should no longer require tuning the learning rate scale! That is, the optimizer should now be very robust to heavily mis-specified values oflr.Installationpip install mechanic-pytorchNote that the package name ismechanic-pytorch, but you shouldimport mechanic_pytorch(dash replaced with underscore).OptionsIt is possible to play with the configuration of mechanic, although this should be unecessary:optimizer=mechanize(torch.optim.SGD,s_decay=0.0,betas=(0.999,0.999999),store_delta=False)(model.parameters(),lr=0.01)The optionstore_delta=Falseis set to minimize memory usage. An minimum we currently keep one extra "slot" of memory (i.e. an extra copy of the weights). If you are ok keeping one more copy, you can setstore_delta=True. This will make the first few iterations have a slightly more accurate update, and usually has negligible effect.The options_decayis a bit like a weight-decay term that empirically is helpful for smaller datasets. We use a default of 0.01 in all our experiments. For larger datasets, smaller values (even 0.0) often worked as well.The optionbetasis a list of exponential weighting factors used internally in mechanic. They are NOT related to beta values found in Adam. In theory, it should be safe to provide a large list of possibilities here. The default settings of(0.9,0.99,0.999,0.9999,0.99999,0.999999)seem to work will in a range of tasks.s_initis the initial value for the mechanic learning rate. It should be anunderestimateof the correct learning rate, and it can safely be set to a very small value (default 1e-8), although it cannot be set to zero. In particular, the  theoretical analysis of mechanic includes a log(1/s_init) term. This is very robust to small values, but will eventually blow up if you makes_initabsurdly small.Licensemechanicis distributed under the terms of theApache-2.0license.
Package: mechanics
My LibraryThis is a Python library for solving simple mechanics problems. Currently, it includes functions for the following calculations:final_velocity(initial_velocity, acceleration, time): This function calculates the final velocity of an object given the initial velocity, acceleration, and time. The inputs and output are in meters per second (m/s).displacement(initial_velocity, time, acceleration): This function calculates the displacement of an object given the initial velocity, time, and acceleration. The inputs and output are in meters (m).force(mass, acceleration): This function calculates the force exerted on an object given the mass and acceleration. The mass is in kilograms (kg), the acceleration is in meters per second squared (m/s²), and the output is in newtons (N).kinetic_energy(mass, velocity): This function calculates the kinetic energy of an object given the mass and velocity. The mass is in kilograms (kg), the velocity is in meters per second (m/s), and the output is in joules (J).pendulum_period(length, gravity): This function calculates the period of a simple pendulum given the length of the pendulum and the acceleration due to gravity. The length is in meters (m), the gravity is in meters per second squared (m/s²), and the output is in seconds (s).UsageHere's an example of how to use thefinal_velocityfunction:importmechanicsv=mechanics.final_velocity(0,9.8,10)print(v)# Prints: 98.0