Skip to content

Instantly share code, notes, and snippets.

@joskid
joskid / ElasticNet.md
Created March 19, 2016 04:47 — forked from shagunsodhani/ElasticNet.md
Notes for "Regularization and variable selection via the elastic net" paper.

Regularization and variable selection via the elastic net

Introduction to elastic net

  • Regularization and variable selection method.
  • Sparse Representation
  • Exihibits grouping effect.
  • Prticulary useful when number of predictors (p) >> number of observations (n).
  • LARS-EN algorithm to compute elastic net regularization path.
  • Link to paper.
@joskid
joskid / Word2Vec.md
Created March 22, 2016 08:44 — forked from shagunsodhani/Word2Vec.md
Summary of paper titled "Efficient Estimation of Word Representations in Vector Space"

Efficient Estimation of Word Representations in Vector Space

Introduction

Model Architecture

@joskid
joskid / selenium-screenshotting.md
Created March 24, 2016 14:06 — forked from dannguyen/selenium-screenshotting.md
Using Selenium and Python to screenshot a javascript-heavy page

Using Selenium and Python to screenshot a javascript-heavy page

As websites become more JavaScript heavy, it's harder to automate things like screenshotting for archival purposes. I've seen examples and suggestions to use PhantomJS for visual testing/archiving of websites, but have run into issues such as the non-rendering of webfonts. I've never tried out Selenium until today...and while I'm not thinking about performance implications yet, Selenium seems far more accurate than PhantomJS...which makes sense since it actually opens a real browser. And it's not too hard to script to do complex interactions: here's an [example of how to log in to Twitter, write a tweet, upload an image, and send a tweet via Selenium and DOM element selection](https://gist.github.com/dannguyen/8a6fa49253c1d6a0eb92

@joskid
joskid / Faceswap
Created April 30, 2016 02:50 — forked from smeschke/Faceswap
#import necessary libraries
import cv2
import numpy as np
#capture video from the webcam
cap = cv2.VideoCapture(0)
#load the face finder
face_cascade = cv2.CascadeClassifier('/home/sm/Desktop/haarcascade_frontalface_default.xml')
var https = require('https');
function octoblu(message, cb){
/**
* HOW TO Make an HTTP Call - POST
*/
// do a POST request
// create the JSON object
jsonObject = JSON.stringify(message);
@joskid
joskid / why.markdown
Created July 9, 2016 01:14 — forked from egonSchiele/why.markdown
Why read Grokking Algorithms?

If you have already taken a course in algorithms, why read Grokking Algorithms (manning.com/bhargava)?

If you were learning graph algorithms, which approach would you prefer:

  1. Imagine you have to take public transit from your home to your office. How do you figure out the fastest route? Use graph algorithms! OR

  2. We can choose between two standard ways to represent a graph G = (V, E): as a collection of adjacency lists or as an adjacency matrix. Either way applies to both directed and undirected graphs.

I prefer the first way: lead with lots of examples, and clear writing. The second way is an excerpt from "Introduction to Algorithms"...that's how they start their section on graph algorithms.

@joskid
joskid / plink-plonk.js
Created February 15, 2020 22:13 — forked from tomhicks/plink-plonk.js
Listen to your web pages
@joskid
joskid / custom_game_engines_small_study.md
Created April 24, 2020 13:11 — forked from raysan5/custom_game_engines_small_study.md
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) becaus

const useFetch = endpoint => {
const defaultHeader = {
Accept: "application/json",
"Content-Type": "application/json"
};
const customFetch = (
url,
method = "GET",
body = false,
headers = defaultHeader
@joskid
joskid / form.js
Created May 13, 2020 15:38 — forked from jeanbauer/form.js
Text Input using react hooks with a custom hook: useFormInput
import { useState } from 'react'
const Form = () => {
const name = useFormInput('Name')
return (
<>
<input {...name} />
</>
)