Skip to content

Instantly share code, notes, and snippets.

View cubedtear's full-sized avatar

Aritz Lopez cubedtear

  • Donostia, Basque Country
View GitHub Profile
setTimeout(function(){
var window_focus = true;
var wasOnLine = false;
function addCheckBox() {
if ($('.pane-chat-header').find("#checkLog").length === 0) {
var logCheckbox = document.createElement('input');
logCheckbox.type = "checkbox";
logCheckbox.name = "LogOnLine";
logCheckbox.value = "LogOnLine";
@cubedtear
cubedtear / BDSv2Test.java
Created November 5, 2016 15:30
BDS vs BDSv2 tester class
package io.github.cubedtear.jcubit.bds;
import com.google.common.base.Strings;
import io.github.cubedtear.jcubit.timing.Profiler;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.text.DecimalFormat;
import subprocess
import time
from multiprocessing.pool import ThreadPool
from threading import Lock
print_lock = Lock() # Sinkronizatzeko
progress_lock = Lock()
p = print
@cubedtear
cubedtear / main.cpp
Last active December 31, 2016 15:58
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct sort_pred {
bool operator()(const std::pair<int, int> &left, const std::pair<int, int> &right) {
return left.first == right.first ? left.second < right.second : left.first < right.first;
}
.coursebox .content .teachers {
width: 100%;
}
.coursebox {
padding: 0;
margin-bottom: 0;
border: none;
}

ATAI: Homework 2

Task 1: Include more indeterminism in the environment

a) Randomly scattering some pieces of garbage on the grid.

private MarsModel() {
    // ...
@cubedtear
cubedtear / Test.md
Last active December 21, 2017 23:06

Azken entregarako egin beharreko atalak:

  • Galderak ezabatu ahal izatea.

Ariketa hau egiteko, Reviewing Quizes atalean, galdera bat editatzeko aukeratzean, botoi bat agertzen da, galdera hori ezabatzeko.

Behar izandako denbora: 15 minutu.

// Group members:
//
// - Iñigo Arnedo
// - Elena Hernandez
// - Aritz Lopez
// - Ane Odriozola
#include <stdio.h>
#include <unistd.h>
#include <termios.h>
import requests
from lxml import html, etree
item_prices = []
for page in range(1, 10):
r = requests.get('https://www.chollometro.com/nuevos', {'page': str(page), 'ajax': 'true'})
res = html.fromstring(r.text)
items = res.xpath('//div[contains(@class, "threadCardLayout--card")]')
void myprint(*i8 str, int length) {
syscall3(1, 1, (int)str, length);
}
void exit(int code) {
syscall1(60, code);
}