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 math import cos, pi, sin | |
import cv2 | |
import numpy | |
from random import choice, randint | |
from PIL import Image | |
import click | |
WHITE = (255, 255, 255) | |
RED = (0, 0, 255) |
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 PIL import Image | |
from random import choice | |
ITERATIONS = 1_000_000 | |
SIZE = 1000 | |
OFFSET = 50 | |
WHITE = (255, 255, 255) | |
BLACK = (0, 0, 0) |
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
# :nocov: | |
if defined?(Rails) | |
module MyGem | |
module Rails | |
class Engine < ::Rails::Engine | |
end | |
end | |
end | |
end | |
# :nocov: |
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
0 info it worked if it ends with ok | |
1 verbose cli [ 'node', '/usr/bin/npm', 'start' ] | |
2 info using [email protected] | |
3 info using [email protected] | |
4 verbose run-script [ 'prestart', 'start', 'poststart' ] | |
5 info prestart [email protected] | |
6 info start [email protected] | |
7 verbose unsafe-perm in lifecycle true | |
8 info [email protected] Failed to exec start script | |
9 verbose stack Error: [email protected] start: `node --harmony server` |
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
class WelcomeController < ApplicationController | |
def index | |
@xhr = request.xhr? | |
render :index, change: 'variable' | |
end | |
end |
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
require 'rubygems' | |
require 'bundler/setup' | |
require 'faye/websocket' | |
require 'eventmachine' | |
require 'json' | |
require 'pry' | |
EM.run { | |
url = ARGV[0] | |
headers = {'Origin' => 'http://faye.jcoglan.com'} |
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
[ | |
{ | |
"code": "fr", | |
"name": "French", | |
"status": "production" | |
}, | |
{ | |
"code": "en", | |
"name": "English", | |
"status": "production" |
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
if object.asin.present? | |
"http://www.amazon.it/gp/product/#{object.asin}/ref=as_li_qf_br_asin_il_tl?ie=UTF8&camp=3370&creative=23322&creativeASIN=#{object.asin}&linkCode=as2&tag=swdaniele-21" | |
else | |
"http://www.amazon.it/s/ref=nb_sb_noss_1?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&url=search-alias%3Ddvd&field-keywords=#{CGI::escape title}&tag=swdaniele-21" | |
end |
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
%w{git bash-completion htop multitail sudo vim wget autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev}.each do |pkg| | |
puts "HERE: #{pkg}" | |
apt_package pkg | |
end | |
execute 'apt-get update' do | |
action :nothing | |
end.run_action(:run) | |
include_recipe 'basic::users' |
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
%w{git bash-completion htop multitail sudo vim wget autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev}.each do |pkg| | |
package pkg do | |
action :install | |
end | |
end | |
execute 'apt-get update' do | |
action :nothing | |
end.run_action(:run) |
NewerOlder