Saravanan666/pypi-org huggingface dataset:
Package: tkintervideo
tkintervideoA simple Tkinter Python Package For synced audio & video playback with a real-time API.InstallationFrom PyPipipinstalltkvideoFrom sourcepipinstall-rrequirements.txtBuild it normally(refer web).Features:- Controls Widget Added
- Timeline seeking.(slider based & button based)
- Synced audio playback.(Video is synced with audio)
- Upto any Resolution video playback(using PIL & imageio)
- TODO: youtube/hls support.
- In-player real-time audio & video edits.


- duration
- fps
- audio frame rate
- state detection
- auto resize(based on window resize)
- total frames
- current play position
- seeking(to a second or a frame)
- play/pause/stop/resume
- volume
- edits(you can edit the video & audio because moviepy & pydub are built-in)Usagefromtkvideo.tkvideoimportplayerfromtkvideo.tkvideo.toolsimportControlsimporttkinterastkfromtkinterimportttkimportsv_ttkimporttimeclassApp(tk.Tk):def__init__(self,*args,**kwargs):super().__init__(*args,**kwargs)sv_ttk.set_theme('dark')self.m_widget=player.Player(self,height=200,width=300)self.rowconfigure(0,weight=1)self.rowconfigure(1,weight=0)self.columnconfigure(0,weight=1)self.m_widget.grid(column=0,row=0,sticky=tk.NSEW,padx=5,pady=5)self.m_widget.load('output.avi')self.controls=Controls(self,self.m_widget)self.m_widget.bind("<<Duration>>",self.controls.update_scale)self.controls.grid(column=0,row=1,sticky=tk.NSEW,padx=10,pady=10)myApp=App()myApp.mainloop()ContributingPull requests are welcome.LicenseGPL-3
Package: tkinterweb
TkinterWebA fast and lightweight cross-platform webbrowser for Tkinter.OverviewTkinterWeb offers bindings for the Tkhtml3 widget fromhttp://tkhtml.tcl.tk/tkhtml.html, which enables loading HTML and CSS code into Tkinter applications.All major operating systems running Python 2.7+ or Python 3+ are supported.UsageTkinterWeb provides a webbrowser frame, a label widget capable of displaying styled HTML, and an HTML-based geometry manager.TkinterWeb can be used in any Tkinter application. Here is an example:from tkinterweb import HtmlFrame #import the HTML browser
try:
  import tkinter as tk #python3
except ImportError:
  import Tkinter as tk #python2

root = tk.Tk() #create the tkinter window
frame = HtmlFrame(root) #create HTML browser

frame.load_website("http://tkhtml.tcl.tk/tkhtml.html") #load a website
frame.pack(fill="both", expand=True) #attach the HtmlFrame widget to the parent window
root.mainloop()Refer to theGitHub home pagefor more information.
Package: tkinter-webcam
Tkinter-WebcamEasily display a webcam window in a Tkinter GUI⚡️ InstallationTo install the package use:pipinstalltkinter-webcamTo use the package simply import it:fromtkinter_webcamimportwebcamThen create theBoxobject using any variable name and immediently run the show frames function:webcam_object=webcam.Box(window,width=450,height=450)# Uses Box class from webcam to create video windowwebcam_object.show_frames()# Show the created BoxCheckoutexample.pyto see a full script using this object
Package: tkinterwidgets
Tkinter Custom WidgetsThis package contains customtkinterwidgets that might be useful.InstallationpipinstalltkinterwidgetsWidgetsLabelLabelFeaturesTransparent backgroundControl opacityUsagetkinterwidgets.Label(master, OPTIONS)OptionsAll the options of nativetkinterLabelexceptbg/backgroundsince the background is transparent.opacity- Used to specify the opacity of the contents on a scale of0to1(where0implies transparent and1implies opaque). The default is set to1.transcolor- Used to specify the color to be used to create the transparency effect (you can imagine this as a green screen but of the specified color, make sure that the visible contents of the label do not have this color). The default is set toSystemButtonFace.MethodsThe following have the same use as that of the corresponding methods in nativetkinterwidgetspackpack_forgetconfig/configuredestroyCurrent Limitations / IssuesOnlypackgeometry manager can be used.Can not be treated as awindowinCanvas.create_window()orText.window_create()or any similar usage.Label might move outside the window when resizing past it in some cases.Sample Codefromtkinterimport*importtkinterwidgetsastkwroot=Tk()root.config(bg='yellow')label=Label(root,text='Default Label')label.pack()trans_label=tkw.Label(root,text='tkinterwidgets Label',opacity=0.7)trans_label.pack(pady=10)root.mainloop()
Package: tkinterx
tkinterxUse tkinter to create a handy GUI tool.PyPI support availableYou can install the latest version using the following command:pipinstalltkinterxThe following command is used when called:importtkinterxA sample: Record your personal informationclassWindow(WindowMeta):def__init__(self,master=None,cnf={},**kw):super().__init__(master,cnf,**kw)defcreate_widget(self):self.add_row('Please enter your name:','name')self.add_row('Please enter your age:','age')self.add_row('Enter your information saving path:','save_path')defsave(self,path):table=self.table.todict()withopen(path,'w')asfp:json.dump(table,fp)defrun(self):self.withdraw()name=self.table['name']age=self.table['age']save_path=str(self.table['save_path'])if''in[name,age,save_path]:showwarning(self)else:self.save(save_path)askokcancel(self)classRoot(Tk):def__init__(self):super().__init__()self.label_var=StringVar()self.create_widgets()self.layout()defcreate_buttons(self):style=ttk.Style()style.configure("C.TButton",foreground="green",background="white",relief='raise',justify='center',font=('YaHei','10','bold'))self.table_button=ttk.Button(self,text='Fill in your name and age:',command=self.ask_table,style="C.TButton")defcreate_widgets(self):self.create_buttons()self.label=ttk.Label(self,textvariable=self.label_var)defask_table(self):bunch=ask_window(self,Window)name,age=bunch['name'],bunch['age']self.label_var.set(f"{name}:{age}")deflayout(self):self.table_button.pack()self.label.pack()if__name__=="__main__":root=Root()root.geometry('300x200')root.mainloop()Interface presentation:For more information:Chinese Manual.
Package: tkitAttNLocal
tkitAttNLocal构建对角线mask矩阵，用来降维相对位置数据。安装pip install tkitAttNLocalimporttorch.nnasnnimporttorchimporttorch.nn.functionalasFfromtkitAttNLocalimportAttNLocal# 输入维度和长度一样的矩阵a=torch.randn(32,100,100)attL=AttNLocal(100,10)attL(a).size()torch.Size([32, 100, 10])
Package: tkitAutoTokenizerPosition
tkitAutoTokenizerPosition用于处理AutoTokenizer分词后位置修正，可用于BIO序列问题。安装pip install tkitAutoTokenizerPosition
# or
pip install git+https://github.com/napoler/tkit-AutoTokenizerPosition示例https://github.com/napoler/tkit-AutoTokenizerPosition/blob/master/demo.ipynb文档查看https://docs.terrychan.org/tkit-AutoTokenizerPosition/
Package: tkitElasticsearch
tkit-elasticsearch-indexfast index for elasticsearchInstall Docker Composehttps://docs.docker.com/compose/install/sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname-s)-$(uname -m)" -o /usr/local/bin/docker-composesudo chmod +x /usr/local/bin/docker-composedocker-compose --versiondocker-compose up
Package: tkitLogger
# 一个快速写日志的封装模块## 快速上传操作
可以自动查找依赖，然后上传` sh upload.sh `文档查看https://www.terrychan.org/python_libs_demo/更多开发说明参考这里https://python-packaging-zh.readthedocs.io/zh_CN/latest/minimal.html##  MANIFEST.in 文件MANIFEST.in 文件，文件内容就是需要包含在分发包中的文件。一个 MANIFEST.in 文件如下：` include *.txtrecursive-includeexamples *.txt *.py pruneexamples/sample?/build`MANIFEST.in 文件的编写规则可参考：https://docs.python.org/3.6/distutils/sourcedist.html
Package: tkitMarker
这里是说明
用于自动标记文本内容
使用albert自动标记文本
自动会下载模型可自己训练~~~
# 安装
pip install tkitMarker  -ihttps://pypi.org/simplefrom tkitMarker import *
content=”柯基犬性格活泼可爱，但是饲养柯基犬会有着六个坏处，你还敢饲养柯基犬吗？”
P=Pre()
result=P.pre([content])
print(result)# 更新日志# 0.0.1.20’
加入随机屏蔽15%的文字# 0.0.1.21
加入自动替换掉中文标点
Package: tkit-mlp-pytorch
一个简单的多层神经网络库pip install tkit_mlp_pytorchor 从源码安装pip install git+https://github.com/napoler/mlp-pytorch.gitfrom tkit_mlp_pytorch import MLP
mlp=MLP()

# 查看帮助

help(mlp)快速上传操作可以自动查找依赖，然后上传sh upload.sh
Package: tkitRegex
tkit-regex-toolstkit regex tools 正则合集pipinstalltkitRegex# orpipinstallgit+https://github.com/napoler/tkit-regex-toolsfromtkitRegeximportregex_plusregexs=[{"regex_key":'follow_characters',"replace":''},{"regex_key":'email',"replace":'your_email_address'}]text="Here is our guide on how to 123@qq.com give 123@qq.com CBD oil to dogs. Follow us on Twitter @TriBeCa and @TriBeCaDog. Follow us on Facebook @TriBeCa and @TriBeCaDog."print("replace:")out=regex_plus(text,regexs=regexs,test=True,do="replace")print(out)print("match:")foritinregex_plus(text,regexs=regexs,test=True,do="match"):print(it)示例使用：https://github.com/napoler/tkit-regex-tools/blob/main/test.ipynb推荐文档https://github.com/manoss96/pregexhttps://github.com/napoler/pregexhttps://pregex.rtfd.io/
Package: tkitScrapyMiddleware
tkitScrapyMiddlewaretkitScrapyMiddleware安装pipinstalltkitScrapyMiddleware使用设置自动获取代理，使用在settings设置DOWNLOADER_MIDDLEWARES={#默认方法'tkitScrapyMiddleware.proxy.RandomProxyMiddleware':610,}POOL_PROXY="http://192.168.1.18:5010"
Package: tkit-scrapy-mongo
tkit_scrapy_mongouse mongodb instead of redis and rewrite scrapy_redis py3 module# 这里覆盖默认的settings配置,custom_settings settings.py
    custom_settings = dict(
        #MONGODB_URI="mongodb://192.168.1.18:27017/",
        #REDIS_URL = 'redis://192.168.1.18:6379',  # 指定redis的地址
        #POOL_PROXY = "http://192.168.1.18:5010"
        CONCURRENT_REQUESTS_PER_IP = 4,
        CONCURRENT_REQUESTS_PER_DOMAIN = 4,
        DUPEFILTER_CLASS = 'pet.tkit_scrapy_mongo.dupefilter.RFPDupeFilter',
        # 去重复
        SPIDER_MIDDLEWARES={
            # "scrapy_splash.SplashDeduplicateArgsMiddleware": 100,
            "pet.tkit_scrapy_mongo.dupefilter.RFPDupeFilter":101
        }


    )
Package: tkitScrapyMongoPipeline
tkitScrapyMongoPipelineMongoPipelinehttps://docs.scrapy.org/en/latest/topics/item-pipeline.html数据存储到mongodb# settings
import tkitScrapyMongoPipeline
# 1、设置MongoDB 的数据库地址
MONGO_URI = "mongodb://192.168.123.117:27017/"
MONGO_DATABASE="test"
# # 2、启用中间件MongoPipeline
ITEM_PIPELINES = {
   # 'base.pipelines.DuplicatesPipeline': 100,
   'base.pipelines.MongoPipeline': 100,
}








# item 字段示例
 item={
#设置强制去重复字段
"unique_id":url,
"title": title, "url": url, "content": text, "site": "playbarkrun.com", "content_type": "content",
# 设置表名
"collection_name":"test11"
}详细参考dev.md
Package: tkitSeq2seq
tkitSeq2seq简单的seq2seq模块基于gru安装解析配置文件pip install jsonargparse[signatures]生成配置文件Dump default configuration to have as referencepython  trainer.py --print_config > default_config.yamlCreate config including only options to modifynano config.yaml运行训练操作Run training using created configurationpython trainer.py--config config.yaml核心训练模块https://pytorch-lightning.readthedocs.io/en/latest/common/lightning_cli.html
Package: tkitSimhash
Remove duplicates 重复内容筛选tkitSimhash zh根据经验，一般当两个文档特征字之间的汉明距离小于 3， 就可以判定两个文档相似。《数学之美》一书中，在讲述信息指纹时对这种算法有详细的介绍。fromtkitSimhashimportsimHashsim=simHash()text1="""' , in Valve's absence, the modern slew of co-op zombie games have not been picking up the slack. The recent World War Z was lackluster at best, feeling like a cheap knockoff of a better game. The Vermintide series is much better in the gameplay department, but a fantasy battle against rat-men just isn't the same as fighting against hordes of undead. The Zombies modes in the Call of Duty games do a decent job of scratching the zombie itch, but what we're hoping for is a stand-alone zombie game, not DLC attached to a military shooter.\nRelated: Screenshots From The New Resident Evil Have Leaked\nBut now there's the hope that maybe, just maybe, Capcom can pull off a major multiplayer hit that will have players forgetting all about Valve and their long-suspected triskaphobia. Certainly, the Resident Evil name sure has the clout needed to get people to pay attention to the new series.\n\nCapcom has been experimenting with multiplayer in its Resident Evil games for years. This dates all the way back to Resident Evil ."""text2=""", in Valve's absence, the modern slew of co-op zombie games have not been picking up the slack. The recent World War Z was lackluster at best, feeling like a cheap knockoff of a better game. The Vermintide series is much better in the gameplay department, but a fantasy battle against rat-men just isn't the same as fighting against  of undead. The Zombies modes in the Call of Duty games do a decent job of scratching the zombie itch, but what we're hoping for is a stand-alone zombie game, not DLC attached to a military shooter.\nRelated: Screenshots From The New Resident Evil Have Leaked\nBut now there's the hope that maybe, just maybe, Capcom can pull off a major multiplayer hit that will have players forgetting all about Valve and their long-suspected triskaphobia. Certainly, its Resident Evil games for years. This dates all the way back to Resident Evil  """a=sim.simhash(text1)b=sim.simhash(text2)# print(a)print("拆分子码，子码至少存在一个一样的才需要计算相关度")code_a=sim.autoencode([text1])[0]print(code_a)code_b=sim.autoencode([text2])[0]print(code_b)# print(sim.subcode(a))# print(b)# print(sim.subcode(b))sim.similarity(code_a['code'],code_b['code']),sim.getdistance(code_a['code'],code_b['code'])拆分子码，子码至少存在一个一样的才需要计算相关度
{'subcode': ['1101100011001100', '1010110001010111', '0101101101110111', '0001111011011101'], 'code': '1101100011001100101011000101011101011011011101110001111011011101'}
{'subcode': ['1101100110001100', '1010110001010111', '0001111101110111', '0001111011011101'], 'code': '1101100110001100101011000101011100011111011101110001111011011101'}
(0.999999910089919, 4)update0.0.1.6
修正依赖 pytest==7.1.3和nltk0.0.1.5
修正依赖 pytest==7.1.3和nltk0.0.1.4修改word列表为文本
Package: tkitWeb
这里是说明web操作库pip install tkitWeb  -ihttps://pypi.org/simple/# 使用import tkitWeb
th=tkitWeb.Http()# 下载文件
url=”https://files.pythonhosted.org/packages/64/f8/434a36c186aefada16735bc6d8b489fbeaa0144419cf2a5f15033d0d129a/tkitFile-0.0.1.2.tar.gz”
name=”tkitFile-0.0.1.2.tar.gz”
data=th.download(url,name,dirname=’tfiles’)
print(data)
Package: tkiv
Just a Tkinter Image Viewer, because why not?Installation$ pip install tkivUsage$ tkivOr, execute it as a module:$ python -m tkiv.tkivFeaturesImage formats supported: .jpg, .jpeg, .png, .gif, .ico, .bmp, .tiffAuto resizing of image to fit windowResizable frames between image list and image viewTo-DoSupport for Python 2.xTestsSlide showVideo playback (from file and webcam)Snapshots
Package: tklayout
This library simplifies the layout of Tkinter user
interfaces by allowing the developer to specify the structure of the
interface elements from the inside out.Whereas Tkinter requires that nested frames and other widgets be
created from the outside in (i.e., the outermost frame created first),
the layout of an interface is often easier to conceptualize and describe
from the inside out.  For example, a layout composed of the following
elements:+------------------------------------+
|              Element D             |
+-------------------+----------------+
|    Element A      |                |
+-------------------+    Element C   |
|    Element B      |                |
+-------------------+----------------+
|              Element E             |
+------------------------------------+could be described asElements A and B vertically arranged in a column,Joined left to right with Element C in a row,Joined in a single column with Element D above and Element E below.This sort of narrative description can be easily represented in code
by assigning names to each of the layout elements (e.g., “A”, “B”, “C”,
“D”, and “E”), instantiating an object of theAppLayoutclass from thetklayoutmodule (e.g., “lo”), and then calling the following methods:ab = lo.column_elements(["A", "B"])
abc = lo.row_elements([ab, "C"])
app = lo.column_elements(["D", abc, "E"])and then creating the frames to represent this layout with:lo.create_layout(root, app)Restructuring the application’s layout is easily done simply by changing
the calls to therow_elements()andcolumn_elements()methods.Full documentation is at ReadTheDocs:http://tklayout.readthedocs.io/
Package: tklbam
TKLBAM (TurnKey Linux Backup and Migration), is a smart automated backup
and restore facility for the TurnKey Linux Virtual Appliance Library.It provides an efficient system-level backup of
changed files, users, databases and package management state. This
system-level backup can be restored automatically on any installation of
the same type of virtual appliance, regardless of the underlying
hardware or location. The intended result is a functionally equivalent
copy of the original system.
Package: tklfp
tklfp - Teleńczuk Kernel LFPThis is a lightweight package for computing the kernel LFP approximation fromTeleńczuk et al., 2020. This method approximates LFP from spikes alone, without the need for more expensive simulations of spatially extended neurons. See the original authors' demo codehere.How to install:Simply install from pypi:pipinstalltklfpHow to use:InitializationFirst you must initialize aTKLFPobject which computes and caches the per-spike contribution of each neuron to the total LFP. You will need X, Y, and Z coordinates of the neurons, their cell types (excitatory/inhibitory, represented as a boolean), and the coordinates of the electrode(s):fromtklfpimportTKFLPtklfp=TKLFP(xs_mm,ys_mm,zs_mm,is_excitatory,elec_coords_mm)The first four arguments must all have the same length N_n, the total number of neurons.elec_coords_mmmust an N_e by 3 array-like object, where N_e is the number of recording sites.Computing LFPLFP can then be computed with the neuron indices and times of spikes (indices must be between 0 and N_n - 1, corresponding to the parameters given on initialization), as well as the timepoints to evaluate at (must be an iterable):lfp=tklfp.compute(i_n,t_ms,t_eval_ms)A complete example, reworking the demo from the original paper, can be foundhere. Basic usage information is also accessible in docstrings.Cortical orientationTheTKLFPconstructor can also take anorientationargument which represents which direction is "up," that is, towards the surface of the cortex or parallel to the apical dendrites of pyramidal cells.
The default is[0, 0, 1], indicating that the positive z axis is "up."
In the case your population isn't a sheet of neurons with uniform orientation (for a curved cortical area, for example), you can pass an N_n by 3 array containing the individual orientation vectors for all the neurons.Future developmentThe package usesparameters from the original 2020 paperby default. This can be changed by passing in an alternate parameter dictionary on initialization:tklfp=TKLFP(...,params=new_params)The new params must have the same content as the defaulttklfp.params2020. TheA0_by_depthparams are scipy interpolation objects, but could theoretically be any callable that will return A0 (in μV) for an arbitrary depth (in mm).
Package: tkMagicGrid
tkMagicGridis a table layout widget for Python + Tkinter. It can be used to display static data, or to lay out other widgets as an alternative to callinggrid()manually, or to do a bit of both.tkMagicGrid is designed to be simple above all else. It has no dependencies outside the Python standard library. Its API is designed to let you accomplish tasks with as few method calls as possible.tkMagicGrid is not designed to be erasable. The recommended way to clear a MagicGrid widget is to destroy it and create a new one.Both Python 2 and 3 are supported, on Windows and Unix platforms.UsagetkMagicGrid consists of a single module,tkmagicgrid(note the module
name is lowercase), which exports a single class,MagicGrid.A brief example program:#!/usr/bin/env python3fromtkinterimport*fromtkmagicgridimport*importioimportcsv# Create a root windowroot=Tk()# Create a MagicGrid widgetgrid=MagicGrid(root)grid.pack(side="top",expand=1,fill="both")# Display the contents of some CSV file# (note this is not a particularly efficient viewer)withio.open("test.csv","r",newline="")ascsv_file:reader=csv.reader(csv_file)parsed_rows=0forrowinreader:ifparsed_rows==0:# Display the first row as a headergrid.add_header(*row)else:grid.add_row(*row)parsed_rows+=1# Start Tk's event looproot.mainloop()For detailed documentation, trypython -m pydoc tkmagicgrid.Related ModulestkScrolledFrameprovides an easy way to make aMagicGrid(and other large widgets) scrollable.
Package: tkmail
Simple UsagefromtkmailimportEmailemail=Email(host='smtp.gmail.com',port=587,use_tls=True,username='demo@gmail.com',password='hidden_password',to='anonymous@gmail.com',cc='somebody@gmail.com',bcc='another@gmail.com',subject='Demo sending email',).html('<h1>Demo sending email</h1>').send().retry(times=5)
Package: tkmatrix
MATRIX ToolKitToolKit for Multi-phAse Transits Recovery from Injected eXoplanetsMATRIX is an injection-recovery software prepared to create grids of scenarios with a set of periods, radii and epochs
of synthetic transiting exoplanet signals in a provided light curve. The typical injection-recovery execution has
consisted in the usage of 2 dimensional scenarios, where only one epoch (random or hardcoded) was used for each period
and radius. Even though this is a fair approach when the computational power is very limited, this reduces the accuracy
of the experiment as the recoverability might vary depending on the transit epoch and hence, the places where the
transits would appear in the curve. E.g: A transit would be clearly recovered falling in a quite region of the curve
but not easy to recover when it happened close to a flare or a curve gap. A multi-phase analysis can now be done with
MATRIX easily by only setting a few parameters in a configuration file and running one line of code.Just execute the command below this text. Take into accont that theuser-properties.yamlfile needs to include
several mandatory options. Please refer to the example files under theexampledirectory.python3.8 -m tkmatrix --properties user-properties.yamlFor the complete set of properties available for use please look at the rootproperties.yamlBy-productsa_tls_report.csv: A file containing a csv formatted output given the orbital period, the radius and the epoch besides the outputs with found status, SNR and SDE of the results.a_tls_report.png: A file with an automatically generated plot from the csv report. You are free to build your own plot from the report if you feel like the one provided by MATRIX is not good enough for your purposes.Injected curves (csv files): In case you want to study the injected curves generated for the recovery, you can set a flag to the tool so that it keeps the files after it finishes. If you don't provide that flag, the files will be removed at the end of the execution.CitationWe are planning to write a scientific paper based on the usage of MATRIX. In the meantime, we encourage the users to cite the Software DOI in their research:@MISC{2022zndo...6570831D,
       author = {{D{\'e}vora-Pajares}, Mart{\'\i}n and {Pozuelos}, Francisco J.},
        title = "{MATRIX: Multi-phAse Transits Recovery from Injected eXoplanets}",
     keywords = {exoplanets, transits, injection \& recovery, python},
 howpublished = {Zenodo},
         year = 2022,
        month = may,
          eid = {10.5281/zenodo.6570831},
          doi = {10.5281/zenodo.6570831},
      version = {0.3.17},
    publisher = {Zenodo},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2022zndo...6570831D},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}DocumentationFor more information please visithttps://tkmatrix.readthedocs.io/.