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
// an int completely represents the state of the universe, position of all particles, velocities, whatever is needed to perfectly recreate it exactly. | |
// strictly deterministic | |
int sd_step(int currentUniverse) { | |
return currentUniverse + 2; // magical constant | |
} | |
void sd_universe() { | |
int universe = 0; | |
while(true) { |
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 | |
print=0 | |
while read line; do | |
echo "CERR: $line" 1>&2 | |
if [[ "$(echo $line | cut -d':' -f3)" == "opencyc_jac" ]]; then | |
echo "CERR: to cyc: $(echo "$line" | cut -d':' -f4-)" 1>&2 | |
echo "$line" | cut -d':' -f4- | |
fi | |
done | ./run-cyc.sh | while read oline; do |
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
#ifndef MAP_ITERATOR_H | |
#define MAP_ITERATOR_H | |
// Various locations an iterator can be at currently | |
typedef enum { IT_BEGIN, IT_END, IT_NODE, IT_INVALID } IteratorType; | |
#endif /* MAP_ITERATOR_H */ |
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
/* index of po2 works as follows: | |
po2[0] is base ^ 2^0 | |
po2[1] is base ^ 2^1 | |
po2[2] is base ^ 2^2 | |
... | |
po[i] is base ^ 2^i | |
*/ | |
int power(int base, int exp) { | |
int n = (exp+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> | |
#include <string.h> | |
#include <sys/types.h> | |
int decodeString(char *str) { | |
int res = 0, p10 = 1; | |
for(ssize_t i = strlen(str) - 1; i >= 0; --i) | |
res += (str[i] - '0') * p10, p10 *= 10; | |
return res; | |
} |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include "gmp.h" | |
#define positive true | |
#define negative false | |
#define byte uint8_t |
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 <stdbool.h> | |
int main(int argc, char **argv) { | |
char *fileName = argv[1]; | |
FILE *file = fopen(fileName, "r"); | |
char c; | |
while(true) { | |
int ret = fscanf(file, "%c", &c); | |
if(ret == EOF || feof(file)) |
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
>>+++++++>>++>>++++>>+++++++>>+>>++++>>+>>+++>>+>>+++++>>+>>++>>+>>++++++>>++>>++++>>+++++++>>+>>+++++>>++>>+>>+>>++++>>+++++++>>+>>+++++>>+>>+>>+>>++++>>+++++++>>+>>+++++>>++++++++++++++>>+>>+>>++++>>+++++++>>+>>+++++>>++>>+>>+>>++++>>+++++++>>+>>+++++>>+++++++++++++++++++++++++++++>>+>>+>>++++>>+++++++>>+>>+++++>>++>>+>>+>>+++++>>+>>++++++>>+>>++>>+>>++++++>>+>>++>>+>>++++++>>+>>++>>+>>++++++>>+>>++>>+>>++++++>>+>>++>>+>> |
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
JOIN #uakroncs | |
:[email protected] JOIN :#uakroncs | |
:concrete.slashnet.org 332 jjjjjjjj #uakroncs :http://acm.cs.uakron.edu | ACM General Assembly Meetings Wednesday @ 4:15PM in CAS 254 | Accepting Donations for Child's Play 2012 : http://acm.cs.uakron.edu/childsplay | |
:concrete.slashnet.org 333 jjjjjjjj #uakroncs Nybbles 1353902680 | |
:concrete.slashnet.org 353 jjjjjjjj = #uakroncs :jjjjjjjj DrChickenSalad42 apajx EArndt zb3 DrChickenSalad Pinky2 rublets Octet omalley phuzion sam @Nybbles +tm258 relrod ajanata @jac zok | |
:concrete.slashnet.org 366 jjjjjjjj #uakroncs :End of /NAMES list. | |
NAMES #uakroncs | |
:concrete.slashnet.org 353 jjjjjjjj = #uakroncs :jjjjjjjj DrChickenSalad42 apajx EArndt zb3 DrChickenSalad Pinky2 rublets Octet omalley phuzion sam @Nybbles +tm258 relrod ajanata @jac zok | |
:concrete.slashnet.org 366 jjjjjjjj #uakroncs :End of /NAMES list. |
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
!push/azn/([b-df-hj-mp-tv-z])([^a-zA-Z]|$)/\1u\2/ | |
!push/azn/([B-DF-HJ-MP-TV-Z])([^A-Za-z]|$)/\1U\2/ | |
!push/desu/(\S+)/desu/ | |
!push/cthulhu/[oe]/f'th/ | |
!push/cthulhu/[ia]/gh/ | |
!push/2012/.+/HERP DERP, END OF THE WORLD! | |
!push/2109/(\S+)/sustainable | |
!push/2ref/.*(\S+)$/STOUT SHAKO FOR TWO \U\1! | |
!push/amperdesert/./&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& | |
!push/awyeah/(\S+)/*thrust* |