Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"math/rand"
"sort"
"time"
"github.com/emirpasic/gods/sets/treeset"
)
@febuiles
febuiles / utf8.go
Last active February 29, 2024 07:17
package main
import (
"fmt"
"io/ioutil"
"math/rand"
"os"
"time"
"unicode/utf8"
)
{
"detector": {
"name": "GitHub Dependabot Push-Time Snapshot",
"url": "https://github.com/github",
"version": "0.1.0"
},
"version": 0,
"job": {
"correlator": "420195478:internal/nginx/modules/package-lock.json",
"id": "13111654504"
  • AGPL-3.0-only
  • Apache-2.0
  • AGPL-3.0
  • AGPL-3.0-only
  • AGPL-3.0-or-later
  • Apache-2.0
  • BSD-3-Clause
import iTunesLibrary
import Foundation
let library = try ITLibrary(apiVersion: "1.0")
let localPlaylists = library.allPlaylists
var result: [String: [Any]] = [:]
var playlists: [Any] = []
{"comps":[],"layers":[{"ddd":0,"ind":0,"ty":4,"nm":"Heart Gray","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[32.029,31.314,0]},"a":{"k":[0,0,0]},"s":{"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":-3,"s":[100,100,100],"e":[100,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":6,"s":[100,100,100],"e":[0,0,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":12,"s":[0,0,100],"e":[119.993,119.993,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p1
{"comps":[],"layers":[{"ddd":0,"ind":0,"ty":4,"nm":"Heart gray","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[31.529,31.314,0]},"a":{"k":[0,0,0]},"s":{"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":1,"s":[100,100,100],"e":[140,140,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":15,"s":[140,140,100],"e":[90,90,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":30,"s":[90,90,100],"e":[110,110,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167",
catawiki@cw-dev:~/catawiki-git$ identify -verbose foo.jpg
Image: foo.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 3888x5184+0+0
Resolution: 72x72
Print size: 54x72
Units: Undefined
Type: TrueColor
catawiki@cw-dev:~/catawiki-git$ identify -verbose foo.jpg
Image: foo.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 3888x5184+0+0
Resolution: 72x72
Print size: 54x72
Units: Undefined
Type: TrueColor
require 'test_helper'
class TestMessageParser < ActiveSupport::TestCase
def test_data_decoder
d = MessageParser.new("PDU" => '000C640000010200000000')
assert_equal :data, d.packet_type
assert_equal "0C", d.firmware_version
assert_equal 100, d.power
assert_equal 1, d.gateway_id
assert_equal 2, d.num_satellites