Skip to content

Instantly share code, notes, and snippets.

View josealvarez97's full-sized avatar
Playing soccer

José Alvarez C. josealvarez97

Playing soccer
  • San Francisco, California
View GitHub Profile
@bradtraversy
bradtraversy / docker_wordpress.md
Last active April 23, 2024 20:57
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@abhishekjakhar
abhishekjakhar / style.css
Last active June 29, 2019 16:41
Gallery With Grid's CSS File
*,
*::after,
*::before {
margin: 0;
padding: 0;
box-sizing: inherit;
}
html {
box-sizing: border-box;
@abhishekjakhar
abhishekjakhar / index.html
Created December 9, 2018 08:08
Image Gallery With Grid's
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://fonts.googleapis.com/css?family=Josefin+Sans:300,400,400i|Nunito:300,300i" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" type="image/png" href="img/favicon.png">
@diamonaj
diamonaj / CS112_11_1_1.R
Last active March 25, 2019 02:17
Breakout1
# If you are copy/pasting this to an R Notebook, select "Raw" from the GitHub page before you copy.
# Replication file of Section 5 in
# Iacus, King, Porro (2011), Multivariate Matching Methods
# That Are Monotonic Imbalance Bounding, JASA, V 106, N. 493,
# p. 345-361
foo <- read.csv(url("https://course-resources.minerva.kgi.edu/uploaded_files/mke/00089202-1711/daughters.csv"))
# Table 1 in Ebonya
# https://tinyurl.com/y9syodxg
rm(list=ls())
library(Matching
)
library(foreign)
foo <- read.csv("https://course-resources.minerva.kgi.edu/uploaded_files/mke/00087718-6996/dw-data.csv")
X = cbind(foo$age, foo$education, foo$black, foo$re75, foo$re74)
sink("transcript.txt", split = TRUE)
cat(getwd(), "\n")
rm(list=ls())
library(foreign)
foo <- read.csv("https://course-resources.minerva.kgi.edu/uploaded_files/mke/00087718-6996/dw-data.csv")
X = cbind(foo$age, foo$education, foo$black, foo$hispanic, foo$married, foo$nodegree, foo$re75, foo$re74)
Spring 2019
*****INSTRUCTIONS*****
(1) Debugging--in the 3 cases below (a through c), identify the major coding error in each case and explain how to fix it, in 1-2
sentences. DO NOT actually copy/paste corrected code:
(a) https://gist.github.com/diamonaj/2e5d5ba5226b7b9760f5d1bf1e7bf765
(b) https://gist.github.com/diamonaj/3b6bc83d040098486634184d99fc4c55
# Comparison of logicals
TRUE == FALSE
# Comparison of numerics
-6 * 14 != 17 - 101
# Comparison of character strings
"useR" == "user"
# Compare a logical with a numeric
PEACEKEEPING WORKOUT (based on King, Gary;Zeng, Langche, 2007,
"Replication data for: When Can History be Our Guide?
The Pitfalls of Counterfactual Inference",
https://hdl.handle.net/1902.1/DXRXCFAWPK,
Harvard Dataverse, V4,
UNF:3:DaYlT6QSX9r0D50ye+tXpA== [fileUNF] )
# CONSIDER USING THE JUPYTER NOTEBOOK WITH R-SERVER KERNEL (NEVER R-SAGE KERNEL)
foo <- read.csv("https://course-resources.minerva.kgi.edu/uploaded_files/mke/00086677-3767/peace.csv")
# extract relevant columns
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.