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> | |
| #define MAX 1000 | |
| int main() { | |
| int a, b, c; | |
| a = 0; | |
| b = 1; | |
| c = MAX - a - b; |
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 <stdlib.h> | |
| #include <math.h> | |
| typedef unsigned long ul; | |
| ul *maxprimeslist(ul max, int *found) { | |
| int cprimes = 10; | |
| ul *primes = (ul *)malloc(cprimes * sizeof(ul)); | |
| int nprimes = 0; |
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
| GOC=6g | |
| GOCFLAGS= | |
| GOLINK=6l | |
| GOLINKFLAGS= | |
| SOURCES=helloworld.go | |
| DEPS= | |
| EXECUTABLE=helloworld | |
| OBJECTS=$(SOURCES:.go=.6) |
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
| package main | |
| import ( | |
| "os" | |
| "fmt" | |
| "math" | |
| "strconv" | |
| ) |
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 <stdlib.h> | |
| #define TRUE 1 | |
| #define FALSE 0 | |
| int nthprime(int n) { | |
| int *primes = (int *)calloc(n, sizeof(int)); | |
| int i, count = 0; |
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
| require 'formula' | |
| class Ipe < Formula | |
| url 'http://downloads.sourceforge.net/project/ipe7/ipe/ipe-7.0.14-src.tar.gz' | |
| homepage 'http://ipe7.sourceforge.net/' | |
| md5 '13b1790813304ac888402d9c6c40a6ec' | |
| depends_on "pkg-config" | |
| depends_on "lua" | |
| depends_on "qt" |
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
| test -z "/Users/zrbecker/local/homebrew/Cellar/irssi/0.8.15/lib/irssi/modules" || ../../build-aux/install-sh -c -d "/Users/zrbecker/local/homebrew/Cellar/irssi/0.8.15/lib/irssi/modules" | |
| Appending installation info to /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/perllocal.pod | |
| mkdir /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level: Permission denied at /System/Library/Perl/5.10.0/ExtUtils/Command.pm line 259 | |
| make[5]: [doc_site_install] Error 13 (ignored) | |
| /bin/sh: /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/perllocal.pod: No such file or directory | |
| make[5]: [doc_site_install] Error 1 (ignored) | |
| Files found in blib/arch: installing files in blib/lib into architecture dependent library tree | |
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| ERROR: Can't create '/Library/Perl/5.10.0/darwin-thread-multi-2level' | |
| Do not have write permissions on '/Library/Perl/5.10.0/darwin-thread-multi-2level' |
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() | |
| { | |
| int n = 0; | |
| while (n + 1 > n) | |
| ++n; | |
| printf("Done!\n"); | |
| return 0; |
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
| import sys | |
| def isprime(p, plist): | |
| max = p ** 0.5 | |
| for i in range(0, len(plist)): | |
| if max < plist[i]: | |
| break | |
| if p % plist[i] == 0: | |
| return False | |
| return 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
| def attack_probable_move_strategy(history): | |
| """Chooses best response to opponents most probable response based on | |
| last 100 moves.""" | |
| probable_move = [0, 0, 0, 0, 0, 0, 0] | |
| # Calculates response to last move based on previous 100 moves | |
| last_l = -1 | |
| for l, r in history[-100:]: | |
| if last_l == history[-1][0]: | |
| probable_move[r] += 1 |