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
Error 404: Page Not Found | |
We are terribly sorry, but the URL you typed no longer exists. It might have been moved or deleted, or perhaps you mistyped it. | |
Exception in thread "main" java.lang.NullPointerException | |
at com.laelhansen.imallalone.Site.getTitle(Site.java:16) | |
at com.laelhansen.website.Domain.getTitle(Domain.java:25) | |
at com.laelhansen.website.Bootstrap.main(Bootstrap.java:14) |
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
from random import Random | |
import socket | |
from threading import * | |
def makeseg(contents, seq_seg, seq_ack, is_ack): | |
return "data = " + str(contents) + " seqSeg = " + str(seq_seg) + " seqAck = " + str(seq_ack) + " isack = " + str(is_ack) | |
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
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
library("ggplot2") | |
library("depmixS4") | |
library("lubridate") | |
library("chron") | |
library("dplyr") | |
library("corrplot") | |
getwd() | |
df <- read.table("TrainData.txt", header = T, sep = ",") | |
df$Date <- as.Date(df$Date, format="%d/%m/%Y") | |
df$Time <- format(as.POSIXlt(strptime(df$Time, "%H:%M:%S"), format="%H:%M:%S"), "%H:%M:%S") |
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
# Rolling Average | |
# Moving window week | |
mw = df[df$Date >= "2009-11-01" & df$Date <= "2009-11-07",] | |
# MW days | |
mw_sat <- subset(mw, wday(mw$Date) == 2) | |
mw_mon <- subset(mw, wday(mw$Date) == 7) | |
# MW time | |
mw_sat_window <- mw_sat[mw_sat$Time >= '07:00:00' & mw_sat$Time <= "09:00:00",] |
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
points <- 0 | |
window_size <- 7 | |
acceptable_difference <- 0.65 | |
windows = array() | |
for(i in 0:(nrow(week_data) - window_size - 1)) { | |
window_sum <- 0 | |
for(j in 0:(window_size)) { | |
window_sum <- (window_sum + week_data$Global_active_power[i + j]) |
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
import urllib | |
import os | |
import json | |
if not os.path.exists('./emotes'): | |
os.makedirs('./emotes') | |
print('folder: ' + os.path.abspath('./emotes') + '...') | |
emotes = json.load(urllib.urlopen('https://twitchemotes.com/api_cache/v3/global.json')) | |
for code, emote in emotes.items(): | |
print('dl: ' + code + '...') |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
hyperTabs: { | |
trafficButtons: true, | |
}, |
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
const electron = require('electron') | |
const app = electron.app | |
const BrowserWindow = electron.BrowserWindow | |
const path = require('path') | |
const url = require('url') | |
const Ant = require('aai-ant-plus'); | |
var fs = require('fs'); |
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
public string GetIP() | |
{ | |
WebRequest request = WebRequest.Create(_url + "/api/gameserver"); | |
request.Credentials = CredentialCache.DefaultCredentials; | |
((HttpWebRequest)request).UserAgent = UserAgent; | |
request.Method = "GET"; | |
request.ContentType = "application/x-www-form-urlencoded"; | |
WebResponse response = request.GetResponse(); |
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 "mesg.h" | |
void client(int readfd, int writefd) { | |
size_t len; | |
ssize_t n; | |
struct mymesg mesg; | |
Fgets(mesg.mesg_data, MAXMESGDATA, stdin); | |
len = strlen(mesg.mesg_data); | |
NewerOlder