Skip to content

Instantly share code, notes, and snippets.

Avatar

Radhika Ghosal RadhikaG

View GitHub Profile
View llvm_setup_session.sh
#!/bin/bash
# See: https://llvm.org/docs/GettingStarted.html
# Download this script onto your home directory, ie. whatever is $HOME for you.
# outputs all the commands run to stdout
set -x
echo $HOME
View mnemonic_table_snippet.cpp
static const char *const MnemonicTable =
"\003aaa\003aad\003aam\003aas\003adc\004adcb\004adcl\004adcq\004adcw\004"
"adcx\005adcxl\005adcxq\003add\004addb\004addl\005addpd\005addps\004addq"
"\005addsd\005addss\010addsubpd\010addsubps\004addw\004adox\005adoxl\005"
"adoxq\006aesdec\naesdeclast\006aesenc\naesenclast\006aesimc\017aeskeyge"
"nassist\003and\004andb\004andl\004andn\005andnl\006andnpd\006andnps\005"
"andnq\005andpd\005andps\004andq\004andw\004arpl\005bextr\006bextrl\006b"
"extrq\007blcfill\004blci\005blcic\006blcmsk\004blcs\007blendpd\007blend"
"ps\010blendvpd\010blendvps\007blsfill\004blsi\005blsic\005blsil\005blsi"
"q\006blsmsk\007blsmskl\007blsmskq\004blsr\005blsrl\005blsrq\005bndcl\005"
View X86MachineInstrPrinter.cpp
#include "X86.h"
#include "X86InstrInfo.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/Target/TargetRegisterInfo.h"
using namespace llvm;
#define X86_MACHINEINSTR_PRINTER_PASS_NAME "Dummy X86 machineinstr printer pass"
@RadhikaG
RadhikaG / Crime Data Visualization-Blog Version.ipynb
Created January 24, 2016 20:38
An IPython notebook for visualizing crime data for India, the United States, France, and the Netherlands.
View Crime Data Visualization-Blog Version.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RadhikaG
RadhikaG / heapClass.py
Last active December 13, 2017 04:04
A class to demonstrate the different operations on heaps.
View heapClass.py
def parent(i):
return i/2
def left(i):
return 2*i
def right(i):
return (2*i + 1)
class Heap:
@RadhikaG
RadhikaG / heap.py
Last active December 13, 2016 13:57
A short script to demonstrate the different operations on heaps.
View heap.py
global heap
global currSize
def parent(i): #returns parent index of ith index
return i/2
def left(i): #returns left child of ith index
return 2*i
def right(i): #returns right child of ith index