This file contains 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 logging | |
import time | |
from datetime import datetime, timedelta | |
from airflow.decorators import dag, task | |
def dag_timed_out_logging(context): | |
if context.get("reason") == "timed_out": | |
logging.error(f"""DAG timed out: {context.get("dag").safe_dag_id}""") |
This file contains 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/sh | |
# 達人に学ぶSQL徹底指南書 第2版 1-1. CASE式のススメ の CASE式の中で集約関数を使うサンプル | |
# "HAVING句で条件分岐させるのは素人のやること。プロはSELECT句で分岐させる" | |
set -Ceux | |
cat << EOF | sqlite3 test.sqlite3 | |
DROP TABLE student_club; | |
CREATE TABLE student_club ( |
This file contains 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
private fun fadeIn(view: View) { | |
view.apply { | |
alpha = 0f | |
visibility = View.VISIBLE | |
animate() | |
.alpha(1f) | |
.setDuration(300) | |
.setListener(null) | |
} | |
} |
This file contains 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
# Insert your preferred key mappings here. | |
map d removeTab | |
map u restoreTab | |
map b Vomnibar.activateTabSelection | |
map t Vomnibar.activateInNewTab |
This file contains 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
// Go - job queue, worker, and gracefull shutdown | |
package main | |
import ( | |
"context" | |
"errors" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
This file contains 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
map d closeTab | |
map u lastClosedTab | |
map b :buffer<Space> | |
map B :bookmarks<Space> | |
let locale = "jp" | |
let completionengines = ["google"] | |
let defaultengine = "google.co.jp" |
This file contains 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
class Shape(object): | |
__delimiter = "_" | |
def __init__(self): | |
""" | |
>>> shape = Shape() | |
>>> shape.add([1, 2, 3, 4]) | |
>>> shape.add([1, 2, 5, 6]) | |
>>> shape.add([3, 4, 7, 8]) | |
>>> shape.outlines() |
This file contains 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
puts "# Test 1" | |
class Base1 | |
def self.set_message message | |
@@message = message | |
end | |
def put_message point | |
@@message % point | |
end | |
end |
This file contains 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
window.urls = {} | |
search_urls = (url) -> | |
casper.thenOpen url, -> | |
window.urls[url] = [] | |
children = @evaluate -> | |
search_innner_href() | |
window.urls[url] = children | |
casper.then -> |
This file contains 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
# vim: set fileencoding=utf-8 : | |
# Created: 2014-01-19 | |
# Git submodule update within python subprocess | |
import os | |
import subprocess | |
GIT = "git" | |
SUBMODULE = "submodule" | |
FOREACH = "foreach" |
NewerOlder