Skip to content

Instantly share code, notes, and snippets.

@hellais
hellais / color-picker-output.txt
Last active October 20, 2023 10:33
Dark or Light color picker based on luminace
gray0 (#f8f9fa): #000000
gray1 (#f1f3f5): #000000
gray2 (#e9ecef): #000000
gray3 (#dee2e6): #000000
gray4 (#ced4da): #000000
gray5 (#adb5bd): #000000
gray6 (#868e96): #000000
gray7 (#495057): #ffffff
gray8 (#343a40): #ffffff
gray9 (#212529): #ffffff
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gpx version="1.1" xmlns="http://www.topografix.com/GPX/1/1" xmlns:osmand="https://osmand.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<wpt lat="53.03101" lon="13.30311">
<name>Shower Wonderland</name>
<extensions>
<osmand:icon>shop_books</osmand:icon>
<osmand:background>circle</osmand:background>
<osmand:color>#ff3f51b5</osmand:color>
<osmand:amenity_name>Shower Wonderland</osmand:amenity_name>
<osmand:amenity_type>showers</osmand:amenity_type>
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 13 columns, instead of 6. in line 3.
input,probe_cc,probe_asn,test_name,measurement_start_time,anomaly,scores,confirmed,msm_failure,domain,category_code,blocking_type,explorer_url
https://shweyaunglan.com/,MM,58952,web_connectivity,2020-11-02 14:15:40,True,"{'blocking_general': 1.0, 'blocking_global': 0.0, 'blocking_country': 0.0, 'blocking_isp': 0.0, 'blocking_local': 0.0, 'analysis': {'blocking_type': 'dns'}}",False,False,shweyaunglan.com,NEWS,confirmed,https://explorer.ooni.org/measurement/20201102T141443Z_webconnectivity_MM_58952_n1_rewMBa8ca9CdF1vH?input=https%3A%2F%2Fshweyaunglan.com%2F
https://mc.warnaing.website/,MM,58952,web_connectivity,2020-11-03 03:46:31,False,"{'blocking_general': 0.0, 'blocking_global': 0.0, 'blocking_country': 0.0, 'blocking_isp': 0.0, 'blocking_local': 0.0}",False,False,mc.warnaing.website,NEWS,ok,https://explorer.ooni.org/measurement/20201103T034555Z_webconnectivity_MM_58952_n1_VnkIRYzvUxWqiCMU?input=https%3A%2F%2Fmc.warnaing.website%2F
https://coronavirus.app/,MM,132167,web_connectivity,2020-11-26 20:26:26,Fals
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import os
import io
import yaml
import json
from datetime import datetime, timedelta
import pandas as pd
import psycopg2
import boto3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 9 columns, instead of 4. in line 6.
,input,measurement_start_time,http_experiment_failure,blocking,report_id,probe_cc,probe_asn,input_name
14,http://www.therealcuba.com/,2017-05-31 00:43:43,,http-diff,20170531T004025Z_AS27725_hxX2uLGCA4NngoDcAlsNSTjnXZlA3Q5qtejSucNF2gJxz6Kjua,CU,27725,therealcuba.com
20,https://www.cubanet.org/,2017-05-31 00:47:48,response_never_received,http-failure,20170531T004745Z_AS27725_32tEB17Lm9JjVq2xr6jwlEA9LYSbOg7LjuGZZVqzgf0QBi6d8C,CU,27725,cubanet.org (https)
17,http://www.therealcuba.com/,2017-05-31 00:47:58,,http-diff,20170531T004745Z_AS27725_32tEB17Lm9JjVq2xr6jwlEA9LYSbOg7LjuGZZVqzgf0QBi6d8C,CU,27725,therealcuba.com
18,http://www.14ymedio.com/,2017-05-31 00:52:20,,http-diff,20170531T004745Z_AS27725_32tEB17Lm9JjVq2xr6jwlEA9LYSbOg7LjuGZZVqzgf0QBi6d8C,CU,27725,14ymedio.com
19,https://www.cibercuba.com/,2017-05-31 00:53:42,response_never_received,http-failure,20170531T004745Z_AS27725_32tEB17Lm9JjVq2xr6jwlEA9LYSbOg7LjuGZZVqzgf0QBi6d8C,CU,27725,cibercuba.com (https)
21,https://www.cibercuba.com/,2017-05-31 01:08:14,resp