_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
95b942658ace7c60dd107440a610cc76b43ddd8cbd95c0f6c4fc5b7bf6589ef3
mbg/hoop
MiscInstances.hs
module Language.Hoop.CodeGen.MiscInstances ( genMiscInstances ) where import Language.Haskell.TH import Language.Haskell.TH.Syntax import Language.Hoop.StateDecl import Language.Hoop.Constructor import Language.Hoop.CodeGen.Interop import Language.Hoop.CodeGen.Shared import Language.Hoop.CodeGen.NewInstance {- ...
null
https://raw.githubusercontent.com/mbg/hoop/98a53bb1db66b06f9b5d3e5242eed336f908ad18/src/Language/Hoop/CodeGen/MiscInstances.hs
haskell
Misc. Instances | Generates a caluse which extracts the data from an object's constructor. | Generates a function which extracts the data from an object's constructors. | Generates an instance of the `Object' class. represents the data of this object represents the data of the parent represents the parent o...
module Language.Hoop.CodeGen.MiscInstances ( genMiscInstances ) where import Language.Haskell.TH import Language.Haskell.TH.Syntax import Language.Hoop.StateDecl import Language.Hoop.Constructor import Language.Hoop.CodeGen.Interop import Language.Hoop.CodeGen.Shared import Language.Hoop.CodeGen.NewInstance gen...
4d348e07fea10e24814f25a35f8f69663912aa0609d5842b5ab01da9e125c52c
hercules-ci/hercules-ci-agent
EffectTask.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveAnyClass #-} module Hercules.API.Agent.Effect.EffectTask where import Control.Applicative import Control.Lens (at, (%~)) import qualified Data.Aeson as A import Data.Aeson.Lens (_Object) import Hercules.API.Prelude import Hercules.API.Task (Task) data EffectTask = EffectTask...
null
https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/be8142e7f38eba5e3805f21d5b6423ce7239e0f0/hercules-ci-api-agent/src/Hercules/API/Agent/Effect/EffectTask.hs
haskell
# LANGUAGE DeriveAnyClass #
# LANGUAGE DataKinds # module Hercules.API.Agent.Effect.EffectTask where import Control.Applicative import Control.Lens (at, (%~)) import qualified Data.Aeson as A import Data.Aeson.Lens (_Object) import Hercules.API.Prelude import Hercules.API.Task (Task) data EffectTask = EffectTask { id :: Id (Task EffectTask),...
43b468f8b0c0428e239ba3742091a6ce7c485531b43948a9e95a149508e3db0d
liquidz/antq
build.clj
(ns build (:require [build-edn.core :as build-edn])) (def ^:private config {:lib 'com.github.liquidz/antq :version "2.2.{{git/commit-count}}" :description "Point out your outdated dependencies" :main 'antq.core :documents [{:file "CHANGELOG.adoc" :match "Unreleased" :...
null
https://raw.githubusercontent.com/liquidz/antq/a52b3cc9fe095d2fb2b94863f2163f9bb3ee9f4b/build.clj
clojure
NOTE: To include org.slf4j/slf4j-nop NOTE: does not contain src/leiningen
(ns build (:require [build-edn.core :as build-edn])) (def ^:private config {:lib 'com.github.liquidz/antq :version "2.2.{{git/commit-count}}" :description "Point out your outdated dependencies" :main 'antq.core :documents [{:file "CHANGELOG.adoc" :match "Unreleased" :...
86cb973eb8065d8def20cc76ece6d98905ff5f3f462c9dab4ee75d77f9396060
kowainik/tomland
Spec.hs
module Main (main) where import Test.Hspec (hspec, parallel) import Test.Hspec.Hedgehog (modifyMaxDiscardRatio) import Test.Toml.Codec (codecSpec) import Test.Toml.Parser (parserSpec) import Test.Toml.Type (typeSpec) Default QuickCheck discard Ratio is 10 while is 100 . So we need to modify it manually in here...
null
https://raw.githubusercontent.com/kowainik/tomland/2b4bcc465b79873a61bccfc7131d423a9a0aec1d/test/Spec.hs
haskell
module Main (main) where import Test.Hspec (hspec, parallel) import Test.Hspec.Hedgehog (modifyMaxDiscardRatio) import Test.Toml.Codec (codecSpec) import Test.Toml.Parser (parserSpec) import Test.Toml.Type (typeSpec) Default QuickCheck discard Ratio is 10 while is 100 . So we need to modify it manually in here...
a4c63a8ccb579ed143224866a7cf10831575abcf292bcda33fa08efe502b2f8e
jaredloomis/Haskell-OpenGL
HasPosition.hs
{-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE FlexibleInstances # module Engine.Core.HasPosition ( HasPosition(..), HasRotation(..), HasVelocity(..) ) where import Data.Vec import Graphics.Rendering.OpenGL.Raw (GLfloat) -- | A class for types that have a position -- that can be retrieved and set. cla...
null
https://raw.githubusercontent.com/jaredloomis/Haskell-OpenGL/5c7363bbc07c5064e49b608d689cda2cab99f3eb/src/Engine/Core/HasPosition.hs
haskell
# LANGUAGE TypeSynonymInstances # | A class for types that have a position that can be retrieved and set. | A class for types that have a rotation that can be retrieved and set. # MINIMAL getRot, setRot # | A class for types that have a velocity that can be retrieved and set.
# LANGUAGE FlexibleInstances # module Engine.Core.HasPosition ( HasPosition(..), HasRotation(..), HasVelocity(..) ) where import Data.Vec import Graphics.Rendering.OpenGL.Raw (GLfloat) class HasPosition p where getPos :: p -> Vec3 GLfloat setPos :: p -> Vec3 GLfloat -> p movePos :: p -> Vec3 G...
49cca635edf902611c65bb95b6a0219bd013f917500ee5ea801a79c2db107469
den1k/vimsical
async.clj
(ns vimsical.backend.util.async (:require [clojure.core.async :as a])) ;; * ;; (defn new-error-chan [n] (a/chan n (map identity) identity)) ;; ;; * Blocks ;; (defmacro go-try [& body] `(a/go (try (do ~@body) (catch Throwable t# t#)))) (defmacro thread-try [& body] `(a/thread (t...
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/backend/vimsical/backend/util/async.clj
clojure
* Blocks
(ns vimsical.backend.util.async (:require [clojure.core.async :as a])) * (defn new-error-chan [n] (a/chan n (map identity) identity)) (defmacro go-try [& body] `(a/go (try (do ~@body) (catch Throwable t# t#)))) (defmacro thread-try [& body] `(a/thread (try (do ~@body) ...
fc45efa8c27a05f9b01f657ed691ea8b10c79415f247cac93bc318e71618a6fc
MyDataFlow/ttalk-server
ejabberd_zlib.erl
%%%---------------------------------------------------------------------- %%% File : ejabberd_zlib.erl Author : < > Purpose : Interface to zlib Created : 19 Jan 2006 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne %%% %%% This program is free software; you can redistribute it and/...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/ejabberd_zlib.erl
erlang
---------------------------------------------------------------------- File : ejabberd_zlib.erl This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even...
Author : < > Purpose : Interface to zlib Created : 19 Jan 2006 by < > ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU G...
cee16bd30ff55a7ef608de594ab1f4e13e9ce42c0f260b91fd8ac21a9d8ec278
ayazhafiz/plts
language.ml
open Util open Util.Error (** Types *) type ty = A type variable present in the context . First parameter is the index of the type name in the context , second parameter is the length of the context at the time of variable addition , checked during printing for validation . type name in the contex...
null
https://raw.githubusercontent.com/ayazhafiz/plts/59b3996642f4fd5941c96a4987643303acc3dee6/tapl/14-with_exceptions_full/language.ml
ocaml
* Types An unbound type identifier. A function type, T -> T A variable "x" deBruijn index length of context checked for validation A function definition "λx: T. <definition>" name hint A function application "(λx: T. <definition>)(y)" A condition/then/else expression case <term> (| <str = str> ==> <...
open Util open Util.Error type ty = A type variable present in the context . First parameter is the index of the type name in the context , second parameter is the length of the context at the time of variable addition , checked during printing for validation . type name in the context, second par...
2896c50fa46e33b76cea08ca261f20a4a1ff03ba831dddff3a507507eb9255e9
pflanze/chj-schemelib
show.scm
Copyright 2016 - 2020 by < > ;;; This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License ( GPL ) as published by the Free Software Foundation , either version 2 of the License , or ;;; (at your option) any later version. (require dot...
null
https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/show.scm
scheme
This file is free software; you can redistribute it and/or modify (at your option) any later version. dot-oo depends on cj-env already, and we want to add on/registry.show : ^ now we have to always load it. But, have debuggable-promise-everywhere now which is optional. XX if not struct. ugly implicit assump...
Copyright 2016 - 2020 by < > it under the terms of the GNU General Public License ( GPL ) as published by the Free Software Foundation , either version 2 of the License , or (require dot-oo cj-struct (cj-source-util-2 assert) (scheme-meta self-quoting?) (cj-gambit-s...
5b1de8a02097440000d4dbfe0b58e22f6d09ce75f9617e66a502a163f55fbcbe
facebook/pyre-check
errorsEnvironmentTest.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/b3f905c98528f4d0fce3da5e188546641aa28df8/source/analysis/test/errorsEnvironmentTest.ml
ocaml
Note that the output is always sorted, we can depend on this in tests validate initial state update and validate new errors validate initial state update and validate new errors The structure: * /root/check <- pyre is meant to analyze here * /root/check/search <- this is added to the search path, han...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
652c77612bf57351589708fb4b0e9bc498d8ce0d83af75d682c5afe419aad9ab
drewr/postal
main.clj
Copyright ( c ) ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;; restriction, including without limitation the rights to use, ;; copy, modify, merge, publish, distrib...
null
https://raw.githubusercontent.com/drewr/postal/7606a66c10b66abd3476c6f4c828fb4b87d3792d/test/postal/test/main.clj
clojure
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell Software is furnished to do so, subject to the following condit...
Copyright ( c ) files ( the " Software " ) , to deal in the Software without copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , (ns postal.test.main (:use [postal....
e46fa98765c59dc6b9170dbb67f52fd4be494085ecba8162563caa5ec171aa0a
spawngrid/htoad
htoad_io.erl
-module(htoad_io). -include_lib("htoad/include/htoad.hrl"). -include_lib("htoad/include/toadie.hrl"). -include_lib("htoad/include/stdlib.hrl"). -rules([init, print]). init(Engine, #init{}) -> lager:debug("Initialized htoad_io"), Engine. print(Engine, {print, Text}) -> io:format(Text), Engine.
null
https://raw.githubusercontent.com/spawngrid/htoad/f0c7dfbd911b29fb0c406b7c26606f553af11194/apps/htoad/src/htoad_io.erl
erlang
-module(htoad_io). -include_lib("htoad/include/htoad.hrl"). -include_lib("htoad/include/toadie.hrl"). -include_lib("htoad/include/stdlib.hrl"). -rules([init, print]). init(Engine, #init{}) -> lager:debug("Initialized htoad_io"), Engine. print(Engine, {print, Text}) -> io:format(Text), Engine.
226cffd86d9023fc46b94f15db90c9689bdbe668a50e47bec9e7816348877499
elaforge/karya
Patch.hs
Copyright 2021 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt module Perform.Sc.Patch (Patch(..), c_pitch) where import qualified GHC.Generics as Generics import qualified Util.Pretty as Pretty import qualified Derive.ScoreT as ScoreT import qualif...
null
https://raw.githubusercontent.com/elaforge/karya/99194874139230dbb9c4d1918082f5a65d2a4d90/Perform/Sc/Patch.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt | Path to the scsyndef file. This is needed to tell scserver to load it.
Copyright 2021 module Perform.Sc.Patch (Patch(..), c_pitch) where import qualified GHC.Generics as Generics import qualified Util.Pretty as Pretty import qualified Derive.ScoreT as ScoreT import qualified Perform.Sc.Note as Note import Global data Patch = Patch { name :: !Note.PatchName , fil...
8ee40b7b5092d11f8442c68e1ee88c0c80a62217f3acb18a069ac578ce59244e
mooreryan/pasv
cli.ml
open! Core open! Cmdliner open Version module Converter = struct let aligner = let aligner_parser s = Arg.parser_of_kind_of_string ~kind:"clustalo, mafft, or a direct path to either program" Runners.Msa.aligner_of_string s in let aligner_printer : Runners.Msa.aligner Arg.printer = ...
null
https://raw.githubusercontent.com/mooreryan/pasv/218d3bbd66069b124e255db8ff0d7fedc34a7428/lib/cli.ml
ocaml
aka non-zero, positive integer standard 'EXAMPLES' section This is the module's main term.
open! Core open! Cmdliner open Version module Converter = struct let aligner = let aligner_parser s = Arg.parser_of_kind_of_string ~kind:"clustalo, mafft, or a direct path to either program" Runners.Msa.aligner_of_string s in let aligner_printer : Runners.Msa.aligner Arg.printer = ...
247b8b8c80994acfdb70a80c5ab98f0b7ec75d5ca7d3d010bdabc14244d5cb76
rmculpepper/crypto
cipher.rkt
Copyright 2013 - 2018 ;; ;; This library is free software: you can redistribute it and/or modify ;; it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ;; (at your option) any later version. ;; ;; This library is distrib...
null
https://raw.githubusercontent.com/rmculpepper/crypto/fec745e8af7e3f4d5eaf83407dde2817de4c2eb0/crypto-lib/private/nettle/cipher.rkt
racket
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCH...
Copyright 2013 - 2018 by the Free Software Foundation , either version 3 of the License , or GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License #lang racket/base (require ffi/unsafe racket/class "../common/interfaces...
29ef0cf3b5cad327f10fddf69d31e9544e0b7e4e8227f38d465acff64fecd496
fission-codes/fission
Types.hs
-- | App configuration for ID and auth module Fission.Web.Server.Environment.Auth.Types (Environment (..)) where import Fission.Prelude import Web.DID.Types newtype Environment = Environment { fissionDID :: DID } deriving (Show, Eq) instance FromJSON Environment where parseJSON = withObject...
null
https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/fission-web-server/library/Fission/Web/Server/Environment/Auth/Types.hs
haskell
| App configuration for ID and auth
module Fission.Web.Server.Environment.Auth.Types (Environment (..)) where import Fission.Prelude import Web.DID.Types newtype Environment = Environment { fissionDID :: DID } deriving (Show, Eq) instance FromJSON Environment where parseJSON = withObject "Auth.Environment" \obj -> do fiss...
dca97545c654d70aec1c092ca7de4779dacc72c2cad6cfc42d57ad58e48ac925
kowainik/relude
Reexport.hs
# LANGUAGE Trustworthy # | Module : Relude . Container . Reexport Copyright : ( c ) 2016 ( c ) 2016 - 2018 ( c ) 2018 - 2023 Kowainik SPDX - License - Identifier : MIT Maintainer : < > Stability : Stable Porta...
null
https://raw.githubusercontent.com/kowainik/relude/e633cb33308d259d6e4ea058ef506eb496b12323/src/Relude/Container/Reexport.hs
haskell
* "Data.Hashable" reexports * "Data.HashSet" reexports * "Data.IntMap.Strict" reexports * "Data.IntSet" reexports * "Data.Map.Strict" reexports * "Data.Sequence" reexports * "Data.Set" reexports * "Data.Tuple" reexports * "GHC.Exts" reexports
# LANGUAGE Trustworthy # | Module : Relude . Container . Reexport Copyright : ( c ) 2016 ( c ) 2016 - 2018 ( c ) 2018 - 2023 Kowainik SPDX - License - Identifier : MIT Maintainer : < > Stability : Stable Porta...
271f75f58b9d44954c04ff48a4d80bbfeb9fbfc39d8394b375231d13e0696b56
ucsd-progsys/dsolve
sum-acm-e.ml
let rec sum x y k = if x <= 0 then k y else sum (x - 1) (x + y) k and check x = assert (100 <= x);check x and main () = sum 5 0 check
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2010/sum-acm-e.ml
ocaml
let rec sum x y k = if x <= 0 then k y else sum (x - 1) (x + y) k and check x = assert (100 <= x);check x and main () = sum 5 0 check
a0dd2eb5d753196184ee9fd017cbe95a53ac7f47d174fab92761dc8b290d4cc1
dpiponi/Moodler
knobs.hs
do (x0, y0) <- mouse let (x, y) = quantise2 quantum (x0, y0) root <- currentPlane id0 <- new' "id" id10 <- new' "id" id2 <- new' "id" id4 <- new' "id" id6 <- new' "id" id8 <- new' "id" input1 <- new' "input" input11 <- new' "input" input3 <- new' "input"...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/knobs.hs
haskell
do (x0, y0) <- mouse let (x, y) = quantise2 quantum (x0, y0) root <- currentPlane id0 <- new' "id" id10 <- new' "id" id2 <- new' "id" id4 <- new' "id" id6 <- new' "id" id8 <- new' "id" input1 <- new' "input" input11 <- new' "input" input3 <- new' "input"...
812de0a291f12076972515e7dc6e60d4fdc7152b46cd4700c5cdf26492dfec4a
heraldry/heraldicon
tincture.cljs
(ns heraldicon.heraldry.tincture (:require [clojure.string :as str] [heraldicon.blazonry :as blazonry] [heraldicon.context :as c] [heraldicon.frontend.component.tree :as-alias tree] [heraldicon.frontend.highlight :as highlight] [heraldicon.frontend.js-event :as js-event] [heraldicon.interface :as...
null
https://raw.githubusercontent.com/heraldry/heraldicon/54e003614cf2c14cda496ef36358059ba78275b0/src/heraldicon/heraldry/tincture.cljs
clojure
otherwise it keeps the highlight effect in many situations, it's not quite clear why
(ns heraldicon.heraldry.tincture (:require [clojure.string :as str] [heraldicon.blazonry :as blazonry] [heraldicon.context :as c] [heraldicon.frontend.component.tree :as-alias tree] [heraldicon.frontend.highlight :as highlight] [heraldicon.frontend.js-event :as js-event] [heraldicon.interface :as...
a12b665c6f623cb2304a612d6d6427821463027d80ecd5f8104fe96c3f913077
clojurewerkz/meltdown
streams.clj
(ns clojurewerkz.meltdown.reactor.streams (:require [clojurewerkz.meltdown.reactor :refer :all] [clojurewerkz.meltdown.selectors :as ms :refer [$ R]] [clojurewerkz.meltdown.consumers :as mc] [clojurewerkz.meltdown.events :as me]) (:import [reactor.event.selector Selector Se...
null
https://raw.githubusercontent.com/clojurewerkz/meltdown/58d50141bb35b4a5abf59dcb13db9f577b6b3b9f/src/clojure/clojurewerkz/meltdown/reactor/streams.clj
clojure
(ns clojurewerkz.meltdown.reactor.streams (:require [clojurewerkz.meltdown.reactor :refer :all] [clojurewerkz.meltdown.selectors :as ms :refer [$ R]] [clojurewerkz.meltdown.consumers :as mc] [clojurewerkz.meltdown.events :as me]) (:import [reactor.event.selector Selector Se...
0805b2c1e2c10369528a1f448390d3bc4a5104dd4876129d6cf7d295aaa4d3cc
swtwsk/beatle-interpreter
TypeInference.hs
module TypeInference( Scheme(..), SchemeMap, GammaEnv(..), inferType, inferTypeRec, checkType, generalize ) where import Data.Maybe import qualified Data.List as List import qualified Data.Map as Map import qualified Data.Set as Set import Control.Monad import Control.Monad.Except import C...
null
https://raw.githubusercontent.com/swtwsk/beatle-interpreter/90725f28bfa0db6fd958e40e194fc6be8de05022/src/TypeInference.hs
haskell
--- TYPE INFERENCE ----- ------------------------ returns free type variables in type expr applies substitution to type expr Generalization for lists Substitute every bound variable from s2 with proper s1 substitution and concatenate rest of s1 to it abstracts a type over all type variables which are free in the ...
module TypeInference( Scheme(..), SchemeMap, GammaEnv(..), inferType, inferTypeRec, checkType, generalize ) where import Data.Maybe import qualified Data.List as List import qualified Data.Map as Map import qualified Data.Set as Set import Control.Monad import Control.Monad.Except import C...
6f41dadd79560e883f77c8cec524910fbbb07b207f70e16e94f66e0b1a891de4
eshamster/watson
export.lisp
(defpackage :watson/definer/export (:use #:cl) (:export #:defexport.wat) (:import-from #:watson/env/environment #:wsymbol-export #:intern.wat) (:import-from #:watson/env/reserved-word #:|export| #:|func| #:func) (:import-from #:wa...
null
https://raw.githubusercontent.com/eshamster/watson/0525f4a657298cec74121162c3cd3dec953c7a25/definer/export.lisp
lisp
#exports -> (export "js_func_name" (func $foo))
(defpackage :watson/definer/export (:use #:cl) (:export #:defexport.wat) (:import-from #:watson/env/environment #:wsymbol-export #:intern.wat) (:import-from #:watson/env/reserved-word #:|export| #:|func| #:func) (:import-from #:wa...
f85a9f4abfb33016f7c0c29c4b0b2e8a84eb27b74b536cfc87ee86cfecb82214
ocsigen/js_of_ocaml
vlq64.ml
Js_of_ocaml compiler * / * Copyright ( C ) 2013 Hugo Heuzard * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of th...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/compiler/lib/vlq64.ml
ocaml
assert (fromVLQSigned 5 = -2);;
Js_of_ocaml compiler * / * Copyright ( C ) 2013 Hugo Heuzard * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of th...
007a641b93d20a516ce5f67f566da400b193f7a06b1b5b8d4ef1ffe4393bc0bf
ghollisjr/cl-ana
h5ex-t-objref.lisp
Copyright by The HDF Group . ;;;; All rights reserved. ;;;; This file is part of hdf5 - cffi . The full hdf5 - cffi copyright notice , including terms governing ;;;; use, modification, and redistribution, is contained in the file COPYING, ;;;; which can be found at the root of the source code distribution tree. ;...
null
https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/hdf-cffi/examples/datatypes/h5ex-t-objref.lisp
lisp
All rights reserved. use, modification, and redistribution, is contained in the file COPYING, which can be found at the root of the source code distribution tree. If you do not have access to this file, you may request a copy from . This example shows how to read and write object references file and writes refe...
Copyright by The HDF Group . This file is part of hdf5 - cffi . The full hdf5 - cffi copyright notice , including terms governing to a dataset . The program first creates objects in the with a dataspace of DIM0 , then closes the file . Next , it (in-package :hdf5) (defparameter *FILE* (namestri...
f45ed55ee09dbfaa3ef24b019025f3c854ad3f10862df34928533391dd2ff3c5
jamhed/fswitch
call_data.erl
-module(call_data). -behaviour(gen_server). % store call variables in seconds -define(CHECK, 1000). -export([ start_link/0, on_hangup/2, set/4, get/2, vars/2, variables/2 ]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, { tid, on_hangup = [] }). st...
null
https://raw.githubusercontent.com/jamhed/fswitch/6403296a092581410fefd8de45641dc811233f25/src/call_data.erl
erlang
store call variables
-module(call_data). -behaviour(gen_server). in seconds -define(CHECK, 1000). -export([ start_link/0, on_hangup/2, set/4, get/2, vars/2, variables/2 ]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, { tid, on_hangup = [] }). start_link() -> gen_serve...
8973f014f7d7a1f56c1a7bdb681ac12e09c136bc8ddf265707d11dc194f2308a
silverbullettt/SICP
3.56.rkt
(load "stream.rkt") (define (merge s1 s2) (cond ((stream-null? s1) s2) ((stream-null? s2) s1) (else (let ((s1car (stream-car s1)) (s2car (stream-car s2))) (cond ((< s1car s2car) (cons-stream s1car (merge (stream-cdr s1) s2))) ((> s...
null
https://raw.githubusercontent.com/silverbullettt/SICP/e773a8071ae2fae768846a2b295b5ed96b019f8d/3.56.rkt
racket
(load "stream.rkt") (define (merge s1 s2) (cond ((stream-null? s1) s2) ((stream-null? s2) s1) (else (let ((s1car (stream-car s1)) (s2car (stream-car s2))) (cond ((< s1car s2car) (cons-stream s1car (merge (stream-cdr s1) s2))) ((> s...
de2345d155796b6d3844df0910b5b3601667f7e7272a815fc16dfcbd48442605
kristianlm/chicken-gochan
run.scm
(cond-expand (chicken-5 (import gochan test (only srfi-18 thread-start! thread-yield! thread-sleep! thread-state thread-join!) (only (chicken sort) sort) (only (chicken time) current-milliseconds) (only srfi-1 list-tabulate make-list count))) (else (use gochan test (only srfi-18 ...
null
https://raw.githubusercontent.com/kristianlm/chicken-gochan/165d4280fe5d2fc48942885ba23005c4f1e6e153/tests/run.scm
scheme
(define-syntax test (syntax-rules () ((_ body ...) (begin body ...)))) todo: - unbuffered synchronous - unbuffered multiple receivers - unbuffered multiple senders - unbuffered send&recv on channel msg fail meta ms just a little past the last tick d...
(cond-expand (chicken-5 (import gochan test (only srfi-18 thread-start! thread-yield! thread-sleep! thread-state thread-join!) (only (chicken sort) sort) (only (chicken time) current-milliseconds) (only srfi-1 list-tabulate make-list count))) (else (use gochan test (only srfi-18 ...
8e35480a1e79bee6c45f23b03151995008b795d8a68f9a89170bb1d2d00a88bd
flambard/cl-epmd
protocol-tests.lisp
(in-package :epmd-test) (in-suite epmd-protocol) (test alive2-request (is (typep (with-input-from-sequence (in (with-output-to-sequence (out) (write-message out (make-alive2-request "test@example" 3456)))) (read-request in)) 'alive2-request)) ) (test alive2-resp...
null
https://raw.githubusercontent.com/flambard/cl-epmd/9cda99284bcfa8e09c7e3219f3ed1f5cb227a064/test/protocol-tests.lisp
lisp
(in-package :epmd-test) (in-suite epmd-protocol) (test alive2-request (is (typep (with-input-from-sequence (in (with-output-to-sequence (out) (write-message out (make-alive2-request "test@example" 3456)))) (read-request in)) 'alive2-request)) ) (test alive2-resp...
72ef6e96d64298f267d7bdaebffc4138734c58b7569ee3aa046f14e340112e17
rudymatela/extrapolate
list.hs
import Test.LazySmallCheck2012 import Data.List main :: IO () main = do test $ \xs xs' -> (xs++xs' :: [Int]) `isPrefixOf` xs not lazy , so no generalization with Lazy SmallCheck 2012 > test $ \xs - > nub xs = = ( xs : : [ Int ] ) -- not lazy as well: > test $ \xs ys - > xs ` union ` ys = = ys ` union ` ( xs ...
null
https://raw.githubusercontent.com/rudymatela/extrapolate/0b3ca28eed0d04358b2fb033664476f8b29821a6/bench/lazy-sc/list.hs
haskell
not lazy as well:
import Test.LazySmallCheck2012 import Data.List main :: IO () main = do test $ \xs xs' -> (xs++xs' :: [Int]) `isPrefixOf` xs not lazy , so no generalization with Lazy SmallCheck 2012 > test $ \xs - > nub xs = = ( xs : : [ Int ] ) > test $ \xs ys - > xs ` union ` ys = = ys ` union ` ( xs : : [ Int ] )
ba3f524483b36ef6d1134a98281ee78a0af245df76fb3d056373de2e26545e74
Apress/java-image-processing-recipes
core_test.clj
(ns first-java.core-test (:require [clojure.test :refer :all] [first-java.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/Apress/java-image-processing-recipes/dd59c00838c4261c118d81f08bcef1e3456fe01b/SOURCES/CODE/first_java/test/first_java/core_test.clj
clojure
(ns first-java.core-test (:require [clojure.test :refer :all] [first-java.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
cc66ebcca0f74c468d0034178beafda05a64d1833b13a41c9f3901c932e04ef1
spawnfest/eep49ers
snmpa_mib_data_ttln.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2013 - 2016 . All Rights Reserved . %% 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 applic...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/snmp/src/agent/snmpa_mib_data_ttln.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific l...
Copyright Ericsson AB 2013 - 2016 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(snmpa_mib_data_ttln). This module implements the MIB internal data structures . An MIB Data Structure...
42751204605dddb31e6480b53fb2e49b085bc5556a1b73e5757ec655dc507774
synduce/Synduce
Parsers.ml
open PmrsFront open OcamlFront let parse_pmrs = parsefile let parse_ocaml = parse_ocaml let seek_types = seek_types let translate = translate
null
https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/src/frontend/Parsers.ml
ocaml
open PmrsFront open OcamlFront let parse_pmrs = parsefile let parse_ocaml = parse_ocaml let seek_types = seek_types let translate = translate
c77d968e75c5886d9d0030b3ee76e1db47fbdf28f0863eb9c951464728e9890e
FranklinChen/hugs98-plus-Sep2006
Type.hs
module Dotnet.System.Type ( module Dotnet.System.Type, module Dotnet.System.TypeTy ) where import Dotnet.System.TypeTy foreign import dotnet "static Dotnet.System.Type.GetType" getType :: String -> IO (Type ())
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/dotnet/lib/Dotnet/System/Type.hs
haskell
module Dotnet.System.Type ( module Dotnet.System.Type, module Dotnet.System.TypeTy ) where import Dotnet.System.TypeTy foreign import dotnet "static Dotnet.System.Type.GetType" getType :: String -> IO (Type ())
536542681283d920550d434dfe425e0d8f5e016ce792a42522ee3a3a90e7bbd6
jeapostrophe/remix
stx.rkt
#lang remix ;; Remix comments start with ; # lang remix only contains two bindings : # % module - begin and require ;; We use require to get everything else . most of it comes from stx (require remix/base) (module+ test ;; This introduces ≡ as a testing form ;; XXX Drop this and instead have a macro for writ...
null
https://raw.githubusercontent.com/jeapostrophe/remix/982529019d12252b5f6ab49c17a1a8283ccfb9df/tests/stx.rkt
racket
Remix comments start with ; This introduces ≡ as a testing form XXX Drop this and instead have a macro for writing down etc. define is replaced with def If you would like to use ;-syntax in the inside of def, then you but of course def supports function definitions. [] is NOT the same as (), it parses as #%bra...
#lang remix # lang remix only contains two bindings : # % module - begin and require We use require to get everything else . most of it comes from stx (require remix/base) (module+ test properties that communicates with boolean forms , etc . , (require remix/test)) (def z 42) (module+ test {z ≡ 42}) ...
aa766d1bfe64124a8b3878a26886135dd0a6a4efc297e8073f103c2003c64def
rpav/spell-and-dagger
tilemap.lisp
(in-package :game) (defparameter *tileset-cache* (make-hash-table :test 'equal)) TILE , TILESET (defclass tile () ((props :initform nil :accessor props) (image :initform nil :initarg :image :reader tile-image))) (defclass tileset () ((props :initform nil :accessor props) (tiles :initform nil :initarg :t...
null
https://raw.githubusercontent.com/rpav/spell-and-dagger/0424416ff14a6758d27cc0f84c21bf85df024a7b/src/tilemap.lisp
lisp
TILE-MERGESET TILEMAP GK-TILEMAP This could in theory be done slightly more ideally, but at great inconvenience.
(in-package :game) (defparameter *tileset-cache* (make-hash-table :test 'equal)) TILE , TILESET (defclass tile () ((props :initform nil :accessor props) (image :initform nil :initarg :image :reader tile-image))) (defclass tileset () ((props :initform nil :accessor props) (tiles :initform nil :initarg :t...
e1a87e1d7e2dc378745047ca995a46f8de35699c94d331d6f810847082ea8e08
harto/enoki
web.cljs
(ns enoki.web (:require [clojure.browser.repl :as repl] [clojure.string :as str] [enoki.event :as event] [enoki.graphics.canvas :as gfx] [enoki.logging :as logging]) (:require-macros [enoki.logging-macros :as log])) ;; We have to deal in strings, not chars, since Clo...
null
https://raw.githubusercontent.com/harto/enoki/b6dfa7d08337d192e7cf108175edfdf91409051c/web/src/cljs/enoki/web.cljs
clojure
We have to deal in strings, not chars, since ClojureScript doesn't have character literals or a (char) function. Function keys (F1-F12) FIXME: The commented-out mappings are only available on a full-sized keyboard, and thus haven't been tested yet. Gloss over browser incompatibilities. See FIXME: this should p...
(ns enoki.web (:require [clojure.browser.repl :as repl] [clojure.string :as str] [enoki.event :as event] [enoki.graphics.canvas :as gfx] [enoki.logging :as logging]) (:require-macros [enoki.logging-macros :as log])) (defn char->int [s] (.charCodeAt s 0)) (defn in...
7c4a1fa487597dadd0b498b54bcee5999fd07202a7704a04f6f45469b8a4695c
diagrams/diagrams-pgf
triangle.hs
# LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # import Diagrams.Prelude import Diagrams.Backend.PGF.CmdLine import Diagrams.TwoD.Vector (perp) -- Example using TeX primatives to make a text box with given width. Also -- includes roundedRect background and labeling. type D2 = Diagram PGF main = o...
null
https://raw.githubusercontent.com/diagrams/diagrams-pgf/da500cd576a9b85da79fda9bfa49cfc3e3b9325f/examples/triangle.hs
haskell
Example using TeX primatives to make a text box with given width. Also includes roundedRect background and labeling. is there a better way to do this?
# LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # import Diagrams.Prelude import Diagrams.Backend.PGF.CmdLine import Diagrams.TwoD.Vector (perp) type D2 = Diagram PGF main = onlineMain example mytext :: OnlineTex D2 mytext = scale 2 . box 8 orange <$> hboxOnline (sizedVBox 18 txt) where txt...
164e6c2e53aa22c8a09185801be0fb69db6ab3170df65efcc36e46eab596c7bf
eponai/sulolive
sidebar.cljc
(ns eponai.web.ui.nav.sidebar (:require [eponai.common.ui.elements.menu :as menu] [eponai.common.ui.dom :as dom] [eponai.common.ui.elements.css :as css] [eponai.client.routes :as routes] [eponai.common.shared :as shared] [eponai.client.auth :as auth] [eponai.web.social :as social] [om....
null
https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/web/ui/nav/sidebar.cljc
clojure
Store owner side menu
(ns eponai.web.ui.nav.sidebar (:require [eponai.common.ui.elements.menu :as menu] [eponai.common.ui.dom :as dom] [eponai.common.ui.elements.css :as css] [eponai.client.routes :as routes] [eponai.common.shared :as shared] [eponai.client.auth :as auth] [eponai.web.social :as social] [om....
0a70622d8e4186cc3a9767ad04958f73217376983bbd74bf25c007de0242f6e9
gfZeng/datomic.schema
spec-impl.clj
(in-ns 'datomic.schema) (require '[clojure.spec.alpha :as s]) (s/def :db.type/keyword keyword?) (s/def :db.type/string string?) (s/def :db.type/boolean boolean?) (s/def :db.type/long int?) (s/def :db.type/bigint integer?) (s/def :db.type/float float?) (s/def :db.type/double double?) (s/def :db.type/bigdec d...
null
https://raw.githubusercontent.com/gfZeng/datomic.schema/995f50bfe88e553d787e069cf1f7bcf944ef255a/src/datomic/spec-impl.clj
clojure
(in-ns 'datomic.schema) (require '[clojure.spec.alpha :as s]) (s/def :db.type/keyword keyword?) (s/def :db.type/string string?) (s/def :db.type/boolean boolean?) (s/def :db.type/long int?) (s/def :db.type/bigint integer?) (s/def :db.type/float float?) (s/def :db.type/double double?) (s/def :db.type/bigdec d...
adda060a7897e8f4d5433854b3ec9e887645644c7a0153f9f5a7464a30e243d0
ijvcms/chuanqi_dev
active_ets.erl
%%%------------------------------------------------------------------- %%% @author tuhujia ( C ) 2016 , < COMPANY > %%% @doc %%% %%% @end Created : 29 . 一月 2016 11:51 %%%------------------------------------------------------------------- -module(active_ets). -include("common.hrl"). -include("record.hrl"). -includ...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/active/active_ets.erl
erlang
------------------------------------------------------------------- @author tuhujia @doc @end ------------------------------------------------------------------- API 击杀怪物判断 首杀 保存击杀信息 保存击杀信息
( C ) 2016 , < COMPANY > Created : 29 . 一月 2016 11:51 -module(active_ets). -include("common.hrl"). -include("record.hrl"). -include("proto.hrl"). -include("cache.hrl"). -include("config.hrl"). -include("language_config.hrl"). -include("rank.hrl"). -include("button_tips_config.hrl"). -export([ init/0, get_ets_m...
e9cbb17585d68ecf8ed66a3015731fc764002b8c610718ec85137d7b638bda9e
tari3x/csec-modex
instruct.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
null
https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/cryptoverif1.12/src/instruct.ml
ocaml
For backtracking If b' == b, useless after SArenaming b Adding simplification after SArenaming Retry after executing the advise No need to update next instructions, so we can ignore the ins_updater Always expand FindE Try after executing the advice Filter the choices to avoid considering too many similar...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
a3c24032807da40a44b5e2cffd490cd5c4b6d0b3d3d890e9697a0c81baa9cffc
rtoy/cmucl
completion.lisp
;;; -*- Log: hemlock.log; Package: Hemlock -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; (ext:file-comment "$Header: src/hemlock/completi...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/hemlock/completion.lisp
lisp
-*- Log: hemlock.log; Package: Hemlock -*- ********************************************************************** ********************************************************************** The top level structure here is an array that gets indexed with the a list of the strings with that prefix sorted in most-rec...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . (ext:file-comment "$Header: src/hemlock/completion.lisp $") Written by and . General idea stolen from Jim Salem 's TMC completion code . (in-package "HEMLOCK") Th...
96f3dd3951666f1057b49cfaf3b70070698ff6087c494c97fd104022d7989522
Gabriella439/suns-search
Shuffle.hs
Copyright 2013 This file is part of the Suns Search Engine The Suns Search Engine is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 2 of the License , or ( at your opt...
null
https://raw.githubusercontent.com/Gabriella439/suns-search/59c4cbf109c8d93b3170c3da529121f2b589900c/src/Shuffle.hs
haskell
Copyright 2013 This file is part of the Suns Search Engine The Suns Search Engine is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 2 of the License , or ( at your opt...
b55536d6849d8acefe33b2c0b52088a243d2c54a4c3f162528e3f085412a93ee
haskell-tools/haskell-tools
PolymorphSubMulti.hs
module Refactor.GenerateTypeSignature.PolymorphSubMulti where f :: (Num a, Ord a) => a -> a f a = g a where g a = if a > 0 then a + 1 else a
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/GenerateTypeSignature/PolymorphSubMulti.hs
haskell
module Refactor.GenerateTypeSignature.PolymorphSubMulti where f :: (Num a, Ord a) => a -> a f a = g a where g a = if a > 0 then a + 1 else a
d461e219bcaa5607fc9084b16b970fed741c96b94ff61b7dbe8d103be963e955
sgbj/MaximaSharp
zswap.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy ...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/lapack/blas/zswap.lisp
lisp
Compiled by f2cl version: Using Lisp CMU Common Lisp 20d (20D Unicode) Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy $ " " f2cl6.l , v 1d5cbacbb...
f715ca4f7ae1c244108962960fbba82fa378357528fc29e8db8c8278fdfe9ae3
diffusionkinetics/open
VegaLite.hs
# language OverloadedStrings , ExtendedDefaultRules # | Module : Lucid . VegaLite Description : Vega - lite bindings Copyright : ( c ) , , 2019 License : GPL-3 Maintainer : ocramz fripost org Stability : experimental Portability : POSIX Bindings to the vega - lite visualization a...
null
https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/lucid-extras/lib/Lucid/VegaLite.hs
haskell
* Standalone * Utilities import qualified Data.Text as T | Construct a standalone HTML page that can render a vega-lite plot. The plot will be rendered by the vega-embed library. | The statement for embedding the vega JSON payload and initializing vega-embed. Must be in the \<BODY\> block and referenced by a \<di...
# language OverloadedStrings , ExtendedDefaultRules # | Module : Lucid . VegaLite Description : Vega - lite bindings Copyright : ( c ) , , 2019 License : GPL-3 Maintainer : ocramz fripost org Stability : experimental Portability : POSIX Bindings to the vega - lite visualization a...
066d246712b32eb5fcbc39a4638c1f3e71d9a5bbe171557c46bdacafd54a15da
gorillalabs/sparkling
domain.clj
(ns sparkling.testutils.records.domain (:refer-clojure :exclude [time])) (defprotocol timestamped (time [item]) ) (defrecord tweet [username tweet timestamp] timestamped (time [_] timestamp ))
null
https://raw.githubusercontent.com/gorillalabs/sparkling/ffedcc70fd46bf1b48405be8b1f5a1e1c4f9f578/test/sparkling/testutils/records/domain.clj
clojure
(ns sparkling.testutils.records.domain (:refer-clojure :exclude [time])) (defprotocol timestamped (time [item]) ) (defrecord tweet [username tweet timestamp] timestamped (time [_] timestamp ))
1f3b75865d9dd2002bcdad75f84bcc87af4dd6af341410a7fdb921adccf6c82e
manuel-serrano/bigloo
pdg.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / api / phidget / src / Llib / pdg.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/api/phidget/src/Llib/pdg.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * Phidget ctypes */ *===========================...
* serrano / prgm / project / bigloo / api / phidget / src / Llib / pdg.scm * / * Author : * / * Creation : We d Nov 28 13:18:16 2012 * / * Last change : We d Nov 28 13:18:19 2012 ( serrano ) * / * ...
6bda282432a6d198b453f67f26dbff694186ecc6850a0879ba9fe2cff1fa05ed
atlas-engineer/nyxt
tts.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt/tests) (define-test toggle-tts-mode () (let ((buffer (make-instance 'modable-buffer))) (with-current-buffer buffer (assert-true (enable-modes* 'nyxt/tts-mode:tts-mode buffer)) (assert-tru...
null
https://raw.githubusercontent.com/atlas-engineer/nyxt/65a9aa568b16c109281fa403a7c045b3b6d87025/tests/offline/mode/tts.lisp
lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt/tests) (define-test toggle-tts-mode () (let ((buffer (make-instance 'modable-buffer))) (with-current-buffer buffer (assert-true (enable-modes* 'nyxt/tts-mode:tts-mode buffer)) (assert-tru...
faa09345709556965542734427706aae101647cc8d4f176ed0dbdc9383287347
jeapostrophe/exp
phase1.rkt
#lang racket/base (require (for-syntax racket/base "lib.rkt")) (define-syntax (macro stx) (define unsafe-old (unsafe-global)) (define safe-old (safe-global)) (safe-global 1) (unsafe-global 1) #`(begin (printf "static: unsafe-global was ~a\n" '#,unsafe-old) (printf "static: s...
null
https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/fffhase-attack/phase1.rkt
racket
#lang racket/base (require (for-syntax racket/base "lib.rkt")) (define-syntax (macro stx) (define unsafe-old (unsafe-global)) (define safe-old (safe-global)) (safe-global 1) (unsafe-global 1) #`(begin (printf "static: unsafe-global was ~a\n" '#,unsafe-old) (printf "static: s...
67af46ee6bee2548d3da62c0e2b03ec854e484c5792d96c20ed8d74c9da29d88
mwand/eopl3
interp.scm
(module interp (lib "eopl.ss" "eopl") (require "drscheme-init.scm") (require "lang.scm") (require "data-structures.scm") (require "environments.scm") (provide value-of-program value-of) ;;;;;;;;;;;;;;;; the interpreter ;;;;;;;;;;;;;;;; value - of - program : Program - > ExpVal (define value-of-prog...
null
https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter7/inferred/interp.scm
scheme
the interpreter ;;;;;;;;;;;;;;;;
(module interp (lib "eopl.ss" "eopl") (require "drscheme-init.scm") (require "lang.scm") (require "data-structures.scm") (require "environments.scm") (provide value-of-program value-of) value - of - program : Program - > ExpVal (define value-of-program (lambda (pgm) (cases program pgm ...
a3af462f91549c79dfe54cbb087b5f10a62d09a8aad23a895dd2b3e4f495da2b
TyOverby/mono
test_random.ml
open! Import open! Random let%test_module "State" = (module struct include State let%test_unit ("random int above 2^30" [@tags "64-bits-only"]) = let state = make [| 1; 2; 3; 4; 5 |] in for _ = 1 to 100 do let bound = Int.shift_left 1 40 in let n = int state bound in if n...
null
https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-base/test/test_random.ml
ocaml
test that the return type of "caml_sys_random_seed" is what we expect The fact that this test passes doesn't demonstrate that the bug has gone away, since the test was explicitly contrived to provoke the bug.
open! Import open! Random let%test_module "State" = (module struct include State let%test_unit ("random int above 2^30" [@tags "64-bits-only"]) = let state = make [| 1; 2; 3; 4; 5 |] in for _ = 1 to 100 do let bound = Int.shift_left 1 40 in let n = int state bound in if n...
ea2b5896407900765589d93553ca92f672de97775fa8da9b13d26fef676797be
TrustInSoft/tis-interpreter
plib.mli
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of WP plug - in of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/qed/src/plib.mli
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat a l'energie atomique et aux energies Lesser General Public License as published by the Free Soft...
0cf80fb6c348120833bfa2634a0261dfa54c398b9aec7164c65eecf77eb91d71
GaloisInc/msf-haskell
Handler.hs
module MSF.Event.Handler where import qualified Control.Exception as X import qualified Data.Map as Map type Handler a = HandlerRef -> a -> IO () type HandlerRef = Int data HandlerMap a = HandlerMap { handlers :: Map.Map HandlerRef (Handler a) , handlerNextId :: HandlerRef } -- | An empty map of handle...
null
https://raw.githubusercontent.com/GaloisInc/msf-haskell/76cee10771f9e9d10aa3301198e09f08bde907be/src/MSF/Event/Handler.hs
haskell
| An empty map of handlers. | Add a handler to a handler map. | Remove a handler from a handler map. | Run a set of handlers over a value. swallow exceptions to prevent handlers from killing the enclosing thread
module MSF.Event.Handler where import qualified Control.Exception as X import qualified Data.Map as Map type Handler a = HandlerRef -> a -> IO () type HandlerRef = Int data HandlerMap a = HandlerMap { handlers :: Map.Map HandlerRef (Handler a) , handlerNextId :: HandlerRef } emptyHandlerMap :: HandlerM...
da711e1decd3b1ab72958af9fa6cfbdf882516340e8c91eb363f92e9d33c2979
AshleyYakeley/Truth
Scripts.hs
module Test.Scripts ( getTestLibraries , testScripts ) where import Pinafore import Pinafore.Libs import Pinafore.Test import Shapes import Shapes.Test import System.Directory libDir :: FilePath libDir = "../lib" -- Just check, don't run testCheckScript :: FilePath -> String -> TestTree testCheckScript f...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/9ec79d8f4f3f2925a1c766a5f3f2478be9dcefbe/Pinafore/pinafore-app/test/Test/Scripts.hs
haskell
Just check, don't run
module Test.Scripts ( getTestLibraries , testScripts ) where import Pinafore import Pinafore.Libs import Pinafore.Test import Shapes import Shapes.Test import System.Directory libDir :: FilePath libDir = "../lib" testCheckScript :: FilePath -> String -> TestTree testCheckScript fpath name = testTree ...
883ee8b54579fe6805df326e764ad4cdc6a95d1cb21addf0cb8474441ecf02b5
ocamllabs/ocaml-modular-implicits
pi_big_int.ml
(*************************************************************************) (* *) (* OCaml *) (* *) ,...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/lib-num-2/pi_big_int.ml
ocaml
*********************************************************************** OCaml ...
, projet Estime , INRIA Rocquencourt Copyright 2008 Institut National de Recherche en Informatique et under the terms of the Q Public License version 1.0 . Pi digits computed with the sreaming algorithm given on pages 4 , 6 & 7 of " Unbounded Spigot Algori...
9cbdacb79e76cb7405df6c44fab458d1463ca96c24422094d98a7925800f493a
Helium4Haskell/helium
ExprUndefCon.hs
module ExprUndefCon where main = Int
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticerrors/ExprUndefCon.hs
haskell
module ExprUndefCon where main = Int
781008e7e3b5d50d27df9b318e2a0492dcdd082a89b5b3c8afbf229f7b84b037
coq/coq
tac2entries.mli
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/352e9fdd84d92f813d092d89825f3ec81ae78e46/plugins/ltac2/tac2entries.mli
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
72b242cabe0932a362342a23c1643c6f4c0bc982e8c54014207934370bfab655
2600hz/kazoo
cb_temporal_rules.erl
%%%----------------------------------------------------------------------------- ( C ) 2011 - 2020 , 2600Hz %%% @doc @author @author %%% 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...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/applications/crossbar/src/modules/cb_temporal_rules.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- ============================================================================= API ===================================================================...
( C ) 2011 - 2020 , 2600Hz @author @author 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 /. -module(cb_temporal_rules). -export([init/0 ,allowed_methods/0, allowed_methods/1...
59facfcdbc68c9a4b1d68756629b5483b5ef8a0897e92bf6fedf2f9282deb890
KestrelInstitute/Specware
Tests.lisp
(test-directories ".") (test ("Bug 0006 : Pretty printing of digrams should yield something that looks like the starting syntax [D]" :show "Diagram#D" :output '( (:optional "") ";;; Elaborating diagram-term at $TESTDIR/Diagram#D" ";;; Elaborating spec-morphism at $TESTDIR/Diagram#D" ";;; Ela...
null
https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/TestSuite/Bugs/Bug_0006/Tests.lisp
lisp
(test-directories ".") (test ("Bug 0006 : Pretty printing of digrams should yield something that looks like the starting syntax [D]" :show "Diagram#D" :output '( (:optional "") ";;; Elaborating diagram-term at $TESTDIR/Diagram#D" ";;; Elaborating spec-morphism at $TESTDIR/Diagram#D" ";;; Ela...
4e2356c1d5fd7ff4aeeb4346016975ac37943875c004b548353201aea8c19f31
sdiehl/write-you-a-haskell
Flags.hs
module Flags ( -- * Compiler flags Flag(..), Flags, -- * Setting/Unsetting isSet, set, unset, -- * Command line switches flagOpts, flagFor, ) where import qualified Data.Set as S import Control.Monad (msum) import Data.List (isPrefixOf) -- Flag set. type Flags = S.Set Flag data Flag = DumpC ...
null
https://raw.githubusercontent.com/sdiehl/write-you-a-haskell/ae73485e045ef38f50846b62bd91777a9943d1f7/chapter8/protohaskell/Flags.hs
haskell
* Compiler flags * Setting/Unsetting * Command line switches Flag set. ^ \-ddump-llvm ^ \-ddump-asm ^ \-ddump-parsed ^ \-ddump-desugar ^ \-ddump-infer ^ \-ddump-core ^ \-ddump-types ^ \-ddump-types ^ \-ddump-stg ^ \-ddump-imp ^ \-ddump-rn ^ \-ddump-to-file | Query a flag setting. | Insert a flag into ...
module Flags ( Flag(..), Flags, isSet, set, unset, flagOpts, flagFor, ) where import qualified Data.Set as S import Control.Monad (msum) import Data.List (isPrefixOf) type Flags = S.Set Flag data Flag = DumpC deriving (Eq, Ord, Show) isSet :: Flags -> Flag -> Bool isSet = flip S.member set :: F...
1b650d3fda7fd9db0669d889f321a49e143c1a27ea5932779bcac725f98f4ec8
samsergey/formica
tools.rkt
#lang racket/base ;;______________________________________________________________ ;; ______ ;; ( // _____ ____ . __ __ ;; ~//~ ((_)// // / / // ((_ ((_/_ ;; (_// ;;.............................................................. ;; Provides for...
null
https://raw.githubusercontent.com/samsergey/formica/b4410b4b6da63ecb15b4c25080951a7ba4d90d2c/tools.rkt
racket
______________________________________________________________ ______ ( // _____ ____ . __ __ ~//~ ((_)// // / / // ((_ ((_/_ (_// .............................................................. Provides formica/tools module. =============...
#lang racket/base (require "types.rkt") (require "private/tools/arity.rkt") (provide (contract-out (polyadic? predicate/c) (variadic? predicate/c) (fixed-arity? predicate/c) (nullary? predicate/c) (unary? predicate/c) (binary? predicate/c) (min-arity (-> Fun Nat)) (max-arity (-> Fun (or/c Nat +inf.0))...
cd66a3364413aa3c7580baf85fe4eaa72c6aeca39f94f6b75a84e00dbf34d909
sordina/Haskell-Techniques
main.hs
import qualified Data.List as L import qualified Data.Array as A import Prelude hiding (filter, map) import Data.MemoCombinators import Data.Function import Data.Set import Test.QuickCheck ((==>)) main :: IO () main = print answer answer :: Int answer = size $ g''' 200 divisions :: [Int] divisions = [1,2,5,10,20,...
null
https://raw.githubusercontent.com/sordina/Haskell-Techniques/dbc31eaf7c9730b7f976c79eb5d4ebb8e9fd1555/Memoization/main.hs
haskell
General implementation -4.2.0.0/src/Data-Function.html#fix or -- f (fix f) Very slow Fast Very fast Unsafe, but known for these bounds
import qualified Data.List as L import qualified Data.Array as A import Prelude hiding (filter, map) import Data.MemoCombinators import Data.Function import Data.Set import Test.QuickCheck ((==>)) main :: IO () main = print answer answer :: Int answer = size $ g''' 200 divisions :: [Int] divisions = [1,2,5,10,20,...
955439bff96493d20715fc26604841fddc7fd94aa3cee774702b74e1b1463918
314eter/ocaml-xxhash
xxh64.ml
open XXHash let%expect_test _ = let hash = XXH64.hash "abcd" in print_endline (XXH64.to_hex hash); [%expect{| de0327b0d25d92cc |}]
null
https://raw.githubusercontent.com/314eter/ocaml-xxhash/28858dc709276fd9c715e24a81610680cec0bd3c/tests/xxh64.ml
ocaml
open XXHash let%expect_test _ = let hash = XXH64.hash "abcd" in print_endline (XXH64.to_hex hash); [%expect{| de0327b0d25d92cc |}]
6bd3b8873996503d814f3dd278ebf2f157c43ae9e69c9da4ba24251d496fdc3e
j-mie6/ParsleyHaskell
Frontend.hs
| Module : Parsley . Internal . Frontend Description : The frontend is concerned with AST manipulation and processing License : BSD-3 - Clause Maintainer : : stable @since 0.1.0.0 Module : Parsley.Internal.Frontend Description : The frontend is concerned with AST manipulation and p...
null
https://raw.githubusercontent.com/j-mie6/ParsleyHaskell/045ab78ed7af0cbb52cf8b42b6aeef5dd7f91ab2/parsley-core/src/ghc/Parsley/Internal/Frontend.hs
haskell
| Module : Parsley . Internal . Frontend Description : The frontend is concerned with AST manipulation and processing License : BSD-3 - Clause Maintainer : : stable @since 0.1.0.0 Module : Parsley.Internal.Frontend Description : The frontend is concerned with AST manipulation and p...
10496955e1ce7dfd0244814809718c3665f06aa205676feeeca0e3a693897c2b
clklein/decompose-plug
simple-pattern.rkt
#lang racket (require slideshow redex "util.rkt" "../2-models/models.rkt") (provide simple-pattern-overview) (define (combine . args) (table 2 (apply append (map (λ (arg) (list (scale (car arg) 1.5) (apply para #:width ...
null
https://raw.githubusercontent.com/clklein/decompose-plug/5bb1acff487d055386c075581b395eb3cfdc12e9/pld-talk/simple-pattern.rkt
racket
#lang racket (require slideshow redex "util.rkt" "../2-models/models.rkt") (provide simple-pattern-overview) (define (combine . args) (table 2 (apply append (map (λ (arg) (list (scale (car arg) 1.5) (apply para #:width ...
55199dc86eaa153fc2909e48dcd413c4f7ebe72d6756bfe3f7e44577af9f9b49
Chadtech/elmish-wasm
Util.hs
module Util ( firstWord , trim , log_ ) where import Text.Regex.Posix import qualified Data.List as List import qualified Data.Char as Char import qualified Debug.Trace as Debug import Flow trim :: String -> String trim = List.dropWhileEnd Char.isSpace >> List.dropWhile Char.isSpac...
null
https://raw.githubusercontent.com/Chadtech/elmish-wasm/001463453ffbc2a6bc21803b00b7ed242ad4ffbd/src/Util.hs
haskell
DEBUG --
module Util ( firstWord , trim , log_ ) where import Text.Regex.Posix import qualified Data.List as List import qualified Data.Char as Char import qualified Debug.Trace as Debug import Flow trim :: String -> String trim = List.dropWhileEnd Char.isSpace >> List.dropWhile Char.isSpac...
82e5018bed437d6d8fc91bd5b5d56734125b704ffae1f11b2d7d440d8c2c6e41
lamdu/lamdu
Versioning.hs
{-# OPTIONS -O0 #-} # LANGUAGE TemplateHaskell # module Lamdu.I18N.Versioning where import qualified Control.Lens as Lens import qualified Data.Aeson.TH.Extended as JsonTH import Lamdu.Prelude data Versioning a = Versioning { _branches :: a , _undo :: a , _redo :: a } deriving Eq JsonTH.der...
null
https://raw.githubusercontent.com/lamdu/lamdu/c1d7d17ebf46f5ad8e110d9ce49625e935a16e80/src/Lamdu/I18N/Versioning.hs
haskell
# OPTIONS -O0 #
# LANGUAGE TemplateHaskell # module Lamdu.I18N.Versioning where import qualified Control.Lens as Lens import qualified Data.Aeson.TH.Extended as JsonTH import Lamdu.Prelude data Versioning a = Versioning { _branches :: a , _undo :: a , _redo :: a } deriving Eq JsonTH.derivePrefixed "_" ''Ve...
8c2a00f701ac217c82c74ebea0b39ef35a316655f85e5b0c5170f385033768eb
Frama-C/Frama-C-snapshot
compute.ml
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/postdominators/compute.ml
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
59d053e5689cbb110a43dad6ccb49d82f7a4161a3c78c3f7fe172c7847ebc1b7
alesaccoia/festival_flinger
dump1.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; Centre for Speech Technology Research ; ; University of Edinburgh , UK ; ; ;;; ...
null
https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/testsuite/data/dump1.scm
scheme
;; ; ; Copyright (c) 1996,1997 ;; ; ;; Permission is hereby granted, free of charge, to use and distribute ;; this softwar...
(set! utt1 (Utterance Text "\"This test,\" she said, \"Should include (utt.save utt1 "tmp/utt1.utt") (utt.load utt1 "tmp/utt1.utt") (utt.synth utt1) (utt.save.segs utt1 "tmp/savesegs1.segs") (utt.save utt1 "tmp/utt2.utt") (set! utt2 (utt.load nil "tmp/utt2.utt")) (utt.synth utt2) (utt.save.segs utt2 "tmp/savesegs2.se...
822acf115f46bb11055a044230265975ecee0bd5c2f0554fb27b3f052028edea
BinRoot/Haskell-Data-Analysis-Cookbook
Main.hs
import Data.Tree.AVL import Data.COrdering Using an AVL balanced binary tree main = do let avl = asTree fstCC [4,2,1,5,3,6] let min = tryReadL avl let max = tryReadR avl print min print max
null
https://raw.githubusercontent.com/BinRoot/Haskell-Data-Analysis-Cookbook/f8c46987d78f4a6c1828b353c5f906b9314c2ef9/Ch05/Code09_avl/Main.hs
haskell
import Data.Tree.AVL import Data.COrdering Using an AVL balanced binary tree main = do let avl = asTree fstCC [4,2,1,5,3,6] let min = tryReadL avl let max = tryReadR avl print min print max
be6caa6226e29ec9f31a4f6a28b227ac3269e4319a6baf330c90a5b4456c5dd1
kivra/giallo
minimal_handler.erl
%% ---------------------------------------------------------------------------- %% %% giallo: A small and flexible web framework %% Copyright ( c ) 2013 KIVRA %% %% Permission is hereby granted, free of charge, to any person obtaining a %% copy of this software and associated documentation files (the "Software"), t...
null
https://raw.githubusercontent.com/kivra/giallo/bec3539fb3e0d01177c87c302188fe231f647125/test/minimal_handler.erl
erlang
---------------------------------------------------------------------------- giallo: A small and flexible web framework Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, publi...
Copyright ( c ) 2013 KIVRA to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIA...
6d45b6b7c6d4be9f27ec42459ca3161aaea76aaaacd591bd551eccf1584f862a
zinid/ocaml-erlang
erl_tcp.ml
let connect host port = let pid = Erl.self () in let fd = Erl_inet.connect pid host port in let _ = Erl.register_socket pid fd in fd let listen ?backlog:(backlog = 5) host port = let pid = Erl.self () in let fd = Erl_inet.listen pid host port backlog in let _ = Erl.register_socket pid fd in fd let clo...
null
https://raw.githubusercontent.com/zinid/ocaml-erlang/9b84076e2922dd33c6790526c07972be9f904871/src/erl_tcp.ml
ocaml
let connect host port = let pid = Erl.self () in let fd = Erl_inet.connect pid host port in let _ = Erl.register_socket pid fd in fd let listen ?backlog:(backlog = 5) host port = let pid = Erl.self () in let fd = Erl_inet.listen pid host port backlog in let _ = Erl.register_socket pid fd in fd let clo...
57ebd76fb96733089f807418715e0d169b50aae9d3ef186c00ac3c63bde9b437
algorand/symteal
split.rkt
#lang rosette/safe (require "syntax.rkt" "teal.rkt" "symbolic.rkt" "config.rkt") ; define template variables - tmpl_rcv1 : the first recipient in the split account ;(define tmpl_rcv1 0) (define-symbolic tmpl_rcv1 bv64) - tmpl_rcv2 : the second recipient in the split account ;(define tmpl_rcv2 0) (define-symbo...
null
https://raw.githubusercontent.com/algorand/symteal/c821bc2d44cb794b4233b71fcf84a7576f2bb055/split.rkt
racket
define template variables (define tmpl_rcv1 0) (define tmpl_rcv2 0) - tmpl_minpay: minimum amount to be paid out of the account - tmpl_timeout: the round at which the account expires (define tmpl_timeout 5000) - tmpl_own: the address to refund funds to on timeout TypeEnum Fee jump to (gtxn 0 sender) CloseRe...
#lang rosette/safe (require "syntax.rkt" "teal.rkt" "symbolic.rkt" "config.rkt") - tmpl_rcv1 : the first recipient in the split account (define-symbolic tmpl_rcv1 bv64) - tmpl_rcv2 : the second recipient in the split account (define-symbolic tmpl_rcv2 bv64) - tmpl_rat1 : fraction of money to be paid to the...
779b9d052b46c2fa64c5cf3b378e94780021791f98da1d66d02554f212266c92
abcdw/rde
live.scm
(define-module (abcdw hosts live) #:use-module (rde features base) #:use-module (rde features system) #:use-module (rde system services admin) #:use-module (rde system services guix) #:use-module (gnu services) #:use-module (gnu system file-systems)) Hardware / host specifis features ;; TODO: Switch...
null
https://raw.githubusercontent.com/abcdw/rde/f218584dfc06f650c526f38ab2eb8b69a436100f/examples/src/abcdw/hosts/live.scm
scheme
TODO: Switch from UUIDs to partition labels For better
(define-module (abcdw hosts live) #:use-module (rde features base) #:use-module (rde features system) #:use-module (rde system services admin) #:use-module (rde system services guix) #:use-module (gnu services) #:use-module (gnu system file-systems)) Hardware / host specifis features reproducibilt...
ede77eb0b0ba63cb1163ca5f81068b7df416d86c3b8fa55e738253ac200fe568
simmone/racket-simple-xlsx
theme-test.rkt
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../xlsx/xlsx.rkt") (require "../../../lib/lib.rkt") (require"../../../xl/theme/theme.rkt") (require racket/runtime-path) (define-runtime-path theme_file "theme.xml") (define test-theme (test-suite "test-theme" (test-cas...
null
https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/xl/theme/theme-test.rkt
racket
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../xlsx/xlsx.rkt") (require "../../../lib/lib.rkt") (require"../../../xl/theme/theme.rkt") (require racket/runtime-path) (define-runtime-path theme_file "theme.xml") (define test-theme (test-suite "test-theme" (test-cas...
bc583cb41ce8c1b961a62161373319472ae3941e930c05252ff424e4f74a54ec
devonzuegel/smallworld
mocks.cljc
(ns smallworld.mocks) ; TODO: find out how to only load this in development, not in production ; use during development when you don't want to fetch from Twitter #_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]} (def current-user {:profile_image_url_large "" :main-coords {:lat 25.792236328125 ...
null
https://raw.githubusercontent.com/devonzuegel/smallworld/aebe3a6b339eaa6fb9cbc06ad23fd5da49ec253d/dev/dev/smallworld/mocks.cljc
clojure
TODO: find out how to only load this in development, not in production use during development when you don't want to fetch from Twitter
(ns smallworld.mocks) #_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]} (def current-user {:profile_image_url_large "" :main-coords {:lat 25.792236328125 :lng -80.13484954833984} :name-location nil :name "Hardcoded ☀️" :user-id "TODO" :screen-name "hardcoded" :main-locatio...
2ab30f0729b55870757fb952fd30701f5e4e2c4942eb8742908ded291e22603b
Clozure/ccl
version.lisp
-*-Mode : LISP ; Package : CCL -*- ;;; Copyright 1994 - 2009 Clozure Associates ;;; 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 appli...
null
https://raw.githubusercontent.com/Clozure/ccl/596fdacb34b8e51f2518bde453b608048d710413/level-1/version.lisp
lisp
Package : CCL -*- 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 la...
Copyright 1994 - 2009 Clozure Associates distributed under the License is distributed on an " AS IS " BASIS , (in-package "CCL") (defparameter *openmcl-major-version* 1) (defparameter *openmcl-minor-version* 12) (defparameter *openmcl-revision* 1) May be set by xload - level-0 (defvar *openmcl-svn-revision* nil...
21d1d0725a3ff672f221ebb20907a6659df7e009da49b1d2391ccaa0c0c540b2
haskell-tools/haskell-tools
IndentationMultiLine.hs
module Refactor.ExtractBinding.IndentationMultiLine where f a = case Just a of Nothing -> 0 Just x -> x
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/ExtractBinding/IndentationMultiLine.hs
haskell
module Refactor.ExtractBinding.IndentationMultiLine where f a = case Just a of Nothing -> 0 Just x -> x
6542327de738a82bcbd6c4638da87e1e9fe734ff2abb4b448a23bac9a9c9d984
shriram/gradescope-racket
defs.rkt
#lang racket/base (provide [rename-out (square sq)]) (define (square n) (* n n))
null
https://raw.githubusercontent.com/shriram/gradescope-racket/56aacb9caf6d0d233d9e267c6e7a4ba216fde073/tests/sq/s3/defs.rkt
racket
#lang racket/base (provide [rename-out (square sq)]) (define (square n) (* n n))
5f59b52184aba995d98fcc5fad4c9b1b765a18c152d1b1673a69e8885b6ed1b8
tek/chiasma
Main.hs
module Main where import Chiasma.Test.CaptureTest (test_capture) import Chiasma.Test.FindTest (test_find) import Chiasma.Test.RenderTest (test_render) import Chiasma.Test.TmuxTest (test_tmux) import Chiasma.Test.Util (integrationTest) import Test.Tasty (TestTree, defaultMain, testGroup) tests :: TestTree tests = te...
null
https://raw.githubusercontent.com/tek/chiasma/45ce231f629db9ed67c78ce872ac719a90a217bd/packages/test/integration/Main.hs
haskell
module Main where import Chiasma.Test.CaptureTest (test_capture) import Chiasma.Test.FindTest (test_find) import Chiasma.Test.RenderTest (test_render) import Chiasma.Test.TmuxTest (test_tmux) import Chiasma.Test.Util (integrationTest) import Test.Tasty (TestTree, defaultMain, testGroup) tests :: TestTree tests = te...
7751d806f36bb88c2793b362d8ab2ad221a58a84fce5ee5219b8148d7a7f12dd
PandoraMedia/kbrowse
msgpack.clj
;;; Copyright 2017 - present Pandora Media , Inc. ;;; 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...
null
https://raw.githubusercontent.com/PandoraMedia/kbrowse/1d8bf4b8da16fa1e49a7c40312a30ed87a94283b/src/kbrowse/msgpack.clj
clojure
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 permi...
Copyright 2017 - present Pandora Media , Inc. distributed under the License is distributed on an " AS IS " BASIS , (ns kbrowse.msgpack "Provide a Msgpack deserializer." (:require [msgpack.core :as msg]) (:import org.apache.kafka.common.serialization.Deserializer)) (deftype MsgpackDeserializer [] Deseriali...
f7b02a53184fc9856e7f58bde2c42cca68e3a7fbe7fd817182e6bdac52b22189
opencog/opencog
main.scm
(use-modules (ice-9 receive)) ; for receive, below (use-modules (ice-9 optargs)) ; for define*-public (use-modules (srfi srfi-1) (opencog) (opencog nlp) ; need the atom types (opencog nlp oc) ; need the atom types (opencog nlp relex2logic) ; helpers.scm uses this...
null
https://raw.githubusercontent.com/opencog/opencog/482a93b34c2eeaac0e773731d61c31558710f93d/opencog/nlp/microplanning/main.scm
scheme
for receive, below for define*-public need the atom types need the atom types helpers.scm uses this loading additional dependency ======================================================================= Main interface ======================================================================= --------------------...
(use-modules (srfi srfi-1) (opencog) (opencog nlp sureal)) (load "sentence-forms.scm") (load "helpers.scm") (load "anaphora-noun-item.scm") (load "anaphora-nouns-list.scm") (load "anaphora.scm") (load "chunks-option.scm") (load "chunks-set.scm") (load "atomW.scm") Because we use the cas...
a596b780b966d437db37ab79c86139ebda51eebc388f1f31169719799d9005cb
alura-cursos/clojure-mutabilidade-atomos-e-refs
aula6.clj
(ns hospital.aula6 (:use [clojure pprint]) (:require [hospital.model :as h.model])) (defn chega-em [fila pessoa] (conj fila pessoa)) (defn chega-em! "troca de referencia via ref-set" [hospital pessoa] (let [fila (get hospital :espera)] (ref-set fila (chega-em @fila pessoa)))) (defn chega-em! "troc...
null
https://raw.githubusercontent.com/alura-cursos/clojure-mutabilidade-atomos-e-refs/18c70bc13862df53377ac607b53b8f210f4239dd/aula6.1/hospital/src/hospital/aula6.clj
clojure
(ns hospital.aula6 (:use [clojure pprint]) (:require [hospital.model :as h.model])) (defn chega-em [fila pessoa] (conj fila pessoa)) (defn chega-em! "troca de referencia via ref-set" [hospital pessoa] (let [fila (get hospital :espera)] (ref-set fila (chega-em @fila pessoa)))) (defn chega-em! "troc...
d836fa5930001a20cfd0ca2884ce027890d87eb6cb9e84851de5201c170f7fa2
GaloisInc/xml
Types.hs
-------------------------------------------------------------------- -- | Module : Text . XML.Light . Types Copyright : ( c ) Galois , Inc. 2007 -- License : BSD3 -- Maintainer : Iavor < > -- Stability : provisional -- Portability: -- -- Basic XML types. -- {-# LANGUAGE DeriveDataTypeable #-} module Tex...
null
https://raw.githubusercontent.com/GaloisInc/xml/004a2c07286d17f61237d1bf59ccc11a5122a57c/Text/XML/Light/Types.hs
haskell
------------------------------------------------------------------ | License : BSD3 Stability : provisional Portability: Basic XML types. # LANGUAGE DeriveDataTypeable # | XML content | XML elements | XML attributes | XML CData ^ Ordinary character data; pretty printer escapes &, < etc. | XML qualified ...
Module : Text . XML.Light . Types Copyright : ( c ) Galois , Inc. 2007 Maintainer : Iavor < > module Text.XML.Light.Types where import Data.Typeable(Typeable) import Data.Data(Data) | A line is an Integer type Line = Integer data Content = Elem Element | Text CData | ...
3180997be3773a6d1cf517d21612f72c68c0fd14ee6266771ad1b3a7de714d9d
roswell/roswell
build-asd.lisp
(defpackage :roswell.build.asd (:use :cl)) (in-package :roswell.build.asd) (defun asd (system-path &optional (method) &rest argv) (declare (ignorable argv)) (let (r) (do-symbols (i (find-package :asdf)) (let ((name (symbol-name i))) (and (equalp "po-" (subseq (reverse name) 0 (min 3 (length nam...
null
https://raw.githubusercontent.com/roswell/roswell/0107dfb54393aff1a776deb79d58f67f642135cb/lisp/build-asd.lisp
lisp
(defpackage :roswell.build.asd (:use :cl)) (in-package :roswell.build.asd) (defun asd (system-path &optional (method) &rest argv) (declare (ignorable argv)) (let (r) (do-symbols (i (find-package :asdf)) (let ((name (symbol-name i))) (and (equalp "po-" (subseq (reverse name) 0 (min 3 (length nam...
7ad8e86014bf91caca0f91cb83eeb38e05b9d70155b0a1f1741fa878705f8ce4
commercialhaskell/stack
Lib.hs
module Lib (foo) where foo :: Int foo = 1
null
https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/3997-coverage-with-cabal-3/files/src/Lib.hs
haskell
module Lib (foo) where foo :: Int foo = 1
77d6df8f39202a718cd37b19735dfe4a60108ac38033e0734a54b50986ab09e0
dinosaure/tuyau
tuyau_mirage_tls.mli
open Tuyau_mirage type 'flow protocol_with_tls val underlying : 'flow protocol_with_tls -> 'flow val handshake : 'flow protocol_with_tls -> bool val protocol_with_tls : key:'edn key -> 'flow Witness.protocol -> ('edn * Tls.Config.client) key * 'flow protocol_with_tls Witness.protocol type 'service service_wit...
null
https://raw.githubusercontent.com/dinosaure/tuyau/8ed849805153f5dfad6c045782e3d20ef06cd9b6/mirage/tuyau_mirage_tls.mli
ocaml
open Tuyau_mirage type 'flow protocol_with_tls val underlying : 'flow protocol_with_tls -> 'flow val handshake : 'flow protocol_with_tls -> bool val protocol_with_tls : key:'edn key -> 'flow Witness.protocol -> ('edn * Tls.Config.client) key * 'flow protocol_with_tls Witness.protocol type 'service service_wit...
eb08f76e0db85ba506b36aca3f73b514a1a89ed6da63ffc69eef39495648b9be
microsoft/SLAyer
NSMultiIndexedSet.mli
Copyright ( c ) Microsoft Corporation . All rights reserved . open NSSet module type MultiIndexedType = sig type t val equal: t -> t -> bool val compare: t -> t -> int type idx val index : t -> idx val indices : t -> idx list val equal_idx : idx -> idx -> bool val compare_idx : idx -> idx -> int ...
null
https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/Library/NSMultiIndexedSet.mli
ocaml
Copyright ( c ) Microsoft Corporation . All rights reserved . open NSSet module type MultiIndexedType = sig type t val equal: t -> t -> bool val compare: t -> t -> int type idx val index : t -> idx val indices : t -> idx list val equal_idx : idx -> idx -> bool val compare_idx : idx -> idx -> int ...
3ef36d8a67c130f6776ed45e167b7344b9b33dd6930dcf5ec825c6247ba30275
borodust/claw-legacy
static.lisp
(cl:in-package :claw.cffi.c) (defclass static-adapter (adapter) ()) (defun make-static-adapter (wrapper path) (make-instance 'static-adapter :wrapper wrapper :path path)) (defun load-static-adapter-template () (alexandria:read-file-into-string (asdf:system-relative-pathname :claw/cffi "src/cffi/c/adapter/t...
null
https://raw.githubusercontent.com/borodust/claw-legacy/3cd4a96fca95eb9e8d5d069426694669f81b2250/src/cffi/c/adapter/static.lisp
lisp
(cl:in-package :claw.cffi.c) (defclass static-adapter (adapter) ()) (defun make-static-adapter (wrapper path) (make-instance 'static-adapter :wrapper wrapper :path path)) (defun load-static-adapter-template () (alexandria:read-file-into-string (asdf:system-relative-pathname :claw/cffi "src/cffi/c/adapter/t...
503ad9ea2af27591d2b0b426dd444e4370a08c45e8ea9ff5dbef00fef97c7f46
mauricioszabo/repl-tooling
ui.cljs
(ns repl-tooling.integration.ui (:require [devcards.core :as cards :include-macros true] [schema.core :as s] [repl-tooling.editor-helpers-test] [repl-tooling.repl-client.parsing-test] [repl-tooling.repl-client.textual-representation-test] [repl-tooling.inte...
null
https://raw.githubusercontent.com/mauricioszabo/repl-tooling/1cea9b411cc118d71266cb8e035e146325baf410/test/repl_tooling/integration/ui.cljs
clojure
(ns repl-tooling.integration.ui (:require [devcards.core :as cards :include-macros true] [schema.core :as s] [repl-tooling.editor-helpers-test] [repl-tooling.repl-client.parsing-test] [repl-tooling.repl-client.textual-representation-test] [repl-tooling.inte...
bfe9cc44795cd12c5c0098411cce21a5b762db5c8ff01452de0fec69b732b6a5
uw-unsat/leanette-popl22-artifact
visualize.rkt
#lang racket (provide visualize-row visualize-board visualization-html-header) (require "rules.rkt" "board.rkt" #;"../core/xml.rkt") HACK by (define-syntax-rule (xexp . rest) #f) ; cell-ex? -> xexpr? (define (cell->xexpr cell) (cond [(empty-cell? cell) (xexp td #:class "cell")] [else ...
null
https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-4/nonograms/puzzle/src/nonograms/visualize.rkt
racket
"../core/xml.rkt") cell-ex? -> xexpr? line? -> xexpr? line? -> xexpr? board? -> xexpr? xexpr?
#lang racket (provide visualize-row visualize-board visualization-html-header) (require "rules.rkt" "board.rkt" HACK by (define-syntax-rule (xexp . rest) #f) (define (cell->xexpr cell) (cond [(empty-cell? cell) (xexp td #:class "cell")] [else (define classes (cond [(true-ce...
7b6a2f440ebdbb1036969f209ceef67287a02f6359c2f71a584c87de4f52e9b2
sdiehl/kaleidoscope
Syntax.hs
module Syntax where type Name = String data Expr = Int Integer | Float Double | Var String | Call Name [Expr] | Function Name [Name] Expr | Extern Name [Name] | BinaryOp Name Expr Expr | UnaryOp Name Expr deriving (Eq, Ord, Show)
null
https://raw.githubusercontent.com/sdiehl/kaleidoscope/682bdafe6d8f90caca4cdd0adb30bd3ebd9eff7b/src/chapter4/Syntax.hs
haskell
module Syntax where type Name = String data Expr = Int Integer | Float Double | Var String | Call Name [Expr] | Function Name [Name] Expr | Extern Name [Name] | BinaryOp Name Expr Expr | UnaryOp Name Expr deriving (Eq, Ord, Show)
561afa5b7c6f55ee0887b0666993003b0da3ba1d63b3c1185be0f341d8d91704
zkincaid/duet
pathexpr.mli
(** {1 Path expressions} *) type simple type nested (** A simple path expression for a graph [G] is a regular expression over the alphabet of the edges of [G], in which every recognized word is a finite path in [G]. A nested path expression is a simple path expression extended with a Segment operator, which...
null
https://raw.githubusercontent.com/zkincaid/duet/eb3dbfe6c51d5e1a11cb39ab8f70584aaaa309f9/srk/src/pathexpr.mli
ocaml
* {1 Path expressions} * A simple path expression for a graph [G] is a regular expression over the alphabet of the edges of [G], in which every recognized word is a finite path in [G]. A nested path expression is a simple path expression extended with a Segment operator, which is used to group sub-express...
type simple type nested type 'a t type context val pp : Format.formatter -> 'a t -> unit val show : 'a t -> string val mk_context : ?size:int -> unit -> context * Check whether two path expressions recognize the same language val equiv : context -> simple t -> simple t -> bool val mk_mul : context -> 'a t -> 'a...
63fd378b4821e458feb6f83643e150da422a354c76156634bd65e6af0df502ae
soenkehahn/looper
Cli.hs
# LANGUAGE DeriveGeneric # # LANGUAGE ViewPatterns # module Looper.Cli ( CliArgs(..), Normalization(..), withCliArgs, ) where import Control.Exception import Data.List import WithCli data CliArgs = Loop { cliArgsFile :: FilePath, cliArgsWatched :: [FilePath], cliArgsNormalization :: Normalization...
null
https://raw.githubusercontent.com/soenkehahn/looper/c99792a485307643c36509dd71b752fce11033ab/src/Looper/Cli.hs
haskell
# LANGUAGE DeriveGeneric # # LANGUAGE ViewPatterns # module Looper.Cli ( CliArgs(..), Normalization(..), withCliArgs, ) where import Control.Exception import Data.List import WithCli data CliArgs = Loop { cliArgsFile :: FilePath, cliArgsWatched :: [FilePath], cliArgsNormalization :: Normalization...
d417995c5673c292f8ebb4b9fb201336ace7e4f7df1b90536af9908811958d17
TristanCacqueray/haskell-butler
Clock.hs
-- | Clock provides timing facility module Butler.Core.Clock ( Clock, newClock, -- * Read time Time, getClockTime, -- * Duration Milli (..), sleep, -- * stm helpers WaitResult (..), waitTransaction, ) where import Butler.Prelude import Data.UnixTime newtype Clock = Clock...
null
https://raw.githubusercontent.com/TristanCacqueray/haskell-butler/9a9a4e3ef62346a5217c953f14fc0c21493ef681/src/Butler/Core/Clock.hs
haskell
| Clock provides timing facility * Read time * Duration * stm helpers | The number of milli secondes since the clock started. | A duration in millisecond | Pause the execution. | Wait for a transaction with a timeout.
module Butler.Core.Clock ( Clock, newClock, Time, getClockTime, Milli (..), sleep, WaitResult (..), waitTransaction, ) where import Butler.Prelude import Data.UnixTime newtype Clock = Clock (IO Time) getClockTime :: MonadIO m => Clock -> m Time getClockTime (Clock action) = liftIO ...
a25f2fd778551ef65e11194b0b42038d88f4c0695ef9027181c5a9fe9ff32000
ChaosCabbage/very-lazy-boy
IORegisters.hs
module CPU.IORegisters ( IORegisters, FrozenIORegisters, create, thaw, freeze, addCycles, readPort, writePort ) where import CPU.Types (Address) import Data.Word (Word8) import Data.STRef (STRef, newSTRef, readSTRef, writeSTRef) import Control.Monad.ST import Text.Printf ...
null
https://raw.githubusercontent.com/ChaosCabbage/very-lazy-boy/53ec41a3ff296e9d602b73fee33a512126c8a8b4/src/CPU/IORegisters.hs
haskell
IO registers act like normal memory locations from the point of view of most gameboy instructions. However, they are not real memory. Reading from and writing to these addresses is how gameboy programs interact with the hardware. This structure will keep all of the actual state needed to keep track of t...
module CPU.IORegisters ( IORegisters, FrozenIORegisters, create, thaw, freeze, addCycles, readPort, writePort ) where import CPU.Types (Address) import Data.Word (Word8) import Data.STRef (STRef, newSTRef, readSTRef, writeSTRef) import Control.Monad.ST import Text.Printf ...
30945a8a7b1d362ed5dc2e24bc8bc1e4398a94003e527d834cda6e20f4f36d63
ad0/4clojure-solving-bot
core.clj
(ns a4clojurebot.core (:require [clj-http.client :as client])) ;; parameters (def login "*********") (def passwd "*********") (def verbose false) ; to show the submitted code ;; global defs (def urlbase "") (def login-url (str urlbase "/login")) (def probs-url (str urlbase "/problems")) (defn prob-url [n] (str...
null
https://raw.githubusercontent.com/ad0/4clojure-solving-bot/f76a13d1aa58d4f0dd6d137d386f17e36412761a/src/a4clojurebot/core.clj
clojure
parameters to show the submitted code global defs regexp for parsing problem data exception is raised when a problem is solved set up the cookie store log in get the list of challenges time to try to break some problems! it worked! oops.. a final word
(ns a4clojurebot.core (:require [clj-http.client :as client])) (def login "*********") (def passwd "*********") (def urlbase "") (def login-url (str urlbase "/login")) (def probs-url (str urlbase "/problems")) (defn prob-url [n] (str urlbase "/problem/" n)) (def probline (str "<tr class=\\\"(?:even|odd)row\\\...
1dc03130eb5d8bc5f4ff84efb298344d01d39621ba62d723eb1de0262000589e
UU-ComputerScience/js-asteroids
HTMLElement.hs
module Language.UHC.JS.HTML5.HTMLElement where import Language.UHC.JS.Types import Language.UHC.JS.Marshal import Language.UHC.JS.Primitives import Language.UHC.JS.HTML5.Types import Language.UHC.JS.Prelude import Language.UHC.JS.JSRef onkeydown :: JSObject_ a -> JSRef ReadWrite (Event -> IO ()) onkeydown e = let ...
null
https://raw.githubusercontent.com/UU-ComputerScience/js-asteroids/b7015d8ad4aa57ff30f2631e0945462f6e1ef47a/uhc-js/uhc-js/src/Language/UHC/JS/HTML5/HTMLElement.hs
haskell
module Language.UHC.JS.HTML5.HTMLElement where import Language.UHC.JS.Types import Language.UHC.JS.Marshal import Language.UHC.JS.Primitives import Language.UHC.JS.HTML5.Types import Language.UHC.JS.Prelude import Language.UHC.JS.JSRef onkeydown :: JSObject_ a -> JSRef ReadWrite (Event -> IO ()) onkeydown e = let ...