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 socket, machine | |
# This is the HTML, CSS and js to deliver to the client. | |
# You can (should) store this in another file and read from there, | |
# but I am lazy. | |
# The CSS and HTML to display pretty code is from pygments. | |
upy = """<!DOCTYPE html> | |
<html> | |
<head> | |
<title>I'm a website running on a Microcontroller.</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
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
import serial | |
fig, ax = plt.subplots() | |
line, = ax.plot(np.random.rand(10)) | |
ax.set_ylim(-5000, 5000) | |
xdata, ydata = [0]*100, [0]*100 | |
raw = serial.Serial("/dev/ttyUSB1",9600) |
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 set_prompt_filter() | |
-- orig: $E[1;32;40m$P$S{git}{hg}$S$_$E[1;30;40m{lamb}$S$E[0m | |
-- color codes: "\x1b[1;37;40m" | |
cwd = clink.get_cwd() | |
conda_env = get_conda_env() | |
virtual_env = get_virtual_env() | |
if virtual_env then | |
prompt = "\x1b[1;32;40m{cwd} {git}{hg} \n\x1b[1;30;40m({virtual_env}){lamb} \x1b[0m" | |
new_value = string.gsub(prompt, "{cwd}", cwd) | |
new_value = string.gsub(new_value, "{virtual_env}", virtual_env) |
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
# Single line comments start with a number symbol. | |
""" Multiline strings can be written | |
using three "s, and are often used | |
as comments | |
""" | |
#################################################### | |
## 1. Primitive Datatypes and Operators | |
#################################################### |
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
augroup filetype_vim | |
autocmd! | |
autocmd FileType vim setlocal foldmethod=marker | |
augroup END | |
" Vim ESCAPE Combinations{{{ | |
imap jj <esc> | |
imap <S-Space> <Esc> | |
vnoremap <S-Space> <Esc> | |
" }}} |
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
Felix Krull runs a PPA offering basically any version of Python (seriously, there is 2.3.7 build for vivid...) for many Ubuntu releases at | |
https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes | |
Do the usual: | |
sudo add-apt-repository ppa:fkrull/deadsnakes | |
sudo apt-get update | |
sudo apt-get install python3.5 | |
It will not overwrite your existing python3.4 which is still symlinked as python3. If you want python3.5 to be the default python3, change the symlink |
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
Applied on svn properties (recursively) using svn:ignore . | |
build.txt | |
*.resharper | |
**.ReSharper** | |
*.suo | |
*.user | |
*.pdb |
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 A KEYSTORE | |
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 | |
;; SIGN the APK | |
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore app.apk alias_name | |
Or | |
jarsigner -verbose -keystore PATH/TO/YOUR_RELEASE_KEY.keystore -storepass YOUR_STORE_PASS -keypass YOUR_UNSIGNED_PROJECT.apk YOUR_ALIAS_NAME |
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
--- Actions --- | |
$Copy <M-C> | |
$Cut <M-X> <S-Del> | |
$Delete <Del> <BS> <M-BS> | |
$LRU | |
$Paste <M-V> | |
$Redo <M-S-Z> <A-S-BS> | |
$SearchWeb <A-S-G> | |
$SelectAll <M-A> | |
$Undo <M-Z> |
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
package com.netflix.experiments.rx; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import rx.Observable; | |
import rx.Observable.OnSubscribe; |