Skip to content

Instantly share code, notes, and snippets.

View laughingman7743's full-sized avatar
🤣

laughingman7743

🤣
  • Niihama-shi
  • 09:56 (UTC +09:00)
View GitHub Profile
@laughingman7743
laughingman7743 / schema.cue
Last active June 19, 2022 15:40
cue import -f -p argoworkflow -l '#ArgoWorkflow:' pkg/argoworkflow/schema.json
package argoworkflow
#ArgoWorkflow: {
@jsonschema(schema="http://json-schema.org/schema#")
(#["io.argoproj.workflow.v1alpha1.ClusterWorkflowTemplate"] | #["io.argoproj.workflow.v1alpha1.CronWorkflow"] | #["io.argoproj.workflow.v1alpha1.Workflow"] | #["io.argoproj.workflow.v1alpha1.WorkflowEventBinding"] | #["io.argoproj.workflow.v1alpha1.WorkflowTemplate"]) & {
@jsonschema(id="http://workflows.argoproj.io/workflows.json")
...
}
#: "eventsource.CreateEventSourceRequest": {
@laughingman7743
laughingman7743 / Pipfile
Last active April 29, 2019 10:49
Triggering DAGs with Python script
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
google-api-python-client = "*"
requests = "*"
@laughingman7743
laughingman7743 / Pipfile
Created September 22, 2018 15:24
PyAthena performance
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
pandas = "*"
pyathena = {git = "https://github.com/laughingman7743/PyAthena.git", ref = "add_pandas_cursor"}
[dev-packages]
# Unless explicitly stated otherwise all files in this repository are licensed
# under the Apache License Version 2.0.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2017 Datadog, Inc.
from __future__ import print_function
import base64
import gzip
import json
import logging
@laughingman7743
laughingman7743 / .gitignore
Last active August 12, 2021 13:46
Terraform wrapper python
.idea
*.iml
*.tfstate
*.tfstate.backup
.terraform
*/*/*/__*.tf
!*/*/_template/__*.tf
Pipfile.lock
CREATE SCHEMA IF NOT EXISTS billing;
CREATE EXTERNAL TABLE IF NOT EXISTS billing.detailed_line_items_with_resources_and_tags (
invoice_id string,
payer_account_id string,
linked_account_id string,
record_type string,
record_id string,
product_name string,
rate_id string,
--- a/usr/local/lib/python2.7/site-packages/airflow/jobs.py
+++ b/usr/local/lib/python2.7/site-packages/airflow/jobs.py
@@ -35,7 +35,7 @@ import time
from time import sleep
import psutil
-from sqlalchemy import Column, Integer, String, DateTime, func, Index, or_
+from sqlalchemy import Column, Integer, String, DateTime, func, Index, or_, and_
from sqlalchemy.exc import OperationalError
from sqlalchemy.orm.session import make_transient
FROM redash/redash:1.0.0.b2521
COPY ./supervisord.conf /opt/redash/supervisord/supervisord.conf
COPY ./athena.py /opt/redash/current/redash/query_runner/athena.py
RUN sed -i -e "s/'Copy of/u'Copy of/g" /opt/redash/current/redash/models.py \
&& apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:openjdk-r/ppa \
&& apt-get update \
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
import logging
import time
import paramiko
#-*- coding: utf-8 -*-
# Copyright 2010-2015 Bastian Bowe
#
# This file is part of JayDeBeApi.
# JayDeBeApi is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#