_id stringlengths 64 64 | repository stringlengths 6 84 | name stringlengths 4 110 | content stringlengths 0 248k | license null | download_url stringlengths 89 454 | language stringclasses 7
values | comments stringlengths 0 74.6k | code stringlengths 0 248k |
|---|---|---|---|---|---|---|---|---|
fdd84553e6f62dae85d181214ae4e1a744e447009b2e6129b66f16958e5fbf77 | johnwhitington/ocamli | slist.ml | (* Tail-recursive lists *)
module List :
sig
include (module type of List)
end
=
struct
include List
let map f l =
List.rev (List.rev_map f l)
let append a b =
List.rev_append (List.rev a) b
let ( @ ) = append
let map f l =
List.rev (List.rev_map f l)
let rev_map... | null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/slist.ml | ocaml | Tail-recursive lists | module List :
sig
include (module type of List)
end
=
struct
include List
let map f l =
List.rev (List.rev_map f l)
let append a b =
List.rev_append (List.rev a) b
let ( @ ) = append
let map f l =
List.rev (List.rev_map f l)
let rev_map2 f l l2 =
let rec re... |
35c6f2d6ff285a8eea0fd14d3cfcf760060e94d2bc7a55110b0b92a742b1b4dc | racket/typed-racket | module-client.rkt | #lang typed/racket/base/optional
;; Test:
1 . enclosing module is locally - defensive
2 . contains a Racket submodule
3 . import a value with the right constructor & the wrong type
4 . send the value back to untyped code , get low - level error from untyped
(require "module-server.rkt" ) ;; import a typed fun... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/optional/module-client.rkt | racket | Test:
import a typed function | #lang typed/racket/base/optional
1 . enclosing module is locally - defensive
2 . contains a Racket submodule
3 . import a value with the right constructor & the wrong type
4 . send the value back to untyped code , get low - level error from untyped
(: h (-> Real Real))
(define (h n)
(* n n))
(f 3 h)
(mo... |
073d3449282150702f8e4b3853bba3521a33eca9079c9cd6722877803d2f19d6 | Ekdohibs/camlboot | infix_sugar.ml | let () = print_endline "Infix operators treated as sugar:"
let succ n = n + 1
let ignore_and_show_int () n = show_int n
let () = ignore_and_show_int () @@ succ @@ 1
let () = 2 |> succ |> ignore_and_show_int ()
let () = print_newline ()
| null | https://raw.githubusercontent.com/Ekdohibs/camlboot/506280c6e0813e0e794988151a8e46be55373ebc/miniml/compiler/test/infix_sugar.ml | ocaml | let () = print_endline "Infix operators treated as sugar:"
let succ n = n + 1
let ignore_and_show_int () n = show_int n
let () = ignore_and_show_int () @@ succ @@ 1
let () = 2 |> succ |> ignore_and_show_int ()
let () = print_newline ()
| |
426c4c090c1b329ad9162a1bbbbd571d652a7d61590c7374555eff1aae76a3f0 | WorksHub/client | core.cljs | (ns wh.admin.core
(:require [cljs.loader :as loader]
[re-frame.core :refer [dispatch-sync reg-event-db]]
[wh.admin.activities.views :as activity-views]
[wh.admin.articles.events :as articles-events]
[wh.admin.articles.views :as articles]
[wh.admin.candidates... | null | https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/admin/core.cljs | clojure | (ns wh.admin.core
(:require [cljs.loader :as loader]
[re-frame.core :refer [dispatch-sync reg-event-db]]
[wh.admin.activities.views :as activity-views]
[wh.admin.articles.events :as articles-events]
[wh.admin.articles.views :as articles]
[wh.admin.candidates... | |
12c5633e34d7f046961bcf974857862af3f2da2987d6b6076ab977a63211265f | rowangithub/DOrder | 195_tcs.ml | let rec loop (i:int) (j:int) x y =
if (x = 0) then (
if (i = j) then
assert (y = 0)
else ()
) else
loop i j (x-1) (y-1)
let main i j =
loop i j i j | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/mochi2/benchs/195_tcs.ml | ocaml | let rec loop (i:int) (j:int) x y =
if (x = 0) then (
if (i = j) then
assert (y = 0)
else ()
) else
loop i j (x-1) (y-1)
let main i j =
loop i j i j | |
c10fffe8273366199baa510afc4dd9abedfc13c97a39c27b6027b66c07a24c25 | input-output-hk/cardano-wallet-legacy | TxStats.hs | module InputSelection.TxStats (
TxStats(..)
, deriveTxStats
-- * Convenience re-exports
, Fixed
, E2
) where
import Universum
import Data.Fixed (E2, Fixed)
import Cardano.Wallet.Kernel.CoinSelection.Generic
import Util.Histogram (BinSize (..), Histogram)
impor... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/test/unit/InputSelection/TxStats.hs | haskell | * Convenience re-exports
------------------------------------------------------------------------------
Transaction stastistics
------------------------------------------------------------------------------
| Transaction statistics
Transaction statistics are used for policy evaluation. For "real" input
selection... | module InputSelection.TxStats (
TxStats(..)
, deriveTxStats
, Fixed
, E2
) where
import Universum
import Data.Fixed (E2, Fixed)
import Cardano.Wallet.Kernel.CoinSelection.Generic
import Util.Histogram (BinSize (..), Histogram)
import qualified Util.Histogram as Hi... |
cd8c9f4576b284cba8b7bd434b20b1533d0ef14e7566bb96c3cd484b85345480 | argp/bap | batUChar.ml | * Unicode ( ISO - UCS ) characters .
This module implements Unicode characters .
This module implements Unicode characters.
*)
Copyright ( C ) 2002 , 2003 , 2004 .
(* This library is free software; you can redistribute it and/or *)
(* modify it under the terms of the GNU Lesser General Public Licens... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batUChar.ml | ocaml | This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
may link, statically or dynamically, a "work that uses this library"
with a publicly distributed version of this library to produce an
executable file containing portions of this lib... | * Unicode ( ISO - UCS ) characters .
This module implements Unicode characters .
This module implements Unicode characters.
*)
Copyright ( C ) 2002 , 2003 , 2004 .
as published by the Free Software Foundation ; either version 2 of
the License , or ( at your option ) any later version .
As a s... |
927b257a9cac82b535bc5edae586a0991f1c34f7de9e78ab765b7757bae7e94a | jiangpengnju/htdp2e | ex122.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex122) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/intermezzo-bsl/ex122.rkt | racket | about the language level of this file in a form that our tools can easily process.
Evaluate the following expressions step by step: | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex122) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
1 .
(+ (* (/ 12 8) 2/3)
(- 20 (sqrt 4)))
2 .
(cond
[(=... |
236795dae0db2cf2edfd1328e1ca8e6753391f2f4f97a64c117f8516a10c3906 | mkremins/epitaph | project.clj | (defproject mkremins/epitaph "0.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.227"]
[org.omcljs/om "0.9.0"]
[prismatic/om-tools "0.4.0"]]
:plugins [[lein-cljsbuild "1.1.4"]]
:cljsbuild {:builds [{:id "app"
... | null | https://raw.githubusercontent.com/mkremins/epitaph/003564c761143ebfa6ef28e936190debcb9e47fb/project.clj | clojure | :source-map true | (defproject mkremins/epitaph "0.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.227"]
[org.omcljs/om "0.9.0"]
[prismatic/om-tools "0.4.0"]]
:plugins [[lein-cljsbuild "1.1.4"]]
:cljsbuild {:builds [{:id "app"
... |
f4b592eaa707650b112392ffee3066de093f789ce3a165821edb7062946b2fc5 | Clozure/ccl | classes.lisp | (in-package :spell)
(defclass dictionary ()
((string-table :accessor string-table :initarg :string-table)
(descriptors :accessor descriptors :initarg :descriptors)
;; maps from hashes of strings to their corresponding descriptors
(descriptor-table :accessor descriptor-table
:initarg :de... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/hemlock/unused/archive/spell/classes.lisp | lisp | maps from hashes of strings to their corresponding descriptors | (in-package :spell)
(defclass dictionary ()
((string-table :accessor string-table :initarg :string-table)
(descriptors :accessor descriptors :initarg :descriptors)
(descriptor-table :accessor descriptor-table
:initarg :descriptor-table)
(free-descriptors :accessor free-descriptors
... |
66c83355d47e583de0c03f1998f913046ae8d712494497136e7d209bd67a86a4 | mpickering/apply-refact | Default83.hs | # LANGUAGE TemplateHaskell #
main = map $ \ d -> ([| $d |], [| $d |])
| null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Default83.hs | haskell | # LANGUAGE TemplateHaskell #
main = map $ \ d -> ([| $d |], [| $d |])
| |
3cedb79547a906feedd82a5924445e0d72841ad0725c19b395d1c0d92678a020 | fulcro-legacy/fulcro-tutorial | query_editing.cljs | (ns fulcro-tutorial.queries.query-editing
(:require [fulcro.client.primitives :as prim :refer-macros [defui]]
[cljs.reader :as r]
[devcards.util.edn-renderer :refer [html-edn]]
[goog.dom :as gdom]
[goog.object :as gobj]
[cljs.pprint :as pp :refer [pprint]]
... | null | https://raw.githubusercontent.com/fulcro-legacy/fulcro-tutorial/fe9bcd19908d4e24e723954e3804ceccfd07e989/src/tutorial/fulcro_tutorial/queries/query_editing.cljs | clojure | (ns fulcro-tutorial.queries.query-editing
(:require [fulcro.client.primitives :as prim :refer-macros [defui]]
[cljs.reader :as r]
[devcards.util.edn-renderer :refer [html-edn]]
[goog.dom :as gdom]
[goog.object :as gobj]
[cljs.pprint :as pp :refer [pprint]]
... | |
f63f393ed217e06f9b1d4f9840dbb967a85ab89d12d0198bb6f277b33cd3f35c | zotonic/zotonic | mod_search_db_tests.erl | -module(mod_search_db_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("zotonic_core/include/zotonic.hrl").
wait_for(QueryId, ItemId) ->
receive
{'$gen_cast',
{#rsc_query_item{query_id=QueryId, match_id=ItemId}, _}} ->
ok;
_X ->
?DEBUG("Got wrong mess... | null | https://raw.githubusercontent.com/zotonic/zotonic/7d89e689b477d4e40b156389a3d7602549f43fcd/apps/zotonic_mod_search/test/mod_search_db_tests.erl | erlang | Create a new query
Create an item which fits the query
Wait for the notification
Create a new query
Create an item which fits the query
It should match
Create an item which does not fit the query
It should not match
Default properties
Specific properties
No properties, just resource ids | -module(mod_search_db_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("zotonic_core/include/zotonic.hrl").
wait_for(QueryId, ItemId) ->
receive
{'$gen_cast',
{#rsc_query_item{query_id=QueryId, match_id=ItemId}, _}} ->
ok;
_X ->
?DEBUG("Got wrong mess... |
7b3006f61b36381110cf6e6c12f92fe3f84a98a847d91ef5b097531784869e2f | MaskRay/99-problems-ocaml | 61A.ml | type 'a tree = Leaf | Branch of 'a * 'a tree * 'a tree
let rec leaves = function
| Leaf -> []
| Branch (x, Leaf, Leaf) -> [x]
| Branch (x, l, r) -> leaves l @ leaves r
| null | https://raw.githubusercontent.com/MaskRay/99-problems-ocaml/652604f13ba7a73eee06d359b4db549b49ec9bb3/61-70/61A.ml | ocaml | type 'a tree = Leaf | Branch of 'a * 'a tree * 'a tree
let rec leaves = function
| Leaf -> []
| Branch (x, Leaf, Leaf) -> [x]
| Branch (x, l, r) -> leaves l @ leaves r
| |
ee578be2d547d444604d501abda008054ea94de9ac2639d19c57cb342b9fc4cf | McCLIM/McCLIM | package.lisp | ;;;; mcclim-dot package
;;;;
This file is part of the - dot extension . See
;;;; Extensions/dot/README.md and Extensions/dot/LICENSE for more information.
(cl:defpackage #:mcclim-dot
(:use #:cl)
(:local-nicknames (#:a #:alexandria)
(#:dot #:cl-dot)
(#:pn #:parse-number)
... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/a13c98d43948108d2433189aa3a6848b7d041c21/Extensions/dot/package.lisp | lisp | mcclim-dot package
Extensions/dot/README.md and Extensions/dot/LICENSE for more information. | This file is part of the - dot extension . See
(cl:defpackage #:mcclim-dot
(:use #:cl)
(:local-nicknames (#:a #:alexandria)
(#:dot #:cl-dot)
(#:pn #:parse-number)
(#:ss #:split-sequence))
(:export #:dot-arc-drawer
#:make-layout-override))
|
9e0c2726d81969f57fe25a474c5becb391ed62099c6adff4c7ad5520608e54b1 | janestreet/ecaml | test_function_file1.ml | open! Core
open! Import
let[@cold] funcall0 f =
lambda_nullary_nil [%here] (fun () -> f ())
|> Function.to_value
|> (Value.funcall0 [@inlined never])
|> Value.Type.(unit |> of_value_exn)
;;
let filename = __FILE__
| null | https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/ecaml_value/test/test_function_file1.ml | ocaml | open! Core
open! Import
let[@cold] funcall0 f =
lambda_nullary_nil [%here] (fun () -> f ())
|> Function.to_value
|> (Value.funcall0 [@inlined never])
|> Value.Type.(unit |> of_value_exn)
;;
let filename = __FILE__
| |
5cd232e84fba4e04c64b69280b8f3133288720f8f8a05d9355f5043c91c0ea29 | AndrasKovacs/ELTE-func-lang | Notes12.hs | # language BangPatterns #
module Notes12 where
Haskell optimalizáció
------------------------------------------------------------
fordítás ( függvények )
f :: Int -> Int
f x = x + 10
Core : GHC belső minimalista AST - je
optimalizáció a Core - ját
GHC pipeline :
forrás ... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/adc1319505ff60abcc314b54fa5cee6ad292f450/2022-23-1/ea/Notes12.hs | haskell | ----------------------------------------------------------
Int:
data Int = I# Int#
I#
|
tag | 64-bit Int#
miért:
alkalmazásokhoz)
foo :: (Int, Int) -> Int
, mindig inline
----------------------------------------------------------
Lustaságot érdemes minimalizálni
Unboxing maximalizálni
clo... | # language BangPatterns #
module Notes12 where
Haskell optimalizáció
fordítás ( függvények )
f :: Int -> Int
f x = x + 10
Core : GHC belső minimalista AST - je
optimalizáció a Core - ját
GHC pipeline :
forrás ( parsing )
nyers AST ( scope checking ) ... |
e6a76e36c327109680152552ab18a340596b0eb23887f9c21e7ae5ad7b3cfcb2 | rems-project/cerberus | impl_mem.ml | open Ctype
open Memory_model
open Memory_utils
module MC = Mem_common
module L = struct
include List
include Lem_list
end
let not_implemented str =
failwith ("NOT SUPPORTED: "^ str)
INTERNAL : allocation_id
type allocation_id =
N.num
(* INTERNAL: provenance *)
type provenance =
| Prov_empty
| Prov_som... | null | https://raw.githubusercontent.com/rems-project/cerberus/db704c30dabb2c123e7561bdce459b14d6636ca3/memory/vip/impl_mem.ml | ocaml | INTERNAL: provenance
INTERNAL: location
INTERNAL: Abstract bytes
'Memory byte' in the paper
None case is 'unspec' from the paper
None case is 'none' from the paper
NOTE: simplistic handling of floating values
INTERNAL
struct/union tag
member
struct/union tag
member
no device memory
NON-semantics fiel... | open Ctype
open Memory_model
open Memory_utils
module MC = Mem_common
module L = struct
include List
include Lem_list
end
let not_implemented str =
failwith ("NOT SUPPORTED: "^ str)
INTERNAL : allocation_id
type allocation_id =
N.num
type provenance =
| Prov_empty
| Prov_some of allocation_id
type ad... |
061a6b78d862f13384dbe9cb0856f50c7886e58c62403590afb9ad27584df748 | komadori/HsQML | ParamNames.hs | {-# LANGUAGE
ScopedTypeVariables,
FlexibleInstances
#-}
-- | Parameter Name Lists
module Graphics.QML.Objects.ParamNames (
ParamNames,
paramNames,
noNames,
fstName,
plusName,
anonParams,
AnonParams ()
) where
-- | Represents a list of parameter names. The number of names in the l... | null | https://raw.githubusercontent.com/komadori/HsQML/f57cffe4e3595bdf743bdbe6f44bf45a4001d35f/src/Graphics/QML/Objects/ParamNames.hs | haskell | # LANGUAGE
ScopedTypeVariables,
FlexibleInstances
#
| Parameter Name Lists
| Represents a list of parameter names. The number of names in the list is
statically encoded using the length of the function type held in the type
| Coverts a 'ParamNames' list to an ordinary list of strings.
| An empty 'ParamNa... |
module Graphics.QML.Objects.ParamNames (
ParamNames,
paramNames,
noNames,
fstName,
plusName,
anonParams,
AnonParams ()
) where
parameter
newtype ParamNames a = ParamNames ([String] -> [String])
instance Show (ParamNames a) where
show (ParamNames nsFunc) =
let showHead [] = sh... |
b74e5112c573251e55d8377d5e223ccdd30a07902005ae9f1add3a67f60cdd27 | wdebeaum/step | wobble.lisp | ;;;;
;;;; W::wobble
;;;;
(define-words :pos W::V :TEMPL AGENT-FORMAL-XP-TEMPL
:words (
(W::wobble
(SENSES
(
(LF-PARENT ONT::unsteady-move)
(example "the chair wobbled" "his knees wobbled")
(TEMPL affected-templ)
(meta-data :origin cardiac :entry-date 20081215 :change-date nil :comments L... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/wobble.lisp | lisp |
W::wobble
|
(define-words :pos W::V :TEMPL AGENT-FORMAL-XP-TEMPL
:words (
(W::wobble
(SENSES
(
(LF-PARENT ONT::unsteady-move)
(example "the chair wobbled" "his knees wobbled")
(TEMPL affected-templ)
(meta-data :origin cardiac :entry-date 20081215 :change-date nil :comments LM-vocab)
)
)
... |
9db77a2a1d6a6df5c0cf0cdda01b099e5bdadaf344c3f2eea2706e4e6c56e576 | slipstream/SlipStreamServer | loader.clj | (ns com.sixsq.slipstream.db.loader
(:require
[clojure.tools.logging :as log]
[com.sixsq.slipstream.db.ephemeral-impl :as edb]
[com.sixsq.slipstream.db.impl :as db]))
(defn load-db-binding
"Dynamically requires the binding identified by the given namespace and then
executes the 'load' function in th... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/db-binding/src/com/sixsq/slipstream/db/loader.clj | clojure | (ns com.sixsq.slipstream.db.loader
(:require
[clojure.tools.logging :as log]
[com.sixsq.slipstream.db.ephemeral-impl :as edb]
[com.sixsq.slipstream.db.impl :as db]))
(defn load-db-binding
"Dynamically requires the binding identified by the given namespace and then
executes the 'load' function in th... | |
0ea85b0fe8cd49e974bc45badfe5e70a847e906c76e365f0a0777204d864a0f7 | ivanperez-keera/dunai | DunaiExamplesReactiveValues.hs | -- See -keera/dunai/blob/develop/examples/keerahails/WXText.hs
| null | https://raw.githubusercontent.com/ivanperez-keera/dunai/99091c3391c0ba15e9075579e0b73c5660e994c2/dunai-examples/paper/src/DunaiExamplesReactiveValues.hs | haskell | See -keera/dunai/blob/develop/examples/keerahails/WXText.hs | |
4a3fbf174bccf740306eccc1e76d487c9a15493c73465ba860e47ee830a0737b | realworldocaml/book | gen_automaton_tables.ml | (* Parsing of S-expression. The parsing is written as an automaton for which
we provide different implementations of actions.
*)
open! Base
module Automaton = Parsexp_symbolic_automaton.Automaton
module Parse_error_reason = Parsexp_symbolic_automaton.Parse_error_reason
module Table = Parsexp_symbolic_automaton.Tabl... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/parsexp/src/cinaps/gen_automaton_tables.ml | ocaml | Parsing of S-expression. The parsing is written as an automaton for which
we provide different implementations of actions.
Sharing of transitions |
open! Base
module Automaton = Parsexp_symbolic_automaton.Automaton
module Parse_error_reason = Parsexp_symbolic_automaton.Parse_error_reason
module Table = Parsexp_symbolic_automaton.Table
module Sharing = struct
let create_assign_id () =
let cache = Hashtbl.Poly.create () in
( cache
, fun x ->
if... |
2a655b9a6c0867f115fac2924621dc9e37947018d50319381fb4e1c65db34f86 | gafiatulin/codewars | Longest.hs | Two to One
-- /
module Codewars.G964.Longest where
import Data.List (sort, group)
longest :: [Char] -> [Char] -> [Char]
longest = (\s1 s2 -> map head . group . sort $ s1++s2)
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/Longest.hs | haskell | / | Two to One
module Codewars.G964.Longest where
import Data.List (sort, group)
longest :: [Char] -> [Char] -> [Char]
longest = (\s1 s2 -> map head . group . sort $ s1++s2)
|
b10384ed96c2bbca3e377c469107b626fb43b5d3e4465846c4d42e598e3bae33 | nilenso/goose | heartbeat.clj | (ns ^:no-doc goose.brokers.redis.heartbeat
(:require
[goose.brokers.redis.commands :as redis-cmds]
[goose.defaults :as d]
[goose.utils :as u]))
(defn heartbeat-id [id]
(str d/heartbeat-prefix id))
(defn alive? [redis-conn id]
(boolean (redis-cmds/get-key redis-conn (heartbeat-id id))))
(defn local-... | null | https://raw.githubusercontent.com/nilenso/goose/8a5f2fe1a4fa138fee5b74e00109e840b0b1fad1/src/goose/brokers/redis/heartbeat.clj | clojure | Goose stops sending heartbeat when shutdown is initialized.
Set expiry beyond graceful-shutdown time so in-progress jobs
aren't considered abandoned and double executions are avoided.
`(redis-cmds/list-size in-progress-queue)` won't be empty
when jobs swallow thread-interrupted exception;
and don't exit in-time f... | (ns ^:no-doc goose.brokers.redis.heartbeat
(:require
[goose.brokers.redis.commands :as redis-cmds]
[goose.defaults :as d]
[goose.utils :as u]))
(defn heartbeat-id [id]
(str d/heartbeat-prefix id))
(defn alive? [redis-conn id]
(boolean (redis-cmds/get-key redis-conn (heartbeat-id id))))
(defn local-... |
261e7f7ec225c3d3f6d910fed8ed9d9dd755023d5aae323818d9924de2a9f82e | basho/riak_kv | riak_kv_requests.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may ob... | null | https://raw.githubusercontent.com/basho/riak_kv/aeef1591704d32230b773d952a2f1543cbfa1889/src/riak_kv_requests.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2016 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-modul... |
27b313e776b6c2c4938b9c3216be67e8de7a8b139062a7037c8cce2ed34df7cb | engineyard/vertebra-erl | vertebra_sup.erl | Copyright 2008 , Engine Yard , Inc.
%
This file is part of Vertebra .
%
Vertebra is free software : you can redistribute it and/or modify it under the
% terms of the GNU Lesser General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
% lat... | null | https://raw.githubusercontent.com/engineyard/vertebra-erl/cf6e7c84f6dfbf2e31f19c47e9db112ae292ec27/lib/vertebra/src/vertebra_sup.erl | erlang |
terms of the GNU Lesser General Public License as published by the Free
later version.
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
API
Supervisor callbacks
====================================... | Copyright 2008 , Engine Yard , Inc.
This file is part of Vertebra .
Vertebra is free software : you can redistribute it and/or modify it under the
Software Foundation , either version 3 of the License , or ( at your option ) any
Vertebra is distributed in the hope that it will be useful , but WITHOUT ANY
Yo... |
77a01bbe94915340ee10d07406ed9439b4e56660d1eb3be87c10c1afab1aa2b5 | Lysxia/test-monad-laws | Base.hs | | Laws for ' MonadBase .
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Test.Monad.Base where
import Control.Monad.Base
import Test.QuickCheck.HigherOrder (Equation(..))
import Test.Monad.Morph
-- | Lifting a 'return' is n... | null | https://raw.githubusercontent.com/Lysxia/test-monad-laws/1cb9e116769771cb49fbd1614f50b05e120a2709/src/Test/Monad/Base.hs | haskell | | Lifting a 'return' is no different to just using 'return' directly.
@
@
| Lifting distributes over '(>>=)'.
@
@ | | Laws for ' MonadBase .
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Test.Monad.Base where
import Control.Monad.Base
import Test.QuickCheck.HigherOrder (Equation(..))
import Test.Monad.Morph
' liftBase ' ( ' return ' ... |
b7cefb9443ff0866f1cf5312e076b4a7733413b0749751002eaa94ca524e4649 | 5HT/ant | Encodings.mli |
open FontMetric;
open Unicode;
open Unicode.Types;
open Substitute;
value undefined : Charmap.charmap glyph_desc;
value uc_to_ot1 : Charmap.charmap glyph_desc;
value uc_to_t1 : Charmap.charmap glyph_desc;
value uc_to_ott : Charmap.charmap glyph_desc;
value uc_to_oms : Charmap.charmap glyph_desc;
value uc_to_oml : Ch... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Runtime/Encodings.mli | ocaml |
open FontMetric;
open Unicode;
open Unicode.Types;
open Substitute;
value undefined : Charmap.charmap glyph_desc;
value uc_to_ot1 : Charmap.charmap glyph_desc;
value uc_to_t1 : Charmap.charmap glyph_desc;
value uc_to_ott : Charmap.charmap glyph_desc;
value uc_to_oms : Charmap.charmap glyph_desc;
value uc_to_oml : Ch... | |
763dc1ae0e16f05254c7a80e0c4b4a21d16563c8254423d0c1e20282ad2d512d | skeuchel/needle | Index.hs |
module KnotCore.Elaboration.Index where
import Control.Applicative
import Coq.Syntax
import Coq.StdLib
import KnotCore.Syntax
import KnotCore.Elaboration.Core
eIndex :: Elab m => [NamespaceDecl] -> m Sentences
eIndex nds =
concat <$> sequenceA
[ eTypeIndex
, sequenceA
[ pure SentenceBlankline
... | null | https://raw.githubusercontent.com/skeuchel/needle/25f46005d37571c1585805487a47950dcd588269/src/KnotCore/Elaboration/Index.hs | haskell | , traverse (eInstanceWeakenIndex . nsdTypeName) nds |
module KnotCore.Elaboration.Index where
import Control.Applicative
import Coq.Syntax
import Coq.StdLib
import KnotCore.Syntax
import KnotCore.Elaboration.Core
eIndex :: Elab m => [NamespaceDecl] -> m Sentences
eIndex nds =
concat <$> sequenceA
[ eTypeIndex
, sequenceA
[ pure SentenceBlankline
... |
5d11c400f11ad616e19cc89587570b8725275cda1aa6d567b4edd8b9d8645a9a | travelping/ergw | 3gpp_qos_SUITE.erl | Copyright 2017 , Travelping GmbH < >
%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version
2 of the License , or ( at your option ) any later version .
-module('3gpp_qos_SUITE'... | null | https://raw.githubusercontent.com/travelping/ergw/1b6cc3ee89eea4cf9df1d7de612744f0a850dfd9/apps/ergw_core/test/3gpp_qos_SUITE.erl | erlang | This program is free software; you can redistribute it and/or
===================================================================
API
===================================================================
===================================================================
Tests
=========================================... | Copyright 2017 , Travelping GmbH < >
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version
2 of the License , or ( at your option ) any later version .
-module('3gpp_qos_SUITE').
-compile(export_all).
-include_lib("common_test/include/ct.h... |
4ca8ecf47cb2aca1ff01dffaa2fea6472c55cba6a8c08b30b67856d47c300812 | moon-chilled/meow64 | package.lisp | (cl:defpackage #:meow64-macho
(:use #:cl)
(:export #:parse-macho-32
#:macho32-file #:macho32-file-segments #:macho32-file-symtabs #:macho32-file-loaded-dylibs #:macho32-file-entry-point #:macho32-file-dylinker))
(cl:defpackage #:meow64
(:use #:cl)
(:local-nicknames (#:macho #:meow64-macho... | null | https://raw.githubusercontent.com/moon-chilled/meow64/e108e498b92ddbaa594783a3e3be31ce5fcad68d/package.lisp | lisp | (cl:defpackage #:meow64-macho
(:use #:cl)
(:export #:parse-macho-32
#:macho32-file #:macho32-file-segments #:macho32-file-symtabs #:macho32-file-loaded-dylibs #:macho32-file-entry-point #:macho32-file-dylinker))
(cl:defpackage #:meow64
(:use #:cl)
(:local-nicknames (#:macho #:meow64-macho... | |
06374d5d0983c86d01c56a697e5b8c22e64d0b5abe97854ac457dc34f98c3ff7 | wenkokke/priority-sesh | Priority.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Data.Type.Priority
( Priority (..),
type (<),
type Min,
type Max,
)
where
import Data.Kind (Constraint)
import Data.Type.Boo... | null | https://raw.githubusercontent.com/wenkokke/priority-sesh/51b2a8a8c53804ae90d645f9b3223d8d7d6160b8/src/Data/Type/Priority.hs | haskell | # LANGUAGE ConstraintKinds #
* Priorities
| A 'Priority' is an abstract representation of the time at which some event
happens.
| The event happens before every other event.
| A concrete time, represented by a natural number.
| The event happens after every other event.
| Type-level '<' as a constraint
| Type... | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Data.Type.Priority
( Priority (..),
type (<),
type Min,
type Max,
)
where
import Data.Kind (Constraint)
import Data.Type.Bool (If)
import Data.Type.Nat.Extra... |
36e8198193e6b6bac2899aa8e5514ee979a947c78519f41b87bade9fec89ecce | eugeneia/athens | cffi.lisp | (defpackage :trivia.cffi
(:import-from :cffi :null-pointer)
(:export :-> :null-pointer))
(defpackage :trivia.cffi.impl
(:use :cl :alexandria :cffi
:trivia.level0
:trivia.level1
:trivia.level2
:trivia.cffi))
(in-package :trivia.cffi.impl)
(defpattern -> (foreign-type &rest slots)... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/trivia-20180711-git/cffi/cffi.lisp | lisp | returns a pointer
foreign-slot-value access (leaf pattern)
explicit foreign-slot-pointer access
implicit foreign-slot-pointer access (nested pattern)
implicit foreign-slot-pointer access (nested pattern)
leaf node: value access | (defpackage :trivia.cffi
(:import-from :cffi :null-pointer)
(:export :-> :null-pointer))
(defpackage :trivia.cffi.impl
(:use :cl :alexandria :cffi
:trivia.level0
:trivia.level1
:trivia.level2
:trivia.cffi))
(in-package :trivia.cffi.impl)
(defpattern -> (foreign-type &rest slots)... |
2f778f91132560fb0ea0454fb18d9cb629aebd0ae863adaeab0c8810843bc667 | clojure/clojurescript | set_equiv_test.cljs | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the t... | null | https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/test/cljs/cljs/set_equiv_test.cljs | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns cljs.set-equiv-test
(:refer-clojure :exclude [iter])
(:require [cljs.test :refer-macros [deftest testing is]]
[clojure.string :as s]
[clojure.set :as set]))
(deftest test-set-equality
(testing "Test... |
9a9e40ec79c0970daa95a3deb981a56247114ccb32eaae4848714a34476c39bf | facet-lang/facet | Pretty.hs | module Facet.Pretty
( -- * Output
layoutOptionsForHandle
, hPutDoc
, hPutDocWith
, putDoc
, putDocWith
-- * Helpers
, reflow
, unlines
, (<\>)
-- * Variable formatting
, toAlpha
, lower
, upper
, varFrom
-- * Columnar layout
, tabulate2
-- * Rendering
, renderIO
, renderLazy
-- * ANSI codes
, setRGB
, setRG... | null | https://raw.githubusercontent.com/facet-lang/facet/4626eed1395cd91acc2d38910f27809ad6e753fa/src/Facet/Pretty.hs | haskell | * Output
* Helpers
* Variable formatting
* Columnar layout
* Rendering
* ANSI codes
* Re-exports
Output
Helpers
Variable formatting
Rendering
| Render a 'PP.SimpleDocStream' to a 'Handle' using 'SGR' codes as the annotation type.
ANSI codes | module Facet.Pretty
layoutOptionsForHandle
, hPutDoc
, hPutDocWith
, putDoc
, putDocWith
, reflow
, unlines
, (<\>)
, toAlpha
, lower
, upper
, varFrom
, tabulate2
, renderIO
, renderLazy
, setRGB
, setRGBBack
, setBold
, PP.Doc
, PP.Pretty
, pretty
, PP.layoutSmart
, SGR
) where
import Control.Carrier.Lif... |
9adf3edbbaf56bb6b45f001b543ce9da0f32e6b2d6614f470b3e86f94ff6b63f | mchakravarty/language-c-inline | Main.hs | # LANGUAGE TemplateHaskell , QuasiQuotes #
import Language.C.Quote.ObjC
import Language.C.Inline.ObjC
objc_import ["<Foundation/Foundation.h>", "Particle_objc.h"]
go :: IO ()
go = $(objc [] $ void [cexp| ({
typename Particle *particle = [Particle particleWithMass:1.0];
NSLog(@"The mass is %f", particle.mas... | null | https://raw.githubusercontent.com/mchakravarty/language-c-inline/034128f80abc917040f42a10ce982775ae5e7387/tests/objc/record/Main.hs | haskell | # LANGUAGE TemplateHaskell , QuasiQuotes #
import Language.C.Quote.ObjC
import Language.C.Inline.ObjC
objc_import ["<Foundation/Foundation.h>", "Particle_objc.h"]
go :: IO ()
go = $(objc [] $ void [cexp| ({
typename Particle *particle = [Particle particleWithMass:1.0];
NSLog(@"The mass is %f", particle.mas... | |
5f5870986c1f9e9b574c0de641073f73a501628ab3e9ce5ad2b3d7bfb76ddd8e | racket/web-server | connection-manager-test.rkt | #lang racket/base
(require rackunit
web-server/private/connection-manager
web-server/private/timer)
(provide connection-manager-tests)
(module+ test
(require rackunit/text-ui)
(run-tests connection-manager-tests))
(define cm (start-connection-manager))
(define (make-connection&evt ttl ib ob [cu... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-test/tests/web-server/private/connection-manager-test.rkt | racket | Modify the timer s.t. it fires an event when its action completes.
This means we don't have to rely on static sleeps to test this
code, although it does couple the tests to the implementation.
Ensure the connection object is retained for longer than the
timer, otherwise things will flake out. | #lang racket/base
(require rackunit
web-server/private/connection-manager
web-server/private/timer)
(provide connection-manager-tests)
(module+ test
(require rackunit/text-ui)
(run-tests connection-manager-tests))
(define cm (start-connection-manager))
(define (make-connection&evt ttl ib ob [cu... |
6f06be01270c1c68f95fe2c14a30c316a4f7a848d8feca428aa9a9bf14aa8d29 | emotiq/emotiq | gossip-test.lisp | (in-package :gossip-test)
(defparameter *debug* nil
"True if you want intermediate timings to print out and show inspector on failures")
(eval-when (:load-toplevel :execute)
(lisp-unit:remove-tests :all))
(defmacro with-networking (&body body)
`(progn
(build-fixture)
,@body
(teardown-fixture)))
... | null | https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/gossip/test/gossip-test.lisp | lisp | give it time to work [solicit won't wait]
(let ((*print-failures* t)) (run-tests '(aliveness)))
careful with globals. Remember that they get a different value
in each thread if you're not careful. So we set them here
rather than bind them.
do same test starting at every possible node
(let ((*print-failures* t))... | (in-package :gossip-test)
(defparameter *debug* nil
"True if you want intermediate timings to print out and show inspector on failures")
(eval-when (:load-toplevel :execute)
(lisp-unit:remove-tests :all))
(defmacro with-networking (&body body)
`(progn
(build-fixture)
,@body
(teardown-fixture)))
... |
4d5d8565e24311ead6cee92f9b35c214b4ab2e1381ee5c613d16362366d90f94 | dyzsr/ocaml-selectml | cmi_format.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/file_formats/cmi_format.ml | ocaml | ************************************************************************
OCaml
Fabrice L... | Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
type pers_flags =
| Rectypes
| Alerts of alerts
| Opaque
| Unsafe_string
type error =
| Not_an_interface of filepath
| Wrong_version_interface of ... |
91dc0c00c68f2a76679306e4184aa118149b94beb27b545ad4406bb1c5e726ad | byorgey/AoC | 09.hs | import Control.Monad
import Data.Char
import Data.List
import Text.Parsec
import Text.Parsec.String
main = interact ((++"\n") . show . decompressedLength . doParse)
data Segment = Repeat Integer String | Literal String
deriving Show
type Compressed = [Segment]
doPa... | null | https://raw.githubusercontent.com/byorgey/AoC/30eb51eb41af9ca86b05de598a3a96d25bd428e3/2016/09/09.hs | haskell | import Control.Monad
import Data.Char
import Data.List
import Text.Parsec
import Text.Parsec.String
main = interact ((++"\n") . show . decompressedLength . doParse)
data Segment = Repeat Integer String | Literal String
deriving Show
type Compressed = [Segment]
doPa... | |
01597b806def9488ce240908deb2c63b9ed59a2c8c83c2f9f9f97caf2bb7f355 | lucasdicioccio/deptrack-project | Mount.hs | {-# LANGUAGE OverloadedStrings #-}
module Devops.Storage.Mount where
import Data.Monoid ((<>))
import qualified Data.Text as Text
import qualified Devops.Debian.Commands as Cmd
import Devops.Base
import Devops.Storage
import Devops.Storage.Format hidi... | null | https://raw.githubusercontent.com/lucasdicioccio/deptrack-project/cd3d59a796815af8ae8db32c47b1e1cdc209ac71/deptrack-devops-recipes/src/Devops/Storage/Mount.hs | haskell | # LANGUAGE OverloadedStrings # |
module Devops.Storage.Mount where
import Data.Monoid ((<>))
import qualified Data.Text as Text
import qualified Devops.Debian.Commands as Cmd
import Devops.Base
import Devops.Storage
import Devops.Storage.Format hiding (partition)
import Dev... |
97b6624118b31706a382617b2abff0afae309b71f094705dd83c18e85a5f8f4d | OlivierNicole/macros-examples | fmt.ml | * © , 2017 - 2018
type (_,_) fmt =
| Int : (int -> 'a, 'a) fmt
| Lit : string -> ('a, 'a) fmt
| Bool : (bool -> 'a, 'a) fmt
| Cat : ('a, 'b) fmt * ('b, 'c) fmt -> ('a, 'c) fmt
let (%) x y = Cat (x, y)
Unstaged printf . The auxiliary printk function is in CPS and
the interface fucntion sprintf suppl... | null | https://raw.githubusercontent.com/OlivierNicole/macros-examples/53a614be8aa91b44cbc9d7982dcebc40e5d22818/printf-scanf/fmt.ml | ocaml | Naively-staged printf, identical to printk/sprintf except for
staging annotations.
An improved staged printf based on partially-static strings.
For some format strings this generates code with fewer
catenations.
An interface to if insertion.
The if_locus function marks a point where an 'if' can be ... | * © , 2017 - 2018
type (_,_) fmt =
| Int : (int -> 'a, 'a) fmt
| Lit : string -> ('a, 'a) fmt
| Bool : (bool -> 'a, 'a) fmt
| Cat : ('a, 'b) fmt * ('b, 'c) fmt -> ('a, 'c) fmt
let (%) x y = Cat (x, y)
Unstaged printf . The auxiliary printk function is in CPS and
the interface fucntion sprintf suppl... |
88a31e5f61890ef15a74047e7f649fdba64a731898675aad22f38585f6a63437 | lispnik/cl-http | start.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Package : cl - user ; Base : 10 -*-
(in-package "CL-USER")
#+(and Allegro (version>= 5 0))
(push :ACL5 *features*)
;;; lispm major.minor ACL major.minor
(setq *cl-http-server-version* '(70 23 3 11 6))
#+ACLPC
(defvar *command-line-arguments* nil)
#+ACLPC
(defpara... | null | https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/acl/start.lisp | lisp | Syntax : ansi - common - lisp ; Package : cl - user ; Base : 10 -*-
lispm major.minor ACL major.minor
From acl;unix
Main HTTP source directory
clim - sys;sysdcl.lisp
Really needed before ever used
Turn off ~pathname expansions
Extend y-or-n-p
)
hum this spawns a process to save image...
Enable W3P
Load sy... |
(in-package "CL-USER")
#+(and Allegro (version>= 5 0))
(push :ACL5 *features*)
(setq *cl-http-server-version* '(70 23 3 11 6))
#+ACLPC
(defvar *command-line-arguments* nil)
#+ACLPC
(defparameter *http-command-line*
(cond ((find-package "HTTP")
(setq *command-line-arguments* nil)
" port=80 host= compile... |
41b4d3ab05bae1bc39ea1740931f3abc4034e08826f6670afa02ec772b963f7c | huangz1990/real-world-haskell-cn | EitherIntFlexible.hs | -- file: ch10/EitherIntFlexible.hs
# LANGUAGE FlexibleInstances #
# LANGUAGE OverlappingInstances #
-XOverlappingInstances is deprecated : instead use per - instance pragmas OVERLAPPING / OVERLAPPABLE / OVERLAPS
instance Functor (Either Int) where
fmap _ (Left n) = Left n
fmap f (Right r) = Right (f r) | null | https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch10/EitherIntFlexible.hs | haskell | file: ch10/EitherIntFlexible.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE OverlappingInstances #
-XOverlappingInstances is deprecated : instead use per - instance pragmas OVERLAPPING / OVERLAPPABLE / OVERLAPS
instance Functor (Either Int) where
fmap _ (Left n) = Left n
fmap f (Right r) = Right (f r) |
34b8299a894599f9a38b3dbd5cc2e601e9a1bec64ff6786349fd0bfe530adcec | bintracker/bintracker | m6803.scm | (id: m6803 endianness: big-endian)
| null | https://raw.githubusercontent.com/bintracker/bintracker/7ae8a5dce6ca52d331a49e8f12ee81bca1d07af4/libmdal/mdal-targets/cpu/m6803.scm | scheme | (id: m6803 endianness: big-endian)
| |
aaee6a74d8df72569e1a6933d016ead651ff868d510b0334bb06c8f3edac908a | Dasudian/DSDIN | wormhole_slash_tx.erl |
-module(wormhole_slash_tx).
-include("channel_txs.hrl").
-behavior(aetx).
%% Behavior API
-export([new/1,
type/0,
fee/1,
ttl/1,
nonce/1,
origin/1,
check/5,
process/5,
accounts/1,
signers/2,
serialization_template/1,
s... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/wormhole/src/wormhole_slash_tx.erl | erlang | Behavior API
===================================================================
Types
===================================================================
===================================================================
Behaviour API
===================================================================
TODO: add s... |
-module(wormhole_slash_tx).
-include("channel_txs.hrl").
-behavior(aetx).
-export([new/1,
type/0,
fee/1,
ttl/1,
nonce/1,
origin/1,
check/5,
process/5,
accounts/1,
signers/2,
serialization_template/1,
serialize/1,
... |
3275b611ca764d492cc959376871a4b7f672d25b810cdfd25bf6db38416a00fa | VMatthijs/CHAD | Test.hs | # LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE TupleSections ... | null | https://raw.githubusercontent.com/VMatthijs/CHAD/755fc47e1f8d1c3d91455f123338f44a353fc265/src/Test.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
| Test suite for the AD code.
reverse AD and finite differencing all agree on the examples programs in the
"Examples" module.
Tests for all example programs:
... | # LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableSuperClasses #
... |
e0eaa96d32c4528853a919686cabf15fffa857ab0c2094a057e677ad29e8d32e | prikhi/hIRC | Main.hs | # LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Brick
import Brick.BChan (BChan, newBChan, writeBChan)
import Brick.Forms ((@@=), Form, newForm, editTextField, renderForm, handleFormEvent, formState, allFieldsValid)
imp... | null | https://raw.githubusercontent.com/prikhi/hIRC/25d7cfd5736744f2531be6b8917e67a78d19b634/client/Main.hs | haskell | # LANGUAGE OverloadedStrings #
Types
| Create a blank input form, labeled by the current channel's name.
| Configure the Brick UI.
Update
Say Goodbye to the Daemon & Stop the Application.
Send Chat Message to Channel if one is available.
Update the Input form.
TODO: refactor into own function
Just subscribe to... | # LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TemplateHaskell #
module Main (main) where
import Brick
import Brick.BChan (BChan, newBChan, writeBChan)
import Brick.Forms ((@@=), Form, newForm, editTextField, renderForm, handleFormEvent, formState, allFieldsValid)
import Brick.Widgets.Border (vBorder)
... |
2d1ba4c8956cba03e8c0537d4908559391cc9f423ba0e060a09d45d39fd82b84 | uim/uim | mana-key-custom.scm | ;;; mana-key-custom.scm: Customization variables for mana.scm
;;;
Copyright ( c ) 2003 - 2013 uim Project
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
1 . Redistributions o... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/mana-key-custom.scm | scheme | mana-key-custom.scm: Customization variables for mana.scm
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of... | Copyright ( c ) 2003 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR... |
e547b1a0e6f1a1bb1f0df4396690f1c9b73bedf451321a6e17ac624789334f0f | quchen/generative-art | Main.hs | module Main (main) where
import qualified Data.Set as S
import qualified Data.Vector as V
import Prelude hiding ((**))
import System.Random.MWC
import Draw
import Draw.Plotting
import Geometry as G
import Geometry.Algorithms.SimplexNoise
import Gr... | null | https://raw.githubusercontent.com/quchen/generative-art/6659101e16c8d869dede089b5be118e4f9f5c4f5/penplotting/PoissonDisc/Main.hs | haskell | module Main (main) where
import qualified Data.Set as S
import qualified Data.Vector as V
import Prelude hiding ((**))
import System.Random.MWC
import Draw
import Draw.Plotting
import Geometry as G
import Geometry.Algorithms.SimplexNoise
import Gr... | |
a80df99b2aa25e25f06f14b4df347f54375fe76e45887015ab86e603dbf06018 | bhauman/devcards | edn_render.cljs | (ns devdemos.edn-render
(:require [devcards.core])
(:require-macros
[devcards.core :as dc :refer [defcard edn]]))
(defcard some-typical-nested-edn
{:first (range 50)
:sets (set (range 1000 1100))
:vector (vec (range 1000 1100))
:second (take 6 (repeat {:first-name "Bruce"
... | null | https://raw.githubusercontent.com/bhauman/devcards/65caa84c9438dd8bdf8cd21964e6033b1a22c178/example_src/devdemos/edn_render.cljs | clojure | (ns devdemos.edn-render
(:require [devcards.core])
(:require-macros
[devcards.core :as dc :refer [defcard edn]]))
(defcard some-typical-nested-edn
{:first (range 50)
:sets (set (range 1000 1100))
:vector (vec (range 1000 1100))
:second (take 6 (repeat {:first-name "Bruce"
... | |
ff65446f20c79029bf36cb755f946ad875c9d5e557ec44a07f042a3511b558c3 | ocurrent/ocaml-docs-ci | git_context.ml | module Store = Git_unix.Store
module Search = Git.Search.Make (Digestif.SHA1) (Store)
open Lwt.Infix
type rejection = UserConstraint of OpamFormula.atom | Unavailable
type t = {
env : string -> OpamVariable.variable_contents option;
packages : OpamFile.OPAM.t OpamPackage.Version.Map.t OpamPackage.Name.Map.t;
pi... | null | https://raw.githubusercontent.com/ocurrent/ocaml-docs-ci/cb5d4a54a7fd9883aec066b4bd1fcb50ca42e7bc/src/solver/git_context.ml | ocaml | User-provided constraints
Get a map of the versions inside [entry] (an entry under "packages") | module Store = Git_unix.Store
module Search = Git.Search.Make (Digestif.SHA1) (Store)
open Lwt.Infix
type rejection = UserConstraint of OpamFormula.atom | Unavailable
type t = {
env : string -> OpamVariable.variable_contents option;
packages : OpamFile.OPAM.t OpamPackage.Version.Map.t OpamPackage.Name.Map.t;
pi... |
c65c150cf12d346d55d58a9624578ec9e612bd5f4df17b657847717989df6611 | philnguyen/soft-contract | havoc-2.rkt | #lang racket
(provide/contract
[main ((any/c . -> . (-> any/c)) . -> . any/c)])
(define (main f●)
(define n -3)
(define (inc!) (set! n (add1 n)))
(define (app) (/ 1 n))
(define h (f● app))
(f● inc!)
(h))
| null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/paper/havoc-2.rkt | racket | #lang racket
(provide/contract
[main ((any/c . -> . (-> any/c)) . -> . any/c)])
(define (main f●)
(define n -3)
(define (inc!) (set! n (add1 n)))
(define (app) (/ 1 n))
(define h (f● app))
(f● inc!)
(h))
| |
47338068055413490c7f07546cd1303a380c100cfea24270dc68012effe63691 | jrh13/hol-light | rqe_main.ml | let TRAPOUT cont mat_thm ex_thms fm =
try
cont mat_thm ex_thms
with Isign (false_thm,ex_thms) ->
let ftm = mk_eq(fm,f_tm) in
let fthm = CONTR ftm false_thm in
let ex_thms' = sort (fun x y -> xterm_lt (fst y) (fst x)) ex_thms in
let fthm' = rev_itlist CHOOSE ex_thms' fthm in
fthm';;
let ge... | null | https://raw.githubusercontent.com/jrh13/hol-light/ea44a4cacd238d7fa5a397f043f3e3321eb66543/Rqe/rqe_main.ml | ocaml | {{{ Examples
}}}
NEQ_CONV (ARITH_RULE `~(&11 <= &2)`)
|- poly_diff [&0; &0; &0 + a * &1] = [&0; &0 + a * &2]
let tm = `poly_diff [&0; &0 + a * &1]`
{{{ Examples
}}}
----------------------------------------------------------------------
Factoring ... | let TRAPOUT cont mat_thm ex_thms fm =
try
cont mat_thm ex_thms
with Isign (false_thm,ex_thms) ->
let ftm = mk_eq(fm,f_tm) in
let fthm = CONTR ftm false_thm in
let ex_thms' = sort (fun x y -> xterm_lt (fst y) (fst x)) ex_thms in
let fthm' = rev_itlist CHOOSE ex_thms' fthm in
fthm';;
let ge... |
25249e24cad7140d4c6681784611b5b9e31a6fa3e2df5fe08323bbbc971a4862 | shaolang/cljito | core.clj | (ns cljito.core
(:import [org.mockito Mockito]
[org.mockito.verification VerificationMode]))
(defn mock
"Returns the Mockito-mocked object."
[klass]
(Mockito/mock klass))
(defn spy
"Returns the Mockito-spied (real) object."
[obj]
(Mockito/spy obj))
(defn classes
"Converts the list of given... | null | https://raw.githubusercontent.com/shaolang/cljito/9942d2565fd85ca09bfa4ff175ca11ff7e17d2da/src/cljito/core.clj | clojure | (ns cljito.core
(:import [org.mockito Mockito]
[org.mockito.verification VerificationMode]))
(defn mock
"Returns the Mockito-mocked object."
[klass]
(Mockito/mock klass))
(defn spy
"Returns the Mockito-spied (real) object."
[obj]
(Mockito/spy obj))
(defn classes
"Converts the list of given... | |
6b1a21658666f40672fba045a49194fcca6437a8c867795198ef46dc87085197 | SleepyBag/leetcode-racket | 1.rkt | (define/contract (two-sum nums target)
(-> (listof exact-integer?) exact-integer? (listof exact-integer?))
(let ((index (make-hash))
(i 0))
(car (filter-map
(lambda (n)
(let ((pair-index (hash-ref index (- target n) #f))
(cur-index i))
(hash-set! index... | null | https://raw.githubusercontent.com/SleepyBag/leetcode-racket/60b0436f542c48cd2172ae1ae2567c8274b34eba/1.rkt | racket | (define/contract (two-sum nums target)
(-> (listof exact-integer?) exact-integer? (listof exact-integer?))
(let ((index (make-hash))
(i 0))
(car (filter-map
(lambda (n)
(let ((pair-index (hash-ref index (- target n) #f))
(cur-index i))
(hash-set! index... | |
10c5597902bd8b0e0d8386041cd6231f81372c14cb323873991bdebe3b7d9a09 | racket/gui | cg.rkt | #lang racket/base
(require ffi/unsafe
ffi/unsafe/objc
ffi/unsafe/alloc
"types.rkt"
"utils.rkt")
(provide (protect-out (all-defined-out)))
(define-cstruct _CGAffineTransform ([a _CGFloat]
[b _CGFloat]
[c _CGFloa... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/cocoa/cg.rkt | racket | #lang racket/base
(require ffi/unsafe
ffi/unsafe/objc
ffi/unsafe/alloc
"types.rkt"
"utils.rkt")
(provide (protect-out (all-defined-out)))
(define-cstruct _CGAffineTransform ([a _CGFloat]
[b _CGFloat]
[c _CGFloa... | |
d520c3d6cc64f6daec4068d66ce1c07c11fc92a4faae2aebc1c277eb211247a0 | zkincaid/duet | struct.mli | (* Finite structures *)
open PaFormula
module type Symbol = sig
type t
val hash : t -> int
val equal : t -> t -> bool
val compare : t -> t -> int
val pp : Format.formatter -> t -> unit
end
module type S = sig
type t
type predicate
module Predicate : Symbol with type t = predicate
val pp : Format.for... | null | https://raw.githubusercontent.com/zkincaid/duet/eb3dbfe6c51d5e1a11cb39ab8f70584aaaa309f9/pa/struct.mli | ocaml | Finite structures
* Enumerate the propositions which hold in a structure
* Find all minimal models of a given formula, with a given universe
* [union s s'] is a structure whose universe is the union of the universes
of [s] and [s'] and whose interpretation of each predicate [p] is the
union of its inter... | open PaFormula
module type Symbol = sig
type t
val hash : t -> int
val equal : t -> t -> bool
val compare : t -> t -> int
val pp : Format.formatter -> t -> unit
end
module type S = sig
type t
type predicate
module Predicate : Symbol with type t = predicate
val pp : Format.formatter -> t -> unit
va... |
bca4d664f9376ac414833d7923932fb0869d8f601ff87a4ace8923271e6288b2 | onedata/op-worker | atm_workflow_execution_rest_translator.erl | %%%-------------------------------------------------------------------
@author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module handles translation of... | null | https://raw.githubusercontent.com/onedata/op-worker/0b059f432df26a54f372f7d4b99a40ffca5f802a/src/http/rest/translators/automation/atm_workflow_execution_rest_translator.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module handles translation of middleware results concerning
atm_workflow_execution entities into REST responses.
@end
----------------------------------------------... | @author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(atm_workflow_execution_rest_translator).
-author("Lukasz Opiola").
-include("http/rest.hrl").
-include("middleware/middleware.hrl").
-include("modules/automation/atm_execution.hrl").
-expo... |
eaee4648591d05f04aa175288e110399bb8fbd86b75742fe922dec0eca7e7628 | pschachte/wybe | Analysis.hs | File : Analysis.hs
Author :
-- Purpose : Entry point of all kinds of analysis for a single module
Copyright : ( c ) 2018 . All rights reserved .
License : Licensed under terms of the MIT license . See the file
-- : LICENSE in the root directory of this project.
module Analysis... | null | https://raw.githubusercontent.com/pschachte/wybe/1d31599aa7e95bf1b8013f4731f47ca851736ea5/src/Analysis.hs | haskell | Purpose : Entry point of all kinds of analysis for a single module
: LICENSE in the root directory of this project.
Some logging
--------------------------------
ALIAS ANALYSIS
MODULE LEVEL ALIAS ANALYSIS
|Log a message, if we are logging optimisation activity. | File : Analysis.hs
Author :
Copyright : ( c ) 2018 . All rights reserved .
License : Licensed under terms of the MIT license . See the file
module Analysis (analyseMod) where
import AliasAnalysis (aliasSccBottomUp,
currentAliasInfo,
... |
096255a9dd0260793a2fee22301e01adc8228856ad64844b11b7a16bc45bf7ac | shapr/fermatslastmargin | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Main where
import Config.Schema.Load
import Control.Monad (unless, void, (<=<))
import Control.Monad.Extra (ifM)
import Control.Monad.IO.Class (liftIO)
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.Lazy as BSL
i... | null | https://raw.githubusercontent.com/shapr/fermatslastmargin/c145e6c0e6566ee9fbca2ab2f9a2c14334c0d49e/Main.hs | haskell | # LANGUAGE OverloadedStrings #
create config dirs if missing
create HTTP manager cause we gonna need it?
load all papers and notes
load github username and oauth token
this function always matches, then checks for empty gitconfig
can't possibly be fast to check for EVERY SINGLE REQUEST, what's easier/simpler ?
i... | # LANGUAGE ScopedTypeVariables #
module Main where
import Config.Schema.Load
import Control.Monad (unless, void, (<=<))
import Control.Monad.Extra (ifM)
import Control.Monad.IO.Class (liftIO)
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.Lazy as BSL
import qualified Data.Map.Strict as ... |
d385b1809f4c52f7573a55769497594a3b71dca702c89b4046ec5d70a23073c4 | ijvcms/chuanqi_dev | map_10301.erl | -module(map_10301).
-export([
range/0,
data/0
]).
range() -> {20, 12}.
data() ->
{
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/map_data/map_10301.erl | erlang | -module(map_10301).
-export([
range/0,
data/0
]).
range() -> {20, 12}.
data() ->
{
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0... | |
42a69f3d40b84a85b8f6fe3c725f9302291a4ff1a12c29cc9520ac54d184a823 | garrigue/lablgtk | gRange.mli | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/src/gRange.mli | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
82929e6eb9360d67d510a72a082a9b8931c6ec8a174933671272ba052923baf1 | docopt/docopt.hs | Simple.hs | # LANGUAGE QuasiQuotes #
import System.Environment (getArgs)
import System.Console.Docopt
usageText :: Docopt
usageText = [docopt|
Usage:
foo bar <baz>...
foo --help
Options:
-h, --help Print this help message.
|]
main :: IO ()
main = do
args <- parseArgsOrExit usageText =<< getArgs
print args
pri... | null | https://raw.githubusercontent.com/docopt/docopt.hs/a099173860a40cfa371752160ff32dafa957f958/examples/Simple.hs | haskell | help
help Print this help message. | # LANGUAGE QuasiQuotes #
import System.Environment (getArgs)
import System.Console.Docopt
usageText :: Docopt
usageText = [docopt|
Usage:
foo bar <baz>...
Options:
|]
main :: IO ()
main = do
args <- parseArgsOrExit usageText =<< getArgs
print args
print (isPresent args (argument "baz"))
|
bfea587fdfd71d04e1200a171da2bd82f335c883712f36adba9d71da4075afb0 | pjotrp/guix | ntp.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
Copyright © 2014 , 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Pub... | null | https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/gnu/packages/ntp.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 < >
Copyright © 2014 , 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packa... |
43c527fd9448fee7e5a5071cf8d2bffd171de2a096f0f6a3648a62422bdbe7b2 | saidone75/talispam | core.clj | (ns talispam.core
(:gen-class))
(set! *warn-on-reflection* true)
(require '[clojure.string :as s]
'[talispam.config :as c]
'[talispam.db :as db]
'[talispam.dictionary :as dict]
'[talispam.filter :as f]
'[talispam.utils :as utils]
'[talispam.whitelist :as w]
... | null | https://raw.githubusercontent.com/saidone75/talispam/5c16158e46f16c1e3ab3c70f581f77fbc8512a2e/src/talispam/core.clj | clojure | train classifier
validator for mbox option
cli-matic config
load configuration
load dictionary if needed | (ns talispam.core
(:gen-class))
(set! *warn-on-reflection* true)
(require '[clojure.string :as s]
'[talispam.config :as c]
'[talispam.db :as db]
'[talispam.dictionary :as dict]
'[talispam.filter :as f]
'[talispam.utils :as utils]
'[talispam.whitelist :as w]
... |
3a8e3462be8a2b6e6e2ffa99d4104bd08f493dd2ff972aa9df0b18e1323c351f | dalaing/little-languages | Parse.hs | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Parsers for types of the I language .
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
Parsers for types of the I langua... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/i/src/Type/Parse.hs | haskell | from 'base'
from 'unordered-containers'
from 'parsers'
local
$setup
>>> import Text.Trifecta.Result
>>> import Text.Trifecta.Delta
| The tokenizer style for types in the I language.
| A helper function to parse reserved types.
| A parser for 'Int'.
>>> parse parseTyInt "Int"
>>> parse parseTyInt "int"
in... | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Parsers for types of the I language .
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
Parsers for types of the I langua... |
29458bb0076fc82b377dc78a86f5706abbe459d3eec9cc67c192b46c3ccc1fab | BinaryAnalysisPlatform/bap | test_bytes.ml | open Core_kernel[@@warning "-D"]
open Bap.Std
open Regular.Std
open OUnit2
let test_string = "This is a test to Bytes module."
let create ctxt =
let size = 8 in
let b = Bytes.create size in
assert_equal ~ctxt size (Bytes.length b)
let with_string ctxt =
let b = Bytes.of_string test_string in
let s = Bytes.... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib_test/bap_types/test_bytes.ml | ocaml | open Core_kernel[@@warning "-D"]
open Bap.Std
open Regular.Std
open OUnit2
let test_string = "This is a test to Bytes module."
let create ctxt =
let size = 8 in
let b = Bytes.create size in
assert_equal ~ctxt size (Bytes.length b)
let with_string ctxt =
let b = Bytes.of_string test_string in
let s = Bytes.... | |
f6f51af8d65dfbbd9eb39f73295f597532984a82c83f70976d4a02db9e6d5283 | theodormoroianu/SecondYearCourses | LambdaChurch_20210415165838.hs | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415165838.hs | haskell | alpha-equivalence
subst u x t defines [u/x]t, i.e., substituting u for x in t
This substitution avoids variable captures so it is safe to be used when
reducing terms with free variables (e.g., if evaluating inside lambda abstractions)
^ substitution term
^ variable to be substitutes
^ term in which the substit... | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... |
ea0d864b01e627b522c644d669c68819a1451da9af71e79ed21a460c98b4ad22 | artemkin/git-lfs-server | lfs_aux.ml |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/artemkin/git-lfs-server/e31ff1c2e4c4c9474d64f7af71abc2dc40a1a561/src/lfs_aux.ml | ocaml | make sure file content is flushed to disk
exn
FIXME (file, exn) <:sexp_of< string * exn >> |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
488484843ea5fc5c4678863cd56b7cd01292904e39e48c3acacafac0b4475567 | opencog/miner | shallow-specialization.scm | Rule combine both a shallow abstraction and a specialization in one
;; step.
;;
;; The advantage of that rule is that it doesn't create intermediary
;; abstraction structure such as
;;
;; Evaluation
;; Predicate "abstraction"
;; List
;; <abstractions>
;; minsup(pattern, db, ms)
;;
;; Instead, given a mins... | null | https://raw.githubusercontent.com/opencog/miner/4774a964306f9c60fd2355dde5ded4f2008c772b/opencog/miner/scm/miner/rules/shallow-specialization.scm | scheme | step.
The advantage of that rule is that it doesn't create intermediary
abstraction structure such as
Evaluation
Predicate "abstraction"
List
<abstractions>
minsup(pattern, db, ms)
Instead, given a minsup(pattern, db, ms) evaluation, it directly
generate shallow specializations of pattern.
Ev... | Rule combine both a shallow abstraction and a specialization in one
Predicate " minsup "
Predicate " minsup "
Predicate " minsup "
(load "miner-rule-utils.scm")
(define (gen-shallow-specialization-rule nary mv enable-type enable-glob ignore-vars)
(pattern-vardecl (Variable "$vardecl"))
... |
79e376b269270009d34a7e26052339aafb7c8c355dcbeceeb83bcc70f311642f | cjdev/cloud-seeder | Orphans.hs | # OPTIONS_GHC -fno - warn - orphans #
module Network.CloudSeeder.Test.Orphans () where
import Control.Monad.Mock (MockT)
import Network.CloudSeeder.Monads.CLI
instance MonadCli m => MonadCli (MockT f m)
| null | https://raw.githubusercontent.com/cjdev/cloud-seeder/242a3826a0cef58e1c390b51177e025781aecc66/test-suite/Network/CloudSeeder/Test/Orphans.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Network.CloudSeeder.Test.Orphans () where
import Control.Monad.Mock (MockT)
import Network.CloudSeeder.Monads.CLI
instance MonadCli m => MonadCli (MockT f m)
| |
ae8757a2ba566b845e1157dfe35eecc09656449b992e223b5f26367c0e1d382c | 8c6794b6/hpc-codecov | reciprocal.hs | reciprocal :: Int -> (String, Int)
reciprocal n | n > 1 = ('0' : '.' : digits, recur)
| otherwise = error
"attempting to compute reciprocal of number <= 1"
where
(digits, recur) = divide n 1 []
divide :: Int -> Int -> [Int] -> (String, Int)
divide n c cs | c `elem` cs = ([], positio... | null | https://raw.githubusercontent.com/8c6794b6/hpc-codecov/ad4f294cdb29766f828f7df171f7476ae111034b/test/data/reciprocal/reciprocal.hs | haskell | reciprocal :: Int -> (String, Int)
reciprocal n | n > 1 = ('0' : '.' : digits, recur)
| otherwise = error
"attempting to compute reciprocal of number <= 1"
where
(digits, recur) = divide n 1 []
divide :: Int -> Int -> [Int] -> (String, Int)
divide n c cs | c `elem` cs = ([], positio... | |
370729cc5714dba00077cf98d19cd0750332af367699b35cc1b1378361ce711d | fluree/db | common.cljc | (ns fluree.db.query.subject-crawl.common
(:require [clojure.core.async :refer [go] :as async]
[fluree.db.util.async :refer [<? go-try]]
[fluree.db.flake :as flake]
[fluree.db.util.core :as util #?(:clj :refer :cljs :refer-macros) [try* catch*]]
[fluree.db.util.log :as l... | null | https://raw.githubusercontent.com/fluree/db/ab7ab2e18dcfe2ef12aed5ea57ea3ec9c68df540/src/fluree/db/query/subject_crawl/common.cljc | clojure | only return flakes if all required-p values were found | (ns fluree.db.query.subject-crawl.common
(:require [clojure.core.async :refer [go] :as async]
[fluree.db.util.async :refer [<? go-try]]
[fluree.db.flake :as flake]
[fluree.db.util.core :as util #?(:clj :refer :cljs :refer-macros) [try* catch*]]
[fluree.db.util.log :as l... |
6c01c9da9ac143db8e0760a19b137518ee3497a3e11992d5920dd713752491be | janegca/htdp2e | Exercise-411-gcd-structural.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-411-gcd-structural) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t ... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/05-GenerativeRecursion/Exercise-411-gcd-structural.rkt | racket | about the language level of this file in a form that our tools can easily process.
planning and a design by composition approach.
a function that picks the largest common number in the list of divisors of
n and the list of divisors of m. The overall function would look like those
shown below. ; Before you design... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-411-gcd-structural) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
Exercise 411 .
Exercise 410 mean... |
39103713b5cfb943f478341b4de4c83e54d1367b96ad83d174e426ae34c136b6 | ds-wizard/engine-backend | DocumentMapper.hs | module Wizard.Service.Document.DocumentMapper where
import Data.Time
import qualified Data.UUID as U
import Shared.Model.Common.Lens
import Shared.Model.DocumentTemplate.DocumentTemplate
import Shared.Util.JSON
import Shared.Util.List
import Wizard.Api.Resource.Document.DocumentCreateDTO
import Wizard.Api.Resource.Do... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/src/Wizard/Service/Document/DocumentMapper.hs | haskell | module Wizard.Service.Document.DocumentMapper where
import Data.Time
import qualified Data.UUID as U
import Shared.Model.Common.Lens
import Shared.Model.DocumentTemplate.DocumentTemplate
import Shared.Util.JSON
import Shared.Util.List
import Wizard.Api.Resource.Document.DocumentCreateDTO
import Wizard.Api.Resource.Do... | |
fa7def944f0e3045e643fda32a26c1cb9c78103b9cb6c1a9395e10b56421c929 | district0x/cljs-web3-next | smart_contracts_test.cljs | (ns tests.smart-contracts-test)
(def smart-contracts
{:my-contract {:name "MyContract" :address "0x555384605D2B6c71bE931B6e649baE1c4981AAad"} :forwarder {:name "Forwarder" :address "0xbdd338A8C6b2b3A7F1439f67fdfDbfa914170A74" :forwards-to :my-contract}})
| null | https://raw.githubusercontent.com/district0x/cljs-web3-next/a473ac9c21d994ecb6abfb4899ef5474d5dfc669/test/tests/smart_contracts_test.cljs | clojure | (ns tests.smart-contracts-test)
(def smart-contracts
{:my-contract {:name "MyContract" :address "0x555384605D2B6c71bE931B6e649baE1c4981AAad"} :forwarder {:name "Forwarder" :address "0xbdd338A8C6b2b3A7F1439f67fdfDbfa914170A74" :forwards-to :my-contract}})
| |
9c29bd0183727d7718d4f31fa4d5e6be389e65e42eda9464c2334fe73bee71f0 | Gbury/dolmen | loop.ml |
(* This file is free software, part of dolmen. See file "LICENSE" for more information *)
module State = Dolmen_loop.State
module Pipeline = Dolmen_loop.Pipeline.Make(State)
module Parser = Dolmen_loop.Parser.Make(State)
module Header = Dolmen_loop.Headers.Make(State)
module Typer = Dolmen_loop.Typer.Typer(State)
mo... | null | https://raw.githubusercontent.com/Gbury/dolmen/12bf280df3d886ddc0faa110effbafb71bffef7e/src/bin/loop.ml | ocaml | This file is free software, part of dolmen. See file "LICENSE" for more information |
module State = Dolmen_loop.State
module Pipeline = Dolmen_loop.Pipeline.Make(State)
module Parser = Dolmen_loop.Parser.Make(State)
module Header = Dolmen_loop.Headers.Make(State)
module Typer = Dolmen_loop.Typer.Typer(State)
module Typer_Pipe = Dolmen_loop.Typer.Make(Dolmen.Std.Expr)(Dolmen.Std.Expr.Print)(State)(Ty... |
2259eefb935ec48a6296cd3ef23264e6a824d95276ab4be831ab67c8ae2f532c | ocaml-flambda/flambda-backend | iarray_comprehensions_pure.ml | (* TEST
flags = "-extension comprehensions_experimental -extension immutable_arrays_experimental"
* expect
*)
module Iarray = Stdlib__Iarray;;
[%%expect{|
module Iarray = Stdlib__Iarray
|}];;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/1d905beda2707698d36835ef3acd77a5992fc389/ocaml/testsuite/tests/comprehensions/iarray_comprehensions_pure.ml | ocaml | TEST
flags = "-extension comprehensions_experimental -extension immutable_arrays_experimental"
* expect
****************************************************************************
*** Basic behavior ***
****************************************************************************
*** More complex behavior ***
*... |
module Iarray = Stdlib__Iarray;;
[%%expect{|
module Iarray = Stdlib__Iarray
|}];;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * ATTENTION ! * * * * * * * * ... |
8aa4ffe9cedaa100799eed927270fa4e14960b5d4b01c60dea073d8fccb5a0f3 | slagyr/gaeshi | unplug.clj | (ns leiningen.unplug
(:use
[leiningen.plugin :only (plugin)])
(:require
[gaeshi.kuzushi.version :as version]))
(defn unplug [project]
(println "Uninstalling" version/summary)
(try
(plugin "uninstall" "gaeshi/lein-gaeshi" version/string)
(catch Exception e
(println "failed to uninstall plu... | null | https://raw.githubusercontent.com/slagyr/gaeshi/a5677ed1c8d9269d412f07a7ab33bbc40aa7011a/lein-gaeshi/dev/leiningen/unplug.clj | clojure | (ns leiningen.unplug
(:use
[leiningen.plugin :only (plugin)])
(:require
[gaeshi.kuzushi.version :as version]))
(defn unplug [project]
(println "Uninstalling" version/summary)
(try
(plugin "uninstall" "gaeshi/lein-gaeshi" version/string)
(catch Exception e
(println "failed to uninstall plu... | |
0a6d72219a6cc8042eb507db49f3dc354425fafb03894844e768ad40f074e3d2 | quil-lang/sbcl-librarian | add-on.lisp | (require '#:asdf)
(asdf:load-system '#:sbcl-librarian)
(defpackage #:sbcl-librarian-example
(:use #:cl #:sbcl-librarian))
(in-package #:sbcl-librarian-example)
(define-enum-type error-type "berr_t"
("BERR_SUCCESS" 0)
("BERR_FAIL" 1))
(define-error-map error-map error-type 0
(t (condition) (declare (ignore c... | null | https://raw.githubusercontent.com/quil-lang/sbcl-librarian/0d038578bb1ae1cad14b620fb1d2ba9252d05404/example/add-on.lisp | lisp | Do this only at build script time. | (require '#:asdf)
(asdf:load-system '#:sbcl-librarian)
(defpackage #:sbcl-librarian-example
(:use #:cl #:sbcl-librarian))
(in-package #:sbcl-librarian-example)
(define-enum-type error-type "berr_t"
("BERR_SUCCESS" 0)
("BERR_FAIL" 1))
(define-error-map error-map error-type 0
(t (condition) (declare (ignore c... |
f6170f45a1cd90fd6aaa8612986993be579cac3d159dab8d75423e01d38e1499 | john-shaffer/honeysql-page | macros.clj | (ns rs.shaffe.john.honeysql-page.macros
(:require [clojure.edn :as edn]
[clojure.java.classpath :as cp]))
(defmacro honeysql-version []
(->> (cp/classpath)
(some #(re-matches #"honeysql-(\d+\.\d+\.\d+\.*)\.jar" (.getName %)))
second))
(defmacro honeysql-versions []
(edn/read-string (slurp "p... | null | https://raw.githubusercontent.com/john-shaffer/honeysql-page/6826bb42828dda672f1d4f08c66f5c2f0daf2f46/src/rs/shaffe/john/honeysql_page/macros.clj | clojure | (ns rs.shaffe.john.honeysql-page.macros
(:require [clojure.edn :as edn]
[clojure.java.classpath :as cp]))
(defmacro honeysql-version []
(->> (cp/classpath)
(some #(re-matches #"honeysql-(\d+\.\d+\.\d+\.*)\.jar" (.getName %)))
second))
(defmacro honeysql-versions []
(edn/read-string (slurp "p... | |
081c5f37ec5787188f43e5762f319309e685fb19d6d7cab57256b66b35dd3a79 | pveber/bistro | lwt_queue.mli | type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit
val pop : 'a t -> 'a Lwt.t
| null | https://raw.githubusercontent.com/pveber/bistro/da0ebc969c8c5ca091905366875cbf8366622280/lib/engine/lwt_queue.mli | ocaml | type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit
val pop : 'a t -> 'a Lwt.t
| |
a51238cfe7d998209d55999f3a7688aeb8f6b91c6119f79c11bb0cddb923d71f | Mishio595/disml | overwrites.mli | type t =
{ id: Snowflake.t
; kind: string
; allow: Permissions.t
; deny: Permissions.t
} [@@deriving sexp, yojson { exn = true }] | null | https://raw.githubusercontent.com/Mishio595/disml/cbb1e47a6d358eace03790c07a1b85641f4ca366/lib/models/overwrites.mli | ocaml | type t =
{ id: Snowflake.t
; kind: string
; allow: Permissions.t
; deny: Permissions.t
} [@@deriving sexp, yojson { exn = true }] | |
0c486194f9b52b2df589d07a01fe1c3fc18c5db80f37ab9e81b4e08a32b6a1b8 | reasonml/reason | migrate_parsetree_405_406.ml | (**************************************************************************)
(* *)
(* OCaml Migrate Parsetree *)
(* *)
... | null | https://raw.githubusercontent.com/reasonml/reason/4f6ff7616bfa699059d642a3d16d8905d83555f6/src/vendored-omp/src/migrate_parsetree_405_406.ml | ocaml | ************************************************************************
OCaml Migrate Parsetree
... |
Copyright 2017 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
include Migrate_parsetree_405_406_migrate
$ open Printf
let fields = [
" attribute " ; " attribut... |
104bfd17f42c6754083bf631a53a523f5259155e5f8e7e5026b11cb7dd461efe | maurolopes/profit | core.clj | (ns profit.core
(:require [profit.utils :refer [color-str
pprint-str
truncate-str]]))
(def ^:dynamic *max-length* 60)
(defmacro print-tag-form [tag form]
`(let [res# ~form]
(println (color-str '~tag)
(pprint-str res#)
... | null | https://raw.githubusercontent.com/maurolopes/profit/b1e3639ad09c11bf1eb80d0e3c1c3ace0c8dce9b/src/profit/core.clj | clojure | (ns profit.core
(:require [profit.utils :refer [color-str
pprint-str
truncate-str]]))
(def ^:dynamic *max-length* 60)
(defmacro print-tag-form [tag form]
`(let [res# ~form]
(println (color-str '~tag)
(pprint-str res#)
... | |
767899a68c23b46183563ca87f08eafd17c3c2bf60e1d2beaa9eff308cb1fca4 | simplegeo/erlang | wxLogNull.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public Lic... | null | https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/wx/src/gen/wxLogNull.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxLogNull).
-include("wxe.hrl").
-export... |
9f0d0a0def2475bbad9030802500dd584b6ed3ce96fea910079ca919bfa7c085 | Ruiyun/pinyin4clj | core_test.clj | (ns pinyin4clj.core-test
(:use clojure.test
pinyin4clj.core))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/Ruiyun/pinyin4clj/18d2eab35941473a30405ad70bd3ff8b8fa59917/test/pinyin4clj/core_test.clj | clojure | (ns pinyin4clj.core-test
(:use clojure.test
pinyin4clj.core))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
37a063591e54bb1fcee879452017fb71666da6fb365a9ac50133454945ff54da | namin/lambda-calculus | main.ml | (* Module Main: The main program. Deals with processing the command
line, reading files, building and connecting lexers and parsers, etc.
For most experiments with the implementation, it should not be
necessary to change this file.
*)
open Format
open Support.Pervasive
open Support.Error
open Syntax
ope... | null | https://raw.githubusercontent.com/namin/lambda-calculus/23c681307fb6df1798d45eb5742729385d717e4b/main.ml | ocaml | Module Main: The main program. Deals with processing the command
line, reading files, building and connecting lexers and parsers, etc.
For most experiments with the implementation, it should not be
necessary to change this file.
|
open Format
open Support.Pervasive
open Support.Error
open Syntax
open Core
let searchpath = ref [""]
let interactive = ref false
let typing = ref false
let argDefs = [
("-I",
Arg.String (fun f -> searchpath := f::!searchpath),
"Append a directory to the search path");
("-i",
Ar... |
e706ec325a924a24816e54a34472b45bfb54d2e12ed28acfc273ef2fb2b3610b | neeraj9/hello-erlang-rump | googlemaps_proxy.erl | %%%-------------------------------------------------------------------
@author nsharma
( C ) 2016 ,
%%% @doc
%%%
%%% @end
Copyright ( c ) 2016 , < > .
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the followi... | null | https://raw.githubusercontent.com/neeraj9/hello-erlang-rump/304d2f0faaef64677de22d9a3495297e08d90a3f/apps/uworldtime/src/googlemaps_proxy.erl | erlang | -------------------------------------------------------------------
@doc
@end
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
... | @author nsharma
( C ) 2016 ,
Copyright ( c ) 2016 , < > .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVI... |
92a524b7f860346a004a80229353a843262db8822d84112e1bba11330175fffb | mpickering/apply-refact | Test2.hs | import Prelude as Prelude2
yes = Prelude2.readFile "foo" >>= putStr
| null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Test2.hs | haskell | import Prelude as Prelude2
yes = Prelude2.readFile "foo" >>= putStr
| |
ef756a3db2806e3322f9122af912354eac630d181d5f109bf4655b932cc4c500 | wangsix/VMO_repeated_themes_discovery | converter.lisp |
;(in-package :common-lisp-user)
(load
(merge-pathnames
(make-pathname
:directory '(:relative "File conversion")
:name "csv-files"
:type "lisp")
*lisp-code-root*))
(load
(merge-pathnames
(make-pathname
:directory '(:relative "File conversion")
:name "humdrum-by-col"
:type "lisp")
*lisp-code... | null | https://raw.githubusercontent.com/wangsix/VMO_repeated_themes_discovery/0082b3c55e64ed447c8b68bcb705fd6da8e3541f/JKUPDD-Aug2013/groundTruth/mozartK282Mvt2/monophonic/repeatedPatterns/barlowAndMorgensternRevised/C/script/converter.lisp | lisp | (in-package :common-lisp-user) |
(load
(merge-pathnames
(make-pathname
:directory '(:relative "File conversion")
:name "csv-files"
:type "lisp")
*lisp-code-root*))
(load
(merge-pathnames
(make-pathname
:directory '(:relative "File conversion")
:name "humdrum-by-col"
:type "lisp")
*lisp-code-root*))
(load
(merge-pathnames... |
3c258e074765f69addd6f44038d4612202e16fa90d62a9f8b0bca8c25d820b88 | semilin/layoup | RSTHD.lisp |
(MAKE-LAYOUT :NAME "RSTHD" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL
:KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/RSTHD.lisp | lisp |
(MAKE-LAYOUT :NAME "RSTHD" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL
:KEYBOARD NIL) | |
c9ecbf5755197bf5d064047b2ea024fe9d23d13f07f3de45eebe5dd7e01acce8 | yetibot/yetibot | gcs.clj | (ns yetibot.commands.google.gcs
(:require
[yetibot.api.google.gcs :as gcs]
[clojure.string :as s]
[taoensso.timbre :refer [info warn error]]
[yetibot.core.hooks :refer [cmd-hook]]))
(defn content-cmd
"gsc content <path> # retrieve content of <path> from Google Cloud Storage"
[{[_ path] :match}] (... | null | https://raw.githubusercontent.com/yetibot/yetibot/2fb5c1182b1a53ab0e433d6bab2775ebd43367de/src/yetibot/commands/google/gcs.clj | clojure | (ns yetibot.commands.google.gcs
(:require
[yetibot.api.google.gcs :as gcs]
[clojure.string :as s]
[taoensso.timbre :refer [info warn error]]
[yetibot.core.hooks :refer [cmd-hook]]))
(defn content-cmd
"gsc content <path> # retrieve content of <path> from Google Cloud Storage"
[{[_ path] :match}] (... | |
4a9db35ecd32784d4cd8e07be354b3b874a4348ce5a7d44f17460ab83d5bc3e6 | jamshidh/ethereum-client-haskell | TransactionReceipt.hs |
module Blockchain.Data.TransactionReceipt(
TransactionReceipt(..),
PostTransactionState(..)
) where
import Text.PrettyPrint.ANSI.Leijen hiding ((<$>))
import qualified Blockchain.Colors as CL
import Blockchain.Format
import Blockchain.SHA
import Blockchain.Data.SignedTransaction
import Blockchain.Data.RLP
dat... | null | https://raw.githubusercontent.com/jamshidh/ethereum-client-haskell/6f02781ff661b6a9687fd6fe0f3e0d99d1eacc6b/src/Blockchain/Data/TransactionReceipt.hs | haskell | 10000000000000
10000000000000 |
module Blockchain.Data.TransactionReceipt(
TransactionReceipt(..),
PostTransactionState(..)
) where
import Text.PrettyPrint.ANSI.Leijen hiding ((<$>))
import qualified Blockchain.Colors as CL
import Blockchain.Format
import Blockchain.SHA
import Blockchain.Data.SignedTransaction
import Blockchain.Data.RLP
dat... |
547a08ffcd2d4adf6176e3ce44fb335d9a6f6ec247cc0da63855cfb15d4e2540 | Heasummn/Crab-ML | crabParsing.mli | val process_string : string -> CrabParseTree.toplevel list
val process_chan : in_channel -> CrabParseTree.toplevel list | null | https://raw.githubusercontent.com/Heasummn/Crab-ML/45a79373a620878b9c24464a7e009ecf3ea7f908/src/CrabParsing/crabParsing.mli | ocaml | val process_string : string -> CrabParseTree.toplevel list
val process_chan : in_channel -> CrabParseTree.toplevel list | |
e5edb7d0907e7a0aa9f92ac88bff3f9c4dbfd54eb2c513e890e6d7fd851c9ed5 | kompendium-ano/factom-haskell-client | PendingEntries.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeOperators #-}
module Factom.RPC.Types.PendingEntries where
import Control.Applicative
import Control... | null | https://raw.githubusercontent.com/kompendium-ano/factom-haskell-client/87a73bb9079859f6223f8259da0dc9da568d1233/src/Factom/RPC/Types/PendingEntries.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeOperators #
------------------------------------------------------------------------------ | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Factom.RPC.Types.PendingEntries where
import Control.Applicative
import Control.Monad (forM_, join, mzero)
import Data.Aeson (FromJSON (..), ... |
8b9d6ff1325b976c19ddc062ca14372214e7d56013df73c1d76f93df69c2cf4d | spechub/Hets | ATermDiffMain.hs | |
Module : ./Common / ATerm / ATermDiffMain.hs
Copyright : ( c ) , DFKI GmbH 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
Module : ./Common/ATerm/ATermDiffMain.hs
Copyright : (c) C. Maeder, DFKI... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Common/ATerm/ATermDiffMain.hs | haskell | |
Module : ./Common / ATerm / ATermDiffMain.hs
Copyright : ( c ) , DFKI GmbH 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
Module : ./Common/ATerm/ATermDiffMain.hs
Copyright : (c) C. Maeder, DFKI... | |
5f95576181c4bac034808a9a8256b57e6781d82086c3f0597ce59c6c300d0206 | reflectionalist/S9fES | s9.scm | ;;
;; Scheme 9 from Empty Space
By , 2007 - 2010
;; Placed in the Public Domain
;;
Some obvious procedures first
(define (void) (if #f #f))
(define call-with-current-continuation call/cc)
;; Auxiliary definitions, will be redefined later
(define append append2)
There is no LET or LETREC yet , so
(define... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/s9.scm | scheme |
Scheme 9 from Empty Space
Placed in the Public Domain
Auxiliary definitions, will be redefined later
Type predicates
Equivalence predicates
List procedures
Arithmetic procedures
String procedures
Input/output procedures
Derived Syntax
LET/LET*/LETREC helper
clean version of LET (including named LET).
Can... | By , 2007 - 2010
Some obvious procedures first
(define (void) (if #f #f))
(define call-with-current-continuation call/cc)
(define append append2)
There is no LET or LETREC yet , so
(define-syntax (let bindings . exprs)
((lambda (split)
((lambda (tmp-split)
(set! split tmp-split)
(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.