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
# Create and attach swapfile | |
sudo fallocate -l 8G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
# Permanent mount | |
echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab |
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
gpg --symmetric --cipher-algo AES256 file.txt |
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
awk -v RS= '{$1=$1}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
avconv -y -v warning -i <infile> -ss 00:00:00 -t 00:01:00 -codec copy <outfile> |
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
ffmpeg -i <infile> -c:v libx264 -profile:v high -pix_fmt yuv420p -crf 23 -c:a aac -b:a 160k -strict -2 <outfile> |
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
Web3 = require('web3') | |
web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")) | |
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
for file in $(ls -p | sort -R | grep -v / | grep -v s.sh | tail -6000) | |
do | |
mv $file ./cv/1/ | |
done |
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
import hashlib | |
import logging | |
import pandas as pd | |
import matplotlib | |
import matplotlib.pyplot as plt | |
from sklearn import preprocessing | |
from itertools import groupby | |
from operator import itemgetter |
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
library(xgboost) | |
library(stringr) | |
preprocess <- function(items) { | |
# Select features | |
attr_list = c('anio', 'mes', 'tipoprop', 'lugar', 'sup_tot_m2', | |
'lat_lon', 'sup_cub_m2', 'piso', 'cant_amb', 'geoname_num', 'Clase') | |
df <- items[attr_list] | |
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
setwd("D:/Datamining") | |
# para eliminar error de java | |
if (Sys.getenv("JAVA_HOME")!="") | |
Sys.setenv(JAVA_HOME="") | |
# paquetes requeridos | |
if(!require (RWeka)){ | |
install.packages('RWeka') | |
require (RWeka) |