Skip to content

Instantly share code, notes, and snippets.

View goyalankit's full-sized avatar
🏠
Working from home

Ankit Goyal goyalankit

🏠
Working from home
View GitHub Profile
#!/bin/bash
#----------------------------------------------------
# Example SLURM job script to run OpenMP applications
# on TACC's Stampede system.
#----------------------------------------------------
#SBATCH -J cdescent_openmp # Job name
#SBATCH -o final_scd_omp_g__galois_mnist_100000_0_0.001.o%j # Name of stdout output file(%j expands to jobId)
#SBATCH -e scd_omp_ggalois_mdealin_error_lambda_2_10000.o%j # Name of stderr output file(%j expands to jobId)
#SBATCH -p development # Submit to the 'normal' or 'development' queue
#SBATCH -N 1 # Total number of nodes requested (20 cores/node)
require 'csv'
require 'pry'
mega_company_hash = {}
case_number = 1
CSV.foreach("list1.csv", {:headers => false, col_sep: '|'}) do |row|
next if row[0].nil? || row[0] == ""
csv = "#{case_number}, #{row.join("|")}\n"
@goyalankit
goyalankit / compiler_notes_0.md
Last active September 6, 2021 14:16
Compiler notes.

####Lecture 1####

Compiler: Pre-processes the code -> executable + data -> run

Interpreter: data + code -> run

Fortran => Formula Translation -> First high level successful language

Modern compilers still preserve the outline of Fortran.

@goyalankit
goyalankit / README.md
Last active January 1, 2016 01:39
Images

This gist contains images. And are linked to other gists.

@goyalankit
goyalankit / docker_0.md
Last active October 11, 2019 13:51
Docker Commands

Docker cheatsheet.

  • To get the list of commands:

      $ docker
    
  • To search for images in docker index:

      $ docker search tutorial
    
#!/bin/bash
if ( test "$1" == "" ); then
echo "prefix of each image is empty.";
echo "Do you want to continue?";
read response;
if (( ("$response" != "y") || ("$response" != "Y") )); then
exit 1;
fi
fi
simple.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <main>:
0: 55 push %rbp
1: 48 89 e5 mov %rsp,%rbp
4: 48 83 e4 80 and $0xffffffffffffff80,%rsp
8: 48 81 ec 80 00 00 00 sub $0x80,%rsp
#Berkley db env variables
export JE_HOME=/Users/ankit/UT/sem2/database-systems/je-5.0.103
export CLASSPATH=$JE_HOME/lib/je-5.0.103.jar:$JE_HOME/examples

#compile
javac je/gettingStarted/*.java

#make the env directory
mkdir gsgEnv
@goyalankit
goyalankit / c
Created February 11, 2014 07:58
#!/usr/bin/env sh
VBM=VBoxManage
VMID=8f8d7a7e-7aba-466f-a28f-3cf87100a58e
start(){
$VBM startvm $VMID --type headless
}
stop() {
@goyalankit
goyalankit / results.md
Last active August 29, 2015 13:57
Results using the macpo compiler. Trace comparison.
simple loop with single variable being written + vectorization.
for(i=0; i<n; i++){
  c[i] = a[i] + b[i]
}