Skip to content

Instantly share code, notes, and snippets.

View korniichuk's full-sized avatar

Ruslan Korniichuk korniichuk

View GitHub Profile
@korniichuk
korniichuk / lambda_function.py
Last active February 26, 2019 13:51
Medium. AWS Lambda with Pandas and NumPy
import pandas as pd
def lambda_handler(event, context):
pass
@korniichuk
korniichuk / application.py
Last active February 26, 2019 13:50
Medium. Deploy Plotly Dash app with Dash DAQ components on AWS cloud
import dash
import dash_html_components as html
app = dash.Dash(__name__)
app.scripts.config.serve_locally = True
app.css.config.serve_locally = True
app.layout = html.Div([
html.H1('Hello, World!')
@korniichuk
korniichuk / requirements.txt
Last active April 20, 2019 18:47
Medium. Deploy Plotly Dash app with Dash DAQ components on AWS cloud
dash==0.39.0
dash-daq==0.1.0
@korniichuk
korniichuk / web-monitoring.py
Last active February 26, 2019 14:44
Medium. Web Monitoring with Python
import os
import sys
from requestium import Session
username = 'name.surname@example.com'
passwd = 'password'
sid = '287321168'
driver = '/usr/lib/chromium-browser/chromedriver'
@korniichuk
korniichuk / rc.local
Created March 6, 2019 12:21
Medium. How to setup an open source Data Science environment with Python and R
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
@korniichuk
korniichuk / keyed_hash.py
Created April 18, 2019 11:36
Medium. Pseudonymization with keyed-hash function in Python and AWS
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import hashlib
import json
import boto3
email = 'ruslan@korniichuk.com'
@korniichuk
korniichuk / geonames.py
Last active May 2, 2019 10:02
Get location from mix of postal code, placename, and country
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Version: 0.1a2
import json
import numpy as np
import requests
def get_location(text, username, country_biases=[]):
@korniichuk
korniichuk / exchange.py
Created June 4, 2019 20:05
Returns the cross rates for selected currency
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Version: 0.1a1
# Introducing the API: https://swea.riksbank.se/sweaWS/docs/api/index.htm
# Series for web services: https://www.riksbank.se/en-gb/statistics/search-interest--exchange-rates/web-services/series-for-web-services/
import datetime
import zeep
@korniichuk
korniichuk / about_me.jpg
Last active June 14, 2024 11:42
About Me
about_me.jpg
@korniichuk
korniichuk / sns.py
Last active July 23, 2019 13:54
Amazon Simple Notification Service (SNS)
import boto3
sns = boto3.client('sns')
sns.publish(PhoneNumber='0048888888888', Message='Hello, World!')