Skip to content

Instantly share code, notes, and snippets.

{
"Products": [
{
"ProductName": "Product A",
"Reviews": [
{"Rating": 5, "Text": "Amazing product! Highly recommend."},
{"Rating": 4, "Text": "Good quality, satisfied with my purchase."},
{"Rating": 3, "Text": "It's okay, but I expected better."},
{"Rating": 2, "Text": "Not what I expected, poor quality."},
{"Rating": 1, "Text": "Terrible, stopped working after a week."}
from collections import defaultdict
str = '''company_name,service
Johns Refuge,Normal Pickup
Johns Refuge,Bulk Pickup
Johns Refuge,Tree Removal
Bobs Limited,Normal Pickup
Bobs Limited,Bulk Pickup
'''
lines = str.split("\n")
data = lines[1:-1]
# Write a recursive function that Fibonacci sequence
# 0, 1, 1, 2, 3, 5, 8, 13
# fib(0) == 0
# fib(1) == 1
# fib(2) == 1 (0 + 1)
# fib(3) == 2 (1 + 1)
# fib(4) == 3 (2 + 1)
# fib(5) == 5 (3 + 2)
# fib(6) == 8 (5 + 3)
# fib(7) == 13 (8 + 5)

i.e. take this format

company_name,service
Johns Refuge,Normal Pickup
Johns Refuge,Bulk Pickup
Johns Refuge,Tree Removal
Bobs Limited,Normal Pickup
Bobs Limited,Bulk Pickup

and output

This file has been truncated, but you can view the full file.
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];
'use strict';
const fs = require('fs');
const child_process = require('child_process');
module.exports = class OpalWebpackResolverPlugin {
constructor(source, target) {
const gemfile_path = 'Gemfile';
const gemfile_lock_path = 'Gemfile.lock';
const owl_cache_path = '.owl_cache/load_paths.json';
@fkchang
fkchang / gist:b0726b10c35934db9508888299affd04
Created September 14, 2017 19:23
Heroku can't install bundler
remote: -----> Ruby app detected
remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/bundler-1.15.2.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/bundler-1.15.2.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote: !
remote: ! Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/bundler-1.15.2.tgz -s -o - | tar zxf - ' failed unexpectedly:
remote: ! 
remote: ! gzip: stdin: unexpected end of file
remote: ! tar: Child returned status 1
remote: ! tar: Error is not recoverable: exiting now
@fkchang
fkchang / gist:a87079f8f32e2a9861b46fd27f853426
Created September 14, 2017 19:23
Heroku can't install bundler
remote: -----> Ruby app detected
remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/bundler-1.15.2.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/bundler-1.15.2.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote: !
remote: ! Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/bundler-1.15.2.tgz -s -o - | tar zxf - ' failed unexpectedly:
remote: ! 
remote: ! gzip: stdin: unexpected end of file
remote: ! tar: Child returned status 1
remote: ! tar: Error is not recoverable: exiting now

How dead is ruby?

Language we love is fading, reduced conferences, projects/commits, but final straw Code camps dropping Rails IEEE Spectrum out of top 10

How dead is Ruby?

Exaggerated? But failing

Huge potential

Title

COMPS - The All Ruby Isomorphic Application Architecture

Abstract

Building big apps is a big problem. There’s complexity on the frontend, complexity on backend, and one has to link the 2 together.

As popluar as React is, which has several comprehensive solutions for