Skip to content

Instantly share code, notes, and snippets.

View andrewgdunn's full-sized avatar

Andrew G. Dunn andrewgdunn

View GitHub Profile
import pandas as pd
raw_df = pd.read_csv('reddit.r.scotch.tsv', sep='\t')
# Rid ourselves of data we don't need for the recommendation
raw_df.drop('Timestamp', axis=1, inplace=True)
raw_df.drop('Link To reddit Review', axis=1, inplace=True)
raw_df.drop('Region', axis=1, inplace=True)
raw_df.drop('Price', axis=1, inplace=True)
raw_df.drop('Date', axis=1, inplace=True)
private static void ProcessRecievedData() {
Vector<Map<String, Value>> errorSensors = new Vector<Map<String, Value>>();
for(Object keySet : allSensors.keySet()) {
// Snag the individual sensor
Sensor individualSensor = (Sensor) allSensors.get(keySet);
// remove the outliers
individualSensor.removeOutliers();
// Boolean Error
if(!(sensor.data.elementAt(0) instanceof RealValue)) {
boolean firstVal = ((BoolValue)sensor.data.elementAt(0)).get();
for(int index = 1; index < sensor.data.size()-1; index++) {
boolean indexValue = ( (BoolValue) sensor.data.elementAt(index)).get();
if(indexValue != firstVal) {
map.put("booleanError", Value.v(indexValue));
map.put("faultIndex", Value.v(index));
break;
}
private static void ProcessRecievedData() {
Vector<Map<String, Value>> errorSensors = new Vector<Map<String, Value>>();
for(Object keySet : allSensors.keySet()) {
Sensor individualSensor = (Sensor)allSensors.get(keySet);
individualSensor.removeOutliers();
//Send the individual sensor to our filters, if there is a detected error we will make sure to set the falutIndex.
Map<String, Value> filterSensor = ErrorFinder.errorParams(individualSensor);
package gov.dod.army.rdecom.tardec.tcctda;
import org.dxc.api.datatypes.*;
import java.util.Map;
import java.util.HashMap;
/**
*
* @author Jeremy Mange, Michael Duffy, Andrew Dunn
private static Map<String, Value> intermittentError(Sensor sensor) {
Map<String, Value> map = new HashMap<String, Value>();
Map<String, Value> abruptError = abruptError(sensor);
if(abruptError.size() == 0 || sensor.id.equals("ST516"))
return map;
int timeOfFault = ((IntegerValue)(abruptError.get("faultIndex"))).get() + INTERMITTENT_OFFSET;
default:
delivery_method: :smtp
smtp_settings:
tls: true
address: "smtp.gmail.com"
port: '587'
domain: "smtp.gmail.com"
authentication: :plain
user_name: "USERNAME"
password: "PASSWORD"
agd@hygieia:/var/www/agdunn.net/projects$ sudo gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... no
root@hygieia:/var/www/agdunn.net/projects/public# /etc/init.d/apache2 restart
* Restarting web server apache2 apache2: Syntax error on line 204 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/passenger.load: Cannot load /usr/lib/apache2/modules/mod_passenger.so into server: /usr/lib/apache2/modules/mod_passenger.so: cannot open shared object file: No such file or directory
[Thu Jan 20 13:10:44 2011] [alert] [client 72.14.186.110] /var/www/agdunn.net/projects/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Thu Jan 20 13:10:45 2011] [alert] [client 72.14.186.110] /var/www/agdunn.net/projects/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Thu Jan 20 13:10:45 2011] [alert] [client 72.14.186.110] /var/www/agdunn.net/projects/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Thu Jan 20 13:10:45 2011] [alert] [client 72.14.186.110] /var/www/agdunn.net/projects/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Thu Jan 20 13:10:45 2011] [alert] [client 72.14.186.110] /var/www/agdunn.net/projects/public/.htaccess: Invalid command 'RewriteEngine', pe