Skip to content

Instantly share code, notes, and snippets.

View murattasdemir's full-sized avatar

Murat Taşdemir murattasdemir

View GitHub Profile
@murattasdemir
murattasdemir / python.md
Created October 31, 2022 17:01 — forked from eyeseast/python.md
How to set up Python in 2022

Python

This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.

Tools and helpful links:

The output from instantiate in Julia 1.7.1 macaarch64 macOS 12.6

The whole repo is available here

(quantecon-notebooks-julia) pkg> instantiate
   Installed Calculus ───────────────────────── v0.5.1
   Installed JpegTurbo_jll ──────────────────── v2.1.0+0
   Installed x265_jll ───────────────────────── v3.5.0+0
   Installed libfdk_aac_jll ─────────────────── v2.0.2+0
@murattasdemir
murattasdemir / makefile
Created February 23, 2022 08:52 — forked from bquistorff/makefile
Makefile for a Stata project
# If you don't list all dependencies for code (because maybe it varies programmatically) then you can force a remake by doing 'make -B <target>. Note that it will remake all dependencies!
#nice-ness. Uncomment a line to enable. Default is +10
#nice_prefix := nice
#nice_prefix := nice -n10
############################# Project-specific Entries ####################
# which entries use parallel and need a windows gateway
# from $grep -r eval_synth . --include="*.do"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@murattasdemir
murattasdemir / fwl.do
Created October 28, 2021 20:10 — forked from zilinskyjan/fwl.do
Demonstrating the Frisch–Waugh–Lovell theorem in Stata
clear
set seed 10009
set obs 100
gen x1 = rnormal()
* Induce positive correlation between x1 and x2
gen x2 = rnormal() + .2*x1
* TRUE data-generating process
gen y = 1 + x1 + 5*x2 + rnormal()
@murattasdemir
murattasdemir / app.R
Created February 3, 2021 19:05 — forked from christopherlovell/app.R
Shiny dynamic UI elements
library(shiny)
server <- function(input, output) {
output$input_ui <- renderUI({
num <- as.integer(input$num)
lapply(1:num, function(i) {
numericInput(paste0("n_input_", i), label = paste0("n_input", i), value = 0)
})
})
@murattasdemir
murattasdemir / terminal-git-branch-name.md
Created September 13, 2019 09:09 — forked from joseluisq/terminal-git-branch-name.md
Add Git Branch Name to Terminal Prompt (Mac)

Add Git Branch Name to Terminal Prompt (Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@murattasdemir
murattasdemir / tables.R
Last active October 23, 2018 17:28
Alternative ways of generating tables and saving as an image file to import into a Word document
# Function to create png tables from data
# By Michael Yan.
table.png <- function(obj, name) {
first <- name
name <- paste(name,".tex",sep="")
sink(file=name)
cat('
\\documentclass{report}
\\usepackage[paperwidth=5.5in,paperheight=7in,noheadfoot,margin=0in]{geometry}
\\begin{document}\\pagestyle{empty}