Skip to content

Instantly share code, notes, and snippets.

View mwufi's full-sized avatar
🗾
sf

CZ Tang mwufi

🗾
sf
View GitHub Profile
@mwufi
mwufi / computation-log.txt
Last active July 23, 2022 02:18
OpenFisca Core Simulation
Code:
from IPython.display import Markdown
from time import time
from openfisca_core.tracers import FullTracer
from openfisca_us import Microsimulation
s = Microsimulation()
# allow tracing of the simulation
# Note that the Microsimulation actually WRAPS the other one!!
@mwufi
mwufi / install_docker_in_colab.sh
Last active October 2, 2025 17:59
Install Docker in Google Colab!
# First let's update all the packages to the latest ones with the following command
sudo apt update -qq
# Now we want to install some prerequisite packages which will let us use HTTPS over apt
sudo apt install apt-transport-https ca-certificates curl software-properties-common -qq
# After that we will add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# We will add the Docker repository to our APT sources

Here's my file

I'm just looking for a way to create a webpage with one click.

This might be it

Why should I play bloons td battles???

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import sys
from pycolab import ascii_art
from pycolab import human_ui
m <- function(x){
if (-1 <= x && x < -0.5)
(x+2)^2/2
else if (x < 0)
x/2 + 0.875
else if (x < 0.5)
-5*(x-0.2)^2 + 1.075
else if (x < 1)
x + 0.125
@mwufi
mwufi / test.r
Created November 12, 2017 20:42
Create vocabulary and document-term matrix using text2vec
get_dtm <- function(movie_review){
setDT(movie_review)
setkey(movie_review, id)
# vectorization
prep_fun = function(x) {
x %>%
# make text lower case