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
| 'use-strict'; | |
| (function() { | |
| function copyTextArea($selTextArea) { | |
| $selTextArea.select(); | |
| var successful = false; | |
| try { | |
| successful = document.execCommand('copy'); | |
| } catch (err) { | |
| successful = false; |
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
| SRC_FILES=*.tex | |
| pdf: | |
| pdflatex $(SRC_FILES) | |
| clean: | |
| rm *.aux *.log *.pdf | |
| all: pdf |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am kkleidal on github. | |
| * I am kkleidal (https://keybase.io/kkleidal) on keybase. | |
| * I have a public key ASCMLGKNvE2sMm4iKxH2xGNwsLTQInAiVe0ffuQPZwgwgwo | |
| To claim this, I am signing this object: |
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
| *.log | |
| *.aux | |
| *.out |
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
| private var xifDateFormatter: NSDateFormatter = { () -> NSDateFormatter in | |
| let dateFormatter = NSDateFormatter() | |
| dateFormatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") | |
| dateFormatter.dateFormat = "yyyy:MM:dd' 'HH:mm:ss" | |
| dateFormatter.timeZone = NSTimeZone(abbreviation: "UTC") | |
| return dateFormatter | |
| }() | |
| // ... | |
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
| #!/bin/sh | |
| ln -s $(pwd)/pre-commit.bash .git/hooks/pre-commit |
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
| /* jshint node: true */ | |
| "use strict"; | |
| var nodemailer = require('nodemailer'); | |
| // create reusable transporter object using the default SMTP transport | |
| var transporter = nodemailer.createTransport({ | |
| host: "smtp.zoho.com", | |
| // port: 587, | |
| secure: true, |
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 gensim | |
| from job import Job | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from sklearn.decomposition import PCA | |
| # Load Google's pre-trained Word2Vec model. | |
| # model = gensim.models.Word2Vec.load_word2vec_format('./data/GoogleNews-vectors-negative300.bin', binary=True) | |
| def pca_plot(points, training_points=None): |
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 subprocess | |
| import base64 | |
| def keyscan(host): | |
| p = subprocess.Popen(['/bin/sh', '-c', '(ssh-keyscan %s | grep ssh-rsa) 2>/dev/null' % host], stdout=subprocess.PIPE) | |
| config = p.stdout.read().decode('ascii').split(' ') | |
| p.wait() | |
| if p.returncode != 0: | |
| raise Exception("Could not scan %s for SSH key." % host) | |
| config[2] = paramiko.RSAKey(data=base64.b64decode(config[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
| package main | |
| import ( | |
| "log" | |
| "strings" | |
| "time" | |
| ) | |
| type threadPoolWorker struct { | |
| free chan *threadPoolWorker |