This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <inttypes.h> | |
#include <assert.h> | |
#include <x86intrin.h> | |
typedef struct Rect { | |
int32_t lx, ly, rx, ry; | |
} Rect; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
python ./diff-img.py lhs.jpg rhs.jpg | |
""" | |
import numpy as np | |
import sys | |
from PIL import Image | |
def rgb(minimum, maximum, value): | |
minimum, maximum = float(minimum), float(maximum) | |
ratio = 2 * (value-minimum) / (maximum - minimum) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: pi | |
pi: pi.c | |
gcc-4.8 -Wall -std=c99 -O2 pi.c -o pi-4.8 | |
gcc-5 -std=c99 -O2 pi.c -o pi-5 | |
gcc-6 -std=c99 -O2 -march=native -msse -mavx pi.c -o pi-6 | |
gcc-4.8 -Wall -std=c99 -O2 -msse -msse2 -mavx pi-sse.c -o pi-sse | |
clang-3.8 -O2 pi.c -o pi-clang | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install gcc-4.9 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50 | |
sudo apt-get install g++-4.9 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"rulers":[72], | |
"word_wrap": true, | |
"spell_check": true, | |
"dictionary": "Packages/Language - English/en_US.dic" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#ifdef _WIN64 | |
#include <windows.h> | |
#else | |
#include <unistd.h> | |
#endif | |
using namespace std; | |
void do_timecomsuming_work() { | |
#ifdef _WIN64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\begin{tikzpicture}[scale=0.4,font=\sffamily] | |
\begin{axis}[ | |
xlabel={Processor $p$}, | |
ylabel={Time (second)}, | |
xmin=1, xmax=16, | |
ymin=0, ymax=1.2, | |
scaled ticks = false, | |
tick label style={/pgf/number format/fixed}, | |
xtick={1, 2, 4, 8, 16}, | |
ytick={0, 0.2, 0.4, 0.6, 0.8, 1, 1.2}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(void) | |
{ | |
int a[101][101]={0},n,i,j,k,A=0,B=0,C=0,D=0; | |
scanf("%d",&n); | |
for(i=1;i<=n;i++) | |
{ | |
for(j=1;j<=n;j++) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TEXT_RED=`tput setaf 1` | |
TEXT_GREEN=`tput setaf 2` | |
TEXT_RESET=`tput sgr0` | |
CONFIG_FILE=nvvp.cfg | |
if [ ! -f $CONFIG_FILE ]; | |
then | |
echo "[ERROR] Profile config file ${TEXT_RED}nvvp.cfg${TEXT_RESET} does not exist." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TEXT_RED=`tput setaf 1` | |
TEXT_GREEN=`tput setaf 2` | |
TEXT_RESET=`tput sgr0` | |
CONFIG_FILE=nvvp.cfg | |
if [ ! -f $CONFIG_FILE ]; | |
then | |
echo "[ERROR] Profile config file ${TEXT_RED}nvvp.cfg${TEXT_RESET} does not exist." |