^Amove cursonr to Begin of line^Emove cursonr to End of line^Ddelete current char^Wdelete word left to current char^Udelete everything left to current char^Kdelete everything right to current char^Ttranspose^F(right arrow) move cursonr to Next char^B(left arrow) move cursonr to Prev char^Pbring Prev history cmd
This file contains hidden or 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
| """Got intriged with signal capabilities (http://docs.python.org/2/library/signal.html) | |
| I define simple ``asyncall`` function thats takes numner seconds and deffered function (similar window.setTimeout(n_ms, func/code_literal)) | |
| >>> asyncall(5, lambda *args: say('A')) | |
| >>> asyncall(10, lambda *args: say('B')) | |
| >>> asyncall(2, lambda *args: say('C')) | |
| C | |
| A | |
| B |
This file contains hidden or 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
| """Bisect based formula testing. | |
| Implements bisect_lt, bisect_le, bisect_ge, bisect_gt from scratch using `yfun` | |
| # http://code.google.com/codejam/contest/2418487/dashboard | |
| >>> r, t = 10**16, 10**18 | |
| >>> yfun = lambda x: (2*(10**16) + (2*x) -1) * x | |
| Given bisect_le(yfun, y, range(N)) | |
| >>> bisect_le(yfun, t, range(t)) | |
| 49 |
This file contains hidden or 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
| # http://algorithmicallyrandom.blogspot.it/2009/09/tab-completion-in-python-shell-how-to.html | |
| import rlcompleter | |
| import readline | |
| readline.parse_and_bind("tab: complete") |
This file contains hidden or 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
| """ | |
| Permutations by Lehmer codes (http://en.wikipedia.org/wiki/Lehmer_code) | |
| Inspired by http://stackoverflow.com/a/3241894/212278 | |
| Given input sequence | |
| >>> seq = ["A", "B", "C", "D"] | |
| >>> lehmer_code = [2, 1, 0, 0] | |
| >>> int_from_code(lehmer_code) | |
| 6 | |
| >>> list(lehmer.iter_perm(['A', 'B', 'C'])) |
MacPorts Upgrade Procedure - more
- Save the list of installed ports:
port -qv installed > myports.txt
- Uninstall all installed ports:
sudo port -f uninstall installed
- Clean any partially-completed builds:
sudo port clean all
- Get fresh MacPorts-X.Y.Z
This file contains hidden or 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
| library(Hmisc) # summarize | |
| dx = summarize(mtcars$hp, llist(mtcars$cyl, mtcars$gear), sum) | |
| dx = summarize(mtcars$hp, llist(mtcars$cyl, mtcars$gear), mean) | |
| names(dx) = c("cyl", "gear", "hp") | |
| dx.t = xtabs(hp ~ cyl + gear, dx) | |
| barplot(dx.t, | |
| beside=T, | |
| col=rainbow(3), |
- getlittlebird.com Influencer Discovery & Engagement
- wefollow.com Discover prominent people
- twitaholic.com Tracking Most Popular Users
- peerindex.com Audience Insight Marketing tool
This file contains hidden or 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
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <meta http-equiv="Content-Style-Type" content="text/css"> | |
| <title></title> | |
| <meta name="Generator" content="Cocoa HTML Writer"> | |
| <meta name="CocoaVersion" content="1265.2"> | |
| <style type="text/css"> | |
| p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 22.0px; font: 12.0px 'Lucida Grande'} |