Skip to content

Instantly share code, notes, and snippets.

View Rub21's full-sized avatar
🐕

Ruben L. Mendoza Rub21

🐕
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from requests_oauthlib import OAuth2Session
client_id = r'CV5dBzhOwDZkZeCj4xyosVOIJAkTuCZm-HlCK0P2Sfw'
client_secret = r'l3kMZgDojx8Kylh1_L0Eh9WD7KFORM4UEKZku66A7GY'
redirect_uri = 'http://127.0.0.1:8111/oauth_authorization'
scope = ["read_prefs"]
oauth = OAuth2Session(client_id=client_id, redirect_uri=redirect_uri, scope=scope)
authorization_url, state = oauth.authorization_url('https://www.openstreetmap.org/oauth2/authorize')
from requests_oauthlib import OAuth2Session
client_id = r'n6BbW1HCLeK5ImKkRsrVjYkn2sdaroPIGLASpdovvXY'
client_secret = r'Bx7fPt8jPPi0jN9sv6GBMULlvo_5crNUGul_XxgZ5I4'
redirect_uri = 'http://127.0.0.1:8111/oauth_authorization'
scope = ["read_prefs"]
oauth = OAuth2Session(client_id=client_id, redirect_uri=redirect_uri, scope=scope)
authorization_url, state = oauth.authorization_url('https://staging.openhistoricalmap.org/oauth2/authorize')
print(f"Visit {authorization_url} and paste the code in")
code = input()
token = oauth.fetch_token('https://staging.openhistoricalmap.org/oauth2/token',
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import os
import glob
import tensorflow as tf
save_path = 'tf_serving_warmup_requests'
tfrecords_path = glob.glob('*_human_activities_*.tfrecords')
dataset = tf.data.TFRecordDataset(tfrecords_path)
writer = tf.data.experimental.TFRecordWriter(save_path)
writer.write(dataset)
@Rub21
Rub21 / Difference between EPSG 4326 & 3857
Last active January 18, 2023 04:37 — forked from keum/Difference between EPSG 4326 & 3857
EPSG 4326 and EPSG 3857 of Web Mercator
EPSG: 4326 uses a coordinate system on the surface of a sphere or ellipsoid of reference.
WGS 84 - Earth as Geoid. -Mercator
EPSG: 3857 uses a coordinate system PROJECTED from the surface of the
sphere. Earth as perfectly sphere. -Web Mercator
Think of it as this way:
EPSG 4326 uses a coordinate system the same as a GLOBE (curved surface).
EPSG 3857 uses a coordinate system the same as a MAP (flat surface).
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
id,date,currency,eur_rate,uah_rate,usd_rate,countries
20220101eur,2022-01-01,EUR,1.0,31.015503,1.136796,"AND, AUT, BEL, CYP, CZE, EST, FIN, FRA, DEU, GRC, IRL, ITA, LVA, LTU, LUX, MLT, MCO, MNE, NLD, PRT, SMR, SVK, SVN, ESP"
20220102eur,2022-01-02,EUR,1.0,31.027851,1.138068,"AND, AUT, BEL, CYP, CZE, EST, FIN, FRA, DEU, GRC, IRL, ITA, LVA, LTU, LUX, MLT, MCO, MNE, NLD, PRT, SMR, SVK, SVN, ESP"
20220103eur,2022-01-03,EUR,1.0,30.809453,1.129396,"AND, AUT, BEL, CYP, CZE, EST, FIN, FRA, DEU, GRC, IRL, ITA, LVA, LTU, LUX, MLT, MCO, MNE, NLD, PRT, SMR, SVK, SVN, ESP"
20220104eur,2022-01-04,EUR,1.0,30.771885,1.128253,"AND, AUT, BEL, CYP, CZE, EST, FIN, FRA, DEU, GRC, IRL, ITA, LVA, LTU, LUX, MLT, MCO, MNE, NLD, PRT, SMR, SVK, SVN, ESP"
20220105eur,2022-01-05,EUR,1.0,31.064821,1.130775,"AND, AUT, BEL, CYP, CZE, EST, FIN, FRA, DEU, GRC, IRL, ITA, LVA, LTU, LUX, MLT, MCO, MNE, NLD, PRT, SMR, SVK, SVN, ESP"
20220106eur,2022-01-06,EUR,1.0,31.046437,1.130029,"AND, AUT, BEL, CYP, CZE, EST, FIN, FRA, DEU, GRC, IRL, ITA, LVA,
Sending build context to Docker daemon 853B
Step 1/11 : FROM python:3.7-alpine
---> 04ffff590161
Step 2/11 : RUN apk update && apk add git
---> Running in 511c8c2a2c18
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
v3.16.1-93-g26e44ca6a3 [https://dl-cdn.alpinelinux.org/alpine/v3.16/main]
v3.16.1-93-g26e44ca6a3 [https://dl-cdn.alpinelinux.org/alpine/v3.16/community]
OK: 17034 distinct packages available
@Rub21
Rub21 / web.log
Created August 3, 2022 01:52
ohm web correct logs
aiting to start rails ports server...
Waiting to start rails ports server...
/var/www/config/initializers/config.rb:19: warning: already initialized constant ALLOWED_STATUS
/var/www/config/initializers/config.rb:19: warning: previous definition of ALLOWED_STATUS was here
Waiting to start rails ports server...
autoprefixer: /var/www/app/assets/stylesheets/screen-rtl.css:1:58203: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
autoprefixer: /var/www/app/assets/stylesheets/screen-ltr.css:4147:3: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
Waiting to start rails ports server...
autoprefixer: /var/www/app/assets/stylesheets/leaflet-all.scss:655:3: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
autoprefixer: /var/www/app/assets/stylesheets/embed.scss:655:3: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.