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
#!/usr/bin/env python | |
import sys | |
import os | |
import re | |
import shlex | |
import subprocess as sp | |
def main(): | |
lines = sp.Popen(['ps', '-elf'], stdout=sp.PIPE).communicate()[0] |
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> | |
#include <cuda.h> | |
#include <cuda_runtime.h> | |
int main (int argc, char *argv[]) | |
{ | |
void *a_d; | |
MPI_Init (&argc, &argv); | |
cudaSetDevice(0); | |
printf("hello\n"); | |
cudaError_t ierr = cudaMalloc( (void **) &a_d, 1000); |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("mail.google.com") { | |
/* GMail messages and textarea should use fixed-width font */ | |
.gs .ii, .textarea, textarea.Ak, .editable, .LW-af { | |
font-family: MonoSpace !important; | |
} | |
} |
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
--- Makefile.system 2010-01-28 15:11:08.000000000 -0500 | |
+++ Makefile.system.deac 2013-01-14 11:09:56.280298528 -0500 | |
@@ -278,9 +278,9 @@ | |
ifeq ($(C_COMPILER), PGI) | |
ifdef BINARY64 | |
-CCOMMON_OPT += -tp p7-64 | |
+CCOMMON_OPT += -tp nehalem-64 | |
else | |
-CCOMMON_OPT += -tp p7 |
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
(*Actions.scpt | |
Intended for use as a template for context menu script actions | |
*) | |
--and here's how you save preferences | |
property prefs : missing value | |
property prefsPath : missing value | |
using terms from application "Colloquy" | |
on build contextual menu for item blah |
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> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <sys/resource.h> | |
void print_rlims(char* name, struct rlimit* const rl) | |
{ | |
if (rl->rlim_cur == RLIM_INFINITY) |
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
#!/usr/bin/env python | |
# vim: set fileencoding=utf-8 : | |
import sys | |
import os | |
import re | |
import subprocess | |
def turn_off_tp(tp_id): | |
subprocess.check_call(["xinput", "--disable", tp_id]) |
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
void cylon() { | |
int delayTime = 50; | |
for (int i = 0; i < 8; ++i) { | |
digitalWrite(ledPins[i], HIGH); | |
delay(delayTime); | |
digitalWrite(ledPins[i], LOW); | |
} | |
for (int i = 0; i < 8; ++i) { | |
digitalWrite(8-ledPins[i], HIGH); |
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
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
#Operation | Latency (ns) | Comment | |
---|---|---|---|
L1 cache reference | 0.5 | ||
Branch mispredict | 5 | ||
L2 cache reference | 7 | 14x L1 cache | |
Mutex lock/unlock | 25 | ||
Main memory reference | 100 | 20x L2 cache 200x L1 cache | |
Compress 1K bytes with Zippy | 3000 | ||
Send 1K bytes over 1 Gbps network | 10000 | ||
Read 4K randomly from SSD | 150000 | ~1GB/sec SSD | |
Read 1 MB sequentially from memory | 250000 |
OlderNewer