Skip to content

Instantly share code, notes, and snippets.

View atharvai's full-sized avatar

Atharva Inamdar atharvai

View GitHub Profile
@atharvai
atharvai / github_issues_to_jira_tickets.py
Last active July 4, 2024 01:22
migration script for open Github issues to JIRA Tickets
"""
Exports Issues from a specified repository to a CSV file and creates corresponding tickets in JIRA.
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
Use the following gist as config for this script: https://gist.github.com/atharvai/16996fbb73442f8a1cfb5bffb11c412e
"""
import csv
import requests
GITHUB_USER = ''
GITHUB_PASSWORD = ''
GITHUB_AUTH = (GITHUB_USER, GITHUB_PASSWORD)
REPO = '' # format is username/repo
JIRA_SERVER = 'https://jira.com'
JIRA_USER = '' # user must have permissions to create tickets and modify reporter.
JIRA_PASSWORD = ''
JIRA_AUTH = (JIRA_USER, JIRA_PASSWORD)
JIRA_PROJECT = '' # Project key
@atharvai
atharvai / kafka-connect-error-log
Created March 6, 2017 09:57
kafka-connect S3 sink NullPointerExceptionlog
[2017-03-03 21:03:13,774] INFO Connector S3SinkEventsCommunityVideoShare config updated (org.apache.kafka.connect.runtime.distributed.DistributedHerder)
[2017-03-03 21:03:14,463] INFO Rebalance started (org.apache.kafka.connect.runtime.distributed.DistributedHerder)
[2017-03-03 21:03:14,463] INFO Finished stopping tasks in preparation for rebalance (org.apache.kafka.connect.runtime.distributed.DistributedHerder)
[2017-03-03 21:03:14,463] INFO (Re-)joining group kafka-connect (org.apache.kafka.clients.consumer.internals.AbstractCoordinator)
[2017-03-03 21:03:14,464] INFO 172.17.0.1 - - [03/Mar/2017:21:03:13 +0000] "POST /connectors HTTP/1.1" 201 850 706 (org.apache.kafka.connect.runtime.rest.RestServer)
(io.confluent.connect.storage.hive.HiveConfig)
[2017-03-03 21:03:14,465] INFO Joined group and got assignment: Assignment{error=0, leader='connect-1-1f5856ec-ee7c-4d28-ba2c-cc30ffea582b', leaderUrl='http://leader:28082/', offset=15, connectorIds=[S3SinkEventsCommunityVideoShare], taskIds=[S3SinkEventsCommunityV
@atharvai
atharvai / pytz_all_timezones.json
Created March 13, 2017 15:10
List of all timezones from pytz 2016.10
[
"Africa/Abidjan",
"Africa/Accra",
"Africa/Addis_Ababa",
"Africa/Algiers",
"Africa/Asmara",
"Africa/Asmera",
"Africa/Bamako",
"Africa/Bangui",
"Africa/Banjul",
{% macro test_zero_table(schema, table, print_table=True) %}
{%- call statement('test_result', fetch_result=True) -%}
-- data test
select 1 as id, 'Drew' as name
{%- endcall -%}
Description: >
This template will deploy an EMR cluster and the necessary security groups. A bastion instance will also be
provisioned to allow SSH access. A Sagemaker notebook instance will also be configured with access to EMR.
Parameters:
EnvironmentName:
Description: An environment name that will be prefixed to resource names
Type: String
MinLength: 1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@atharvai
atharvai / snowplow-analytics-sdk-lambda-example-python2.py
Created January 8, 2019 14:28
AWS Lambda Snowplow Analytics SDK example functions
from __future__ import print_function
import snowplow_analytics_sdk.event_transformer
import snowplow_analytics_sdk.snowplow_event_transformation_exception
import base64
import json
print('Loading function')
{
"ts": 6642324230736183304,
"h": -1695843663874728470,
"v": 2,
"op": "u",
"ns": "analysts.analysts",
"o": {
"$set": {
"r": 0
}
field optional description
ts N BSON Timestamp. Often converted to 64bit INT for JSON
h Y Random hash
v N oplog protocol version. default 1.
op N Type of op. one of i, u, d, n, c
ns N BSON Namespacestring. Serialised as db.collection
o N Operation applied. object
o2 Y Object 2. Additional information, usually operand
fromMigrate Y Boolean. Indicates if this operation is part of chunk migration between shards