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
# Install prophet | |
FROM python:3.7-stretch | |
RUN apt-get -y install git libc-dev | |
RUN pip install pip==19.1.1 | |
WORKDIR /opt | |
RUN git clone https://github.com/facebook/prophet.git |
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 boto3 | |
def lambda_handler(event, context): | |
client.start_export_task( | |
ExportTaskIdentifier="", | |
SourceArn="arn:aws:rds:us-east-1:", | |
S3BucketName="", | |
IamRoleArn=", | |
KmsKeyId="", | |
S3Prefix="rds-exports", |
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 argparse | |
import hashlib | |
import os | |
def get_checksum(f): | |
md5 = hashlib.md5() | |
md5.update(open(f).read()) | |
return md5.hexdigest() |
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
# http://nicolascadou.com/blog/2014/01/printing-actual-sqlalchemy-queries/ | |
from sqlalchemy.dialects import mysql; print str(query.statement.compile(dialect=mysql.dialect())) |
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 | |
echo "alias cls='clear'" >> ~/.bash_aliases && source ~/.bash_aliases |
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 casper = require('casper').create(); | |
var fs = require('fs'); | |
casper.start('https://soundcloud.com/vlad-gonta/sets/new-1', function() { | |
this.viewport(768, 10000); | |
}).then(function () { | |
this.scrollToBottom(); | |
this.wait(1000); | |
}).then(function () { | |
this.scrollToBottom(); |
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/sh | |
for i in *.m4a; do avconv -i "$i" "${i/.m4a/.mp3}"; 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
#!/bin/sh | |
# Source: https://github.com/chovy/node-startup/blob/master/init.d/node-app | |
# author: Anthony Ettinger (chovy) | |
NODE_ENV="development" | |
PORT="3000" | |
APP_DIR="~/scripts-startup" | |
NODE_APP="cnsf.js" | |
CONFIG_DIR="$APP_DIR" |
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
// HTTP a http://www.cnsf.gob.mx/Eventos/Paginas/Premios_2015.aspx | |
// Si el header de respuesta es distinto de 200, ignorar | |
// Si es 200 enviar mail | |
var nodemailer = require('nodemailer'); | |
var smtpTransport = require('nodemailer-smtp-transport'); | |
var request = require('request'); | |
var URL = 'http://www.cnsf.gob.mx/Eventos/Paginas/Premios_2015.aspx'; | |
var USER = ''; |
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 xray = require('x-ray'); | |
var phantom = require('x-ray-phantom'); | |
var URL = 'http://www.yad2.co.il/Nadlan/rent.php?City=%D7%99%D7%A8%D7%95%D7%A9%D7%9C%D7%99%D7%9D&Neighborhood=&HomeTypeID=11&fromRooms=1&untilRooms=&fromPrice=200&untilPrice=&PriceType=1&FromFloor=&ToFloor=&EnterDate=&Info='; | |
xray(URL) | |
.use(phantom()) | |
.select([{ | |
$root: 'body', | |
tds: ['td'] |
NewerOlder