Skip to content

Instantly share code, notes, and snippets.

View cra's full-sized avatar
🔥

igor cra

🔥
View GitHub Profile
@cra
cra / nginx.conf
Last active March 25, 2021 12:17
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;
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):
xmin = -5
xmax = 5
ymin = -5
ymax = 5
rangex = ymax - xmin
rangey = ymax - ymin
shift_x = 0
import random
from math import exp, factorial
import py5
no_noise = True
noise_range = 0.25
show_fit = False
show_diff = False
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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'])
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
"""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
2022.05.05 00:47:02.332298 [ 261 ] {} <Error> void DB::StorageKafka::threadFunc(size_t): Code: 33. DB::ParsingException: Unexpected end of stream while parsing JSONEachRow format: while parsing Kafka message (topic: andrey_bratukhin_lab03_in, partition: 0, offset: 36934)': While executing Kafka: (at row 2)
. (CANNOT_READ_ALL_DATA), Stack trace (when copying this message, always include the lines below):
0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xa82d07a in /usr/bin/clickhouse
1. DB::JSONEachRowRowInputFormat::advanceToNextKey(unsigned long) @ 0x14904954 in /usr/bin/clickhouse
2. DB::JSONEachRowRowInputFormat::readJSONObject(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&) @ 0x149043e1 in /usr/bin/clickhouse
3. DB::JSONEachRowRowInputFormat::readRow(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::
2022.05.05 00:47:02.330955 [ 261 ] {} <Trace> StorageKafka (lab4_kafka_queue): Polled batch of 599 messages. Offsets position: [ andrey_bratukhin_lab03_in[0:37533] ]
2022.05.05 00:47:02.331745 [ 261 ] {} <Trace> StorageKafka (lab4_kafka_queue): Re-joining claimed consumer after failure
2022.05.05 00:47:02.332298 [ 261 ] {} <Error> void DB::StorageKafka::threadFunc(size_t): Code: 33. DB::ParsingException: Unexpected end of stream while parsing JSONEachRow format: while parsing Kafka message (topic: andrey_bratukhin_lab03_in, partition: 0, offset: 36934)': While executing Kafka: (at row 2)
. (CANNOT_READ_ALL_DATA), Stack trace (when copying this message, always include the lines below):
0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xa82d07a in /usr/bin/clickhouse
1. DB::JSONEachRowRowInputFormat::advanceToNextKey(unsigned long) @ 0x14904954 in /usr/bin/clickhouse
2. DB::JSONEachRowRowInputFormat::readJSONObject(std::__1::