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
DATE_NOW=$(echo $(date +%s) - 20 | bc); HDNTS=$(curl https://tp.srgssr.ch/akahd/token\?acl\=/i/enc20a_gop@141646/\* | jq .token.authparams -r | sed 's/^hdnts=//'); ffmpeg -i https://srgssrgop20a-lh.akamaihd.net/i/enc20a_gop@141646/master.m3u8\?start\=$DATE_NOW\&start\=$DATE_NOW\&hdnts\=$HDNTS -c copy video.ts |
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
# | |
# /etc/hosts: static lookup table for host names | |
# | |
#<ip-address> <hostname.domain.org> <hostname> | |
127.0.0.1 localhost.localdomain localhost | |
#::1 localhost.localdomain localhost | |
127.0.0.1 analytics.ti-edu.ch | |
127.0.0.1 lb.usemaxserver.de |
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
# Spotify | |
127.0.0.0 media-match.com | |
127.0.0.0 adclick.g.doublecklick.net | |
127.0.0.0 www.googleadservices.com | |
#127.0.0.0 open.spotify.com | |
127.0.0.0 pagead2.googlesyndication.com | |
#127.0.0.0 desktop.spotify.com | |
127.0.0.0 googleads.g.doubleclick.net | |
127.0.0.0 pubads.g.doubleclick.net | |
127.0.0.0 securepubads.g.doubleclick.net |
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
SELECT trip.uid FROM ( | |
SELECT DISTINCT st.trip_id, st.feed_id FROM stop_time as st | |
INNER JOIN (SELECT s.uid, s.id, s.feed_id FROM stop as s | |
WHERE | |
ST_Within( | |
s.position::geometry, | |
ST_MakeEnvelope( | |
5.9559,45.818, 10.4921, 47.8084, | |
4326) | |
) |
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
WITH stops_time AS ( | |
WITH stops_in_region AS ( | |
SELECT s.uid, s.id, s.feed_id FROM stop as s | |
WHERE | |
ST_Within( | |
s.position::geometry, | |
ST_MakeEnvelope( | |
5.9559,45.818, 10.4921, 47.8084, | |
4326) | |
) |
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
CREATE TABLE public.agency ( | |
uid varchar(255) NOT NULL, | |
id varchar(255) NOT NULL, | |
"name" varchar(255) NOT NULL, | |
url varchar(512) NULL, | |
timezone varchar(255) NULL, | |
lang varchar(20) NULL, | |
phone varchar(255) NULL, | |
feed_id varchar(64) NOT NULL, | |
fare_url varchar(512) NULL, |
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 json | |
from pprint import pprint | |
import time | |
from datetime import date,datetime,timedelta | |
from numpy import arange | |
import matplotlib.pyplot as plt | |
from matplotlib.dates import DayLocator, HourLocator, DateFormatter, drange, date2num | |
from matplotlib.markers import MarkerStyle | |
import numpy as np |
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 json | |
from pprint import pprint | |
import time | |
from datetime import date,datetime,timedelta | |
from numpy import arange | |
import matplotlib.pyplot as plt | |
from matplotlib.dates import DayLocator, HourLocator, DateFormatter, drange, date2num | |
from matplotlib.markers import MarkerStyle | |
import numpy as np |
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
Section "ServerLayout" | |
Identifier "layout" | |
Screen 0 "intel-edp1" | |
Screen 1 "intel-hdmi1" | |
EndSection | |
#Section "Device" | |
# Identifier "nvidia" | |
# BusID "PCI:1:0:0" | |
#EndSection |
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
fn deg2meter_lng(lng: f64) -> f64 { // X: E - W | |
111412.84 * lng.cos() - 93.5 * (3.0 * lng).cos() + 0.118 * (5.0 * lng).cos() | |
} | |
fn deg2meter_lat(lat: f64) -> f64 { // Y: N - S | |
111132.92 - 559.82 * (2.0 *lat).cos() + 1.175 * (4.0 *lat).cos() - 0.0023 * (6.0 *lat).cos() | |
} | |
// Orange | |
p1.lng = c2.lng + r2 * 1.0/deg2meter_lng(c2.lng); |