Skip to content

Instantly share code, notes, and snippets.

View luctrudeau's full-sized avatar

Luc Trudeau luctrudeau

View GitHub Profile
@luctrudeau
luctrudeau / PersistenceRecipe.java
Created July 14, 2015 22:48
Android Object Persistence Recipe
SharedPreferences settings = getSharedPreferences("ETSPref", 0);
List<String> ets = Arrays.asList("I", "Love", "ETS");
// Save Object
SharedPreferences.Editor editor = settings.edit();
editor.putString("ILoveETS", new Gson().toJson(ets));
editor.commit();
// Load Object
<?php
/*
* state: string Indicates the state of the issues to return. Can be either open, closed, or all. Default: open
*/
define("ISSUE_URL", "https://api.github.com/repos/MaisonLogicielLibre/Website/issues?state=all&page=");
define("LABEL_NAME_KEY", "name");
define("OUTPUT_FILE_NAME", "github.csv");
define("DATE_FORMAT", "F j, Y");
@luctrudeau
luctrudeau / golf.tex
Last active April 5, 2016 21:54
VimGolf: One number per line
\documentclass[preview]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[canadian]{babel}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{subfig}
@luctrudeau
luctrudeau / DaalaLog2.m
Created June 16, 2016 13:30
Daala Log2 Int Approx
clc; clear; clf;
% Base-2 logarithm approximation (log2(x)). (Q14 input, Q10 output)
qI = 14;
q14_one = bitshift(1,qI);
% Range from 0 to 1
x = bitshift(1,qI-1):q14_one-1;
% Output
@luctrudeau
luctrudeau / tf_experiment.c
Created November 30, 2016 20:17
TF Experiment
#include <stdio.h>
#include <stdlib.h>
#include <png.h>
#include "dct.h"
#include "vidinput.h"
#include "intra.h"
void luma2png(char *filename, od_coeff *luma, int width, int height) {
int y;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@luctrudeau
luctrudeau / QP20
Last active May 24, 2017 23:52
AV1 CfL UV_MODE probabilities (1st Iteration)
{ 809 1414 1686 2140 2340 2760 3354 4081 4487 8677 9725 32768 },
{ 483 4578 5681 6226 6420 7431 7764 8140 9143 13357 15421 32768 },
{ 500 750 2859 3686 3851 4089 5184 6718 6932 11299 13573 32768 },
{ 3342 3939 4669 7937 8132 8575 9334 10361 11268 14623 15399 32768 },
{ 2601 3189 3644 4376 7461 8818 10136 10681 11261 15305 16195 32768 },
{ 3537 4669 5861 6552 7566 13059 13498 13905 14409 17485 18040 32768 },
{ 2414 2776 3351 4705 5457 5909 9635 10272 11094 14951 15738 32768 },
{ 1395 1772 2253 3669 3853 4163 4780 8072 8458 12718 13746 32768 },
{ 1952 3098 3848 5281 5512 6122 6605 7612 10399 14161 15142 32768 },
{ 630 1307 1693 2215 2460 2958 3656 4475 4960 10066 11240 32768 },
@luctrudeau
luctrudeau / new_job.sh
Created May 31, 2017 14:52
AWCY text report using Daala tools
#!/bin/bash
@luctrudeau
luctrudeau / dc_prediction_error_analysis.ipynb
Last active January 16, 2018 02:26
DC Predictor Error Analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@luctrudeau
luctrudeau / install_notes.md
Last active January 25, 2018 14:40
Arch Linux Installation Notes

Pre-Install

Connect to internet

wifi-setup

Setup wifi using wifi-mency

Update system clock