Name | Usage(MiB) | Description |
---|---|---|
python | 37 | 启动 |
mpv | 37 | import + init |
requests | 10 | import |
beautifulsoup | 6 | import |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import signal | |
import socket | |
import sys | |
import time | |
def be_a_worker(sock): | |
"""将当前进程变成一个 worker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt5.QtWidgets import * | |
from PyQt5.QtCore import * | |
from PyQt5.QtGui import * | |
class Model(QAbstractTableModel): | |
def __init__(self): | |
super().__init__() | |
self._data = ['miao', 'hello', 'world'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BSD 3-Clause License | |
# | |
# Copyright (c) 2020, Cosven | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# | |
# 1. Redistributions of source code must retain the above copyright notice, this | |
# list of conditions and the following disclaimer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((python-mode | |
;; 激活 pyvenv-mode,也可以自己在 init.el 中默认激活 | |
(eval . (pyvenv-mode)) | |
;; 这个要写绝对路径 | |
(pyvenv-activate . "/Users/cosven/projectpath/.venv") | |
;; 默认 select python-pylint 这个 checker | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name cosven.me www.cosven.me; | |
# path for static files | |
location /static/ { | |
root /data/static; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
使用方法 | |
- pip3 install flask # 安装依赖 | |
- python3 remote_control.py # 启动网页,在浏览器 | |
""" | |
import socket | |
from flask import Flask, request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gevent from the ground up - demo 1 | |
import selectors | |
import socket | |
import time | |
from urllib.parse import urlparse | |
sel = selectors.DefaultSelector() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<!-- <dir>~/.fonts</dir> --> | |
<alias> | |
<family>serif</family> | |
<prefer> | |
<family>Noto Serif CJK SC</family> | |
<family>Noto Color Emoji</family> | |
</prefer> | |
</alias> |