This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# A quick-and-dirty script modeling the recruiting process. | |
# by Sylvain Leroux | |
# Each candidat as a set of skills | |
# and a "personal fit" with the job offer. | |
# The skill level is known by the recruiter if >= 0.5 | |
# The "personal fit" in [0,1) range is not know | |
# All skill values are in the range (0-1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mrjob.job import MRJob | |
import mrjob.protocol | |
from decimal import Decimal | |
class MRCustomerTotalExpenses(MRJob): | |
INTERNAL_PROTOCOL = mrjob.protocol.PickleProtocol | |
OUTPUT_PROTOCOL = mrjob.protocol.ReprProtocol | |
def mapper(self, key, line): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> db.dishes.create({ | |
... _id: ObjectId("56eedb8b839b02cc2b7954d5"), | |
... name: 'Uthapizza', | |
... description: 'Test', | |
... comments: [ | |
... { | |
... rating: 3, | |
... comment: 'This is insane', | |
... author: 'Matt Daemon' | |
... } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "node-express", | |
"version": "1.0.0", | |
"description": "", | |
"main": "dishRouter.js", | |
"directories": { | |
"test": "test" | |
}, | |
"scripts": { | |
"test": "./node_modules/.bin/mocha", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* test/fixtures/fixtures_dishes.js */ | |
module.exports = [ | |
{ | |
"_id" : "000000000000000000001100", | |
"updatedAt" : "2016-03-21T23:14:53.548Z", | |
"createdAt" : "2016-03-21T23:14:53.548Z", | |
"name" : "Uthapizza", | |
"image" : "images/pizza.png", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose'); | |
var url = 'mongodb://localhost:27017/conFusion'; | |
mongoose.connect(url); | |
var db = mongoose.connection; | |
var assert = require('assert'); | |
var Dishes = require('../models/dishes'); | |
var Promotions = require('../models/promotions'); | |
var Leaders = require('../models/leadership'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* test/fixtures/fixtures_dishes.js */ | |
module.exports = [ | |
{ | |
"_id" : "000000000000000000001100", | |
"updatedAt" : "2016-03-21T23:14:53.548Z", | |
"createdAt" : "2016-03-21T23:14:53.548Z", | |
"name" : "Uthapizza", | |
"image" : "images/pizza.png", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* test/fixtures/fixtures_promotions.js */ | |
module.exports = [ | |
{ | |
"_id" : "000000000000000000001100", | |
"updatedAt" : "2016-03-21T23:18:37.283Z", | |
"createdAt" : "2016-03-21T23:14:53.548Z", | |
"name" : "Grand buffet", | |
"image" : "images/buffet.png", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//--------------------------------------------------------------// | |
// Header | |
// | |
// Lightworks effects have to have a _LwksEffectInfo block | |
// which defines basic information about the effect (ie. name | |
// and category). EffectGroup must be "GenericPixelShader". | |
//--------------------------------------------------------------// | |
int _LwksEffectInfo | |
< | |
string EffectGroup = "GenericPixelShader"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
COLOR="#59838c" | |
for f in FRAME-*.png; do convert \( -size 1920x1080 xc:black \) \( $f -alpha Off -level 10%,100% -negate \) -compose CopyOpacity -composite ${f/FRAME/ALPHA}; done | |
for f in ALPHA-*.png; do convert \( -size 1920x1080 xc:"$COLOR" \) \( $f \) -compose Over -composite ${f/ALPHA/OVER}; done |