start new:
tmux
start new with session name:
tmux new -s myname
# ============================================ | |
# Upload → Unit-Type Map → Parse Rent Rolls → Elasticity | |
# (one-cell Colab script; generic across properties) | |
# ============================================ | |
import sys, io, re, json | |
from pathlib import Path | |
import numpy as np | |
import pandas as pd | |
from google.colab import files |
# ========================================= | |
# All-in-One Colab: Price Elasticity by Unit Type (with autoscaling dropdowns) | |
# ========================================= | |
# Upload -> Parse (Yardi two-row header) -> Build panel -> Estimate elasticities | |
# Primary: Logit (occupied ~ log(price) + month FE), cluster-robust by unit | |
# Fallback: Aggregated OLS (monthly occ_rate ~ log(avg_price)), HC1 robust | |
# 95% CIs, CSV exports, interactive charts | |
# Group dashboards: by Unit Size, Renovation (Classic/PR/CR), and Price Tier (Low/Med/High) | |
# Includes dropdown autoscale patch so switching views always shows data. |
for i in `seq 1 100`; do curl $URL; done | |
## With basic HTTP auth | |
for i in `seq 1 100`; do curl -u username:password $URL; done |
package main | |
imports ( | |
"path/filepath" | |
"strings" | |
"github.com/gorilla/mux" | |
) | |
func main() { | |
server_port := ":3000" |
awk 'FNR==1 && NR!=1{next;}{print}' *.csv > newfile.csv |
#See which files in / are taking up space | |
du -md1 / | sort -n | |
#better way to see which directories in / are taking up space. | |
ncdu -x / | |
#Clean pacman cache | |
pacman -Scc |
#Build image from Dockerfile in same directory. | |
docker build --rm=true -t go_playground . | |
#Run docker image in a container with interactive shell connecting /go on my host machine to /go in docker container | |
# has name go-playgound and is ran from image go_playground. | |
sudo docker run -ti -p 9000:9000 -v /home/cody/projects/go:/go --name=go-playground go_playground /bin/bash -l | |
#Turns out that you don't need we don't need bin/bash. Line 52 in the dockerfile does that | |
#with no command at the end, it automatically uses what's in CMD in the docker file. | |
#Sometimes you still have to add the command on my setup for some reason though |
#create the data/volume container | |
docker run -v /var/lib/pgsql/data -v /home/cody/projects/warrantygenius:/var/www --name=wg_storage ubuntu true | |
#Build postgres image from within the dockerfile directory | |
docker build --rm=true -t wg_postgres . | |
#Create and run postgres container from the image | |
docker run -d --name=wg-postgres --volumes-from=wg_storage wg_postgres | |
#Build ruby image. rm clears cache? and -t tags it as that name |
# Create ghost volume to store our data | |
docker run -v ghost-storage:/ghost-override --name=ghost-storage ubuntu true | |
# Create site volume | |
dockur run -v incoin.io:/var/www/incoin.io --name=site-storage ubuntu true | |
#Create nginx volume to store sites-enabled, logs and certs | |
docker run -v nginx/logs:/var/log/nginx -v certs:/etc/nginx/certs -v sites-enabled:/etc/nginx/sites-enabled --name=nginx-storage ubuntu true | |
# Start the ghost daemon using volume from ghost-storage |