Skip to content

Instantly share code, notes, and snippets.

View mackwic's full-sized avatar
💭
I may be slow to respond, sorry for that.

Thomas Wickham mackwic

💭
I may be slow to respond, sorry for that.
View GitHub Profile
" VAM routines that boostrap the vim addon manager
" Sourced frm the doc
fun! EnsureVamIsOnDisk(plugin_root_dir)
" windows users may want to use http://mawercer.de/~marc/vam/index.php
" to fetch VAM, VAM-known-repositories and the listed plugins
" without having to install curl, 7-zip and git tools first
" -> BUG [4] (git-less installation)
let vam_autoload_dir = a:plugin_root_dir.'/vim-addon-manager/autoload'
if isdirectory(vam_autoload_dir)
set nocompatible | filetype indent plugin on | syn on
source ~/.vim/bootstrap.vim
let g:ycm_server_log_level='debug'
let g:ycm_server_use_vim_stdout=1
let g:addons = [
\ 'github:sjl/vitality.vim', 'sensible', 'github:sjl/badwolf',
\ 'vim-airline', 'ctrlp', 'Syntastic', 'github:myusuf3/numbers.vim',
const char* output_format_header =
#if DEBUG
"{\n"
"\t\"width\":%d,\n"
"\t\"height\":%d,\n"
"\t\"pixel_ratio\":%d,\n"
"\t\"margins\":{\n"
"\t\t\"left\":%d,\n"
"\t\t\"top\":%d,\n"
"\t\t\"right\":%d,\n"
provider "aws" {
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "eu-west-1"
}
resource "aws_subnet" "odoo_db_subnet" {
vpc_id = "${var.vpc_id}"
cidr_block = "172.31.48.0/20"
@mackwic
mackwic / conv
Created March 27, 2015 14:17
maths
chewie 2:30 PM
et comme je fais de l'entraînement supervisé, j'avais déjà des barraques dont je connaisais le prix
donc je connais leur X, mais également le prix qu'elles ont
cep rix je l'appelle Y
le fameux label
clairement, si notre hypothèse on l'applique à ces barraques et qu'elle nous sort un prix totalement différent du vrai prix Y, c'est que l'hypothèse est à chier
par l'hypothèse est à chier, j'entends les paramètres du modèle de l'hypothèse
les theta
donc on cherche les thetas qui vont dire le moins de merde possible pour ces barraques dont on ocnnait la solution
donc je vais faire une fonction d'erreur, qui représente à quelle point mon hypothèse se gourre
// Karma configuration
// Generated on Thu Jun 19 2014 11:02:16 GMT+0200 (CEST)
var yaml = require('js-yaml'),
fs = require('fs'),
_ = require('lodash');
//--------------------------------------------
//
// Dependencies loading

God Father: child management via primus

Workflow From the main app:

  • service primus is instantiated at boot, server is started
  • one component require god-father
  • it registers a worker
  • and one day it spawns the worker
  • which spawn base.coffee
  • which require() the correct module with all commodities setup
namespace :install do
task :npm do
sh "node --version"
sh "npm install"
end
task :gyps do
sh "npm install -g node-gyp && npm install -g node-pre-gyp && npm install -g nw-gyp"
end
_ = require 'lodash'
Promise = require 'bluebird'
bts = require('bluetooth-serial-port').BluetoothSerialPort
##
# Utils
install_events = (events, emiter) ->
throw new Error() unless emiter?
for k, v of events
emiter.on k, v
function testInstalled() {
return(!_.contains(require('fs').readdirSync('.'), '.git') || // Test Development
( // Test Windows
App.settings.os === 'windows' &&
fs.existsSync(process.cwd() + '\\Uninstall.exe')
) ||
( // Test Linux
App.settings.os === 'linux' &&
_.contains(require('fs').readdirSync('.'), 'package.nw')
) ||