Skip to content

Instantly share code, notes, and snippets.

@jmsktm
jmsktm / LICENSE.txt
Last active August 29, 2015 14:26 — forked from aemkei/LICENSE.txt
Binary Tetris - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
var base_url = 'http://www.meroawaaz.com:8080';
(function () {
function log(s) {
if(window.console && window.console.firebug) {
console.log(s);
}
var log_container = document.getElementById('classified-log-container');
if (log_container) {
var text = document.createTextNode(s);
@jmsktm
jmsktm / sample_map.html
Last active February 27, 2024 15:33
Sample map with multiple markers
<html>
<head></head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<div id="map_wrapper">
<div id="map_canvas" class="mapping"></div>
</div>
<style type="text/css">
#map_wrapper {
@jmsktm
jmsktm / WordCloud.r
Last active November 26, 2022 20:56
WordCloud in R
#install.packages("tm", repos="http://cran.rstudio.com/")
#install.packages("twitteR", repos="http://cran.rstudio.com/")
#install.packages("wordcloud", repos="http://cran.rstudio.com/")
library("tm")
library("twitteR")
library("wordcloud")
CONSUMER_KEY = '<CONSUMER_KEY>'
CONSUMER_SECRET = '<CONSUMER_SECRET>'
<coordinator-app name="test74" start="${cordStartTime}" end="${cordEndTime}" frequency="${coord:minutes(45)}" timezone="UTC" xmlns="uri:oozie:coordinator:0.4">
<controls>
<timeout>10</timeout>
<concurrency>1</concurrency>
<execution>FIFO</execution>
<throttle>${materialization_throttle}</throttle>
</controls>
<datasets>
<dataset name="hadoopExamInput" frequency="${coord:minutes(45)}" initial-instance="cordStartTime" timezone="${timeZoneUsed}">
<uri-template>${dirToCheck}</uri-template>
"""
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
# 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:'
@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
#!/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 / 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