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
"""Xonsh activate script for virtualenv""" | |
from xonsh.tools import get_sep as _get_sep | |
def _deactivate(args): | |
if "pydoc" in aliases: | |
del aliases["pydoc"] | |
if ${...}.get("_OLD_VIRTUAL_PATH", ""): | |
$PATH = $_OLD_VIRTUAL_PATH | |
del $_OLD_VIRTUAL_PATH |
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
I AM YOUR FAILURE CALLBACK AHAHA | |
dict_keys(['conf', 'dag', 'dag_run', 'data_interval_end', 'data_interval_start', 'ds', 'ds_nodash', 'execution_date', 'inlets', 'logical_date', 'macros', 'next_ds', 'next_ds_nodash', 'next_execution_date', 'outlets', 'params', 'prev_data_interval_start_success', 'prev_data_interval_end_success', 'prev_ds', 'prev_ds_nodash', 'prev_execution_date', 'prev_execution_date_success', 'prev_start_date_success', 'run_id', 'task', 'task_instance', 'task_instance_key_str', 'test_mode', 'ti', 'tomorrow_ds', 'tomorrow_ds_nodash', 'ts', 'ts_nodash', 'ts_nodash_with_tz', 'var', 'conn', 'yesterday_ds', 'yesterday_ds_nodash', 'reason']) | |
KeysView(<airflow.configuration.AirflowConfigParser object at 0x7f4bbedd2e50>) | |
task_failure | |
branch_none__t3__20211203 | |
<TaskInstance: branch_none.t3 manual__2021-12-03T10:00:34.643888+00:00 [upstream_failed]> | |
None |
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
from airflow.models import DAG | |
from airflow.utils.dates import days_ago | |
from airflow.operators.dummy import DummyOperator | |
from airflow.operators.python_operator import PythonOperator | |
def foo(**context): | |
print(context['ds_nodash']) | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 random | |
from math import exp, factorial | |
import py5 | |
no_noise = True | |
noise_range = 0.25 | |
show_fit = False | |
show_diff = False |
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
xmin = -5 | |
xmax = 5 | |
ymin = -5 | |
ymax = 5 | |
rangex = ymax - xmin | |
rangey = ymax - ymin | |
shift_x = 0 |
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 functools | |
import time | |
from collections import abc | |
from typing import Callable, Optional, Union | |
Step = abc.Callable | |
def step(description: str) -> Step: | |
def _step(func): |
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
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=480m use_temp_path=off; | |
server { listen 80; listen [::]:80; | |
server_name edexp.club; | |
# Backend | |
location /api/ { | |
# rewrite ^/api(.*)$ $1 break; | |
proxy_pass http://localhost:5000/; | |
proxy_http_version 1.1; |
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/env python | |
from __future__ import annotations | |
import itertools | |
import pathlib | |
import operator | |
from typing import Dict, List, NamedTuple, Optional, Tuple, Union |
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
#!/usr/bin/env python2 | |
from datetime import datetime as dt | |
import os | |
from dot3k import lcd | |
if __name__ == "__main__": | |
lcd.write(dt.now().strftime("%Y/%m/%d %H:%M")) |