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
// sequence template | |
#include <iostream> | |
using namespace std; | |
/* OMG awesome void_t metafunction will change your life */ | |
template <typename...> | |
using void_t = void; | |
typedef std::integral_constant<int, 2> two_t; | |
typedef std::integral_constant<int, 4> four_t; |
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 tensorflow as tf | |
import numpy as np | |
import sys | |
from tensorflow.python import debug as tf_debug | |
hooks = [tf_debug.LocalCLIDebugHook()] | |
tf.logging.set_verbosity(tf.logging.INFO) | |
trainX = np.array([[1,1,0,1],[0,0,1,0],[1,0,1,1],[0,0,1,1]]) | |
labelX = np.array([[1],[0],[1],[0]]) | |
num_classes = 2 | |
feature_names = ['f1','f2','f3','f4'] |
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
head -200 /dev/urandom | cksum | cut -f1 -d " " | |
find ./ -name "*.zip" -type f -print0 | xargs -0 -I {} sh -c 'unzip {} -d ./$(head -200 /dev/urandom | cksum | cut -f1 -d " ")' |
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
const path = require('path') | |
const redis = require("redis") | |
var client = redis.createClient() | |
const LineByLineReader = require('line-by-line') | |
const lr = new LineByLineReader(process.argv[2]); | |
var lineCount = 0 | |
var currentWord = "" | |
var filename = path.basename(process.argv[2]).replace('.', '') | |
var status = require('node-status') | |
var pizzas = status.addItem('pizza', { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
var fs = require('fs'); | |
var eml = fs.readFileSync('./eml.txt').toString('utf8').split('\r\n'); | |
function parseEmailText(eml) { | |
var sectionFound = false; | |
var found = []; | |
var tmp = ""; | |
for (var x in eml) { | |
var l = eml[x]; |
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
const request = require('request') | |
const stream = require('stream') | |
const buffer = require('buffer') | |
class CSVStream extends stream.Writable { | |
constructor() { | |
super() | |
this._count = 0 | |
this._buff = "" | |
this._push = (x) => { | |
//TODO figure out whether to dedup here or on DB Side |
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
let x = Array.from(new Array(10), () => {return (Math.random() * (20 - 1) + 1) | 0}) | |
const _xorSort = (x) => { | |
for( i = 0; i < x.length; i++) { | |
for( j = 0; j < x.length; j++) { | |
if(x[i] < x[j]) { | |
x[i] = x[i] ^ x[j] | |
x[j] = x[i] ^ x[j] | |
x[i] = x[i] ^ x[j] | |
} |
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
/** | |
* Your utility library for express | |
*/ | |
var basicAuth = require('basic-auth'); | |
/** | |
* Simple basic auth middleware for use with Express 4.x. | |
* | |
* @example |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="reset.css" type="text/css" media="screen"> | |
<style type="text/css" media="screen"> |