This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # test utf8mb4 | |
| "𠜱" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'singleton' | |
| class GlobalThingy | |
| include Singleton | |
| end | |
| GlobalThingy.instance | |
| GlobalThingy.instance.object_id | |
| GlobalThingy.new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'active_support' | |
| module Yink | |
| def self.feeling | |
| ActiveSupport::StringInquirer.new(@emotion || "") | |
| end | |
| def self.feeling= emotion | |
| @emotion = emotion | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'httparty' | |
| require 'json' | |
| @distance_threshold = 0.2 # km | |
| @num_points = 1000 | |
| # bus stop data from https://github.com/cheeaun/busrouter-sg | |
| bus_stops = JSON.parse(File.read("coords.json")) | |
| LAT_BOUNDS = [1.2090608106559089, 1.4827849060588993] | |
| LNG_BOUNDS = [103.6040031910045 , 104.08637166024278] |