Skip to content

Instantly share code, notes, and snippets.

View dlobregon's full-sized avatar
🔭
Forecasting

dlobregon dlobregon

🔭
Forecasting
View GitHub Profile
@stober
stober / softmax.py
Created March 1, 2012 03:05
Softmax in Python
#! /usr/bin/env python
"""
Author: Jeremy M. Stober
Program: SOFTMAX.PY
Date: Wednesday, February 29 2012
Description: Simple softmax function.
"""
import numpy as np
npa = np.array
@bobthecat
bobthecat / r-tutorial.r
Created August 15, 2012 15:41
R tutorial
### R code from vignette source 'Presentation.Rnw'
### Encoding: UTF-8
###################################################
### code chunk number 1: init
###################################################
options(width=60)
###################################################
@fnielsen
fnielsen / Nielsen2012Python_case.py
Last active April 29, 2020 23:49
Text mining example in Python
# $Id: Nielsen2012Python_case.py,v 1.2 2012/09/02 16:55:25 fn Exp $
# Define a url as a Python string (note we are only getting 100 documents)
url = "http://wikilit.referata.com/" + \
"wiki/Special:Ask/" + \
"-5B-5BCategory:Publications-5D-5D/" + \
"-3FHas-20author%3DAuthor(s)/-3FYear/" + \
"-3FPublished-20in/-3FAbstract/-3FHas-20topic%3DTopic(s)/" + \
"-3FHas-20domain%3DDomain(s)/" + \
"format%3D-20csv/limit%3D-20100/offset%3D0"
@abelsonlive
abelsonlive / r_install.sh
Created October 4, 2012 15:04 — forked from seeRead/r_install.sh
r init file
#/bin/bash
# run chmod +x THIS_GIST.sh
# configure for debian or ubuntu! debian has dependencies that ubuntu's libs will conflict with
# sources:
# http://cran.r-project.org/bin/linux/debian/
# http://cran.r-project.org/bin/linux/ubuntu/README
# http://stackoverflow.com/questions/10255082/installing-r-from-cran-ubuntu-repository-no-public-key-error
clear
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@manjeshpv
manjeshpv / passport.js
Last active February 29, 2024 15:11
Passport.js using MySQL for Authentication with Express
// config/passport.js
// load all the things we need
var LocalStrategy = require('passport-local').Strategy;
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
@Dmitrii-I
Dmitrii-I / top_10_data_mining_algos_using_R.md
Last active December 26, 2021 05:36
Top 10 algorithms in data mining -- using R

Top 10 algorithms in data mining - with R

Wu et al. describe top 10 algorithms in data mining in (LDO) "Top 10 algorithms in data mining" (2007). How to use these algorithms in R is shown here. The datasets used are available in R itself, no need to download anything. Run data() to see the available datasets. Nothing is original here, everything was Googled, and no references are made to sources. The purpose of all this is to show how quickly you can prototype most algorithms with minimal code, in R.

1. C4.5

require(rJava) # needed for printing strings out of Java objects
require(RWeka) # contains the J48() function that builds C4.5 decision trees 
iris_c4.5 <- J48(Species ~ ., data=iris)
writeLines(rJava::.jstrVal(iris_C4.5$classifier))
@tdd
tdd / angular-just-say-no.md
Last active November 18, 2022 20:47
Angular: Just Say No

Angular: Just say no

A collection of articles by AngularJS veterans, sometimes even core committers, that explain in detail what's wrong with Angular 1.x, how Angular 2 isn't the future, and why you should avoid the entire thing at all costs unless you want to spend the next few years in hell.

Reason for this: I'm getting tired of having to explain to everyone, chief of which all the indiscriminate Google Kool-Aid™ drinkers, why I have never believed in Angular, why I think it'll publicly fail pretty soon now (a couple years), and why it's a dead end IMO. This gist serves as a quick target I can point people to in order not to have to parrot / compile the core of the articles below everytime. Their compounded reading pretty much captures 99% of my view on the topic.

This page is accessible through http://bit.ly/angular-just-say-no and http://bit.ly/angularjustsayno, btw.

@abelsromero
abelsromero / PdfSplitter.java
Created February 16, 2016 07:15
PDF splitter with Apache PDFBox ('org.apache.pdfbox:pdfbox:1.8.11')
import org.apache.pdfbox.exceptions.COSVisitorException;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.util.Splitter;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class PdfSplitter {

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?