Skip to content

Instantly share code, notes, and snippets.

View Saren-Arterius's full-sized avatar
💭
(^^)

Saren Arterius Saren-Arterius

💭
(^^)
View GitHub Profile
@Saren-Arterius
Saren-Arterius / ml-fpbp-sgd.md
Last active April 22, 2019 08:44
Big Data Assignment 2
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 9087db5dee..f58af5251a 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -1183,6 +1183,10 @@ static const GraphicHwOps qxl_ops = {
.gfx_update = qxl_hw_update,
};
+static unsigned long ref_time = 0;
+static unsigned long next_ref_time = 0;
#!/usr/bin/env python3
from multiprocessing import Pool
from math import floor
from PIL import Image
from statistics import median_low
from os import listdir
from time import time
WIDTH = 3840
HEIGHT = 1634
#!/usr/bin/env python3
# from PIL import Image
import subprocess
import uinput
INPUT_EVENT_ID = 13
X_MAX = 1216
Y_MAX = 680
slots = [None] * 10
# 2, 3, 1, 6, 4, 5, 0
#!/usr/bin/env python3
from multiprocessing import Pool
from random import random
samples = 10000000
samples_mul = 8
states_repr = ['sleep', 'code', 'tg']
probs = [
[0.8, 0.1, 0.1],
[0.2, 0, 0.8],
#!/usr/bin/env python3
from multiprocessing import Pool
from random import randint
longstr = str(2 ** 1000000) * 1000 # 280mb string
searches = [str(randint(10 ** 8, 10 ** 9)) for i in range(10000)]
def search_fn(s):
return s, s in longstr
let trainExp = 7;
let datasetSize = 2000;
let printValidateEvery = 100;
let epoches = 1000;
let validateRatio = 0.2;
let accuracyThreshold = 0.99999;
let shouldPassAccuracyThresholdAtLeastEpoch = 300;
let network;
#!/bin/bash
# Copyright 2018 [email protected]
# 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:
#include <stdio.h>
int main(int argc, char const *argv[]) {
int cnt = 2;
for (int i = 1; i < 1000000000; i++) {
cnt += i % 2 == 0 ? -i : i;
}
printf("%d\n", cnt);
return 0;
#!/usr/bin/env python3
from constraint import *
N, magic = 3, 15
# N, magic = 4, 34
sq = N ** 2
def check(*a):
for j in range(N):