Skip to content

Instantly share code, notes, and snippets.

View derrxb's full-sized avatar
💻
Focusing

Derrick Bol derrxb

💻
Focusing
View GitHub Profile
{
"editor.tabSize": 2,
"git.autofetch": true,
"gitlens.keymap": "chorded",
"emmet.triggerExpansionOnTab": true,
"gitlens.advanced.messages": {
"suppressCommitHasNoPreviousCommitWarning": false,
"suppressCommitNotFoundWarning": false,
"suppressFileNotUnderSourceControlWarning": false,
"suppressGitVersionWarning": false,
# frozen_string_literal: true
require 'yaml'
raise StandardError, 'Please enter a source file and output file' if ARGV[0].nil? || ARGV[1].nil?
source = YAML.safe_load(File.read(ARGV[0]))
source_keys = source[0].keys.join("\t")
source_data = source.map do |current_row|
# frozen_string_literal: true
require 'csv'
require 'yaml'
raise StandardError, 'Please enter a source file and output file' if ARGV[0].nil? || ARGV[1].nil?
source = CSV.read(ARGV[0], col_sep: "\t")
source_headings = source[0]
@derrxb
derrxb / 108065434_fizzbuzz
Created September 27, 2020 09:43
A basic fizzbuzz implementation in Ruby
def get_value(number)
return 'FizzBuzz' if (number % 15).zero?
return 'Fizz' if (number % 3).zero?
return 'Buzz' if (number % 5).zero?
number.to_s
end
def fizzbuzz(size, &format)
(1..size).map do |number|
This file has been truncated, but you can view the full file.
{
"type": "FeatureCollection",
"name": "png_admbnda_adm1_nso_20190508",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "Shape_Leng": 10.402349919300001, "Shape_Area": 0.76799214764199997, "ADM1_EN": "Autonomous Region of Bougainville", "ADM1_PCODE": "PG20", "ADM1_REF": null, "ADM1ALT1EN": null, "ADM1ALT2EN": null, "ADM0_EN": "Papua New Guinea", "ADM0_PCODE": "PG", "date": "2015\/02\/24", "validOn": "2019\/05\/08" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 155.710818, -6.897111029999962 ], [ 155.709954, -6.89711904 ], [ 155.709663840000076, -6.896541959999979 ], [ 155.711102040000014, -6.896529989999976 ], [ 155.710818, -6.897111029999962 ] ] ], [ [ [ 155.841784920000123, -6.850712969999961 ], [ 155.84468508000009, -6.853563989999941 ], [ 155.844402840000043, -6.854429969999956 ], [ 155.844115920000036, -6.8547220199999 ], [ 155.840636880000034, -6.851877029999969 ], [ 155.83746708000001, -6.850751039
This file has been truncated, but you can view the full file.
{"type":"FeatureCollection","bbox":[140.84053488000006,-11.656155959999978,159.4817931600001,-0.7575910199999276],"features":[{"type":"Feature","properties":{"Shape_Leng":10.4023499193,"Shape_Area":0.767992147642,"ADM1_EN":"Autonomous Region of Bougainville","ADM1_PCODE":"PG20","ADM1_REF":null,"ADM1ALT1EN":null,"ADM1ALT2EN":null,"ADM0_EN":"Papua New Guinea","ADM0_PCODE":"PG","date":"2015-02-23T16:00:00.000Z","validOn":"2019-05-07T16:00:00.000Z","validTo":"1899-11-29T16:00:00.000Z"},"geometry":{"type":"MultiPolygon","coordinates":[[[[155.71081800000002,-6.897111029999962],[155.70995400000004,-6.89711903999995],[155.70966384000008,-6.896541959999979],[155.71110204000001,-6.896529989999976],[155.71081800000002,-6.897111029999962]]],[[[155.84178492000012,-6.850712969999961],[155.8446850800001,-6.853563989999941],[155.84440284000004,-6.854429969999956],[155.84411592000004,-6.85472201999994],[155.84063688000003,-6.851877029999969],[155.83746708,-6.850751039999977],[155.83573908000005,-6.850762019999934],[155.834291
ID,Name in English,Name in French,Name in Spanish,Countries,Country codes alpha 3,ISO639-3 codes,Degree of endangerment,Alternate names,Name in the language,Number of speakers,Sources,Latitude,Longitude,Description of the location
1022,South Italian,italien du sud,napolitano-calabrés,Italy,ITA,nap,Vulnerable,Neapolitan; Neapolitan-Calabrese; неаполитанский; неаполитанско-калабрийский,,7500000,,40.9798,15.249,"Campania, Lucania (Basilicata), Abruzzi (Abruzzo), Molise, northern Calabria, northern and central Apulia (Puglia), southern Lazio and Marche as well as easternmost Umbria"
1023,Sicilian,sicilien,siciliano,Italy,ITA,scn,Vulnerable,,,5000000,,37.4399,14.5019,"Sicily (Sicilia), southern and central Calabria and southern Apulia (Puglia); a large number of émigré communities"
383,Low Saxon,bas-saxon,bajo sajón,"Germany, Denmark, Netherlands, Poland, Russian Federation","DEU, DNK, NLD, POL, RUS","act, drt, frs, gos, nds, sdz, stl, twd, vel, wep",Vulnerable,"Low German, Niedersächsisch, Nedersaksisch, Niederde