_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
c41cd5d969fca50e29a06d45d4f43a2727570cff85952f14dbdff34f5a8dc851
PhDP/Akarui
Network.hs
-- | A weighted directed network represented as an 'forest', a map of maps. module Akarui.Network where import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Maybe -- | A network maps some keys to other keys with an edge (the value 'v'). type Network...
null
https://raw.githubusercontent.com/PhDP/Akarui/4ad888d011f7115677e8f9ba18887865f5150746/Akarui/Network.hs
haskell
| A weighted directed network represented as an 'forest', a map of maps. | A network maps some keys to other keys with an edge (the value 'v'). | An undirected network maps keys to sets of keys. | Tests for the presence of a vertex. | Tests for the presence of a list of vertices. | Tests for the presence of an ed...
module Akarui.Network where import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Maybe type Network k v = Map k (Map k v) type UNetwork k = Map k (Set k) | Second order lookup function . lookup2 :: (Ord k0, Ord k1) => k0 -> k1 -> Map k0 (Map k1 ...
b9f642c22d7a75cb6ca9b5b10693a838c6c1c0a11c51f177264f1dcb67377f92
fbielejec/cljs-firebase-client
auth.cljs
(ns firebase.auth (:require ["firebase" :as Firebase])) (defn email-sign-in [{:keys [:email :password]}] (-> Firebase .auth (.signInWithEmailAndPassword email password))) (defn email-create-user [{:keys [:email :password]}] (-> Firebase .auth (.createUserWithEmailAndPassword email passwo...
null
https://raw.githubusercontent.com/fbielejec/cljs-firebase-client/78ea3354c77da81b55eb6052bc75a2a3f657bc28/src/firebase/auth.cljs
clojure
(ns firebase.auth (:require ["firebase" :as Firebase])) (defn email-sign-in [{:keys [:email :password]}] (-> Firebase .auth (.signInWithEmailAndPassword email password))) (defn email-create-user [{:keys [:email :password]}] (-> Firebase .auth (.createUserWithEmailAndPassword email passwo...
5ba162978046624cb01791edbf3c4ebf9bd356e91c824524fd7aa4fef14969e8
JeffreyBenjaminBrown/hode
RProgram.hs
# LANGUAGE ScopedTypeVariables # module Test.Rslt.RProgram where import Data.List hiding (find) import Data.Map (Map) import qualified Data.Map as M import Data.Maybe import Data.Set (Set) import qualified Data.Set as S import Test.HUnit hiding (Test) imp...
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/hode/79a54a6796fa01570cde6903b398675c42954e62/earlier-work/Rslt/functions-not-data/Test/RProgram.hs
haskell
# LANGUAGE ScopedTypeVariables # module Test.Rslt.RProgram where import Data.List hiding (find) import Data.Map (Map) import qualified Data.Map as M import Data.Maybe import Data.Set (Set) import qualified Data.Set as S import Test.HUnit hiding (Test) imp...
41b76fd64021b6b075bfea432db0b4204a3d48cb0ee980f72755ad31d389916d
Clojure2D/clojure2d-examples
moving_sphere.clj
(ns rt4.the-next-week.ch09.moving-sphere (:require [rt4.the-next-week.ch09.hittable :as hittable] [rt4.the-next-week.ch09.interval :as interval] [rt4.the-next-week.ch09.ray :as ray] [fastmath.core :as m] [fastmath.vector :as v] [rt4.the-next-week.ch09.aabb :...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9d294e9073cfb8680b7f82ce40a661ef2feff384/src/rt4/the_next_week/ch09/moving_sphere.clj
clojure
(ns rt4.the-next-week.ch09.moving-sphere (:require [rt4.the-next-week.ch09.hittable :as hittable] [rt4.the-next-week.ch09.interval :as interval] [rt4.the-next-week.ch09.ray :as ray] [fastmath.core :as m] [fastmath.vector :as v] [rt4.the-next-week.ch09.aabb :...
28fb7d944b2a2d49dd293726249e5d4b5e5434d75d69d609108894967e19d12d
mbutterick/typesetting
info.rkt
#lang info (define collection 'multi) (define version "0.0") (define deps '("base" "beautiful-racket-lib" "rackunit-lib" "sugar")) (define build-deps '("debug" "racket-doc" "scribble-lib"))
null
https://raw.githubusercontent.com/mbutterick/typesetting/6f7a8bbc422a64d3a54cbbbd78801a01410f5c92/xenomorph/info.rkt
racket
#lang info (define collection 'multi) (define version "0.0") (define deps '("base" "beautiful-racket-lib" "rackunit-lib" "sugar")) (define build-deps '("debug" "racket-doc" "scribble-lib"))
73f6710bca1f8e030e565dcbdf5f82275eab75e539e6d95c07fba6d59fc91c2f
bobzhang/fan
variants.ml
type 'a u = [< `a of int | `b of bool & int & string > `a ] as 'a closed = true [ Rtag " a " false [ core_type ( test / variants.ml[3,2 + 21] .. [3,2 + 24 ] ) Ptyp_constr " ...
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/variants.ml
ocaml
Ptyp_variant closed=true [ Rtag "a" false [ core_type (test/variants.ml[36,1192+18]..[36,1192+21]) Ptyp_constr "int" (test/variants.ml[36,1192+18]..[36,1192+21]) [] ...
type 'a u = [< `a of int | `b of bool & int & string > `a ] as 'a closed = true [ Rtag " a " false [ core_type ( test / variants.ml[3,2 + 21] .. [3,2 + 24 ] ) Ptyp_constr " ...
9ae44ab6fceaf72d2e0fbd9cd6f5d57072b64220af9d4eccf8664c01431864f8
AndrasKovacs/normalization-bench
Common.hs
module Common where import Data.Time.Clock import Control.Monad import System.IO timed :: Show b => String -> Int -> (a -> IO b) -> a -> IO () timed msg times act a = do buffering <- hGetBuffering stdout hSetBuffering stdout NoBuffering putStrLn msg putStrLn $ "Iterations: " ++ show times t0 <- getCurrentT...
null
https://raw.githubusercontent.com/AndrasKovacs/normalization-bench/bef02243cc70415ab2ec7a5db823a448b07bf4db/haskell/Common.hs
haskell
module Common where import Data.Time.Clock import Control.Monad import System.IO timed :: Show b => String -> Int -> (a -> IO b) -> a -> IO () timed msg times act a = do buffering <- hGetBuffering stdout hSetBuffering stdout NoBuffering putStrLn msg putStrLn $ "Iterations: " ++ show times t0 <- getCurrentT...
b1b63fc089c0a34c80585f06bf0cf0e1c8e21eedd15e57320d8c808937d09f74
acl2/acl2
bvdiv@useless-runes.lsp
(BVDIV (4 4 (:TYPE-PRESCRIPTION <=-OF-FLOOR-AND-0-WHEN-NONPOSITIVE-AND-NONNEGATIVE-TYPE)) (4 4 (:TYPE-PRESCRIPTION <=-OF-0-AND-FLOOR-WHEN-BOTH-NONPOSITIVE-TYPE)) (4 4 (:TYPE-PRESCRIPTION <-OF-FLOOR-AND-0-WHEN-POSITIVE-AND-NEGATIVE-TYPE)) (4 4 (:TYPE-PRESCRIPTION <-OF-FLOOR-AND-0-WHEN-NEGATIVE-AND-POSITIVE-TYPE)) )...
null
https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/bv/.sys/bvdiv%40useless-runes.lsp
lisp
(BVDIV (4 4 (:TYPE-PRESCRIPTION <=-OF-FLOOR-AND-0-WHEN-NONPOSITIVE-AND-NONNEGATIVE-TYPE)) (4 4 (:TYPE-PRESCRIPTION <=-OF-0-AND-FLOOR-WHEN-BOTH-NONPOSITIVE-TYPE)) (4 4 (:TYPE-PRESCRIPTION <-OF-FLOOR-AND-0-WHEN-POSITIVE-AND-NEGATIVE-TYPE)) (4 4 (:TYPE-PRESCRIPTION <-OF-FLOOR-AND-0-WHEN-NEGATIVE-AND-POSITIVE-TYPE)) )...
f78bd3aed65a9d22469b013107d5a7bf8b40a3e262ea74c40154013b0b151180
jordanthayer/ocaml-search
wastar_vacilation.ml
* @author jtd7 @since 2012 - 03 - 31 @author jtd7 @since 2012-03-31 *) open Wted_astar_est let make_est rb_size = let delay_rb = Ring_buffer.init rb_size in let dist_rb = Ring_buffer.init rb_size in let insert_dist = Ring_buffer.insert dist_rb and insert_delay = Ring_buffer.insert dela...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/progress_estimate/wastar_vacilation.ml
ocaml
* @author jtd7 @since 2012 - 03 - 31 @author jtd7 @since 2012-03-31 *) open Wted_astar_est let make_est rb_size = let delay_rb = Ring_buffer.init rb_size in let dist_rb = Ring_buffer.init rb_size in let insert_dist = Ring_buffer.insert dist_rb and insert_delay = Ring_buffer.insert dela...
8e2b751d90b7fd339d815ae8eaa6997e0529b410db0cec52b0c52e53c480e853
ghc/ghc
Asm.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveFunctor #-} # LANGUAGE RecordWildCards # # OPTIONS_GHC -optc - DNON_POSIX_SOURCE # -- ( c ) The University of Glasgow 2002 - 2006 -- | Bytecode assembler and linker module GHC.ByteCode.Asm ( assembleBCOs, assembleOneBCO, bcoFreeNames, S...
null
https://raw.githubusercontent.com/ghc/ghc/0196cc2ba8f848187be47b5fc53bab89e5026bf6/compiler/GHC/ByteCode/Asm.hs
haskell
# LANGUAGE CPP # # LANGUAGE DeriveFunctor # ----------------------------------------------------------------------------- CompiledByteCode represents the result of byte-code compiling a bunch of functions and data types | Finds external references. Remember to remove the names defined by this grou...
# LANGUAGE RecordWildCards # # OPTIONS_GHC -optc - DNON_POSIX_SOURCE # ( c ) The University of Glasgow 2002 - 2006 | Bytecode assembler and linker module GHC.ByteCode.Asm ( assembleBCOs, assembleOneBCO, bcoFreeNames, SizedSeq, sizeSS, ssElts, iNTERP_STACK_CHECK_THRESH, mkNa...
7e5fda93dca4d83d0f5aba3d2e0ae5784cce04d55d895260f9297e1088e85266
yesodweb/wai
UrlMap.hs
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # {-# LANGUAGE TypeSynonymInstances #-} | This module gives you a way to mount applications under sub - URIs . For example : > bugsApp , helpdeskApp , apiV1 , apiV2 , mainApp : : Application > > myApp : : Application > myApp = mapUrls $ ...
null
https://raw.githubusercontent.com/yesodweb/wai/5d1fd4926d0f210eb77c2bc0e546cb3cca6bc197/wai-extra/Network/Wai/UrlMap.hs
haskell
# LANGUAGE TypeSynonymInstances # | Mount an application under a given path. The ToApplication typeclass gives you the option to pass either an 'Network.Wai.Application' or an 'UrlMap' | A convenience function like mount', but for mounting things under a single path segment. | Mount something at the root. Use this...
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # | This module gives you a way to mount applications under sub - URIs . For example : > bugsApp , helpdeskApp , apiV1 , apiV2 , mainApp : : Application > > myApp : : Application > myApp = mapUrls $ > mount " bugs " bugsApp ...
359338d43c3a68f93b047f52d4c9cdba62fc6d301c2f3b60823ce8205a5f3ebc
ocsigen/ocaml-eliom
evaluation_order_2.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/letrec/evaluation_order_2.ml
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Rocquencourt Copyright 2012 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the A variant of evaluation_order_1.ml where the side - effects are inside the blocks . Effect are n...
3227353de83e11f5e379b844be9a5dd4e7a2bfdb70a95082ab8dd4169a42385c
ghc/testsuite
tcfail171.hs
module ShouldFail where This one made GHC fall over on implication constraints , but one more test does no harm import Text.Printf phex :: a -> b phex x = printf "0x%x" x
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail171.hs
haskell
module ShouldFail where This one made GHC fall over on implication constraints , but one more test does no harm import Text.Printf phex :: a -> b phex x = printf "0x%x" x
a6e06bdde2a5a3a89dd94104971d84aa343d0d467e6384aacc95fa41aefb2b25
snowleopard/alga
Export.hs
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : Algebra.Graph.Test.Export Copyright : ( c ) 2016 - 2022 License : MIT ( see the file LICENSE ) -- Maintainer : -- Stability : experimental -- Testsuite for " Algebra . Gr...
null
https://raw.githubusercontent.com/snowleopard/alga/399b5dc538a2496b67f9322dc7247e06a4ec326b/test/Algebra/Graph/Test/Export.hs
haskell
# LANGUAGE OverloadedStrings # --------------------------------------------------------------------------- | Module : Algebra.Graph.Test.Export Maintainer : Stability : experimental --------------------------------------------------------------------------- * Testsuite
Copyright : ( c ) 2016 - 2022 License : MIT ( see the file LICENSE ) Testsuite for " Algebra . Graph . Export " and " Algebra . Graph . Export . Dot " . module Algebra.Graph.Test.Export ( testExport ) where import Algebra.Graph (Graph, circuit) import Algebra.Graph.Export hiding (unlines) import ...
1b48bda97f486dc210e772ead3cabb76ae7c6a4b79a00c34dd50cdbf5ac324f2
athensresearch/athens
core.cljs
(ns athens.electron.core (:require [athens.electron.boot] [athens.electron.db-picker] [athens.electron.fs] [athens.electron.monitoring.core] [athens.electron.window] [day8.re-frame.async-flow-fx] [re-frame.core :as rf])) ;; XXX: most of these operations are effectful. They _should_ be re...
null
https://raw.githubusercontent.com/athensresearch/athens/9bdc2e7966baad447664ebb4a413b5df8f000cc3/src/cljs/athens/electron/core.cljs
clojure
XXX: most of these operations are effectful. They _should_ be re-written with effects, but feels like too much boilerplate. Subs This event isn't used at the moment in boot. Figure out if it's still needed next time boot is revisited.
(ns athens.electron.core (:require [athens.electron.boot] [athens.electron.db-picker] [athens.electron.fs] [athens.electron.monitoring.core] [athens.electron.window] [day8.re-frame.async-flow-fx] [re-frame.core :as rf])) (rf/reg-sub :db/mtime (fn [db _] (:db/mtime db))) #_(rf...
5072d97ffbf21a7db63f4db154a561f8dde31936cabd49931209daacfc45ebed
canonical/jepsen.dqlite
dqlite.clj
(ns jepsen.dqlite (:gen-class) (:refer-clojure :exclude [test]) (:require [clojure.java.shell :refer [sh]] [clojure.tools.logging :refer :all] [clojure.string :as str] [jepsen [checker :as checker] [cli :as cli] [generator :as gen] ...
null
https://raw.githubusercontent.com/canonical/jepsen.dqlite/d41df782df44e4e4e157acd6a7f690b89c2c56e5/src/jepsen/dqlite.clj
clojure
Allow dust to settle before healing cluster
(ns jepsen.dqlite (:gen-class) (:refer-clojure :exclude [test]) (:require [clojure.java.shell :refer [sh]] [clojure.tools.logging :refer :all] [clojure.string :as str] [jepsen [checker :as checker] [cli :as cli] [generator :as gen] ...
f506ddf572cc97c5348bdae81acd33978b4a4dd3e5910f492f8dd7d1723711c7
haskell-foundation/foundation
Block.hs
-- | -- Module : Basement.Block -- License : BSD-style Maintainer : Haskell Foundation -- -- A block of memory that contains elements of a type, -- very similar to an unboxed array but with the key difference: -- -- * It doesn't have slicing capability (no cheap take or drop) * It consume less memory : 1...
null
https://raw.githubusercontent.com/haskell-foundation/foundation/39985b94b4de4d02e8decb5e378b53ad3f72c0cc/basement/Basement/Block.hs
haskell
| Module : Basement.Block License : BSD-style A block of memory that contains elements of a type, very similar to an unboxed array but with the key difference: * It doesn't have slicing capability (no cheap take or drop) * It's unpackable in any constructor * It uses unpinned memory by default * Pr...
Maintainer : Haskell Foundation * It consume less memory : 1 Offset , 1 CountOf # LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # # LANGUAGE UnboxedTuples # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE TypeOperators # module Basement.Block ( Block(..) ...
d8363644cb8627dca0089aa9cee901c1601df6549ecd7319f6068a851b6a99cd
lambdaisland/kaocha
var_test.clj
(ns kaocha.type.var-test (:refer-clojure :exclude [symbol]) (:require [clojure.test :as t :refer [testing is deftest]] [kaocha.test-factories :as f] [kaocha.testable :as testable] [kaocha.report :as report] [kaocha.classpath :as classpath] [kaocha.test-hel...
null
https://raw.githubusercontent.com/lambdaisland/kaocha/9ac9406e4a2ab8c5dc3a0edb84038d277818de37/test/unit/kaocha/type/var_test.clj
clojure
:file string? :file string?, :file string?, :file string?
(ns kaocha.type.var-test (:refer-clojure :exclude [symbol]) (:require [clojure.test :as t :refer [testing is deftest]] [kaocha.test-factories :as f] [kaocha.testable :as testable] [kaocha.report :as report] [kaocha.classpath :as classpath] [kaocha.test-hel...
8cad1c0624f8454f2df7749fc6de26f64fc0914ec88340915c4c292415071b61
heyoka/dfs
dfs_parser.erl
-module(dfs_parser). -export([parse/1, parse_and_scan/1, format_error/1]). -file("src/dfs_parser.yrl", 85). unwrapParams(L) -> unwrapParams(L, []). unwrapParams([], Acc) -> lists:flatten(lists:reverse(Acc)); unwrapParams([{lambda, _S}=P|R],Acc) -> unwrapParams(R, [P|Acc]); unwrapParams([{inline, _S}=P|R],Acc) -> unwra...
null
https://raw.githubusercontent.com/heyoka/dfs/2087c9fdf079642642df5b4d0bb1b56099c9bca9/src/dfs_parser.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
-module(dfs_parser). -export([parse/1, parse_and_scan/1, format_error/1]). -file("src/dfs_parser.yrl", 85). unwrapParams(L) -> unwrapParams(L, []). unwrapParams([], Acc) -> lists:flatten(lists:reverse(Acc)); unwrapParams([{lambda, _S}=P|R],Acc) -> unwrapParams(R, [P|Acc]); unwrapParams([{inline, _S}=P|R],Acc) -> unwra...
e036b2a9139b0791001c01377e248f50b88bfc0200f635b84dd0b93bcc52be5c
ulisesmac/Horarios-FC-UNAM
navigation.cljs
(ns ^:dev/always horarios-fc.navigation.navigation (:require [horarios-fc.colors :refer [theme-color]] [horarios-fc.navigation.screens :as screens] [horarios-fc.navigation.utils :as nav-utils] [re-frame.core :as rf] [react-native :as rn] [react-navigation.bottom-tabs :refer [create-bottom-tab-naviga...
null
https://raw.githubusercontent.com/ulisesmac/Horarios-FC-UNAM/425c84e44602b97deba48091459a6c1eb7ad1767/src/horarios_fc/navigation/navigation.cljs
clojure
Theme update
(ns ^:dev/always horarios-fc.navigation.navigation (:require [horarios-fc.colors :refer [theme-color]] [horarios-fc.navigation.screens :as screens] [horarios-fc.navigation.utils :as nav-utils] [re-frame.core :as rf] [react-native :as rn] [react-navigation.bottom-tabs :refer [create-bottom-tab-naviga...
e8fe44b488d89265505d831a28679e9d8f4184b3698689af616c4b15651e7035
janestreet/async_parallel
intf.ml
open Core open Async open Import let master_pid = ref None let init ?cluster ?close_stdout_and_stderr ?(fail_if_async_has_been_initialized = true) () = if fail_if_async_has_been_initialized && not (Scheduler.is_ready_to_initialize ()) then failwith "Parallel.init called after async was initialized"; master_pi...
null
https://raw.githubusercontent.com/janestreet/async_parallel/b2ef6ad95279260e2b9889e539bec87c40a13f34/src/intf.ml
ocaml
open Core open Async open Import let master_pid = ref None let init ?cluster ?close_stdout_and_stderr ?(fail_if_async_has_been_initialized = true) () = if fail_if_async_has_been_initialized && not (Scheduler.is_ready_to_initialize ()) then failwith "Parallel.init called after async was initialized"; master_pi...
b9658451f8ab3927d1e41bd4d48e6d4fe9a00fdd91da29a7dcf506b683f644b7
ocaml/dune
display.ml
type t = | Quiet | Short | Verbose let to_dyn : t -> Dyn.t = function | Quiet -> Variant ("Quiet", []) | Short -> Variant ("Short", []) | Verbose -> Variant ("Verbose", [])
null
https://raw.githubusercontent.com/ocaml/dune/5ff2863f8f4316b78f8c835750deca63c6e6d095/src/dune_engine/display.ml
ocaml
type t = | Quiet | Short | Verbose let to_dyn : t -> Dyn.t = function | Quiet -> Variant ("Quiet", []) | Short -> Variant ("Short", []) | Verbose -> Variant ("Verbose", [])
a08e80709c61e97d1024c5b9d8791742eb2cbc311a597a9816c3182fdba71edb
racket/racket7
define.rkt
(module define racket/base (require racket/private/norm-define) (provide normalize-definition normalize-definition/mk-rhs))
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/syntax/define.rkt
racket
(module define racket/base (require racket/private/norm-define) (provide normalize-definition normalize-definition/mk-rhs))
5af75978d248077e3657e690ad83bb05c6e84f4e73eef1d81c300c2ea04df9e4
ronxin/stolzen
ex2.20.scm
#lang scheme 2.20 (define (println . vars) (define (println-in items) (cond ((null? items) (newline)) (else (display (car items)) (display " ") (println-in (cdr items))) ) ) (println-in vars) ) (p...
null
https://raw.githubusercontent.com/ronxin/stolzen/bb13d0a7deea53b65253bb4b61aaf2abe4467f0d/sicp/chapter2/2.2/ex2.20.scm
scheme
#lang scheme 2.20 (define (println . vars) (define (println-in items) (cond ((null? items) (newline)) (else (display (car items)) (display " ") (println-in (cdr items))) ) ) (println-in vars) ) (p...
1e5e3195eb736619c10988d810e9f0ee74ec1fde6eb7c2365ffe94c14855e77d
brianhempel/maniposynth
main.ml
module M = Functor.F(X) let () = assert (M.x = 1)
null
https://raw.githubusercontent.com/brianhempel/maniposynth/1e6ebd89bab4df3da73548807c4aa3cf4edb8dd2/camlboot_interpreter/tests/functor-units-dependency/main.ml
ocaml
module M = Functor.F(X) let () = assert (M.x = 1)
9c7fa4bd155a771da7034236d175fe2260a3840d98fef7823dea46ce6f8b52a1
shenxs/about-scheme
38.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 |38|) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "ba...
null
https://raw.githubusercontent.com/shenxs/about-scheme/d458776a62cb0bbcbfbb2a044ed18b849f26fd0f/HTDP/38.rkt
racket
about the language level of this file in a form that our tools can easily process. (λ (x) x) 需要y被绑定 ;; (λ (x) y) (λ (y) (λ (x) y)) ((λ (x) x) (λ (x) x)) ;无限循环 ;((λ (x) (x x)) (λ (x) (x x))) (((λ (y) (λ (x) y)) (λ (z) z)) (λ (w) w)) ;;==> ((λ (x) (λ (z) z)) (λ (w) w)) ;;==> ((λ (z) z) (λ (w) w)) ;;==> ...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname |38|) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "abstra...
888ff886bf1beb1c059fe8e5a9a7b6dfc0f5aa3a3e91e51b0d5576412c923c6a
dselsam/arc
Candidate.hs
Copyright ( c ) 2020 Microsoft Corporation . All rights reserved . Released under Apache 2.0 license as described in the file LICENSE . Authors : , , . {-# LANGUAGE StrictData #-} # LANGUAGE DeriveGeneric # module Solver.Tactics.Blast.Candidate where import GHC.Generics (Generic, Generic1) import Control...
null
https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/src/Solver/Tactics/Blast/Candidate.hs
haskell
# LANGUAGE StrictData # note the naming note the naming
Copyright ( c ) 2020 Microsoft Corporation . All rights reserved . Released under Apache 2.0 license as described in the file LICENSE . Authors : , , . # LANGUAGE DeriveGeneric # module Solver.Tactics.Blast.Candidate where import GHC.Generics (Generic, Generic1) import Control.DeepSeq import Util.Imports...
c0b40c8cf4d02cea7decbc9808fc1f0e1b5e8bb7a2c2cd580a8ed454c3542b2a
parof/wstat
SimpleSignDomain.hs
# OPTIONS_GHC -fwarn - incomplete - patterns # # LANGUAGE FlexibleInstances # module Domains.SimpleSignDomain where import Interfaces.AbstractStateDomain import Interfaces.AbstractValueDomain import Interfaces.AbstractDomain import Interfaces.State import Semantic.Atomic import Semantic.AbstractEvaluation import Synt...
null
https://raw.githubusercontent.com/parof/wstat/369cf5d1d92ef235049c29ad2f1cc6fd53747754/src/Domains/SimpleSignDomain.hs
haskell
------------------------------------------------------------------------------ Sign Domain ------------------------------------------------------------------------------ x can't be BottomSign x can't be BottomSign the Domain isn't infinite: no need of widening SimpleSignDomain is an Abs...
# OPTIONS_GHC -fwarn - incomplete - patterns # # LANGUAGE FlexibleInstances # module Domains.SimpleSignDomain where import Interfaces.AbstractStateDomain import Interfaces.AbstractValueDomain import Interfaces.AbstractDomain import Interfaces.State import Semantic.Atomic import Semantic.AbstractEvaluation import Synt...
27bc25a7e7dc0a62bddf39e977f772df4fc9decf2b5dec231002a0fcb638d5ee
dradtke/Lisp-Text-Editor
ex3-flash-button.lisp
(asdf:oos 'asdf:load-op :gtk-cffi) (defpackage #:test-ex3 (:use #:common-lisp #:gtk-cffi #:g-lib-cffi)) (in-package #:test-ex3) (gtk-init) (defvar window) (defvar title) (defvar button) (defvar v-box) (defvar h-box) (setf window (make-instance 'window)) (setf (gsignal window :destroy) :gtk-main-quit (size-...
null
https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/gtk-cffi-20120208-cvs/examples/ex3-flash-button.lisp
lisp
(asdf:oos 'asdf:load-op :gtk-cffi) (defpackage #:test-ex3 (:use #:common-lisp #:gtk-cffi #:g-lib-cffi)) (in-package #:test-ex3) (gtk-init) (defvar window) (defvar title) (defvar button) (defvar v-box) (defvar h-box) (setf window (make-instance 'window)) (setf (gsignal window :destroy) :gtk-main-quit (size-...
84fe1b5047c9a5eedf0dc65fc87d9962598963580671e5fc84daf45365cd7102
AccelerateHS/accelerate-fft
Twine.hs
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # -- | -- Module : Data.Array.Accelerate.Math.FFT.Twine Copyright : [ 2017 ] , , -- License : BSD3 -- Maintainer : < > -- Stability : experimental Portability : non - portable ( GHC exte...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-fft/3c195de6a4528071388d817f55b0a7adf0547cc6/icebox/Twine.hs
haskell
| Module : Data.Array.Accelerate.Math.FFT.Twine License : BSD3 Stability : experimental Interleave the real and imaginary components in a complex array and produce a flattened vector. This allows us to mimic the array-of-struct representation Deinterleave a vector into a complex array. Requires ...
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # Copyright : [ 2017 ] , , Maintainer : < > Portability : non - portable ( GHC extensions ) module Data.Array.Accelerate.Math.FFT.Twine where import Data.Array.Accelerate ...
29946e91b4f9bb05eb0667e53c9fb4c0a0f84cd19128ee5c5fe300bebecff4bd
hunt-framework/hunt
QueryParserTests.hs
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS -fno-warn-orphans #-} {-# OPTIONS -fno-warn-missing-signatures #-} {-# OPTIONS -fno-warn-missing-methods #-} {-# OPTIONS -fno-warn-unused-matches #-} {-# OPTIONS -fno-warn-type-defaults #-} module Hunt.QueryParserTests (queryParserTests) where import Control.Mo...
null
https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-searchengine/test/Hunt/QueryParserTests.hs
haskell
# LANGUAGE OverloadedStrings # # OPTIONS -fno-warn-orphans # # OPTIONS -fno-warn-missing-signatures # # OPTIONS -fno-warn-missing-methods # # OPTIONS -fno-warn-unused-matches # # OPTIONS -fno-warn-type-defaults # ---------------------------------------------------------------------------- query parser tests , TestLa...
module Hunt.QueryParserTests (queryParserTests) where import Control.Monad import Data.Text (Text) import qualified Data.Text as T import Hunt.ClientInterface import qualified Hunt.Query.Language.Parser as P import qualified Test.Framework as TF import Test.Framework hiding (Te...
cdb586eca5fdccd66c6a1ead567bdce8737c2d67af97ef525ce342be9268ca4e
v-kolesnikov/sicp
1_04_test.clj
(ns sicp.chapter01.1-04-test (:require [clojure.test :refer :all] [sicp.test-helper :refer :all] [sicp.chapter01.1-04 :refer :all])) (deftest test-asserts (assert-equal 5 (a-plus-abs-b 2 3)) (assert-equal 5 (a-plus-abs-b 2 (- 3))))
null
https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter01/1_04_test.clj
clojure
(ns sicp.chapter01.1-04-test (:require [clojure.test :refer :all] [sicp.test-helper :refer :all] [sicp.chapter01.1-04 :refer :all])) (deftest test-asserts (assert-equal 5 (a-plus-abs-b 2 3)) (assert-equal 5 (a-plus-abs-b 2 (- 3))))
4de8b0daed29f89f21f22409a59337e4c8f0757a0e17334c41729ad18d416154
INRIA/zelus
lookup.ml
* Implementation in Ocaml of the Simulink Lookup Table ( 1 - D and 2 - D ) blocks . * * Features : * - provides five ' Lookup methods ' : * Interpolation - Extrapolation ( linear interpolation ) * Interpolation - Use End Values ( linear interpolation ) * Use Input Nearest ...
null
https://raw.githubusercontent.com/INRIA/zelus/685428574b0f9100ad5a41bbaa416cd7a2506d5e/examples/fuelcontroller/lookup.ml
ocaml
memorize the last lookup index with a reference cell, and begin searching * from it at the next call use a binary search to find the most appropriate breakpoint index invariant: x >= breakpoints.(l) invariant: x < breakpoints.(u) must truncate true: extrapolation, false: end_values true: extrapolation, ...
* Implementation in Ocaml of the Simulink Lookup Table ( 1 - D and 2 - D ) blocks . * * Features : * - provides five ' Lookup methods ' : * Interpolation - Extrapolation ( linear interpolation ) * Interpolation - Use End Values ( linear interpolation ) * Use Input Nearest ...
82ffa5c65d6819fe44d33962cb84fc45b97f6b96e5c436f4d9ecf99d20b844b9
BillHallahan/G2
Mux.hs
module Mux where import Data.List type Bit = Bool mux :: [Bit] -> [[Bit]] -> [Bit] mux sel xs = map (tree (||)) $ transpose $ zipWith (\s x -> map (s &&) x) sel xs tree :: (a -> a -> a) -> [a] -> a tree f [x] ...
null
https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/tests/Samples/Mux.hs
haskell
Properties > > _ = True > x = x > (num (encode as) == n)
module Mux where import Data.List type Bit = Bool mux :: [Bit] -> [[Bit]] -> [Bit] mux sel xs = map (tree (||)) $ transpose $ zipWith (\s x -> map (s &&) x) sel xs tree :: (a -> a -> a) -> [a] -> a tree f [x] ...
b1db3a3c1d9dc4e5f761d93f82170c4f89d6d8f469649be5504d6661ff2a8aba
adbrowne/dynamodb-eventstore
Webserver.hs
# LANGUAGE FlexibleInstances # {-# LANGUAGE LambdaCase #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # {-# LANGUAGE ScopedTypeVariables #-} module DynamoDbEventStore.Webserver( app , positiveIn...
null
https://raw.githubusercontent.com/adbrowne/dynamodb-eventstore/e3c16976582bf7727091a718d794662565f41280/dynamodb-eventstore-web/src/DynamoDbEventStore/Webserver.hs
haskell
# LANGUAGE LambdaCase # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # todo this isn't right todo todo
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # module DynamoDbEventStore.Webserver( app , positiveInt64Parser , runParser , realRunner , EventStoreActionRunner(..) , parseGlobalFeedPosition , globalFeedPosit...
eebca9c130d1d19c8027f2930f0090a02132fb7b903636fed4f6a3e5da2b7821
sthilaid/space-invaders
bb_fonts.scm
((colors: (white red green yellow blue)) (chars: (up down left right circle #\space #\! #\" #\# #\$ #\% #\& #\' #\( #\) #\* #\+ #\, #\- #\. #\/ # \ < # \= # \ > # \ ? #\@ #\A #\B #\C #\D #\E #\F #\G #\H #\I #\J #\K #\L #\M #\N #\O #\P #\Q #\R #\S #\T #\U #\V #\W #\X #\Y #\Z #\[...
null
https://raw.githubusercontent.com/sthilaid/space-invaders/42baab45e3f477c630f782cd93d2d1f0b3f00bf6/fonts/bb_fonts.scm
scheme
((colors: (white red green yellow blue)) (chars: (up down left right circle #\space #\! #\" #\# #\$ #\% #\& #\' #\( #\) #\* #\+ #\, #\- #\. #\/ # \ < # \= # \ > # \ ? #\@ #\A #\B #\C #\D #\E #\F #\G #\H #\I #\J #\K #\L #\M #\N #\O #\P #\Q #\R #\S #\T #\U #\V #\W #\X #\Y #\Z #\[...
76afc58d123edc27b8630f50e6588332e621adeaba05f6fa1011d371b24aabc2
ghcjs/ghcjs-base
Marshal.hs
# LANGUAGE FlexibleContexts , OverlappingInstances # module Tests.Marshal ( tests ) where import Test.Framework (Test, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import GHCJS.Marshal.Pure (PFromJSVal(..), PToJSVal(..)) import GHCJS.Marshal (FromJSVal(..), ToJSVal(..)) import Tests.QuickChe...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/test/Tests/Marshal.hs
haskell
# LANGUAGE FlexibleContexts , OverlappingInstances # module Tests.Marshal ( tests ) where import Test.Framework (Test, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import GHCJS.Marshal.Pure (PFromJSVal(..), PToJSVal(..)) import GHCJS.Marshal (FromJSVal(..), ToJSVal(..)) import Tests.QuickChe...
4e3b4db511f60f5f3c6ccc4affbda6d84511ff3a1136ea50da9c0b0e3c8ae235
bit-ranger/scheme-bootstrap
procedure.scm
(define (make-procedure) ;判断exp是否以tag开头 (define (tagged-list? exp tag) (if (pair? exp) (eq? (car exp) tag) false)) 创建过程 parameters是一个列表 ;body是一个列表 (define (construct parameters body env) (list 'procedure parameters body env)) 是否为普通过程 (define (compound? p) (tagged-list? p 'pr...
null
https://raw.githubusercontent.com/bit-ranger/scheme-bootstrap/a9155ebd29efe1196854b2dcd76941357dab151e/eval/procedure.scm
scheme
判断exp是否以tag开头 body是一个列表 过程体 过程环境 是否为基本过程 基本过程列表 基本过程名列表 基本过程对象列表
(define (make-procedure) (define (tagged-list? exp tag) (if (pair? exp) (eq? (car exp) tag) false)) 创建过程 parameters是一个列表 (define (construct parameters body env) (list 'procedure parameters body env)) 是否为普通过程 (define (compound? p) (tagged-list? p 'procedure)) (define (param...
b6777008d57987b2c7290ae4a5b02afa1083700ebb821494232b064a3ed55985
johnwhitington/ocamli
print.mli
(* Flags *) val syntax : bool ref val syntax_tex : bool ref val showvals : bool ref val show_all_lets : bool ref val string_of_t_show_types : bool ref val printas : bool ref (* Debug printers for the basic types *) val string_of_t : Type.t -> string val string_of_t' : Types.type_expr -> Type.t' -> string val string_...
null
https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/ocamli2/print.mli
ocaml
Flags Debug printers for the basic types Print to a formatter. Print to a string
val syntax : bool ref val syntax_tex : bool ref val showvals : bool ref val show_all_lets : bool ref val string_of_t_show_types : bool ref val printas : bool ref val string_of_t : Type.t -> string val string_of_t' : Types.type_expr -> Type.t' -> string val string_of_pattern : Type.pattern -> string val string_of_oc...
05c0010e162411bba63571194e7c998209fd0557932b4c87b2afae765b05efc4
spectrum-finance/cardano-dex-backend
ExceptionsGen.hs
module Gen.ExceptionsGen where import Control.Exception (Exception) data BadInputsUTxOException = BadInputsUTxOException instance Show BadInputsUTxOException where show _ = "BadInputsUTxO" instance Exception BadInputsUTxOException
null
https://raw.githubusercontent.com/spectrum-finance/cardano-dex-backend/69d3ee06b33c966c2d21281214252c1fd2e77325/amm-executor/test/Gen/ExceptionsGen.hs
haskell
module Gen.ExceptionsGen where import Control.Exception (Exception) data BadInputsUTxOException = BadInputsUTxOException instance Show BadInputsUTxOException where show _ = "BadInputsUTxO" instance Exception BadInputsUTxOException
c4d3009faa2b8ae6d7ca7eb62196470776fb4491f8017d748ed17adeb5f43a0e
alsonkemp/turbinado-website
TmpFunctions.hs
DO NOT EDIT THIS FILE THIS FILE IS AUTOMAGICALLY GENERATED AND YOUR CHANGES WILL BE EATEN BY THE GENERATOR OVERLORD All changes should go into the Model file ( e.g. App / Models / ExampleModel.hs ) THIS FILE IS AUTOMAGICALLY GENERATED AND YOUR CHANGES WILL BE EATEN BY THE GENERATOR OVERLORD All ch...
null
https://raw.githubusercontent.com/alsonkemp/turbinado-website/310f38dd7d13cdb838e2ea6181c61521021c32b5/App/Models/Bases/TmpFunctions.hs
haskell
My type
DO NOT EDIT THIS FILE THIS FILE IS AUTOMAGICALLY GENERATED AND YOUR CHANGES WILL BE EATEN BY THE GENERATOR OVERLORD All changes should go into the Model file ( e.g. App / Models / ExampleModel.hs ) THIS FILE IS AUTOMAGICALLY GENERATED AND YOUR CHANGES WILL BE EATEN BY THE GENERATOR OVERLORD All ch...
9519d5050df7992483046fcd5f4e0472d8c27598bedce96c5f09c25eaffe0dc8
cronokirby/haze
Printer.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # # LANGUAGE NumericUnderscores # {- | Description: contains functions related to the Printer component The printer component is responsible for presenting the user of the program with a nice interface summarising the current statu...
null
https://raw.githubusercontent.com/cronokirby/haze/3cfbc9de8d923a541429f4a5cb1eb4151d5aea08/src/Haze/Printer.hs
haskell
| Description: contains functions related to the Printer component The printer component is responsible for presenting the user of the program with a nice interface summarising the current status of the torrent. | Represents data about the status of the torrent ^ the number of bytes uploaded | The total number of...
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # # LANGUAGE NumericUnderscores # module Haze.Printer ( PrinterInfo , makePrinterInfo , PrinterM , runPrinterM , printerLoop ) where import Relude import Control.Concurrent (...
ce5b63dfcd3b3c0fa87bb2a7679ebdc01b8e9b525725d00a8a06b8ad1beea4fb
racket/rhombus-prototype
interface-clause-macro.rkt
#lang racket/base (require (for-syntax racket/base syntax/parse/pre enforest/proc-name "pack.rkt" "realm.rkt" (submod "interface-meta.rkt" for-static-info)) "space-provide.rkt" "interface-clause.rk...
null
https://raw.githubusercontent.com/racket/rhombus-prototype/4e66c1361bdde51c2df9332644800baead49e86f/rhombus/private/interface-clause-macro.rkt
racket
#lang racket/base (require (for-syntax racket/base syntax/parse/pre enforest/proc-name "pack.rkt" "realm.rkt" (submod "interface-meta.rkt" for-static-info)) "space-provide.rkt" "interface-clause.rk...
7378430eda5520609b28b8e1cb786defb621f10e99806938da00996488721081
noinia/hgeometry
Box.hs
# LANGUAGE UndecidableInstances # {-# LANGUAGE DeriveAnyClass #-} # OPTIONS_GHC -fno - warn - orphans # -------------------------------------------------------------------------------- -- | -- Module : Geometry.Box Copyright : ( C ) -- License : see the LICENSE file Maintainer : -- Orth...
null
https://raw.githubusercontent.com/noinia/hgeometry/7ce8d7eca148d8f95b2216b59e498b6227554feb/hgeometry/src/Geometry/Box.hs
haskell
# LANGUAGE DeriveAnyClass # ------------------------------------------------------------------------------ | Module : Geometry.Box License : see the LICENSE file ------------------------------------------------------------------------------ --------------------------------------------------------------...
# LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # Copyright : ( C ) Maintainer : Orthogonal \(d\)-dimensiontal boxes ( e.g. rectangles ) module Geometry.Box ( Box, pattern Box , box, fromExtent, fromCenter , grow , minPoint, maxPoint , centerPoint , inBox, inBox'...
1fca05bc5212eb04dd577f5da9a425c2b627f4a4d2e9e1b0601a1e03b1d2fe7c
psg-mit/twist-popl22
main.ml
open Core open Format exception Error of string let print_position _ lexbuf = let open Lexing in let pos = lexbuf.lex_curr_p in sprintf "%s:%d:%d" pos.pos_fname pos.pos_lnum (pos.pos_cnum - pos.pos_bol + 1) ;; let parse parsing_fun lexing_fun source_name = let ic = In_channel.create source_name in let lexb...
null
https://raw.githubusercontent.com/psg-mit/twist-popl22/fa495479ff021fb8793ae20d8cf786ed048f503d/src/main.ml
ocaml
open Core open Format exception Error of string let print_position _ lexbuf = let open Lexing in let pos = lexbuf.lex_curr_p in sprintf "%s:%d:%d" pos.pos_fname pos.pos_lnum (pos.pos_cnum - pos.pos_bol + 1) ;; let parse parsing_fun lexing_fun source_name = let ic = In_channel.create source_name in let lexb...
453397916c31be4deb7ce28f5dd91e5c701b171632b0589be812b1718279aeea
SNePS/SNePS2
frepset.lisp
-*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNIP ; Base : 10 -*- Copyright ( C ) 1984 - -2013 Research Foundation of State University of New York Version : $ I d : frepset.lisp , v 1.2 2013/08/28 19:07:26 shapiro Exp $ ;; This file is part of SNePS. $ BEGIN LICENSE$ The contents of this file a...
null
https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/snip/ds/frepset.lisp
lisp
Syntax : Common - Lisp ; Package : SNIP ; Base : 10 -*- This file is part of SNePS. you may not use this file except in compliance with the License. You may obtain a copy of the License at . edu/sneps/Downloads/ubpl.pdf. or implied. See the License for the specific language gov erning rights and limitations ...
Copyright ( C ) 1984 - -2013 Research Foundation of State University of New York Version : $ I d : frepset.lisp , v 1.2 2013/08/28 19:07:26 shapiro Exp $ $ BEGIN LICENSE$ The contents of this file are subject to the University at Software distributed under the License is distributed on an " AS IS " b...
8d55a185bbdc0bbe0078b831127987577411c54a6951192ac163e91c0f7c30f7
opencog/agi-bio
reduced-atomspace.scm
;(load "../reasoning/simple-by-hand/local-rules/rule-helpers.scm") ;; this is bio-utilities.scm now (define (cog-get-categories A) " Return the atoms that A is a member of through a MemberLink relationship. " (let ((result (cog-outgoing-set (cog-bind (BindLink ...
null
https://raw.githubusercontent.com/opencog/agi-bio/9c03d9b0e81cb8a8b3a58179f3134f336e5dbdb6/reduced-atomspaces/reduced-atomspace.scm
scheme
(load "../reasoning/simple-by-hand/local-rules/rule-helpers.scm") this is bio-utilities.scm now keep out full category gene members to simplify and reduce crowding keep out search artifact setlinks (define cat-nodes (set-difference cat-nodes (cog-filter 'SetLink cat-nodes)))
(define (cog-get-categories A) " Return the atoms that A is a member of through a MemberLink relationship. " (let ((result (cog-outgoing-set (cog-bind (BindLink (VariableList (VariableNode "$B") ) ...
fa1097b3bf95440c4305ec8514f28ce9bbc4113772f8cbee6d67df23b355d550
eslick/cl-registry
explorer-pop-widget.lisp
(in-package :registry) (registry-proclamations) (defwidget explorer-pop-widget (widget) ((ids :accessor question-ids :initarg :ids :initform nil))) (defun/cc do-create-population (pop-widget) (let ((population (do-dialog "Create a Population" (make-instance 'create-pop-dialog :questions (mapcar #'get...
null
https://raw.githubusercontent.com/eslick/cl-registry/d4015c400dc6abf0eeaf908ed9056aac956eee82/src/plugins/explorer/explorer-pop-widget.lisp
lisp
ITEM will be of the form "something_1234" ============================================= Population creation dialog ============================================= Handling population dialog ops Don't accept duplicate populations or names (when (get-instances-by-class 'population 'name (lisp-value (title pop...
(in-package :registry) (registry-proclamations) (defwidget explorer-pop-widget (widget) ((ids :accessor question-ids :initarg :ids :initform nil))) (defun/cc do-create-population (pop-widget) (let ((population (do-dialog "Create a Population" (make-instance 'create-pop-dialog :questions (mapcar #'get...
3f3e967e891dd872d457e0c28ccfdb3d6142b35815014cf7f211eab58e672b5f
Lysxia/generic-data
Compat.hs
# LANGUAGE CPP , DataKinds , TypeFamilies , TypeOperators , UndecidableInstances # CPP, DataKinds, TypeFamilies, TypeOperators, UndecidableInstances #-} -- | Shim for backwards compatibility. -- -- === Warning -- -- This is an internal module: it is not subject to any ...
null
https://raw.githubusercontent.com/Lysxia/generic-data/846fafb9ec1e4e60424e4f266451665fe25fdfa9/src/Generic/Data/Internal/Compat.hs
haskell
| Shim for backwards compatibility. === Warning This is an internal module: it is not subject to any versioning policy, breaking changes can happen at any time. If something here seems useful, please report it or create a pull request to export it from an external module.
# LANGUAGE CPP , DataKinds , TypeFamilies , TypeOperators , UndecidableInstances # CPP, DataKinds, TypeFamilies, TypeOperators, UndecidableInstances #-} module Generic.Data.Internal.Compat ( readPrec1 , Div ) where import Data.Functor.Classes import GHC.TypeLit...
48c96639143d685fae40f4b3370e8f42bb072073ea1308f034fa223b6a8ea198
philoskim/debux
data_readers.clj
{d/dbg debux.core/dbg-tag d/dbgn debux.core/dbgn-tag d/dbgt debux.core/dbgt-tag d/clog debux.cs.core/clog-tag d/clogn debux.cs.core/clogn-tag d/clogt debux.cs.core/clogt-tag}
null
https://raw.githubusercontent.com/philoskim/debux/d4ef5676c44af9a89fff28b11b57267b17d13c9f/src/data_readers.clj
clojure
{d/dbg debux.core/dbg-tag d/dbgn debux.core/dbgn-tag d/dbgt debux.core/dbgt-tag d/clog debux.cs.core/clog-tag d/clogn debux.cs.core/clogn-tag d/clogt debux.cs.core/clogt-tag}
9c0f4f8492d97c57e171e1995a09dca47ae71a6b8ee3f258ca369112151ebba3
openmusic-project/OMChroma
5Ch-1.lisp
(in-package :om) ;;;=================================== SPAT CLASSES ;;;=================================== (defclass! 5Ch-1 (cs-spat-evt) ( (source-code :initform (load-buffer-textfile (get-orc-source (get-orc "5Ch-1")) 'textfile "append") ...
null
https://raw.githubusercontent.com/openmusic-project/OMChroma/5ded34f22b59a1a93ea7b87e182c9dbdfa95e047/sources/om6/cs-events/csound/classes/Panning/5Ch-1.lisp
lisp
=================================== =================================== ============================================================================= ----------------------------------------------------------------------------- p1 = instrument number p4 = input (file) p5 = panning, equal power [Az, degrees] AFIL =...
(in-package :om) SPAT CLASSES (defclass! 5Ch-1 (cs-spat-evt) ( (source-code :initform (load-buffer-textfile (get-orc-source (get-orc "5Ch-1")) 'textfile "append") :allocation :class :type textfile :accessor source-code) (numchan :in...
aab236e80f6036705a4f042120895e6da1bd9860158d0ad5e0714471b8de305d
richmit/mjrcalc
use-vtk.lisp
;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; @file use-vtk.lisp @author < > ;; @brief Write VT...
null
https://raw.githubusercontent.com/richmit/mjrcalc/96f66d030034754e7d3421688ff201f4f1db4833/use-vtk.lisp
lisp
-*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- @file use-vtk.lisp @brief Write VTK files.@EOL @std Common Lisp Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ...
@author < > @parblock Copyright ( c ) 1997,2008,2010,2013,2015 , < > All rights reserved . 1 . Redistributions of source code must retain the above copyright notice , this list of conditions , and the following disclaimer . 2 . Redistributions in binary form must reproduce the above copyrigh...
8d44c3595cd97d9d0713c7eaa0eaa7cd64de5920efd686058aba1cd8bca59bd4
rems-project/lem
xstring.ml
let explode s = let rec exp i l = if i < 0 then l else exp (i - 1) (s.[i] :: l) in exp (String.length s - 1) [];; let implode l = let res = Bytes.create (List.length l) in let rec imp i = function | [] -> res | c :: l -> Bytes.set res i c; imp (i + 1) l in imp 0 l |> Bytes.to_string;; let string_c...
null
https://raw.githubusercontent.com/rems-project/lem/a839114e468119d9ac0868d7dc53eae7f3cc3a6c/ocaml-lib/xstring.ml
ocaml
let explode s = let rec exp i l = if i < 0 then l else exp (i - 1) (s.[i] :: l) in exp (String.length s - 1) [];; let implode l = let res = Bytes.create (List.length l) in let rec imp i = function | [] -> res | c :: l -> Bytes.set res i c; imp (i + 1) l in imp 0 l |> Bytes.to_string;; let string_c...
2404332c9a7b456b88df0080319d4677875db396ff212b2d462a6af5679f25d0
awkay/om-tutorial
G_Remote_Fetch.cljs
(ns om-tutorial.G-Remote-Fetch (:require-macros [cljs.test :refer [is]]) (:require [om.next :as om :refer-macros [defui]] [om.dom :as dom] [devcards.core :as dc :refer-macros [defcard defcard-doc]])) (def sample-query [{:widget [(with-meta {:people [:person/name]} {:query-root true})]}]) (d...
null
https://raw.githubusercontent.com/awkay/om-tutorial/83ca10d91380ba62458b98ccaa80fd11b9c8321d/src/tutorial/om_tutorial/G_Remote_Fetch.cljs
clojure
prune everything else from the parse
(ns om-tutorial.G-Remote-Fetch (:require-macros [cljs.test :refer [is]]) (:require [om.next :as om :refer-macros [defui]] [om.dom :as dom] [devcards.core :as dc :refer-macros [defcard defcard-doc]])) (def sample-query [{:widget [(with-meta {:people [:person/name]} {:query-root true})]}]) (d...
14f12aac1971c1b00aac453b6259b72d41d00db7f1072e9afb1ef10a9416ec6d
screenshotbot/screenshotbot-oss
test-screenshot.lisp
;;;; Copyright 2018-Present Modern Interpreters Inc. ;;;; This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :screenshotbot/webdriver/test-screenshot (:use #:cl #:fiveam) ...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/d1ec13840fdda63fd387af76f28369d5b5ef74a0/src/screenshotbot/webdriver/test-screenshot.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc.
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :screenshotbot/webdriver/test-screenshot (:use #:cl #:fiveam) (:import-from #:screenshotbot/webdriver/screenshot ...
8e71fcc2aefbc67d521e3166601bf94609bd886a1a8ad5eaa10bb5cb9bad0cc6
cnuernber/dtype-next
ffi.clj
(ns tech.v3.datatype.ffi "Generalized C Foreign Function Interface (FFI) that unifies JNA and JDK-16 FFI architectures. Users can dynamically define and load libraries and define callbacks that C can then call. This namespace is meant to work with the `struct` namespace where you can define C-structs laid o...
null
https://raw.githubusercontent.com/cnuernber/dtype-next/e5a3d75a7b49d362404a6ea5590802f693873588/src/tech/v3/datatype/ffi.clj
clojure
dst src size-t no library symbols defined no systematic error checking now we bind to a path or existing library. nil means find symbols in current executable. We can now call functions in our library. C callbacks take a bit more effort Then instantiate an implementation. From an instance of a foreign interface we can...
(ns tech.v3.datatype.ffi "Generalized C Foreign Function Interface (FFI) that unifies JNA and JDK-16 FFI architectures. Users can dynamically define and load libraries and define callbacks that C can then call. This namespace is meant to work with the `struct` namespace where you can define C-structs laid o...
4c8cb49ee0787aec40d48be852c0d3e736c172f497b807f0da335d848e05130f
vseloved/cl-nlp
wiktionary.lisp
( c ) 2015 - 2017 Vsevolod Dyomkin (in-package #:nlp.lexics) (named-readtables:in-readtable rutilsx-readtable) (defclass wikt-lemmatizer (lemmatizer) ((dict :initarg :dict :accessor lem-dict))) (defmethod lemmatize ((lemmatizer wikt-lemmatizer) word &optional tag) (when-it (? @lemmatizer.dict tag word) (v...
null
https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/src/lexics/wiktionary.lisp
lisp
(let* ((text (strjoin #\Space (reverse cur-text))) (beg (+ 10 (or (re:scan "==English==" text) -10))) (end (re:scan "\\s==\\w" text :start beg)) (text (slice text beg end)) (loop :for (qualifier pos) :in '(("Noun" tags:NN) ("Verb" tags:VB) ...
( c ) 2015 - 2017 Vsevolod Dyomkin (in-package #:nlp.lexics) (named-readtables:in-readtable rutilsx-readtable) (defclass wikt-lemmatizer (lemmatizer) ((dict :initarg :dict :accessor lem-dict))) (defmethod lemmatize ((lemmatizer wikt-lemmatizer) word &optional tag) (when-it (? @lemmatizer.dict tag word) (v...
cefd613a85c9cd42a717ea6a1fbd0c724d632b0840c3c94ef726fb52cdec6235
aria42/infer
random_variate.clj
(ns infer.random-variate (:use [clojure.contrib.math :only (expt sqrt)]) (:use [clojure.contrib.generic.math-functions :only (tan log cos sin)])) (defn exp-rv "Simulate an exponential distribution with rate lambda." ([] (exp-rv 1)) ([lambda] (let [U (rand)] (/ (log (- 1 U)) (- 0 lambda))))) (defn weibull-rv...
null
https://raw.githubusercontent.com/aria42/infer/9849325a27770794b91415592a8706fd90777469/src/infer/random_variate.clj
clojure
(ns infer.random-variate (:use [clojure.contrib.math :only (expt sqrt)]) (:use [clojure.contrib.generic.math-functions :only (tan log cos sin)])) (defn exp-rv "Simulate an exponential distribution with rate lambda." ([] (exp-rv 1)) ([lambda] (let [U (rand)] (/ (log (- 1 U)) (- 0 lambda))))) (defn weibull-rv...
ee175cbffeff8da819807896682bb7a957b57c06157d032aa384e79938dc7abe
cfelde/cljs4excel
cljs4excel.cljs
; The content of this file is dynamically loaded as if it was typed into the REPL directly . The cljs4excel.core namespace is already required at this ; point. When the output of the final println at the bottom is shown in the ; REPL console you can assume that all the content loaded successfully. (defn js->fn "Ta...
null
https://raw.githubusercontent.com/cfelde/cljs4excel/4b96fb9ee0dc2167badcd3df62438b4cd36582a7/src-resource/excel/cljs4excel.cljs
clojure
The content of this file is dynamically loaded as if it was typed into point. When the output of the final println at the bottom is shown in the REPL console you can assume that all the content loaded successfully.
the REPL directly . The cljs4excel.core namespace is already required at this (defn js->fn "Take a function and JSON, convert JSON to a Clojure structure and pass it to the function." [f js] (f (js->clj js))) (defn binding->fn "Called from JS for a Excel document binding. The given function is given a ma...
d8125b63d11df184c230d0faa09947d17912832084998eeeccc9b878bfdfea36
EchoTeam/mcd
mcd_test_helper.erl
vim : set ts=4 sts=4 sw=4 expandtab : -module(mcd_test_helper). -export([ overload_all/0, unload_all/0, wait_all/0, wait_connection/1, wait_connection/3 ]). wait_connection(Pid) -> wait_connection(Pid, erlang:monotonic_time(), 5000). wait_connection(Pid, Started, Timeout) -> Diff = erla...
null
https://raw.githubusercontent.com/EchoTeam/mcd/ef26b96edbf1608e30ea979b5ef72f7bde02421b/src/mcd_test_helper.erl
erlang
private
vim : set ts=4 sts=4 sw=4 expandtab : -module(mcd_test_helper). -export([ overload_all/0, unload_all/0, wait_all/0, wait_connection/1, wait_connection/3 ]). wait_connection(Pid) -> wait_connection(Pid, erlang:monotonic_time(), 5000). wait_connection(Pid, Started, Timeout) -> Diff = erla...
c6de2c4d160327ec8b6500aee69908512ca23dd5d65696101a87197b02cc834a
logseq/logseq
model.cljs
(ns frontend.db.model "Core db functions." ;; TODO: Remove this config once how repos are passed to this ns are standardized {:clj-kondo/config {:linters {:unused-binding {:level :off}}}} (:require [clojure.set :as set] [clojure.string :as string] [clojure.walk :as walk] [dat...
null
https://raw.githubusercontent.com/logseq/logseq/6a5b0c819975a36aa91b84f73dec32d2ed483503/src/main/frontend/db/model.cljs
clojure
TODO: Remove this config once how repos are passed to this ns are standardized lazy loading TODO: extract to specific models and move data transform logic to the corresponding handlers. Use it as an input argument for datalog queries TODO: remove this in later releases may be a case that a user added same alias ...
(ns frontend.db.model "Core db functions." {:clj-kondo/config {:linters {:unused-binding {:level :off}}}} (:require [clojure.set :as set] [clojure.string :as string] [clojure.walk :as walk] [datascript.core :as d] [frontend.config :as config] [frontend.d...
c01d36bde1bf51839fa732f3f9271c9a2f987554d0b7c57c2b0897ad20dbad75
ocaml/omd
omd.ml
let protect ~finally f = match f () with | exception e -> finally (); raise e | r -> finally (); r let li_begin_re = Str.regexp_string "<li>\n" let li_end_re = Str.regexp_string "\n</li>" let normalize_html s = Str.global_replace li_end_re "</li>" (Str.global_replace li_begin_re "<li>"...
null
https://raw.githubusercontent.com/ocaml/omd/e7f30382554cecd595b160e6c218194817ce76d4/tests/omd.ml
ocaml
let protect ~finally f = match f () with | exception e -> finally (); raise e | r -> finally (); r let li_begin_re = Str.regexp_string "<li>\n" let li_end_re = Str.regexp_string "\n</li>" let normalize_html s = Str.global_replace li_end_re "</li>" (Str.global_replace li_begin_re "<li>"...
feedad1bfb45ea317fa28d43820c4c0db2aa64368b3431b9348d4b844d306a78
onedata/op-worker
archive_recall.erl
%%%------------------------------------------------------------------- @author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% API module for performing operatio...
null
https://raw.githubusercontent.com/onedata/op-worker/f562f28fa3d9d75cdbd93a0cda3a9151e8724d6d/src/modules/archive/archive_recall.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc API module for performing operations on archive recalls. Archive recall is a copy of an archive content. If an archive contained nested archive its content is also copi...
@author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(archive_recall). -author("Michal Stanisz"). -include("modules/datastore/datastore_models.hrl"). -include("modules/datastore/datastore_runner.hrl"). -include("modules/fslogic/file_details.hr...
d2defbfe8bd654b6c5d82a1a97e6457df613c08bf796b8b25501520042c1b3dd
mfoemmel/erlang-otp
fprof.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2001 - 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 Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/tools/src/fprof.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 2001 - 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 " File : fprof.erl Author : < >...
747ed3bfa938ab4745fe8f62df40c504fd909e235ac4ce79aa01afcbeb95c5e9
elastic/apm-agent-ocaml
context.ml
module Http = struct module Headers = struct type t = (string * string) list let yojson_of_t t = match t with | [] -> `Null | xs -> `Assoc ((List.map (fun (k, v) -> (k, `String v))) xs) ;; end module Url = struct type payload = { full : string; hash : string option; ...
null
https://raw.githubusercontent.com/elastic/apm-agent-ocaml/e702525e1332a35e6bcf2873e6ff5ad54649503c/core/context.ml
ocaml
module Http = struct module Headers = struct type t = (string * string) list let yojson_of_t t = match t with | [] -> `Null | xs -> `Assoc ((List.map (fun (k, v) -> (k, `String v))) xs) ;; end module Url = struct type payload = { full : string; hash : string option; ...
21d79874628813702b3368fefd728c605d602d41a10d865f143eb7fddf79fca4
cdosborn/lit
Html.hs
{-# LANGUAGE OverloadedStrings #-} module Html (generate) where import qualified Data.Text as T import qualified Data.Text.Lazy as TL import Data.Maybe (fromMaybe) import Text.Blaze (toValue, (!)) import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A import Text.Blaze.Html.Renderer.T...
null
https://raw.githubusercontent.com/cdosborn/lit/0dec600482440d552ed339a3b4c6206bac212f04/src/Html.hs
haskell
# LANGUAGE OverloadedStrings #
module Html (generate) where import qualified Data.Text as T import qualified Data.Text.Lazy as TL import Data.Maybe (fromMaybe) import Text.Blaze (toValue, (!)) import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A import Text.Blaze.Html.Renderer.Text (renderHtml) import Cheapskate ...
5c02096813d6d5bf660cde0c0d80a3b772145e2162db86d4c2b6480cd1772455
ygmpkk/house
Shell.hs
module Net.Shell where import qualified Net.IPv4 as IP import qualified Net.UDP_Client as UDP import Net.TFTP_Client(tftpGet,tftpPut) import Net.Servers(telnetServer,telnet) import qualified Net.PortNumber as Port import qualified Net.Interface as Net import Net.ClientInterface import Net.Concurrent import Net.PacketPa...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/kernel/Net/Shell.hs
haskell
cmd "gif" tftpgif <@ ipAddr <@ path, tftpgif = tftpget (showGifInfo . bytes) where bytes bs = listArray (0,length bs-1) bs
module Net.Shell where import qualified Net.IPv4 as IP import qualified Net.UDP_Client as UDP import Net.TFTP_Client(tftpGet,tftpPut) import Net.Servers(telnetServer,telnet) import qualified Net.PortNumber as Port import qualified Net.Interface as Net import Net.ClientInterface import Net.Concurrent import Net.PacketPa...
e3ae522df2b0d5c94c4e1fff97f66f9e471672b02516aaffb6f41922869bc356
raph-amiard/CamllVM
6_forloop.ml
for i=1 to 10 do i done;;
null
https://raw.githubusercontent.com/raph-amiard/CamllVM/d36928f0e81a6f4f65ddd3a8653887d187632dc2/test/testfiles/6_forloop.ml
ocaml
for i=1 to 10 do i done;;
1b3cb31b8d0ac46d1101c5417641ef12fff56c7bb3d97a8daddde7d098f1f5a9
erlangonrails/devdb
ymnesia.erl
%%%------------------------------------------------------------------- Created : 14 Oct 2005 by < > Desc . : A naive table viewer Yaws - app interface . %%% @author < > %%% @doc Ymnesia is a Yaws appmod to view tables . %%% Add <b>ymnesia</b> as an appmod to your Yaws configuration. Point...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/contrib/yaws/src/ymnesia.erl
erlang
------------------------------------------------------------------- Add <b>ymnesia</b> as an appmod to your Yaws configuration. <ul> <br/>(<i>atoms need to be single-quoted</i>)</li> <li> The checkbox control if the attribute should be shown in the result. <br/>No checkbox mea...
Created : 14 Oct 2005 by < > Desc . : A naive table viewer Yaws - app interface . @author < > @doc Ymnesia is a Yaws appmod to view tables . Point your browser to : & < li > You can search on arbitrary Erlang terms . -module(ymnesia). -export([out/1]). -import(lists, [map/2, foldl/3,...
20a706a52fdc3af2636fc7b81e7f5291d11d30303719ea86851356c4d95600a1
agda/agda2hs
CubicalTests.hs
module CubicalTests where import StreamFusion
null
https://raw.githubusercontent.com/agda/agda2hs/e4a6056beb5d4edf45a2ddae541cb9291885171e/test/golden/CubicalTests.hs
haskell
module CubicalTests where import StreamFusion
f73edb458c939bdce69a11d0a0ee082aae5f1c49dc90403698eb7f5869f96dc2
supki/liblastfm
AlbumSpec.hs
# LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} module Xml.AlbumSpec (spec) where import Data.Text (Text) import Lastfm import Lastfm.Album import Test.Hspec import Text.Xml.Lens import SpecHelper spec :: Spec spec = do it "addTags" $ shouldHaveXml_ . privately $ addTags <*> artist "Pink Floyd...
null
https://raw.githubusercontent.com/supki/liblastfm/754be163c4ce14c9b4819f1359b5f95a0f91a29d/test/api/Xml/AlbumSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # module Xml.AlbumSpec (spec) where import Data.Text (Text) import Lastfm import Lastfm.Album import Test.Hspec import Text.Xml.Lens import SpecHelper spec :: Spec spec = do it "addTags" $ shouldHaveXml_ . privately $ addTags <*> artist "Pink Floyd" <*> album "The Wall" <*> tags ["7...
8bdc3bd2da0146f9758959545e37cf3d10ac9e03471331f18cb4e55b6e17caca
lambe-lang/mitch
mitch_system.mli
module Transpiler = Mitch_system_transpiler.Transpiler module Expander = Mitch_system_expander.Expander module Optimiser = Mitch_system_optimiser.Optimiser module Simplifier = Mitch_system_simplifier.Simplifier module Normaliser = Mitch_system_normaliser.Normaliser
null
https://raw.githubusercontent.com/lambe-lang/mitch/c94269312d953cd761491dfce605b1a7ec38b456/lib/mitch/system/mitch_system.mli
ocaml
module Transpiler = Mitch_system_transpiler.Transpiler module Expander = Mitch_system_expander.Expander module Optimiser = Mitch_system_optimiser.Optimiser module Simplifier = Mitch_system_simplifier.Simplifier module Normaliser = Mitch_system_normaliser.Normaliser
0404b5a67c88539cb6ab93f7a022a40ad229fee07da1c947d118feade9cadfb1
RobertBarnhoorn/haskalpaca
Positions.hs
module Alpaca.Positions where import Alpaca.Endpoints (positionsEndpoint, (/.)) import Alpaca.Orders (Order) import Alpaca.Query (query) import Control.Lens ((&), (.~), (<&>)) import Data.Aeson (FromJSON, parseJSON, withObject, (.:)) import Data.ByteString.Lazy (ByteString) import Data.Char (toUpper) import Data.Text ...
null
https://raw.githubusercontent.com/RobertBarnhoorn/haskalpaca/b009f829d17422a23314628c7f979f9264509077/src/Alpaca/Positions.hs
haskell
| Represents the position for a specific 'symbol' | Total dollar amount of the position | Total dollar cost basis | Unrealized dollar P/L | Unrealized P/L percent | Represents the success or failure of an attempted position liquidation, along with relevant diagnostics HTTP 200 OK * An 'Order' placed specif...
module Alpaca.Positions where import Alpaca.Endpoints (positionsEndpoint, (/.)) import Alpaca.Orders (Order) import Alpaca.Query (query) import Control.Lens ((&), (.~), (<&>)) import Data.Aeson (FromJSON, parseJSON, withObject, (.:)) import Data.ByteString.Lazy (ByteString) import Data.Char (toUpper) import Data.Text ...
7955cadb3c1478c29d818d84504e7bd516c3bba4ed887e8be5297a6a10a99094
elastic/eui-cljs
table_row.cljs
(ns eui.table-row (:require ["@elastic/eui/lib/components/table/table_row.js" :as eui])) (def EuiTableRow eui/EuiTableRow)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/table_row.cljs
clojure
(ns eui.table-row (:require ["@elastic/eui/lib/components/table/table_row.js" :as eui])) (def EuiTableRow eui/EuiTableRow)
5f1172b56f0f3556c0439e127b2358a6a4c3ba3d062fec99dd40674d72e7544c
jstolarek/dep-typed-wbl-heaps-hs
Unreachable.hs
----------------------------------------------------------------------- Copyright : 2014 , , Politechnika Łódzka -- -- -- -- License: See LICENSE file in root of the repo -- Repo address : -typed-wbl-heaps-hs -- ...
null
https://raw.githubusercontent.com/jstolarek/dep-typed-wbl-heaps-hs/0d6e354cbb71056a3eb9df9ebdc788182e137d1d/src/Basics/Unreachable.hs
haskell
--------------------------------------------------------------------- -- License: See LICENSE file in root of the repo -- -- ...
# LANGUAGE NoImplicitPrelude # module Basics.Unreachable where import Prelude (undefined) unreachable :: a unreachable = undefined
467aaa817eb99b15df207c1f510636adf1a6425a94e5297a4735b501035b32f7
ohri-anurag/TwoFifty-Backend
SharedData.hs
{-# LANGUAGE OverloadedStrings #-} module SharedData where import Data.Aeson import Data.Aeson.Types import qualified Data.Text as T import Card import Player import State data SelectionData = SelectionData [Card] -- Helpers deriving Show data ReceivedDataValue = IntroData T.Text ...
null
https://raw.githubusercontent.com/ohri-anurag/TwoFifty-Backend/746a57afad9abdfd47c064b3c02321ef0ff2c426/src/SharedData.hs
haskell
# LANGUAGE OverloadedStrings # Helpers Player Name Player Id The player who quit bidding Bidding Player Bid Amount Which card was played Need to have a string here, since I need to know which game are we talking about Game Id Newly Joined Player Already existing players in the game Player names Your player...
module SharedData where import Data.Aeson import Data.Aeson.Types import qualified Data.Text as T import Card import Player import State data SelectionData = SelectionData deriving Show data ReceivedDataValue = IntroData | QuitBidding | IncreaseBid | ReceivedSelectionData SelectionData | Pl...
fa75941029fb67a7f504f1e450e3346ad391debfaab1bdc7a297a00b24a45150
bmeurer/ocamljit2
ocamlbuild_plugin.ml
(***********************************************************************) (* ocamlbuild *) (* *) , , projet Gallium , INRIA Rocquencourt (* ...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/ocamlbuild/ocamlbuild_plugin.ml
ocaml
********************************************************************* ocamlbuild ...
, , projet Gallium , INRIA Rocquencourt Copyright 2007 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . Original author : open Ocamlbuild_pack include O...
27dd63830e0f34d21da8a049d31765afd147eaecc6840b85cbb6d835b5076983
hopv/MoCHi
CEGAR_CPS.ml
open CEGAR_syntax open CEGAR_type open CEGAR_util open Util module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end) let is_head_tuple t = match decomp_app t with | Const (Tuple _), _::_ -> true | _ -> false let and_cps = "and_cps" let or_cps = "or_cps" let not_cps = "not_cps" let and...
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/CEGAR_CPS.ml
ocaml
open CEGAR_syntax open CEGAR_type open CEGAR_util open Util module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end) let is_head_tuple t = match decomp_app t with | Const (Tuple _), _::_ -> true | _ -> false let and_cps = "and_cps" let or_cps = "or_cps" let not_cps = "not_cps" let and...
5c8b88e4faa64084c7ad50e5f28c9194329d9ca56e94edba95e6fac8ee3f8d72
PLTools/OCanren
myhelpers.ml
SPDX - License - Identifier : LGPL-2.1 - or - later * OCanren PPX * Copyright ( C ) 2016 - 2023 * aka Kakadu * St. Petersburg State University , JetBrains Research * OCanren PPX * Copyright (C) 2016-2023 * Dmitrii Kosarev aka Kakadu * St.Petersburg State University, JetBrains Research *) o...
null
https://raw.githubusercontent.com/PLTools/OCanren/e8f3b2e876baa916f30d60a5cecf0f1470a61c24/ppx/myhelpers.ml
ocaml
TODO: maybe use Ppxlib.name_type_params_in_td ? | [] -> Exp.construct (Located.mk ~loc (lident "()")) None
SPDX - License - Identifier : LGPL-2.1 - or - later * OCanren PPX * Copyright ( C ) 2016 - 2023 * aka Kakadu * St. Petersburg State University , JetBrains Research * OCanren PPX * Copyright (C) 2016-2023 * Dmitrii Kosarev aka Kakadu * St.Petersburg State University, JetBrains Research *) o...
838f7c8105e1e26c4a4dc31496939e9a2262b0ca62b775c82f8c4ecff3658439
mentat-collective/emmy
match_test.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.pattern.match-test (:require [clojure.test :refer [is deftest testing]] [clojure.test.check.generators :as gen] [com.gfredericks.test.chuck.clojure-test :refer [checking]] [emmy.pattern.match :as m] [emmy.pattern.syntax :as...
null
https://raw.githubusercontent.com/mentat-collective/emmy/23248a9e8637b9b76636326b743656c0a6ed8abc/test/emmy/pattern/match_test.cljc
clojure
ClojureScript treats floats with no mantissa as integers.
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.pattern.match-test (:require [clojure.test :refer [is deftest testing]] [clojure.test.check.generators :as gen] [com.gfredericks.test.chuck.clojure-test :refer [checking]] [emmy.pattern.match :as m] [emmy.pattern.syntax :as...
38b5b5d53f667114f894bbfabe86d509230d78fe66a037912a52007a2858ae64
unison-code/unison
ExtractRegs.hs
| Copyright : Copyright ( c ) 2016 , RISE SICS AB License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2016, RISE SICS AB License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > This file is part of Unison , see -code.github.io ...
null
https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Tools/Import/ExtractRegs.hs
haskell
| This pass assumes that all registers in the code are only defined once
| Copyright : Copyright ( c ) 2016 , RISE SICS AB License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2016, RISE SICS AB License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > This file is part of Unison , see -code.github.io ...
1a3ea977a6711bbf7f7214d0f1bb4b8576b67fdbebd45cbcfc3a022c0fb9df6f
lehitoskin/blight
helpers.rkt
#lang typed/racket/base ; helpers.rkt ; contains miscellaneous procedures for things (require typed/racket/date) (provide any->bool hex-string? tox-id? get-time) (define (any->bool (x : Any)) : Boolean (not (not x))) (define-type Hexadecimal-String (Listof Char)) ; checks if a given str...
null
https://raw.githubusercontent.com/lehitoskin/blight/807b0437c92ee41c68ca5a767d973817ae416b65/helpers.rkt
racket
helpers.rkt contains miscellaneous procedures for things checks if a given string is in hexadecimal format number-conversions can't convert "" hex-strings so they aren't valid.
#lang typed/racket/base (require typed/racket/date) (provide any->bool hex-string? tox-id? get-time) (define (any->bool (x : Any)) : Boolean (not (not x))) (define-type Hexadecimal-String (Listof Char)) (define (hex-string? (val : Any)) : Boolean (and (string? val) (not (zero? ...
bc23f8e96cda74415ceb5cc29ab446415ae16fea44146495adbbac285bbeec68
rems-project/cerberus
typing.mli
type ('a, 'e) t type ('a, 'e) m = ('a, 'e) t type 'e failure = Context.t -> 'e val return : 'a -> ('a, 'e) m val bind : ('a, 'e) m -> ('a -> ('b, 'e) m) -> ('b, 'e) m val pure : ('a, 'e) m -> ('a, 'e) m val (let@) : ('a, 'e) m -> ('a -> ('b, 'e) m) -> ('b, 'e) m val fail : 'e failure -> ('a, 'e) m val fail_with_trace ...
null
https://raw.githubusercontent.com/rems-project/cerberus/965d4e46ae42e85141c2b32a647f11c6944493e3/backend/cn/typing.mli
ocaml
val get: unit -> Context.t m
type ('a, 'e) t type ('a, 'e) m = ('a, 'e) t type 'e failure = Context.t -> 'e val return : 'a -> ('a, 'e) m val bind : ('a, 'e) m -> ('a -> ('b, 'e) m) -> ('b, 'e) m val pure : ('a, 'e) m -> ('a, 'e) m val (let@) : ('a, 'e) m -> ('a -> ('b, 'e) m) -> ('b, 'e) m val fail : 'e failure -> ('a, 'e) m val fail_with_trace ...
59f04191a4a8706c4e5e0abb3059b4c6b782be6cd84861395bc13441740f6fa7
oliyh/slacky
google_test.clj
(ns slacky.google-test (:require [clj-http.fake :refer :all] [clojure.test :refer :all] [cheshire.core :as json] [slacky [google :refer :all]])) (deftest search-images-test (with-fake-routes {{:address image-search-url :query-params {:q "cats" :v "1.0" :rs...
null
https://raw.githubusercontent.com/oliyh/slacky/909110e0555b7e443c3cf014c7c34b00b31c1a18/test/clj/slacky/google_test.clj
clojure
(ns slacky.google-test (:require [clj-http.fake :refer :all] [clojure.test :refer :all] [cheshire.core :as json] [slacky [google :refer :all]])) (deftest search-images-test (with-fake-routes {{:address image-search-url :query-params {:q "cats" :v "1.0" :rs...
53e9fa70b67cd3b2b6e0c076e1265d69e2f36deac7250a64c8be7b2c74b03200
stevebleazard/ocaml-jsonxt
example2.ml
let () = let json = Jsonxt.Basic.of_file "test.json" in Jsonxt.Basic.to_channel_hum stdout json;;
null
https://raw.githubusercontent.com/stevebleazard/ocaml-jsonxt/fe982b6087dd76ca003d8fbc19ae9a519f54b828/examples/basic/example2.ml
ocaml
let () = let json = Jsonxt.Basic.of_file "test.json" in Jsonxt.Basic.to_channel_hum stdout json;;
d6e4712bc3e318e37c28f0659ed9f0d167f4fcfb7f6f05f1137d73bae796b84a
fission-codes/cli
User.hs
module Fission.Web.Client.User ( register , verify , updateDID ) where import Servant hiding (addHeader) import Servant.Client import Fission.Prelude import qualified Fission.User.Registration.Types as User import qualified Fission.User.Username.Types as User import qualifie...
null
https://raw.githubusercontent.com/fission-codes/cli/dc3500babad35a6cb44835fa503d27d672cbcdb3/library/Fission/Web/Client/User.hs
haskell
module Fission.Web.Client.User ( register , verify , updateDID ) where import Servant hiding (addHeader) import Servant.Client import Fission.Prelude import qualified Fission.User.Registration.Types as User import qualified Fission.User.Username.Types as User import qualifie...
344117e132ef62da55b1e7a8d4f29263db9e3c0bc924bcfb18893900408125f2
karlhof26/gimp-scheme
Luminosity_masks.scm
following steps in tutorial by ; found at link: / This script will generate 9 extra layers named " L","LL","LLL","D","DD","DDD","M","MM","MMM " where L stands for Light - tones , D stands for Dark - tones , M stands for Mid - tones ; these layers will be masked as instructed in the tutorial ; so that th...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/826abc702902065645f634dc1a657443ef3f231c/Luminosity_masks.scm
scheme
found at link: / these layers will be masked as instructed in the tutorial so that the user can manipulate these layers at free will. This program is free software; you can redistribute it and/or modify either version 2 of the License , or (at your option) any later version. This program is distribut...
following steps in tutorial by This script will generate 9 extra layers named " L","LL","LLL","D","DD","DDD","M","MM","MMM " where L stands for Light - tones , D stands for Dark - tones , M stands for Mid - tones Note : not mentioned in tutorial is how to create MM and MMM layers without them having bla...
28fe1d53aca3e2378d6ae05f2d882829c2cd908c30f643f9dfbd9860eb622499
tonyrog/eth
eth_bpf_test.erl
@author < > ( C ) 2014 , %%% @doc %%% Test of various filters %%% @end Created : 2 Jul 2014 by < > -module(eth_bpf_test). -compile(export_all). test1() -> eth_bpf:build_programx({'&&', ["ether.type.ip", "ip.proto.tcp", {'==',"ip.frag",0}, "ip.tcp.flag.syn", "ip.tcp.flag.ack...
null
https://raw.githubusercontent.com/tonyrog/eth/51e9989a020ccf8aafa0c286c0dc19ab7862a5a8/src/eth_bpf_test.erl
erlang
@doc Test of various filters @end "ip.src.192.168.2.0/24" "ip6.src.1::5:6:192.168.2.0/120" should be same as port.53! (ip[12]+ip[13]+ip[14]+ip[15]) & 1 == ((src rem 255) & 1) ??? "tcp" TCP - FIN/ACK => disconnected
@author < > ( C ) 2014 , Created : 2 Jul 2014 by < > -module(eth_bpf_test). -compile(export_all). test1() -> eth_bpf:build_programx({'&&', ["ether.type.ip", "ip.proto.tcp", {'==',"ip.frag",0}, "ip.tcp.flag.syn", "ip.tcp.flag.ack"]}). test2() -> eth_bpf:build_programx({'||'...
5104a43365ae5cd058344604e62004dce03ff2c9fbb24be63ffb3c6ad7b63a2d
facebook/duckling
Tests.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. module Duckling.AmountOfMoney.RO.Tests ( tests ) where import Data.String import Prelude import Test.Ta...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/AmountOfMoney/RO/Tests.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree.
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.AmountOfMoney.RO.Tests ( tests ) where import Data.String import Prelude import Test.Tasty import Duckling.AmountOfMoney.RO.Corpus import Duckling.Dimensions.Types import Duckling.Testing.Asserts tests :: TestTree tests = testGroup "RO Tests" ...
e79fe8d48ed497dc4ce6d6dde62f1e5a3453200e4c8366372370164c1b756499
haskell-tools/haskell-tools
ReorderGroups.hs
module Refactor.OrganizeImports.ReorderGroups where import Data.List (intersperse) import Control.Monad ((>>=)) import Data.Tuple (swap) import Data.Maybe (catMaybes) a = intersperse '-' "abc" b = Just () >>= \_ -> Nothing c = catMaybes [Just ()] d = swap ("a","b")
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/OrganizeImports/ReorderGroups.hs
haskell
module Refactor.OrganizeImports.ReorderGroups where import Data.List (intersperse) import Control.Monad ((>>=)) import Data.Tuple (swap) import Data.Maybe (catMaybes) a = intersperse '-' "abc" b = Just () >>= \_ -> Nothing c = catMaybes [Just ()] d = swap ("a","b")
965ba2915591b4b12b50c584a5a4260b6d5a15b7b5027523f99ee7ca52eb348d
MLstate/opalang
pass_DbCodeGeneration.ml
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/qmlpasses/pass_DbCodeGeneration.ml
ocaml
previous passes should not generate code with db paths at pre_linking
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
0b5556e56414f770615efe95a3caefdce89553bc21977a531d8575f7bafe759a
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
TransferData.hs
{-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} | Contains the types generated from the schema TransferData module StripeAPI.Types.TransferData where import qualified Con...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/TransferData.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # # SOURCE # | destination: The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to upon payment success. | 'transferDataDestination' The account (if any) the payment will be attributed t...
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . | Contains the types generated from the schema TransferData module StripeAPI.Types.TransferData where import qualified Control.Monad.Fail import qualified Data.Aeson import qualified Da...
32f9c28f8b2618be2d52099673122bde7434e3538757a0444297ab9832b4cd3c
informatimago/lisp
character.lisp
-*- mode : lisp;coding : utf-8 -*- ;;;;************************************************************************** FILE : character.lisp ;;;;LANGUAGE: Common-Lisp ;;;;SYSTEM: Common-Lisp USER - INTERFACE : ;;;;DESCRIPTION ;;;; ;;;; See package docstring. ;;;; < PJB >...
null
https://raw.githubusercontent.com/informatimago/lisp/246c79b6b1b888a8fb60bb7201238523ea09347d/common-lisp/cesarum/character.lisp
lisp
coding : utf-8 -*- ************************************************************************** LANGUAGE: Common-Lisp SYSTEM: Common-Lisp DESCRIPTION See package docstring. LEGAL This program is free software: you can redistribute it and/or modify (at your option) any later version. ...
FILE : character.lisp USER - INTERFACE : < PJB > < > MODIFICATIONS 2021 - 05 - 22 < PJB > Removed dependency to .ascii , and added dependency to .ecma048 2013 - 07 - 27 < PJB > Created . AGPL3 Copyright 2013 - 2021 it under the terms of the GNU Affero General ...
372d11cb014b7c2cd88a3ce1ed66bac3e92227d471a9093282ecf6241faf882a
nuvla/api-server
configuration_template_nuvla_test.cljc
(ns sixsq.nuvla.server.resources.spec.configuration-template-nuvla-test (:require [clojure.test :refer [deftest]] [sixsq.nuvla.server.resources.configuration-nuvla :as nuvla] [sixsq.nuvla.server.resources.configuration-template :as ct] [sixsq.nuvla.server.resources.spec.configuration-template-nuvla :a...
null
https://raw.githubusercontent.com/nuvla/api-server/eecb4ab59f02bfd7e0c28e793ba3dcea57bee2fa/code/test/sixsq/nuvla/server/resources/spec/configuration_template_nuvla_test.cljc
clojure
mandatory keys optional keys
(ns sixsq.nuvla.server.resources.spec.configuration-template-nuvla-test (:require [clojure.test :refer [deftest]] [sixsq.nuvla.server.resources.configuration-nuvla :as nuvla] [sixsq.nuvla.server.resources.configuration-template :as ct] [sixsq.nuvla.server.resources.spec.configuration-template-nuvla :a...
f09e49a01db76d9eef30e455042858296320976ca172f5cf55849195e21f02bb
huangz1990/real-world-haskell-cn
exercise5.hs
isPalindrome :: Eq a => [a] -> Bool isPalindrome [] = True isPalindrome (x:xs) | x == (last xs) = isPalindrome (init xs) | otherwise = False
null
https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/exercise/ch3/exercise5.hs
haskell
isPalindrome :: Eq a => [a] -> Bool isPalindrome [] = True isPalindrome (x:xs) | x == (last xs) = isPalindrome (init xs) | otherwise = False
3801769c7333e91c8329a48d1cc6978f488d8ec4f99441bf33f7072c0416865a
Naproche-SAD/Naproche-SAD
Pattern.hs
Authors : ( 2001 - 2008 ) , ( 2017 - 2018 ) Pattern parsing and pattern state management . Authors: Andrei Paskevich (2001 - 2008), Steffen Frerix (2017 - 2018) Pattern parsing and pattern state management. -} module SAD.ForTheL.Pattern where import qualified Control.Monad.State.Class as MS import SAD...
null
https://raw.githubusercontent.com/Naproche-SAD/Naproche-SAD/da131a6eaf65d4e02e82082a50a4febb6d42db3d/src/SAD/ForTheL/Pattern.hs
haskell
classification of pattern add to the right category increment id counter classification of pattern add the pattern to the right category check if pattern is a symbolic notion and add it there as well if so (and increment id counter) pattern extraction New patterns pattern parsing ptShort is a kind of buffer t...
Authors : ( 2001 - 2008 ) , ( 2017 - 2018 ) Pattern parsing and pattern state management . Authors: Andrei Paskevich (2001 - 2008), Steffen Frerix (2017 - 2018) Pattern parsing and pattern state management. -} module SAD.ForTheL.Pattern where import qualified Control.Monad.State.Class as MS import SAD...
c840603e61c07828ebea94c90cc5d657f6268a943307bbdd03019205092991d6
brendanhay/amazonka
Alias.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived fr...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-xray/gen/Amazonka/XRay/Types/Alias.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated | An alias for an edge. | The canonical name of the alias. | A list of names for the alias, including the canonical name. | The type of the alias. | The following record fields are available, with the corresponding lenses p...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived from AWS service descriptions , licensed under Apache 2.0 . Mo...
cf3e41aaebf9dc14c19813e77b826c3a7933d45c5b2f43cba2eb00f9c5294412
clojure-interop/aws-api
AmazonSimpleDBAsyncClient.clj
(ns com.amazonaws.services.simpledb.AmazonSimpleDBAsyncClient "Client for accessing Amazon SimpleDB asynchronously. Each asynchronous method will return a Java Future object overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. Amazon SimpleDB is a...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.simpledb/src/com/amazonaws/services/simpledb/AmazonSimpleDBAsyncClient.clj
clojure
(ns com.amazonaws.services.simpledb.AmazonSimpleDBAsyncClient "Client for accessing Amazon SimpleDB asynchronously. Each asynchronous method will return a Java Future object overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. Amazon SimpleDB is a...
c3efd0046052a0f4cb820d1273a2c29bf32c4bd4bd42e89754d6091ee099e096
chenyukang/eopl
lang.scm
(module lang (lib "eopl.ss" "eopl") ;; grammar for the TYPED-OO language. Based on IMPLICIT-REFS: ;; plus ;; multiple-argument procedures ;; multiple-declaration letrecs, and ;; multiple-declaration lets, ;; types a la CHECKED (not INFERRED) ;; lists of expressed values (requir...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter9/typed-oo/lang.scm
scheme
grammar for the TYPED-OO language. Based on IMPLICIT-REFS: plus multiple-argument procedures multiple-declaration letrecs, and multiple-declaration lets, types a la CHECKED (not INFERRED) lists of expressed values grammatical specification ;;;;;;;;;;;;;;;; non-empty lists for typechecked ve...
(module lang (lib "eopl.ss" "eopl") (require "drscheme-init.scm") (provide (all-defined)) (define the-lexical-spec '((whitespace (whitespace) skip) (comment ("%" (arbno (not #\newline))) skip) (identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol...
68b66025ab8c1bd0008026aad7e1c1835d2a6132ed32ae12d70d8cd92c581bb7
xh4/web-toolkit
handler-entity.lisp
(in-package :http) (defgeneric read-entity (content-type request &key))
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/http/handler-entity.lisp
lisp
(in-package :http) (defgeneric read-entity (content-type request &key))