跳至主要内容

博文

娱乐 之 看电视频道(potplayer\kodi + iptv 源)

https://github.com/iptv-org/iptv 下载.m3u文件,然后用potplayer打开此文件 kodi https://catch-up-tv-and-more.github.io/live_tv_installation/ 安卓手机QQ接收到的文件存放路径在哪? 以前是:内部存储/tencent/QQfile_recv 现在是:内部存储/Android/data/com.tencent.mobileqq/Tencent/QQfile_recv 电视推荐 大时代\我的团长我的团

python 之 socket

import   socket   # working with a socket as a context manager with   socket . socket ( )   as  client_socket:     hostname  =   '127.0.0.1'     port  =   9090     address  =   ( hostname ,  port )       client_socket. connect ( address )       data  =   'Wake up, Neo'     data  =  data. encode ( )       client_socket. send ( data )       response  =  client_socket. recv ( 1024 )       response  =  response. decode ( )      print ( response )

Monitoror 统一监控墙板

Monitoror是一个用Go编写的单文件应用程序 资料 https://monitoror.com/documentation/ https://demo.monitoror.com/?configUrl=https://monitoror.com/assets/demo.monitoror.com-config.json https://monitoror.com/assets/demo.monitoror.com-config.json 下载monitoror-windows-amd64-3.1.0.exe,然后双击运行,打开浏览器加载配置文件 有两种加载配置文件的方式: 通过URL: http://localhost:8080? configUrl =https://example.com/config.json 按路径: http://localhost:8080? configPath =./config.json http://localhost:8080/?configPath=./config.json&theme=dark { "version": "1.0", "columns": 3, "tiles": [ { "type": "HTTP-STATUS", "label": "公司网站", "params": { "url": "http://sh.aisino.com/", "status": "SUCCESS" } }, { "type": "PING", "label": "Ping 开票服务器", "params": { "hostname": "192.168.100.41", "status": "SUCCESS" } }, { "type...

python 之 深入理解

# 一旦遇到第一个return,函数执行就会停止 def three(): print(1) return 2 print(3) return 22 three() print(4) ---------------------- for i in range(10): line = "" for j in range(10): if i == j: break line += "{} ".format(j) print(line) ----------------------- 魔法函数 __init__ :初始化类的新实例 Initialize a new instance of the class __new__ :创建该类的新实例 Create a new instance of the class __repr__ :定义实例表示进行调试 Define an instance representation for debugging __str__ :定义实例的用户友好表示 Define user-friendly representation of an instance class Song: def __init__(self, artist, name, year): self.artist = artist self.name = name self.year = year def __repr__(self): rep = "Artist: {}. Name: {}. Year: {}".format(self.artist, self.name, self.year) return rep def __str__(self): return "{} — {} ({})".format(self.artis...

python 之 练习

''' funtion:获取任意自然数的各位数字之和 map(func, *iterables) --> map object ''' num  =   input ( '请输入一个自然数:' ) print ( sum ( map ( int , num ) ) )   ''' function: 输入两个集合{}并计算其交集、并集和差集 input() 从输入中获取并返回一个字符串 eval() 函数用来执行一个字符串表达式,并返回表达式的值 ''' setA  =   eval ( input ( '请输入一个集合:' ) ) setB  =   eval ( input ( '请输入一个集合:' ) ) print ( '交集:' , setA & setB ) print ( '并集:' , setA | setB ) print ( 'setA-setB:' , setA - setB )     ''' function: 输入一个整数列表,返回偶数列表 eval() 函数用来执行一个字符串表达式,并返回表达式的值 filter() 函数用于过滤序列,过滤掉不符合条件的元素,返回一个迭代器对象,如果要转换为列表,可以使用 list() 来转换。 其接收两个参数,第一个为判断函数,第二个为可迭代对象,序列的每个元素作为参数传递给函数进行判断,然后返回 True 或 False,最后将返回 True 的元素放到新迭代器对象中 ''' lst  = input ( '请输入一个包含若干整数的列表:' ) lst  = eval ( lst ) print ( list ( filter ( lambda  x:x% 2 == 0 ,  lst ) ) )     ''' function: 输入两个整数列表lstA和lstB,返回一个字典,要求lstA中的元素为键,lstB中的元素为值,字典长度取决于最小的列表 zip() 函数用于将一个或多个可迭代的对象作为参数,将对...