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 time | |
import concurrent.futures | |
import rx | |
def return_slowly(i): | |
time.sleep(1) | |
return i | |
with concurrent.futures.ProcessPoolExecutor(5) as executor: | |
rx.Observable.from_(range(5)).flat_map( |
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
>>> print('C:\Users\Mosky\Desktop') | |
File "<stdin>", line 1 | |
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape | |
>>> print(r'C:\Users\Mosky\Desktop') | |
C:\Users\Mosky\Desktop |
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 python | |
# -*- coding: utf-8 -*- | |
import signal | |
from time import sleep | |
from multiprocessing import TimeoutError | |
from multiprocessing.dummy import Pool | |
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 python | |
# -*- coding: utf-8 -*- | |
while True: | |
s = raw_input('Child: ') | |
if not s: | |
break |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 python | |
from math import log | |
import funcy as fy | |
def f(x): | |
return x | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
(function () { | |
const intervalMiliseconds = 10; | |
const waitToLoadMiliseconds = 1000; | |
const getUnsaveA = () => document.querySelector('.uiContextualLayerPositioner:not(.hidden_elem) li:last-child a'); | |
const scrollToBottom = () => window.scrollTo(0, document.body.scrollHeight); | |
const unsaveAndLoad = (recursive) => { |
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
{ | |
"title": "Kill unexpectedly repeated return_or_enter", | |
"rules": [ | |
{ | |
"description": "Map the repeated return_or_enter in 100 ms to none", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "return_or_enter", |
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 python | |
from typing import Callable, Any | |
import warnings | |
import funcy as fy | |
import pandas as pd | |
import pymysql | |