This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
const flat = require('flat') | |
const l = require('lodash') | |
const dirTree = require("directory-tree"); | |
var unzippedTurkeyDir = '/Users/zzz/exp/rubbish/gm_test/turkey_regions/TUฬRKIฬYE' | |
var exportJSONforMongo = '/Users/zzz/exp/rubbish/gm_test/turkey_regions/places.json' | |
// fs.appendFileSync('/Users/zzz/exp/rubbish/gm_test/osm_turkey/result.json', '['); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'), | |
es = require('event-stream'), | |
csv = require('csv-parser') | |
var input = '/Users/zzz/code/gitHub/ground_motion/additional/sample_data/ziya_hoca/levels_new/250m.csv' | |
var output = '/Users/zzz/code/gitHub/ground_motion/additional/sample_data/ziya_hoca/levels_new/250m.geojson' | |
var x_inc = 0.00298157703587, | |
y_inc = 0.00225232613786 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Download Anaconda .sh file locally for linux server from https://www.anaconda.com/products/individual and move it to remote server using the following command | |
ssh -r <path>/Anaconda-latest-Linux-x86_64.sh [email protected]:/root/test | |
2. Enter to remote server using ssh tunnelling. Make sure that port 8000 is open and not being blocked by copying PID using the following command and subsequently using it to free port. Note: VSCode will not throw any error, not even jupyter notebook server but we won't be able to connect. Very annoying ... | |
sudo lsof -i :8000 | |
sudo kill -9 14135 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Table: POI list with weights and radius of impact, per OSM. The key values are based on the OSM specifications. The weights range from 0 to 1 (maximum impact level) and describe their relative importance. The radius of impact describes the maximum distance at which road segments are affected by the presence of a given POI class. | |
| Activity Group | Key | Value | Maximum Impact Level | Impact Radius in meters | | |
| ------------- | ------------- | ------------- | ------------- | ------------- | | |
|work | amenity | conference_centre | 1 | 5000| | |
|leisure | building | stadium | 1 | 5000| | |
|work | amenity | bus_station | 0.6 | 1000| | |
|work | amenity | clinic | 0.8 | 500| | |
|education | amenity | college | 0.8 | 500| | |
|education | building | college | 0.8 | 500| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import _thread | |
import time | |
# import os | |
# import sys | |
# import base64 | |
# print(os.environ['SSL_CERT_FILE']) | |
# from kafka.admin import KafkaAdminClient, NewTopic | |
# from kafka import KafkaProducer | |
# from datetime import timedelta |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import websockets | |
import json | |
import time | |
import os | |
import ssl | |
from datetime import datetime, timezone | |
async def connect_ais_stream(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import _thread | |
import time | |
import os | |
import sys | |
import base64 | |
import asyncio | |
import websocket | |
import json | |
import ssl | |
from datetime import datetime, timezone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"ALOS (DAICHI)": [[-5971562, -2719358, 1716354500], [-5979037, -2749575, 1716354505], [-5986541, -2779789, 1716354510], [-5994075, -2809998, 1716354515], [-6001640, -2840204, 1716354520], [-6009235, -2870405, 1716354525], [-6016862, -2900601, 1716354530], [-6024521, -2930794, 1716354535], [-6032213, -2960982, 1716354540], [-6039938, -2991166, 1716354545], [-6047697, -3021345, 1716354550], [-6055491, -3051520, 1716354555], [-6063319, -3081690, 1716354560], [-6071184, -3111855, 1716354565], [-6079085, -3142016, 1716354570], [-6087023, -3172172, 1716354575], [-6094999, -3202324, 1716354580], [-6103013, -3232470, 1716354585], [-6111067, -3262612, 1716354590], [-6119160, -3292748, 1716354595], [-6127295, -3322880, 1716354600], [-6135470, -3353006, 1716354605], [-6143688, -3383128, 1716354610], [-6151949, -3413244, 1716354615], [-6160253, -3443354, 1716354620], [-6168602, -3473460, 1716354625], [-6176996, -3503560, 1716354630], [-6185437, -3533655, 1716354635], [-6193924, -3563744, 1716354640], [-6202460, -3593828 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"ALOS (DAICHI)": [[16096848, 4401076, 1716257460], [16086506, 4431063, 1716257465], [16076081, 4461042, 1716257470], [16065569, 4491012, 1716257475], [16054970, 4520975, 1716257480], [16044280, 4550930, 1716257485], [16033500, 4580877, 1716257490], [16022625, 4610815, 1716257495], [16011656, 4640744, 1716257500], [16000587, 4670665, 1716257505], [15989420, 4700578, 1716257510], [15978153, 4730481, 1716257515], [15966780, 4760375, 1716257520], [15955301, 4790260, 1716257525], [15943713, 4820135, 1716257530], [15932015, 4850001, 1716257535], [15920203, 4879857, 1716257540], [15908276, 4909703, 1716257545], [15896229, 4939538, 1716257550], [15884062, 4969364, 1716257555], [15871770, 4999179, 1716257560], [15859352, 5028983, 1716257565], [15846805, 5058776, 1716257570], [15834124, 5088558, 1716257575], [15821308, 5118329, 1716257580], [15808353, 5148088, 1716257585], [15795255, 5177835, 1716257590], [15782013, 5207570, 1716257595], [15768620, 5237293, 1716257600], [15755076, 5267003, 1716257605], [15741376, 5296 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"ALOS (DAICHI)": [[3479473, 8061279, 1716346763], [3321159, 8045037, 1716346768], [3168126, 8028118, 1716346773], [3020302, 8010563, 1716346778], [2877593, 7992401, 1716346783], [2739887, 7973665, 1716346788], [2607059, 7954385, 1716346793], [2478973, 7934593, 1716346798], [2355483, 7914315, 1716346803], [2236440, 7893577, 1716346808], [2121689, 7872408, 1716346813], [2011075, 7850828, 1716346818], [1904441, 7828861, 1716346823], [1801634, 7806528, 1716346828], [1702499, 7783848, 1716346833], [1606890, 7760844, 1716346838], [1514657, 7737529, 1716346843], [1425659, 7713923, 1716346848], [1339759, 7690040, 1716346853], [1256822, 7665895, 1716346858], [1176721, 7641504, 1716346863], [1099333, 7616876, 1716346868], [1024538, 7592027, 1716346873], [952224, 7566967, 1716346878], [882282, 7541707, 1716346883], [814608, 7516256, 1716346888], [749103, 7490626, 1716346893], [685673, 7464824, 1716346898], [624228, 7438858, 1716346903], [564681, 7412739, 1716346908], [506952, 7386471, 1716346913], [450961, 7360062, 171 |