Add this file to your AI assistant's system prompt or context to help it avoid common AI writing patterns. Source: tropes.fyi by ossama.is
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 | |
| import csv | |
| import sys | |
| from datetime import datetime | |
| import os | |
| def make_reader(in_json): | |
| # Open location history data | |
| json_data = json.loads(open(in_json).read()) |
Google is extremely transparent about the Location History it has on you. You can check it out on the timeline feature in the Google Maps application on the phone, or on https://www.google.com/maps/timeline It is possible that you have that turned off, and in that case, consider yourself lucky.
If there is data there, you can view it online, or Download and Analyze it yourself.
- To extract that data, you can go to takeout.google.com and request for the Location History data from there.
- This gets generated as a JSON file which you should download.
- You can then convert that JSON file to a CSV, by using https://gist.github.com/devdattaT/c9dcae2107622215ff2e798dd185087e
- Finally load that data in https://kepler.gl/#/demo to view locations on a Map
Note: The conversion script has been updated on 2024-06-24, to match the updated format which is now generated by Google Takeout
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
| #!/bin/bash | |
| # compiled from https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit | |
| sudo apt-get update | |
| sudo apt-get dist-upgrade -y | |
| sudo apt-get install apt-transport-https ca-certificates -y | |
| sudo sh -c "echo deb https://apt.dockerproject.org/repo debian-jessie main > /etc/apt/sources.list.d/docker.list" | |
| sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
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
| check process zmq with pidfile '/tmp/zmq.pid' | |
| start program '/bin/bash -c "/usr/bin/php /var/www/sm/public/index.php zmq daemon execute & echo $! > /tmp/zmq.pid"' | |
| stop program '/usr/bin/killall --full "zmq daemon execute"' |
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
| package MyConfig; | |
| use strict; | |
| use base 'Exporter'; | |
| BEGIN { | |
| our @EXPORT = qw($DB_USER ); | |
| } | |
| our @EXPORT; |
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
| #!/usr/bin/env perl | |
| use 5.010; | |
| use open qw(:locale); | |
| use strict; | |
| use utf8; | |
| use warnings qw(all); | |
| use Mojo::UserAgent; | |
| # FIFO queue |
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
| #!/usr/bin/env perl | |
| use Mojolicious::Lite; | |
| use EV; | |
| use AnyEvent; | |
| # Simple delayed rendering | |
| get '/' => sub { | |
| my $self = shift; | |
| my $w; | |
| $w = AE::timer 3, 0, sub { |