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 | |
readonly lm75=0x48 # Slave address with A0, A1, and A2 set to 0v (ground). | |
while [ $# -gt 0 ] | |
do | |
if [ "$1" == "-debug" ] | |
then | |
debug=true | |
fi |
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
class jug: | |
def __init__(self, size): | |
self.size = size | |
self.volume = 0 | |
self.waste = 0 | |
def empty(self): | |
self.waste = self.waste + self.volume | |
self.volume = 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
#ifndef CPUID_H | |
#define CPUID_H | |
#include <memory.h> | |
#define FAMILY_ID 0x0000F00 | |
#define EXT_FAMILY_ID 0x0F00000 | |
#define PENTIUM4_ID 0x0000F00 |

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 <limits> | |
#include <cassert> | |
namespace std { } | |
using namespace std; | |
/* Computes the smallest value such that, when added to 1, is still distinguishable from 1. */ | |
template<typename T> | |
int epsilon(T& eps) |
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 <fstream> | |
#include <iomanip> | |
#include <cmath> | |
#include <algorithm> | |
#include <string> | |
#include <vector> | |
#include <set> | |
#include <cassert> |
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 <bitset> | |
#include <vector> | |
#include <cassert> | |
namespace std { } | |
using namespace std; | |
typedef size_t (*pHashFunc)(const char*); |
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 <vector> | |
#include <algorithm> | |
#include <cassert> | |
#define SAMPLE_SIZE 36000 | |
namespace std { } | |
using namespace std; |
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 <fstream> | |
#include <vector> | |
#include <cassert> | |
#include <limits> | |
#include <iomanip> | |
namespace std { } | |
using namespace std; |