_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
950d34c120b09fcfdafefe7b3a6d463908486b1a6d6e616deaa2ab8e403568da
MLstate/opalang
stringMap.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/ocamllib/libbase/stringMap.ml
ocaml
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 , ...
32cba5453180522f46742fdbe4cb0a230a56024fbc8b61e031680eb31c4bcfe7
nrepl/nrepl
middleware.clj
(ns nrepl.middleware (:refer-clojure :exclude [comparator]) (:require [clojure.set :as set] [nrepl.misc :as misc] [nrepl.transport :as transport] [nrepl.version :as version])) (defn- var-name [^clojure.lang.Var v] (str (.ns v) \/ (.sym v))) (defn- wrap-conj-descriptor [descriptor-map h] (fn [{...
null
https://raw.githubusercontent.com/nrepl/nrepl/8223894f6c46a2afd71398517d9b8fe91cdf715d/src/clojure/nrepl/middleware.clj
clojure
eliminate implicit expectation of "describe" handler; this is the only special case introduced by the conj'ing of :expects "describe" by set-descriptor! only conj'ing m here to support direct reference to middleware dependencies in :expects and :requires, e.g. interruptable-eval's dep on nrepl.middleware.print/wr...
(ns nrepl.middleware (:refer-clojure :exclude [comparator]) (:require [clojure.set :as set] [nrepl.misc :as misc] [nrepl.transport :as transport] [nrepl.version :as version])) (defn- var-name [^clojure.lang.Var v] (str (.ns v) \/ (.sym v))) (defn- wrap-conj-descriptor [descriptor-map h] (fn [{...
1028a1b996e99010edbe18caa9997ea851c268134fda16c636a345f8d80aab5a
IntelLabs/flrc-benchmarks
blackscholes.hs
-- Intel Concurrent Collections for Haskell -- Copyright ( c ) 2010 , Intel Corporation . -- -- This program is free software ; you can redistribute it and/or modify it -- under the terms and conditions of the GNU Lesser General Public License , -- version 2.1 , as published by the Free Software Foundation ...
null
https://raw.githubusercontent.com/IntelLabs/flrc-benchmarks/8d54d06060363b5b438ba03bf89c461389eadc95/blackscholes/blackscholes.hs
haskell
Intel Concurrent Collections for Haskell Copyright ( c ) 2010 , Intel Corporation . This program is free software ; you can redistribute it and/or modify it under the terms and conditions of the GNU Lesser General Public License , version 2.1 , as published by the Free Software Foundation . This program ...
-} # LANGUAGE FlexibleContexts # import Harness import Control.Monad import System.Environment import System.IO.Unsafe import Data.Array.Repa (U, Z(..), (:.)(..), DIM1, Array) import qualified Data.Array.Repa as R ( spotPrice , strike , rate , volatility , expiration , optionType ) where optionType is 1.0 wh...
41cbd945d94d93fd367123d8798d9ec12ae914fe5dc812179ee7dd63a4b8030d
helpshift/gulfstream
dom.clj
(ns gulfstream.graph.dom (:require [gulfstream.util :as util] [hara.data.diff :as diff] [hara.object :as object] [hara.common.string :as s] [clojure.string :as string])) (defn get-dom "Gets the nodes and edges of the graph (get-dom (reset-graph)) => {:nodes {:a...
null
https://raw.githubusercontent.com/helpshift/gulfstream/f5e3f4159a9335bcf73ccbb750e0e6b17bde8773/src/gulfstream/graph/dom.clj
clojure
(ns gulfstream.graph.dom (:require [gulfstream.util :as util] [hara.data.diff :as diff] [hara.object :as object] [hara.common.string :as s] [clojure.string :as string])) (defn get-dom "Gets the nodes and edges of the graph (get-dom (reset-graph)) => {:nodes {:a...
ac7e5a9fcc535e19f78a10e22a15685aa2d119106dc78914fdc5cbe2ce63d61c
tokenrove/shred-for-satan
midi.ml
(* - read header, verify magic and count number of tracks - read each track, collecting list of relevant events and corresponding bar number - merge individual track events into single list of (bar * state changes) *) open List type meter = { numerator:int; denominator:int; } type key = MajorKey of int | Min...
null
https://raw.githubusercontent.com/tokenrove/shred-for-satan/5245049934667225ae362baf9d4163787c0b227f/midi.ml
ocaml
- read header, verify magic and count number of tracks - read each track, collecting list of relevant events and corresponding bar number - merge individual track events into single list of (bar * state changes) XXX change this back to signed once bitstrings.ml is fixed type, channel, parameter A, paramet...
open List type meter = { numerator:int; denominator:int; } type key = MajorKey of int | MinorKey of int type music_state = Tempo of float | Meter of meter | Key of key | EndOfTrack type event = int*music_state let ms_per_minute = 6e7 let read_varlen bs = bitmatch bs with | { false:1; d0:7; rest:-1:bitstring }...
5e0d24f1710283b2678ae8346bc60c6313153929a5b80fdd851b025e6bf2662f
OCamlPro/ocp-build
ocpDigest.ml
(**************************************************************************) (* *) (* Typerex Libraries *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/libs/ocplib-lang/ocpDigest.ml
ocaml
************************************************************************ Typerex Libraries ...
Copyright 2011 - 2017 OCamlPro SAS the GNU Lesser General Public License version 2.1 , with the open OcpCompat let _ = assert (int_of_char 'a' = 97); assert (int_of_char 'A' = 65); assert (int_of_char '0' = 48); () let to_hex_char x = if x > 9 then ch...
b950e1b1ded9ddc1c77fd45c9025eb00ef930390ab1eaf0195947a485ada4e63
phadej/preload-trick
Example.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} module Main (main) where import qualified GitHub as GH #ifdef MIN_VERSION_HsOpenSSL import OpenSSL (withOpenSSL) #else withOpenSSL :: IO a -> IO a withOpenSSL = id #endif main :: IO () main = withOpenSSL $ do possibleUser <- GH.execute...
null
https://raw.githubusercontent.com/phadej/preload-trick/cd4f2b225ffd9c3da2a1d84ae2c54e9b65a51bd9/example/Example.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE CPP # module Main (main) where import qualified GitHub as GH #ifdef MIN_VERSION_HsOpenSSL import OpenSSL (withOpenSSL) #else withOpenSSL :: IO a -> IO a withOpenSSL = id #endif main :: IO () main = withOpenSSL $ do possibleUser <- GH.executeRequest' $ GH.userInfoForR "phadej"...
469dcaa928eb2cf376c53deee6dbbc3d3895ca14c3c6faa9c55b090cd465b319
ocaml/ocaml
odoc_module.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml/ocaml/8a61778d2716304203974d20ead1b2736c1694a8/ocamldoc/odoc_module.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2001 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the module String = Misc.Stdlib.String module Name = Odoc_name type module_element = Element_module of t_...
7632482acc97fec2a2e3faf9ee708c0ea0f0aeeea282e0ea694ea2efe364ee62
vaclavsvejcar/headroom
sample3.hs
| Module : Data . VCS.Ignore . Repo Description : Type class representing the VCS repository Copyright : ( c ) 2020 License : BSD-3 - Clause Maintainer : Stability : experimental Portability : POSIX This module contains /type class/ representing the selected type of /VCS/ reposi...
null
https://raw.githubusercontent.com/vaclavsvejcar/headroom/f8b8633e025f93ff8e0378a85f26e7e56f58c940/test-data/code-samples/haskell/sample3.hs
haskell
# LANGUAGE TypeApplications # # LANGUAGE OverloadedStrings #
| Module : Data . VCS.Ignore . Repo Description : Type class representing the VCS repository Copyright : ( c ) 2020 License : BSD-3 - Clause Maintainer : Stability : experimental Portability : POSIX This module contains /type class/ representing the selected type of /VCS/ reposi...
2650ecfc2f8546e6f9b2a4f9ce7f2c0425c59972427d9e9130ea780349cc030c
BinaryAnalysisPlatform/bap
image_internal_std.ml
open Core_kernel[@@warning "-D"] open Bap_types.Std include Image_common module Table = Bap_table type 'a table = 'a Table.t [@@deriving sexp_of] module Backend = Image_backend type backend = Backend.t module Memory = Bap_memory type mem = Memory.t [@@deriving bin_io, sexp_of] module Memmap = Bap_memmap type 'a me...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_image/image_internal_std.ml
ocaml
open Core_kernel[@@warning "-D"] open Bap_types.Std include Image_common module Table = Bap_table type 'a table = 'a Table.t [@@deriving sexp_of] module Backend = Image_backend type backend = Backend.t module Memory = Bap_memory type mem = Memory.t [@@deriving bin_io, sexp_of] module Memmap = Bap_memmap type 'a me...
431c3792f29c52d36260c5185006e2bcd1f55340ca68ef54af3df26369f00527
DavidAlphaFox/RabbitMQ
wrq.erl
@author < > 2007 - 2009 Basho Technologies %% 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 applicable law or agreed to ...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/webmachine-wrapper/webmachine-git/src/wrq.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 or implied. limitations under the License. @type ...
@author < > 2007 - 2009 Basho Technologies Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , See the License for the specific language governing permissions and -module(wrq). -author('Justin Sheehy <>'). -e...
5842da9458fea1623476b50c633696940f881f6f8bd5d32324468c33835dc8d4
nubank/mockfn
macros.cljc
(ns mockfn.internal.macros (:require [mockfn.mock :as mock])) (defn- func->func-sym "Extracts the symbol for the function being mocked. When a symbol fn is passed as argument, returns fn. When a (var fn) is passed as argument (such as when mocking private functions), returns fn instead of (var fn)." [func...
null
https://raw.githubusercontent.com/nubank/mockfn/388c79e875827ecde7a580ffcd7051c8370e229b/src/mockfn/internal/macros.cljc
clojure
(ns mockfn.internal.macros (:require [mockfn.mock :as mock])) (defn- func->func-sym "Extracts the symbol for the function being mocked. When a symbol fn is passed as argument, returns fn. When a (var fn) is passed as argument (such as when mocking private functions), returns fn instead of (var fn)." [func...
0ad5f2e269d6841d883d567559f624b126ed9f0719fcb487966c2069a8cfcd93
DaMSL/K3
Declaration.hs
# LANGUAGE LambdaCase # # LANGUAGE ViewPatterns # # LANGUAGE TypeFamilies # # LANGUAGE ParallelListComp # module Language.K3.Codegen.CPP.Declaration where import Control.Arrow ((&&&)) import Control.Applicative import Control.Monad.State import Data.Maybe import qualified Data.List as L import qualified Data.Map as...
null
https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Codegen/CPP/Declaration.hs
haskell
Sinks with a valid body are handled in the same way as triggers. Built - Ins . Built - Ins Global monomorphic function with direct implementations. Global polymorphic functions with direct implementations. mtrlzns <- case e @~ isEMaterialization of Just (EMaterialization ms) -> return ms Global sca...
# LANGUAGE LambdaCase # # LANGUAGE ViewPatterns # # LANGUAGE TypeFamilies # # LANGUAGE ParallelListComp # module Language.K3.Codegen.CPP.Declaration where import Control.Arrow ((&&&)) import Control.Applicative import Control.Monad.State import Data.Maybe import qualified Data.List as L import qualified Data.Map as...
e0f9f28bc2eaf5fc201390d3f0047e3b86007906b94037c145aed8866faa59e0
finnishtransportagency/harja
raportointi.cljc
(ns harja.domain.raportointi (:require [harja.domain.roolit :as roolit])) API to colors that can be used in Excel : ;; (def virhetyylit {:virhe "rgb(221,0,0)" :varoitus "rgb(255,153,0)" :info "rgb(0,136,204)"}) rajat - excel , , ja solun - oletustyyli - excel ovat , ja täten niiden ei v...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/3d09d1d799d2a5a7ddb51b6532bc4511acc929c0/src/cljc/harja/domain/raportointi.cljc
clojure
formaatissa edes melkein samat.
(ns harja.domain.raportointi (:require [harja.domain.roolit :as roolit])) API to colors that can be used in Excel : (def virhetyylit {:virhe "rgb(221,0,0)" :varoitus "rgb(255,153,0)" :info "rgb(0,136,204)"}) rajat - excel , , ja solun - oletustyyli - excel ovat , ja täten niiden ei vältt...
e43946c54df79b3d60e1c09a7c0958b33084c410daf05dec624da8e4b633a790
otto-de-legacy/oscillator
number.cljs
(ns monitor.number (:require [dommy.core :as d] [dommy.core :refer-macros [sel sel1]])) (def jquery (js* "$")) (defn first-datapoint [data] (-> (first data) (aget "datapoints") (last) (first))) (defn formatter-string [el] (or (.getAttribute el "data-formatter") ".4s")) (defn update-n...
null
https://raw.githubusercontent.com/otto-de-legacy/oscillator/c1ddf409a70cb91329f0039b95c7bc12289922e2/src-cljs/monitor/number.cljs
clojure
(ns monitor.number (:require [dommy.core :as d] [dommy.core :refer-macros [sel sel1]])) (def jquery (js* "$")) (defn first-datapoint [data] (-> (first data) (aget "datapoints") (last) (first))) (defn formatter-string [el] (or (.getAttribute el "data-formatter") ".4s")) (defn update-n...
e82fdc38a398f9a33461eed0c06a232c941bdafdea00ec483923ce5e558c34e5
clojure-interop/java-jdk
HttpHandler.clj
(ns javax.xml.ws.spi.http.HttpHandler "A handler which is invoked to process HTTP requests. JAX-WS runtime provides the implementation for this and sets it using HttpContext.setHandler(HttpHandler) during Endpoint.publish(HttpContext)" (:refer-clojure :only [require comment defn ->]) (:import [javax.xml.ws...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/ws/spi/http/HttpHandler.clj
clojure
(ns javax.xml.ws.spi.http.HttpHandler "A handler which is invoked to process HTTP requests. JAX-WS runtime provides the implementation for this and sets it using HttpContext.setHandler(HttpHandler) during Endpoint.publish(HttpContext)" (:refer-clojure :only [require comment defn ->]) (:import [javax.xml.ws...
ab7a9adbbc102cc83cc22376eb76143f20843e0d4f1016f6e2012190015566ba
jqueiroz/lojban.io
CourseStore.hs
{-# LANGUAGE OverloadedStrings #-} -- | This modules exposes the 'CourseStore'. module Study.Courses.CourseStore (courseStore) where import Core import qualified Study.Courses.English.Grammar.Introduction.Course as Introduction import qualified Study.Courses.English.Grammar.Crash.Course as Crash import qualified Stud...
null
https://raw.githubusercontent.com/jqueiroz/lojban.io/68c3e919f92ea1294f32ee7772662ab5667ecef6/haskell/src/Study/Courses/CourseStore.hs
haskell
# LANGUAGE OverloadedStrings # | This modules exposes the 'CourseStore'. | Course store.
module Study.Courses.CourseStore (courseStore) where import Core import qualified Study.Courses.English.Grammar.Introduction.Course as Introduction import qualified Study.Courses.English.Grammar.Crash.Course as Crash import qualified Study.Courses.English.Vocabulary.Brivla.Course as Brivla import qualified Study.Cour...
ad44f84f67949687b9971c621cece48efb5eb98cfacf16cd0637e51d6501d46e
eugeneia/athens
namespace.lisp
;;; namespace.lisp ;;; ;;; This file is part of the cl-libxml2 library, released under Lisp-LGPL. ;;; See file COPYING for details. ;;; Author : < > (in-package #:libxml2.tree) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ns ;;;;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/cl-libxml2-20130615-git/tree/namespace.lisp
lisp
namespace.lisp This file is part of the cl-libxml2 library, released under Lisp-LGPL. See file COPYING for details. ns xmlNsType type : global or local const xmlChar * href : URL for the namespace const xmlChar * prefix : prefix for the namespace void * _private : application data struct _xmlDoc * contex...
Author : < > (in-package #:libxml2.tree) (defcstruct %xmlNs struct _ xmlNs * next : next Ns link for this node (%next %xmlNsPtr) (%type %xmlNsType) (%href %xmlCharPtr) (%prefix %xmlCharPtr) (%_private :pointer) (%context %xmlDocPtr)) (defwrapper ns %xmlNs) (define-libxml2-function ("xmlSea...
8cc8ee792c0b0e5bb7b5f100761b0b51f80e3eda72139dd1810a0d1724316e5b
cwtsteven/TSD
pendulum.ml
open Tsd open List let t = lift 0.05 let l = lift 10.0 let g = lift 9.81 let ( *^ ) = lift ( *. ) let ( +^ ) = lift ( +. ) let ( -^ ) = lift ( -. ) let ( /^ ) = lift ( /. ) let sin' = lift sin let cos' = lift cos let integr t dx = let x = cell [%dfg 0.0] in x <~ [%dfg t *^ dx +^ x]; x let deriv t x = le...
null
https://raw.githubusercontent.com/cwtsteven/TSD/32bd2cbca6d445ff6b0caecdbb2775de61fdfc6d/benchmarks/pendulum/pendulum.ml
ocaml
open Tsd open List let t = lift 0.05 let l = lift 10.0 let g = lift 9.81 let ( *^ ) = lift ( *. ) let ( +^ ) = lift ( +. ) let ( -^ ) = lift ( -. ) let ( /^ ) = lift ( /. ) let sin' = lift sin let cos' = lift cos let integr t dx = let x = cell [%dfg 0.0] in x <~ [%dfg t *^ dx +^ x]; x let deriv t x = le...
25606c7a70d9ab354a0a3460b867345a540f21397befb6e5ff7af44c4277995c
unisonweb/unison
Typechecker.hs
# LANGUAGE OverloadedLists # # LANGUAGE PatternSynonyms # # LANGUAGE TemplateHaskell # # LANGUAGE ViewPatterns # | This module is the primary interface to the Unison typechecker module Unison . Typechecker ( admissibleTypeAt , check , check ' , checkAdmissible ' , equals , locals , subtype , isSubtype , synthesize...
null
https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/parser-typechecker/src/Unison/Typechecker.hs
haskell
TDNR environment - maps short names like `+` to fully-qualified lists of named references whose full name matches the short name Example: `+` maps to [Nat.+, Float.+, Int.+] This mapping is populated before typechecking with as few entries as are needed to help resolve variables needing TDNR in the file. contain...
# LANGUAGE OverloadedLists # # LANGUAGE PatternSynonyms # # LANGUAGE TemplateHaskell # # LANGUAGE ViewPatterns # | This module is the primary interface to the Unison typechecker module Unison . Typechecker ( admissibleTypeAt , check , check ' , checkAdmissible ' , equals , locals , subtype , isSubtype , synthesize...
a04dacef362c06a959bf31e5547b29d5812422d098ea9b1aa6d77a7f1a927de4
fogfish/typhoon
typhoon_unit.erl
%% %% Copyright 2015 Zalando SE %% 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 applicable law or agreed to in writing, software ...
null
https://raw.githubusercontent.com/fogfish/typhoon/db0d76050a9c41c45582e9928206270450600d00/apps/typhoon/src/typhoon_unit.erl
erlang
Copyright 2015 Zalando SE 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 Licens...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , load unit - generates load towards SUT -module(typhoon_unit). -behaviour(pipe). -author(''). -compile({parse_transform, category}). -include("typhoon.hrl"). -export([ ...
7ad0558a12a4b73241bbeafc16ba745ceb8af18cb4fb2a3a0091bb2e225cff7d
ocaml-sf/learn-ocaml-corpus
read_any_bit.ml
(* -------------------------------------------------------------------------- *) Accessing and updating a bitmap , one bit at a time . let encode w h i j : offset = assert (0 <= i && i <= w); assert (0 <= j && j <= h); (h + 1) * i + j let decode w h (o : offset) : int * int = o / (h + 1), o mod (h + 1) ...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/tictactoe/wrong/read_any_bit.ml
ocaml
-------------------------------------------------------------------------- wrong
Accessing and updating a bitmap , one bit at a time . let encode w h i j : offset = assert (0 <= i && i <= w); assert (0 <= j && j <= h); (h + 1) * i + j let decode w h (o : offset) : int * int = o / (h + 1), o mod (h + 1) let mask w h i j : bitmap = 1 lsl (encode w h i j) let read w h (bitmap : bitm...
1ca5a0f58b8655d1a0a895ab524596c9d1b3400b8354c1aba44251600a7951f0
flora-pm/flora-server
Search.hs
module FloraWeb.Templates.Pages.Search where import Control.Monad (when) import Data.Text (Text) import Data.Vector (Vector) import Lucid import Data.Maybe (fromJust, isJust) import Flora.Model.Package (PackageInfo (..)) import Flora.Search (SearchAction (..)) import FloraWeb.Components.PackageListHeader (presentatio...
null
https://raw.githubusercontent.com/flora-pm/flora-server/c214c0b5d5db71a8330eb69326284be5a4d5e858/src/web/FloraWeb/Templates/Pages/Search.hs
haskell
module FloraWeb.Templates.Pages.Search where import Control.Monad (when) import Data.Text (Text) import Data.Vector (Vector) import Lucid import Data.Maybe (fromJust, isJust) import Flora.Model.Package (PackageInfo (..)) import Flora.Search (SearchAction (..)) import FloraWeb.Components.PackageListHeader (presentatio...
2213d4ad9c1ada4c86fbdf73f851d50daf2cab66eee0bdfb13e9d87d978b74d4
ghc/nofib
Main.hs
module Main (main) -- solid where { import Control.Monad (replicateM_); import System.Environment (getArgs); partain : import Fast2haskell ; #include "../Fast2haskell.hs" strict_show_i::Int -> [Char]; strict_show_i x=miraseq x (show x); strict_show_d::Double -> [Char]; strict_show_d x=miraseq x (s...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/spectral/hartel/solid/Main.hs
haskell
solid
where { import Control.Monad (replicateM_); import System.Environment (getArgs); partain : import Fast2haskell ; #include "../Fast2haskell.hs" strict_show_i::Int -> [Char]; strict_show_i x=miraseq x (show x); strict_show_d::Double -> [Char]; strict_show_d x=miraseq x (show x); f_benchmark_mai...
65ebf74847f8ab72e97b592a56e9b095a08ebe9d45323b4e4e98c4c0aa1b3f41
erlio/vmq_diversity
vmq_diversity_plugin.erl
Copyright 2016 Erlio GmbH Basel Switzerland ( ) %% 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 applicable law or agreed to in writing, sof...
null
https://raw.githubusercontent.com/erlio/vmq_diversity/cdfb41c684971c617da55da43cd518c926839027/src/vmq_diversity_plugin.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 or implied. See the License for the specific language governing perm...
Copyright 2016 Erlio GmbH Basel Switzerland ( ) Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(vmq_diversity_plugin). -behaviour(gen_server). -behaviour(auth_on_register_hook). -behaviour(auth_on_publish_hook). ...
be4ecd2f49175866c89a704700767e1b82e9a18d348e7f22e3f2d73fb63614f5
andreasabel/helf
SimpleDynArray.hs
a simplified version of DynArray . get , insert , split , join are all O(log n ) . module DatastrucImpl.SimpleDynArray where import Prelude hiding (repeat) import qualified Data.List as List import Text.PrettyPrint (Doc,nest,vcat,text,render) import qualified Text.PrettyPrint as PP import Debug.Trace import Data...
null
https://raw.githubusercontent.com/andreasabel/helf/52bc10751f5dac7338adcb085553ba8157692420/src/DatastrucImpl/SimpleDynArray.hs
haskell
show = render . pretty ^ an array filled with element @entry@ ^ length of left part ^ left part ^ right part | Empty -- ^ not allowed as part of a nonempty tree ! | Array lookup with bounds checking. O(log n). | Lookup without bounds checking. O(log n). failure: get' Empty _ = error "tried...
a simplified version of DynArray . get , insert , split , join are all O(log n ) . module DatastrucImpl.SimpleDynArray where import Prelude hiding (repeat) import qualified Data.List as List import Text.PrettyPrint (Doc,nest,vcat,text,render) import qualified Text.PrettyPrint as PP import Debug.Trace import Data...
ae55a27a205b21e613ab022089df9c79800740a63d468720aa78a8b6375bd030
ferigis/netconf
fake_device.erl
-module(fake_device). -behaviour(netconf_device). %% API -export([capabilities/0]). capabilities() -> ["urn:ietf:params:netconf:base:1.0" , "urn:ietf:params:netconf:capability:writable-running:1.0"].
null
https://raw.githubusercontent.com/ferigis/netconf/c92654450039a0604296851b13e545db3e26d7bb/test/fake_device.erl
erlang
API
-module(fake_device). -behaviour(netconf_device). -export([capabilities/0]). capabilities() -> ["urn:ietf:params:netconf:base:1.0" , "urn:ietf:params:netconf:capability:writable-running:1.0"].
7cbc93cd37c781062a8b7222cc6082a0447e806e441552a6b1027e3467e87a48
ocsigen/ojwidgets
ojw_popup_f.ml
Copyright Université Paris Diderot . Author : Author : Charly Chevalier *) open Dom open Dom_html let global_bg = ref (None : divElement Js.t option) let get_global_bg () = let update_bg bg = let w, h = let w, h = Ojw_tools.get_screen_size () in Js.Optdef.case (window##innerWidth) ...
null
https://raw.githubusercontent.com/ocsigen/ojwidgets/4be2233980bdd1cae187c749bd27ddbfff389880/src/internals/ojw_popup_f.ml
ocaml
Copyright Université Paris Diderot . Author : Author : Charly Chevalier *) open Dom open Dom_html let global_bg = ref (None : divElement Js.t option) let get_global_bg () = let update_bg bg = let w, h = let w, h = Ojw_tools.get_screen_size () in Js.Optdef.case (window##innerWidth) ...
8d3552b9260154712d3b002ee9c2bba9bead83b2de35bd78e4b952fd1860aa15
avsm/ocaml-ssh
olog.ml
pp * Copyright ( c ) 2005,2006 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROV...
null
https://raw.githubusercontent.com/avsm/ocaml-ssh/26577d1501e7a43e4b520239b08da114c542eda4/ounix/olog.ml
ocaml
pp * Copyright ( c ) 2005,2006 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROV...
b40f9f726577274f0c16d8e48138d6f5e5553688688a5337e39f2a5bc9119757
danx0r/festival
ogi_configure_voice.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<--OHSU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Oregon Health & Science University ; ; Division of Biomedical Computer Science ; ; ...
null
https://raw.githubusercontent.com/danx0r/festival/6701715566aee6519a8b7949b567f2fdad1e2772/lib/ogi/ogi_configure_voice.scm
scheme
<--OHSU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ; ; ; ; ; ;; ; release of the Festival TTS system. ;; ...
(require 'phrase) (require 'pos) (require 'tobi) (require 'tilt) (require 'f2bf0lr) (require 'ogi/ogi_worldbet_phones) (require 'ogi/ogi_lexicons) (require 'ogi/ogi_lex_addenda) ( require ' lex_addenda ) (require 'ogi/ogi_syllabify) (require 'ogi/ogi_lts_syllabify) (require 'ogi/ogi_postlex) (require '...
a14dfbfbff390a4551a9e3fd26474cc18f8473e194c71e18940482a5e213db20
psholtz/MIT-SICP
exercise2-36.scm
;; Exercise 2.36 ;; The procedure " accumulate - n " is similar to accumulate except that it takes as its third ;; argument a sequence of sequences, which are all assumed to have the same number of elements. It applies the designated accumulate procedure to combine all the first elements of the sequences , all ...
null
https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-2.2/mit-scheme/exercise2-36.scm
scheme
argument a sequence of sequences, which are all assumed to have the same number of elements. "accumulate-n": Define the "accumulate-n" procedure: Run some unit tests:
Exercise 2.36 The procedure " accumulate - n " is similar to accumulate except that it takes as its third It applies the designated accumulate procedure to combine all the first elements of the sequences , all the second elements of the sequences , and so on , and returns a sequence of the results . For insta...
a16eb8c672e09ee27fd32d26b040caf3be3e0fe5959360b10bbcac2d132d8e09
ktakashi/sagittarius-scheme
hashtables.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; srfi/%3a126/hashtables.scm - R6RS-based hashtables ;;; Copyright ( c ) 2016 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/623d7893cab2e373cf4cd5ff8f6386eeda27b362/sitelib/srfi/%253a126/hashtables.scm
scheme
coding : utf-8 ; -*- srfi/%3a126/hashtables.scm - R6RS-based hashtables Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice,...
Copyright ( c ) 2016 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library (srfi :126 hashtables) (export (rename...
908d294200559d4db11fe3860d8442c130480a6a783a1200bdd7f7cebb30a05a
PLTools/GT
test089struct.ml
@type 'info expr_node = | EConst of GT.int | EAdd of 'info expr * 'info expr and 'info expr = { info : 'info ; node : 'info expr_node } with show,gmap let e1 = {info="asdf"; node=EConst 19} let e2 = {info="x"; node= EAdd ({info="y";node=EConst 20}, {info="z";node=EConst 40})} let () = print_endline @@ GT.show ...
null
https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/regression/test089struct.ml
ocaml
Example from paper about visitors
@type 'info expr_node = | EConst of GT.int | EAdd of 'info expr * 'info expr and 'info expr = { info : 'info ; node : 'info expr_node } with show,gmap let e1 = {info="asdf"; node=EConst 19} let e2 = {info="x"; node= EAdd ({info="y";node=EConst 20}, {info="z";node=EConst 40})} let () = print_endline @@ GT.show ...
1b3a9ec3c44833cf7e3658eb03ec253780972937a1498f38fc661c2bf493afa8
fourmolu/fourmolu
dollar-chains-5-four-out.hs
ex4 = f1 $ arg1 $ arg2 $ do arg3 ex6 = f1 $ arg1 $ arg2 $ do arg3
null
https://raw.githubusercontent.com/fourmolu/fourmolu/1f8903a92c8d5001dc1ec8ecfd4a04a3b61c3283/data/examples/declaration/value/function/infix/dollar-chains-5-four-out.hs
haskell
ex4 = f1 $ arg1 $ arg2 $ do arg3 ex6 = f1 $ arg1 $ arg2 $ do arg3
27a223cb9ae6f9ba077ac1ed3645e0e778925db0ecb5cb6e2af615febc243773
clojure-interop/aws-api
project.clj
(defproject clojure-interop/com.amazonaws.services.worklink "1.0.0" :description "Clojure to Java Interop Bindings for com.amazonaws.services.worklink" :url "-interop/aws-api" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :source-paths ["s...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.worklink/project.clj
clojure
(defproject clojure-interop/com.amazonaws.services.worklink "1.0.0" :description "Clojure to Java Interop Bindings for com.amazonaws.services.worklink" :url "-interop/aws-api" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :source-paths ["s...
20baf12c6c320cd5a1422da5744f85bb48ae5ad8c350341ff24845b49a2fad37
argp/bap
topological.ml
(**************************************************************************) (* *) : a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and (* ...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/src/topological.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
: a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking module ty...
0407ef99ba6709fd984684c06111b5e9a9c87a78d57af897235af521363ef133
michalkonecny/aern2
Elementary.hs
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -Wno - orphans # | Module : AERN2.Real . Elementary Description : selected elementary operations on CReal Copyright : ( c ) : : Stability : experimental Portability : portable Selected elementary ope...
null
https://raw.githubusercontent.com/michalkonecny/aern2/7ab41113ca8f73dca70d887d190ddab3b43ef084/aern2-real/src/AERN2/Real/Elementary.hs
haskell
common elementary operations sine, cosine sqrt exp log power {- reals mixed with Double -} instance Convertible CReal Double where binaryWithDouble :: (Double -> Double -> Double) -> CReal -> Double -> Double binaryWithDouble op r d = op (convert r) d add = binaryWithDouble add instance CanAddAs...
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -Wno - orphans # | Module : AERN2.Real . Elementary Description : selected elementary operations on CReal Copyright : ( c ) : : Stability : experimental Portability : portable Selected elementary ope...
e7ac920239d6fa23b20e975ddea7122aeecc5cf5e344c9c0dbebc08620ef2015
c4-project/c4f
enum.ml
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
null
https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/utils/src/enum.ml
ocaml
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
93df71608b34694e9e0d9bc4db98e1aab34788d3d6ff40005c1d6c7a6f2dd9dc
dakrone/clj-http
progress_download.clj
(ns clj-http.examples.progress-download (:require [clj-http.client :as http] [clojure.java.io :refer [output-stream]]) (:import (org.apache.commons.io.input CountingInputStream))) (defn print-progress-bar "Render a simple progress bar given the progress and total. If the total is zero the progress...
null
https://raw.githubusercontent.com/dakrone/clj-http/dd15359451645f677b3e294164cf70330b92241d/examples/progress_download.clj
clojure
Example of progress bar output (sample steps) In case the content-length is unknown, the bar will be displayed as:
(ns clj-http.examples.progress-download (:require [clj-http.client :as http] [clojure.java.io :refer [output-stream]]) (:import (org.apache.commons.io.input CountingInputStream))) (defn print-progress-bar "Render a simple progress bar given the progress and total. If the total is zero the progress...
3cc94aac7eee7e43aaba2ad49af60ed4153e895347b4652cef1530f317cc1f40
tweag/HaskellR
Main.hs
-- | Example originally inspired by -- <-che.info/articles/2015-12-05-testing-fft Roman Cheplyaka>. {-# LANGUAGE GADTs #-} # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # module Main where import Data.Complex import qualified Language.R as R import Language.R (R) import Language.R...
null
https://raw.githubusercontent.com/tweag/HaskellR/e6b4ba0ddea32975df644fa1f9581881575ee7dc/examples/fft/Main.hs
haskell
| Example originally inspired by <-che.info/articles/2015-12-05-testing-fft Roman Cheplyaka>. # LANGUAGE GADTs #
# LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # module Main where import Data.Complex import qualified Language.R as R import Language.R (R) import Language.R.QQ Call R 's FFT r_fft :: [Complex Double] -> R s [Complex Double] r_fft nums = do R.dynSEXP <$> [r| fft(nums_hs) |...
473243363818665878fa08eedd32c384427f9a7fec7a983f7761b865de0f12b5
plumatic/schema
core.cljc
(ns schema.core "A library for data shape definition and validation. A Schema is just Clojure data, which can be used to document and validate Clojure functions and data. For example, (def FooBar {:foo Keyword :bar [Number]}) ;; a schema (check FooBar {:foo :k :bar [1.0 2.0 3.0]}) ==> nil repres...
null
https://raw.githubusercontent.com/plumatic/schema/7f2b195d401a1e7045fb0ae40e4effb0e55e66dd/src/cljc/schema/core.cljc
clojure
a schema don't exclude def because it's not a var. Schema protocol otherwise, returns a value that looks like the otherwise, return value. alias to the corresponding boxed number classes Cross-platform Schema leaves Any matches anything (including nil) loses type info, which makes this unusable in schema-fn...
(ns schema.core "A library for data shape definition and validation. A Schema is just Clojure data, which can be used to document and validate Clojure functions and data. For example, (check FooBar {:foo :k :bar [1.0 2.0 3.0]}) ==> nil representing successful validation, but the following all retur...
60a1a040e7f8e160e131ef5135a3268c30f268998411335cafca58f709acd2e2
fffej/Keyword-Search
FortuneIndexer.hs
{-# LANGUAGE OverloadedStrings #-} module FortuneIndexer ( getTerm ) where import Control.Monad (forM_) import Data.List.Split (splitOn) import Data.Char (isLetter, isSpace) import Data.Text.Encoding as E import qualified Data.Map as M import qualified Data.Text as T import qualified Data.Text...
null
https://raw.githubusercontent.com/fffej/Keyword-Search/6b482888aa6df0e4fe32b4c69b7fde59f97994cc/FortuneIndexer.hs
haskell
# LANGUAGE OverloadedStrings #
module FortuneIndexer ( getTerm ) where import Control.Monad (forM_) import Data.List.Split (splitOn) import Data.Char (isLetter, isSpace) import Data.Text.Encoding as E import qualified Data.Map as M import qualified Data.Text as T import qualified Data.Text.IO as T import Database.Redis.Red...
c8fc68068e76e7d65cebbca72b1678b9349618df84e4352012dd0c4c55985221
mirage/ocaml-git
fetch.mli
open Sigs type configuration = Neg.configuration val configuration : ?stateless:bool -> Smart.Capability.t list -> configuration module Make (Scheduler : SCHED) (IO : IO with type +'a t = 'a Scheduler.s) (Flow : FLOW with type 'a fiber = 'a Scheduler.s) (Uid : UID) (Ref : REF) : sig val fetch_v...
null
https://raw.githubusercontent.com/mirage/ocaml-git/37c9ef41944b5b19117c34eee83ca672bb63f482/src/not-so-smart/fetch.mli
ocaml
open Sigs type configuration = Neg.configuration val configuration : ?stateless:bool -> Smart.Capability.t list -> configuration module Make (Scheduler : SCHED) (IO : IO with type +'a t = 'a Scheduler.s) (Flow : FLOW with type 'a fiber = 'a Scheduler.s) (Uid : UID) (Ref : REF) : sig val fetch_v...
968f9035a6a2cfeda9682ef7e3209ba803522f288bbf0681f5d602d41516169a
prowdsponsor/yesod-recaptcha
ReCAPTCHA.hs
module Yesod.ReCAPTCHA ( YesodReCAPTCHA(..) , recaptchaAForm , recaptchaMForm , recaptchaOptions , RecaptchaOptions(..) ) where import Control.Applicative import Data.Typeable (Typeable) import Yesod.Core (whamlet) import qualified Control.Exception.Lifted as E import qualified Control.Monad.Tr...
null
https://raw.githubusercontent.com/prowdsponsor/yesod-recaptcha/a885fa111e4eb0d1601194ac6618848aa25e1a5e/src/Yesod/ReCAPTCHA.hs
haskell
fairly easy to implement a barebones instance of this class for you foundation data type: > recaptchaPublicKey = return "[your public key]" > recaptchaPrivateKey = return "[your private key]" You may also write a more sophisticated instance. For example, you may get these values from your @settings.yml@ ...
module Yesod.ReCAPTCHA ( YesodReCAPTCHA(..) , recaptchaAForm , recaptchaMForm , recaptchaOptions , RecaptchaOptions(..) ) where import Control.Applicative import Data.Typeable (Typeable) import Yesod.Core (whamlet) import qualified Control.Exception.Lifted as E import qualified Control.Monad.Tr...
be27d731d9cf29e0c422cf2d7b8d5a5700eb5b26d1ec903cdde3ce9dd02be8c3
takikawa/racket-ppa
parameter.rkt
#lang racket/base (require "../common/struct-star.rkt" "config.rkt" "primitive-parameter.rkt") (provide check-parameter override-parameter force-parameters! (all-from-out "primitive-parameter.rkt")) (define unknown (gensym 'unknown)) ;; Speed up parameter checking and pro...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/src/expander/read/parameter.rkt
racket
Speed up parameter checking and protect against changes by caching parameter values Protect against callbacks that can change parameters by caching all parameters at current values:
#lang racket/base (require "../common/struct-star.rkt" "config.rkt" "primitive-parameter.rkt") (provide check-parameter override-parameter force-parameters! (all-from-out "primitive-parameter.rkt")) (define unknown (gensym 'unknown)) (define (check-parameter param config)...
6fd5e6d869b9d66b65f64e20c00c48dea00035964997f1a6f8094181da22945c
jamesmacaulay/zelkova
project.clj
(defproject mario "0.1.0-SNAPSHOT" :description "FIXME: write this!" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0-beta1"] [org.clojure/clojurescript "0.0-3196"] [org.clojure/core.async "0.1.346.0-1711...
null
https://raw.githubusercontent.com/jamesmacaulay/zelkova/a8e00dc51b48c5b429fe2e2fb4aa2d557571829c/examples/mario/project.clj
clojure
default and assumes "resources" default watch and update CSS if you want to embed a ring handler into the figwheel http-kit server, this is simple ring servers, if this doesn't work for you just run your own server :) :ring-handler hello_world.server/handler To be able to open files in your editor from the hea...
(defproject mario "0.1.0-SNAPSHOT" :description "FIXME: write this!" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0-beta1"] [org.clojure/clojurescript "0.0-3196"] [org.clojure/core.async "0.1.346.0-1711...
abe7fb9bab780c67b664d5e22ea41736aec409e709a1ce7abba5c7b648741fe3
serioga/clojure-benhcmarks
templates.clj
(ns clojure-benchmarks.templates (:require [cljstache.core :as cljstache] [comb.template :as comb] [criterium.core :as criterium] [fleet :as fleet] [hbs.core :as hbs] [me.shenfeng.mustache :as mustache] [mustache.core :as mustache-java] [stencil.core :as stencil] [stencil.parser :a...
null
https://raw.githubusercontent.com/serioga/clojure-benhcmarks/266caad3f5d4f9082d650a8dc1be1d6adb968fb8/src/clojure_benchmarks/templates.clj
clojure
Execution time mean : 121,053870 µs Execution time mean : 475,070705 ns Execution time mean : 1,237585 µs Execution time mean : 4,153316 µs
(ns clojure-benchmarks.templates (:require [cljstache.core :as cljstache] [comb.template :as comb] [criterium.core :as criterium] [fleet :as fleet] [hbs.core :as hbs] [me.shenfeng.mustache :as mustache] [mustache.core :as mustache-java] [stencil.core :as stencil] [stencil.parser :a...
4ea66d1e497b1415c2513818242158b75296f886c56930c313152a58579a62c9
mput/sicp-solutions
2_28.test.rkt
#lang racket (require rackunit/text-ui) (require rackunit "custom-checks.rkt") (require rackunit "../solutions/2_28.rkt") (define tests (test-suite "Test for exercise 2_28" (test-case "fringe" (define list-of-lists (list (list 1 2) (list 3 4))) (define fringed-list (list 1 2 3 4)) (c...
null
https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/tests/2_28.test.rkt
racket
#lang racket (require rackunit/text-ui) (require rackunit "custom-checks.rkt") (require rackunit "../solutions/2_28.rkt") (define tests (test-suite "Test for exercise 2_28" (test-case "fringe" (define list-of-lists (list (list 1 2) (list 3 4))) (define fringed-list (list 1 2 3 4)) (c...
4f0f9b711ad452e139acdd21d327a50e19335ad45af3f464bb487a936af8e937
WorksHub/client
views.cljs
(ns wh.register.views (:require [re-frame.core :refer [dispatch dispatch-sync reg-event-db]] [wh.components.auth :as auth] [wh.components.icons :refer [icon]] [wh.register.events :as events] [wh.register.subs :as subs] [wh.routes :as routes] [wh....
null
https://raw.githubusercontent.com/WorksHub/client/bebd5e87282a4aa1fcc81a1bc67530a19eb82cfb/client/src/wh/register/views.cljs
clojure
(ns wh.register.views (:require [re-frame.core :refer [dispatch dispatch-sync reg-event-db]] [wh.components.auth :as auth] [wh.components.icons :refer [icon]] [wh.register.events :as events] [wh.register.subs :as subs] [wh.routes :as routes] [wh....
50390787facd6d22949f1bcc04a188b67fbd553fd5f409e155a43e890b912440
lally/ppt
CpPrim.hs
-- |C++ Code Generator Primitives module Ppt.Generate.CpPrim where import Ppt.Frame.ParsedRep import Ppt.Frame.Types import Ppt.Frame.Layout import Prelude hiding ((<>)) import Text.PrettyPrint ((<>),(<+>)) import Control.Lens import Data.Maybe import Ppt.Generate.CpConfig import qualified Data.List as L import quali...
null
https://raw.githubusercontent.com/lally/ppt/67587918a6cb72cf4b5402eee222842050c110fc/src/Ppt/Generate/CpPrim.hs
haskell
|C++ Code Generator Primitives Class Member Generation |Members to go into the final declaration. Note that these *must* be kept in the order presented, as they've already had memory layout applied. ^Declared members in the original frame specification ^PPT private stuff (sequence numbers, type descriminator)...
module Ppt.Generate.CpPrim where import Ppt.Frame.ParsedRep import Ppt.Frame.Types import Ppt.Frame.Layout import Prelude hiding ((<>)) import Text.PrettyPrint ((<>),(<+>)) import Control.Lens import Data.Maybe import Ppt.Generate.CpConfig import qualified Data.List as L import qualified Text.PrettyPrint as PP data...
4bf54b603876f2d274ff37c6d9f436017e073568a76b2fa1611d0e069d6238d8
bpanthi977/nlopt
nloptimize.lisp
(in-package :nlopt) ;;;;; High Level nloptimize macro (eval-when (:compile-toplevel :load-toplevel :execute) (defun filter-visible-vars (vars body &optional sofar) "Returns list of `vars' that are seen in `body' results found are stored in `sofar'" (cond ((null body) sofar) ((symbolp body) ...
null
https://raw.githubusercontent.com/bpanthi977/nlopt/675b4862cd3b3f54c91801f0a8e27b7ba32afbb5/nloptimize.lisp
lisp
High Level nloptimize macro handle expressions of form l < g x < const const < x const < const inequality constraint (<) single expression equality constraint sets the objective function adds constraints an inequality constraint or bounds on the parameter
(in-package :nlopt) (eval-when (:compile-toplevel :load-toplevel :execute) (defun filter-visible-vars (vars body &optional sofar) "Returns list of `vars' that are seen in `body' results found are stored in `sofar'" (cond ((null body) sofar) ((symbolp body) (if (and (find body vars) ...
fce35d564a2461d2ab21e97ff9dc97a196af47b8d0e95492ced74a650102c397
LeventErkok/sbv
Orangutans.hs
----------------------------------------------------------------------------- -- | Module : Documentation . SBV.Examples . Puzzles . Orangutans Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- Based on <-resources/blob/main/2022-08-12-java/Haskell.hs> -------------------...
null
https://raw.githubusercontent.com/LeventErkok/sbv/be79217d1d9ab206a5b95ae47c0b9100a229a163/Documentation/SBV/Examples/Puzzles/Orangutans.hs
haskell
--------------------------------------------------------------------------- | License : BSD3 Maintainer: Stability : experimental Based on <-resources/blob/main/2022-08-12-java/Haskell.hs> --------------------------------------------------------------------------- # LANGUAGE DeriveAnyClass # # LANGUAGE De...
Module : Documentation . SBV.Examples . Puzzles . Orangutans Copyright : ( c ) # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # # LANGUAGE OverloadedRecordDot # module Documentation.SBV.Examples.Puzzles.Orangutans where import Data.SBV import GHC.Generics (Generic) data Orangutan = Me...
4478194a8c9b2459b8d27f6d046227cee96904ab23f41f5d112472a0c786fe4a
robert-strandh/SICL
boot.lisp
(cl:in-package #:sicl-boot-arithmetic) (defvar *arithmetic-environment*) (defun boot (boot) (with-accessors ((e5 sicl-boot:e5)) boot (let* ((client (make-instance 'client)) (sicl-client:*client* client) (environment (make-instance 'environment :client clie...
null
https://raw.githubusercontent.com/robert-strandh/SICL/69ce6865a86fc41ba2536c1106c4b75c1d4b42e3/Code/Boot/Arithmetic/boot.lisp
lisp
(cl:in-package #:sicl-boot-arithmetic) (defvar *arithmetic-environment*) (defun boot (boot) (with-accessors ((e5 sicl-boot:e5)) boot (let* ((client (make-instance 'client)) (sicl-client:*client* client) (environment (make-instance 'environment :client clie...
9b881a39133c93aea9b6dfa329baeeba63a50efa38b897f582d98e91eb448988
sbcl/sbcl
ucd.lisp
(in-package "SB-COLD") (declaim (optimize debug)) ;;; Common functions (defvar *output-directory* (merge-pathnames (make-pathname :directory '(:relative :up "output")) (make-pathname :directory (pathname-directory *load-truename*)))) (defparameter *unicode-character-database* (make-pathname :directory (pa...
null
https://raw.githubusercontent.com/sbcl/sbcl/fc686aef1c38ac4cea1897f545a06c339f67eca9/tools-for-build/ucd.lisp
lisp
Common functions copyright marks (non-ASCII characters) in the header; a non-ASCII character, an eszet, within a comment to act as an example. We can't in general assume that our host lisp will let us read those, and we can't portably write that we don't care about the text content of anything on a line after a ...
(in-package "SB-COLD") (declaim (optimize debug)) (defvar *output-directory* (merge-pathnames (make-pathname :directory '(:relative :up "output")) (make-pathname :directory (pathname-directory *load-truename*)))) (defparameter *unicode-character-database* (make-pathname :directory (pathname-directory *loa...
233b773c1b43f75eaf6a8ae84a64f3c2cb583187759c6edb5f528e3b2de91243
jxv/dino-rush
HUD.hs
module DinoRush.Effect.HUD where import Control.Lens (view) import Control.Monad (when) import Control.Monad.State (MonadState, gets) import DinoRush.Engine.Common import DinoRush.Engine.Play import DinoRush.Engine.Font import DinoRush.Effect.Renderer class Monad m => HUD m where drawHiscore :: m () drawScore ::...
null
https://raw.githubusercontent.com/jxv/dino-rush/f888bc05fe734ced2c49bec81f9c804b47c81069/library/DinoRush/Effect/HUD.hs
haskell
module DinoRush.Effect.HUD where import Control.Lens (view) import Control.Monad (when) import Control.Monad.State (MonadState, gets) import DinoRush.Engine.Common import DinoRush.Engine.Play import DinoRush.Engine.Font import DinoRush.Effect.Renderer class Monad m => HUD m where drawHiscore :: m () drawScore ::...
b9bc9ff2a1842b1a4699135e90be1f422a9caad175f22fb5944d5b4f56100401
fetburner/Coq2SML
cctac.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/plugins/cc/cctac.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i camlp4deps: "parsing/grammar.cma" ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file is the interface...
473b3c3f359563d7891b55aca601eda52df7218e9710b2587d73f89c53d4de81
jrclogic/SMCDEL
Examples.hs
module Main (main) where import Data.List import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck (expectFailure,(===)) import SMCDEL.Examples import SMCDEL.Examples.DiningCrypto import SMCDEL.Examples.DrinkLogic import SMCDEL.Examples.MuddyChildren import SMCDEL.Examples.DoorMat import SMCDEL.Examples....
null
https://raw.githubusercontent.com/jrclogic/SMCDEL/9d8af009e21a85464c4264a9d6072535095b5e07/test/Examples.hs
haskell
module Main (main) where import Data.List import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck (expectFailure,(===)) import SMCDEL.Examples import SMCDEL.Examples.DiningCrypto import SMCDEL.Examples.DrinkLogic import SMCDEL.Examples.MuddyChildren import SMCDEL.Examples.DoorMat import SMCDEL.Examples....
7d3767bb0a62f80321003d155b5572d7be97d534d760d47b7bdd558597564eb2
exoscale/clojure-kubernetes-client
apps_v1beta1_deployment_spec.clj
(ns clojure-kubernetes-client.specs.apps-v1beta1-deployment-spec (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.apps-v1beta1-rollback-config :refer :all] [clojure-kubernetes-client.specs.v1-label-selector :refer :all] ...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/apps_v1beta1_deployment_spec.clj
clojure
(ns clojure-kubernetes-client.specs.apps-v1beta1-deployment-spec (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.apps-v1beta1-rollback-config :refer :all] [clojure-kubernetes-client.specs.v1-label-selector :refer :all] ...
15a28a0b76fe7c928accfe77eb55542121d61ef81fb64228c21ed2c5260a6475
pirapira/coq2rust
db_printers.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/dev/db_printers.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp open Names let pp s =...
1f2c4a6867ce9180819b8f1c6f97062af7501b5364ed4c559621d92c4e747faa
yuanqing/code-problems
factorial.ml
let factorial = (* Because we have a closure, `ht` persists across calls to `factorial`. *) let ht = ref (Hashtbl.create 100) in let _ = Hashtbl.add (!ht) 0 (Big_int.big_int_of_int 1) in let max = ref 1 in fun (n:int) -> if n < 0 then failwith "n < 0" else let ht = !ht in try ...
null
https://raw.githubusercontent.com/yuanqing/code-problems/30eb34ad616146306cddc50594a47deff111f341/src/factorial/factorial.ml
ocaml
Because we have a closure, `ht` persists across calls to `factorial`. Check if `ht` contains the value of `factorial n`. Return it if so. Update `max`, and return the `result`.
let factorial = let ht = ref (Hashtbl.create 100) in let _ = Hashtbl.add (!ht) 0 (Big_int.big_int_of_int 1) in let max = ref 1 in fun (n:int) -> if n < 0 then failwith "n < 0" else let ht = !ht in try Hashtbl.find ht n with Not_found -> let rec aux i n = ...
587f413aff100002e058be1eea95adfc3a7c3083de7e4268721de7ab496e0365
arttuka/reagent-material-ui
crop_54.cljs
(ns reagent-mui.icons.crop-54 "Imports @mui/icons-material/Crop54 as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def crop-54 (create-svg-icon (e "path" #js {"d...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/crop_54.cljs
clojure
(ns reagent-mui.icons.crop-54 "Imports @mui/icons-material/Crop54 as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def crop-54 (create-svg-icon (e "path" #js {"d...
14fafff110c13a7dce978444208df150a21f3c000423538340c929d929c797f3
input-output-hk/cardano-wallet
AddressDerivation.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE RoleAnnotations # # LANGUAGE Scoped...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/80756f919d7811219e23632bbe59214e0f5e25f5/lib/wallet/src/Cardano/Wallet/Primitive/AddressDerivation.hs
haskell
# LANGUAGE GADTs # | License: Apache-2.0 Primitives for performing address derivation for some given schemes. This is where most of the crypto happens in the wallet and, it is quite important to ensure that the implementations match with other Cardano wallets The actual implementations are in the following modu...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE RoleAnnotations # # LANGUAGE ScopedTypeVariables # # LANGU...
5d011efdb78eb180c0254566d20a029adbf90688eda1caf3823930936d41fb53
vikram/lisplibraries
weblocks-demo-popover.lisp
(defpackage #:weblocks-demo-popover (:use :cl :weblocks :metatilities :weblocks-yarek) (:documentation "A web application based on Weblocks.")) (in-package :weblocks-demo-popover) (export '(start-weblocks-demo-popover stop-weblocks-demo-popover)) (defun start-weblocks-demo-popover (&rest args) "Starts the...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/contrib/yarek/examples/weblocks-demo-popover/weblocks-demo-popover.lisp
lisp
A sandbox store macro
(defpackage #:weblocks-demo-popover (:use :cl :weblocks :metatilities :weblocks-yarek) (:documentation "A web application based on Weblocks.")) (in-package :weblocks-demo-popover) (export '(start-weblocks-demo-popover stop-weblocks-demo-popover)) (defun start-weblocks-demo-popover (&rest args) "Starts the...
a9e9726b25d3acb64ed8928a40eafce7f5609dfe04909620169c3a4cdcde1aeb
futurice/haskell-mega-repo
People.hs
# LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE InstanceSigs # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # {-# LANGUAGE TypeOperators #-} module Futuqu.Rada.People where import Data.Fixed (Centi) impor...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/95fe8e33ad6426eb6e52a9c23db4aeffd443b3e5/futuqu/src/Futuqu/Rada/People.hs
haskell
# LANGUAGE TypeOperators # ----------------------------------------------------------------------------- Data ----------------------------------------------------------------------------- identifiers TODO: add power internal ID? personio power --------------------------------------------------------------------...
# LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE InstanceSigs # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Futuqu.Rada.People where import Data.Fixed (Centi) import Data.Time (addDays) ...
e28bdb34364fbfa9a86d7428dbc7c42b63dd6d139c42b8a78b5e3ad75766bab1
oakes/Nightcoders
auth.cljs
(ns nightcoders.auth (:require [goog.object :as gobj]) (:import goog.net.XhrIo)) (defn auth-user [user cb] (.send XhrIo "/auth" (fn [e] (cb (.isSuccess (.-target e)) (.. e -target getResponseText))) "POST" (.-id_token (.getAuthResponse user)))) (defn set-sign-in [cb] (gobj/set js/window ...
null
https://raw.githubusercontent.com/oakes/Nightcoders/c1b48129b08fdf1a0093878cc9b3249f44a5f732/src/cljs/nightcoders/auth.cljs
clojure
(ns nightcoders.auth (:require [goog.object :as gobj]) (:import goog.net.XhrIo)) (defn auth-user [user cb] (.send XhrIo "/auth" (fn [e] (cb (.isSuccess (.-target e)) (.. e -target getResponseText))) "POST" (.-id_token (.getAuthResponse user)))) (defn set-sign-in [cb] (gobj/set js/window ...
b031a1a28f22962d9960e9c142a8a6137177f488e864fb102e39d8edc6de0ddc
clojerl/clojerl
clojerl_ChunkedCons_SUITE.erl
-module(clojerl_ChunkedCons_SUITE). -include("clojerl.hrl"). -include("clj_test_utils.hrl"). -export([ all/0 , init_per_suite/1 , end_per_suite/1 ]). -export([ new/1 , count/1 , str/1 , is_sequential/1 , hash/1 , chunked/1 , seq/1 , equi...
null
https://raw.githubusercontent.com/clojerl/clojerl/aa35847ca64e1c66224867ca4c31ca6de95bc898/test/clojerl_ChunkedCons_SUITE.erl
erlang
------------------------------------------------------------------------------ Test Cases ------------------------------------------------------------------------------ We need to wrap the fun into a clojerl.Fn because of the need for multiple arities -----------------------------------------------------------------...
-module(clojerl_ChunkedCons_SUITE). -include("clojerl.hrl"). -include("clj_test_utils.hrl"). -export([ all/0 , init_per_suite/1 , end_per_suite/1 ]). -export([ new/1 , count/1 , str/1 , is_sequential/1 , hash/1 , chunked/1 , seq/1 , equi...
b2a69c4dec6bfde88cc86502d2fc7ce40fc8aa8dab00eddc05bc4c9d46b6c399
TDacik/Deadlock
abstraction_refinement.ml
* Functions for abstraction refinement of the lockset analysis * * Author : * * Author: Tomas Dacik *) open !Deadlock_top open Cil_types open Trace_utils open Locations module Stmts = Statement_utils * For function fn called at stmt return expression at this statement , that represents value of...
null
https://raw.githubusercontent.com/TDacik/Deadlock/1b9965c04416885678b5ba7712960412193fd8e1/src/lockset_analysis/abstraction_refinement.ml
ocaml
* Base is relevant if it is statically or dynamically variable of type that contains a lock TODO: If variable is still formal, continue deeper When we find some concrete value, create a minimal context of it ==== Extraction of pure inputs ==== Add only singleton values Extract non-locks pure inputs of funct...
* Functions for abstraction refinement of the lockset analysis * * Author : * * Author: Tomas Dacik *) open !Deadlock_top open Cil_types open Trace_utils open Locations module Stmts = Statement_utils * For function fn called at stmt return expression at this statement , that represents value of...
ba17d379e3200b9798afd9b533392c8601f57e78930eeb300991aa4cdd4dc340
budu/lobos
schema.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 which can be found in the file ; epl-v10.html at the root of this distribution. By using this software ; in any fashion, you are agreeing to be bound by the terms of this ; lice...
null
https://raw.githubusercontent.com/budu/lobos/6704f285a7870e84a838fe2e63307730e9d89443/src/lobos/schema.clj
clojure
The use and distribution terms for this software are covered by the epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. ----------------------------------...
Copyright ( c ) . All rights reserved . Eclipse Public License 1.0 which can be found in the file (ns lobos.schema "This namespace include the abstract schema data-structures, an handful of helpers to create them and the protocol to build the into an abstract syntax tree of implementation agnostic SQL st...
c4a43719d90a25ff56fdd52337911c64814b1bfd4e1421225b4f18d61369806b
mentat-collective/emmy
simpson38_test.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.numerical.quadrature.simpson38-test (:refer-clojure :exclude [+ - * /]) (:require [clojure.test :refer [is deftest testing use-fixtures]] [emmy.abstract.function :as f] [emmy.generic :as g :refer [+ - * /]] [emmy.numerical.quadrature...
null
https://raw.githubusercontent.com/mentat-collective/emmy/90a1de10e78187c70d546c3cfd63c8d32b783bed/test/emmy/numerical/quadrature/simpson38_test.cljc
clojure
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.numerical.quadrature.simpson38-test (:refer-clojure :exclude [+ - * /]) (:require [clojure.test :refer [is deftest testing use-fixtures]] [emmy.abstract.function :as f] [emmy.generic :as g :refer [+ - * /]] [emmy.numerical.quadrature...
7f88dfac83a2e0d45b323b59bfd65c5bc08f4183b38ea53684dec988f9b60b37
rudymatela/speculate
fun.hs
import Test.Speculate import Test.Speculate.Function.A100() main :: IO () main = speculate args { maxTests = 1000 , instances = [reifyInstances (undefined :: Int -> Int)] , constants = [ constant "map" (map :: (Int -> Int) -> [Int] -> [Int]) , constant "id" (id :: Int -> Int) , constant "." ...
null
https://raw.githubusercontent.com/rudymatela/speculate/8ec39747d03033db4349d554467d4b78bb72935d/eg/fun.hs
haskell
import Test.Speculate import Test.Speculate.Function.A100() main :: IO () main = speculate args { maxTests = 1000 , instances = [reifyInstances (undefined :: Int -> Int)] , constants = [ constant "map" (map :: (Int -> Int) -> [Int] -> [Int]) , constant "id" (id :: Int -> Int) , constant "." ...
dbec54122b6085c6da3be26b3f2598d0974aa87dc8bd2a21c984ec551430bfc7
atongen/setml
pubsub_tests.ml
open OUnit2 open Shared open Shared.Messages open Lib open Lib.Server_messages open Test_lib.Test_util let create_game pubsub = let game_id = Crypto.random_int 1_679_616 60_466_175 in Pubsub.empty_query pubsub ("insert into games (id) values (" ^ string_of_int game_id ^ ");"); game_id let setup_game pub...
null
https://raw.githubusercontent.com/atongen/setml/8afee909ba6656506a69f79fd8682b37f2d2928a/src/server_test/pubsub_tests.ml
ocaml
open OUnit2 open Shared open Shared.Messages open Lib open Lib.Server_messages open Test_lib.Test_util let create_game pubsub = let game_id = Crypto.random_int 1_679_616 60_466_175 in Pubsub.empty_query pubsub ("insert into games (id) values (" ^ string_of_int game_id ^ ");"); game_id let setup_game pub...
920c124c74c451d92ecf578f85bd2b193af8de212c8d2d25380b81eb6fbfc454
byteverse/byteslice
Cstrlen.hs
# language MagicHash # module Cstrlen ( cstringLength# ) where import GHC.Exts (cstringLength#)
null
https://raw.githubusercontent.com/byteverse/byteslice/30047357448bce846e5c74d0ae2f5e4d596dbbb6/src-ghc-cstrlen/Cstrlen.hs
haskell
# language MagicHash # module Cstrlen ( cstringLength# ) where import GHC.Exts (cstringLength#)
be508363805caf36f49b1c3f8cee42a080ca193b52d8b471488d5724209efefb
sile/proxy
proxy_restart.erl
%% @doc proxyが停止した時に再起動するためのモジュール. -module(proxy_restart). %%---------------------------------------------------------------------------------------------------------------------- %% Behaiviour %%---------------------------------------------------------------------------------------------------------------------- -beh...
null
https://raw.githubusercontent.com/sile/proxy/009418087d92ec44d25ae82462213f3792360f77/src/proxy_restart.erl
erlang
@doc proxyが停止した時に再起動するためのモジュール. ---------------------------------------------------------------------------------------------------------------------- Behaiviour ---------------------------------------------------------------------------------------------------------------------- -------------------------------------...
-module(proxy_restart). -behaviour(proxy). -export_type([ option/0, max_restart/0, restart_stop_fun/0 ]). -export([ init/1, handle_arg/2, handle_up/2, handle_message/2, handle_down/2, terminate/2 ]). Types & Macros & Records default : 5 d...
c3987ed8c064c2ccde26db16ac4a1ff22a69a5ad2921dccab6405783f4d1f5db
cram2/cram
gamma.lisp
Gamma functions , Thu Apr 27 2006 - 22:06 Time - stamp : < 2012 - 01 - 13 12:01:16EST gamma.lisp > ;; Copyright 2006 , 2007 , 2008 , 2009 , 2010 , 2011 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify it under the t...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/special-functions/gamma.lisp
lisp
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publi...
Gamma functions , Thu Apr 27 2006 - 22:06 Time - stamp : < 2012 - 01 - 13 12:01:16EST gamma.lisp > Copyright 2006 , 2007 , 2008 , 2009 , 2010 , 2011 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Software Fou...
f7d4c2b0e835c4cf0af64721eaf4f69aca6cc6dcf75e8dee61ba520464622a76
xclerc/ocamljava
bytecodegen.mli
* This file is part of compiler . * Copyright ( C ) 2007 - 2015 . * * compiler is free software ; you can redistribute it and/or modify * it under the terms of the Q Public License as published by * ( with a change to choice of law ) . * * compiler is distributed in the hope that it ...
null
https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/compiler/javacomp/bytecodegen.mli
ocaml
* Returns the fields for the current class, as a list of fields along with the static block initializing the fields. These fields contain the method handles for the functions. * Translates the passed macroinstruction-level function into its Java-bytecode equivalent. * Compiles the surrogate (i.e. unboxing...
* This file is part of compiler . * Copyright ( C ) 2007 - 2015 . * * compiler is free software ; you can redistribute it and/or modify * it under the terms of the Q Public License as published by * ( with a change to choice of law ) . * * compiler is distributed in the hope that it ...
b909051cd0d959b08b89d8af7619ae9b1a53af0d83d91d07e9c5f2c3c769fbd3
mbj/stratosphere
FieldToMatchProperty.hs
module Stratosphere.WAF.XssMatchSet.FieldToMatchProperty ( FieldToMatchProperty(..), mkFieldToMatchProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data FieldToM...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/waf/gen/Stratosphere/WAF/XssMatchSet/FieldToMatchProperty.hs
haskell
module Stratosphere.WAF.XssMatchSet.FieldToMatchProperty ( FieldToMatchProperty(..), mkFieldToMatchProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data FieldToM...
f5032550ebc3600094350c8b6f04670deb63187e3b3c7c2696d0dd79994b517d
stumpwm/mahogany
view.lisp
(in-package :mahogany/tree) (defclass view-frame (frame) ((view :initarg :view :accessor frame-view :initform nil :documentation "The client of the frame") (modes :initarg :modes :accessor frame-modes))) (defun fit-view-into-frame (view frame) "Make the view fit in the dimensions of the frame" (setf...
null
https://raw.githubusercontent.com/stumpwm/mahogany/3d8a4e761c5b17496a1b9c02a3562b8cedcd351e/lisp/tree/view.lisp
lisp
(in-package :mahogany/tree) (defclass view-frame (frame) ((view :initarg :view :accessor frame-view :initform nil :documentation "The client of the frame") (modes :initarg :modes :accessor frame-modes))) (defun fit-view-into-frame (view frame) "Make the view fit in the dimensions of the frame" (setf...
8f1dfc6be45ac5b2e0f818ebc8457456322982668df4f0b93efebf1c45fcca18
Abhiroop/HaskAl
FingerTree.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # module FingerTree where import Data.Monoid data Tree v a = Leaf v a | Branch v (Tree v a) (Tree v a) newtype Size = Size {getSize :: Int} -------------List with random acces---------------- toList :: Tree v a -> [a] toList (Leaf _ a) = [a] toList (B...
null
https://raw.githubusercontent.com/Abhiroop/HaskAl/901cb7d13296d42061b3daf7a355de600065d295/FingerTree.hs
haskell
-----------List with random acces---------------- leaf :: a -> Tree Size a branch x y = Branch (Size (tag x + tag y)) x y tag (Leaf v _) = getSize v tag (Branch v _ _) = getSize v ---------Priority Queue with O(log n) lookup tag' :: Tree Priority a -> Int tag' (Leaf v _) = getPriority v tag' (Branch v _ ...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # module FingerTree where import Data.Monoid data Tree v a = Leaf v a | Branch v (Tree v a) (Tree v a) newtype Size = Size {getSize :: Int} toList :: Tree v a -> [a] toList (Leaf _ a) = [a] toList (Branch _ x y) = toList x ++ toList y leaf a = Leaf...
cb5e9ea07d71d7b1b0ca59ca25d3afdce3dcc845816c34d0eb697e6d1ea285cc
josefs/Gradualizer
map_fail.erl
-module(map_fail). -compile([export_all, nowarn_export_all]). -spec mandatory_fail(#{a => b}) -> #{a := b}. mandatory_fail(M) -> M.
null
https://raw.githubusercontent.com/josefs/Gradualizer/208f5816b0157f282212fc036ba7560f0822f9fc/test/should_fail/map_fail.erl
erlang
-module(map_fail). -compile([export_all, nowarn_export_all]). -spec mandatory_fail(#{a => b}) -> #{a := b}. mandatory_fail(M) -> M.
c548a6256272469be2d74dcabeda48def54ca45f065dd85460b0f0edef19decf
haskell-repa/repa
Packable.hs
module Data.Repa.Convert.Internal.Packable ( Packable (..) , Unpackable (..)) where import Data.Repa.Convert.Internal.Format import Data.Repa.Convert.Internal.Packer import Data.Repa.Convert.Internal.Unpacker import Data.Word import GHC.Exts -- | Class of storage formats that can have values ...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-convert/Data/Repa/Convert/Internal/Packable.hs
haskell
| Class of storage formats that can have values packed and unpacked The methods are written using continuations to make it easier for | Pack a value into a buffer using the given format. ^ Storage format. ^ Value to pack. ^ Packer that can write the value. | Low level packing function for the given forma...
module Data.Repa.Convert.Internal.Packable ( Packable (..) , Unpackable (..)) where import Data.Repa.Convert.Internal.Format import Data.Repa.Convert.Internal.Packer import Data.Repa.Convert.Internal.Unpacker import Data.Word import GHC.Exts from foreign bufferes . GHC to optimise its...
6f7428d2977b907968c0a84d76e12f5dbec78c1db766e6dc21b98fe744cb6877
kuhumcst/stucco
drag.cljs
(ns dk.cst.stucco.dom.drag "A functional take on drag-and-drop. All successful drops execute the code `(drop-fn (drag-fn))` in order to effectuate the necessary state changes. Certain functions are merely required to satisfy the HTML drag-and-drop API. Such functions have been def'ed rather than defn'ed to m...
null
https://raw.githubusercontent.com/kuhumcst/stucco/46f46d8b394b72e531000429d47456e520e1b327/src/dk/cst/stucco/dom/drag.cljs
clojure
Store temporary data in the drag-data atom keyed to the `drag-id`. TODO: what about other effects, i.e. copy? The ghost is so we can differentiate source and the drag image styling. Modifying a dragged element after an onDragStart event will glitch both The drag-parent modifier class is also necessary to disable :...
(ns dk.cst.stucco.dom.drag "A functional take on drag-and-drop. All successful drops execute the code `(drop-fn (drag-fn))` in order to effectuate the necessary state changes. Certain functions are merely required to satisfy the HTML drag-and-drop API. Such functions have been def'ed rather than defn'ed to m...
00083ad7ae790f12fa6c0fb8b369f6569f857c3dc6f6df5604cf6ad0be1255f0
noelmarkham/learn-you-a-haskell-exercises
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/noelmarkham/learn-you-a-haskell-exercises/a663197be2c946b5d05beea8a881829e413d411c/08-making-our-own-types-and-typeclasses.hs
haskell
data Suit = data Digit = data Card = We should be able to provide a function which returns the higher ranked card: 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 data Coin =
- 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...
97d8d9765f67faa8891e703cda3a1af7e9dab2c84a54cb975bd3a411bffb99c2
erlang-ls/erlang_ls
diagnostics_unused_macros.erl
-module(diagnostics_unused_macros). -export([main/0]). -define(USED_MACRO, used_macro). -define(UNUSED_MACRO, unused_macro). -define(UNUSED_MACRO_WITH_ARG(C), C). MOD was incorrectly reported as unused ( # 1021 ) main() -> ?MOD:foo(), ?USED_MACRO.
null
https://raw.githubusercontent.com/erlang-ls/erlang_ls/d5e02ef741f0007d8d76ed405a3259de23841a95/apps/els_lsp/priv/code_navigation/src/diagnostics_unused_macros.erl
erlang
-module(diagnostics_unused_macros). -export([main/0]). -define(USED_MACRO, used_macro). -define(UNUSED_MACRO, unused_macro). -define(UNUSED_MACRO_WITH_ARG(C), C). MOD was incorrectly reported as unused ( # 1021 ) main() -> ?MOD:foo(), ?USED_MACRO.
9051af7813480f8dd133c40efd58d8ed642b25503b7a9518840c8b263c6f7eda
timbertson/passe
app_cache.ml
open Js_of_ocaml open Js open Passe module Log = (val Logging.log_module "app_cache") module Promise = struct class type ['a] promise = object method _then: ('a t -> 'b t) -> 'b promise t meth method _catch: (error t -> unit) -> unit promise t meth end end module ServiceWorker = struct class type setting = obj...
null
https://raw.githubusercontent.com/timbertson/passe/467a79ea0cd7b08a97b52be3bd1307a3bdf55799/src/www/app_cache.ml
ocaml
open Js_of_ocaml open Js open Passe module Log = (val Logging.log_module "app_cache") module Promise = struct class type ['a] promise = object method _then: ('a t -> 'b t) -> 'b promise t meth method _catch: (error t -> unit) -> unit promise t meth end end module ServiceWorker = struct class type setting = obj...
49d4b7b2fd16fa3dd2fb9db592ee8fe4477fd345e9518f4ea3858a0d4fab0f1d
psibi/tldr-hs
Tldr.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE LambdaCase # module Tldr ( parsePage , renderPage , ConsoleSetting(..) , defConsoleSetting , headingSetting , toSGR , renderNode , changeConsoleSetting ) where import CMark import Control.Monad (forM_) import Data.Attoparsec.Text import Data.Text hiding ...
null
https://raw.githubusercontent.com/psibi/tldr-hs/14117b0dc47524b3ecb7892cfbb70db9899c09d6/src/Tldr.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE LambdaCase # module Tldr ( parsePage , renderPage , ConsoleSetting(..) , defConsoleSetting , headingSetting , toSGR , renderNode , changeConsoleSetting ) where import CMark import Control.Monad (forM_) import Data.Attoparsec.Text import Data.Text hiding (cons) import GHC.IO.Handle (Handle...
8d65ed5d2c0b3f8569ee37f8345b9e35e89854c7713a20c130f5166bd4fa05e4
binaryage/chromex
dom.cljs
(ns chromex.ext.dom (:require-macros [chromex.ext.dom :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn open-or-closed-shadow-root* [config element] (gen-wrap :function ::open-or-clos...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/dom.cljs
clojure
(ns chromex.ext.dom (:require-macros [chromex.ext.dom :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn open-or-closed-shadow-root* [config element] (gen-wrap :function ::open-or-clos...
2fa535f547a24046e0d8250985cc81308a727560738a0ffad452b4dcc15e4aa1
swannodette/mies-om
project.clj
(defproject mies-om/lein-template "0.5.5" :description "A minimal Om project template" :url "-om" :license {:name "Eclipse Public License" :url "-v10.html"} :scm {:name "git" :url "-om"} :eval-in-leiningen true)
null
https://raw.githubusercontent.com/swannodette/mies-om/4a9fde582b083f59dcb59761391a8a66713a8380/project.clj
clojure
(defproject mies-om/lein-template "0.5.5" :description "A minimal Om project template" :url "-om" :license {:name "Eclipse Public License" :url "-v10.html"} :scm {:name "git" :url "-om"} :eval-in-leiningen true)
d69da4578af06b9c2f63d644251ac2f9055f3ae4e8b2069e7a3d7b7ed238356f
screenshotbot/screenshotbot-oss
commit-graph.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 /. (uiop:define-package :screenshotbot/api/commit-graph (:use #:cl #:alexandri...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/fae883e0f4ec238e4cbefb843e3d5ece1a3a6c22/src/screenshotbot/api/commit-graph.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc. do nothing with this for the moment
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 /. (uiop:define-package :screenshotbot/api/commit-graph (:use #:cl #:alexandria #:screenshotbot/api/core #:screenshotbot...
07c66d15812979ac860129c6be9efc0dcaff73e9f35c93e3852ce7108480602f
ghl3/dataframe
core_test.clj
(ns dataframe.core-test (:refer-clojure :exclude [group-by]) (:require [clojure.test :refer :all] [dataframe.core :refer :all] [dataframe.frame :as frame])) ; ; ;(expect (more-of df ; ; ) ; ( let [ df ( frame / frame { : a ' ( 1 2 3 ) : b ' ( 2 4 6 ) } ) ...
null
https://raw.githubusercontent.com/ghl3/dataframe/31212c14669e31797ec13cde650a61fd97dbe6d2/test/dataframe/core_test.clj
clojure
(expect (more-of df )
(ns dataframe.core-test (:refer-clojure :exclude [group-by]) (:require [clojure.test :refer :all] [dataframe.core :refer :all] [dataframe.frame :as frame])) ( let [ df ( frame / frame { : a ' ( 1 2 3 ) : b ' ( 2 4 6 ) } ) a - min ( with - df- > f ( frame / filter : a...
f4a8d758f8c02eeff153898e04c913f9b0796295ce55aa3ab99eb171a27602f3
jumarko/clojure-experiments
157_indexing_sequences.clj
(ns four-clojure.157-indexing-sequences ". Transform a sequence into a sequence of pairs containing the original elements along with their index.") (defn with-index [xs] (map-indexed (fn [idx val] [val idx]) xs)) (= (with-index [:a :b :c]) [[:a 0] [:b 1] [:c 2]]) (= (with-index [0 1 3]) '((0 0) ...
null
https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/four_clojure/157_indexing_sequences.clj
clojure
(ns four-clojure.157-indexing-sequences ". Transform a sequence into a sequence of pairs containing the original elements along with their index.") (defn with-index [xs] (map-indexed (fn [idx val] [val idx]) xs)) (= (with-index [:a :b :c]) [[:a 0] [:b 1] [:c 2]]) (= (with-index [0 1 3]) '((0 0) ...
6ea6ce20a38a55e4a0c52dcace3f3bbcf47bbb8a467fecd0b810f5323092ef5c
McCLIM/McCLIM
repaint.lisp
;;; --------------------------------------------------------------------------- ;;; License: LGPL-2.1+ (See file 'Copyright' for details). ;;; --------------------------------------------------------------------------- ;;; ( c ) Copyright 1998 - 2000 by < > ( c ) Copyright 2000 by Iban Hatchondo < > ( c ...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/55df64f492437696751bcdae74ab43439cea4dd1/Core/windowing/repaint.lisp
lisp
--------------------------------------------------------------------------- License: LGPL-2.1+ (See file 'Copyright' for details). --------------------------------------------------------------------------- --------------------------------------------------------------------------- Input protocol functions. ...
( c ) Copyright 1998 - 2000 by < > ( c ) Copyright 2000 by Iban Hatchondo < > ( c ) Copyright 2000 by < > ( c ) Copyright 2000,2014 by < > ( c ) Copyright 2022 by < > The Repaint Protocol . (in-package #:clim-internals) (defmethod handle-event ((sheet basic-sheet) (event window-repain...
74ff312136c585c527deea8c709df7e19e716f71925150e9476b4c792dacdc62
xoken/xoken-node
PeerManager.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # module Network.Xoken.Node.P2P.PeerManag...
null
https://raw.githubusercontent.com/xoken/xoken-node/24e079680555a8d8f9600d1c9ff5c08ef975d149/node/src/Network/Xoken/Node/P2P/PeerManager.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings # get enlisted peer stale peer, removing implicitly this can be optimized must be the last step, as blocking Fatal error, can only happen in case of invalid leaf nodes could be a previously aborted block being reprocessed else bl...
# LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # module Network.Xoken.Node.P2P.PeerManager ( createSocket, setupSeedPeerConnection, runTMTDaemon, runBlockSync, ) where i...
a3b03b5b476165497c03be027615d14eff3af45a424e75dfdba2a1dfc2acbeca
nyu-acsys/drift
dotprod.ml
let make_array n = n let arraysize src = src let update des i x = assert (0 <= i && i < des) let sub src i = assert (0 <= i && i < src); 0 let rec dotprod_aux n v1 v2 i sum = if i = n then sum else dotprod_aux n v1 v2 (i+1) (sum + (sub v1 i) * (sub v2 i)) let dotprod v1 v2 = dotprod_aux (arraysize v1) v1 v2 0 ...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/high/dotprod.ml
ocaml
-:{v:Int|true} -:{v:Int|true}
let make_array n = n let arraysize src = src let update des i x = assert (0 <= i && i < des) let sub src i = assert (0 <= i && i < src); 0 let rec dotprod_aux n v1 v2 i sum = if i = n then sum else dotprod_aux n v1 v2 (i+1) (sum + (sub v1 i) * (sub v2 i)) let dotprod v1 v2 = dotprod_aux (arraysize v1) v1 v2 0 ...
a49f05c65bf68810bbfc12f735882969b6f149b1224a6cd7f8907bc11862cab5
pupcus/quartz-clj
core.clj
(ns quartz-clj.core (:import [org.quartz JobBuilder])) ;; ;; NOTE: ;; on reload/recompile to reset *scheduler* to currently running scheduler run this at the repl: ( swap ! * scheduler * ( fn [ old ] ( org.quartz.impl . StdSchedulerFactory / getDefaultScheduler ) ) ) ISE : use defonce to make the above stateme...
null
https://raw.githubusercontent.com/pupcus/quartz-clj/4a0c7c59c3c8a482b4b701a839cbccbe543a3051/src/main/clojure/quartz_clj/core.clj
clojure
NOTE: on reload/recompile to reset *scheduler* to currently running scheduler run this at the repl: PRIVATE: Handle options value as clojure hash-map PUBLIC: Work with scheduler PUBLIC: Low Level Public Interface WARNING: to make a quartz job stateful it is best to apply the @DisallowConcurrentExecution an...
(ns quartz-clj.core (:import [org.quartz JobBuilder])) ( swap ! * scheduler * ( fn [ old ] ( org.quartz.impl . StdSchedulerFactory / getDefaultScheduler ) ) ) ISE : use defonce to make the above statement unnecessary (defonce ^:dynamic *scheduler* (atom nil)) (defn- as-data-map [m] (org.quartz.JobDataMap. ...
b49277ce7c4edf0adb972604fb1ec1eb5f9671ee417e92e95ce4da3d70109519
clj-commons/seesaw
reorderable_listbox.clj
Copyright ( c ) , 2012 . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this ; distribution. ; By using this software in any fashion, you are agreeing to be ...
null
https://raw.githubusercontent.com/clj-commons/seesaw/4ca89d0dcdf0557d99d5fa84202b7cc6e2e92263/test/seesaw/test/examples/reorderable_listbox.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not rem...
Copyright ( c ) , 2012 . All rights reserved . (ns seesaw.test.examples.reorderable-listbox (:use seesaw.core seesaw.test.examples.example) (:require [seesaw.dnd :as dnd])) (defn list-with-elem-at-index "Given a sequence cur-order and elem-to-move is one of the items within it, return a vector th...
1b6f838fbe29be8bf591279d4fac332b11e01e84c2cb2e8fc5c02037f32a9f14
mfikes/fifth-postulate
ns268.cljs
(ns fifth-postulate.ns268) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns268.cljs
clojure
(ns fifth-postulate.ns268) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
f1b1fe0232037195c4723375d379770d990f8289bde0dcc58d452d2af703544e
janestreet/universe
record.mli
open! Base open! Import type t val of_label_declarations : label_declaration list -> t val to_strs : t -> type_name:label -> structure_item list module Inline : sig val to_strs : t -> type_name:label -> constructor_name:Name.t -> wildcard:pattern option -> loc:location -> structure_item li...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_accessor/src/record.mli
ocaml
open! Base open! Import type t val of_label_declarations : label_declaration list -> t val to_strs : t -> type_name:label -> structure_item list module Inline : sig val to_strs : t -> type_name:label -> constructor_name:Name.t -> wildcard:pattern option -> loc:location -> structure_item li...
0f3c248a561642cb5a526df6a1394c6d56f213a64aa21ab096f7cfd711914d90
orthecreedence/http-parse
package.lisp
(defpackage :http-parse (:use :cl) (:export #:http #:http-version #:http-headers #:http-store-body #:http-force-stream #:http-body #:http-header-callback #:http-body-callback #:http-request #:http-method #:...
null
https://raw.githubusercontent.com/orthecreedence/http-parse/adf597b1576518df07b6af1a4990723a1e02ac01/package.lisp
lisp
(defpackage :http-parse (:use :cl) (:export #:http #:http-version #:http-headers #:http-store-body #:http-force-stream #:http-body #:http-header-callback #:http-body-callback #:http-request #:http-method #:...
30cef217e9a5bd3b87adfa408f63ede276d853b86c1837b3d2b87ff60e502cfd
AshleyYakeley/Truth
Type.hs
module Pinafore.Language.Type.Storable.Type where import Data.Shim import Language.Expression.Common import Language.Expression.Dolan import Pinafore.Base import Pinafore.Language.Name import Pinafore.Language.Type.Family import Pinafore.Language.Type.Type import Shapes type Storability :: forall (dv :: DolanVariance...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/c1c9e70f2789ba8bd336c06fd1bdc0f41675b9c1/Pinafore/pinafore-language/lib/Pinafore/Language/Type/Storable/Type.hs
haskell
module Pinafore.Language.Type.Storable.Type where import Data.Shim import Language.Expression.Common import Language.Expression.Dolan import Pinafore.Base import Pinafore.Language.Name import Pinafore.Language.Type.Family import Pinafore.Language.Type.Type import Shapes type Storability :: forall (dv :: DolanVariance...
8b88e6823543fe1e2bfaa47dce630d8ae1a043f031b5cf37d640a6f1b1c41ef3
dyzsr/ocaml-selectml
test.ml
(* TEST *) let (!?) = List.to_seq let (!!) = List.of_seq let cmp = compare let head s = match s() with Seq.Cons(x,_) -> x | _ -> assert false let poison : _ Seq.t = fun () -> failwith "Poisoned" (* Standard test case *) let () = assert ([2;4] = (List.to_seq [1;2;3;4;5] |> Seq.filter (fun x -...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/lib-seq/test.ml
ocaml
TEST Standard test case unfold concat [cycle empty] is empty. [cycle] of a singleton. [cycle] of a longer sequence. [iterate] [init] [fold_lefti] [scan] [scan] [is_empty] [uncons] [repeat] [forever] [take] [take_while] [take_while] [drop] [sorted_merge] [sorted_merge] should n...
let (!?) = List.to_seq let (!!) = List.of_seq let cmp = compare let head s = match s() with Seq.Cons(x,_) -> x | _ -> assert false let poison : _ Seq.t = fun () -> failwith "Poisoned" let () = assert ([2;4] = (List.to_seq [1;2;3;4;5] |> Seq.filter (fun x -> x mod 2 = 0) |> List.of_seq))...