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
#!/bin/env bash | |
# this returns all aimesh routers | |
# nvram get cfg_device_list | |
router="192.168.0.1" | |
user="admin" | |
port=1024 | |
pwd=password |
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
""" | |
Create widget with available icons from qt and based on freedesktop.org | |
https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html | |
""" | |
from PyQt5.QtCore import QSize | |
from PyQt5.QtGui import QIcon | |
from PyQt5.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget, QGridLayout, QStyle, \ | |
QFormLayout, QLabel, QScrollArea, QLineEdit, QTabWidget | |
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
#!/usr/bin/env python3 | |
# https://stackoverflow.com/questions/12193803/invoke-python-simplehttpserver-from-command-line-with-no-cache-option | |
# without this, it can not run in bg | |
import os | |
import sys | |
sys.stdout = open(os.devnull, 'w') | |
sys.stderr = open(os.devnull, 'w') | |
import http.server |
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
def startDrag(self, supportedActions): | |
print('start drag') | |
listsQModelIndex = self.selectedIndexes() | |
if listsQModelIndex: | |
# dataQMimeData = self.model().mimeData(listsQModelIndex) | |
# insert fake x-maya-data | |
dataQMimeData = QtCore.QMimeData() | |
encoded = QtCore.QByteArray() | |
# failed attempt to cheat maya |
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 PySide2 import QtWidgets, QtGui, QtCore | |
class Window(QtWidgets.QWidget): | |
def __init__(self, *args): | |
QtWidgets.QWidget.__init__(self, *args) | |
layout = QtWidgets.QVBoxLayout(self) | |
label= QtWidgets.QLabel('drop here') | |
label.setAlignment(QtCore.Qt.AlignCenter) | |
layout.addWidget(label) | |
self.setLayout(layout) |
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 sys | |
from PySide2 import QtCore, QtGui, QtWidgets | |
from PySide2.QtCore import Qt | |
# https://www.pythonguis.com/tutorials/qtableview-modelviews-numpy-pandas/ | |
class TableModel(QtCore.QAbstractTableModel): | |
def __init__(self, data): | |
super(TableModel, self).__init__() | |
self._data = data |
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
chd: | |
disable: [ seen, seen_info_hash, retry_failed, history ] | |
html_rss: | |
url: xxx | |
cookie: xxx | |
params: '&passkey=xxx' | |
root_element_selector: 'table.torrents > tbody > tr:not(:first-child)' | |
fields: | |
title: |
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
--- | |
version: "3.8" | |
x-env-vars: &env-vars | |
PUID: 1000 | |
PGID: 1000 | |
TZ: Asia/Shanghai | |
UMASK: 002 | |
x-common-settings: &common-settings |
NewerOlder