Saravanan666/pypi-org huggingface dataset:
Package: custom-rap-installer
Custom RAP installer (python module)Mit diesem Modul können eigene Module über deren RAP Dateien in PiCtory
eingebunden werden. Die RAP-Dateien und die dazugehörigen Bilder liegen in
einem Ordner, zusammen mit einer "meta.json", welche Informationen für die
Installation enthält.install_sourceFür den Aufruf der PiCtoryManager Klasse muss der Parameter install_source
übergeben werden. Dieser zeigt auf den Ordner, welcher die Moduldateien und
"meta.json" enthält.meta.jsonDie "meta.json" Datei enthält eine Liste mit Objekten, die jeweils ein Modul
zur Installation beschreiben. Diese Beschreibungen sind Texte, welche nicht
über die RAP-Datei geliefert werden und den Installationsprozess steuern.Beispiel[{"dir_title":"Virtual OPC UA Devices","id":"OPCUARevPiServer","title":"OPC UA Server","tooltip":"OPC UA server to share the IOs of the Revolution Pi","action_rules":["ONADD_FIRST","ONDELETE_LAST"]}]"dir_title": Name für den Katalogordner in dem das neue Modul installiert
werden soll. Dieser Name kann ein bestehender sein, in dem Fall wird das
Modul in einen bestehenden Ordner installiert. Wenn der Name neu ist, wie
in dem Beispiel, wird ein neuer Ordner mit dem Namen angelegt, in dem das
neue Modul installiert wird."id": Dies ist die Modul-ID. Dieser Name muss eindeutig sein und wird
ebenfalls verwendet umd die RAP-Datei und das Devicebild im
"install_source"-Ordner zu finden."title": Dies ist der Titel, mit dem das Device im Katalog von PiCtory
angezeigt wird."tooltip": Dieser Text wird angezeigt, wenn die Maus über dem Modul
verweilt. Er dient für weiter Informationen zum Modul."action_rules": Wenn in der RAP-Datei "actions" angegeben sind, welche zu
verschiedenen Events wie "onAdd" oder "onDelete" ausgeführt werden müssen,
werden hier die Rollen definiert. Diese können nicht aus der RAP-Datei
entnommen werden, da mit den "action_rules" auch die Bedingung angegeben
wird wie "_FIRST" / "_LAST".RAP-Datei und DevicebildZusätzlich im "install_source"-Ordner liegen für jeden Eintrag der meta.json
jeweils eine RAP-Datei und ein Devicebild im PNG-Format. Das Devicebild muss
als Namen die "id".png tragen.Der Name der RAP-Datei muss folgendem Schema folgen:|--- module key ---|
    xxxxxx_yyyymmdd_a_b.rap
       |	  |		| |
       |	  |		| |-- version number part 2
       |	  |		|---- version number part 1
       |	  |---------- creation timestamp
       |----------------- module id / nameÜber dieses Namensschema wird innerhalb des Moduls automatisch der Version
ermittelt und mit der installierten Version verglichen.Der Teil "xxxxxx" ist exakt die "id" aus der "meta.json". Das Datum
"yyyymmdd" kann frei gewählt werden. Am Ende durch "a" und "b" erfolgt die
Versionierung der RAP-Datei.
Package: custom-redis
custom_redisDESCRIPTIONpython实现简单redis，实现redis基本功能以及可插拔数据结构主要功能1 通过继承DataStore类，可以定制个性化数据类型，通过调用redis类的install方法安装数据类型，目前已实现的数据类型有str, set, queue, hash,2 Redis 的keys, expire, ttl, del等功能已实现3 数据持久化功能已实现data flowserver类图INSTALLwindows && ubuntugitclonehttps://github.com/ShichaoMa/custom_redis.gitsudopythonsetup.pyinstallorsudopipinstallcustom-redisSTARTcustom-redis-serverHELLOWORDdemo1custom-redis-client-ckeys[u'a']custom-redis-client-czcarda1custom-redis-client-czpopa2demo2>>>fromcustom_redis.clientimportRedis
>>>r=Redis("127.0.0.1",6379)>>>r.zadd('a',3,'aaa')''>>>r.zadd('b',4,'bbb')''>>>r.zadd('a',1,'ccc')''>>>r.keys()[u'a',u'b']>>>r.expire('b',10)''>>>importtime>>>time.sleep(10)>>>r.ttl('b')'-1'>>>r.keys()[u'a']demo3# 服务端实现# 数据类型个性化定制# 参见default_data_types.py# 安装数据类型cr=CustomRedis.parse_args()cr.install(datatype=datatype())cr.start()demo4# 客户端实现# 在functions.CMD_DICT中配置指令"hgetall":# 指令名{"args":["name"],# 指令所需参数"recv":lambdadata:json.loads(data),# 转换函数，将接收到的报文转换成所需数据类型，若是简单字符串则无需提供}"hincrby":{"args":["name","key","value"],"send":lambda*args:(args[0],json.dumps(dict([args[1:]]))),# 转换函数，返回key 和value组成的元组"default":[1]# 指令所需参数的默认值， 从后往前排列 如：1代表value的值},# 发送报文的格式："func_name#-*-#key<->value#-*-#1" # 如 "hincrby#-*-#a<->{'b':1}#-*-#1"# 最后一位1代表keep-alive, 否则为空# key:在redis中存储的key，在上例中所指的是参数中的name# value:要往redis中存储的值 如json.dumps("key":"value")# 接收报文格式："200#-*-#success#-*-#data"# 200为响应码#      200：成功#      404：没有找到方法#      502：Empty#      503：服务器异常# success为响应信息# data为recv中要处理的接收数据
Package: custom_resource
Implementcustom AWS CloudFormation resourceswith Python Lambda functions.This helps you reference non-AWS resources within CloudFormation - for instance,
let’s get a StatusCake alert in our stack:Type:Custom::StatusCakeTestVersion:1.0Properties:WebsiteName:vitalwebsite.comWebsiteURL:http://vitalwebsite.comCheckRate:300TestType:HTTP(Implementation left as an exercise for the reader)See alsoSample code in theexamplesdirectory.AWS docsLambda HandlerHere’s a simple resource:fromcustom_resourceimportBaseHandlerclassHandler(BaseHandler):defcreate(self,event,context):return"CreatedId",{"AndSome":"MetaData"}defupdate(self,event,context):return"UpdatedId",{"AndSome":"MetaData"}defdelete(self,event,context):return"DeletedId",{"AndSome":"MetaData"}handler=Handler()We extend theBaseHandlerclass, and implementcreate,updateanddeletemethods. All of these methods are required.The methods must either:Return a string representing a resource ID. This can be used within
your CFN template via theRef function.Return a resource ID string, and a dict containing strings for keys
and values. These key/value pairs can be used with theGetAtt
function.Return acustom_resource.Successorcustom_resource.Failedobject.Return acustom_resource.Deferobject, signifying you’ll process
this asynchronously. Seeasync responsesbelow.Raise an exception.BaseHandlerwill respond to CloudFormation unlessDeferis
returned.Async responsesYourHandlermethod can returnDeferto signal asynchronous
processing.To later respond, you need a copy of the originaleventobject. This
will be passed to theResponderclass, e.g:withResponder(event)asresponder:responder.success(physical_resource_id="123",data={"Meta":"Data"})# orresponder.failure(physical_resource_id="456",reason="Something went wrong")Usingwith, your resource will always respond to CloudFormation even
on exception - ensuring your stack doesn’t stall and eventually timeout.
Package: customs
Customs - Authentication made easyPassport.js inspired library for setting up server authentication in Python. Customs creates a protective layer around Flask APIs with minimal configuration and allows users to configure and use multiple authentication strategies with ease.ConceptCustoms consists of a singlecustomsobject that can usestrategiestoprotectAPI endpoints, or create asafe_zonearound a set of endpoints.Batteries includedCustoms comes out of the box with the following strategies:LocalBasicJWTGoogleGithubFacebookThe list is growing, but if you still cannot find what you're looking for it is very easy to create a specific strategy for your purpose.
Package: customs-dtoc
Customs Formula: Duties, Taxes, and Other ChargesINTRODUCTION:This is aPython packagethat I personally made to compute the customs duties, taxes, and other charges. A sample
Command-Line Interface (CLI) calculator project using this package will be posted on my GitHub repo soon. Further
improvements will be made on this.NOTES:These are the duties, taxes, and other charges that will be computed by using this package:Note: The package is still incomplete since it does not handle the situations where there are missing components and
the backward computation of each computation.Total Landed CostFormal EntrySeaAirInformal EntrySea/AirComponents of Landed CostDutiable Value(DV)SeaAirCustoms Duty(CUD)Bank Charge(BC)Brokerage Fee(B/F)Formal EntryArrastre Charge(A/C)OutportsShipsidePiersidePort of Manila (POM) and Manila International Container Port (MICP)Containerized Cargo (FCL)ImportExportShut-out ExportBulk or Break-bulk Cargo (LCL)ImportExportContainerized Dangerous CargoClass 1, 6, and 8Class 2, 3, 4, and 7Class 5 and 9Wharfage Due(W/D)OutportsShipsidePiersidePort of Manila (POM) and Manila International Container Port (MICP)Containerized Cargo (FCL)ImportExportBulk or Break-bulk Cargo (LCL)ImportExportContainerized Dangerous Cargo20 Footer Container40 Footer ContainerImport Processing Fee(IPF)Customs Documentary Stamp(CDS)Formal EntryInformal EntryValue-Added Tax (VAT)Excise Tax ShipmentsNon-Excise Tax ShipmentsSummary of Payments (SOP)Covered by Letter of Credit (L/C)Covered by Non-Letter of CreditCovered by Informal EntryContainer Security Fee (CSF)20 Footer Container40 Footer ContainerPro-RataIndividual FreightIndividual InsuranceIndividual Dutiable ValueIndividual Miscellaneous Expense
Package: custom-secrets-manager
This starter_process script performs the following tasks:Creates asecrets_registry.logfile as a database for secrets, API keys, or passwords found in the parent directory of the script.Scans the parent directory for suggestive file names like secrets or keys with file extensions.yaml,.json, or.ini. If there is a mention of a key name without a value, it checks the corresponding value inos.environand updates the registry accordingly.Makes available asecrets_loader.pymodule to load secrets from the secrets_registry.log file.Generates meaningful logs in the standard output and saves logs in theload_config_process.logfile in the same directory.Checks if a.gitignorefile exists in the directory and ensures that entries are made for secrets files.Please note that this script assumes that you have the secrets_loader.py module in the same directory asstarter_process.py
Package: custom-settings
When describing in python of the configuration file, you need to change it in each environment. For example settings.py of Django.
This package provides the utility to assist it.Install$ pip install custom_settingsHow to use itsettings_custom.pyAUTH_CREDENTIAL = 'MY_CREDENTIAL'
INTEGER_VALUE = '1'Do the following to use this configuration file.>>> import custom_settings
>>> custom = custom_settings.load('settings_custom')
>>> custom.get('AUTH_CREDENTIAL')
'MY_CREDENTIAL'If you specifiedtype_argument, convert type to.>>> custom.get('INTEGER_VALUE', type_=int, default=10)
1If you specify True inuse_environ, if it does not exist in settings_custom, acquired from the os.environ.>>> custom.get('PS1', use_environ=True)
'$ 'If you specifydefault, if it does not exist in settings_custom, to used default.>>> custom.get('NO_SET_VALUE', default=10)
10If you specify True inraise_exception, if it does not exist in settings_custom,  raise exception.>>> custom.get('NO_SET_VALUE', use_environ=True, raise_exception=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/envs/3.5/lib/python3.5/site-packages/custom_settings/adapters.py", line 40, in get
    raise exc.NoCustomSettingError('Not been set: {}'.format(name))
custom_settings.exc.NoCustomSettingError: Not been set: NO_SET_VALUEOtherPyPI:https://pypi.python.org/pypi/custom_settingsGithub:https://github.com/TakesxiSximada/custom_settingsCircleCI:https://circleci.com/gh/TakesxiSximada/custom_settingsCodeCov:https://codecov.io/gh/TakesxiSximada/custom_settings
Package: customs-inspector
Customs InspectorCustoms Inspector is a Python tool that hooks into Poetry's package management system
to allow for manual auditing of package changes during updates.
When you runpoetry update, Customs Inspector will open a browser with a GitHub diff like view, requesting you to confirm or reject the update before proceeding.DemoYouTubeNote:TESTED ONLY ON Poetryv1.4.xThis is a proof of concept. Poetryexplicitlysays to not use the plugin system to modify existing commands.
If this is something that is considered valuable, I would love to discuss this with Poetry's authors to potentially integrate it.Why?Developers are lazy, we'd rather not audit source code...Well, we cannot afford that anymore.
I am also not interested in the snake oil automated analysis companies are selling (for now).What if auditing was really easy to do so?What if, we could harness the community's collective effort to find malicious packages?Usage# install the plugin
poetry self add customs-inspector
# run update like you normally would
poetry updateSee:how to install pluginsUpcoming:Increase speedAdd language server support to make auditing even easierAdd file filtering, to hide test folders, for exampleAdd rules for quick auditing, for example when new sensitive APIs are used (socket, os, sys)ContributionsFeedback, contributions and suggestions welcome.LicenseGPL-3.0
Package: custom-step
Custom StepDescriptionA SEAMM plug-in for custom Python scripts in a flowchart.This plug-in provides custom python scripting in flowcharts. The
scripts have access to the variables in the flowchart, and can set
them as well as get their values. The scripts can access all of the
functionality in the SEAMM framework as well as other installed Python
packages.Free software: BSD licenseDocumentation:https://molssi-seamm.github.io/custom_step/index.htmlFeaturesRead and write access to flowchart variables.Access to the molecular system along with all of its methods.Access to the tables in the flowchart.Standard Python, including all installed packages.CreditsThis package was created withCookiecutterand themolssi-seamm/cookiecutter-seamm-pluginproject template.Developed by the Molecular Sciences Software Institute (MolSSI),
which receives funding from theNational Science Foundationunder
award ACI-1547580History2023.12.3 – Removed pinning for dependenciesRemoved pinning for dependencies to allow for more flexibility in
the versions of the dependencies that can be used.Updated to new documentation, workflows, etc.0.1.0 (13 February 2019)First release on PyPI.0.7.0 (17 December 2019)Fixed a bug updating the display when hitting the Cancel button.0.9 (15 April 2020)Internal changes only:
- Cleaned up the continuous integration scripts.
- Cleaned up code and setup.2020.12.4 (4 December 2020)Echoing the first lines of the script to Job.out to help understand
and document the run.2021.2.10 (10 Feb 2021)Updated the README file to give a better description.Updated the short description in setup.py to work with the new
installer.Added keywords to better searchability.
Package: customtex
CustomTeX v0.1.2A CLI utility for setting up LaTeX projectsCustomTeX is a command line utility for setting up LaTeX projects based on some predefined styles for titles, section headers, theorems, etc.For the moment, the utility is intended for a personal use, since there aren't many options for customization. However, we aim to design a more general system for creating LaTeX projects based on dynamic and fully customizable templates.InstallationCustomTeX is a Python library and can be installed using pip:pip install customtexNo additional dependencies are required.UsageTo generate the main files of a LaTeX project with CustomTeX, you have to run thecustomtexcommand followed by the path, main file name and language options and theinitor thetemplatesubcommand. For example:customtex --path /path/to/directory --name main --lang english init [options]This will create a LaTeX project with the following structure in thepath/to/directorydirectory:/path/to/directory
├── main.tex
└── tex
    ├── macros.tex
    └── preamble.texTheinitsubcommandTheinitsubcommand creates a project based on the options that the utility provides. Runcustomtex init --helpto see the available options.ThetemplatesubcommandThetemplatesubcommand creates a project based on a template. A template consist of a list of options from theinitsubcommand that are run when invoking thetemplateoption followed by the name of the template.Runcustomtex template --helpto see the available templates.LicenseCustomTeX is licensed under the MIT license. See the LICENSE file for more information.
Package: custom_text_test_runner
DescriptionA custom test runner for python unittest which provides the following
additional features: - custom result stream output in a more detailed,
clear format with distinct sections for errors, failures, skipped test,
overall suite results, and totals - all results are output to a json
file allowing the results to easily be parsed and used for
post-processing purposes and integrations with other services -
automatic detection of screenshots (based on a screenshot directory
argument) which are attached to the matching case result dict in the
json results file - detailed time tracking at the case, suite, and
overall level - ability to combine results from previous runs - config
file can be passed with additional information for more customization
(currently can provide a device_name key in the config to specify which
devices to run a selenium or appium test for example with)Installationpip install custom_text_test_runnerUsageimport unittest
from custom_text_test_runner import CustomTextTestRunner

test_modules = unittest.defaultTestLoader.discover(start_dir='path/to/testdir', pattern='test*.py', top_level_dir=None)
return_code = CustomTextTestRunner(
    verbosity=5,
    results_file_path='path/to/result.json',
    result_screenshots_dir='path/to/screenshots',
    show_previous_results=True).run(test_modules).returnCode()
Package: custom-time
编写目的custom_time.py: 充分扩展python原生包datetime的功能与简化使用方法time_range.py: 以python原生的range形式遍历时间使用方法custom_time.py一. 使用字符串初始化fromcustom_timeimportCustomTime# 直接输入字符串,无需指定解析格式CustomTime("2022-01-23 17:00:00")CustomTime("2022-01-23-17.00.00")# 指定希望输出的时间格式CustomTime("2022-01-23 17:00:00","%Y-%m-%d-%H-%M-%S")二. 获取当前时间# 使用默认的时间格式, 默认为"%Y-%m-%d %H:%M:%S"now=CustomTime.now()# 指定希望输出的时间格式now=CustomTime.now("%Y-%m-%d-%H-%M-%S")三. 输出时间字符串a=CustomTime.now()print(a.str)四. 可直接使用datetime的方法五. 时间的计算,支持的参数years, months, days, seconds, microseconds,milliseconds, minutes, hours, weeks注意: datetime不支持days,本模块支持now=CustomTime.now()yesterday=now.delta(days=-1)tomorrow=now.delta(days=1)六. 其他方法now=CustomTime.now()# 获取整点now.oclock()# 获取日期now.date()now.date("%Y-%m-%d")TimeRange.py1.遍历时间范围fromcustom_timeimportTimeRangestart_time=CustomTime.now()end_time=start_time.delta(days=10)forcurrentinTimeRange(start_time,end_time,days=1):print(current)
Package: customtimsort
CustomTimSortCustomTimSort is a library where you can sort python objects using custom minruns.Github:https://github.com/lehatrutenb/CustomTimSortHow to use:from customtimsort import timsort, get_minrun

minrun = get_minrun(len(yours_object))
timsort(yours_object, minrun)get_minrun(array_size: int, path_to_data: string, model_name: string)-> intReturns array of predicted minruns for given sizes:param array_size: array with sizes of arrays we want to predict minrun to:param path_to_data: name of json file with keys mean, std, standard: "data.json" - you can get it from my gihub reposiroty (dirictory models):param model_name: name of model that will predict minrun, standard: "standard_model" - you can get it from my github repository (dirictory models)timsort(yours_object: some iterable obj, minrun: int)-> intSorts yours_object using given minrun:param yours_object: something that you want to sort (but you can't use timsort(yours_object=[...])):param minrun: timsort parameter for sorting (but you can't use timsort(minrun=[...]))
Package: customtkinterx
CustomTkinterX解释器需Python3.7及以上customtkinter的扩展组件功能库，同时也采集了其他开发者制作的组件，并进行仅类型提示上的修改（源代码__main__.py上有标注）Fluent主题尚未完善设置，修改了CTkCTkToplevelCTkFrameCTkButtonCTKEntryCTkComboBox等类。fromcustomtkinterimport*fromcustomtkinterximport*CTkFluentTheme()CTkCustom 自定义窗口原窗口因标题栏与边框的限制，导致界面效果极差，但是仍可以通过一些方法自定义窗口wm_overrideredirect。
平台支持WindowsMacOSLinux，其中界面效果支持最好的是Windows，MacOSLinux无法使用透明色，完全消除边框使用圆角，
及将图标保留至任务栏，采用置顶的方法保持窗口的显示。组件结构| CTkCustom -> CTk
|-->> __frame_border(mainframe): CTkFrame
|-->> __frame_title(titlebar): CTkFrame
|-->> __label_title(titlebar_title): CTkLabel
|-->> __button_close(titlebar_closebutton): CTkButton
|-->> __button_minimize(titlebar_minimizebutton): CTkButton基础示例fromcustomtkinterimport*fromcustomtkinterximport*root=CTkCustom()root.mainloop()主题配置你可以自定义一个主题，然后加上CTkCustom项{..."transparent_color":"#101010",// 为实现圆角边框而设置的透明色"closebutton_text_color":["#000000","#ffffff"],"closebutton_color":["#f4f6f8","#212b36"],"closebutton_hover_color":["#b40d1b","#b40d1b"],"minimizebutton_text_color":["#000000","#ffffff"],"minimizebutton_color":["#f4f6f8","#212b36"],"minimizebutton_hover_color":["#dfe3e8","#454f5b"]},...}添加缩放窗口大小的手柄CTKCustom.create_sizegrip()自定义手柄，将会使用库pyautogui。python-mpipinstallpyautoguiCTKCustom.create_sizegrip(True)fromcustomtkinterimport*fromcustomtkinterximport*root=CTkCustom()root.create_sizegrip()root.mainloop()fromcustomtkinterimport*fromcustomtkinterximport*root=CTkCustom()root.create_sizegrip(True)root.mainloop()CTkInfoBar 消息栏组件结构| CTkInforBar -> CTkFrame
|-->> __label_title(title): CTkLabel
|-->> __label_info(info): CTkLabel
|-->> __button_close(close): CTkButton基础示例fromcustomtkinterimport*fromcustomtkinterximport*root=CTk()infobar=CTkInfoBar()infobar.show()root.mainloop()主题配置你可以自定义一个主题，然后加上CTkInfoBar项{..."CTkInfoBar":{"corner_radius":8,"border_width":0,"fg_color":["#61f3f3","#006c9c"],"fg_hover_color":["#cafdf5","#003768"],// 关闭按钮被鼠标捕捉时的颜色"border_color":["#b0b2b2","#424556"],"success_color":["#86e8ab","#1b806a"],// 取自配色severity中NORMAL值"success_hover_color":["#d8fbde","#0a5554"],// 取自配色severity中被鼠标捕捉时的NORMAL值"caution_color":["#ffd666","#b76e00"],// 取自配色severity中CAUTION值"caution_hover_color":["#fff5cc","#7a4100"],// 取自配色severity中被鼠标捕捉时的CAUTION值"critical_color":["#ffac82","#b71d18"],// 取自配色severity中CRITICAL值"critical_hover_color":["#ffe9d5","#7a0916"]// 取自配色severity中被鼠标捕捉时的CAUTION值},...}
Package: custom-toolbar-button
Custom-toolbar-buttonUsing this package, you can add custom widgets(with icon image and callback function) in matplotlib's toolbar.ExampleForward and backward widgets are by default, on click chart shift 5 step forward and backward resp.importos# import custom_toolbar_button before matplotlib pyplotfromcustom_toolbar_buttonimporttoolimportmatplotlib.pyplotasplt# ----- Your code ---- #You can give n number of widgets list using TOOLITEMS global variable.TOOLITEMSis list of tuple[Widget name, Tooltip text, Icon png complete path with name, Callback function].importos# import custom_toolbar_button before matplotlib pyplotfromcustom_toolbar_buttonimporttoolicons=tool.Icons(os.path.dirname(__file__))"""Callback function should have same structure as mention below (function callback_func)cls_instance is NavigationToolbar instance"""defcallback_func(cls_instance):"""cls_instance: NavigationToolbar2TK or NavigationToolbar2QT"""defwrapper():print('Custom tool button example.')returnwrappertool.TOOLITEMS=[("Python Icon",# Widget name"Tooltip Python icon",# Tooltip texticons.icon_path("pyicon.png"),# Icon png complete path with namecallback_func# Callback function)]importmatplotlib.pyplotasplt# ----- Your code ---- #
Package: custom-user-profile
Custom User ProfileCustom User Profile is a django app to create custom user model with the ability to register
new users with custom forms and rich stylings.Detailed documentation is in the 'docs' directory.Quick StartAdd 'users' to your INSTALLED_APPS setting like this:INSTALLED_APPS=[...,'users',]Modify the AUTH_USER_MODEL setting in your settings.AUTH_USER_MODEL='users.CustomUser'Include the users URLconf in your project urls.py like this:urlpatterns=[...,path('users/',include('users.urls')),]Runpython manage.py migrateto create the users models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a user. (You'll need the admin app enabled)Visithttp://127.0.0.1:8000/users/registerto register new users.