Skip to content

Instantly share code, notes, and snippets.

import subprocess
import os
file_list = subprocess.check_output('ls *.c', shell=True)
names = [file for file in file_list.split("\n")] # file.split(".c\n")
name_list = [file.split(".")[0] for file in names]
for name in name_list:
os.system("gcc -o "+name+" "+name+".c")
//
// strrev.c
//
#include <string.h>
#include <stdio.h>
//
// Reverses the given string in place (i.e., the original string is
// effectively destroyed). Returns a pointer to the new string.
//
// This is a custom extension, not part of the C99 standard.
import time
import os
import subprocess
import urllib
basename = "pic"
extension = ".jpg"
count=0
old_url = ""
#!/usr/bin/python
import sys
import os
data = sys.stdin.read()
basename = "pic"
extension = ".jpg"
number=0
@kylelk
kylelk / -
Created October 23, 2013 23:15
hello world
#include <stdio.h>
typedef char pin_t;
#define IN const pin_t *
#define OUT pin_t *
#define PIN(X) pin_t _##X; pin_t *X = & _##X;
#define V(X) (*(X))
#define NOT(X) (~(X)&1)
#include <stdio.h>
typedef char pin_t;
#define IN const pin_t *
#define OUT pin_t *
#define PIN(X) pin_t _##X; pin_t *X = & _##X;
#define V(X) (*(X))
#define NOT(X) (~(X)&1)
#include <stdio.h>
typedef char pin_t;
#define IN const pin_t *
#define OUT pin_t *
#define PIN(X) pin_t _##X; pin_t *X = & _##X;
#define V(X) (*(X))
/* a NOT that does not soil the rest of the host of the single bit */
#define NOT(X) (~(X)&1)
#include <stdio.h>
typedef char pin_t;
#define IN const pin_t *
#define OUT pin_t *
#define PIN(X) pin_t _##X; pin_t *X = & _##X;
#define V(X) (*(X))
/* a NOT that does not soil the rest of the host of the single bit */
#define NOT(X) (~(X)&1)
#number1 = "98530935890435805894590843590845"
#number2 = "84309348903483049834098340983400"
number1 = "100"
number2 = "100"
number1 = '{0:b}'.format(int(number1))
number2 = '{0:b}'.format(int(number2))
count = len(number1)