Skip to content

Instantly share code, notes, and snippets.

View cpl's full-sized avatar
📐
We meet upon the level; We part upon the square;

Αlexandru-Paul  Copil cpl

📐
We meet upon the level; We part upon the square;
View GitHub Profile
@cpl
cpl / logbook.md
Last active December 18, 2019 15:51
SQL Murder Mystery https://mystery.knightlab.com/

SQL Murder Mystery

There's been a Murder in SQL City! The SQL Murder Mystery is designed to be both a self-directed lesson to learn SQL concepts and commands and a fun game for experienced SQL users to solve an intriguing crime.

A crime has taken place and the detective needs your help. The detective gave you the crime scene report, but you somehow lost it. You vaguely remember that the crime was a ​murder​ that occurred sometime on ​Jan.15, 2018​ and that it took place in ​SQL City​. Start by retrieving the corresponding crime scene report from the police department’s database.

Crime report

SELECT * FROM crime_scene_report
@cpl
cpl / genome.go
Created December 21, 2019 19:13
Parsing 23andMe genome data
package main
import (
"bufio"
"bytes"
"fmt"
"io"
"log"
"os"
"strconv"
package main
import "fmt"
func main() {
if '🐔' < '🥚' {
fmt.Println("chicken came first")
}
}
@cpl
cpl / example.go
Created November 23, 2020 14:52
Go Enums Quick Example
package example
type AnimalType uint8
const (
AnimalTypeUnknown AnimalType = iota
AnimalTypeDog
AnimalTypeCat
AnimalTypeRabbit
AnimalTypeSnake
@cpl
cpl / countries_codes_and_coordinates.csv
Created February 1, 2021 08:58
Countries with their (ISO 3166-1) Alpha-2 code, Alpha-3 code, UN M49, average latitude and longitude coordinates FROM https://gist.github.com/tadast/8827699, without duplicates
Country Alpha-2 code Alpha-3 code Numeric code Latitude (average) Longitude (average)
Afghanistan AF AFG 4 33 65
Albania AL ALB 8 41 20
Algeria DZ DZA 12 28 3
American Samoa AS ASM 16 -14.3333 -170
Andorra AD AND 20 42.5 1.6
Angola AO AGO 24 -12.5 18.5
Anguilla AI AIA 660 18.25 -63.1667
Antarctica AQ ATA 10 -90 0
Antigua and Barbuda AG ATG 28 17.05 -61.8