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 "linux_io.h" | |
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <wchar.h> | |
int main(void) | |
{ |
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/sh | |
#Add pkg-config support to GMP | |
#http://gmplib.org/list-archives/gmp-discuss/2013-May/005329.html | |
echo "Creating gmp.pc.in..." | |
echo """prefix=@prefix@ | |
exec_prefix=@exec_prefix@ | |
libdir=@libdir@ | |
includedir=@includedir@ |
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
prefix=@prefix@ | |
exec_prefix=@exec_prefix@ | |
libdir=@libdir@ | |
includedir=@includedir@ | |
Name: gmp | |
Description: GNU Multiple Precision Arithmetic Library | |
URL: http://gmplib.org | |
Version: @PACKAGE_VERSION@ | |
Libs: -L${libdir} -lgmp |
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) 2013 Douglas Vaz, Sharvari Bhosale | |
-# | |
-#Permission is hereby granted, free of charge, to any person obtaining a copy | |
-#of this software and associated documentation files (the "Software"), to deal | |
-#in the Software without restriction, including without limitation the rights | |
-#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
-#copies of the Software, and to permit persons to whom the Software is | |
-#furnished to do so, subject to the following conditions: | |
-# |
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
from pybrain.structure import RecurrentNetwork, FullConnection, LinearLayer, SigmoidLayer | |
from pybrain.datasets import SupervisedDataSet | |
from pybrain.supervised.trainers import BackpropTrainer | |
#Define network structure | |
network = RecurrentNetwork(name="XOR") | |
inputLayer = LinearLayer(2, name="Input") | |
hiddenLayer = SigmoidLayer(3, name="Hidden") |
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
/** | |
* Boyer-Moore string pattern matching | |
* | |
* @author Douglas | |
*/ | |
import java.util.Map; | |
import java.util.HashMap; | |
public class BoyerMoore |
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 <iostream> | |
using namespace std; | |
enum players {X = 1, O = 2}; | |
class TicTacToe{ | |
short state[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0}; | |
const short strategy[9] = { 1, 3, 1, 3, 5, 3, 1, 3, 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
/** | |
* Based on the paper "A Heuristic for Solving the Generalized Water Jug Problem | |
* Florin Leon, Mihai Zaharia, Dan Galea | |
*/ | |
#include <iostream> | |
using namespace std; | |
class Jug{ |
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/python3 | |
def whazaa(n): | |
for i in range(1,n): | |
if i % 15 == 0: | |
print('Whazaa') | |
elif i % 3 == 0: | |
print('Hip') | |
elif i % 5 == 0: | |
print('Hop') | |
else: |
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 <iostream> | |
#include <string> | |
#include <vector> | |
#include <queue> | |
#include <stack> | |
#include <algorithm> | |
using namespace std; | |
class Node{ |