Skip to content

Instantly share code, notes, and snippets.

View onufryk's full-sized avatar

Roman Onufryk onufryk

  • DoorDash
  • San Francisco, California, USA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am onufryk on github.
  • I am onufryk (https://keybase.io/onufryk) on keybase.
  • I have a public key ASAyOTrQGANnb0pGeT9qwolpWRu-6B0mVa7KD5dYK7Gp1go

To claim this, I am signing this object:

@onufryk
onufryk / ndb_json.py
Last active September 27, 2016 02:53 — forked from erichiggins/ndb_json.py
JSON serializer/deserializer adapted for use with Google App Engine's NDB Datastore API. This script can handle Model, Expando, PolyModel, Query, QueryIterator, Key, datetime, struct_time, and complex types.
#!/usr/bin/env python
"""
JSON encoder/decoder adapted for use with Google App Engine NDB.
Usage:
import ndb_json
# Serialize an ndb.Query into an array of JSON objects.
query = models.MyModel.query()
@onufryk
onufryk / TreeSearch.java
Last active July 27, 2016 04:42
Please implement a function to get the largest size of all binary search subtrees in a given binary tree. A subtree inside a tree t is a tree consisting of a node and all of its descendants in t. The size of a tree is defined as the number of nodes in the tree.
public class TreeSearch {
public static class TreeNode {
public Integer value = null;
public TreeNode left = null;
public TreeNode right = null;
public TreeNode(Integer value) {
this.value = value;
}
}

Keybase proof

I hereby claim:

  • I am onufryk on github.
  • I am onufryk (https://keybase.io/onufryk) on keybase.
  • I have a public key whose fingerprint is D680 0EF2 6031 BB5D D3ED 6A85 0E13 3B1C 38E8 4EF1

To claim this, I am signing this object:

@onufryk
onufryk / overflow.html
Created May 9, 2016 00:39
Experiments with text-overflow size
<!doctype html>
<html>
<head>
<title>Overflow experiments</title>
<script src="http://code.jquery.com/jquery-2.1.3.min.js"></script>
<style>
.container {
border: 1px solid blue;
width: 200px;
}