Dear all Github friends,
I moved this gist to the Github repository.
Following this repository https://github.com/nijicha/install_nodejs_and_yarn_homebrew
| class Lazy: | |
| def __init__(self, fun, *args, **kwargs): | |
| self.fun = fun | |
| self.args = args | |
| self.kwargs = kwargs | |
| self.executed = False | |
| self.value = None | |
| # Binary Operators | |
| def __binary__(self, binfun, other): |
| class Python < Formula | |
| desc "Interpreted, interactive, object-oriented programming language" | |
| homepage "https://www.python.org/" | |
| url "https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tar.xz" | |
| sha256 "a9e0b79d27aa056eb9cce8d63a427b5f9bab1465dee3f942dcfdb25a82f4ab8a" | |
| head "https://github.com/python/cpython.git" | |
| license "Python-2.0" | |
| revision 1 | |
| bottle do |
| library(shiny) | |
| library(dplyr) | |
| library(ggplot2) | |
| library(babynames) | |
| size <- 25 | |
| colors <- c("F" = "#DE94AF", "M" = "#6C939F", "X" = "#D4C62A") | |
| ui <- fluidPage( | |
Dear all Github friends,
I moved this gist to the Github repository.
Following this repository https://github.com/nijicha/install_nodejs_and_yarn_homebrew
| def try_except(func): | |
| """Try/Except decorator - takes as input a function, and outputs | |
| a modified version of that function whose first argument is how | |
| many times you want to re-run the function if any exception is | |
| raised. | |
| """ | |
| def try_except_function(num_tries, *args, **kwargs): | |
| """Modified version of func - see docstring for try_except(). | |
| """ | |
| for i in range(num_tries): |
| # derived from http://scikit-learn.org/stable/auto_examples/applications/topics_extraction_with_nmf_lda.html | |
| # explanations are located there : https://www.linkedin.com/pulse/dissociating-training-predicting-latent-dirichlet-lucien-tardres | |
| from sklearn.feature_extraction.text import CountVectorizer | |
| from sklearn.decomposition import LatentDirichletAllocation | |
| import pickle | |
| # create a blank model | |
| lda = LatentDirichletAllocation() |
| # $ brew install pyenv #pay attention to caveats ($ brew info pyenv) | |
| # $ brew install pyenv-virtualenv | |
| # this goes into .zshrc | |
| export PYENV_ROOT=/usr/local/var/pyenv | |
| if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi | |
| if which pyenv-virtualenv-init > /dev/null; then eval "$(pyenv virtualenv-init -)"; fi |
| # import config. | |
| # You can change the default config with `make cnf="config_special.env" build` | |
| cnf ?= config.env | |
| include $(cnf) | |
| export $(shell sed 's/=.*//' $(cnf)) | |
| # import deploy config | |
| # You can change the default deploy config with `make cnf="deploy_special.env" release` | |
| dpl ?= deploy.env | |
| include $(dpl) |
| # virtualenvwrapper | |
| # lazy loading saves on shell startup time | |
| workon() { | |
| [ -z "$PROJECT_HOME" ] && { | |
| unset -f workon; | |
| export WORKON_HOME=$HOME/.virtualenvs; | |
| export PROJECT_HOME=$HOME/Documents/Python; | |
| source /usr/local/bin/virtualenvwrapper.sh | |
| } | |
| workon "$@" |
| #!/usr/bin/env ruby | |
| # A small ruby script to extract a git history to a tikz picture | |
| # Author: Michael Hauspie <Michael.Hauspie@lifl.fr> | |
| # Author: Lennart C. Karssen <lennart@karssen.org> | |
| # | |
| # Not clean code, not always working well, but does its job in most of | |
| # the cases I needed :) | |
| # | |
| # LCK: Added some ideas from this tex.stackexchange answer: |