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
import numpy as np | |
def np_array_to_tex(A): | |
if A.ndim != 2: | |
raise Exception("ndim should be 2") | |
B = np.asarray(A) | |
rows = list(map(lambda row: " & ".join(map(str, row)), B)) | |
return "\n".join([ |
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
from matplotlib import pyplot as plt | |
import sympy as sym | |
from IPython.display import display, Math | |
x, n, m = sym.symbols('x, n, m') | |
expn = sym.sin(x)**2 | |
f = lambda n: sym.expand_trig(expn)/n | |
F = lambda f: sym.Integral(f, (x, 0, 2)) |
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
// Protocol | |
function BackBoneStreamType(stream){ | |
this.stream = stream; // Ex... XMLHTTP, Local/Session Storage | |
} | |
BackBoneStreamType.prototype.recieve = function(callback){} | |
BackBoneStreamType.prototype.send = function(callback){} | |
BackBoneStreamType.prototype.close = function(callback){} | |
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
// | |
// WebViewWithNSURLConnectionDelegateSampleController.swift | |
// SwiftSamples | |
// | |
// Created by Yuki Takei on 1/18/15. | |
// Copyright (c) 2015 noppoman. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
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
(function() { | |
var MessagePanelView, PlainMessageView, SSHConnection, ScpTransport, mkdirp, path, _ref; | |
_ref = require("atom-message-panel"), MessagePanelView = _ref.MessagePanelView, PlainMessageView = _ref.PlainMessageView; | |
SSHConnection = require("ssh2"); | |
mkdirp = require("mkdirp"); | |
path = require("path"); |