Skip to content

Instantly share code, notes, and snippets.

View romanroibu's full-sized avatar
👾
breaking things

Roman Roibu romanroibu

👾
breaking things
View GitHub Profile
@romanroibu
romanroibu / README.md
Last active February 7, 2023 03:25 — forked from pfaion/README.md
RealSense2 Backend for Pupil Capture v2.3+

RealSense2 Backend for Pupil Capture v2.3+

With Pupil v1.22, built-in support for RealSense cameras was removed. See the release notes for more information. However, the previous code will still function and can be imported as a user plugin into Pupil Capture.

There are two different ways to setup and use this plugin:

1) Running Pupil from source

When running Pupil from source, you will have to install pyrealsense2, normally just with pip install pyrealsense2 into the environment you use to run Pupil. Then download the realsense2_backend.py file from this gist and place it into your pupil source folder in: pupil/pupil_capture_settings/plugins/realsense2_backend.py

{
"meta": {
"theme": "flat"
},
"basics": {
"name": "Roman Roibu",
"label": "Software Engineer",
"email": "romanroibu@hey.com",
"summary": "I'm a motivated Software Engineer, with an eye for designing complex systems. Passionate about solving challenging technical problems. Most often I write high-quality Swift code. I also regularly find myself working with modern C++, Python, and TypeScript, and experimenting with Rust. Interested in Artificial Intelligence, Computer Vision, and Reinforcement Learning. Always on the lookout for opportunities to learn.",
"profiles": [
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@romanroibu
romanroibu / RSSFeed.swift
Last active April 9, 2021 15:28 — forked from kharrison/RSSFeed.swift
Swift Decodable With Multiple Custom Dates (https://useyourloaf.com/blog/swift-codable-with-custom-dates)
import Foundation
extension DateFormatter {
static let iso8601Full: DateFormatter = {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"
formatter.calendar = Calendar(identifier: .iso8601)
formatter.timeZone = TimeZone(secondsFromGMT: 0)
formatter.locale = Locale(identifier: "en_US_POSIX")
return formatter
@romanroibu
romanroibu / Cache.swift
Last active May 14, 2018 03:36 — forked from raulriera/Cacher.swift
Code sample for Medium article about Caching and Protocols
//This is basically a description of the cache along with the type
public struct Cache<T> {
let fileName: String
let transform: (T) throws -> Data
let reverse: (Data) throws -> T
}
extension Cache {
//You can define a "convenience" initializer that takes a fileName,
//and provides PList serialization as transform and reverse transform operations
import Foundation
//Inspired by: https://github.com/devxoul/Then
public protocol Configurable {}
extension Configurable {
public func configure(block: (inout Self)->Void) -> () -> Self {
return {
var copy = self

Keybase proof

I hereby claim:

  • I am romanroibu on github.
  • I am romanroibu (https://keybase.io/romanroibu) on keybase.
  • I have a public key whose fingerprint is 7E1B 5811 F39B 76F8 20A5 4186 015F 3038 EFD3 AF9D

To claim this, I am signing this object:

@romanroibu
romanroibu / BellmanFord.swift
Created March 8, 2015 02:01
Implementation of Bellman–Ford algorithm in Swift
/////////////////////////////////////////////////////// THEORY ///////////////////////////////////////////////////////
//
// Source: https://en.wikipedia.org/wiki/Bellman–Ford_algorithm
//
//
// function BellmanFord(list vertices, list edges, vertex source)::distance[],predecessor[]
// // This implementation takes in a graph, represented as
// // lists of vertices and edges, and fills two arrays
// // (distance and predecessor) with shortest-path
// // (less cost/distance/metric) information