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
<script type="text/babel"> | |
const manuallyMakeElement = (props) => { | |
return React.createElement('div', {className: 'container'}, props.children) | |
} | |
const message = (props) => { | |
return props.children + ' ' + props.other_thing | |
} | |
const passFunctionIntoElement = React.createElement(message, {children: 'Pass function', other_thing: 'into'}) |
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
'body': | |
'ctrl-tab': 'pane:show-next-item' | |
'ctrl-tab ^ctrl': 'unset!' | |
'ctrl-shift-tab': 'pane:show-previous-item' | |
'ctrl-shift-tab ^ctrl': 'unset!' |
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/bash | |
# there's probably (definitely?) a better way to do this, but it seems to work. | |
classes=$(grep -oEh "^class \w+[\(:]" * | cut -c 7- | sed 's/.\{1\}$//') | |
for c in $classes ; do | |
grep $c * | grep -vq "class" || echo $c | |
done |
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 examine(x): | |
iam = str(type(x)) | |
try: return iam + ' ' + examine(x[0]) | |
except: return iam | |
def main(): | |
print(examine([[[[1,2,3,]]]])) | |
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 time import sleep | |
def main(): | |
for i in range(10): | |
print('Counter:', i, end='\r') | |
sleep(.1) | |
if __name__ == '__main__': |
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
[ | |
{ "keys": ["super+\\"], "command": "toggle_side_bar" }, | |
{ "keys": ["ctrl+tab"], "command": "next_view" }, | |
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }, | |
{ "keys": ["super+shift+f"], "command": "show_panel", "args": {"panel": "replace", "reverse": 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
{ | |
"auto_find_in_selection": true, | |
"close_windows_when_empty": true, | |
"ensure_newline_at_eof_on_save": true, | |
"find_selected_text": true, | |
"font_size": 13, | |
"hot_exit": false, | |
"ignored_packages": | |
[ | |
"Vintage" |
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
fig,axes=plt.subplots(3, 4, figsize=(10,5)) | |
for i, ax in enumerate(axes.flat): | |
ax.imshow(img) | |
plt.tight_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
# The current Asana Python client does not seem to support task creation in a given section. | |
# The API documentation is also somewhat lacking, and there's some conflicting instructions on various forums. | |
# After a bit of searching + trial and error, I figured out how to do it using the requests library. | |
# I'm posting these helper functions here for anyone who may need them in the future. | |
import requests | |
import json | |
headers = { | |
'Content-Type': 'application/json', |
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
wget https://raw.github.com/ros/ros_tutorials/kinetic-devel/rospy_tutorials/001_talker_listener/talker.py |
NewerOlder