Skip to content

Instantly share code, notes, and snippets.

View fernandojunior's full-sized avatar

Fernando Felix fernandojunior

  • Brazil
View GitHub Profile
@fernandojunior
fernandojunior / gist:c526760375c1675c2df2b19fca77c0ed
Last active August 17, 2016 03:37
Learning curve, python, machine learming, training, validation, testing sets, grid search
# Source from: http://sachithdhanushka.blogspot.com.br/2013/09/learning-curve-generator-for-learning.html
# http://scikit-learn.org/stable/auto_examples/model_selection/plot_validation_curve.html
# http://scikit-learn.org/stable/modules/learning_curve.html
# http://scikit-learn.org/stable/auto_examples/model_selection/plot_learning_curve.html
# http://scikit-learn.org/stable/modules/generated/sklearn.learning_curve.learning_curve.html#sklearn.learning_curve.learning_curve
# http://scikit-learn.org/stable/modules/learning_curve.html
# http://www.astroml.org/sklearn_tutorial/practical.html
# http://stats.stackexchange.com/questions/95797/how-to-split-the-dataset-for-cross-validation-learning-curve-and-final-evaluat
# https://github.com/fernandojunior/udacity-machine-learning-nanodegree/blob/master/projects/boston_housing/boston_housing.ipynb
from sklearn.naive_bayes import GaussianNB
@fernandojunior
fernandojunior / gist:07be7370cb8fab4eff523b29a1863ad9
Last active September 3, 2016 05:28
selenium python phantomjs test script BeautifulSoup
# $ npm -g install phantomjs
# $ pip install selenium beautifulsoup4
# $ python
>>> from selenium import webdriver
>>> PATH = 'node_modules/phantomjs/lib/phantom/bin/phantomjs'
>>> browser = webdriver.PhantomJS(executable_path=PATH)
>>> # browser = webdriver.Chrome()
>>> browser.get('http://foo.bar')
>>> browser.execute_script("return ga.create().b.data.values[':trackingId']")
UA-64573082-1
@fernandojunior
fernandojunior / gist:4adfb04fde615eb6085aba2daf5e336e
Last active July 6, 2016 22:24
javascript workshop baby steps
https://github.com/sethvincent/javascripting
https://github.com/pselle/JSforeveryone
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide
http://nodeschool.io/
https://www.youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q
https://medium.com/@brunovincius/novas-features-do-es2016-es7-ddca30ddc73a#.tb5lwuf4p
http://todomvc.com/
https://github.com/timoxley/functional-javascript-workshop
https://kangax.github.io/compat-table/es6/
http://ccoenraets.github.io/es6-tutorial/
@fernandojunior
fernandojunior / gist:a92ab21e00c9f01440a99ed1aa2c298c
Last active August 28, 2016 21:28
Facebook bot machine learning text mining recommender system
scrapy
https://www.facebook.com/groups/python.brasil
https://gist.github.com/fernandojunior/2572a4ba93ba729a5db14a595cd02301
https://github.com/hzsweers/FB_Mod_Bot
http://scikit-learn.org/stable/modules/feature_extraction.html#text-feature-extraction
http://scikit-learn.org/stable/auto_examples/text/document_clustering.html
http://www.r-bloggers.com/clustering-search-keywords-using-k-means-clustering/
https://github.com/ujjwalkarn/DataSciencePython#text-mining-in-python
https://github.com/ujjwalkarn/DataSciencePython
https://www.facebook.com/groups/python.brasil/search/?query
@fernandojunior
fernandojunior / cluster_lines.py
Created June 30, 2016 00:53 — forked from amix/cluster_lines.py
Groups (clusters) similar lines together from a text file using k-means clustering algorithm.
"""
Groups (clusters) similar lines together from a text file
using k-means clustering algorithm.
Also does some simple cleaning (such as removing white space and replacing numbers with (N)).
Example:
python cluster_lines.py --clusters 20 invalid_dates.txt
@fernandojunior
fernandojunior / gist:3d028266c2e3a646770d35e9d85cbca6
Created June 29, 2016 02:07
static site blog cms generator
https://github.com/jekyll/jekyll
https://github.com/lektor/lektor/stargazers
https://github.com/hexojs/hexo
@fernandojunior
fernandojunior / gist:394f476580ffcb5c74e2d7b41b554171
Last active June 28, 2016 17:58
JavaScript para iniciantes
http://www.obomprogramador.com/2015/02/nova-video-palestra-tudo-o-que-voce.html
http://tableless.com.br/anotacoes-da-palestra-jaydson-gomes-16elw/
http://nodeschool.io/index.html#workshoppers
https://www.infoq.com/br/presentations/javascript-funcional
https://www.youtube.com/channel/UCKdo1RaF8gzfhvkOdZv_ojg
backend, frontend, database, functional programming, ide, desktop,
inglês, git/github, atom.io, node.js express, mondodb firebase, angular react vue, bootstrap, electron, prelude, npm bower, ionic phonegap
http://www.slideshare.net/Hugeinc/desenvolvimento-clientside-2016
https://github.com/klutometis/roxygen
https://github.com/gaborcsardi/maxygen
https://github.com/klutometis/roxygen/tree/444f5e39362ea956fa2dbbf6260cb1d5eede0828
http://stat545.com/packages00_index.html
https://hilaryparker.com/2014/04/29/writing-an-r-package-from-scratch/
http://stackoverflow.com/questions/9656016/how-to-install-development-version-of-r-packages-github-repository
@fernandojunior
fernandojunior / lambda.r
Created June 26, 2016 22:02 — forked from klmr/lambda.r
Finally a proper lambda for R
`<-` = function (body, params) {
vars = all.vars(substitute(params))
formals = as.pairlist(setNames(replicate(length(vars), quote(expr = )), vars))
eval.parent(call('function', formals, substitute(body)))
}
sapply(1 : 4, x -> 2 * x)
# 2 4 6 8
mapply(x ~ y -> x + y,
http://www.unixstickers.com/
http://www.pythongear.com/
https://github.myshopify.com/