Skip to content

Instantly share code, notes, and snippets.

View CharlesAHunt's full-sized avatar
🏠
Working from home

Charles Hunt CharlesAHunt

🏠
Working from home
  • Everywhere, USA
View GitHub Profile
### Keybase proof
I hereby claim:
* I am charlesahunt on github.
* I am charleshunt (https://keybase.io/charleshunt) on keybase.
* I have a public key ASAf2sF41LjIJQwLsmBL1sALyUSKehSx8hLXWCU8k-qi_Ao
To claim this, I am signing this object:
from airflow.operators.python_operator import PythonOperator
from airflow import DAG
from datetime import datetime, timedelta
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'start_date': datetime(2019, 1, 1),
'email': ['support@tg.com'],
@CharlesAHunt
CharlesAHunt / KafkaConsumer.scala
Last active June 29, 2018 17:49
Kafka Consumer Get Latest 10 messages Example
import collection.JavaConverters._
object KafkaConsumer {
val topicName = "yourTopicName"
val partitionNumber = 1
val offsetOnPoll = 10
val topicPartition = new TopicPartition(topicName, partitionNumber)
def main(args: Array[String]): Unit = {
### Keybase proof
I hereby claim:
* I am charlesahunt on github.
* I am charlesahunt (https://keybase.io/charlesahunt) on keybase.
* I have a public key ASDXn8Qb6gHbrcyr_Q0PERArlHwoG6IR9Gpz0Cu0IfM_Fgo
To claim this, I am signing this object: