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
(newmailsend.muf) | |
$include #3 (ansilib.muf) | |
$include #6 (Useful.muf) | |
( words appearing in this program in order: | |
greenline - pushes a greenline onto the stack. | |
usage - notifies the caller the basic commands. | |
usage2 - notifies the caller some more advanced commands. | |
sendusage - If a string is on the stack, it'll notify it to |
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
prefixTable = { | |
"" : 0 , "k" : 5 , "s" : 10, "t" : 15, "n" : 20, | |
"h" : 25, "m" : 30, "y" : 35, "r" : 40, "w" : 45, | |
"g" : 50, "z" : 55, "d" : 60, "p" : 65, "b" : 70, | |
"j" : 75, "ky": 80, "sh": 85, "ny": 90, "hy": 95, | |
"py": 100, "by": 105, "my": 110, "ch": 115, "ry": 120, | |
"gy": 125, "f" : 130, "ts": 135, "v" : 140, | |
"elongations" : 145, | |
"nn" : 150, ".": 151, "," : 152, "smalltsu" : 153, " " : 154, |
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
# My first layered neural network thingy, | |
# Whooooo. | |
# No Theano just yet. Maybe Numpy. | |
# Numpy will require me to express everything | |
# with as little iteration as possible. That's | |
# what bugs me about that library >_<. You can | |
# only hope everything broadcasts correctly! | |
import numpy | |
import theano |
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
# How nessecary is this? | |
class Gene: | |
def __init__(self, inNeuron, outNeuron, weight = 1): | |
# inNeuron and outNeuron represent array indices | |
self.inNeuron = inNeuron | |
self.outNeuron = outNeuron | |
self.weight = weight | |
def compareOuts(self, otherGene): | |
if self.outNeuron < otherGene.outNeuron: return -1 | |
elif self.outNeuron > otherGene.outNeuron: return 1 |
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 <ostream> | |
#include <string> | |
#include "vStacks.h" | |
using namespace std; | |
int main(int argc, char** argv) { | |
virtualStack* thisThing = new spamNode("Hello"); |
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
class Vec < Array | |
def initialize(ary) | |
super(@vec = ary) | |
end | |
def *(scalar) | |
Vec.new ( | |
@vec.map { |element| |
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
# Our class | |
class Matrix2by2 | |
# Initialize with a 2x2 list | |
def initialize(x, y) | |
if not (x.is_a? Array and y.is_a? Array) then | |
throw(:notArray) | |
end | |
if (x.length != 2 and y.length != 2) then | |
throw(:notEqual) |
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 pushSortedAdjNode(adjNode** listHead, int newID, int newDistance) { | |
adjNode* newNode = malloc(sizeof(adjNode)); | |
newNode->id = newID; | |
newNode->distance = newDistance; | |
if (*listHead == NULL || (*listHead)->distance >= newDistance) { | |
newNode->next = *listHead; | |
*listHead = newNode; | |
return; | |
} |
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 <cstdlib> | |
#include <cstdio> | |
#include <iostream> | |
// Last one is for cin.ignore() | |
using namespace std; | |
typedef enum binDigPlaces { | |
b1 = 0x01, | |
b2 = 0x02, | |
b3 = 0x04, |
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 <stdlib.h> | |
typedef struct Node{void*data;int type;struct Node*next;}dynamicNode;int main() | |
{dynamicNode*first=(dynamicNode*)malloc(sizeof(dynamicNode));first->next= | |
(dynamicNode*)malloc(sizeof(dynamicNode));int m=4;float q=4.5;first->data=(void | |
*)(&m);first->next->data=(void*)(&q);printf("%f\n",(*(int*)first->data+*(float* | |
)first->next->data));int*a=(int*)malloc(sizeof(int));float*b=(float*)malloc( | |
sizeof(float));first->next->next=(dynamicNode*)malloc(sizeof(dynamicNode)); | |
first->next->next->next=(dynamicNode*)malloc(sizeof(dynamicNode));first->next-> | |
next->data=(void*)a;first->next->next->next->data=(void*)b;*a=5;*b=22.4;printf( | |
"%f\n",(*(int*)first->next->next->data+*(float*)first->next->next->next->data)) |
NewerOlder