Skip to content

Instantly share code, notes, and snippets.

@jmsktm
jmsktm / normcore-llm.md
Created September 1, 2023 13:21 — forked from veekaybee/normcore-llm.md
Normcore LLM Reads
@jmsktm
jmsktm / README.md
Created March 19, 2020 19:08 — forked from BretFisher/README.md
Simple Apache + Nginx Reverse Proxy Example in Docker Compose
  1. download these two files to the same directory
  2. docker-compose up
  3. http://localhost should show you "it works" which is apache being reverse-proxied through nginx
  4. docker sets up DNS for web based on compose service name so the nginx front-end can find http://web
  5. proxy is set to listen on public port 80 on host so it'll receive incoming traffic, then push to httpd
#!/usr/bin/env python3
import os
path = "/home/james/Github"
def exec(command):
print("Executing Command: {}".format(command))
os.system(command)
def main():
@jmsktm
jmsktm / capstone-setup-james2.sh
Last active May 7, 2019 06:54
capstone-setup-james2.sh
#!/bin/bash
#Setup base paths
WORKSPACE_PATH="/home/student/capstone_ws"
PROJECT_NAME="project"
# Setup the base repository
rm -rf $WORKSPACE_PATH
mkdir -p $WORKSPACE_PATH && cd $WORKSPACE_PATH
git clone https://github.com/jmsktm/T2-CapstoneProject.git $PROJECT_NAME
@jmsktm
jmsktm / capstone-setup-mariam.sh
Last active May 7, 2019 05:29
Script to setup Mariam's repo
echo 'deb http://http.debian.net/debian wheezy-backports main' > /etc/apt/sources.list.d/wheezy-backports-main.list
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
apt -y install git-lfs
#Setup base paths
WORKSPACE_PATH="/home/workspace/capstone_ws"
PROJECT_NAME="T2-CapstoneProject"
# Setup the base repository
rm -rf $WORKSPACE_PATH
@jmsktm
jmsktm / setup_capstone_project.sh
Last active May 5, 2019 01:24
setup capstone project
#!/bin/bash
#Setup base paths
WORKSPACE_PATH="/home/workspace/capstone_ws"
PROJECT_NAME="project"
# Setup the base repository
rm -rf $WORKSPACE_PATH
mkdir -p $WORKSPACE_PATH && cd $WORKSPACE_PATH
git clone https://github.com/jmsktm/T2-CapstoneProject.git $PROJECT_NAME
#!/bin/bash
WORKSPACE_PATH="/home/workspace/capstone_ws"
PROJECT_NAME="project"
rm -rf $WORKSPACE_PATH
mkdir -p $WORKSPACE_PATH && cd $WORKSPACE_PATH
git clone https://github.com/jmsktm/T2-CapstoneProject.git $PROJECT_NAME
cd $PROJECT_NAME
@jmsktm
jmsktm / capstone-setup.sh
Created May 4, 2019 04:33
Script to setup the workspace for Udacity's Self Driving Car capstone project
pip install --upgrade pip
sudo apt-get update
sudo apt-get install python-catkin-pkg -y
pip install matplotlib
cd /home/workspace/CarND-Capstone/ros
catkin_make
source devel/setup.sh
roslaunch launch/styx.launch
# Procedure to install NVIDIA driver, Cuda and cuDNN
# Run update first
sudo apt-get update
echo '\n\n#### Processor:'
cat /proc/cpuinfo | grep 'model name' | uniq | cut -d ":" -f2 | awk '{$1=$1};1'
# AMD Ryzen Threadripper 2950X 16-Core Processor
echo '\n#### Linux version:'
"""
This function takes hough lines as input, and uses the information
to arrive at two straight lanes which correspond to the left and
the right lanes.
"""
def final_lines(lines, video_width, ymin, ymax):
# Find the middle of screen (widthwise). We will use this to determine
# whether a line/coordinate will be used to generate the left or
# the right lane