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
# airflow.cfg | |
[core] | |
airflow_home = /opt/titan/airflow | |
dags_folder = /opt/titan/airflow/dags | |
s3_log_folder = None | |
executor = CeleryExecutor | |
sql_alchemy_conn = mysql://airflow:airflow@mysql/airflow | |
parallelism = 32 | |
dag_concurrency = 16 |
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
# airflow/plugins/slack.py | |
import logging | |
from airflow.operators.python_operator import PythonOperator | |
from airflow.plugins_manager import AirflowPlugin | |
from slackclient import SlackClient | |
from titan.utils import config | |
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 fileinput | |
def main(): | |
for line in fileinput.input(): | |
i, j = [int(x) for x in line.split()] | |
# beware the min and max! | |
low = min(i, j) | |
high = max(i, j) | |
print('%d %d %d' % (i, j, solve(low, high))) |
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 fileinput | |
def solve(sequence): | |
pass | |
def main(): | |
sequence = [] | |
for line in fileinput.input(): | |
for word in line.split(): |
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
# Problem A - The 3n + 1 problem | |
# https://vjudge.net/contest/145712#problem/A | |
# Author: Adam | |
import sys | |
import functools | |
@functools.lru_cache(maxsize=1000000) | |
def cycle_len(k): | |
if k == 1: |
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
// All units inches | |
function form(length, width, height, thickness) { | |
return union([ | |
cube({size: [length, thickness, height]}), | |
cube({size: [length, thickness, height]}) | |
.translate([0, width - thickness, 0]), | |
cube({size: [thickness, width, height]}), | |
cube({size: [thickness, width, height]}) | |
.translate([length - thickness, 0, 0]) |
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
init_config: null | |
instances: | |
- collect_activity_metrics: true | |
collect_default_database: true | |
collect_function_metrics: true | |
dbname: mydb | |
host: main-database.example.com | |
password: mypassword | |
port: 5432 | |
relations: null |
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
# dbt_utils/dbt_project.yml | |
name: 'dbt_utils' | |
version: '0.1.0' |
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
// All units inches | |
var extrude_ = 0.1; | |
var nutSize = 0.375; | |
var threadDiameter = 0.22; | |
var screwPosition = [0.5, 0.5]; | |
function makeHalf() { | |
var half = polygon([ | |
[0,0.7], |
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 aiohttp | |
import asyncio | |
import sqlite3 | |
URLS = [ | |
'http://www.foxnews.com/', | |
'http://www.cnn.com/', | |
'http://europe.wsj.com/', | |
'http://www.bbc.co.uk/', |