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
# -*- coding: utf-8 -*- | |
""" | |
Spyder Editor | |
This is a temporary script file. | |
""" | |
import http.server, webbrowser, threading | |
from urllib.parse import urlencode, urlparse, parse_qs | |
class VK(): |
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 asyncio, itertools | |
data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0] | |
def grouper(iterable, n): | |
"Collect data into fixed-len chunks: stackoverflow.com/a/31185097/1119602" | |
it = iter(iterable) | |
return iter(lambda: list(itertools.islice(it, n)), []) |
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
class WaitForModification(): | |
"wait for /path/ file to be modified before exiting /with/ block" | |
def __init__(self, path): | |
self.path = path | |
self.mtime = not os.path.exists(path) or os.path.getmtime(path) | |
def __enter__(self): | |
pass | |
def __exit__(self, *args): | |
while True: | |
try: |
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
# 0-based /row/ to search for /text/ | |
def find_column(table, row, text): | |
trs = table.find_all('tr') | |
results = [[c for c in trs[i].findChildren(recursive=False)] | |
for i in range(0, row+1)] | |
for r in range(row-1, -1, -1): | |
i = 0 | |
for c in results[r]: | |
if r+int(c.get('rowspan', 0)) > row: | |
results[-1].insert(i, None) |
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
if QtCore.QT_VERSION >= 0x50501: | |
def excepthook(type_, value, traceback_): | |
traceback.print_exception(type_, value, traceback_) | |
QtCore.qFatal('') | |
sys.excepthook = excepthook |
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
[ 0.126799] tegra124-pinctrl tegra124-pinctrl: Config param 0003 not supported on group kb_row4_pr4 | |
[ 0.126830] tegra124-pinctrl tegra124-pinctrl: Config param 0003 not supported on group kb_row5_pr5 | |
[ 0.126888] tegra124-pinctrl tegra124-pinctrl: Config param 0003 not supported on group clk3_req_pee1 | |
[ 0.126921] tegra124-pinctrl tegra124-pinctrl: Config param 0003 not supported on group pu2 | |
[ 0.126952] tegra124-pinctrl tegra124-pinctrl: Config param 0003 not supported on group pu3 | |
[ 0.126984] tegra124-pinctrl tegra124-pinctrl: Config param 0003 not supported on group pu4 | |
[ 0.127015] tegra124-pinctrl tegra124-pinctrl: Config param 0003 not supported on group pu5 | |
[ 0.127046] tegra124-pinctrl tegra124-pinctrl: Config param 0003 not supported on group pu6 | |
[ 0.127079] tegra124-pinctrl tegra124-pinctrl: Config param 0003 not supported on group spdif_out_pk5 | |
[ 0.127111] tegra124-pinctrl tegra124-pinctrl: Config param 0003 not supported on group pk2 |
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
--------- beginning of main | |
11-21 21:31:53.497 153 153 W auditd : type=2000 audit(0.0:1): initialized | |
11-21 21:31:56.294 161 161 I /system/bin/tzdatacheck: tzdata file /data/misc/zoneinfo/current/tzdata does not exist. No action required. | |
11-21 21:31:56.409 164 164 I sysinit : Running /system/etc/init.d/00banner | |
--------- beginning of system |
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 locale | |
import struct | |
def __readLink(path): | |
# http://stackoverflow.com/a/28952464/1119602 | |
with open(path, 'rb') as stream: | |
content = stream.read() | |
# skip first 20 bytes (HeaderSize and LinkCLSID) | |
# read the LinkFlags structure (4 bytes) | |
lflags = struct.unpack('I', content[0x14:0x18])[0] |
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
tribution | |
writing manifest file 'pandas.egg-info\SOURCES.txt' | |
running build_ext | |
skipping 'pandas\_libs\join.c' Cython extension (up-to-date) | |
skipping 'pandas\_libs\index.c' Cython extension (up-to-date) | |
building 'pandas._libs.index' extension | |
D:\andray\Software\Python\WinPython-32bit-3.4.4.5Qt5\python-3.4.4\Scripts\gcc.ex | |
e -mdll -O -Wall -Ipandas/_libs/src/klib -Ipandas/_libs/src -ID:\andray\Software | |
\Python\WinPython-32bit-3.4.4.5Qt5\python-3.4.4\lib\site-packages\numpy\core\inc | |
lude -ID:\andray\Software\Python\WinPython-32bit-3.4.4.5Qt5\python-3.4.4\include |
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
.... | |
/* | |
* Wraps `localtime` functionality for multiple platforms. This | |
* converts a time value to a time structure in the local timezone. | |
* | |
* Returns 0 on success, -1 on failure. | |
*/ | |
static int get_localtime(NPY_TIME_T *ts, struct tm *tms) { | |
char *func_name = "<unknown>"; | |
#if defined(_WIN32) |
OlderNewer