Skip to content

Instantly share code, notes, and snippets.

View filippchistiakov's full-sized avatar

Filipp Chistiakov filippchistiakov

View GitHub Profile
/**
* Unpivot a pivot table of any size.
*
* @param {A1:D30} data The pivot table.
* @param {1} fixColumns Number of columns, after which pivoted values begin. Default 1.
* @param {1} fixRows Number of rows (1 or 2), after which pivoted values begin. Default 1.
* @param {"city"} titlePivot The title of horizontal pivot values. Default "column".
* @param {"distance"[,...]} titleValue The title of pivot table values. Default "value".
* @return The unpivoted table
* @customfunction
@filippchistiakov
filippchistiakov / import_json_appsscript.js
Created September 23, 2019 08:41 — forked from chrislkeller/import_json_appsscript.js
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
/**
* Unpivot a pivot table of any size.
* https://stackoverflow.com/questions/24954722/how-do-you-create-a-reverse-pivot-in-google-sheets
* @param {A1:D30} data The pivot table.
* @param {1} fixColumns Number of columns, after which pivoted values begin. Default 1.
* @param {1} fixRows Number of rows (1 or 2), after which pivoted values begin. Default 1.
* @param {"city"} titlePivot The title of horizontal pivot values. Default "column".
* @param {"distance"[,...]} titleValue The title of pivot table values. Default "value".
* @return The unpivoted table
* @customfunction
from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from airflow.models import Variable
from parser_reviews_yandex_maps import parser_reviews
args = {'owner': 'philipp', 'start_date': '2019-06-26', 'catchup' :False, 'max_active_runs' :1}
url = 'https://yandex.ru/maps/org/yandex/123123/'
parser_reviews_dag = DAG(
df_desc=pd.DataFrame()
df_desc_no_out=pd.DataFrame()
for cur_tg in tqdm(df.teachers_group.unique()):
if cur_tg=='Математика':
frame_tg=df[df.teachers_group==cur_tg]
fig_subject_stats = plotly.tools.make_subplots(rows=6, cols=1, print_grid=False, subplot_titles=('Без выбросов',
'Все',
'Без выбросов. Распределение рабочих часов.',
'Все. Распределение рабочих часов.',
'Без выбросов. Распределение кол-ва проверенных работ.',