Instantly share code, notes, and snippets.

View .vimrc
" Setkeh VIMRC.
"
" Maintainer: setkeh <setkeh@gmail.com>
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc
View Food52 Jr Eng Homework
### Problem 1
Take a look at the `Dog` class:
```ruby
class Dog
attr_accessor :age, :name, :weight
def initialize(params)
View Recommending locations for Restaurants in Toronto.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View find_largest_binary_tree_complete.py
# Returns the size of the largest binary subtree that is complete, in Python - variant for exercise 9.1 on EPI (Elements of Programming Interviews)
# The gist of the solution is to keep track of subtree's number of nodes, current height and maximum height until that point.
# With the current number of nodes and height, one can calculate the root's own number of nodes and height via its direct childs respective information,
# taking into to consideration the different cases (what is the relation between the child heights and if they are perfect subtrees or not)
# Solution is O(n) time complexity and O(h) space complexity (function call stack corresponds from the root through the unique path to the current node)
from collections import namedtuple
class BTN():
View HiddenKeyListener
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import java.util.Collections;
import java.util.Optional;
import java.util.Set;
class HiddenKeyListener<T extends Event> implements EventHandler<T> {
View .editorconfig
# editorconfig.org
root = true
[*]
indent_size = 2
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
View tapir.scala
"com.softwaremill.tapir" %% "tapir-core" % "0.1"
"com.softwaremill.tapir" %% "tapir-akka-http-server" % "0.1"
"com.softwaremill.tapir" %% "tapir-openapi-docs" % "0.1"
"com.softwaremill.tapir" %% "tapir-openapi-circe-yaml" % "0.1"
View FilesSnapshot.xml
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\nylas\nylas.nupkg" checksum="EC4D170686EB71FC0121DE7BE0BD8D6D" />
<file path="C:\ProgramData\chocolatey\lib\nylas\nylas.nuspec" checksum="2F5F7186AE40E74C3EC5CC24977E053F" />
<file path="C:\ProgramData\chocolatey\lib\nylas\tools\chocolateyinstall.ps1" checksum="23452806D94A8752D9CC97425F3F9E4A" />
<file path="C:\ProgramData\chocolatey\lib\nylas\tools\chocolateyuninstall.ps1" checksum="7BBC953FD6A86E0BC5F4E0EA6534812A" />
</files>
</fileSnapshot>
View tapir.scala
import tapir.docs.openapi._
import tapir.openapi.circe.yaml._
val docs: OpenAPI = List(addBook, findBook).toOpenAPI(
"The Tapir Library", "1.0")
val docsYaml: String = docs.toYaml