Skip to content

Instantly share code, notes, and snippets.

Topi Tjukanov tjukanovt

Block or report user

Report or block tjukanovt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View finnish_voting_districts_2019.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View hsl_hfp_data.py
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 14 16:54:39 2019
@author: topit
MQTT part based on: http://www.steves-internet-guide.com/into-mqtt-python-client/
API docs for HSL high-frequency positioning: https://digitransit.fi/en/developers/apis/4-realtime-api/vehicle-positions/
"""
import paho.mqtt.client as mqtt
@tjukanovt
tjukanovt / twitterbot.py
Created Jul 2, 2018
A super simple Twitter bot application posting random csv content every 2 hours
View twitterbot.py
import tweepy
import random
import pandas as pd
import time
#get your codes from https://apps.twitter.com/
consumer_key = 'your_code_here'
consumer_secret = 'your_code_here'
access_token = 'your_code_here'
access_token_secret = 'your_code_here'
View FTA_trains.py
import requests
import csv
from datetime import timedelta
import dateutil.parser
import time
i=0
sleep = 15
View marinetraffic.py
import requests
import csv
import datetime
import calendar
import time
i=0
# Change the range depending on how long you like to record the data
for i in range (0,50):
@tjukanovt
tjukanovt / api_calls.py
Last active Aug 29, 2018
Two Python scripts that can be used to create animated route maps to multiple locations
View api_calls.py
import pandas as pd
import urllib.request
# path to your csv file with the endpoint coordinates
coordinates = pd.read_csv('swe_points.csv')
# graphhopper API call building blocks. Check Graphhopper documentation how to modify these.
urlStart = 'http://localhost:8989/route?'
point = 'point='
urlEnd = '&type=gpx&instructions=false&vehicle=car'
You can’t perform that action at this time.