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 contextlib import contextmanager | |
from contextlib import redirect_stdout as r_stdout | |
from contextlib import redirect_stderr as r_stderr | |
from io import StringIO | |
import pip | |
def pip_exec(*args): | |
with StringIO() as stdout, StringIO() as stderr: |
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
"""\ | |
License: MIT | |
See also: | |
- RFC 1179 - Line Printer Daemon Protocol | |
http://www.ietf.org/rfc/rfc1179.txt | |
- David Boddie's lpr.py (Thanks!) | |
http://www.boddie.org.uk/david/Projects/Python/lptools/lpr.py | |
""" |
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
''' | |
License: GPL | |
https://www.ietf.org/rfc/rfc1759.txt | |
''' | |
from argparse import ArgumentParser | |
from collections import namedtuple | |
from enum import IntEnum | |
from functools import partial |
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 ctypes import c_ubyte | |
from ctypes import cast | |
from ctypes import POINTER | |
from sys import getsizeof | |
def objview(obj): | |
return cast(id(obj), POINTER(c_ubyte * getsizeof(obj))).contents | |
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 io import BytesIO | |
from msilib import add_tables | |
from msilib import init_database | |
from msilib import schema | |
from msilib import sequence | |
from os.path import abspath | |
from os.path import dirname | |
from os.path import normpath | |
from shutil import rmtree | |
from subprocess import check_call |
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 sys import argv | |
from sys import exit | |
from pygal import Bar | |
from PyQt5.QtWebEngineWidgets import QWebEngineView | |
from PyQt5.QtWidgets import QApplication | |
app = QApplication(argv) | |
view = QWebEngineView() | |
view.setHtml(Bar()(1, 3, 3, 7)(1, 6, 6, 4).render(True)) |
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
""" | |
xte v1.09 | |
Generates fake input using the XTest extension, more reliable than xse | |
Author: Steve Slaven - http://hoopajoo.net | |
usage: xte [-h] [-i xinputid] [-x display] [arg ..] | |
-h this help | |
-i XInput2 device to use. List devices with 'xinput list' | |
-x send commands to remote X server. Note that some commands |
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
@echo off | |
kubectl %* | |
exit /b %ERRORLEVEL% |
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
document.addEventListener('deviceready', brython, false); |
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 pandas as pd | |
period = ("2020-01-01", "2020-12-31") | |
alldays = pd.date_range(*period, freq="D") # 期間中の毎日 | |
weekdays = pd.date_range(*period, freq="B") # 期間中の月~金 |
OlderNewer