Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python3
# -*- coding: utf-8 -*-
import time
import itertools
import urllib.request
from bs4 import BeautifulSoup as BS
import os
from multiprocessing import Pool
@ld86
ld86 / gist:8970402
Created February 13, 2014 05:50
Store your id_rsa on EToken
openssl rsa -in id_rsa -out pub.der -outform DER -pubout
openssl rsa -in id_rsa -out priv.der -outform DER
pkcs11-tool --module /usr/local/lib/libeToken.dylib -w pub.der --type pubkey --label "label" --id 01
pkcs11-tool --module /usr/local/lib/libeToken.dylib -w priv.der --type privkey --label "label" --id 01
ssh-keygen -D /usr/local/lib/libeToken.dylib
| In its simplest form, R can be used as an interactive calculator. Type 5 + 7 and press Enter.
> 5 + 7
[1] 12
| You are doing so well!

Keybase proof

I hereby claim:

  • I am ld86 on github.
  • I am ld86 (https://keybase.io/ld86) on keybase.
  • I have a public key whose fingerprint is 97EB 3D40 1B0C 20F2 1A40 54EF 264B 59FC A609 816A

To claim this, I am signing this object:

class Regression:
def __init(self):
pass
def __loss(self, X, y, coefs):
l = (y - np.dot(X, coefs))
return np.dot(l.T, l)
def fit(self, X, y):
@ld86
ld86 / main.py
Created February 4, 2016 19:13
LS
class Regression:
def __init(self):
pass
def __loss(self, X, y, coefs):
l = (y - np.dot(X, coefs))
return np.dot(l.T, l)
def fit(self, X, y):
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{