Skip to content

Instantly share code, notes, and snippets.

View siddMahen's full-sized avatar

Siddharth Mahendraker siddMahen

  • Toronto, Canada
View GitHub Profile
@siddMahen
siddMahen / instr.md
Last active June 8, 2020 13:36
Coauthor setup instructions

Setting up Coauthor on a new Lighsail instance

Setup: Ubuntu 14.04 Lightsail instance with static IP address, DNS type A record linking the static IP to domain name (ravivakil.org)

  1. SSH into the server by running $ ssh -i /path/to/private/key ubuntu@ravivakil.org
  2. Securely move the private key onto the server (is this safe?) $ scp -i /path/to/private/key /path/to/private/key ubuntu@ravivakil.org:home/ubuntu/
  3. Install node.js, version 12.x.x (see https://github.com/nodesource/distributions/blob/master/README.md) by running $ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - followed by $ sudo apt-get install -y nodejs
  4. Download meteor by running $ curl https://install.meteor.com/ | sh
  5. Download Coauthor via git by running $ cd ~ && git clone https://github.com/edemaine/coauthor.git. Also create a build directory for later: $ cd ~ && mkdir coauthor-build
  6. Setup SSL certificates by following the instructions here: https://certbot.eff.org/lets-encrypt/ubuntuxenial-other
m = 2
n = 4*m + 1
a(j) = (1/n)*(1 + sin((2*π*j*m + π*j)/n)/sin((π*j)/n))
function b(j)
s = 2
for k = 1:m
s += 2*cos((2*π*k*j)/n)
end
m = 1
n = 4*m + 1
a(j) = (1/n)*(1 + sin((2*π*j*m + π*j)/n)/sin((π*j)/n))
function b(j)
s = 2
for k = 1:m
s += 2*cos((2*π*k*j)/n)
end
m = 1
n = 4*m + 1
a(j) = (1/n)*(1 + sin((2*π*j*m + π*j)/n)/sin((π*j)/n))
function b(j)
s = 2
for k = 1:m
s += 2*cos((2*π*k*j)/n)
end
% A collection of frequently used commands
% This file is located in ~/Library/texmf/tex/latex/common/
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{common}[2018/10/27 v1.0 Siddharth Mahendraker]
% -- Typography --
\RequirePackage[utf8]{inputenc}
\RequirePackage{microtype}
\RequirePackage{parskip}
% -- Provides the math notes class "note"
% -- based on https://gist.github.com/jhwilson/1278588
%
% This package replicates, to the best of my ability, the look of my
% hand-written notes.
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{note}[2018/10/27 Mathematical Notes, Siddharth Mahendraker]
\LoadClass[a4paper,12pt]{article}
@siddMahen
siddMahen / install.txt
Created August 5, 2016 14:37
Installing OpenCV v3.1.0 on MacOS
1. Clone the git repo into ~/opencv
2. Clone the opencv_contrib repo into ~/opencv_contrib
3. In both dirs, run git checkout 3.1.0
4. In ~/opencv, mkdir build; cd build; and run the cmake command below:
cmake -D WITH_CUDA=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \
-D PYTHON2_PACKAGES_PATH=/Users/siddmahen/miniconda2/envs/tensorflow/lib/python2.7/site-packages \
-D PYTHON2_LIBRARY=/Users/siddmahen/miniconda2/envs/tensorflow/bin \
-D PYTHON2_INCLUDE_DIR=/Users/siddmahen/miniconda2/envs/tensorflow/include/python2.7 \
-D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=ON \
import tensorflow as tf
import sys
import os
def read_and_decode(filename_queue):
reader = tf.TextLineReader()
_, record = reader.read(filename_queue)
return record
Doubtful it stood;
As two spent swimmers, that do cling together
And choke their art. The merciless Macdonwald--
Worthy to be a rebel, for to that
The multiplying villanies of nature
Do swarm upon him--from the western isles
Of kerns and gallowglasses is supplied;
And fortune, on his damned quarrel smiling,
Show'd like a rebel's whore: but all's too weak:
For brave Macbeth--well he deserves that name--
Doubtful it stood;
As two spent swimmers, that do cling together
And choke their art. The merciless Macdonwald--
Worthy to be a rebel, for to that
The multiplying villanies of nature
Do swarm upon him--from the western isles
Of kerns and gallowglasses is supplied;
And fortune, on his damned quarrel smiling,
Show'd like a rebel's whore: but all's too weak:
For brave Macbeth--well he deserves that name--