Skip to content

Instantly share code, notes, and snippets.

View amCap1712's full-sized avatar

Kartik Ohri amCap1712

View GitHub Profile
From d06c414a6dd196723491751001f2ddd8a618d49b Mon Sep 17 00:00:00 2001
From: Kartik Ohri <kartikohri13@gmail.com>
Date: Fri, 5 Jun 2020 17:29:35 +0530
Subject: [PATCH] Add rav1e
---
modules/codec/Makefile.am | 7 ++
modules/codec/rav1e.c | 205 ++++++++++++++++++++++++++++++++++++++
2 files changed, 212 insertions(+)
create mode 100644 modules/codec/rav1e.c
@amCap1712
amCap1712 / Project.md
Last active August 29, 2020 17:05
The State of MusicBrainz Android

Project Requirements

A few months ago when the initial proposal was drawn, MusicBrainz for Android had a brittle interface. There was hardly any screen free of fatal errors and crashes. Hence, the proposal aimed at eliminating these instability issues. This included rearchitecting the application where necessary, adding tests and incorporating android best practices.

Repos

The entire work scoped across three repositories:

  1. MusicBrainz Android
  2. AcousticBrainz Android
  3. KTaglib
@amCap1712
amCap1712 / Spark 2.4.5
Created April 26, 2021 20:13
Spark Sentry Integration Error Log
2021-04-26T17:30:48.2693060Z ERROR py4j.java_gateway:java_gateway.py:2446 There was an exception while executing the Python Proxy on the Python Side.
2021-04-26T17:30:48.2694690Z Traceback (most recent call last):
2021-04-26T17:30:48.2696625Z File "/usr/local/lib/python3.6/site-packages/py4j/java_gateway.py", line 2442, in _call_proxy
2021-04-26T17:30:48.2698237Z return_value = getattr(self.pool[obj_id], method)(*params)
2021-04-26T17:30:48.2700347Z File "/usr/local/lib/python3.6/site-packages/sentry_sdk/integrations/spark/spark_driver.py", line 241, in onStageSubmitted
2021-04-26T17:30:48.2702208Z data = {"attemptId": stage_info.attemptId(), "name": stage_info.name()}
2021-04-26T17:30:48.2704106Z File "/usr/local/lib/python3.6/site-packages/py4j/java_gateway.py", line 1305, in __call__
2021-04-26T17:30:48.2705741Z answer, self.gateway_client, self.target_id, self.name)
2021-04-26T17:30:48.2707602Z File "/usr/local/lib/python3.6/site-packages/pyspark/sql/utils.py", line 111, in deco
202
@amCap1712
amCap1712 / gist:c7e68f5ac49d4b958ce3e16b89bc2a3c
Created August 10, 2021 19:02
Annoy Patch Fix Debug Log
DEBUG:AnnoyLookupElement:read for tzanetakis/480b391b-827a-4c92-b98f-5b223b74f22c
DEBUG:AnnoyLookupElement:url: https://acousticbrainz.org/api/v1/similarity/tzanetakis
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): acousticbrainz.org:443
DEBUG:urllib3.connectionpool:https://acousticbrainz.org:443 "GET /api/v1/similarity/tzanetakis?remove_dups=true&recording_ids=480b39
1b-827a-4c92-b98f-5b223b74f22c HTTP/1.1" 308 463
DEBUG:urllib3.connectionpool:https://acousticbrainz.org:443 "GET /api/v1/similarity/tzanetakis/?remove_dups=true&recording_ids=480b3
91b-827a-4c92-b98f-5b223b74f22c HTTP/1.1" 200 None
DEBUG:AnnoyLookupElement:read 200 recordings
DEBUG:AnnoyLookupElement:AnnoyLookupElement 200 items
DEBUG:RecordingLookupElement:- debug 200 recordings
@amCap1712
amCap1712 / API
Last active August 26, 2021 10:15
Identify commits on github with unrecognized github accounts
GET https://api.github.com/repos/openjdk/jdk/commits?per_page=3
Relevant docs: https://docs.github.com/en/rest/reference/repos#list-commits
Table: <class 'mbdata.models.Recording'>
Undeffered Columns: ('gid', 'name', 'id')
Deferred columns: ['length', 'comment', 'edits_pending', 'last_updated', 'video']
All columns: ['artist_credit_id', 'id', 'gid', 'name', 'length', 'comment', 'edits_pending', 'last_updated', 'video']
Table: <class 'mbdata.models.Artist'>
Undeffered Columns: ('gid', 'name', 'id')
Deferred columns: ['begin_date', 'end_date', 'sort_name', 'begin_date_year', 'begin_date_month', 'begin_date_day', 'end_date_year', 'end_date_month', 'end_date_day', 'comment', 'edits_pending', 'last_updated', 'ended']
All columns: ['type_id', 'area_id', 'gender_id', 'begin_area_id', 'end_area_id', 'begin_date', 'end_date', 'id', 'gid', 'name', 'sort_name', 'begin_date_year', 'begin_date_month', 'begin_date_day', 'end_date_year', 'end_date_month', 'end_date_day', 'comment', 'edits_pending', 'last_updated', 'ended']
@amCap1712
amCap1712 / Container.java
Last active September 2, 2021 14:02
Jackson 2.11.4 Illegal Reflective Access
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
public class Container {
private final OffsetDateTime offsetDateTime;
@JsonCreator
public Container(@JsonProperty("value") OffsetDateTime offsetDateTime) {
@amCap1712
amCap1712 / report.csv
Created September 7, 2021 19:36
Benchmark results
Benchmark Mode Cnt Score Error Units
FastMethodPerfTest.method_direct_StringStartsWith avgt 25 0.756 ± 0.010 ns/op
FastMethodPerfTest.method_direct_StringStartsWith_Return avgt 25 4.580 ± 0.073 ns/op
FastMethodPerfTest.method_fastreflect_StringStartsWith avgt 25 0.765 ± 0.010 ns/op
FastMethodPerfTest.method_fastreflect_StringStartsWith_Return avgt 25 4.557 ± 0.055 ns/op
FastMethodPerfTest.method_reflect_StringStartsWith avgt 25 14.457 ± 0.209 ns/op
FastMethodPerfTest.method_reflect_StringStartsWith_Return avgt 25 17.191 ± 0.190 ns/op
@amCap1712
amCap1712 / results.csv
Created September 10, 2021 20:17
Utf8.java Benchmark with latest panama-vector branch
Benchmark Mode Threads Samples Score Score Error (99.9%) Unit Param: testFile
com.augustnagro.utf8.Bench.jdk thrpt 1 5 1071.651259 69.378064 ops/s /twitter.json
com.augustnagro.utf8.Bench.jdk thrpt 1 5 41291.171245 987.979351 ops/s /utf8-demo.txt
com.augustnagro.utf8.Bench.jdk thrpt 1 5 39261.365705 1525.907095 ops/s /utf8-demo-invalid.txt
com.augustnagro.utf8.Bench.jdk thrpt 1 5 64591.879593 1028.072935 ops/s /20k.txt
com.augustnagro.utf8.Bench.vector_128 thrpt 1 5 1702.455763 26.254190 ops/s /twitter.json
com.augustnagro.utf8.Bench.vector_128 thrpt 1 5 49127.803531 335.445137 ops/s /utf8-demo.txt
com.augustnagro.utf8.Bench.vector_128 thrpt 1 5 48945.018702 1425.528574 ops/s /utf8-demo-invalid.txt
com.augustnagro.utf8.Bench.vector_128 thrpt 1 5 13743.690834 257.241637 ops/s /20k.txt
com.augustnagro.utf8.Bench.vector_preferred thrpt 1 5 2796.828402 34.079979 ops/s /twitter.json
@amCap1712
amCap1712 / results-static-final.csv
Created September 10, 2021 20:33
Utf8.java with static finals on panama-vector latest
Benchmark Mode Threads Samples Score Score Error (99.9%) Unit Param: testFile
com.augustnagro.utf8.Bench.jdk thrpt 1 5 1047.367078 64.065492 ops/s /twitter.json
com.augustnagro.utf8.Bench.jdk thrpt 1 5 41833.951718 1574.539777 ops/s /utf8-demo.txt
com.augustnagro.utf8.Bench.jdk thrpt 1 5 40178.133554 1555.286114 ops/s /utf8-demo-invalid.txt
com.augustnagro.utf8.Bench.jdk thrpt 1 5 64160.619182 1694.943367 ops/s /20k.txt
com.augustnagro.utf8.Bench.vector_preferred thrpt 1 5 4823.627789 97.421841 ops/s /twitter.json
com.augustnagro.utf8.Bench.vector_preferred thrpt 1 5 99850.175988 1951.260050 ops/s /utf8-demo.txt
com.augustnagro.utf8.Bench.vector_preferred thrpt 1 5 98252.526543 1803.710937 ops/s /utf8-demo-invalid.txt
com.augustnagro.utf8.Bench.vector_preferred thrpt 1 5 251105.034639 24333.272169 ops/s /20k.txt