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
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "github.com/golang/snappy" | |
| ) | |
| func main() { |
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
| # MIT License | |
| # Copyright (c) 2019 Bellhops Inc. | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
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
| from datetime import datetime, timedelta | |
| import networkx as nx | |
| from airflow import DAG | |
| from airflow.operators import BashOperator, SubDagOperator | |
| start_date = datetime(year=2017, month=6, day=13, hour=19, minute=0) | |
| schedule_interval = '0 * * * 1-5' | |
| default_args = { |
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 python3.5 | |
| from time import time | |
| import dask.dataframe as dd | |
| import pandas as pd | |
| from cassandra.cluster import Cluster | |
| from cassandra.concurrent import execute_concurrent | |
| from cassandra.policies import ConstantReconnectionPolicy |
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
| # -*- coding: utf-8 -*- | |
| """ | |
| LICENSE: BSD (same as pandas) | |
| example use of pandas with oracle mysql postgresql sqlite | |
| - updated 9/18/2012 with better column name handling; couple of bug fixes. | |
| - used ~20 times for various ETL jobs. Mostly MySQL, but some Oracle. | |
| to do: | |
| save/restore index (how to check table existence? just do select count(*)?), | |
| finish odbc, |
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
| su - root | |
| # gpinitsystem fails to change the postgresql.conf port setting without ed | |
| yum install ed unzip -y | |
| groupadd -g 8000 gpadmin | |
| useradd -m -s /bin/bash -d /home/gpadmin -g gpadmin -u 8000 gpadmin | |
| passwd gpadmin | |
| mkdir -p /data/master |
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 | |
| # How to use | |
| # 1. Replace the "YOURIP" to yourIP | |
| #sed -i -e 's/YOURIP/192.168.x.x/g' setup-taiga-centos.sh | |
| # 2. Run at the root | |
| #source setup-taiga-centos.sh |
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
| sudo su | |
| # Java | |
| yum -y install java-1.8.0-openjdk-devel | |
| # Build Esentials (minimal) | |
| yum -y install gcc gcc-c++ kernel-devel make automake autoconf swig git unzip libtool binutils | |
| # Extra Packages for Enterprise Linux (EPEL) (for pip, zeromq3) | |
| yum -y install epel-release |
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
| (r'^articles/(?P<year>\d{4}/?$, 'main.views.year'), | |
| # When a use case comes up that a month needs to be involved as | |
| # well, you add an argument in your regex: | |
| (r'^articles/(?P<year>\d{4}/(?P<month>\d{2})/?$, 'main.views.year_month'), | |
| # That works fine, unless of course you want to show something | |
| # different for just the year, in which case the following case can be | |
| # used, making separate views based on the arguments as djangoproject |