Skip to content

Instantly share code, notes, and snippets.

Eli Rose erose

Block or report user

Report or block erose

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@erose
erose / differentiate.py
Last active Oct 29, 2019
Recurse Center application code -- symbolic differentiation
View differentiate.py
from typing import *
import sys
import re
def differentiate(expression: List[str], with_respect_to: str) -> List[str]:
# We do the differentiation in one pass, then simplify the result.
first_pass = [_differentiate_single_term(t, with_respect_to) for t in expression]
simplified = _simplify_expression(first_pass)
return simplified
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
items: [
{time: moment()},
{time: moment().subtract(1, 'day')},
],
sortProperties: ['time'],
sortedItems: Ember.computed.sort('items', 'sortProperties'),
@erose
erose / adapters.application.js
Created May 10, 2017
ObjectProxy DS.HasMany
View adapters.application.js
import Adapter from "ember-data/adapters/json-api";
export default Adapter.extend();
@erose
erose / decrypt_cookie.rb
Created Apr 24, 2017
Decrypt a Rails 5 session cookie
View decrypt_cookie.rb
You can’t perform that action at this time.