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
-module(error_m). | |
-export([return/1, fail/1, bind/2]). | |
return(V) -> {ok, V}. | |
fail(V) -> {error, V}. | |
bind({ok, V}, F) -> F(V); | |
bind(Err={error, _}, _F) -> Err. |
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
$ python test_context.py | |
CONTEXT: start | |
USER: got resource | |
CONTEXT: done | |
Traceback (most recent call last): | |
File "test_context.py", line 32, in <module> | |
for i in user(): | |
File "test_context.py", line 27, in user | |
for item in resource: | |
TypeError: iter() returned non-iterator of type 'MyIterator' |
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
from django.conf import settings | |
from django.http import HttpResponse | |
from django.shortcuts import render | |
from dummyjson import views as dj | |
from ordereddict import OrderedDict | |
import json | |
def story(request, content_id, slug=None, template=None): | |
path = '/static/content/modules/stories/story_' + content_id + '.json' | |
if not template: |
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
(ns overtone-clj-toys.binaural | |
(:use [overtone.live])) | |
;; | |
;; Binaural Beat Synthesis: | |
;; Generates binaural beats given the provided carrier and desired | |
;; frequency. Brown noise is used to soften the background and | |
;; block out outside noise. | |
;; freq effect |