Skip to content

Instantly share code, notes, and snippets.

View jameskyle's full-sized avatar

James Kyle jameskyle

View GitHub Profile
#include<iostream>
using namespace std;
const int DATAGRAM_LENGTH = 64;
const int BIT_LENGTH = 8;
void text_to_bin(string block, bool output[DATAGRAM_LENGTH]) {
int current = 0;
for (int i = 0;i < block.length();i++) {
#include<iostream>
using namespace std;
void printArray(bool *list, int size) {
for(int i = 0; i < size; i++){
cout << list[i];
}
@jameskyle
jameskyle / zero.c
Last active November 5, 2015 00:11
#include <stdio.h>
#include <string.h>
int main() {
char c1 = 0;
char c2 = '\0';
char c3 = '0';
if (c2 == c1) {
puts("Wut, wut!");
} else if (c1 == c3) {
library(foreign)
library(caret)
library(cluster)
library(mclust)
library(ggbiplot)
# http://rpubs.com/sinhrks/plot_pca
library(ggfortify)
library(fastICA)
library(nnet)
library(doMC)
---
# Installs h2o and supporting files
- name: Create User
user: name="{{ h2o_user }}"
- name: Download
unarchive: src="{{ h2o_url }}"
dest=/tmp/
copy=no
creates="/tmp/{{ h2o_name }}"
bool temp[64] = {0};
cout << "message: " << message.substr(0,8) << endl;
for(int i=0; i<8; i++) {
bitset<8> tempbyte(message[i]);
cout << "digit: " << i+1 << " - " ;
for(int j=0;j<8;j++) {
int count = (i*8)+j;
if(tempbyte[7-j]) {
@jameskyle
jameskyle / ato.cpp
Last active October 29, 2015 22:16
#include<iostream>
#include<bitset>
#include<vector>
class BoolVec {
public:
const std::string ascii;
BoolVec(const std::string st) :
ascii(st),
result(st.size() * 8, 0),
unbind-key C-b
set-option -g prefix C-s
bind-key C-s last-window
bind s send-prefix
# large history
set-option -g history-limit 100000
# enable mouse mode
@jameskyle
jameskyle / main.R
Last active October 20, 2015 20:30
library(ggplot2)
library(data.table)
source("multiplot.R")
RESULTS="results"
GRAPHS="graphs"
nnet.graph <- function(dat, method="point", metric="error") {
# melting operation for the error & time columns simultaneously
d1 <- melt(setDT(dat), measure.vars = patterns(".error",".time"), value.name = c("error","time"))
algorithm iterations time optim
MIMIC 1 0.03 56
MIMIC 10001 29.6 78
MIMIC 1001 6.56 75
MIMIC 101 0.88 70
MIMIC 1021 6.7 75
MIMIC 1041 6.79 75
MIMIC 1061 6.73 75
MIMIC 1081 6.95 73
MIMIC 1101 6.62 73