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
start_deps(X) when not is_list(X) -> | |
start_deps([X]); | |
start_deps([]) -> | |
ok; | |
start_deps([A|T]) -> | |
case application:ensure_started(A) of | |
ok -> | |
start_deps(T); |
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
julia> type(Union) | |
() | |
end | |
Warning: imported binding for Union overwritten in module Main | |
julia> Union() | |
ERROR: `Union` has no method matching Union() |
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
const vovels = ['a', 'o', 'e', 'u', 'y', 'i'] | |
const consonants = filter(x -> x != nothing, | |
[i in vovels ? nothing : i | |
for i in 'a':'z']) | |
const vrx = Regex("[$(convert(String, vovels))]{3}\$") | |
const crx = Regex("[$(convert(String, consonants))]{3}\$") |
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 Tconverter | |
export convert | |
import Base.convert | |
abstract Temperature | |
type Celsius <: Temperature | |
value :: Real | |
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
MemTotal: 5801372 kB | |
MemFree: 2391956 kB | |
Buffers: 774192 kB | |
Cached: 1015376 kB | |
SwapCached: 0 kB | |
Active: 1327312 kB | |
Inactive: 753192 kB | |
Active(anon): 493284 kB | |
Inactive(anon): 77992 kB | |
Active(file): 834028 kB |
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
let lwt_call f = | |
let t1,w1 = Lwt.wait () in | |
Lwt.ignore_result | |
(let res = f () in | |
Lwt.wakeup w1 res; | |
Lwt.return_unit); | |
t1 | |
;; | |
let read_direction dir = |
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
keyOrder = ['first_name', 'last_name', 'email', 'password1', | |
'password2', 'post', 'birthday', 'phone', 'city'] | |
res = OrderedDict() | |
for key in keyOrder: | |
res[key] = self.fields.get(key) | |
self.fields = res |
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
REBOL [ | |
subject "FORTH interpreter" | |
] | |
forth: make object! [ | |
stack: [] | |
dup: [ 'dup (insert stack stack/1) ] | |
drop: [ 'drop (remove stack) ] | |
drop-n: [ 'drop-n (remove/part stack stack/1) ] |
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
echo-protocol: make root-protocol [ | |
port-flags: system/standard/port-flags/pass-thru | |
sys-copy: get in system/words 'copy | |
copy: func [ port /local reponse ] [ | |
t1: now/time/precise | |
reponse: sys-copy "" | |
insert port/sub-port "hello" | |
read-io port/sub-port reponse 5 | |
(now/time/precise - t1) | |
] |
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
import strutils | |
import math | |
import os | |
import httpclient | |
import json | |
import tables | |
type | |
SlackChannel = ref SlackChannelObj | |
SlackChannelObj = object |