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
Animal = {} | |
function Animal:new(o) | |
o = o or {} | |
setmetatable(o, self) | |
self.__index = self | |
return o | |
end |
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
#!/usr/local/bin/python | |
# a Python script for PyEphem | |
# http://rhodesmill.org/pyephem/ | |
# to find out the sunrise and sunset time | |
# in UTC | |
# (add more code for the local time by yourself) | |
# by Kenji Rikitake 6-OCT-2009 | |
from datetime import datetime, timedelta |
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
.section .text | |
.arm | |
.globl strlen | |
strlen: | |
mov r1, r0 | |
mov r0, #0 | |
loopstart: | |
ldr r2, [r1], #1! | |
cmp r2, #0 | |
addne r0, r0, #1 |
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 <Foundation/Foundation.h> | |
@interface Communicator : NSObject <NSStreamDelegate> { | |
@public | |
NSString *host; | |
int port; | |
} | |
- (void)setup; |
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
#!/usr/bin/osascript |
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
;; Copyright (c) 2010 Jeremiah LaRocco | |
;; All rights reserved. | |
;; Redistribution and use in source and binary forms, with or without | |
;; modification, are permitted provided that the following conditions | |
;; are met: | |
;; 1. Redistributions of source code must retain the above copyright | |
;; notice, this list of conditions and the following disclaimer. | |
;; 2. Redistributions in binary form must reproduce the above copyright | |
;; notice, this list of conditions and the following disclaimer in the |
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
@ Assembly main on ARM linux eabi | |
@ [build and run on ubuntu x64] | |
@ arm-linux-gnueabi-gcc hello.s -o hello | |
@ qemu-arm -L /usr/arm-linux-gnueabi/ hello | |
stdout = 1 | |
.text | |
.align 2 | |
.global main | |
main: | |
push {r4-r11, lr} |
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 <Foundation/Foundation.h> | |
#import <CoreServices/CoreServices.h> | |
// adjective | |
// 1 imaginative or fanciful; remote from reality | |
// 2 extraordinarily good or attractive | |
// DERIVATIVES | |
// fantastical adjective (in sense 1) . | |
// fantasticality noun (in sense 1) . | |
// fantastically adverb |
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
.arm | |
.align | |
.global initSystem | |
.global main | |
initSystem: | |
bx lr | |
main: | |
mov r0,#0x04000000 @ I/O space offset |
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
/* | |
Example CUDA code for Problem Set 0, CS 264, Harvard, Fall 2009. | |
Takes an input string and mangles it using the current date and | |
time on the CPU and on the GPU. Demonstrates device initialization | |
and error checking with libcutil, host<=>device memory transfers, | |
and CUDA kernel invocation. | |
To compile: |
OlderNewer