This file contains hidden or 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/env bash | |
# Script to automate adding a Dependabot configuration file to multiple GitHub repositories | |
# User must have previously installed the GitHub CLI and authenticated using `gh auth login` | |
REPOSITORIES=( | |
"astronomer/airflow-dag-versioning-private" # archived | |
"astronomer/airflow-private" | |
"astronomer/apache-airflow-providers-transfers" # archived | |
"astronomer/astro-provider-anyscale" |
This file contains hidden or 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/env python | |
__author__ = "Kenten Danas" | |
from datetime import datetime | |
import pandas as pd | |
from airflow import DAG | |
from airflow.decorators import dag, task | |
from airflow.providers.snowflake.hooks.snowflake import SnowflakeHook | |
from airflow.providers.snowflake.transfers.s3_to_snowflake import S3ToSnowflakeOperator |
This file contains hidden or 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
""" | |
Example of WebSocket receiving cookies from session. | |
# Currently using tornado==4.0.2 | |
pip install git+http://github.com/tornadoweb/tornado.git | |
Run: | |
python secure_websocket.python | |
and access online: |
This file contains hidden or 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://globopedia.com/Combate": { | |
"seen": "explicit", | |
"frequency": 1, | |
"label": "Combate", | |
"last_seen": "20100000000000000" | |
}, | |
"http://globopedia.com/DiegoBrandao": { | |
"seen": "explicit", | |
"frequency": 2, |
This file contains hidden or 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
[ | |
{ | |
"url": "http://ego.globo.com/beleza/noticia/2014/04/wanda-grandi-pratica-wakeboard-para-manter-boa-forma.html", | |
"timestamp": "20140425141131560", | |
"product": "ego" | |
}, | |
{ | |
"url": "http://ego.globo.com/beleza/noticia/2014/04/wanda-grandi-pratica-wakeboard-para-manter-boa-forma.html", | |
"timestamp": "20140425141430150", | |
"product": "ego" |
This file contains hidden or 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
{ | |
"ego": { | |
"20140925064926000": "http://ego.globo.com/noite/noticia/2014/09/clique-indiscreto-revela-intimidade-de-fani-pacheco-durante-evento-no-rio.html", | |
"20140910170414904": "http://ego.globo.com/famosos/noticia/2014/09/leilah-moreno-posa-nua-em-ensaio-sensual.html", | |
"20140910170320909": "http://ego.globo.com/famosos/noticia/2014/09/fred-volta-frequentar-igreja-evangelica.html", | |
"20140811131031865": "http://ego.globo.com/famosos/tudo-sobre/jessika-alves.html", | |
"20140811125325981": "http://ego.globo.com/beleza/noticia/2014/08/jessika-alves-mantem-forma-com-aulas-de-danca-saio-exausta.html", | |
"20140811125324910": "http://ego.globo.com/famosos/tudo-sobre/jessika-alves.html", | |
"20140811125317149": "http://ego.globo.com/famosos/noticia/2014/08/jessika-alves-abre-o-jogo-sobre-ensaio-nu-foi-muito-facil.html", | |
"20140808141034667": "http://ego.globo.com/famosos/tudo-sobre/carla-prata.html", |
This file contains hidden or 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
""" | |
Example of how bad performance of recursive implementations can be when compared to iterative approaches. | |
For more in this topic, read Guido van Rossum (creator of Python programming language) blog post: | |
http://neopythonic.blogspot.com.br/2009/04/tail-recursion-elimination.html | |
""" | |
__author__ = "Tatiana Al-Chueyr <[email protected]>" | |
This file contains hidden or 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
""" | |
Example of how to consume messages from Kafka, through Zookeeper. | |
Compatible with: | |
- Python 2.7.x | |
- Kafka 0.7.1 | |
- Zookeeper 3.4.5 | |
Requires the following Python packages, available at pypi.python.org: | |
fastavro==0.7.8 |
This file contains hidden or 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 time | |
from tornado import gen, httpclient | |
from tornado.ioloop import IOLoop | |
from tornado.httpserver import HTTPServer | |
from tornado.log import app_log | |
from tornado.options import define, options, parse_command_line | |
from tornado.web import asynchronous, Application, RequestHandler, URLSpec | |
DEBUG = True |
This file contains hidden or 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 | |
# Script by @tatiana (Tatiana Al-Chueyr) | |
# Available at https://gist.github.com/tatiana/9543419 | |
clear | |
echo "Installing git (Version control manager)" | |
sudo apt-get install git |
NewerOlder