_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
c3f47cc480906feda910c536048f32692890aafc3fca38f3718588e4948c38eb
Frama-C/Qed
pretty.ml
(**************************************************************************) (* *) This file is part of Qed Library (* *) Copyright ( ...
null
https://raw.githubusercontent.com/Frama-C/Qed/69fa79d9ede7a76f320c935405267a97c660814e/src/pretty.ml
ocaml
************************************************************************ alternatives) ...
This file is part of Qed Library Copyright ( C ) 2007 - 2016 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ver...
62a7f0d159ae786ad6289bd1d6a6c3ea8517eacc39afc6e58902d98c0bbe4a8c
xapi-project/stdext
zerocheck.ml
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program 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 ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/stdext/bcc64a49327c4c9b1e8a679c15515101c88ba847/lib/xapi-stdext-zerocheck/zerocheck.ml
ocaml
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program 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 ; version 2.1 only . with the special * exception on linking describe...
a1249713707881a2a41d1bdd0f4aab9f8929155a617a055965fc8ae142dabd12
haroldcarr/learn-haskell-coq-ml-etc
Debug.hs
module Main where repl : server 8888 shell : telnet 127.0.0.1 8888 or shell : sudo ` stack exec which debug ` shell : telnet 127.0.0.1 79 shell : finger carr@localhost repl : server 8888 shell : telnet 127.0.0.1 8888 or shell : sudo `stack exec which debug` shell : telnet 127.0.0.1 79 shell : finge...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/book/2017-Haskell_Programming-Chris_Allen/ch31-fingerd/src/Debug.hs
haskell
| Sets up server. Arg is Socket that listens for new client connections. forever causes listening socket to remain open indefinitely. accept blocks until a client connects to the server. `soc` is connection for communicating with the client. print received echo back on client socket close connection to client ...
module Main where repl : server 8888 shell : telnet 127.0.0.1 8888 or shell : sudo ` stack exec which debug ` shell : telnet 127.0.0.1 79 shell : finger carr@localhost repl : server 8888 shell : telnet 127.0.0.1 8888 or shell : sudo `stack exec which debug` shell : telnet 127.0.0.1 79 shell : finge...
5cf84c10bc9c91cf1ba135ab00c129805576254d60bded4c4c17d07691dd7983
ocsigen/tyxml
attributes.mli
TyXML * * Copyright ( C ) 2016 * * This program 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 , with linking exception ; * either version 2.1 of the License , or ( at your op...
null
https://raw.githubusercontent.com/ocsigen/tyxml/6c9dd5b01e4850d6d9fba03ddea7150a1bfcb40b/syntax/attributes.mli
ocaml
* Attribute parsing.
TyXML * * Copyright ( C ) 2016 * * This program 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 , with linking exception ; * either version 2.1 of the License , or ( at your op...
517dca8b2749f933033a3a93ca9dccd9f302ce91f10136a85871de494536268c
comby-tools/comby
test_python_string_literals_alpha.ml
open Core open Test_helpers include Test_alpha let%expect_test "matched_contains_raw_literal_quotes" = let source = {|"""blah"""|} in let template = {|""":[[1]]"""|} in let matches = Python.all ~configuration ~template ~source () in print_only_match matches; [%expect_exact {|[ "\"\"\"blah\"\"\"" ]|}] let%...
null
https://raw.githubusercontent.com/comby-tools/comby/7b401063024da9ddc94446ade27a24806398d838/test/common/test_python_string_literals_alpha.ml
ocaml
open Core open Test_helpers include Test_alpha let%expect_test "matched_contains_raw_literal_quotes" = let source = {|"""blah"""|} in let template = {|""":[[1]]"""|} in let matches = Python.all ~configuration ~template ~source () in print_only_match matches; [%expect_exact {|[ "\"\"\"blah\"\"\"" ]|}] let%...
d48eb6898fdfaeee6d8789e8bcbc530c9a6813498e6d0e8345b2ceef4d2d18e8
Armael/ocaml-wlc
wlc__wl.ml
open Ctypes open Foreign open Wlc__prelude let wl_lib = Dl.dlopen ~filename:"libwayland-server.so" ~flags:[Dl.RTLD_NOW; Dl.RTLD_GLOBAL] module C = struct type list let list : list structure typ = structure "wl_list" let prev = field list "prev" (ptr list) let next = field list "next" (ptr list) let () =...
null
https://raw.githubusercontent.com/Armael/ocaml-wlc/1825c6ff736fd1cdb751421d6f60eadf2dd994ec/src/wlc__wl.ml
ocaml
open Ctypes open Foreign open Wlc__prelude let wl_lib = Dl.dlopen ~filename:"libwayland-server.so" ~flags:[Dl.RTLD_NOW; Dl.RTLD_GLOBAL] module C = struct type list let list : list structure typ = structure "wl_list" let prev = field list "prev" (ptr list) let next = field list "next" (ptr list) let () =...
0ea3e6b1e43f68942ad26354ea664bbd0befab14b7e0acc200ced5af9c49298e
MastodonC/kixi.datastore
ordering_test.clj
(ns kixi.integration.search.ordering-test {:integration true} (:require [clojure.test :refer :all] [clojure.spec.test.alpha :refer [with-instrument-disabled]] [clojure.core.async :as async] [clojure.spec.gen.alpha :as gen] [environ.core :refer [env]] [clj-...
null
https://raw.githubusercontent.com/MastodonC/kixi.datastore/f33bba4b1fdd8c56cc7ac0f559ffe35254c9ca99/test/kixi/integration/search/ordering_test.clj
clojure
(ns kixi.integration.search.ordering-test {:integration true} (:require [clojure.test :refer :all] [clojure.spec.test.alpha :refer [with-instrument-disabled]] [clojure.core.async :as async] [clojure.spec.gen.alpha :as gen] [environ.core :refer [env]] [clj-...
9cae49dd679bf981f09f9ae308770b41d5fdb605ba674507e770c99d824df637
codedownio/aeson-typescript
Lookup.hs
# LANGUAGE CPP # # LANGUAGE TemplateHaskell # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE PolyKinds # module Data.Aeson.TypeScript.Lookup where import Control.Monad import Data.Aeson.TypeScript.Instances () import Data.Aeson.TypeScript.Types import Data.Function import qualified D...
null
https://raw.githubusercontent.com/codedownio/aeson-typescript/d6a3addf220d51dcc1199744869beda2b8bb2aa1/src/Data/Aeson/TypeScript/Lookup.hs
haskell
^ Name of a type family. ^ Name of the declaration to derive.
# LANGUAGE CPP # # LANGUAGE TemplateHaskell # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE PolyKinds # module Data.Aeson.TypeScript.Lookup where import Control.Monad import Data.Aeson.TypeScript.Instances () import Data.Aeson.TypeScript.Types import Data.Function import qualified D...
87dc2fa2d536843181e3c8eeac1bbb3b9b81849a94ca4f869d4f3b908a555084
ejgallego/dfuzz
option.ml
Copyright ( c ) 2013 , The Trustees of the University of Pennsylvania All rights reserved . LICENSE : 3 - clause BSD style . See the LICENSE file for details on licensing . All rights reserved. LICENSE: 3-clause BSD style. See the LICENSE file for details on licensing. *) (* Very simple u...
null
https://raw.githubusercontent.com/ejgallego/dfuzz/09b408e4f917cdd6945bdc20b7dd325ff80e5843/src/option.ml
ocaml
Very simple utility functions
Copyright ( c ) 2013 , The Trustees of the University of Pennsylvania All rights reserved . LICENSE : 3 - clause BSD style . See the LICENSE file for details on licensing . All rights reserved. LICENSE: 3-clause BSD style. See the LICENSE file for details on licensing. *) let map f = func...
1b0c18383e53ef89dcd48f055120540bd72dfbfa0a1b155eb7944c50ccda2478
finnishtransportagency/harja
integraatiotapahtuma.clj
(ns harja.palvelin.integraatiot.integraatiotapahtuma (:require [taoensso.timbre :as log] [harja.palvelin.integraatiot.integraatiopisteet.http :as http] [harja.palvelin.integraatiot.integraatioloki :as integraatioloki] [harja.kyselyt.integraatiot :as integraatio-kyselyt] ...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/07040a9074f23702f0a6814f5b5303f65015a62e/src/clj/harja/palvelin/integraatiot/integraatiotapahtuma.clj
clojure
todo: toteuta!
(ns harja.palvelin.integraatiot.integraatiotapahtuma (:require [taoensso.timbre :as log] [harja.palvelin.integraatiot.integraatiopisteet.http :as http] [harja.palvelin.integraatiot.integraatioloki :as integraatioloki] [harja.kyselyt.integraatiot :as integraatio-kyselyt] ...
a53119e63d7f18c57180d35837dde6b7dadb6f11b819e611c17a49a0ed42bfc2
adamdoupe/find_ear_rails
parse_disambig.ml
open Ast open Test_helper open OUnit open Printf let mk_space_tests str uop binop = [ (str ^ " no space before or after", [E_MethodDef(ast_id "x",[], just_body [ast_num 6], dp); E_Binop(ast_id "x",binop,ast_num 4,dp)], sprintf "def x() 6 end;x%s4" str ); (str ^ " space before and after in mid expr",...
null
https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/tests/parser/parse_disambig.ml
ocaml
open Ast open Test_helper open OUnit open Printf let mk_space_tests str uop binop = [ (str ^ " no space before or after", [E_MethodDef(ast_id "x",[], just_body [ast_num 6], dp); E_Binop(ast_id "x",binop,ast_num 4,dp)], sprintf "def x() 6 end;x%s4" str ); (str ^ " space before and after in mid expr",...
3ebe21ede68d5ee466002606ff8deac781776e7d20ce2914f1b99479b8d8706f
redbadger/test-report
options_test.clj
(ns test-report.options-test (:require [clojure.test :refer :all] [test-report.options :refer :all])) (def ^:dynamic *foo* 42) (def ^:dynamic *bar* 50) (deftest with-options-executes-body-with-bound-dynamic-vars (testing "with no options" (with-options {} (is (= 42 *foo*)) (is (= 50 *b...
null
https://raw.githubusercontent.com/redbadger/test-report/20382fc57876b8fc526b9990399340a6a4b4b919/test-report/test/test_report/options_test.clj
clojure
(ns test-report.options-test (:require [clojure.test :refer :all] [test-report.options :refer :all])) (def ^:dynamic *foo* 42) (def ^:dynamic *bar* 50) (deftest with-options-executes-body-with-bound-dynamic-vars (testing "with no options" (with-options {} (is (= 42 *foo*)) (is (= 50 *b...
4109bdbd243bbe01a2e956344c9d9c29d00d76aa8e7a756dff4e8d312af1a720
jyh/metaprl
itt_dfun.ml
doc <:doc< @module[Itt_dfun] The @tt[Itt_dfun] module defines the type <<x:'A -> 'B['x]>> of dependent functions. @docoff ---------------------------------------------------------------- @begin[license] This file is part of MetaPRL, a modular, higher order logical framework that provides a lo...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/core/itt_dfun.ml
ocaml
* Primitives. *********************************************************************** * DISPLAY FORMS * *********************************************************************** *********************************************************************** * REWRITES...
doc <:doc< @module[Itt_dfun] The @tt[Itt_dfun] module defines the type <<x:'A -> 'B['x]>> of dependent functions. @docoff ---------------------------------------------------------------- @begin[license] This file is part of MetaPRL, a modular, higher order logical framework that provides a lo...
78f90b8f695c13dc7e642d394acf1f820fe0303c429e98955f4cd877ddb42884
elastic/eui-cljs
eui_description_list_styles.cljs
(ns eui.eui-description-list-styles (:require ["@elastic/eui/lib/components/description_list/description_list.styles.js" :as eui])) (def euiDescriptionListStyles eui/euiDescriptionListStyles)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/eui_description_list_styles.cljs
clojure
(ns eui.eui-description-list-styles (:require ["@elastic/eui/lib/components/description_list/description_list.styles.js" :as eui])) (def euiDescriptionListStyles eui/euiDescriptionListStyles)
5f7b456eb40f8a841368e77e11e2fa08da34f659ef7b0d5110d7a7ce7910b82d
racket/plai
datatype.rkt
#lang plai (require (prefix-in eli: tests/eli-tester) "util.rkt") (define-type A [mta] [a (b B?)]) (define-type B [mtb] [b (a A?)]) (define-type T [i (f number?)]) (define-type T1 [i1 (f (car 1))]) (define-type DefrdSub [mtSub] [aSub (value boolean?)]) (define (lookup ds the-name) (type...
null
https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/datatype.rkt
racket
#lang plai (require (prefix-in eli: tests/eli-tester) "util.rkt") (define-type A [mta] [a (b B?)]) (define-type B [mtb] [b (a A?)]) (define-type T [i (f number?)]) (define-type T1 [i1 (f (car 1))]) (define-type DefrdSub [mtSub] [aSub (value boolean?)]) (define (lookup ds the-name) (type...
a7cd12c78f6a342a285fc829dc4340cd686318ac4042799c9c6d687ff66020b4
ocamllabs/ocaml-modular-implicits
t181-appterm.ml
open Lib;; let f _ _ _ _ = -10 in let g _ = f 0 0 0 0 in if g 0 <> -10 then raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 BRANCH 26 11 CONST0 12 PUSHCONST0 13 PUSHCONST0 14 PUSHCONST0 15 PUSHENVAC...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t181-appterm.ml
ocaml
open Lib;; let f _ _ _ _ = -10 in let g _ = f 0 0 0 0 in if g 0 <> -10 then raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 BRANCH 26 11 CONST0 12 PUSHCONST0 13 PUSHCONST0 14 PUSHCONST0 15 PUSHENVAC...
a26da7e5ca44c34516c0fbfebd25b93be3c348c76f5025c5af7568f062d4fbbd
MyDataFlow/ttalk-server
mongoose_api.erl
%%============================================================================== Copyright 2014 Erlang Solutions Ltd. %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% ...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/mongoose_api.erl
erlang
============================================================================== 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 ex...
Copyright 2014 Erlang Solutions Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(mongoose_api). -export([cowboy_router_paths/2]). -export([init/3, rest_init/2, rest_terminate/2]). -export([a...
be4d6fb45dea8c114988d1eb41c198da981ce44c7d6636fb55e897891dc097a3
BillHallahan/G2
M28.hs
{-@ LIQUID "--no-termination" @-} module M1 (main) where data Peano = Succ Peano | Nil @ main : : Peano - > { b : | b } @ main :: Peano -> Bool main xs = case while xs cond1 loop1 (0, 0) of (x', y') -> case while2 (x', y', 0) of (x'', y'', n'') -> y'' == n'' while :: Pea...
null
https://raw.githubusercontent.com/BillHallahan/G2/f2584eb2ec211aed73b3ccd88c6e232c3cf4386d/tests/LiquidInf/Paper/Eval/Compare/M28.hs
haskell
@ LIQUID "--no-termination" @ @ cond1 :: Peano -> (Int, Int) -> Bool @ @ loop1 :: (Int, Int) -> (Int, Int) @
module M1 (main) where data Peano = Succ Peano | Nil @ main : : Peano - > { b : | b } @ main :: Peano -> Bool main xs = case while xs cond1 loop1 (0, 0) of (x', y') -> case while2 (x', y', 0) of (x'', y'', n'') -> y'' == n'' while :: Peano -> (Peano -> a -> Bool) -> (a -...
e0340b2b87abba2a361724b13997493785a38e56fc783745fd1431749c2b90d4
venantius/pyro
stacktrace.clj
(ns pyro.stacktrace (:require [clj-stacktrace.core :as st] [pyro.stacktrace.element :as element])) (defn filter-repl "Given a seq of stacktrace element maps, take all elements until an element is found in `clojure.main/repl/read-eval-print`. If such a frame doesn't exist, just return the seq." {:...
null
https://raw.githubusercontent.com/venantius/pyro/8f71aa054f7d54d38be090c3a78b4843e4e6b0ca/src/pyro/stacktrace.clj
clojure
(ns pyro.stacktrace (:require [clj-stacktrace.core :as st] [pyro.stacktrace.element :as element])) (defn filter-repl "Given a seq of stacktrace element maps, take all elements until an element is found in `clojure.main/repl/read-eval-print`. If such a frame doesn't exist, just return the seq." {:...
472907067647f9f26dd17f375045aeb678dc58a8d924932cd205638cf07d2d56
brendanhay/amazonka
ResponseTimeRootCause.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/ResponseTimeRootCause.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated | The root cause information for a response time warning. /See:/ 'newResponseTimeRootCause' smart constructor. | A flag that denotes that the root cause impacts the trace client. | A list of corresponding services. A service id...
# 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...
409bcf86bea4bab91f0baf620605e9ea06062e668318b7ec04f77165e964de54
mbutterick/brag
test-0n1n.rkt
#lang racket/base (require brag/examples/0n1n brag/support rackunit) (define (lex ip) (port-count-lines! ip) (lambda () (define next-char (read-char ip)) (cond [(eof-object? next-char) (token eof)] [(char=? next-char #\0) (token "0" "0")] [(char=?...
null
https://raw.githubusercontent.com/mbutterick/brag/6c161ae31df9b4ae7f55a14f754c0b216b60c9a6/brag-lib/brag/test/test-0n1n.rkt
racket
The only rule in the grammar is: It makes use of the "maybe" pattern. The result type of the grammar rule is: rule-0n1n: (U #f
#lang racket/base (require brag/examples/0n1n brag/support rackunit) (define (lex ip) (port-count-lines! ip) (lambda () (define next-char (read-char ip)) (cond [(eof-object? next-char) (token eof)] [(char=? next-char #\0) (token "0" "0")] [(char=?...
19ccfe0b7308bd3dbf0b14711914ee10ac81bd29a1796a7fbbf566917a35b8d1
cmsc430/www
let-x-y-if-truenontail-x-5.rkt
#lang racket (define (double x) (+ x x)) (let ((x 2)) (let ((y 3)) (if (double 5) x 5)))
null
https://raw.githubusercontent.com/cmsc430/www/23cf4e30e4bac377f656dc21fc7f2aea3005068a/langs/test-programs/jig/let-x-y-if-truenontail-x-5.rkt
racket
#lang racket (define (double x) (+ x x)) (let ((x 2)) (let ((y 3)) (if (double 5) x 5)))
466e0aa9ad2dc92a3c40be419e121f6fd25b03d1e3c3fc611e17e94a3450f722
mnasoft/math
gnuplot-doc.lisp
;;;; ./src/gnuplot/gnuplot-doc.lisp (in-package #:MATH/GNUPLOT)
null
https://raw.githubusercontent.com/mnasoft/math/9bdd318a8653e14694236d79b6d2bd4b6c3f2cee/src/gnuplot/gnuplot-doc.lisp
lisp
./src/gnuplot/gnuplot-doc.lisp
(in-package #:MATH/GNUPLOT)
ca97fb15cfd6749c4ffe1faadd2faea0bd9aa9bbf155e2b61d8047483adc7e62
AccelerateHS/accelerate-llvm
Map.hs
# LANGUAGE GADTs # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # -- | Module : Data . Array . Accelerate . LLVM.Native . CodeGen . Map Copyright : [ 2014 .. 2020 ] The Accelerate Team -- License ...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/57136bfc67f0da8ea0a0aba0172397a2e92d3378/accelerate-llvm-native/src/Data/Array/Accelerate/LLVM/Native/CodeGen/Map.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # | License : BSD3 Stability : experimental C Code ====== float f(float); void map(float* __restrict__ out, const float* __restrict__ in, const int n) { out[i] = f(in[i]); return; } Corresponding LLVM ================== ...
# LANGUAGE GADTs # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # Module : Data . Array . Accelerate . LLVM.Native . CodeGen . Map Copyright : [ 2014 .. 2020 ] The Accelerate Team Maintainer : < > Portability : non - portable ( GHC extensions ) module Data.Arra...
b994b58bc513f4107bb2fef1c1fcacdac2fd49e59e6e85d97abbcc892222e575
solita/mnt-teet
land_model.cljc
(ns teet.land.land-model) (defn estate-land-acquisitions "Return land acquisitions related to given estate with the associated land unit information" [estate-id land-units land-acquisitions] (mapv (fn [la] (let [teet-id (:land-acquisition/cadastral-unit la) land-unit (some ...
null
https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/common/src/cljc/teet/land/land_model.cljc
clojure
(ns teet.land.land-model) (defn estate-land-acquisitions "Return land acquisitions related to given estate with the associated land unit information" [estate-id land-units land-acquisitions] (mapv (fn [la] (let [teet-id (:land-acquisition/cadastral-unit la) land-unit (some ...
ae502f7a1aebd9e9d7ad6ad94b3cd7b94398fce490151ce18185665612e5c516
swamp-agr/servant-seo
Combinators.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE PolyKinds # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies ...
null
https://raw.githubusercontent.com/swamp-agr/servant-seo/bd6eddf1a08cff92b6cbbba6ee28ebb5dbd73c1b/src/Servant/Seo/Combinators.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # ** XML | @BSL.fromStrict . Text.encodeUtf8@ | @BSL.fromStrict@ | @id@ ** Disallow Example: GET /admin / crm >>> type API = Disallow "admin" :> "crm" :> Get '[HTML] CrmPag...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE PolyKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Servant.Seo.Combinators where import Data.ByteString (ByteString) import qualifie...
df34876b57066c041826a627f52395aaa157623c9f7508cae77e16efb979184d
txyyss/Project-Euler
Euler010.hs
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17 . Find the sum of all the primes below two million . module Euler010 where minus :: Ord a => [a] -> [a] -> [a] minus lx@(x:xs) ly@(y:ys) = case compare x y of LT -> x : minus xs ly EQ -> minus xs ys GT -> minus lx ys minus xs _ = xs primesTo :...
null
https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler010.hs
haskell
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17 . Find the sum of all the primes below two million . module Euler010 where minus :: Ord a => [a] -> [a] -> [a] minus lx@(x:xs) ly@(y:ys) = case compare x y of LT -> x : minus xs ly EQ -> minus xs ys GT -> minus lx ys minus xs _ = xs primesTo :...
fcbad327663b61d739c2b4266c5d4259f6f9a776adfa8892652864b467255333
clj-dasha/dasha
project.clj
(defproject dasha "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0-alpha2"] [cheshire "5.3.1"] [compojure "1.1.9"] [hiccup "1.0.5"]...
null
https://raw.githubusercontent.com/clj-dasha/dasha/13508b5d75cabce5a6dff9545054f7ef40731717/project.clj
clojure
(defproject dasha "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0-alpha2"] [cheshire "5.3.1"] [compojure "1.1.9"] [hiccup "1.0.5"]...
67a76b1c11e9dd17bce5b9278ab0306a42d15de6e736d7b41e682df758c73337
metosin/komponentit
filepicker.cljs
(ns komponentit.filepicker (:require [goog.dom :as dom] [reagent.core :as reagent] [reagent.ratom :refer-macros [reaction]])) ; Directory support: #L908-L933 (defn humanize-filesize ([bytes] (humanize-filesize bytes nil)) ([bytes {:keys [locale iec? locale-opts]}] (let [units (if iec?...
null
https://raw.githubusercontent.com/metosin/komponentit/d962ce1d69ccc3800db0d6b4fc18fc2fd30b494a/src/cljs/komponentit/filepicker.cljs
clojure
Directory support: #L908-L933 FIXME: Refactor more customizable FIXME: This ensures that the on-change event is emited even if the same file is selected again. Drag and drop utilities
(ns komponentit.filepicker (:require [goog.dom :as dom] [reagent.core :as reagent] [reagent.ratom :refer-macros [reaction]])) (defn humanize-filesize ([bytes] (humanize-filesize bytes nil)) ([bytes {:keys [locale iec? locale-opts]}] (let [units (if iec? ["bytes" "KiB"...
80bce2ac13cfb021d88f928699b19f46c3ce19e82462c807a3caac0dec6c505e
layerware/hugsql
db.clj
(ns princess-bride.db (:require [hugsql.core :as hugsql])) (def db {:subprotocol "h2" :subname (str (System/getProperty "java.io.tmpdir") "/princess_bride.h2")})
null
https://raw.githubusercontent.com/layerware/hugsql/052c04a2a6dc99c3c35810ddf83416c2fd93c5e5/examples/princess-bride/src/princess_bride/db.clj
clojure
(ns princess-bride.db (:require [hugsql.core :as hugsql])) (def db {:subprotocol "h2" :subname (str (System/getProperty "java.io.tmpdir") "/princess_bride.h2")})
10dee998f516e7abf45278e374ddc71c28bf1882e92b2cf718310c5faeb285f1
marick/Midje
t_outside.clj
(ns behaviors.background-nesting.t-outside (:require [clojure.test :refer :all] [midje.sweet :refer :all] [midje.test-util :refer :all])) ;; This is a separate file because we're making namespace-wide changes (unfinished outermost middlemost innermost) (against-background [ (middlemost) => ...
null
https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/behaviors/background_nesting/t_outside.clj
clojure
This is a separate file because we're making namespace-wide changes deftest intentional
(ns behaviors.background-nesting.t-outside (:require [clojure.test :refer :all] [midje.sweet :refer :all] [midje.test-util :refer :all])) (unfinished outermost middlemost innermost) (against-background [ (middlemost) => 33 ] (fact (against-background (innermost) => 8) (+ (mi...
b3314c3f9fa89479359e2549f2a002582ff97b36d0e911c9945cde884e4ce22a
puppetlabs/pcp-broker
core.clj
(ns puppetlabs.pcp.broker.core (:require [puppetlabs.experimental.websockets.client :as websockets-client] [puppetlabs.pcp.broker.shared :as shared :refer [Broker get-connection get-controller summarize send-error-message send-message deliver-message deliver-server-message]] [pupp...
null
https://raw.githubusercontent.com/puppetlabs/pcp-broker/7806c6a6045c406c256b2c9d6129382923ba3d03/src/puppetlabs/pcp/broker/core.clj
clojure
broker database lifecycle Message processing process-associate-request! helper Logs association status with the following arguments 0 : uri associated with incoming connection NB(ale): don't validate the associate_request as there's no data chunk... 0 : reason to deny request 0 : message type Message vali...
(ns puppetlabs.pcp.broker.core (:require [puppetlabs.experimental.websockets.client :as websockets-client] [puppetlabs.pcp.broker.shared :as shared :refer [Broker get-connection get-controller summarize send-error-message send-message deliver-message deliver-server-message]] [pupp...
ce0f435c0e20f074fa73449af7ca0ef5ccd0d620b1dcae0c5a123e6e4b300b44
DASpringate/Cochrane_scraper
download.clj
(ns cochrane-scraper.download (:require [net.cgrand.enlive-html :as html] [clojure.java.io :as io] [clj-http.client :as http] [clojure.xml :as xml] [clojure.zip :as zip] [cochrane-scraper.io :as writer] [cochrane-scraper.parse :as parser] ...
null
https://raw.githubusercontent.com/DASpringate/Cochrane_scraper/9768d3796b24a0ff2a5a27f7688db1ef89dccca8/src/cochrane_scraper/download.clj
clojure
(ns cochrane-scraper.download (:require [net.cgrand.enlive-html :as html] [clojure.java.io :as io] [clj-http.client :as http] [clojure.xml :as xml] [clojure.zip :as zip] [cochrane-scraper.io :as writer] [cochrane-scraper.parse :as parser] ...
d26079ca7201704fa02380f6e5f7df2dc33c0c4f702278a9fe2fc15d333739ab
lucasdicioccio/deptrack-project
Jenkins.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import System.Environment (getArgs) import Devops.Cli (simpleMain) import Devops.Optimize (optimizeDebianPackages) import Devops.Debian.Packages (jenkins) main :: IO () main = do args <- getArgs simpleMain jenkins [optim...
null
https://raw.githubusercontent.com/lucasdicioccio/deptrack-project/cd3d59a796815af8ae8db32c47b1e1cdc209ac71/deptrack-devops-examples/app/Jenkins.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import System.Environment (getArgs) import Devops.Cli (simpleMain) import Devops.Optimize (optimizeDebianPackages) import Devops.Debian.Packages (jenkins) main :: IO () main = do args <- getArgs simpleMain jenkins [optimizeDebianPackages] args ()
a293e0dc14b28b3d3ad12d2ad8ca97d77cb7e0c3a874eac88fcc4c46adf1ca2c
ml4tp/tcoq
ftactic.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/engine/ftactic.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Focussing tactics * Type of tacti...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Proofview.Notations ty...
d09177f65a13835f3c34a5f92ab8ccfa0da9fdda6ff4ad67ec102142d658b4ba
nixeagle/cl-irc
clhs.lisp
$ Id$ ;;;; $Source$ clhs.lisp - an example IRC bot for net - nittin - irc clhs is an example IRC bot for net - nittin - irc . It runs on irc.freenode.net in the channels # lisp and # clhs ( preferred for ;;; testing). It responds to queries of the form "clhs symbol" for ;;; symbols in the spec, "clhs 3.1.2.1....
null
https://raw.githubusercontent.com/nixeagle/cl-irc/efaea15f2962107ea9b1a2fad5cd9db492b4247b/tags/init/example/clhs.lisp
lisp
$Source$ testing). It responds to queries of the form "clhs symbol" for symbols in the spec, "clhs 3.1.2.1.2.1" for sections, and "clhs format:A" for format control args. You will want to edit unpacked. You should also check out Mop_Sym.txt and put it in the directory where you will be running the bot from. To u...
$ Id$ clhs.lisp - an example IRC bot for net - nittin - irc clhs is an example IRC bot for net - nittin - irc . It runs on irc.freenode.net in the channels # lisp and # clhs ( preferred for * hyperspec - pathname * to point to where you have the HyperSpec " # channel1 " " # channel2 " " # " ... ) (defp...
faafb483e25637a428d5cd3e44c61def059da0545b54e54db164cf7a7631ec37
zyrolasting/polyglot
shared.rkt
#lang racket/base (provide (all-defined-out)) (require racket/class racket/dict racket/file racket/rerequire unlike-assets/logging "../../main.rkt") (define polyglot-class/cli-asserted (make-parameter #f)) (define (log-exn e) (define string-port (open-output-string)) ...
null
https://raw.githubusercontent.com/zyrolasting/polyglot/d27ca7fe90fd4ba2a6c5bcd921fce89e72d2c408/polyglot-lib/polyglot/private/cli/shared.rkt
racket
#lang racket/base (provide (all-defined-out)) (require racket/class racket/dict racket/file racket/rerequire unlike-assets/logging "../../main.rkt") (define polyglot-class/cli-asserted (make-parameter #f)) (define (log-exn e) (define string-port (open-output-string)) ...
bf2921048ec655cba552de29f50ab02e9baa8eedcb8ebee2e7cb29acee742d9e
nickzuber/lets-make-a-compiler
selectify.ml
open Ast open Ast.Select open Polyfill exception Incorrect_step of string exception Program_error of string let extra_variables : ((string, Ast.t) Hashtbl.t) = Hashtbl.create 53 (* Mapping of int to caller save registers. *) let int_to_callersave_register = Hashtbl.create 6 let _ = List.iter (fun (i, reg) -> Hashtbl...
null
https://raw.githubusercontent.com/nickzuber/lets-make-a-compiler/ee2337b116f07c1357f7b70bd09f1503e39fdc88/src/transformers/selectify.ml
ocaml
Mapping of int to caller save registers. 3st function argument Use a register. Note the ordering is important. Use stack. Treat as tag and indirect call later recall that `n` is already size_in_bytes from expose pass field + tag + len field + tag Not done, same as AND at the moment. if `collect` took...
open Ast open Ast.Select open Polyfill exception Incorrect_step of string exception Program_error of string let extra_variables : ((string, Ast.t) Hashtbl.t) = Hashtbl.create 53 let int_to_callersave_register = Hashtbl.create 6 let _ = List.iter (fun (i, reg) -> Hashtbl.add int_to_callersave_register i reg) 2st fu...
4b1c914f49ec31bdd4b142f5f2f28d35a143c9c24361311334a6baf4767d924d
JustusAdam/language-haskell
T0002.hs
SYNTAX TEST " source.haskell " " Comments in module exports " module Module -- <------ meta.declaration.module.haskell ( -- main func <- disable highlighting -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-dash.haskell foo -- ^^^ meta.declaration.exports.haskell entity.name.function.has...
null
https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tickets/T0002.hs
haskell
<------ meta.declaration.module.haskell main func <- disable highlighting ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-dash.haskell ^^^ meta.declaration.exports.haskell entity.name.function.haskell ^^^^^^^^^^^^ comment.block.haskell ^^^^^^^^^^^^ comment.block.haskell ^^^ meta.decla...
SYNTAX TEST " source.haskell " " Comments in module exports " module Module ( foo disable , too -} , bar, bar ^^^^ comment.block.haskell
7c6673f5edd5365c6039b7cf8a40415a0581cbd318985f97605baada2cfbc735
thi-ng/demos
shapes01.cljs
(ns ex01.shapes01 (:require [thi.ng.geom.core :as g] [thi.ng.geom.polygon :as poly] [thi.ng.geom.svg.core :as svg] [thi.ng.domus.core :as dom])) (enable-console-print!) (defn ^:export main [] (dom/create-dom! (svg/svg {:width 640 :height 480} (-> (poly/cog 0.5 20 [0.9 1 1 0.9 0.3]) ...
null
https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-11/day1/ex01/src/ex01/shapes01.cljs
clojure
(main)
(ns ex01.shapes01 (:require [thi.ng.geom.core :as g] [thi.ng.geom.polygon :as poly] [thi.ng.geom.svg.core :as svg] [thi.ng.domus.core :as dom])) (enable-console-print!) (defn ^:export main [] (dom/create-dom! (svg/svg {:width 640 :height 480} (-> (poly/cog 0.5 20 [0.9 1 1 0.9 0.3]) ...
6882e9bb5e04b3ca2749caa970633d64d0da0a4d3f3dea47ca8fd2218aeca4fa
dmitryvk/sbcl-win32-threads
char.lisp
;;;; x86-64 definition of character operations This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the public d...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/x86-64/char.lisp
lisp
x86-64 definition of character operations more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. moves and coercions Move a tagged char to an untagged representation. Move an untagged char to a t...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!VM") Space optimization : As the upper 32 bits of ( tagged or untagged ) characters are always zero man...
ce432daca8553ed57ec384ba37e62ac5c57f1d6928db28fe80bcddd83f661595
zkincaid/duet
test_cone.ml
open Srk open OUnit open Test_pervasives module QQMatrix = Linear.QQMatrix module QQVector = Linear.QQVector let suite = "Cone" >::: [ "simplex" >:: (fun () -> let generators = [| mk_vector [1; 1; 0]; mk_vector [-1; 0; 1]; mk_vector [0; 1; -1]; m...
null
https://raw.githubusercontent.com/zkincaid/duet/162d3da830f12ab8e8d51f7757cddcb49c4084ca/srk/test/test_cone.ml
ocaml
open Srk open OUnit open Test_pervasives module QQMatrix = Linear.QQMatrix module QQVector = Linear.QQVector let suite = "Cone" >::: [ "simplex" >:: (fun () -> let generators = [| mk_vector [1; 1; 0]; mk_vector [-1; 0; 1]; mk_vector [0; 1; -1]; m...
41448b82507729b90fc91d9dfda3d0f4d0b02d988b51887d3063b5fd40ab431e
footprintanalytics/footprint-web
constraints_test.clj
(ns metabase.query-processor.middleware.constraints-test (:require [clojure.test :refer :all] [metabase.query-processor.middleware.constraints :as qp.constraints] [metabase.test :as mt])) (defn- add-default-userland-constraints [query] (:pre (mt/test-qp-middleware qp.constraints/add-default...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/query_processor/middleware/constraints_test.clj
clojure
(ns metabase.query-processor.middleware.constraints-test (:require [clojure.test :refer :all] [metabase.query-processor.middleware.constraints :as qp.constraints] [metabase.test :as mt])) (defn- add-default-userland-constraints [query] (:pre (mt/test-qp-middleware qp.constraints/add-default...
fbcae9b8e5705dbf20bd204d61fedfc20d5327aad730619d39773eca42258a2e
CloudI/CloudI
hackney_headers.erl
%%% -*- erlang -*- %%% This file is part of released under the Apache 2 license . %%% See the NOTICE for more information. %%% Copyright ( c ) 2012 - 2014 < > Copyright ( c ) 2011 - 2013 , < > Copyright ( c ) 2011 , < > %% @doc module to manipulate HTTP headers -module(hackney_headers). -export([ne...
null
https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_hackney/src/hackney_headers.erl
erlang
-*- erlang -*- See the NOTICE for more information. @doc module to manipulate HTTP headers @doc initialise an header dict @doc extend the headers with a new list of `{Key, Value}' pair. convert the header to a list @doc get the value of the header @doc store the pair into the headers, replacing any pre-existi...
This file is part of released under the Apache 2 license . Copyright ( c ) 2012 - 2014 < > Copyright ( c ) 2011 - 2013 , < > Copyright ( c ) 2011 , < > -module(hackney_headers). -export([new/0, new/1, update/2, to_list/1, get_value/2, get_value/3, store/3, insert/3, insert/4, delete/2, ...
3f67a2a45d29d451bc3d30023f27bae05d050c2eb7ceb6702432ab63c8aa7ada
kitnil/dotfiles
deploy.scm
(list ;; (machine ;; (operating-system (load "ws2.wugi.info.scm")) ;; (environment managed-host-environment-type) ;; (configuration (machine-ssh-configuration ;; (host-name "172.16.103.226") ;; (system "x86_64-linux") ;; (user "ol...
null
https://raw.githubusercontent.com/kitnil/dotfiles/40828438c3830d4735c80cedfc11cd57b7e31916/dotfiles/guixsd/deploy.scm
scheme
(machine (operating-system (load "ws2.wugi.info.scm")) (environment managed-host-environment-type) (configuration (machine-ssh-configuration (host-name "172.16.103.226") (system "x86_64-linux") (user "oleg") (host-key "ssh-ed25519 AAAAC3NzaC...
(machine (operating-system (load "vm1.wugi.info.scm")) (environment managed-host-environment-type) (configuration (machine-ssh-configuration (host-name "78.108.82.44") (system "x86_64-linux") (user "oleg") ...
3a7dffc1329d32ee0436e0981b5e6cb399b0f3865ec661787f6565010ead6070
syallop/DHT
Command.hs
# LANGUAGE DataKinds , GADTs , , TypeFamilies , UndecidableInstances # DataKinds , GADTs , KindSignatures , TypeFamilies , UndecidableInstances #-} {-| Stability : experimental Model the commands a dht must be able to handle and issue. 'Commands' are singletons indexed by a unique...
null
https://raw.githubusercontent.com/syallop/DHT/a376cf5a423f50212cfd856dcf733eb5177fc00c/DHT/Protocol/Command.hs
haskell
| Stability : experimental Model the commands a dht must be able to handle and issue. 'Commands' are singletons indexed by a unique (c::CMD) type. Closed type functions determine for each cmd type: - Target: Either targeted at individual Address's or the DHT as a whole - In: Input to a command. - Out: Expected output...
# LANGUAGE DataKinds , GADTs , , TypeFamilies , UndecidableInstances # DataKinds , GADTs , KindSignatures , TypeFamilies , UndecidableInstances #-} module DHT.Protocol.Command ( CMD(PING,STORE,FINDVALUE,FINDCONTACT) , Command(Ping,Store,FindValue,FindContact) , Target ...
117889d08dedf33fa2ac5c826d1fccac3d90dff604933d6d24989db30b5faea5
damballa/abracad
edn_test.clj
(ns abracad.avro.edn-test (:require [clojure.test :refer :all] [abracad.avro :as avro] [abracad.avro.edn :as aedn]) (:import [clojure.lang PersistentQueue] [java.net InetAddress])) ;; Stress-test data from nippy ;; - (def stress-data {:bytes (byte-array [(byte 1) (byte ...
null
https://raw.githubusercontent.com/damballa/abracad/5c16564a86b6c83ddc17b3ac5aba5f69798ec269/test/abracad/avro/edn_test.clj
clojure
Stress-test data from nippy - Clojure 1.4+ tagged literals [TODO] :tagged-uuid (java.util.UUID/randomUUID) :tagged-date (java.util.Date.)
(ns abracad.avro.edn-test (:require [clojure.test :refer :all] [abracad.avro :as avro] [abracad.avro.edn :as aedn]) (:import [clojure.lang PersistentQueue] [java.net InetAddress])) (def stress-data {:bytes (byte-array [(byte 1) (byte 2) (byte 3)]) :nil nil ...
f879ccd95936f61f68b7fde7b1ff5be2c921d4f793efd1ea799242bb6e04a2cd
skanev/playground
06-tests.scm
(require rackunit rackunit/text-ui) (load-relative "../../support/eopl.scm") (load-relative "../06.scm") (load-relative "helpers/let.scm") (define eopl-3.06-tests (test-suite "Tests for EOPL exercise 3.06" (check-equal? (run "minus(-(minus(5), 9))") 14) (check-equal? (run "42") 42) (check-equal? (e...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/03/tests/06-tests.scm
scheme
(require rackunit rackunit/text-ui) (load-relative "../../support/eopl.scm") (load-relative "../06.scm") (load-relative "helpers/let.scm") (define eopl-3.06-tests (test-suite "Tests for EOPL exercise 3.06" (check-equal? (run "minus(-(minus(5), 9))") 14) (check-equal? (run "42") 42) (check-equal? (e...
604db477255c94908f9469c1d12341bc06b1b6aa4093c6c6b7baf6f73527ddaa
diagrams/diagrams-contrib
Constrained.hs
{-# LANGUAGE DeriveGeneric #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE Rank2Types #-} # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # ----------------------------------------------------------------------------- -- | -- Module : Diagrams.TwoD.Layout.Constr...
null
https://raw.githubusercontent.com/diagrams/diagrams-contrib/63f2aec4c070d1f558a5fcefd67b5315d64faaf5/src/Diagrams/TwoD/Layout/Constrained.hs
haskell
# LANGUAGE DeriveGeneric # # LANGUAGE Rank2Types # --------------------------------------------------------------------------- | Module : Diagrams.TwoD.Layout.Constrained License : BSD-style (see LICENSE) Maintainer : Lay out diagrams by specifying constraints. Currently, the API is fairl...
# LANGUAGE FlexibleContexts # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # Copyright : ( c ) 2015 > constrCircleSq = frame 0.2 $ layout $ do > c < - newDia ( circle 1 ) > s < - newDia ( square 2 ) Of course this is no different than just writing @c...
899288f1e83f8322ca5a6b9ea34b469656904f8caa1f94aec79e1158ed64bcb5
huiyaozheng/Mirage-zmq
config.ml
open Mirage let main = foreign ~packages:[package "mirage-zmq"] "Unikernel.Main" (stackv4 @-> job) let stack = generic_stackv4 default_network let () = register "xpub_unikernel" [ main $ stack ]
null
https://raw.githubusercontent.com/huiyaozheng/Mirage-zmq/af288a3378a7c357bd5646a3abf4fd5ae777369b/test/XPUB/unikernel/config.ml
ocaml
open Mirage let main = foreign ~packages:[package "mirage-zmq"] "Unikernel.Main" (stackv4 @-> job) let stack = generic_stackv4 default_network let () = register "xpub_unikernel" [ main $ stack ]
40cba84af7494dfccec5984698bf5289c58ab7d92172fac8ee0b0b816afa8822
janestreet/merlin-jst
typetexp.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/janestreet/merlin-jst/00f0a2c961fbf5a968125b33612d60224a573f40/src/ocaml/typing/typetexp.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Types val valid_tyvar_name : string -> bool type poly_univars val make_poly_univars : string list...
630e4eaa143e0af2eca504b34be833c3f2dbf9e6fd75fa087fe54c41a204b671
mauricioabreu/lang-studies
08-making-our-own-types-and-typeclasses.hs
- We are going to create some types for a deck of cards - The cards need to have an ordering , based on the standard ranking -card_deck#Rank_and_color - We are assuming Aces are high . - Therefore , the following statements should be true : - ( Card Ace Spades ) > ( Card King Spades ) - ( Card...
null
https://raw.githubusercontent.com/mauricioabreu/lang-studies/2ce0cacdf887fa80e2613869356a6bbd1765eb21/learn-you-a-haskell-exercises/08-making-our-own-types-and-typeclasses.hs
haskell
We should be able to provide a function which returns the higher ranked card: it works when comparing more complex values too (c1 > c2) It returns True for a "winning hand", depending on the rules for the type of class we are playing with Create a new Coin type
- We are going to create some types for a deck of cards - The cards need to have an ordering , based on the standard ranking -card_deck#Rank_and_color - We are assuming Aces are high . - Therefore , the following statements should be true : - ( Card Ace Spades ) > ( Card King Spades ) - ( Card...
a2d004423c990b455b7e57f54dbcadcfc1efb0f86aacc876855af9b03c3d1c99
jeromesimeon/Galax
optimization_rules_sbdo_automaton.ml
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/optimization/optimization_rules_sbdo_automaton.ml
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : optimization_rules_sbdo_automaton.ml , v 1.3 2007/02/01 22:08:51 simeon Exp $ Module : Optimization_rules_sbdo_automaton Description : This module implements the 3 automata that annotate the AST with DDO annotatio...
99dc32e9997c6a952b3fadb1493161df44fb89304c54fa9fc3a714957ed288a2
avsm/ocaml-lens
lens.mli
Copyright ( c ) 2011 - 2012 is hereby granted , free of charge , to any person obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , including without limitation the rights to use , copy , modify , merge , publis...
null
https://raw.githubusercontent.com/avsm/ocaml-lens/e39dc3529df572ae169a90ed5d2b217231ed9974/lens.mli
ocaml
* Lens type definition * Functional getter * Functional setter * Updates a value through a lens * {3 Combinators} * Gets a value from the state monad. * Puts a value in the state monad. * Modifies a value in the state monad. * Trivial lens * Identity lens * Gets/sets the tail of a list * Lens for a particula...
Copyright ( c ) 2011 - 2012 is hereby granted , free of charge , to any person obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , including without limitation the rights to use , copy , modify , merge , publis...
c6aaddd93d1739ad2eb8f79da490f17230ff152963cfe3c1b99152294528bda6
tweag/asterius
T5435.hs
# LANGUAGE ForeignFunctionInterface , CPP # import Foreign.C.String import Control.Monad import System.Environment import System.FilePath import Foreign.Ptr Type of paths is different on Windows #if defined(mingw32_HOST_OS) type PathString = CWString withPathString = withCWString #else type PathString = CString with...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/rts/T5435.hs
haskell
Mac OS X Mac OS X
# LANGUAGE ForeignFunctionInterface , CPP # import Foreign.C.String import Control.Monad import System.Environment import System.FilePath import Foreign.Ptr Type of paths is different on Windows #if defined(mingw32_HOST_OS) type PathString = CWString withPathString = withCWString #else type PathString = CString with...
61713aa3e7ef0e47b5393646b13223b2ef7bc603854d8fb629fba8476efe2bf7
andreypopp/type-systems
union_find.mli
(** Union find. *) open! Base type 'a t (** Represents a single element. Each element belongs to an equivalence class and each equivalence class has a value of type ['a] assocated with it. *) val make : 'a -> 'a t (** [make v] creates a new equivalence class consisting of a single element which is retur...
null
https://raw.githubusercontent.com/andreypopp/type-systems/f323f28d086f7fa782bb1f01433940984733dd05/hmx_tc/union_find.mli
ocaml
* Union find. * Represents a single element. Each element belongs to an equivalence class and each equivalence class has a value of type ['a] assocated with it. * [make v] creates a new equivalence class consisting of a single element which is returned to the caller. The value [v] is assocated w...
open! Base type 'a t val make : 'a -> 'a t val value : 'a t -> 'a val union : f:('a -> 'a -> 'a) -> 'a t -> 'a t -> unit val link : target:'a t -> 'a t -> unit val equal : 'a t -> 'a t -> bool val sexp_of_t : ('a -> Sexp.t) -> 'a t -> Sexp.t
2bf00308b750e2682fb851ff223a8b36d0efdc40beadf455f56f078be4990b1c
tatut/specql
jdbc.clj
(ns specql.impl.jdbc "JDBC extensions" (:require [clojure.java.jdbc :as jdbc])) ;; Extend java.util.Date to be a SQL timestamp parameter (extend-protocol jdbc/ISQLValue java.util.Date (sql-value [dt] (java.sql.Timestamp. (.getTime dt))))
null
https://raw.githubusercontent.com/tatut/specql/33870ddc22cac4be9084956f899576a67030f434/src/specql/impl/jdbc.clj
clojure
Extend java.util.Date to be a SQL timestamp parameter
(ns specql.impl.jdbc "JDBC extensions" (:require [clojure.java.jdbc :as jdbc])) (extend-protocol jdbc/ISQLValue java.util.Date (sql-value [dt] (java.sql.Timestamp. (.getTime dt))))
b64315b9eb782c736f656b29a837b2ee8ff5e100c739195aca10f39d38de7853
braveclojure/cftbat-code
profiles.clj
{:user {:plugins [[cider/cider-nrepl "0.8.1"]]}}
null
https://raw.githubusercontent.com/braveclojure/cftbat-code/006fbe19c8ef9a3db66c458991fb613e5824ee7f/02/profiles.clj
clojure
{:user {:plugins [[cider/cider-nrepl "0.8.1"]]}}
98e70134d294888b6fff60f6d3aabaf1265ffd48baf83dc1e9a27807adda8114
nubank/k8s-api
client_test.clj
(ns kubernetes-api.internals.client-test (:require [clojure.test :refer :all] [kubernetes-api.internals.client :as internals.client] [matcher-combinators.matchers :as m])) (deftest pascal-case-routes-test (is (= {:handlers [{:route-name :FooBar} {:route-name :DuDuduEdu}...
null
https://raw.githubusercontent.com/nubank/k8s-api/5d8fb2e3ef789222f98092d48af454d297a41bc7/test/kubernetes_api/internals/client_test.clj
clojure
(ns kubernetes-api.internals.client-test (:require [clojure.test :refer :all] [kubernetes-api.internals.client :as internals.client] [matcher-combinators.matchers :as m])) (deftest pascal-case-routes-test (is (= {:handlers [{:route-name :FooBar} {:route-name :DuDuduEdu}...
587307c14a3ce4f95cb9230636012b5a1eba0eb3f8d7c6947e1d33c6974d8cc4
Javran/unicode-general-category
Database.hs
# LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE MultiWayIf #-} # LANGUAGE NumericUnderscores # {-# LANGUAGE OverloadedStrings #-} module Data.Char.GeneralCategory.Database ( genCatLitTable , mkDatabaseFromUnicodeData , GenCatDatabase , query , checkDatabase , checkDatabase' ) where import Control.M...
null
https://raw.githubusercontent.com/Javran/unicode-general-category/754d53dfda54cdf8b1159e30d6949ffd623c8900/src/Data/Char/GeneralCategory/Database.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | General category database. Conceptually this is a sorted array of ascending, non-overlapping inclusive codepoint ranges, Internally every element is packed into 'Word64', for the least significant bits: * @0-23@ bits represent the low codepoint range ...
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE NumericUnderscores # module Data.Char.GeneralCategory.Database ( genCatLitTable , mkDatabaseFromUnicodeData , GenCatDatabase , query , checkDatabase , checkDatabase' ) where import Control.Monad import qualified Data.Array.Unboxed as A import Data.Bifun...
ec6bfa0712bd622580c84bd68de22f34a153917dcb24567f3843d3609801a7c6
TristanCacqueray/haskell-butler
SoundTest.hs
module Butler.App.SoundTest (soundTestApp) where import Codec.EBML qualified as EBML import Data.ByteString qualified as BS import UnliftIO.Process qualified as Process import Butler import Butler.App.SoundBlaster import Butler.Core.Logger import Butler.Display.Session data TestState = Pending | DelayPlaybac...
null
https://raw.githubusercontent.com/TristanCacqueray/haskell-butler/1c4f00c0f7539ac08d25bd07eb34b79af09e7f0f/src/Butler/App/SoundTest.hs
haskell
module Butler.App.SoundTest (soundTestApp) where import Codec.EBML qualified as EBML import Data.ByteString qualified as BS import UnliftIO.Process qualified as Process import Butler import Butler.App.SoundBlaster import Butler.Core.Logger import Butler.Display.Session data TestState = Pending | DelayPlaybac...
917a4777debdef8713ee7b177467b951d421367e832a94bb3443b54ddcc25591
cedlemo/OCaml-GLib2
test_date_time.ml
* Copyright 2018 , * This file is part of . * * OCaml - GLib2 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 3 of the License , or * any later version . * * ...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GLib2/084a148faa4f18d0ddf78315d57c1d623aa9522c/tests/test_date_time.ml
ocaml
* Copyright 2018 , * This file is part of . * * OCaml - GLib2 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 3 of the License , or * any later version . * * ...
dbdc0941c9739a2e16773b5fc2fc1ce92e7ebe32a80e27a3b58c68cd4da5abcf
lehins/massiv
Common.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # -- | -- Module : Data...
null
https://raw.githubusercontent.com/lehins/massiv/c8aaf29d02eab535f13aa03949fca58fce6d6384/massiv/src/Data/Massiv/Core/Common.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE ConstraintKinds # | Module : Data.Massiv.Core.Common License : BSD3 Stability : experimental Portability : non-portable * Size * Indexing * Common Operations * Exceptions * Stateful Monads | The array family. Representations @r@ describe how data is arranged or...
# LANGUAGE CPP # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # Copyright : ( c ) 2018 - 2022 Maintainer : < > module Data.Massiv.Core.Comm...
61196d615478a801b9bda8e4e3a28a7b5cb6ded90aad0c53415c811d9ef36ab0
Gbury/ocaml-memgraph
example.ml
let empty = [] let int_list = [ 1 ; 2 ; 3 ] let float_list = [ 1. ; 2. ; 3. ] let l = [42] let l1 = 1::2::l let l2 = 3::4::l let rec cyclic = 1 :: 2 :: 3 :: cyclic let () = Memgraph.Repr.(context (fun ctx -> Memgraph.Dot.print_list Format.std_formatter [ "[]", ctx.mk empty; "[1;2;3]", ctx.mk...
null
https://raw.githubusercontent.com/Gbury/ocaml-memgraph/017f41ef8439144c5071ece0de9c80266589efb2/examples/list/example.ml
ocaml
let empty = [] let int_list = [ 1 ; 2 ; 3 ] let float_list = [ 1. ; 2. ; 3. ] let l = [42] let l1 = 1::2::l let l2 = 3::4::l let rec cyclic = 1 :: 2 :: 3 :: cyclic let () = Memgraph.Repr.(context (fun ctx -> Memgraph.Dot.print_list Format.std_formatter [ "[]", ctx.mk empty; "[1;2;3]", ctx.mk...
6aa658ec25a2894a9add972d3455e37be201cfbc5f2a490acd2026195149f24b
replikativ/datahike
gc_test.cljc
(ns datahike.test.gc-test (:require #?(:cljs [cljs.test :as t :refer-macros [is deftest testing]] :clj [clojure.test :as t :refer [is deftest testing]]) [clojure.set :as set] [superv.async :refer [<?? S]] [datahike.api :as d] [datahike.index.interface :refer [-mark]] [datahike.experimental.gc...
null
https://raw.githubusercontent.com/replikativ/datahike/11adbebec45077de1c17a304ad08b914f1a80a95/test/datahike/test/gc_test.cljc
clojure
everything will fit into the root nodes of each index here :branches + :db + cid + roots create a branch transact on each record before-date for gc transact transact again merge back gc
(ns datahike.test.gc-test (:require #?(:cljs [cljs.test :as t :refer-macros [is deftest testing]] :clj [clojure.test :as t :refer [is deftest testing]]) [clojure.set :as set] [superv.async :refer [<?? S]] [datahike.api :as d] [datahike.index.interface :refer [-mark]] [datahike.experimental.gc...
ab1134560884bf776b2de8943ebb6eb8dbdefc82576a7600b39a12ecdfafb73d
markmandel/brute-play-pong
scoring.clj
(ns ^{:doc "Manages scoring of the game. Also recreates balls when they go out of bounds"} brute-play-pong.scoring (:use [play-clj.core] [play-clj.math]) (:require [brute.entity :as e] [brute-play-pong.ball :as b]) (:import [brute_play_pong.component Ball Rectangle Score PlayerSc...
null
https://raw.githubusercontent.com/markmandel/brute-play-pong/f10c7939e867f913cb35e4155768975fa0f93060/desktop/src-common/brute_play_pong/scoring.clj
clojure
(ns ^{:doc "Manages scoring of the game. Also recreates balls when they go out of bounds"} brute-play-pong.scoring (:use [play-clj.core] [play-clj.math]) (:require [brute.entity :as e] [brute-play-pong.ball :as b]) (:import [brute_play_pong.component Ball Rectangle Score PlayerSc...
ca9d58f8881463a2fe6222ca75c51912d5b951aab4bfd32bba93e1dee2cf9588
jellelicht/guix
gdb.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2014 , 2015 < > Copyright © 2015 < > Copyright © 2015 , 2016 < > ;;; ;;; 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 Public License as ...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/gdb.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 © 2013 , 2014 , 2015 < > Copyright © 2015 < > Copyright © 2015 , 2016 < > 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 packages gdb) #:us...
adef00fa54d7be0efb33938507f487471638cb343c0c0a76673571c8e784741f
clojure-link/link
threads_test.clj
(ns link.threads-test (:require [clojure.test :refer :all] [link.threads :refer :all])) (deftest test-thread-factory (testing "the generated thread name should starts with fixed prefix" (let [tf (prefix-thread-factory "link") t (.newThread tf (fn []))] (is (= "link-1" (.getName t)))...
null
https://raw.githubusercontent.com/clojure-link/link/2b6f6abe70edfade738c7391d38c5b509c798a40/test/link/threads_test.clj
clojure
(ns link.threads-test (:require [clojure.test :refer :all] [link.threads :refer :all])) (deftest test-thread-factory (testing "the generated thread name should starts with fixed prefix" (let [tf (prefix-thread-factory "link") t (.newThread tf (fn []))] (is (= "link-1" (.getName t)))...
6b78b8144e0cb67bdd903b3530c972aa48ac0fa87c2bf851fa57a610c7b946f5
lukeg101/lplzoo
Main.hs
module Main where import Repl Mu Calc Repl main :: IO () main = replMain
null
https://raw.githubusercontent.com/lukeg101/lplzoo/463ca93f22f018ee07bdc18d84b3b0c966d51766/Mu/Main.hs
haskell
module Main where import Repl Mu Calc Repl main :: IO () main = replMain
10418677b8914cb1b553336da4992aa1b56afd72833e886cc0594e136c070dc0
Tatsuki-I/Vihs
ParseCmdSpec.hs
module ParseCmdSpec (spec) where import ParseCmd import Test.Hspec spec :: Spec spec = describe "setCmd" $ do it "standard" $ setCmd "w test.txt" `shouldBe` Command {addr = Nothing, cmdName = 'w', param = Just "test.txt"} it "standard...
null
https://raw.githubusercontent.com/Tatsuki-I/Vihs/18543d0e2d2970d28a72674d5c502384bb41d98d/test/ParseCmdSpec.hs
haskell
module ParseCmdSpec (spec) where import ParseCmd import Test.Hspec spec :: Spec spec = describe "setCmd" $ do it "standard" $ setCmd "w test.txt" `shouldBe` Command {addr = Nothing, cmdName = 'w', param = Just "test.txt"} it "standard...
dbe6f77dc08eff036fef50c8dbc9d0b2151dbf4bad6087faa75693b586d5c6f8
avsm/eeww
lintapidiff.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/avsm/eeww/23ca8b36127b337512e13c6fb8e86b3a7254d4f9/boot/ocaml/tools/lintapidiff.mli
ocaml
************************************************************************ OCaml ...
, Tarides , Paris Copyright 2022 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the
0b9b473e26e86cef8da47fda739164ad63489737927da3545ad404a805e10d44
eglaysher/rldev
optpp.mli
Copyright ( C ) 2006 Haeleth ; based on code copyright ( C ) 2000 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 l...
null
https://raw.githubusercontent.com/eglaysher/rldev/e59103b165e1c20bd940942405b2eee767933c96/src/common/optpp.mli
ocaml
Application information Option definition structures sets the given reference to the given value sets the given reference to the argument's value, but only once, optionally transforming it with op first; the other parameter is the value's name, used in warning messages. Option parsing Pretty-printi...
Copyright ( C ) 2006 Haeleth ; based on code copyright ( C ) 2000 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 l...
d2ea755dba737e86e72dae61cec21a91cbb98bd5f455510aa3ff5de9a1c0b0a4
aryx/yacfe
file_type.mli
type file_type = | PL of pl_type | Obj of string | Binary of string | Text of string | Doc of string | Media of media_type | Archive of string | Other of string and pl_type = | ML of string | Haskell of string | Lisp of lisp_type | Prolog of string | Makefile | Script of string | C of strin...
null
https://raw.githubusercontent.com/aryx/yacfe/86a4994822abca03ec9e03f1a7e60eca66db0a08/commons/file_type.mli
ocaml
specialisations val string_of_pl: pl_kind -> string
type file_type = | PL of pl_type | Obj of string | Binary of string | Text of string | Doc of string | Media of media_type | Archive of string | Other of string and pl_type = | ML of string | Haskell of string | Lisp of lisp_type | Prolog of string | Makefile | Script of string | C of strin...
f2e58a4e15c3c834e84fc67235e4871b934ee4c8ddb8ffa568be0aa96dd252bb
mstepniowski/project-euler
euler_055.clj
Solution to Project Euler problem 55 ;; ;; If we take 47 , reverse and add , 47 + 74 = 121 , which is palindromic . ;; ;; Not all numbers produce palindromes so quickly. For example, ;; 349 + 943 = 1292 , 1292 + 2921 = 4213 4213 + 3124 = 7337 ;; That is , 349 took three iterations to arrive at a palindrome...
null
https://raw.githubusercontent.com/mstepniowski/project-euler/01d64aa46b21d96fc5291fdf216bf4bad8249029/src/com/stepniowski/euler_055.clj
clojure
Not all numbers produce palindromes so quickly. For example, Although no one has proved it yet, it is thought that some numbers, number. Due to the theoretical nature of these numbers, and for the until proven otherwise. In addition you are given that for every computing power that exists, has managed so fa...
Solution to Project Euler problem 55 If we take 47 , reverse and add , 47 + 74 = 121 , which is palindromic . 349 + 943 = 1292 , 1292 + 2921 = 4213 4213 + 3124 = 7337 That is , 349 took three iterations to arrive at a palindrome . like 196 , never produce a palindrome . A number that never forms a palin...
f6ff50bcb8394abd97f99a7dbc7f0fcddda2f0fb2de070aaee37f80cb85062aa
probcomp/haskell-trace-types
Main.hs
# LANGUAGE DataKinds , GADTs , KindSignatures , TypeFamilies , TypeOperators , TypeApplications , ScopedTypeVariables , MultiParamTypeClasses , OverloadedLabels , InstanceSigs , FlexibleContexts , AllowAmbiguousTypes , FlexibleInstances , RankNTypes , UndecidableInstances , ConstraintKinds , OverlappingInstances , Type...
null
https://raw.githubusercontent.com/probcomp/haskell-trace-types/d7b209a61f31f6d77d3e285716abe1d96244e1ae/app/Main.hs
haskell
# LANGUAGE DataKinds , GADTs , KindSignatures , TypeFamilies , TypeOperators , TypeApplications , ScopedTypeVariables , MultiParamTypeClasses , OverloadedLabels , InstanceSigs , FlexibleContexts , AllowAmbiguousTypes , FlexibleInstances , RankNTypes , UndecidableInstances , ConstraintKinds , OverlappingInstances , Type...
3bbd8813d9929bec235c6c87118c1e197828f1cf7683e768a1bb1e7153486f35
emedia-project/paris
tiny_blog.erl
-module(tiny_blog). -export([start/0]). start() -> {ok, _} = application:ensure_all_started(lager), {ok, _} = application:ensure_all_started(cowboy), ok = application:start(mimetypes), ok = application:start(tiny_blog), {ok, Conn} = texas:start(), ok = paris:set(db, Conn).
null
https://raw.githubusercontent.com/emedia-project/paris/7ba24bcb76f8ab31b78d49e1a9f9c7643bfca80c/examples/tiny_blog/apps/tiny_blog/src/tiny_blog.erl
erlang
-module(tiny_blog). -export([start/0]). start() -> {ok, _} = application:ensure_all_started(lager), {ok, _} = application:ensure_all_started(cowboy), ok = application:start(mimetypes), ok = application:start(tiny_blog), {ok, Conn} = texas:start(), ok = paris:set(db, Conn).
f3951cc328f6683bb91bfafc55ab7b5109c92d66d8728d66ce37898a0ae96868
openbadgefactory/salava
block.cljs
(ns salava.profile.ui.block (:require [salava.core.ui.helper :refer [base-path path-for plugin-fun hyperlink navigate-to]] [reagent.core :refer [atom cursor]] [salava.core.ui.ajax-utils :as ajax] [reagent.session :as session] [salava.core.i18n :as i18n :refer [t]] ...
null
https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/profile/ui/block.cljs
clojure
(str completion_percentage "% " (t :profile/Complete))] {:style {:margin "10px 0" :font-size "14px"}}
(ns salava.profile.ui.block (:require [salava.core.ui.helper :refer [base-path path-for plugin-fun hyperlink navigate-to]] [reagent.core :refer [atom cursor]] [salava.core.ui.ajax-utils :as ajax] [reagent.session :as session] [salava.core.i18n :as i18n :refer [t]] ...
aee4571447a36d674b2f3e72e9ced5bbd132a494fcacc4ae0a68781ea518fd9c
ocaml-multicore/eio
eio.mli
* Effects based parallel IO for OCaml . Eio provides support for concurrency ( juggling many tasks ) and parallelism ( using multiple CPU cores for performance ) . It provides facilities for creating and coordinating fibers ( light - weight threads ) and domains ( for parallel processing ) , a...
null
https://raw.githubusercontent.com/ocaml-multicore/eio/388f90689fa6136815ada7d07948d3dc1b134d8f/lib_eio/eio.mli
ocaml
* Grouping fibers and other resources so they can be turned off together. * A promise is a placeholder for result that will arrive in the future. * A fiber is a light-weight thread. */* */* * A counting semaphore. * Mutual exclusion. * Waiting for a condition to become true. * A stream/queue. * Cancelling fibers...
* Effects based parallel IO for OCaml . Eio provides support for concurrency ( juggling many tasks ) and parallelism ( using multiple CPU cores for performance ) . It provides facilities for creating and coordinating fibers ( light - weight threads ) and domains ( for parallel processing ) , a...
09710c024b5c8c4ce195db3c102649cc5d3eb781823480b3ec9d0d03b90f784b
casperschipper/ocaml-cisp
cisp2.ml
open Cisp open Midi open Seq simple mod of controller 1 onto pitch let sr = ref 44100.0 type data = {c1: int; p: pitch; c2: int} let currentState = ref {c1= 0; p= Pitch 0; c2= 0} let pitchControl3 = let ( let* ) x f = Reader.bind f x in let* (MidiVal ctrl1) = MidiState.getControlR (MidiCh 0) (MidiCtrl 3) in ...
null
https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/drums/cisp2.ml
ocaml
create trigger from note On write state ref this maps midi input msg to an output msg (raw midi) take msg, make it a state run a bunch of readers to extract properties turn back into raw midi
open Cisp open Midi open Seq simple mod of controller 1 onto pitch let sr = ref 44100.0 type data = {c1: int; p: pitch; c2: int} let currentState = ref {c1= 0; p= Pitch 0; c2= 0} let pitchControl3 = let ( let* ) x f = Reader.bind f x in let* (MidiVal ctrl1) = MidiState.getControlR (MidiCh 0) (MidiCtrl 3) in ...
eff88892aa80bef694f8a4547b82081ca4153fe8889962a0be8f6a47f02aeff3
rabbitmq/aten
aten_sink.erl
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 /. %% Copyright ( c ) 2018 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% -module(aten_sink). -behaviour(gen_server). -inc...
null
https://raw.githubusercontent.com/rabbitmq/aten/2ddc9d4b0164207ded0b5b1643c078401b4684be/src/aten_sink.erl
erlang
API functions gen_server callbacks aten_sink =================================================================== API functions =================================================================== =================================================================== gen_server callbacks =============================...
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 /. Copyright ( c ) 2018 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(aten_sink). -behaviour(gen_server). -include_l...
9caa3910d3d4edb14681482fd5c4ed0427cb4aec83d984dd16ba8547b43f4491
ml-in-barcelona/jsoo-react
dom.mli
[@@@js.stop] type dom_element = Js_of_ocaml.Dom_html.element Js_of_ocaml.Js.t val dom_element_to_js : dom_element -> Ojs.t val dom_element_of_js : Ojs.t -> dom_element [@@@js.start] [@@@js.implem type dom_element = Js_of_ocaml.Dom_html.element Js_of_ocaml.Js.t external dom_element_to_js : dom_element -> Ojs.t = "%...
null
https://raw.githubusercontent.com/ml-in-barcelona/jsoo-react/40bc0c2cae95a0b00b123bad568d4f916a5490d2/lib/dom.mli
ocaml
[@@@js.stop] type dom_element = Js_of_ocaml.Dom_html.element Js_of_ocaml.Js.t val dom_element_to_js : dom_element -> Ojs.t val dom_element_of_js : Ojs.t -> dom_element [@@@js.start] [@@@js.implem type dom_element = Js_of_ocaml.Dom_html.element Js_of_ocaml.Js.t external dom_element_to_js : dom_element -> Ojs.t = "%...
1dd8e46a33a0546d4f57d601fd75567e8b87f22d0132d354c48397b219efa466
static-analysis-engineering/codehawk
bCHPowerAssemblyInstruction.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/d2e83cef7430defdc4cf30fc1495fe4ff64d9f9d/CodeHawk/CHB/bchlibpower32/bCHPowerAssemblyInstruction.mli
ocaml
bchlib bchlibpower32 is_vle
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
2162c5ae3adc92cd572b7b78625039b4e6f2cf2ea500f66755e06852404202f0
JanHenryNystrom/jhn_stdlib
lazy.erl
%%============================================================================== Copyright 2013 - 2021 Jan < > %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% U...
null
https://raw.githubusercontent.com/JanHenryNystrom/jhn_stdlib/ffe3d8a58db28a4b0e270597fef7aa599dff9647/src/lazy.erl
erlang
============================================================================== 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 ex...
Copyright 2013 - 2021 Jan < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , The library provides the functions create/1 and create/2 to create Several utility functions are provided to construct new LazyData . O...
cd268be6d6ac4a5ed1257f19669ffcb47c28558a601915de911227d6f7d09064
colis-anr/morsmall
generator.mli
(******************************************************************************) (* *) (* Morsmall *) (* A concise AST for POSIX shell ...
null
https://raw.githubusercontent.com/colis-anr/morsmall/33cd42984f421e5da8414e18059dcef276f0593b/tests/generator.mli
ocaml
**************************************************************************** Morsmall A concise AST for POSIX shell ...
Copyright ( C ) 2017 , , it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License type parameters = { depth : int } val ...
b32729e9cc9a1b7ce800122df04deb7f112f3d92f9552cb93df1a43190833a04
haskell-compat/base-compat
Batteries.hs
{-# LANGUAGE PackageImports #-} # OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports # -- | Reexports "Data.Functor.Compat" -- from a globally unique namespace. module Data.Functor.Compat.Repl.Batteries ( module Data.Functor.Compat ) where import "this" Data.Functor.Compat
null
https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat-batteries/src/Data/Functor/Compat/Repl/Batteries.hs
haskell
# LANGUAGE PackageImports # | Reexports "Data.Functor.Compat" from a globally unique namespace.
# OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports # module Data.Functor.Compat.Repl.Batteries ( module Data.Functor.Compat ) where import "this" Data.Functor.Compat
c6d4180e9d50e5b15b14f4ac329652a3d0df429c8ac4e25287df1de851d287cf
dharrigan/startrek
platform.clj
(ns startrek.shared.utils.platform {:author "David Harrigan"} (:require [clojure.java.io :as io])) (set! *warn-on-reflection* true) (defn version [] (if-let [version (io/resource "version.txt")] (slurp version) "0.0.1"))
null
https://raw.githubusercontent.com/dharrigan/startrek/a91caa3f504ffea502b79cfd29d0499574aaced6/src/startrek/shared/utils/platform.clj
clojure
(ns startrek.shared.utils.platform {:author "David Harrigan"} (:require [clojure.java.io :as io])) (set! *warn-on-reflection* true) (defn version [] (if-let [version (io/resource "version.txt")] (slurp version) "0.0.1"))
4ea8c91508f8188cff6dd6e66794b9b6540224b41581b55c32598ff6777de1e4
jackfirth/resyntax
refactoring-test-parser.rkt
#lang brag refactoring-test: refactoring-test-import* refactoring-test-header? refactoring-test-case* refactoring-test-import: /REQUIRE-KEYWORD IDENTIFIER IDENTIFIER refactoring-test-header: /HEADER-KEYWORD CODE-BLOCK refactoring-test-case: /TEST-KEYWORD STRING-LITERAL CODE-BLOCK+
null
https://raw.githubusercontent.com/jackfirth/resyntax/7fc36a29268f1210efa840c587881ad3fb4286e5/testing/refactoring-test-parser.rkt
racket
#lang brag refactoring-test: refactoring-test-import* refactoring-test-header? refactoring-test-case* refactoring-test-import: /REQUIRE-KEYWORD IDENTIFIER IDENTIFIER refactoring-test-header: /HEADER-KEYWORD CODE-BLOCK refactoring-test-case: /TEST-KEYWORD STRING-LITERAL CODE-BLOCK+
c66162b85143332a9d5fd1b41ecd0e28d919e54f1716cec4b90cd010df100b47
quil/quil-examples
14_hundred_noisy_spirals.clj
(ns quil-sketches.gen-art.14-hundred-noisy-spirals (:require [quil.core :refer :all] [quil.helpers.drawing :refer [line-join-points]] [quil.helpers.seqs :refer [range-incl steps]] [quil.helpers.calc :refer [mul-add]])) ;; Example 14 - 100 Noisy Spirals ;; Taken from Listing 4.4, p...
null
https://raw.githubusercontent.com/quil/quil-examples/9ff9d5578d93682af29d9a080b917a19f8deafc8/src/quil_sketches/gen_art/14_hundred_noisy_spirals.clj
clojure
Example 14 - 100 Noisy Spirals Taken from Listing 4.4, p71 void setup() { size(500,300); strokeWeight(0.5); smooth(); float x, y; i<100 ; i++ ) { float lastx = -999; float lasty = -999; float radiusNoise = random(10); int startangle = int(random(360)); ang < = endangle ; ang ...
(ns quil-sketches.gen-art.14-hundred-noisy-spirals (:require [quil.core :refer :all] [quil.helpers.drawing :refer [line-join-points]] [quil.helpers.seqs :refer [range-incl steps]] [quil.helpers.calc :refer [mul-add]])) (defn setup [] (background 255) (stroke-weight 0.5) ...
427b8662803eb82006dc3ce940752f9f398942d5da25c9d51967abb78969a4db
racket/typed-racket
tooltip-tests.rkt
#lang racket/base Tests for Typed Racket tooltips that are normally displayed in . ;; These tests capture those results by listening to a logger and checks that ;; certain types are recorded at the right locations. (require "test-utils.rkt" racket/list racket/match rackunit (for...
null
https://raw.githubusercontent.com/racket/typed-racket/0236151e3b95d6d39276353cb5005197843e16e4/typed-racket-test/unit-tests/tooltip-tests.rkt
racket
These tests capture those results by listening to a logger and checks that certain types are recorded at the right locations. This checks the given predicate on the tooltip vectors and will also turn debug? on to print the tooltip types and locations ensures there are no duplicate type tooltips for a single syntax...
#lang racket/base Tests for Typed Racket tooltips that are normally displayed in . (require "test-utils.rkt" racket/list racket/match rackunit (for-syntax racket/base)) (provide tests) (gen-test-main) (define-for-syntax debug? #f) (define-syntax (debug stx) (syntax-case stx ...
7e6ba5b21b41b35856e5f0db245ec6a0187fe0687a35b0ff3667532b6ad4847b
kit-clj/demo-guestbook
build.clj
(ns build (:require [clojure.string :as string] [clojure.tools.build.api :as b] [deps-deploy.deps-deploy :as deploy] [clojure.java.shell :refer [sh]])) (defn build-cljs [] (println "npx shadow-cljs release app...") (let [{:keys [exit], :as s} (sh "npx" "shadow-cljs" "release" "app")] (...
null
https://raw.githubusercontent.com/kit-clj/demo-guestbook/61aab45a40f79751f0e80471ac2d8f5466b696df/build.clj
clojure
(ns build (:require [clojure.string :as string] [clojure.tools.build.api :as b] [deps-deploy.deps-deploy :as deploy] [clojure.java.shell :refer [sh]])) (defn build-cljs [] (println "npx shadow-cljs release app...") (let [{:keys [exit], :as s} (sh "npx" "shadow-cljs" "release" "app")] (...
4de7a50ffee8483a3f4a989aedf5ae7dea9fefba2394bf7dce7cbe2a2fc05b8b
SonarQubeCommunity/sonar-erlang
export_one_function_per_line.erl
-module(export_one_function_per_line). -export([start/0, start/2]). %Good -export([stop/0, kill/0]). %not good -export([log/2, %good log/3, %not good list/2, %good update/2, refresh/2 %not good ]). hello(A) -> {world, A}.
null
https://raw.githubusercontent.com/SonarQubeCommunity/sonar-erlang/279eb7ccd84787c1c0cfd34b9a07981eb20183e3/erlang-checks/src/test/resources/checks/export_one_function_per_line.erl
erlang
Good not good good not good good not good
-module(export_one_function_per_line). ]). hello(A) -> {world, A}.
153f3e3364dea4f83a406899a8babe0803c31bc004fbe1e1afd2aaeff805f475
ympbyc/shortblog
core.lisp
;; super tiny blog engine Minori Yamashita 2021 (defpackage :miniblog (:use #:CL #:uiop #:ppcre) (:export :make-post :post :add-media :show-posts :generate-thumbnails :save-html)) (require 'plump) (require 'clss) (load "lib/html.lisp") (in-package :miniblog) (defparameter *blog-home* "~/Work/miniblog") (defp...
null
https://raw.githubusercontent.com/ympbyc/shortblog/7104413ffd2265d3c3b344b90f484b4ae649ddef/core.lisp
lisp
super tiny blog engine ogp process new files only CLI interface
Minori Yamashita 2021 (defpackage :miniblog (:use #:CL #:uiop #:ppcre) (:export :make-post :post :add-media :show-posts :generate-thumbnails :save-html)) (require 'plump) (require 'clss) (load "lib/html.lisp") (in-package :miniblog) (defparameter *blog-home* "~/Work/miniblog") (defparameter *blog-title* "NO...
298f8d29ed9feb822da460eefe163995d6a8b6b2e39f34416dc9d2618e713ce8
zinid/conf
runtime_tools_yaml.erl
%%%------------------------------------------------------------------- @author < > %%% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% 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...
null
https://raw.githubusercontent.com/zinid/conf/8f6b94df3584f63fbc6b241ac4ea0740a2e658fb/src/runtime_tools_yaml.erl
erlang
------------------------------------------------------------------- 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 o...
@author < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(runtime_tools_yaml). -behaviour(conf). -export([validator/0]). -import(yval, [beam/1, options/2]). -spec validator() -> yval:validator(). validator()...
67faefe575f3e32e0167799027e7706ca252b831aafcde7a54ec3bc5cf044e07
BillHallahan/G2
PropTakeRep.hs
module TakeRep (prop_take_rep) where import Prelude hiding (length, take, replicate) @ prop_take_rep : : n : Nat - > { k : Int | k > = n } - > Int - > { v : | v } @ prop_take_rep :: Int -> Int -> Int -> Bool prop_take_rep n k x = length (take n (replicate k x)) == n length :: [a] -> Int length [] = 0 length (x:xs...
null
https://raw.githubusercontent.com/BillHallahan/G2/ac1169429b3fabe12db919e266514cc8123fa173/tests/LiquidInf/Paper/Eval/Prop_LIA_Invented/PropTakeRep.hs
haskell
@ die :: {v:String | false} -> a @ @ LIQUID "--no-termination" @
module TakeRep (prop_take_rep) where import Prelude hiding (length, take, replicate) @ prop_take_rep : : n : Nat - > { k : Int | k > = n } - > Int - > { v : | v } @ prop_take_rep :: Int -> Int -> Int -> Bool prop_take_rep n k x = length (take n (replicate k x)) == n length :: [a] -> Int length [] = 0 length (x:xs...
062f9ea375501ebb3fea087a9fc075688f5e9453616568cb1617746e8e9e0996
DavidAlphaFox/RabbitMQ
http_handler_set_resp.erl
%% Feel free to use, reuse and abuse the code in this file. -module(http_handler_set_resp). -behaviour(cowboy_http_handler). -export([init/3, handle/2, terminate/2]). init({_Transport, http}, Req, Opts) -> Headers = proplists:get_value(headers, Opts, []), Body = proplists:get_value(body, Opts, <<"http_handler_set_r...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/cowboy-wrapper/cowboy-git/test/http_handler_set_resp.erl
erlang
Feel free to use, reuse and abuse the code in this file.
-module(http_handler_set_resp). -behaviour(cowboy_http_handler). -export([init/3, handle/2, terminate/2]). init({_Transport, http}, Req, Opts) -> Headers = proplists:get_value(headers, Opts, []), Body = proplists:get_value(body, Opts, <<"http_handler_set_resp">>), {ok, Req2} = lists:foldl(fun({Name, Value}, {ok, R...
28cb0460b5eb1ac55a45a060eb2f8c4e812ec7963afd09a5d1ee4a08198ddb86
philnguyen/soft-contract
foldr1.rkt
#lang racket (require soft-contract/fake-contract) (define (foldr1 f xs) (let ([z (car xs)] [zs (cdr xs)]) (if (empty? zs) z (f z (foldr1 f zs))))) (provide/contract [foldr1 ((any/c any/c . -> . any/c) (cons/c any/c (listof any/c)) . -> . any/c)])
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/sym-exe/foldr1.rkt
racket
#lang racket (require soft-contract/fake-contract) (define (foldr1 f xs) (let ([z (car xs)] [zs (cdr xs)]) (if (empty? zs) z (f z (foldr1 f zs))))) (provide/contract [foldr1 ((any/c any/c . -> . any/c) (cons/c any/c (listof any/c)) . -> . any/c)])
6e3f2e4612b13b31ad28d860e00fc76c293f918cf606f4cce5fab248aacba5f8
janestreet/ecaml
buffer.ml
open! Core open! Async_kernel open! Import0 module Q = struct include Q let visible = "visible" |> Symbol.intern end module Process = Process0 module Window = Window0 include Buffer0 type buffer = t [@@deriving sexp_of] let name = Funcall.Wrap.("buffer-name" <: t @-> return (nil_or string)) module Compare_by_...
null
https://raw.githubusercontent.com/janestreet/ecaml/25a5a2972b3a94f5529a46363b37670a6c1de195/src/buffer.ml
ocaml
open! Core open! Async_kernel open! Import0 module Q = struct include Q let visible = "visible" |> Symbol.intern end module Process = Process0 module Window = Window0 include Buffer0 type buffer = t [@@deriving sexp_of] let name = Funcall.Wrap.("buffer-name" <: t @-> return (nil_or string)) module Compare_by_...
9239c600cbe42e59728dfa522ed6a5105291236536ee2e2048026fc65938ba77
zkincaid/srk
polyhedron.ml
open Syntax open BatPervasives module V = Linear.QQVector module CS = CoordinateSystem module IntSet = SrkUtil.Int.Set module IntMap = SrkUtil.Int.Map type constraint_kind = [`Zero | `Nonneg | `Pos] [@@deriving ord] type generator_kind = [`Vertex | `Ray | `Line] (* Replace x with replacement in term. *) let replace_...
null
https://raw.githubusercontent.com/zkincaid/srk/4809f2b697c02d9e020e4de2c0b11ff4a0c59f7f/src/polyhedron.ml
ocaml
Replace x with replacement in term. Check whether a given point belongs to a polyhedron Given a coordinate x and a polyhedron p, find a term t such that p |= x=t and x does not appear in t, should one exist. Internally to this function, it's convenient to represent a virtual term as a triple consisting...
open Syntax open BatPervasives module V = Linear.QQVector module CS = CoordinateSystem module IntSet = SrkUtil.Int.Set module IntMap = SrkUtil.Int.Map type constraint_kind = [`Zero | `Nonneg | `Pos] [@@deriving ord] type generator_kind = [`Vertex | `Ray | `Line] let replace_term x replacement term = let (a, t) = V...
90628fd75fde382fb854cac574df9473dee50faf4e86d9aaa74ee8c03a1b4b09
mikera/spectral
core.clj
(ns mikera.spectral.core (:use [overtone core]) (:require [clojure.core.matrix :as mat]) (:require [mikera.image.core :as img]) (:require [mikera.image.colours :as col]) (:require [mikera.image.spectrum :as spec]) (:import [mikera.matrixx Matrix AMatrix]) (:import [java.awt.image BufferedImage])) TODO ...
null
https://raw.githubusercontent.com/mikera/spectral/3fb46b36999cf75a1a6eef12fa2017f42b51f3b8/src/main/clojure/mikera/spectral/core.clj
clojure
This namespace contains exanmple code using overtone. Should really separate out overtone into demo code create a buffer to store the audio ============================================ buffer fun
(ns mikera.spectral.core (:use [overtone core]) (:require [clojure.core.matrix :as mat]) (:require [mikera.image.core :as img]) (:require [mikera.image.colours :as col]) (:require [mikera.image.spectrum :as spec]) (:import [mikera.matrixx Matrix AMatrix]) (:import [java.awt.image BufferedImage])) TODO ...
ae08dafd1481851fd628713a53befc8514a2f330e782bd1ddc7beb4c65906310
byorgey/AoC
12.hs
#!/usr/bin/env stack -- stack --resolver lts-18.18 script import Control.Arrow ((>>>)) import Data.Char (isLower) import Data.List (foldl') import Data.List.Split (splitOn) import Data.Map (Map, (!)) import qualified Data.Map.Strict as M import ...
null
https://raw.githubusercontent.com/byorgey/AoC/2dd6e2915eac22400791b991ebf8b30d4c7a24a4/2021/12/12.hs
haskell
stack --resolver lts-18.18 script ----------------------------------------------------------
#!/usr/bin/env stack import Control.Arrow ((>>>)) import Data.Char (isLower) import Data.List (foldl') import Data.List.Split (splitOn) import Data.Map (Map, (!)) import qualified Data.Map.Strict as M import Data.Maybe (fromMaybe) im...