Find empty files: find . -size 0
Files greater than 700M: (does not fit CDROM) find . -size +700M
# Detect debian architecture inside a CHEF recice | |
ml = Mixlib::ShellOut.new("dpkg --print-architecture") | |
ml.run_command | |
debian_arch = ml.stdout unless ml.error! | |
puts debian_arch |
-- Simple database logging to a table via Triggers (PostgresSQL) | |
-- Create tables -- | |
create table tbl1 ( id integer, name varchar(20), ssn integer ); | |
create table tbl1_logcopy ( modified date, id integer, name varchar(20), ssn integer ); | |
-- Populate -- | |
insert into tbl1 values ( 1, '123', 1000); | |
insert into tbl1 values ( 2, '234', 2000); | |
insert into tbl1 values ( 3, '345', 3000); |
#!/usr/bin/env ruby | |
ARGF.each_line do |ll| | |
campos = ll.split "\t" # Separamos por tabuladores | |
campos[3].slice! /[\_\-](Multilink|Po|Gi)?[0-9_-]+(\.[0-9]+)?/ | |
puts campos.join "\t" | |
end |
aaa = sc.parallelize( [1,2,3,4,5,6,7,8,9]) | |
bbb = sc.parallelize( [1,3]) | |
print ( aaa.map(lambda k: (k,k)) | |
.leftOuterJoin(bbb.map(lambda k: (k,k))) | |
.collect() ) | |
print ( aaa.map(lambda k: (k,k)) | |
.leftOuterJoin(bbb.map(lambda k: (k,k))) | |
.filter(lambda k: k[1][1] == None) |
from time import time | |
inicio = time() | |
print ( amazonInvPairsRDD | |
.join( googleInvPairsRDD ) | |
.map( lambda (a,b): (b,a)) | |
.reduceByKey(lambda tok1, tok2: [tok1, tok2] ) | |
).count() |
# Copyright (c) 2016, Iñigo Gonzalez Ponce <igponce (at) gmail> | |
# All rights reserved. | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# 1. Redistributions of source code must retain the above copyright notice, | |
# this list of conditions and the following disclaimer. | |
# 2. Redistributions in binary form must reproduce the above copyright notice, |
echo << EOF | |
Script de provision | |
-------------------- | |
Componentes | |
- Open JDK 8 | |
- SCALA 2.9 | |
- Cassandra | |
[pend: zookeper] |
I hereby claim:
To claim this, I am signing this object:
sudo apt-get update | |
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get update | |
sudo apt-get -y install docker-ce | |
# Starting up |