Saravanan666/pypi-org huggingface dataset:
Package: simpleelf
IntroductionELF file is not only an executable, but a very convenient way to describe
a program's layout in memory. The original intention of this project is to
allow an individual to create an ELF file which describes the memory mapping
used for an embedded program. Especially useful for using together with other
analysis tools, such as:
IDA/Ghidra/etc... They can have all its desired information without the need to
open just an ordinary.binfile and running several IDAPython scripts
(I'm sick ofLoad additional binary file...option).Pull Requests are of course more than welcome :smirk:.InstallationUsepip:python3-mpipinstallsimpleelfOr clone yourself and build:gitclonegit@github.com:doronz88/simpleelf.gitcdsimpleelf
python-mpipinstall-e.-URunningNow you can just import simpleelf and start playing with it.ParsingParsing is easy usingElfStruct.
Try it out:fromsimpleelf.elf_structsimportElfStructsElfStructs('<').Elf32.parse(elf32_buffer)# outputs a constucts' containerElfStructs('<').Elf64.parse(elf64_buffer)# outputs a constucts' containerBuilding from scratchBuilding is easy usingElfBuilder.
Try it out:fromsimpleelf.elf_builderimportElfBuilderfromsimpleelfimportelf_consts# can also be used with ELFCLASS64 to create 64bit layoutse=ElfBuilder(elf_consts.ELFCLASS32)e.set_endianity('<')e.set_machine(elf_consts.EM_ARM)code=b'CODECODE'# add a segmenttext_address=0x1234text_buffer=b'cybercyberbitimbitim'+codee.add_segment(text_address,text_buffer,elf_consts.PF_R|elf_consts.PF_W|elf_consts.PF_X)# add a second segmente.add_segment(0x88771122,b'data in 0x88771122',elf_consts.PF_R|elf_consts.PF_W|elf_consts.PF_X)# add a code section inside the first segmentcode_address=text_address+text_buffer.find(code)# point at CODECODEcode_size=len(code)e.add_code_section(code_address,code_size,name='.text')# set entry pointe.set_entry(code_address)# add .bss section. not requiring a loaded segment from# filebss_address=0x5678bss_size=0x200e.add_empty_data_section(bss_address,bss_size,name='.bss')# get raw elfe.build()
Package: simpleemail
Simple SMTP wrapper for Python with basic HTML and text support based on MIME types.QuickstartInstall simpleemailpip install simpleemailThen use it in a project:from simpleemail import create_email_message, send_emailTo send an email you have to first create an email message to send.Note you can use any combination of plain text or HTML when creating a message.message =create_email_message('Hello','email@address.com','foo@bar.it','World!','<html><head></head><body><h1>World!</h1></body></html>')send_email(message,'smtp.server.com',False)You can also provide parameters to be replaced when the message is created.:params = {'name': 'Rick James'}
message = create_email_message('Hello',
                                'email@address.com',
                                'anyone@foobar.com',
                                '[name]!',
                                '<html><head></head><body><h1>[name]!</h1></body></html>',
                                params)This will substitute the value of Rick James in for the name.You can also send a single attachment or multiple attachments by choosing:message = create_email_message('Hello',
                                'email@address.com',
                                'anyone@foobar.com',
                                'Test body',
                                '<html><head></head><body><h1>Test body</h1></body></html>',
                                [],
                                "file.txt",
                                ['file1.txt','file2.pdf'])
Package: simple-email
simple-email简易的发送邮件脚本,通过封装,可以发送带附件的邮件.demoimport Simple_email
## 发送邮件
1.填写邮箱配置
    host = 'xx.xx.xx.xx'
    port = 110
    user = ''
    pass_ = ''
2.填写邮件配置
    title = ''
    body = ''
    attachment = ['']
    sender = ''
    to = ['']
    cc = []
3.发送邮件
    se = SenEmail(host=host,port=port,user=user,pass_=pass_)
    se.send_email(title=title, body=body, attachment=attachment, sender=sender, to=to, cc=cc)

## 接收邮件正文,附件,邮件头.
    se_server = SenEmail(host=host,port=port,user=user,pass_=pass_)
    class AB(GetEmail):
        def run():
            '重写run()方法'
Package: simple-email-sender
This package provides a simple notifier sending emails.Free software: GNU General Public License v3Copyright (c) 2021 Henning JanssenInstallationTo install the package, simply run within your terminal:$pipinstallsimple_email_senderUsageYou will need only one single line, to trigger a message within your Python code:sender.info("Hello World")For a fully working example, you need to specify theserver_settingsin a separate file# server_settings.yaml# Use this file to store the server setting for the SMTP-Server"name":"example@email.com""password":"MySecretPassword""server":"smtp.example.com""port":465And this is a MWE:# example.pyfromsimple_email_senderimportSender# Before running this example, you need to change your settings in the# 'server_settings.yaml'-file according to your personal needsdefmain():receiver="example@email.com"sender=Sender("./server_settings.yaml",receiver,subject="Experiment 123")sender.info("Hello World")sender.error("Something unexpected happened and you should take care of it...")if__name__=="__main__":main()
Package: simple-embed-pagination
embed-paginationNotesThis project is a fork of an inactive repository athttps://github.com/soosBot-com/PaginationCredit is due to the contributors of the original project.New features ðŸ’¡Added new on_timeout optionsAdded buttons for first/last pageImproved button layoutMany more general improvementsInstallationUse the package managerpipto install the library.pipinstallsimple-embed-paginationUsageImportant:discord.py master, or a form that has discord.ui.View is required to use this library!Quickstartimportpaginator# Create a list of embeds to paginate.embeds=[discord.Embed(title="First embed"),discord.Embed(title="Second embed"),discord.Embed(title="Third embed")]...# Inside a command.awaitpaginator.Simple().start(ctx,pages=embeds)Hint:Thectxparameter is of typediscord.InteractionAdvancedTo use custom buttons, pass in the corresponding argument when you initiate the paginator.THESE ARE OPTIONAL# These arguments override the default ones.PreviousButton=discord.ui.Button(...)NextButton=discord.ui.Button(...)PageCounterStyle=discord.ButtonStyle(...)# Only accepts discord.ButtonStyleInitialPage=0# Page to start the paginator on.OnTimeout='disable_view'# Delete paginator message on timeout. Default is False.timeout=400# Seconds to timeout. Default is 60.ephemeral=True# Defaults to False if not passed in.FirstButton=discord.ui.Button(...)LastButton=discord.ui.Button(...)awaitpaginator.Simple(previous_button=">",next_buttom=NextButton,page_counter_style=PageCounterStyle,initial_page=InitialPage,allow_ext_input=True,on_timeout=DeleteOnTimeout,timeout=timeout,ephemeral=ephemeral,first_button=FirstButton,last_button=LastButton).start(ctx,pages=embeds)ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseMIT
Package: simpleencode
simple encode decode w/ private key, based on the base64 encode and decode.Initially developed for turning database ID’s into URL’s without exposing the
ids in the url, or having a bot iterate over the values.Also useful for storing passwords which need to be converted back to
clear text, in alphanumeric form given a secret word. This is NOT encryption
nor a hash. This is NOT cryptographically safe. For that an SSL public/private
key pair is preferred. For situations where the encoded string is already
protected by a privileged account, and the secret key is stored in a
configuration file which is also protected by a privileged login, this system
is secure. It is secure by virtue of having all its elements secure, and
mitigates the risk of compromise of either one of those vectors (but not both).This is good for websites which store the secret key in a configuration file
on disk, and the encoded word in a database (accessible by a different user),
and where both values are not in transactional memory except for the duration
of decoding and using the decoded string, which should be immediate.Requires Python 2.4 or greater>>> from simpleencode import encode, decode, mksecret
>>> secret_key = mksecret()
>>> secret_key
"{iIb'd/y!%w$'BDL&6NkWf`LeyZvp+}6QFm3~sBQjP)[!8xZ}a"
>>> encoded = encode("Some Text", secret_key)
>>> encoded
'S1lwA3QLQhwBcRJcUxs5fQNSekZjNjwREzFzNSthFh9kNj5PSzl6Cih6HxtWa1lvKhE='
>>> decode(encoded, secret_key)
'Some Text'
>>>
Package: simpleencrypt
About SimpleEncryptSimpleEncryptis a Cross-Language Encryption Library that provides the ability to encrypt and decrypt data in C++ and Python 3Installing Dependency librarySimpleEncrypt Python package has a dependency on C++ shared library. Before running the simple encrypt python package, build and install C++ shared library.Build and install C++ shared libraryInstall dependenciessudo apt-get install libssl-dev opensslDownload or clone simple encryptC++ shared libraryCompile and installgit clone https://github.com/shreyasnayak/SimpleEncrypt
mkdir CPP/Build && cd CPP/Build
cmake ..
make
sudo make installInstall python packageSimpleEncryptInstallationpython3 -m pip install simpleencryptUsagefromsimpleencryptimportaes256AES_KEY=b'171A065A7675A09AECEC118DBC008A822A041FC2EBF2B3E4CF7A4C966E5D5897'AES_IV=b'2B5442AD8739992F'plainText=b'Hello World'# encryptionencrypted=aes256.encrypt(plainText,AES_KEY,AES_IV)print(encrypted)# decryptiondecrypted=aes256.decrypt(encrypted,AES_KEY,AES_IV)print(decrypted)
Package: simple-engine-core
# simple-engine**For updated documentation, visit [the simple-engine wiki.](https://github.com/apizzimenti/simple-engine-ui/wiki)`simple-engine` reads in an html file and generates a JSON map corresponding to the html.## installation`$ pip install simple-engine-core`## usageput a `engine.json` file in a place that makes it convenient to type the source and destination paths out (a rootdirectory will do)ex. `engine.json`{"src": "app/index.html","dest": "output.js","toplevelid": "start"}then run `engine` from the command line.
Package: simple-entity
Simple-entitySimeple Entity Type for DDD development.Installpipinstall-Usimple-entityUseclassActivity(Entity):title:str="activity"timeCreate:datetime=NonetimeStart:datetime=NonetimeEnd:datetime=NonetimeEdit:datetime=Nonedefupdate(self,fields:List[str]):self.timeEdit=datetime.now()returnactivity=Activity(_id="0",title="act0",timeCreate=datetime(2020,1,1),timeStart=datetime(2020,1,1),timeEnd=datetime(2020,1,10),)act_dict={"_id":"0","timeCreate":datetime(2020,1,1,0,0),"timeStart":datetime(2020,1,1,0,0),"timeEdit":None,"timeEnd":datetime(2020,1,10,0,0),"title":"act0",}assertactivity.to_dict()==act_dictassertActivity.from_dict(act_dict)==activity
Package: simple-enum
What Does Simple Enum Do?Simple Enum provides a simpler way to define Enums in Python 3:class Colour(Enum):
    red
    green
    blueYou can see the full documentation (and implementation) ongithub.Why Should I Use Simple Enum?It makes the common case as simple as possible.It detects accidental duplicate values.It allows you to easily select alternative values (numbers from one, bit
fields, etc).What Else Should I Know?(c) 2013 Andrew Cooke,andrew@acooke.org; released into the public domain
for any use, but with absolutely no warranty.
Package: simple-env
simple-envSimple Processing of Environmental Variablesfeaturesautomatic removal of quotes ("and')automatic conversion of Booleans ("true","True", and"TRUE"are converted intoTrue)automatic conversion of Integersautomatic suggestion of typo correctionsusageget variableimportsimple_envasseemail_host=se.get("EMAIL_HOST")# email_host is "smtp.gmail.com"email_use_tls=se.get("EMAIL_USE_TLS")# email_use_tls is Trueemail_port=se.get("EMAIL_PORT")# email_port is 8080suppress warningsBy default, simple env warns when it can't find a variable and offers an alternative suggestion if possible.email_use_tls=se.get("USE_TLS")prints[simple-env]couldnotfind"USE_TLS",didyoumean"EMAIL_USE_TLS"?check if environmental variable is setimportsimple_envassehasState=se.has("STATE")# hasState is True if the variable is set to null
Package: simpleetl
SimpleETL er an ETL tool developed by FlexDanmark to easily handling processing of data
from user-defined data sources and automatically generates a dimensionally modelled
data warehouse.SimpleETL is developed to work with the PostgreSQL DBMS backend with psycopg2 as
database adapter.FeaturesAutomatically generates data warehouse dimensional model (star schema)Can track changes of factsUser-defined automatic fact table partitioningHandle deleted factsEnsures data quality by type and value checkingProvides a wide range of default data types and allows user to define their ownInstallationSimpleETL can be installed in multiple ways. The simples is to install from pypi (https://pypi.org/project/simpleetl/):$ pip install simpleetlDependenciesSimpleETL requires the psycopg2-binary and the pygrametl package for database
PostgreSQL database connections and table handling.Example usagesFrom the source repository multiple code examples can be found in the examples folder.A simple example could be:fromsimpleetlimportFactTable,runETL,datatypesasdtfactobj=FactTable(schema="testschema",table="userdata",migrate_updates=True,# Updated to data will be processed. Can be set to False if only appending (will speed things up)store_history=False,# Create a seperate userdata_historic table for storing changes to facts.track_last_updated=True,# Adds an _updated attribute which keeps track of when data was last updated.lookupatts=["userid"]# List of attributes uniquely defining a fact)factobj.handle_deleted_rows("mark")# Tells ETL to mark deleted rows from source with an _deleted timestamp attributefactobj.add_column_mapping("userid",dt.bigint,"userid")# Map userid from source data to database with same namefactobj.add_column_mapping("sys_username",dt.text,"username")# Rename "sys_username" from source data to "username" in databasedatafeeder=[{"userid":42,"sys_username":"Jens"},{"userid":56,"sys_username":"Svend"}]# datafeeder can be a generator or simple a iterable of dictionariesstats=runETL(facttable=factobj,datafeeder=datafeeder,db_host="localhost",db_port="5432",db_name="test_db",db_user="dbuser",db_pass="dbpass")PublicationsOve Andersen, Christian Thomsen, Kristian Torp:
SimpleETL: ETL Processing by Simple Specifications. DOLAP 2018http://ceur-ws.org/Vol-2062/paper10.pdf
Package: simple-event-bus
simple-event-busa simple python event busInstall:pipinstallsimple_event_busExample:importasyncio



fromsimple_event_busimportAsyncEventBus,Event,run_simple_event_source_asyncapp=AsyncEventBus()tick_list=[]@app.listening("HeartBeat")asyncdeftick_collector(event:Event)->None:print(event.now)tick_list.append(event)iflen(tick_list)>5:awaitapp.publish_event("close_loop")asyncio.get_event_loop().run_until_complete(run_simple_event_source_async(app))FeaturesEventBusAsyncEventBusEventBus.run_forever functionEventBus.publish_event accept Event , EVENT_TYPE and str.Event can get current_applistening function args checkadd remove methodallow no param method to listeningIndependent event sourcesadd before event listener and after event listenerBlack formatterThis project use black, please setContinuation indent= 4Pycharm - File - Settings - Editor - Code Style - Python - Tabs and IndentsFlake8 lintUse flake8 to check your code style.This project is made byAngusWG/cookiecutter-py-packagesimple_event_bus history0.0.4fix error package0.0.3independent event sourcesadd remove methodallow no param method to listening0.0.2fix publish_event can not accept str event.0.0.1Basic functions completed0.0.0first commit
Package: simple-export
simple_exportsimple_export是一款导出工具包，目标是根据模板快速导出simple_exportpython包上传到pypi过程提示：文章写完后，目录可以自动生成，如何生成可参考右边的帮助文档@TOC前言有的时候会写一些python的工具包，上传到pypi会很方便下载使用，本篇文章将介绍打包上传过程pypi官网https://pypi.org/pypi打包上传文档testpypi官网 (pypi.org)simple-export · PyPIGitHub - mtl940610/simple_export一、pypi是什么？Python 包索引 （PyPI） 是 Python 编程语言的软件存储库。二、使用步骤1.创建目录结构packaging_tutorial 根目录LICENSE 参阅https://choosealicense.com/选择许可证pyproject.toml 配置文件dist 打包后的目录src/simple_export 项目文件，可替换成你自己的tests 测试文件夹，可为空└─packaging_tutorial
    │  LICENSE
    │  pyproject.toml
    │  README.md
    │
    ├─dist
    │      simple_export-0.1.9-py3-none-any.whl
    │      simple_export-0.1.9.tar.gz
    │
    ├─src
    │  └─simple_export
    │      │  example.py
    │      │  excel.py
    │      │  val1.xlsx
    │      │  __init__.py
    │      │
    │      ├─template
    │      │      excel1.xlsx
    │      │      excel2.xlsx
    │      │
    │      └─utils
    │          │  tool.py
    │          │  __init__.py
    │          │
    │          └─__pycache__
    │                  tool.cpython-38.pyc
    │                  __init__.cpython-38.pyc
    │
    └─tests
            example.py
            val1.xlsx
            __init__.py2. 创建 pyproject.toml名称备注name包的分发名称。这可以是任何名称，只要它只包含字母、数字、.、_和-。它也不能已经在 PyPI 上使用。请务必使用您在本教程中的用户名更新此名称，因为这可确保您不会尝试上传与已存在名称相同的包。version包的版本号。有关版本的更多详细信息，请参阅版本说明符规范 。一些构建后端允许以其他方式指定它，例如从文件或 git 标签。authors用于识别包的作者；您为每位作者指定姓名和电子邮件。您也可以maintainers以相同的格式列出description简短单句摘要readmereadme文件的路径requires-python给出项目支持的 Python 版本。像pip这样的安装程序会回顾旧版本的包，直到找到一个具有匹配 Python 版本的包。classifiers为 index 和pip提供一些关于您的包的额外元数据。在这种情况下，该包仅与 Python 3 兼容，根据 MIT 许可获得许可，并且独立于操作系统。您应该始终至少包括您的包适用于哪些 Python 版本、您的包在哪个许可下可用以及您的包将在哪些操作系统上运行。有关分类器的完整列表，请参阅https://pypi.org/classifiers/。urls允许您列出任意数量的额外链接以显示在 PyPI 上。通常这可能是源代码、文档、问题跟踪器等。我的toml（示例）：[tool.poetry]name="simple-export"version="0.1.9"description="简单的模板导出工具"authors=["mtl <576694002@qq.com>"]license="Apache"readme="README.md"[tool.poetry.dependencies]python=">=3.7"openpyxl="^3.0.10"[build-system]requires=["poetry-core"]build-backend="poetry.core.masonry.api"[tool.poetry.urls]"Homepage"="https://github.com/mtl940610/simple_export""Bug Tracker"="https://github.com/mtl940610/simple_export/issues"3. 创建README.mdmarkdown格式随意编写，介绍项目4. 创建许可证LICENSE 参阅https://choosealicense.com/选择许可证5. 打包# 如果有虚拟环境需要进入虚拟环境 直接python 执行
python3 -m pip install --upgrade build
# pyproject.toml位于的同一目录运行此命令 此命令执行完后 dist目录下会生成两个文件 whl 、 tar.gz
python3 -m build
# 通过twine上传包
python3 -m pip install --upgrade twine6. 注册pypi账号和testpypi账号pypi官网[https://pypi.org/testpypi官网 (pypi.org)7. 上传到testpypi一般可以先上传到testpypi，测试通过后在上传pypi，当然也可以直接上传到pypi# testpypi 改为 pypi就是上传到pypi dist/* 是上传dist下所有文件
python3 -m twine upload --repository testpypi dist/*8. 安装python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps simple-export总结1.安装如果换源了，有可能得等一段时间才能同步到其他源可以先指定官方源[test-pypi](https://test.pypi.org/simple/pypi [Simple index](https://pypi.org/simple)
Package: simple-extract
simple_extractSimple File ExtractionDescriptionA small command line file extraction utility written in Python. It uses external tools to optionally fetch from an url and decompress archives.Getting startedPython >=3.9neededExternal tools that can be used:targzipbzip2unrarlha7zunziprpm2cpiocpioarxzzstdcurlwgetfetchInstallingManual local install$ clone the git repository from https://github.com/berrym/simple_extract.git
$ python3 -m venv /path/to/venv
$ sh /path/to/venv/bin/acivate
$ python3 -m build
$ /path/to/venv/bin/pip3 install .Package installationRecommended$ python3 -m pip install simple-extractor$ python3 -m pip install --user simple-extractor$ pipx install simple-extractExecuting program$ /path/to/venv/bin/simple-extract  # if cloned and manually built
or:
$ python3 simple_extract.py some-archive.tar.gz some-other-archive.lzma
or if installed via pip or pipx:
$ simple-extract https://github.com/ibara/mg/releases/download/mg-6.8.1/mg-6.8.1.tar.gzAuthorsCopyright 2024 Michael Berrytrismegustis@gmail.comLicenseThis project is licensed under the MIT License - see the LICENSE file for details.
Package: simple-face-alignment
simple-face-alignmenta simple face alignment, standard face size is 96x112example
example image ishttps://github.com/wrenchzc/simple-face-alignment/blob/main/tests/ty1.jpgbefore alignuse 5 point affineuse 3 point affine###INSTALLATIONCurrently it is only supported Python3.4 onwards. It can be installed through pip:$ pip install simple-face-alignmentThis implementation requires OpenCV>=4.1USAGEThe following example illustrates the ease of use of this package:>>> from simple_face_alignment import align_face, ALIGN_METHOD_3POINT
>>>
>>> img = cv2.imread("ty1.jpg")
>>> # detector result should include a bbox and a landmark
>>> # bbox is x, y, r, b, landmark is left eye, right eye, nose, mouse left, mouse right
>>> bbox = [409.89, 230.20, 725.06, 557.34]
>>> landmark = [(497.8352508544922, 394.51161527633667), (610.6470794677734, 335.02099990844727),
                (588.0000686645508, 446.7395896911621), (567.606155872345, 543.8972625732422),
                (643.1047439575195, 437.53148651123047)]
>>> face_aligned = align_face(img, landmark, bbox)LICENSEMIT LicenseREFERENCE从零开始搭建人脸识别系统（二）：人脸对齐
Package: simple-factorial
Factorial CalculatorThis Python module,simple_factorial, is a versatile and user-friendly tool designed to calculate the factorial of a non-negative integer. The factorial of a non-negative integernis the product of all positive integers from 1 ton. This module provides a reliable way to compute factorials, handling various scenarios, including input validation and error handling.Table of ContentsInstallationUsageDocumentationFeaturesContributingLicenseInstallationTo use thesimple_factorialmodule, you can simply import it into your Python project. There is no need for a separate installation process. Make sure thefactorial.pyfile is in the same directory as your Python script, or you can place it in a directory that is in your Python module search path.pipinstallsimple_factorialUsageYou can use thecalculate_factorialfunction provided by thefactorial.pymodule to calculate the factorial of a non-negative integer. Here's a basic example:importsimple_factorialresult=simple_factorial.factorial(5)print(result)# Output: 120DocumentationThefactorial.pymodule includes detailed documentation in the form of docstrings. These docstrings provide information about the module's purpose, function arguments, return values, and usage examples. You can access this documentation using Python's built-inhelp()function or by viewing the docstrings directly in your code editor.importsimple_factorialhelp(simple_factorial.factorial)FeaturesInput Validation: The module ensures that input is a non-negative integer and handles negative numbers gracefully.Error Handling: If an invalid input is provided, the module raises aValueErrorwith an informative error message.Interactive Mode: When run as a script, the module enters an interactive mode, allowing users to calculate factorials for multiple numbers until they choose to quit.Documentation: The module includes docstrings that provide information about its purpose, usage, and examples, making it easy for users to understand and use.ContributingContributions to this project are welcome! If you'd like to improve the module, fix a bug, or add a new feature, please follow these steps:Fork the repository.Create a new branch for your feature or bug fix.Make your changes and test them thoroughly.Commit your changes and push them to your fork.Open a pull request against the original repository.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.This `README.md` file provides an overview of your project, including installation instructions, usage examples, documentation access, features, contribution guidelines, and licensing information. You can further customize it to match the specifics of your project if needed.