Skip to content

Instantly share code, notes, and snippets.

View timvisee's full-sized avatar
Consuming coffee

Tim Visée timvisee

Consuming coffee
View GitHub Profile
Predicting top movies for user 32776 ...
TESTS:
(32776, 1358, 4.0)
Top movies predicted, took 3.76 s
Movie recommendations:
('Sling Blade (1996)', 3.817064485458597, 13336)
Predicting top movies for user 114699 ...
TESTS:
use std::sync::{Arc, Mutex, MutexGuard};
use std::thread;
use std::time::Duration;
fn main() {
// Create our manager
let manager = MyManager::new();
// Start a thread that uses the manager's data
manager.start_thread();
/home/timvisee/.cargo/bin/cargo run --color=always --features rpi
Compiling pokoebox-player v0.0.1 (file:///home/timvisee/Projects/pokoebox/pokoebox-player)
error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
--> src/gpio/pin.rs:80:39
|
80 | Ok((pin.token(), gpio_manager.pin_accessor().add_pin(pin)))
| ^^^^^^^^^^^^
|
note: first, the lifetime cannot outlive the lifetime 'b as defined on the body at 45:114...
--> src/gpio/pin.rs:45:115
@timvisee
timvisee / gist:599d845843c8ec51cfe6c25b22fbd827
Last active February 22, 2017 19:30
New container for pyspark

Stop huidige instance

stop.bat

Verwijder oude container/image

Oude container en image heb je niet meer nodig. Ik heb nu een eigen image gemaakt met alleen de meuk die je nodig hebt. Dit verwijderd dus die 6GB! 👍

docker container rm spark_spark_1

TODO

  • EER omzetten naar andere notitie

  • Script student bevat een fout: C: weghalen

$.ajax({
data: {
data: JSON.stringify(test)
}
});
@timvisee
timvisee / compiled.md
Last active November 9, 2016 23:52
Programming and Testing summary - Compiled
public static void main(String[]args) {
List<Stad> cities;
for(int i = 1; i < cities.size(); i++) {
for(int j = i - 1; j >= 0; j--)
if(cities.get(i).equals(cities.get(j)))
// Contains equals
return false;
// Does not contain equals
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
TAG POS=1 TYPE=A ATTR=TXT:*Upgrade<SP>level*
TAG POS=1 TYPE=A ATTR=TXT:*Buy<SP>upgrade*
// Possible color sets for the site
const COLOR_SETS = [
{
// Red
headerBackground: '#CF201B',
headerText: '#EEE',
accentColor: '#8B1613',
textColor: '#CF201B'
},
{