Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MachineLearningIsEasy
MachineLearningIsEasy / docker-job.py
Created July 2, 2021 07:47
Airflow DAG with PythonVirtualenvOperator Task
from datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from airflow.operators.docker_operator import DockerOperator
from airflow.operators.python_operator import BranchPythonOperator, PythonOperator, PythonVirtualenvOperator
from airflow.operators.dummy_operator import DummyOperator
import os
default_args = {
'owner' : 'dimon',
{
"cells": [
{
"attachments": {
"98545d9b-cfbb-46c5-b45a-60eddbb6b6b5.png": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAANAAAACJCAIAAADSRyEcAAAAA3NCSVQICAjb4U/gAAAgAElEQVR4nOy9d7xeVZU+vtbe+5S3335z0zupBAKEEqSI0mQQFBS7jm2U0bGXsY36FeuIZey9MgwKYqELARIISSAkISH1pt5e33vfes7Za/3+2Oec9703BEEHJ+pvfyjJW857ynPWep5nrb0PMjP8ow9mBmACYEQJiPXvkV+k6hBVh3V1hL08BUXQVSYfUKCwUSXQSgu7UbrNwmkSdiMKOXHTGpgBBQJO2vI/5sB/YMDFOIN6lASlHn90lz+yzR/dGYzv1+Ueqo5wUGLygAIAAgYABkAAAERAgcIC6QorK90WmZqhcgvsxqVWw1KVnSdUovZrrP9/5P1DAo6ZgYEJhTIvkJevDmyq9j5YHVgf5PfoyiCThygAFQoLhAIUAAIAQ5zVbctsAJiANVDA7AMFgAJVWqam280r3PaznfazrYaF0Y8TMAFK/IeE3T8Y4JgZCAAQJQCQX6j0PFA+9Ltq39qgcIjJQ2mjdBEtRsEMzADACIxIIvovACMCMDAgAzIjATILAgQQiIAAgIysWVdZV4EJ7Qa7abk7/aLEjEvthkXhvhhcovi/Ox3/B+MfB3DMTABoLrA3sr3YeWP50O+C/F4AQpVE4TAKYgAmgWRhoEQgkQBAs/S0qpJd1bZPVsBSs0AAhdoSgS09R3i28C0RIBIzBqx8Upolg0BEgQwUkC6x9oTd6LSfmZp7TWLGpcJKQQi7f6Bo9w8BODZEDQUAlLvXFHZ9v9J9D3l5oVKoXGZBzAhkC9+WPgKXAneo0tBdbj1SbO8ptQ1UGke9XFEnKtr1taVBMAhAEEAKtSP9pKpkrUKTM9qeGJyW7JuW7G13B7PWuBI6IOWRHbBEF
import datetime
import time
import pandas as pd
from airflow import DAG
from airflow.operators.python_operator import PythonOperator, PythonVirtualenvOperator
from airflow.operators.postgres_operator import PostgresOperator
from airflow.models import Variable
import psycopg2
import os
import sys
@MachineLearningIsEasy
MachineLearningIsEasy / COCO_data.ipynb
Created May 4, 2021 11:44
COCO data visualization
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MachineLearningIsEasy
MachineLearningIsEasy / weather_api.py
Created April 27, 2021 18:57
Airflow with Postgresql
import datetime
import time
import requests
import pandas as pd
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator
from airflow.operators.postgres_operator import PostgresOperator
from airflow.models import Variable
import os
import datetime
import time
import requests
import pandas as pd
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator
from airflow.models import Variable
import os
from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from datetime import datetime, timedelta
# Following are defaults which can be overridden later on
args = {
'owner': 'dimon',
'start_date':datetime(2018, 11, 1),
'provide_context':True
}
@MachineLearningIsEasy
MachineLearningIsEasy / 3_Тюнинг_модели_отбор_фичей.ipynb
Created October 26, 2020 20:26
NLP grid search, feature selection, grid search
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MachineLearningIsEasy
MachineLearningIsEasy / 2_Векторные_представления.ipynb
Created October 22, 2020 11:19
NLP векторные представления текстов
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.