This file contains 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 <iostream> | |
using namespace std; | |
class AbstractBase{ | |
public: | |
virtual void virtfunc(void) = 0; | |
void regfunc(void); | |
}; | |
class ConcreteBase{ |
This file contains 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 | |
passwdPattern="(\w+ ){1,3}\w+" | |
finalCmds=false | |
while getopts u arg; do | |
case $arg in | |
u) | |
passwdPattern="^\w+.*(\w+ ){1,3}\w+" | |
finalCmds=true |
This file contains 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
#put me in your .$(SHELL)rc file | |
if [ -z "$(tokens | grep AFS)" ]; then | |
kinit -l 30d | |
aklog | |
fi |
This file contains 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 <iostream> | |
#include <vector> | |
template<typename T> | |
class container{ | |
public: | |
container(); | |
T* begin(); | |
T* end(); | |
void push_back(T); |
This file contains 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
''' | |
' paint.py | |
' | |
' Simulate the "fill color" operation of | |
' programs like MS with lists. | |
' | |
' Will Badart | |
' SEP 2016 | |
' | |
''' |
This file contains 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){ | |
printf("char: %d\n", sizeof(char)); | |
printf("short: %d\n", sizeof(short)); | |
printf("int: %d\n", sizeof(int)); | |
printf("long: %d\n", sizeof(long)); | |
printf("long long: %d\n", sizeof(long long)); | |
printf("float: %d\n", sizeof(float)); | |
printf("double: %d\n", sizeof(double)); |
This file contains 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
FROM bvlc/caffe:gpu | |
RUN git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose.git | |
RUN cd openpose && mkdir -p build && cd build \ | |
&& cmake -DBUILD_CAFFE=OFF -DBUILD_PYTHON=ON \ | |
-DCaffe_INCLUDE_DIRS="/opt/caffe/include;/opt/caffe/build/include;" \ | |
-DCaffe_LIBS=/opt/caffe/build/lib/libcaffe.so .. \ | |
&& make && make install | |
RUN pip install opencv-python | |
CMD bash |
This file contains 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
N=1000000 | |
M=1000000 | |
M2=1000001 | |
compare: node.o compare.o main.o | |
$(CC) $^ -o $@ | |
compare_tail: node.o compare_tail.o main.o | |
$(CC) $^ -o $@ |
This file contains 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
module Graph where | |
import Data.Function (on) | |
import Data.List (deleteBy) | |
data Edge v id_ payload = Edge (v, v) id_ payload | |
deriving Show | |
data Graph v id_ payload = Graph [v] [Edge v id_ payload] | |
deriving Show |
This file contains 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
module Main where | |
import Data.Probability | |
main :: IO () | |
main = do | |
s <- readLn | |
case probability s of | |
-- This pattern match wouldn't work w/o PatternSynonyms | |
-- (you could still pattern match on the Maybe, but not on |
OlderNewer