Skip to content

Instantly share code, notes, and snippets.

View odrobnik's full-sized avatar

Oliver Drobnik odrobnik

View GitHub Profile
@odrobnik
odrobnik / prisoners.json
Last active November 26, 2023 22:14
JSON Version of the List of Palestinian prisoners slated for potential release
[
{
"nameHebrew" : "אבאאהים אחמד בדר זמאערה",
"duration" : "In Detention",
"type" : "Detainee",
"dateOfBirth" : "30.1.2005",
"name" : "Abaha'im Ahmad Badr Zama'ara",
"number" : "9189454",
"gender" : "Male",
"city" : "Judea and Samaria Area",
@odrobnik
odrobnik / 350_prisoners_translated.csv
Last active December 1, 2023 15:03
Converted the HTML from https://www.gov.il resolution 1077 into CSV and translated everything as good as possible from Hebrew to English.
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 20 columns, instead of 9. in line 4.
Prisoner Name,Hometown,Released,Prisoner Number,Identity Card,Gender,Age,Date of Birth,Residence Area,Organizational Affiliation,Type of ID,Israeli Citizenship,Type of Prisoner,Date of Arrest,Age at Arrest,Incarceration Period (Years—Months--Days),Details of Offenses,Court,Plea File Number,Court File Number
Ahdab Mohammed Ali Hourani,’48 Lands,11/30/2023,1399758,31479520,Female,45,10/24/1978,Green Line,None,Blue,Yes,Detainee,10/23/2023,44,In Detention,Support for Terrorism,Civil Court,464978/2023,23-11-3383 
Aseel Abdel Wahab Kamel Ibrahim,’48 Lands,11/30/2023,9213175,206547572,Female,25,08/12/1998,Green Line,None,Blue,Yes,Detainee,11/13/2023,25,In Detention,Support for Terrorism,Civil Court,492628/23,46537-11-23
Aseel Hussein Mahmoud Sweitat,’48 Lands,11/30/2023,9213089,209050970,Female,25,07/12/1998,Green Line,None,Blue,Yes,Detainee,11/12/2023,25,In Detention,Support for Terrorism,Civil Court,495573/2023,41261-11-23
Ayat Saeed Qasim Atamleh,’48 Lands,11/30/2023,9213066,206613929,Female,25,06/12/1998,Green L
@odrobnik
odrobnik / gpt4_problems.markdown
Last active June 15, 2023 23:29
GPT4 Problem Solving with functions

I've provided these functions:

  • date()
  • dateDiff(date1, date2)
  • birthday(user)

Oliver

"Let's think this through step by step and please list each step and give your thinking.

POST https://api.openai.com/v1/chat/completions
{
"functions" : [
{
"name" : "date",
"description" : "Get the current date and time",
"parameters" : {
"type" : "object",
"properties" : {
func unitSquareIntersectionPoint(_ angle: Angle) -> UnitPoint {
let normalizedDegree = angle.degrees.truncatingRemainder(dividingBy: 360)
let degreeProportion = (normalizedDegree / 90).truncatingRemainder(dividingBy: 4)
switch degreeProportion {
case 0: return UnitPoint(x: 1.0, y: 1.0)
case 1: return UnitPoint(x: 1.0, y: 1.0 - (normalizedDegree - 270) / 90)
case 2: return UnitPoint(x: 1.0 - (normalizedDegree - 180) / 90, y: 0.0)
case 3: return UnitPoint(x: 0.0, y: (normalizedDegree - 90) / 90)
default: return .zero
@odrobnik
odrobnik / yMunch.swift
Created February 8, 2023 21:33
Command Line utility to convert Yahoo Finance CSV export into markdown table for ChatGPT
import SwiftCSV
import Foundation
extension Double {
/// Rounds the double to decimal places value
func rounded(toPlaces places:Int) -> Double {
let divisor = pow(10.0, Double(places))
return (self * divisor).rounded() / divisor
}
}
//
// RankingsView.swift
// ChessClub
//
// Created by Oliver Drobnik on 22.04.22.
//
import SwiftUI
struct RankingsView: View
import Foundation
import Combine
import ProoficsSDK
import SwiftUI
class BundleViewModel: ObservableObject
{
@Published var title: String = ""
@Published var subtitle: String?
import SwiftUI
struct Modifier: Identifiable
{
let id = UUID()
@State var title: String
}
struct FastnotesSettings: View
@odrobnik
odrobnik / PlatformSpecific.swift
Created July 13, 2021 08:01
Platform-specific modifier application
import SwiftUI
struct Platform: OptionSet
{
let rawValue: Int
static let iOS = Platform(rawValue: 1<<0)
static let tvOS = Platform(rawValue: 1<<1)
static let watchOS = Platform(rawValue: 1<<2)