(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| # implementation | |
| from pymouse import PyMouseEventMeta | |
| import systembridge | |
| from threading import Thread | |
| class PyMouseEvent(PyMouseEventMeta): | |
| def __init__(self): | |
| click_tap = systembridge.get_event_tap(mousepress | mouserelease) | |
| move_tap = systembridge.get_event_tap(mousemove) |
| import matplotlib,numpy | |
| import pylab | |
| # A random colormap for matplotlib | |
| cmap = matplotlib.colors.ListedColormap ( numpy.random.rand ( 256,3)) | |
| pylab.imshow ( Z, cmap = cmap) | |
| pylab.show() |
| license: gpl-3.0 |
| """ | |
| Functions for converting dates to/from JD and MJD. Assumes dates are historical | |
| dates, including the transition from the Julian calendar to the Gregorian | |
| calendar in 1582. No support for proleptic Gregorian/Julian calendars. | |
| :Author: Matt Davis | |
| :Website: http://github.com/jiffyclub | |
| """ |
| """Convert decimal numbers to pinary (base pi). | |
| Fractional and even irrational bases are possible, but aren't really useful for | |
| anything. Base pi has four digits: 0, 1, 2, and 3. What's interesting is that | |
| there's some "space" between the highest digit and the base, which means that | |
| there are numbers with multiple valid representations. You'll notice: | |
| decimal 7.000000 = pinary 20.2021120021 | |
| decimal 8.000000 = pinary 21.2021120021 | |
| decimal 9.000000 = pinary 22.2021120021 |
| # -*- coding: utf-8 -*- | |
| #test on python 3.4 ,python of lower version has different module organization. | |
| import http.server | |
| from http.server import HTTPServer, BaseHTTPRequestHandler | |
| import socketserver | |
| PORT = 8080 | |
| Handler = http.server.SimpleHTTPRequestHandler |
| /* | |
| Foundation Tip Contract | |
| Address: 0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359 | |
| Bitcoin Shapeshift Address: 1GyczDXWjFbmhx2Qau4ham3zJqNEP8UcEG (if transaction fails it is sent to 39BaMQCphFXyYAvcoGpeKtnptLJ9v6cdFY instead) | |
| Interface: [{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"proposals","outputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"},{"name":"description","type":"string"},{"name":"votingDeadline","type":"uint256"},{"name":"executed","type":"bool"},{"name":"proposalPassed","type":"bool"},{"name":"numberOfVotes","type":"uint256"},{"name":"currentResult","type":"int256"},{"name":"proposalHash","type":"bytes32"}],"type":"function"},{"constant":false,"inputs":[{"name":"proposalNumber","type":"uint256"},{"name":"transactionBytecode","type":"bytes"}],"name":"executeProposal","outputs":[{"name":"result","type":"int256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"memberId","outputs":[{"name":"","type":"uint |
| import axios from 'axios'; | |
| // You can use any cookie library or whatever | |
| // library to access your client storage. | |
| import cookie from 'cookie-machine'; | |
| axios.interceptors.request.use(function(config) { | |
| const token = cookie.get(__TOKEN_KEY__); | |
| if ( token != null ) { | |
| config.headers.Authorization = `Bearer ${token}`; |
| #!/usr/bin/python | |
| # turn lisp statements into an AST | |
| # going off a super basic grammar: | |
| # - atoms are numbers or symbols | |
| Number = (int, float) | |
| Symbol = str | |
| Atom = (Number, Symbol) |