This file contains 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
// See: http://stackoverflow.com/questions/17218089/salt-and-hash-using-pbkdf2 | |
// See: https://crackstation.net/hashing-security.htm | |
'use strict'; | |
let Promise = require('bluebird'); | |
let crypto = require('crypto'); | |
function calcPassword(password) { | |
const RANDOM_BYTES = 64; |
This file contains 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
#include <ctime> | |
#include <cstdlib> | |
#include <vector> | |
#include <string> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
const int H = 4; | |
const int W = 8; |
This file contains 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
def flatEnumerate(obj, prefix='root'): | |
if isinstance(obj, int): | |
return [{ prefix: obj }] | |
elif isinstance(obj, list): | |
res = [] | |
for option in obj: | |
res.extend(flatEnumerate(option, prefix)) | |
return res | |
elif isinstance(obj, dict): | |
if len(obj) == 0: return [{}] |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#include <atomic> | |
#include <memory> | |
#include <vector> | |
#include <thread> | |
#include <cstdio> | |
std::shared_ptr<std::vector<int>> v; | |
void read(const char* name) { | |
auto localv = std::atomic_load_explicit(&v, std::memory_order_acquire); |
This file contains 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
/* | |
* GET message listing => show() | |
* POST meaasge posting => send() | |
*/ | |
var settings = require('../settings'); | |
var group = require('../models/group'); | |
var mesg = require('../models/mesg'); | |
var md = require('markdown').markdown.toHTML; |
This file contains 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 scipy.misc import imread, imresize, imsave | |
from scipy.optimize import fmin_l_bfgs_b | |
import numpy as np | |
import time | |
import os | |
import argparse | |
import h5py | |
from keras.models import Sequential | |
from keras.layers.convolutional import Convolution2D, ZeroPadding2D, AveragePooling2D, MaxPooling2D |
This file contains 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
#!/usr/local/bin/python2 | |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals, print_function, division | |
import os | |
# os.environ['HTTP_PROXY'] = 'http://127.0.0.1:8081/' | |
# os.environ['HTTPS_PROXY'] = 'http://127.0.0.1:8081/' | |
import datetime | |
import hashlib | |
import requests | |
from pprint import pprint |
This file contains 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
#!/usr/local/bin/python3 | |
import os | |
# os.environ['HTTP_PROXY'] = 'http://127.0.0.1:8081/' | |
# os.environ['HTTPS_PROXY'] = 'http://127.0.0.1:8081/' | |
import sys | |
import hashlib | |
import requests | |
import sqlite3 | |
from pprint import pprint |
This file contains 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 com.abcdabcd987.compiler2016.Utility; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.util.Arrays; | |
import java.util.List; | |
/** | |
* Created by abcdabcd987 on 2016-04-18. | |
*/ |
OlderNewer