_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
712f0649db1f673839c2add8c00271cb801b141f7400b3587d80b04db925ae9e
SamirTalwar/advent-of-code
AOC_04_2.hs
import Control.Monad (mapM_) import qualified Data.Char as Char import qualified Data.List as List import Data.Text (Text) import qualified Data.Text as Text import qualified Data.Text.IO as IO import Text.Parsec import Text.Parsec.Text data Room = Room {roomName :: Name, roomSectorId :: SectorId, roomChecksum :: Chec...
null
https://raw.githubusercontent.com/SamirTalwar/advent-of-code/66bd9e31f078c9b81ece0264fb869e48964afa63/2016/AOC_04_2.hs
haskell
import Control.Monad (mapM_) import qualified Data.Char as Char import qualified Data.List as List import Data.Text (Text) import qualified Data.Text as Text import qualified Data.Text.IO as IO import Text.Parsec import Text.Parsec.Text data Room = Room {roomName :: Name, roomSectorId :: SectorId, roomChecksum :: Chec...
f75844f3829a5b79c0268c7780d83f6c303d25d6d417e68c5fca947f599d4bff
jaspervdj/number-six
Tests.hs
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} module NumberSix.Message.Decode.Tests ( tests ) where -------------------------------------------------------------------------------- import Test.Framework (Test, testGroup)...
null
https://raw.githubusercontent.com/jaspervdj/number-six/1aba681786bd85bd20f79406c681ea581b982cd6/tests/NumberSix/Message/Decode/Tests.hs
haskell
------------------------------------------------------------------------------ # LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----------------------------------------------------...
module NumberSix.Message.Decode.Tests ( tests ) where import Test.Framework (Test, testGroup) import Test.HUnit ((@=?)) import NumberSix.Message import NumberSix.Message.Decode import NumberSix.Tests.Util tests :: Test tests = testG...
6dd784839d4cdf34e0e1393ca7ef6a299c85deab36e34980164d2e4f0e889f7d
sellout/haskerwaul
Graphic.hs
# language UndecidableSuperClasses # module Haskerwaul.Monoid.Graphic ( module Haskerwaul.Monoid.Graphic -- * extended modules , module Haskerwaul.Band.LeftRegular , module Haskerwaul.Monoid , module Haskerwaul.Shelf.Left ) where import Haskerwaul.Band.LeftRegular import Haskerwaul.Monoid import Haskerwau...
null
https://raw.githubusercontent.com/sellout/haskerwaul/cdd4a61c6abe0f757e32058f4832cf616025b45f/src/Haskerwaul/Monoid/Graphic.hs
haskell
* extended modules | = references - [nLab](+monoid) - __NB__: Instances for this are automatically coalesced.
# language UndecidableSuperClasses # module Haskerwaul.Monoid.Graphic ( module Haskerwaul.Monoid.Graphic , module Haskerwaul.Band.LeftRegular , module Haskerwaul.Monoid , module Haskerwaul.Shelf.Left ) where import Haskerwaul.Band.LeftRegular import Haskerwaul.Monoid import Haskerwaul.Shelf.Left class (Lef...
9b47f6939e545d7c52a33a6c18158b952c9137c4d72e5c479d8151e34634ea55
baskeboler/cljs-karaoke-client
build.clj
(ns build (:require [shadow.cljs.devtools.api :as shadow] [clojure.java.shell :refer [sh]] [hiccup.page :refer [html5]] [clojure.tools.reader :as reader] [clojure.java.io :as io :refer [input-stream]] [clojure.string :as cstr] [mongo :as m]) ...
null
https://raw.githubusercontent.com/baskeboler/cljs-karaoke-client/bb6512435eaa436d35034886be99213625847ee0/src/dev/build.clj
clojure
[clojure.string :as str]) last)) is ()
(ns build (:require [shadow.cljs.devtools.api :as shadow] [clojure.java.shell :refer [sh]] [hiccup.page :refer [html5]] [clojure.tools.reader :as reader] [clojure.java.io :as io :refer [input-stream]] [clojure.string :as cstr] [mongo :as m]) (:...
4660b61c3a7a2466b55395be30da3a9ed8adde4fcda4609ab02dfd0399112fcb
discord-haskell/discord-haskell
Embed.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE RecordWildCards # | Data structures pertaining to Discord Embed module Discord.Internal.Types.Embed where import Data.Aeson import Data.Time.Clock import Data.Default (Default, def) import qualified Data.Text as T import qualified Dat...
null
https://raw.githubusercontent.com/discord-haskell/discord-haskell/f98f5935a0b4b30288d5fc40bdb04da428ed03ca/src/Discord/Internal/Types/Embed.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable # can't set these | An embed attached to a message. ^ Title of the embed ^ URL of embed ^ Thumbnail in top-right ^ Description of embed ^ Fields of the embed ^ The embed color ^ The time of the embed content ^ Only present for "video" types ^ Only ...
# LANGUAGE RecordWildCards # | Data structures pertaining to Discord Embed module Discord.Internal.Types.Embed where import Data.Aeson import Data.Time.Clock import Data.Default (Default, def) import qualified Data.Text as T import qualified Data.ByteString as B import Data.Functor ((<&>)) import Network.HTTP.Clie...
a07c6ea5e829db803552dd39f038aaffb1c5a5cb2838647b1b2e75f62e8c6e1d
inaka/elvis_core
fail_no_dollar_space.erl
-module(fail_no_dollar_space). -export([good/1, bad/1]). good(Char) when Char == $\s -> "Using" ++ [$\s | "$\\s is good"]. bad(Char) when Char == $ -> "Using " ++ [$ | "$ is confusing"].
null
https://raw.githubusercontent.com/inaka/elvis_core/7d0de02157c702efeb091a88204b63eb807140a0/test/examples/fail_no_dollar_space.erl
erlang
-module(fail_no_dollar_space). -export([good/1, bad/1]). good(Char) when Char == $\s -> "Using" ++ [$\s | "$\\s is good"]. bad(Char) when Char == $ -> "Using " ++ [$ | "$ is confusing"].
72f9ef66904c442a767c5d810f10ec764f2354b95ce0dfcb3e6035ed89ba9c52
devmatogrosso/dojo-s01e02-escrevendo-no-celular
celular.clj
(ns celular) (comment ABC -> 2 DEF -> 3 GHI -> 4 JKL -> 5 MNO -> 6 PQRS -> 7 TUV -> 8 WXYZ -> 9 Espaço -> 0 ) (def mappings {\2 [\A \B \C] \3 [\D \E \F] \4 [\G \H \I] \5 [\J \K \L] \6 [\M \N \O] \7 [\P \Q \R \S] \8 [\T \U \V] \9 [\W \X \Y \Z] \0...
null
https://raw.githubusercontent.com/devmatogrosso/dojo-s01e02-escrevendo-no-celular/2842ee54280561ad337505fc16471bac622ef253/src/celular.clj
clojure
(ns celular) (comment ABC -> 2 DEF -> 3 GHI -> 4 JKL -> 5 MNO -> 6 PQRS -> 7 TUV -> 8 WXYZ -> 9 Espaço -> 0 ) (def mappings {\2 [\A \B \C] \3 [\D \E \F] \4 [\G \H \I] \5 [\J \K \L] \6 [\M \N \O] \7 [\P \Q \R \S] \8 [\T \U \V] \9 [\W \X \Y \Z] \0...
602a3aef010be567739d16a6c19d639d2ef3f184adb93498899fccf5520d9224
iamaleksey/oserl
smpp_base_syntax.erl
Copyright ( C ) 2009 , %%% All rights reserved. %%% %%% Redistribution and use in source and binary forms, with or without %%% modification, are permitted provided that the following conditions are met: %%% %%% o Redistributions of source code must retain the above copyright notice, %%% this list of conditions ...
null
https://raw.githubusercontent.com/iamaleksey/oserl/b254c68225b98384738c7a7ff9ddb53caa35c075/src/smpp_base_syntax.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: o Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. o Redistributions ...
Copyright ( C ) 2009 , THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY ,...
ee371adccc30abc0032eace70f1387e57459906508b302c8401058cb9231062f
vollcheck/aoc
core.clj
(ns day08 (:require [clojure.string :as str])) (defn load-input [filename] (mapv #(str/split % #" \| ") (str/split-lines (slurp filename)))) (defn sec [coll] "Assert that coll is a vector." (nth coll 1)) (defn in? [coll elm] (some #(= elm %) coll)) lenghts of 1 , 4 , 7 and 8 in seven - segment s...
null
https://raw.githubusercontent.com/vollcheck/aoc/c78c8a8330a045fb11600e4deb9beb055e298651/src/y21/day08/core.clj
clojure
rules based on the length: length -> number 8 -> 7 based on deduction: 2-> contains ...
(ns day08 (:require [clojure.string :as str])) (defn load-input [filename] (mapv #(str/split % #" \| ") (str/split-lines (slurp filename)))) (defn sec [coll] "Assert that coll is a vector." (nth coll 1)) (defn in? [coll elm] (some #(= elm %) coll)) lenghts of 1 , 4 , 7 and 8 in seven - segment s...
521176d976b305e6018e09e13581ac8545fa54f5e3f1ad23e1674195e3587953
lambdabot/lambdabot
Nick.hs
module Lambdabot.Nick ( Nick(..) , fmtNick , parseNick ) where import Lambdabot.Util import Data.Char -- | The type of nicknames isolated from a message. data Nick = Nick ^ The tag of the server this nick is on ^ The server - specific nickname of this nick } This definition of breaks str...
null
https://raw.githubusercontent.com/lambdabot/lambdabot/de01f362c7a8fc6f85c37e604168dcccb1283a0e/lambdabot-core/src/Lambdabot/Nick.hs
haskell
| The type of nicknames isolated from a message. freenode TODO: server-specific rules should have server-specific implementations | Format a nickname for display. This will automatically omit the server field if it is the same as the server of the provided message. | Parse a nickname received in a message. If t...
module Lambdabot.Nick ( Nick(..) , fmtNick , parseNick ) where import Lambdabot.Util import Data.Char data Nick = Nick ^ The tag of the server this nick is on ^ The server - specific nickname of this nick } This definition of breaks strict RFC rules , but so does canonicalizeName :: Stri...
4105282b7add4a40e95a6c8f7d634f206f2a80e046b526b8aee2c43eb7b580da
emqx/emqx
emqx_resource_manager_sup.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. 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 o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_resource/src/emqx_resource_manager_sup.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 ...
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. 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(emqx_resource_manager_sup). -behaviour(supervisor). -export([ensure_child/6]). -export...
346641294bae150499ed8fe272d2579610c48d84bb43e58e771b059a8e951620
mogenslund/liquid
cool_stuff.cljc
(ns liq.extras.cool-stuff (:require [clojure.string :as str] [liq.editor :as editor] [liq.buffer :as buffer] [liq.util :as util]) (:import [java.net Socket] [java.io BufferedInputStream BufferedOutputStream BufferedReader InputStreamReader] ...
null
https://raw.githubusercontent.com/mogenslund/liquid/371f2b50b1f6dbb4e9fc33475341ad92599e8c99/src/liq/extras/cool_stuff.cljc
clojure
(ns liq.extras.cool-stuff (:require [clojure.string :as str] [liq.editor :as editor] [liq.buffer :as buffer] [liq.util :as util]) (:import [java.net Socket] [java.io BufferedInputStream BufferedOutputStream BufferedReader InputStreamReader] ...
a595ac4b5e4135c55e7ef040da52f4a576ab072cc57459f84087a0806d10ea22
clj-commons/pomegranate
test_report.clj
(ns cemerick.pomegranate.test-report (:require [clojure.test])) (def platform (str "clj " (clojure-version) " jdk " (System/getProperty "java.version"))) (defmethod clojure.test/report :begin-test-var [m] (let [test-name (-> m :var meta :name)] (println (format "=== %s [%s]" test-name platform))))
null
https://raw.githubusercontent.com/clj-commons/pomegranate/e5c6fe838fb49ae4f1edfcb5f989c2c20b166bf7/src/test/clojure/cemerick/pomegranate/test_report.clj
clojure
(ns cemerick.pomegranate.test-report (:require [clojure.test])) (def platform (str "clj " (clojure-version) " jdk " (System/getProperty "java.version"))) (defmethod clojure.test/report :begin-test-var [m] (let [test-name (-> m :var meta :name)] (println (format "=== %s [%s]" test-name platform))))
e740dfb272a9a92bf9e819439e0eac845013f9833cf2c2a68a9740e6ce30539e
tsloughter/elna
chatterbox_handler.erl
-module(chatterbox_handler). -behaviour(h2_stream). -export([init/2, on_receive_request_headers/2, on_send_push_promise/2, on_receive_request_data/2, on_request_end_stream/1]). -include_lib("chatterbox/include/http2.hrl"). -record(cb_static, { req_headers=[], ...
null
https://raw.githubusercontent.com/tsloughter/elna/a444fdbd6d44c82eb61473e0d95c122b89a4e057/src/chatterbox_handler.erl
erlang
-module(chatterbox_handler). -behaviour(h2_stream). -export([init/2, on_receive_request_headers/2, on_send_push_promise/2, on_receive_request_data/2, on_request_end_stream/1]). -include_lib("chatterbox/include/http2.hrl"). -record(cb_static, { req_headers=[], ...
6b4258b358fe03871fb01f2dd3ea0acb42f31b61ad158de9a5fadbfd65001763
granule-project/granule
Interpreter.hs
_ _ _ /\ _ \ _ _ _ _ _ _ _ _ _ _ _ _ _ \//\ \ _ _ / _ \/\`'__\/ _ _ \ / ' _ ` \/\ \/\ \ \ \ \ /'__`\ /\ \_\ \ \ \//\ \_\ \_/\ \/\ \ \ \_\ \ \_\ \_/\ _ _ / \ \ _ _ _ _ \ \_\\ \...
null
https://raw.githubusercontent.com/granule-project/granule/aa869e0522ad961f6627e827055700c5fcabfc75/interpreter/src/Language/Granule/Interpreter.hs
haskell
# LANGUAGE PackageImports # | Run the checker and interpreter on a bunch of files print the result of running the checker and interpreter | Run the input through the type checker and evaluate. update globals with extensions Print to terminal when in debugging mode: Check and evaluate Associate the span with each...
_ _ _ /\ _ \ _ _ _ _ _ _ _ _ _ _ _ _ _ \//\ \ _ _ / _ \/\`'__\/ _ _ \ / ' _ ` \/\ \/\ \ \ \ \ /'__`\ /\ \_\ \ \ \//\ \_\ \_/\ \/\ \ \ \_\ \ \_\ \_/\ _ _ / \ \ _ _ _ _ \ \_\\ \...
97b57b1d986f1b3f6e6c50f5822a2b2c637e49e5a429e9f8f79c588a229272f6
TrustInSoft/tis-kernel
compute_impact.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/impact/compute_impact.mli
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of Frama - C. Copyright ( C ) 2007 - 2015 ...
cea17addf0fd0c53439f1eeb706a76ff839e821b34db6d57c51700ba24a4b563
threatgrid/clj-momo
url.cljc
(ns clj-momo.lib.url (:require [cemerick.uri :as uri])) (def url-chars-re #"[-A-Za-z0-9._~:/?#\[\]@!$&'()*+,;=%]+") (def encode uri/uri-encode) (def decode uri/uri-decode) (defn encoded? [s] (boolean (re-matches url-chars-re s)))
null
https://raw.githubusercontent.com/threatgrid/clj-momo/7bc0a411593eee4a939b6a3d0f628413518e09e2/src/clj_momo/lib/url.cljc
clojure
(ns clj-momo.lib.url (:require [cemerick.uri :as uri])) (def url-chars-re #"[-A-Za-z0-9._~:/?#\[\]@!$&'()*+,;=%]+") (def encode uri/uri-encode) (def decode uri/uri-decode) (defn encoded? [s] (boolean (re-matches url-chars-re s)))
6c022d933599521a00ed898654ddc881f6fa7eb82a5ebf9af73d2e1320f89fbb
gleber/erlhask
Modules.hs
# LANGUAGE DeriveGeneric , StandaloneDeriving , DeriveDataTypeable , FlexibleInstances , Rank2Types , FlexibleContexts # module Language.Erlang.Modules where import Language.CoreErlang.Parser as P import Language.CoreErlang.Pretty as PP import Language.CoreErlang.Syntax as S import qualified Data.Map as M import qua...
null
https://raw.githubusercontent.com/gleber/erlhask/0c1b0263a7226d64bd9da0fd5b441eea2f997461/src/Language/Erlang/Modules.hs
haskell
putStrLn $ prettyPrint m
# LANGUAGE DeriveGeneric , StandaloneDeriving , DeriveDataTypeable , FlexibleInstances , Rank2Types , FlexibleContexts # module Language.Erlang.Modules where import Language.CoreErlang.Parser as P import Language.CoreErlang.Pretty as PP import Language.CoreErlang.Syntax as S import qualified Data.Map as M import qua...
379be54774279138183fe17b5c8f69081e03cbabab8dc3374d565c97792e6060
lambdaisland/open-source
shellutil.clj
(ns lioss.shellutil (:require [clojure.java.io :as io] [lioss.util :as util]) (:import [java.io File])) (defn file [path] (let [f (io/file path)] (if (.isAbsolute f) f (io/file util/*cwd* path)))) (defn- glob->regex "Takes a glob-format string and returns a regex." [s] (loop [s...
null
https://raw.githubusercontent.com/lambdaisland/open-source/456f7a7620f119aa24f96cd6db0a36cd33988f6f/src/lioss/shellutil.clj
clojure
compromise to aid in testing windows
(ns lioss.shellutil (:require [clojure.java.io :as io] [lioss.util :as util]) (:import [java.io File])) (defn file [path] (let [f (io/file path)] (if (.isAbsolute f) f (io/file util/*cwd* path)))) (defn- glob->regex "Takes a glob-format string and returns a regex." [s] (loop [s...
c499c25e2c959b9b42ecaa72a865445a40a931f5fe9898049c571159dbb76906
clojure-lsp/clojure-lsp
queries_test.clj
(ns clojure-lsp.queries-test (:require [clojure-lsp.queries :as q] [clojure-lsp.shared :as shared] [clojure-lsp.test-helper :as h] [clojure.test :refer [deftest is testing]])) (h/reset-components-before-test) (deftest internal-analysis (testing "when dependency-scheme is zipfile" (h/reset-componen...
null
https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/3bef5b0306ea54fd4c8472aa141cd41d762417ad/lib/test/clojure_lsp/queries_test.clj
clojure
defmethod usage defmethod
(ns clojure-lsp.queries-test (:require [clojure-lsp.queries :as q] [clojure-lsp.shared :as shared] [clojure-lsp.test-helper :as h] [clojure.test :refer [deftest is testing]])) (h/reset-components-before-test) (deftest internal-analysis (testing "when dependency-scheme is zipfile" (h/reset-componen...
f247d92b1f1660389f8d35c12e1018105015a5735e4590ba69503fb1dd6721dc
Kakadu/fp2022
interpreter.mli
* Copyright 2021 - 2022 , * SPDX - License - Identifier : LGPL-3.0 - or - later module Interpretation : functor (M : ResultMonad.MONADERROR) -> sig type variable = { v_type : Ast.types; v_key : string; is_const : bool; assignment_count : int; v_value : Ast.values; vis_lvl : int; } val...
null
https://raw.githubusercontent.com/Kakadu/fp2022/07b6d0cb6b3d990355ccd620ecee7482630ffc61/CSharpOOP/lib/interpreter.mli
ocaml
* Copyright 2021 - 2022 , * SPDX - License - Identifier : LGPL-3.0 - or - later module Interpretation : functor (M : ResultMonad.MONADERROR) -> sig type variable = { v_type : Ast.types; v_key : string; is_const : bool; assignment_count : int; v_value : Ast.values; vis_lvl : int; } val...
f9d9ae35354f488be706c76f27501d749580ecdb181332ff98877450d33f5b74
xmonad/xmonad-contrib
DynamicIcons.hs
# LANGUAGE RecordWildCards # ----------------------------------------------------------------------------- -- | -- Module : XMonad.Hooks.DynamicIcons -- Description : Dynamically update workspace names based on its contents\/windows on it. Copyright : ( c ) Will Pierlot < > -- License : BSD3-style (...
null
https://raw.githubusercontent.com/xmonad/xmonad-contrib/e0c7e35b3dcdf0e1f9ceccf9c11b3c053ec7cf61/XMonad/Hooks/DynamicIcons.hs
haskell
--------------------------------------------------------------------------- | Module : XMonad.Hooks.DynamicIcons Description : Dynamically update workspace names based on its contents\/windows on it. License : BSD3-style (see LICENSE) Stability : unstable Portability : unportable Dynamically au...
# LANGUAGE RecordWildCards # Copyright : ( c ) Will Pierlot < > Maintainer : < > module XMonad.Hooks.DynamicIcons ( iconsPP, dynamicLogIconsWithPP, appIcon, dynamicIconsPP, getWorkspaceIcons, IconConfig(..), iconsFmtAppend, iconsFmtReplace, wrapUnwords, iconsGetAll, iconsGetFocus...
4e0460a8df82155d3486205f73cf81b90db9563a8116ddb6a45706e76fb6ed1c
janestreet/core_profiler
std.ml
(** [Core_profiler_disabled] is the library in the base projection that exposes the same profiling interface as [Core_profiler]. The profiling functions exposed by this library do not collect any profiling metrics and do not have any runtime performance on the programs they are embedded in. This allow...
null
https://raw.githubusercontent.com/janestreet/core_profiler/3d1c0e61df848f5f25f78d64beea92b619b6d5d9/disabled_lib/std.ml
ocaml
* [Core_profiler_disabled] is the library in the base projection that exposes the same profiling interface as [Core_profiler]. The profiling functions exposed by this library do not collect any profiling metrics and do not have any runtime performance on the programs they are embedded in. This allows ...
module Profiler_units = Profiler_units include Disabled
de81dcb32f0e4c239135ef7ed5a5a12435cc5df03c05790ed1e99bdccd95b305
yutopp/rill
type.ml
* Copyright yutopp 2019 - . * * Distributed under the Boost Software License , Version 1.0 . * ( See accompanying file LICENSE_1_0.txt or copy at * ) * Copyright yutopp 2019 - . * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * )...
null
https://raw.githubusercontent.com/yutopp/rill/375b67c03ab2087d0a2a833bd9e80f3e51e2694f/rillc/lib/typing/type.ml
ocaml
span that this type is related generics meta for debugging. TODO: remove
* Copyright yutopp 2019 - . * * Distributed under the Boost Software License , Version 1.0 . * ( See accompanying file LICENSE_1_0.txt or copy at * ) * Copyright yutopp 2019 - . * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * )...
da4fbcfcb346b4122624e16db9947c55422d53dcec135521b6ff3e8b083f650f
turquoise-hexagon/euler
solution.scm
(define (exact n) (inexact->exact (floor n))) (define (hamming-weight n) (let loop ((n n) (acc 0)) (if (= n 0) acc (loop (quotient n 2) (if (odd? n) (+ acc 1) acc))))) (define (f n) (let ((l (exact (log n 2)))) (- (* (+ n 1) l) (* (- (expt 2 l) 1) 2)))) (define (...
null
https://raw.githubusercontent.com/turquoise-hexagon/euler/b55e83d3d87c77fcfde495b96620f1c4dadcf0d8/src/spoilers/704/solution.scm
scheme
(define (exact n) (inexact->exact (floor n))) (define (hamming-weight n) (let loop ((n n) (acc 0)) (if (= n 0) acc (loop (quotient n 2) (if (odd? n) (+ acc 1) acc))))) (define (f n) (let ((l (exact (log n 2)))) (- (* (+ n 1) l) (* (- (expt 2 l) 1) 2)))) (define (...
c741e8aeea1b31df8b239d8b4c153180da8f9f66f90e11218cb71091269e766e
emil0r/reverie
system.clj
(ns reverie.system (:refer-clojure :exclude [System]) (:require [bultitude.core :refer [namespaces-on-classpath]] [clojure.java.classpath :as cp] [clojure.java.io :as io] [com.stuartsierra.component :as component] [taoensso.timbre :as log])) (defn load-views [& dirs]...
null
https://raw.githubusercontent.com/emil0r/reverie/a29c223b7326e6d5a5e0874d33c37ff2fa0dfd4d/reverie-core/src/reverie/system.clj
clojure
(ns reverie.system (:refer-clojure :exclude [System]) (:require [bultitude.core :refer [namespaces-on-classpath]] [clojure.java.classpath :as cp] [clojure.java.io :as io] [com.stuartsierra.component :as component] [taoensso.timbre :as log])) (defn load-views [& dirs]...
807c01362781b04c11f7117a3fb3ec289a1e2a9784801d1a9377a0ae3b9e4157
levand/quiescent
composite_components.cljs
(ns composite-components (:require [quiescent.core :as q] [quiescent.dom :as d] [quiescent.factory :as f] [cljsjs.react-bootstrap])) (f/def-factories js/ReactBootstrap Accordion Affix AffixMixin Alert BootstrapMixin Badge Button ButtonGroup ButtonToolbar Carousel CarouselItem ...
null
https://raw.githubusercontent.com/levand/quiescent/2063ebcaffb2c62e48a177c894a10f9066b7f2cc/examples/composite-components/src/composite_components.cljs
clojure
(ns composite-components (:require [quiescent.core :as q] [quiescent.dom :as d] [quiescent.factory :as f] [cljsjs.react-bootstrap])) (f/def-factories js/ReactBootstrap Accordion Affix AffixMixin Alert BootstrapMixin Badge Button ButtonGroup ButtonToolbar Carousel CarouselItem ...
150f07b4fdeaf34a43f301d6b7355a97cba25e6b60556338c68eda49e173999a
xapi-project/xen-api-libs-transitional
pciutil.ml
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api-libs-transitional/656e5e750d77a98e6656ac1c37d9309be795b0b6/pciutil/pciutil.ml
ocaml
* Util to parse pciids defaults, if we can't find better information: device ignore if this is some other vendor's device abort reading, we found what we want vendor is that the correct path ?
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
818e2be79719109a87fe51e9ffb3a0b9f9cdd689e5c746c0068548f5e586844c
SahilKang/cl-avro
stateless.lisp
Copyright 2021 - 2022 Google LLC ;;; ;;; This file is part of cl-avro. ;;; ;;; cl-avro is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option) any later ver...
null
https://raw.githubusercontent.com/SahilKang/cl-avro/7d624253e98afb987a01729bd72c99bae02f0d7d/test/ipc/stateless.lisp
lisp
This file is part of cl-avro. cl-avro is free software: you can redistribute it and/or modify (at your option) any later version. cl-avro 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 t...
Copyright 2021 - 2022 Google LLC it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (in-package #:cl-user) (defpackage #:cl-avro/test/ipc/stateless/server (:...
4889af75058f6bd2be4b370f7096d23787443c6c20a6607ce420069b6bd148c8
elaforge/karya
Shakefile.hs
Copyright 2013 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DisambiguateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE MultiW...
null
https://raw.githubusercontent.com/elaforge/karya/b4a5700868f4409c8d4f246bf93a31fc81662341/Shake/Shakefile.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt # LANGUAGE DeriveDataTypeable # # LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Shakefile for seq and associated binaries. * config ** packages | Package, with or without version e.g. containers-0.5...
Copyright 2013 # LANGUAGE DisambiguateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # module Shake.Shakefile (main) where import qualified Con...
0c3eeeca797f86d03faa7e8b338d1da5aaea6aa4b0050591e824035781565014
gaborcs/lambda-terminal
PrettyPrint.hs
module PrettyPrint where import qualified Value as V prettyPrintValue :: (c -> String) -> V.Value c -> Maybe String prettyPrintValue getName value = case value of V.Fn _ -> Nothing V.Constructor key childMaybes -> do children <- sequence childMaybes let printChild child = inParensIf (isMultiWo...
null
https://raw.githubusercontent.com/gaborcs/lambda-terminal/7f2638f2f3a562e0b60248da7652bda81be76adf/src/PrettyPrint.hs
haskell
module PrettyPrint where import qualified Value as V prettyPrintValue :: (c -> String) -> V.Value c -> Maybe String prettyPrintValue getName value = case value of V.Fn _ -> Nothing V.Constructor key childMaybes -> do children <- sequence childMaybes let printChild child = inParensIf (isMultiWo...
05936c85f42ab00a3b78b9bf32680bc0235924591c3ca174acba6e876988c138
sacerdot/ocaml-http
http_daemon.mli
OCaml HTTP - do it yourself ( fully OCaml ) HTTP daemon Copyright ( C ) < 2002 - 2005 > < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation , version 2 . This pr...
null
https://raw.githubusercontent.com/sacerdot/ocaml-http/c13be78ad0fa4b2427feaf3777e20be4863115b9/http_daemon.mli
ocaml
* send a CRLF sequence on the given output channel, this is mandatory after the last header was sent and before start sending the response body * returns the basic headers "Date", "Server" and "Connection" used in send_basic_headers * like send_status_line but additionally will also send "Date", "Server" ...
OCaml HTTP - do it yourself ( fully OCaml ) HTTP daemon Copyright ( C ) < 2002 - 2005 > < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation , version 2 . This pr...
8d3d2093e6a57d724a5f631bd540de4da60639c440adf7a5bdc651c06684ab65
mfikes/fifth-postulate
ns230.cljs
(ns fifth-postulate.ns230) (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/ns230.cljs
clojure
(ns fifth-postulate.ns230) (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...
971561a71f453727e77c46d09380c4c69c8b8b96e43724595c71d76483d29206
brendanhay/terrafomo
Types.hs
-- This module was auto-generated. If it is modified, it will not be overwritten. -- | Module : . Google . Types Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . Maintainer : < brendan.g.hay+ > -- Stability : auto-generated Portability : non - portable ( GHC ex...
null
https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-google/src/Terrafomo/Google/Types.hs
haskell
This module was auto-generated. If it is modified, it will not be overwritten. | Stability : auto-generated import Formatting (Format, (%))
Module : . Google . Types Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . Maintainer : < brendan.g.hay+ > Portability : non - portable ( GHC extensions ) module Terrafomo.Google.Types where import Data . Text ( Text ) import Terrafomo import Terrafomo ...
22fce955669b6b587c21c898d896d455d983ed314637ee9495b8d2ae9a9f4b20
softlab-ntua/bencherl
yaws_api.erl
%%---------------------------------------------------------------------- %%% File : yaws_api.erl Author : < > %%% Purpose : Created : 24 Jan 2002 by < > %%%---------------------------------------------------------------------- -module(yaws_api). -author(''). %% -compile(export_all). -include("../incl...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/scalaris/contrib/yaws/src/yaws_api.erl
erlang
---------------------------------------------------------------------- File : yaws_api.erl Purpose : ---------------------------------------------------------------------- -compile(export_all). these are a bunch of function that are useful inside yaws scripts parse the command line query data parse url encode...
Author : < > Created : 24 Jan 2002 by < > -module(yaws_api). -author(''). -include("../include/yaws.hrl"). -include("../include/yaws_api.hrl"). -include("yaws_debug.hrl"). -export([parse_query/1, parse_post/1, parse_multipart_post/1, parse_multipart_post/2, parse_multipart/2, parse_...
d684dc4ec5f95d11a35fea055ce9d217e458f637a8b5a7f4947f838c14ed9404
thattommyhall/offline-4clojure
p150.clj
;; Palindromic Numbers - Medium < p > A palindromic number is a number that is the same when written forwards or backwards ( e.g. , 3 , 99 , 14341).</p > ;; < p > Write a function which takes an integer < code > > , as its only argument , and returns an increasing lazy sequence of all palindromic numbers that are no...
null
https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p150.clj
clojure
Palindromic Numbers - Medium <p>The most simple solution will exceed the time limit!</p> tags - seqs:math restricted - your solution here
< p > A palindromic number is a number that is the same when written forwards or backwards ( e.g. , 3 , 99 , 14341).</p > < p > Write a function which takes an integer < code > > , as its only argument , and returns an increasing lazy sequence of all palindromic numbers that are not less than < code > n</code>.</p >...
a9f41644d6f44d9c9f788e476043a442a13f195751b0f616fdee318f7fcfdac6
erleans/vonnegut
vg_index.erl
%% Index files are named [offset].index Entries in the index are < < ( Id - Offset):32 / unsigned , Position:32 / unsigned > > Position is the offset in [ offset].log to find the log I d -module(vg_index). -include("vg.hrl"). -export([find_in_index/3]). -spec find_in_index(Fd, BaseOffset, Id) -> integer() | not_...
null
https://raw.githubusercontent.com/erleans/vonnegut/88693f192a4fc3da88e7b359e38e72cee25b3d24/src/vg_index.erl
erlang
Index files are named [offset].index Optimize later. Could keep entire index in memory and could (in memory or not) use a binary search I worry that it might be overly broad.
Entries in the index are < < ( Id - Offset):32 / unsigned , Position:32 / unsigned > > Position is the offset in [ offset].log to find the log I d -module(vg_index). -include("vg.hrl"). -export([find_in_index/3]). -spec find_in_index(Fd, BaseOffset, Id) -> integer() | not_found when Fd :: file:fd()...
17f08ef9701b9950fca91e8f5606b238d477025c30f155e752131e75983fea42
avsm/mirage-duniverse
ipv6_socket.ml
* Copyright ( c ) 2014 Anil Madhavapeddy < > * Copyright ( c ) 2014 < > * * 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 . * ...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tcpip/src/stack-unix/ipv6_socket.ml
ocaml
* Copyright ( c ) 2014 Anil Madhavapeddy < > * Copyright ( c ) 2014 < > * * 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 . * ...
d4afcf8e67545b005392c242e853d998a2e587265fd65d2958610fc8a7102ff3
iamFIREcracker/adventofcode
day24.lisp
(defpackage :aoc/2016/24 #.cl-user::*aoc-use*) (in-package :aoc/2016/24) (defstruct blueprint (walls (make-hash-table)) sites) (defun char- (a b) (- (char-code a) (char-code b))) (defun read-blueprint (data) (let ((blueprint (make-blueprint)) (points-of-interest (make-hash-table))) (with-slots (wal...
null
https://raw.githubusercontent.com/iamFIREcracker/adventofcode/cf33fc217dc63b9438a9b6ec793207351c4d48d5/src/2016/day24.lisp
lisp
(defpackage :aoc/2016/24 #.cl-user::*aoc-use*) (in-package :aoc/2016/24) (defstruct blueprint (walls (make-hash-table)) sites) (defun char- (a b) (- (char-code a) (char-code b))) (defun read-blueprint (data) (let ((blueprint (make-blueprint)) (points-of-interest (make-hash-table))) (with-slots (wal...
51a3c192f7549afe9c42f364bd4ef42876aca17c9f6897a5f1d55c4bcc41781c
herd/herdtools7
ASLValue.ml
module ASLConstant = SymbConstant.Make (ASLScalar) (PteVal.No) (ASLBase.Instr) module ASLPteVal = ASLConstant.PteVal module ASLInstr = ASLConstant.Instr let list_set = let rec list_set acc n elt = function | [] -> None | _ :: t when n == 0 -> Some (List.rev acc @ (elt :: t)) | h :: t -> list_set (h :: ac...
null
https://raw.githubusercontent.com/herd/herdtools7/daedd7431cb00884afea2ec39749222e2c367c6b/lib/ASLValue.ml
ocaml
module ASLConstant = SymbConstant.Make (ASLScalar) (PteVal.No) (ASLBase.Instr) module ASLPteVal = ASLConstant.PteVal module ASLInstr = ASLConstant.Instr let list_set = let rec list_set acc n elt = function | [] -> None | _ :: t when n == 0 -> Some (List.rev acc @ (elt :: t)) | h :: t -> list_set (h :: ac...
22a38e3a9372c60e1a73eaba37a5b97537dc58a7560d5649de5c4726b1b57a13
mkoeppe/cl-bibtex
bst-builtins.lisp
;; A BibTeX re-implementation in Common Lisp - The built-in BST functions Copyright 2001 , 2002 < > ;; ;; This code is free software; you can redistribute it and/or modify it under the terms of version 2.1 of the GNU Lesser General Public License as published by the Free Software Foundation or any later vers...
null
https://raw.githubusercontent.com/mkoeppe/cl-bibtex/17a16f564b72da681b1e2cf7afbb496836781828/bst-builtins.lisp
lisp
A BibTeX re-implementation in Common Lisp - The built-in BST functions This code is free software; you can redistribute it and/or found in COPYING-preamble.txt. This preamble is in the style with names and copyright holders altered accordingly. specifier known at compile time FIXME: This changes the arg order! ...
Copyright 2001 , 2002 < > modify it under the terms of version 2.1 of the GNU Lesser General Public License as published by the Free Software Foundation or any later version , as clarified by the preamble of the Franz Inc. preamble at (in-package bibtex-compiler) (register-bst-primitive ">" '((integer) ...
67e438f4969fde526c2d525bf86057e9f94377272b0dd5d418117194a813005b
hellonico/origami-fun
highlights.clj
(ns opencv4.highlights (:require [opencv4.core :refer :all] [opencv4.colors.rgb :as rgb] [opencv4.utils :as u])) ; ; blur part of the picture ; (def rose (-> "resources/matching/rose_flower.jpg" imread (u/resize-by 0.5) )) (def sub (.submat rose (new-rect 100 50 300 300))) (median-blur! sub 9 ) (u/s...
null
https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/highlights.clj
clojure
blur part of the picture turn to grey part of the picture turn picture to grey except part
(ns opencv4.highlights (:require [opencv4.core :refer :all] [opencv4.colors.rgb :as rgb] [opencv4.utils :as u])) (def rose (-> "resources/matching/rose_flower.jpg" imread (u/resize-by 0.5) )) (def sub (.submat rose (new-rect 100 50 300 300))) (median-blur! sub 9 ) (u/show rose) (def sub2 (.submat r...
923f92061e99a37ff91b2f7f8c8f2d6e2804efca69e11a0c3470fdf05d8a1268
skypher/cl-oauth
uri.lisp
(in-package :oauth) (export '(url-encode)) (defvar +utf-8+ (flexi-streams:make-external-format :utf8 :eol-style :lf)) this function is taken from Hunchentoot but modified to satisfy the OAuth spec demands . (defun url-encode (input &optional (external-format +utf-8+)) "URL-encodes INPUT according to the perce...
null
https://raw.githubusercontent.com/skypher/cl-oauth/a7a463c8c2e4726ab0853d5b6623349b6428cb89/src/util/uri.lisp
lisp
verify that this works!!
(in-package :oauth) (export '(url-encode)) (defvar +utf-8+ (flexi-streams:make-external-format :utf8 :eol-style :lf)) this function is taken from Hunchentoot but modified to satisfy the OAuth spec demands . (defun url-encode (input &optional (external-format +utf-8+)) "URL-encodes INPUT according to the perce...
5baf6003b50514507661f49812cd720ebd5baaf2722f2cef8031ab57b4afbf37
LeventErkok/sbv
Length.hs
----------------------------------------------------------------------------- -- | Module : Documentation . SBV.Examples . . Length Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- Proof of correctness of an imperative list-length algorithm, using weakest precondition...
null
https://raw.githubusercontent.com/LeventErkok/sbv/9cd3662cb6ae31a95b99570f91ae4639807dc1ab/Documentation/SBV/Examples/WeakestPreconditions/Length.hs
haskell
--------------------------------------------------------------------------- | License : BSD3 Maintainer: Stability : experimental Proof of correctness of an imperative list-length algorithm, using weakest the WP algorithm. --------------------------------------------------------------------------- # LANGUAGE ...
Module : Documentation . SBV.Examples . . Length Copyright : ( c ) preconditions . Illustrates the use of SBV 's symbolic lists together with # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # module Documentation.SBV.Examples.WeakestPreconditions....
dd020996816a83ed8fbb07eb777188584604bd29b35da3803a4c2edf9747dc15
qriollo/qriollo
QriolloTestCases.hs
-- Este archivo es parte de Qriollo. Qriollo is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your option) any later version. -- Qriollo is distributed in the...
null
https://raw.githubusercontent.com/qriollo/qriollo/b45ba0f4e9d444f786217ff931d7ecf74bfddbe4/src/Test/QriolloTestCases.hs
haskell
Este archivo es parte de Qriollo. (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. All programs must return strings, i.e. lists of chars Test constructor ...
Qriollo is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or Qriollo is distributed in the hope that it will be useful , You should have received a copy of the GNU Gen...
e0e204908f441c4d67ce6ba5875e23d950f68fbb04d64ac5915e028474b40337
expipiplus1/vulkan
Utils.hs
# LANGUAGE CPP # module OpenXR.Internal.Utils ( enumReadPrec , enumShowsPrec , traceAroundEvent ) where import Data.Foldable import Debug.Trace import GHC.Read ( expectP ) import Text.ParserCombinators.ReadP ( skipSpaces ...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/openxr/src-manual/OpenXR/Internal/Utils.hs
haskell
| The common bits of enumeration and bitmask read instances ^ The common constructor prefix ^ The table of values to constructor suffixes ^ The newtype constructor name ^ The newtype constructor | The common bits of enumeration and bitmask show instances ^ The common constructor prefix ^ A table of values to co...
# LANGUAGE CPP # module OpenXR.Internal.Utils ( enumReadPrec , enumShowsPrec , traceAroundEvent ) where import Data.Foldable import Debug.Trace import GHC.Read ( expectP ) import Text.ParserCombinators.ReadP ( skipSpaces ...
0da0d862d2213cfd7778a2570df52a62612a30e4371d6e76010432fd91cd1c69
clash-lang/clash-prelude
Delayed.hs
| Copyright : ( C ) 2013 - 2016 , University of Twente , 2017 , Google Inc. License : BSD2 ( see the file LICENSE ) Maintainer : < > Copyright : (C) 2013-2016, University of Twente, 2017 , Google Inc. License : BSD2 (see the file LICENSE) Maint...
null
https://raw.githubusercontent.com/clash-lang/clash-prelude/5645d8417ab495696cf4e0293796133c7fe2a9a7/src/Clash/Signal/Delayed.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE KindSignatures # # LANGUAGE TypeOperators # # LANGUAGE Safe # * Delay-annotated synchronous signals * Signal \<-\> DSignal conversion * List \<-\> DSignal conversion (not synthesisable) ** lazy versions * Experimental | Delay ...
| Copyright : ( C ) 2013 - 2016 , University of Twente , 2017 , Google Inc. License : BSD2 ( see the file LICENSE ) Maintainer : < > Copyright : (C) 2013-2016, University of Twente, 2017 , Google Inc. License : BSD2 (see the file LICENSE) Maint...
0ff0cb79fba3807e766e0c389288a40970e2d17dab6ac2de6096d1ad0d95e50b
RunOrg/RunOrg
ipAddress.mli
(* © 2014 RunOrg *) (** IP Addresses (with port), serializable to JSON or to a database. *) include Fmt.FMT val of_inet_addr : Unix.inet_addr -> int -> t val of_sockaddr : Unix.sockaddr -> t (** Prints a human-readable version of an IP address. IPv6 may or may not use the compat format. *) val to_string : t -> ...
null
https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/ipAddress.mli
ocaml
© 2014 RunOrg * IP Addresses (with port), serializable to JSON or to a database. * Prints a human-readable version of an IP address. IPv6 may or may not use the compat format.
include Fmt.FMT val of_inet_addr : Unix.inet_addr -> int -> t val of_sockaddr : Unix.sockaddr -> t val to_string : t -> string
5aa5d8e5d2028fca58af5cabd8c0dc4ce329da2724d3b1503d1bf223d2214325
chrovis/cljam
common.clj
(ns cljam.io.bam-index.common) (def bai-magic "BAI\1") (def ^:const max-bins 37450) (def level-starts [0 1 9 73 585 4681]) (def ^:const linear-index-shift 14) (def ^:const linear-index-depth 5)
null
https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/src/cljam/io/bam_index/common.clj
clojure
(ns cljam.io.bam-index.common) (def bai-magic "BAI\1") (def ^:const max-bins 37450) (def level-starts [0 1 9 73 585 4681]) (def ^:const linear-index-shift 14) (def ^:const linear-index-depth 5)
450dbbb5f5fb2197c9ec6ff73971efbda938d17a504b60052fb1d749e28f3820
imteekay/functional-programming-learning-path
3.apollo.clj
(ns ch1.apollo) ; (defn make-mission [name system launched manned? opts] (let [{:keys [cm-name ;; command module lm-name ;; lunar module orbits evas]} opts])) (def apollo-4 (make-mission "Apollo 4" "Saturn V" #inst "1967-11-09T12:00...
null
https://raw.githubusercontent.com/imteekay/functional-programming-learning-path/07dac09c9fabfa54f8b4d80b62f43b092cb87b0d/clojure/clojure_applied/model_your_domain/3.apollo.clj
clojure
command module lunar module command module lunar module command module lunar module command module lunar module
(ns ch1.apollo) (defn make-mission [name system launched manned? opts] orbits evas]} opts])) (def apollo-4 (make-mission "Apollo 4" "Saturn V" #inst "1967-11-09T12:00:01-00:00" false {:orbits 3})) (def mission-defaul...
a7319b050a9596acf9057123b226baf5bfb02d7ca9cd312161e2244973ad4f67
uw-unsat/serval
neg.rkt
#lang racket/base (require "lib.rkt") (define tests (x86-suite "NEG" neg-r/m32 neg-r/m64)) (module+ test (time (run-tests tests)))
null
https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/test/x86/neg.rkt
racket
#lang racket/base (require "lib.rkt") (define tests (x86-suite "NEG" neg-r/m32 neg-r/m64)) (module+ test (time (run-tests tests)))
f7a6a23f9eace1c1ccf8f2c551e44f0eb6e7344443776dfa503863bf2a4c515b
RedHatQE/katello.auto
organizations.clj
(ns katello.tests.organizations (:refer-clojure :exclude [fn]) (:require [katello :as kt] (katello [ui-common :as common] [ui :as ui] [rest :as rest] [validation :as validation] [repositories :as repo] ...
null
https://raw.githubusercontent.com/RedHatQE/katello.auto/79fec96581044bce5db5350d0da325e517024962/src/katello/tests/organizations.clj
clojure
Functions Data (Generated) Tests :blockers (bz-bugs "975593") use random because otherwise rerunning the test will fail due to org already existing. text in the notif, currently doesn't escape it. getting notif text from javascript though, shows it as escaped.
(ns katello.tests.organizations (:refer-clojure :exclude [fn]) (:require [katello :as kt] (katello [ui-common :as common] [ui :as ui] [rest :as rest] [validation :as validation] [repositories :as repo] ...
f5e823a218b850657583e473fb2fdec17dae3192869e410dac2f96d51b34f69d
jeromesimeon/Galax
code_user_defined_fn.mli
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/code_selection/code/code_user_defined_fn.mli
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : , v 1.6 2007/02/01 22:08:45 simeon Exp $ Module : Code_user_defined_fn Description : This module contains code building operations for user - defined functions . Description: This module contains code b...
71f65804a328a146e27e74448732187d92fb500ab597ba0d2e2c415b1c6404dd
madgen/vanillalog
DSLSpec.hs
# LANGUAGE DataKinds # module Language.Vanillalog.DSLSpec where import Protolude import qualified Data.Vector.Sized as V import Data.Maybe (fromJust) import Data.Singletons (sing) import Test.Hspec import qualified Language.Exalog.Core as E import qualified Language.Exalog.KnowledgeBase.Class a...
null
https://raw.githubusercontent.com/madgen/vanillalog/07317814120e1a46a2abe3b65f2909a0e29fb066/test/Language/Vanillalog/DSLSpec.hs
haskell
# LANGUAGE DataKinds # module Language.Vanillalog.DSLSpec where import Protolude import qualified Data.Vector.Sized as V import Data.Maybe (fromJust) import Data.Singletons (sing) import Test.Hspec import qualified Language.Exalog.Core as E import qualified Language.Exalog.KnowledgeBase.Class a...
144237724430c87014005c421edea6ad823263a5442c1ca2dca9f42e8c1c1fff
avsm/eeww
floatarray.ml
(* TEST *) open Printf (* This is the module type of [Float.Array] except type [t] is abstract. *) module type S = sig type t val length : t -> int val get : t -> int -> float val set : t -> int -> float -> unit val make : int -> float -> t val create : int -> t val init : int -> (int -> float) -> t v...
null
https://raw.githubusercontent.com/avsm/eeww/4d65720b5dd51376842ffe5c8c220d5329c1dc10/boot/ocaml/testsuite/tests/lib-floatarray/floatarray.ml
ocaml
TEST This is the module type of [Float.Array] except type [t] is abstract. module [Array] specialized to [float] and with a few changes, satisfies signature S auxiliary functions [make] [set] [get] [length] [init] [append] check_inval omitted [concat] check_inval omitted [sub] [copy] [blit...
open Printf module type S = sig type t val length : t -> int val get : t -> int -> float val set : t -> int -> float -> unit val make : int -> float -> t val create : int -> t val init : int -> (int -> float) -> t val append : t -> t -> t val concat : t list -> t val sub : t -> int -> int -> t v...
df8b2086f8fc25373b257601f89ac2fcd6f3cc0ac617b167d0e3df990e080136
aerolang/aero
aero.erl
Bootstrap compiler for the Aero programming language . -module(aero). -export([compile/2]). %% ----------------------------------------------------------------------------- %% Public API %% ----------------------------------------------------------------------------- Compile an Aero file . -spec compile(binary(...
null
https://raw.githubusercontent.com/aerolang/aero/45bb9961b872a2c61b7a514fce06f34be57a4dfb/src/aero.erl
erlang
----------------------------------------------------------------------------- Public API ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Helper Functions ----------------------------------------------------...
Bootstrap compiler for the Aero programming language . -module(aero). -export([compile/2]). Compile an Aero file . -spec compile(binary(), aero_session:t()) -> {ok, non_neg_integer()} | {error, term()}. compile(InputFile, Session) -> Passes = lists:flatten([ {fun aero_scan:scan/1, []}, {fun aero_parse...
eeb5906b6a298ee02582c9990d8de958ed4c388bd6cd921483a5b98e0f661cae
jollheef/cl-logic
combinator.lisp
;;;; This file is part of the cl-logic library, released under GNU General Public License , Version 3.0 ;;;; See file COPYING for details. ;;;; Author : < > (in-package #:cl-logic) (defun all-permutations (lst &optional (remain lst)) (cond ((null remain) nil) ((null (rest lst)) (list lst)) (t...
null
https://raw.githubusercontent.com/jollheef/cl-logic/0b3220e3be807ab77acc271456f8ee854dd968b0/combinator.lisp
lisp
This file is part of the cl-logic library, released under See file COPYING for details.
GNU General Public License , Version 3.0 Author : < > (in-package #:cl-logic) (defun all-permutations (lst &optional (remain lst)) (cond ((null remain) nil) ((null (rest lst)) (list lst)) (t (append (mapcar (lambda (l) (cons (first lst) l)) (all-permutations (r...
8e0a3f38c022d4b19ad166c54dd267817aa3fa2bee5aeb9c6a037aa1081fdc53
discus-lang/ddc
Base.hs
{-# OPTIONS_HADDOCK hide #-} # LANGUAGE ExplicitNamespaces # module DDC.Source.Discus.Parser.Base ( type Parser , type SP , (<?>), SourcePos(..) -- * Generic Token parsers , pSym, pKey , pTok, pTokSP -- * Term Variables , pBindNameSP , pBound...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-source-discus/DDC/Source/Discus/Parser/Base.hs
haskell
# OPTIONS_HADDOCK hide # * Generic Token parsers * Term Variables * TyCons * DaCons * Primitive Operators * Literals Type and Term Variables ---------------------------------------------------- | Parse a binding occurrence of a named variable. | Parse a named term variable. | Parse a named term variable. | P...
# LANGUAGE ExplicitNamespaces # module DDC.Source.Discus.Parser.Base ( type Parser , type SP , (<?>), SourcePos(..) , pSym, pKey , pTok, pTokSP , pBindNameSP , pBoundName, pBoundNameSP , pBoundIxSP , pBoundNameOpVarSP , pBoundNa...
058f6f06c1065067a4805da29c66e68ea953087418badff134ce785057273b2a
zellio/incrementum
compiler.scm
;;; compiler.scm --- Scheme to x86 compiler Copyright ( C ) 2012,2013 ;; See LICENSE for more information ;;; Commentary: ;; this file assumes that x86asm-dsl.scm has been loaded ;;; Code: ;; ;; <Program> -> <Expr> | ( ( ( lvar < Lambda > ) ... ) < Expr > ) ;; <Lambda> -> (lambda (var ...) <Exp...
null
https://raw.githubusercontent.com/zellio/incrementum/12060fefdcc2883ffda38c9233a37aad6b20625e/src/scheme/compiler.scm
scheme
compiler.scm --- Scheme to x86 compiler See LICENSE for more information Commentary: this file assumes that x86asm-dsl.scm has been loaded Code: <Program> -> <Expr> <Lambda> -> (lambda (var ...) <Expr>) | var | (if <Expr> <Expr> <Expr>) | (let ((var <Expr>) ...) <Expr>) ...
Copyright ( C ) 2012,2013 | ( ( ( lvar < Lambda > ) ... ) < Expr > ) < Imm > | ( app > ... ) (define wordsize 8) (define nil-tag #x3F) (define boolean-mask #xBF) (define boolean-bit #x06) (define true-tag #x6F) (define false-tag #x2F) (define fixnum-shift 2)...
f80b998597f9ba677e641dc90183eb3bfe675623ffe5495b4b836d1bc075281d
mvaldesdeleon/aoc18
Day16Main.hs
module Day16Main where import Day16 (day16) main :: IO () main = day16
null
https://raw.githubusercontent.com/mvaldesdeleon/aoc18/1a6f6de7c482e5de264360e36f97a3c7487e2457/app/Day16Main.hs
haskell
module Day16Main where import Day16 (day16) main :: IO () main = day16
e7c84cda9c656b8feb89624178b4c30f9943eef24a91b88915ee9b96b50f4263
josephwilk/musical-creativity
band.clj
(ns musical-creativity.band (:require [overtone.live :refer :all] [overtone.inst.synth :refer :all] [overtone.inst.sampled-piano :as piano] [overtone.inst.drum :as drum] [musical-creativity.instruments :as instruments])) (defn flute-fn [pitch & rest] (println :flute) (simple-flute (midi->hz pitch...
null
https://raw.githubusercontent.com/josephwilk/musical-creativity/c2e6aab2a26d69ee2e51f4fad84fa3a71805e6ca/src/musical_creativity/band.clj
clojure
(ns musical-creativity.band (:require [overtone.live :refer :all] [overtone.inst.synth :refer :all] [overtone.inst.sampled-piano :as piano] [overtone.inst.drum :as drum] [musical-creativity.instruments :as instruments])) (defn flute-fn [pitch & rest] (println :flute) (simple-flute (midi->hz pitch...
852310aab7f1824093299d13a8d10731a91973a3607d258727c9b809049c7c10
ladderlife/om-fullstack-example
project.clj
(defproject om-fullstack-example "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :source-paths ["src/server" "src/shared"] :test-paths ["test/server"] :dependencies [[org.clojure/clojure "1.8.0"] [org.cl...
null
https://raw.githubusercontent.com/ladderlife/om-fullstack-example/d54d0515676ffb842b30cc2a8a9d8eaf69b142fe/project.clj
clojure
(defproject om-fullstack-example "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :source-paths ["src/server" "src/shared"] :test-paths ["test/server"] :dependencies [[org.clojure/clojure "1.8.0"] [org.cl...
7af646f355df8f4e7a284a855d129540eb8cb5e13e3c9620117aa7d47e9c4a03
kovasb/gamma
constructors.cljs
(ns gamma.test.constructors (:require [cljs.test] [gamma.api :as g] [gamma.tools :refer [glsl-string]]) (:require-macros [cljs.test :refer [is deftest testing]])) (enable-console-print!) (defn ->glsl [x] (clojure.string/replace (glsl-string x) #"\s" "")) ;; test variables, decla...
null
https://raw.githubusercontent.com/kovasb/gamma/3c9edcfdfc392103b0e78edba3ca930a60746fd1/test/gamma/test/constructors.cljs
clojure
test variables, declarations, literals (->glsl (gamma.ast/literal {:tag :variable :name "v" :type :vec4})) (def vec4-variable {:tag :variable :id "v" :type :vec4}) OPERATORS WITH VARIABLES selector? ; ?
(ns gamma.test.constructors (:require [cljs.test] [gamma.api :as g] [gamma.tools :refer [glsl-string]]) (:require-macros [cljs.test :refer [is deftest testing]])) (enable-console-print!) (defn ->glsl [x] (clojure.string/replace (glsl-string x) #"\s" "")) FIXME make these actu...
eeabafb4c1b03dd6229de27e6b53417e92025dc6f61b93f6a0e5dda009ce40b9
AbstractMachinesLab/caramel
comparator.ml
module type S = sig type t val compare : t -> t -> Ordering.t end module type OPS = sig type t val equal : t -> t -> bool val ( = ) : t -> t -> bool val ( >= ) : t -> t -> bool val ( > ) : t -> t -> bool val ( <= ) : t -> t -> bool val ( < ) : t -> t -> bool val ( <> ) : t -> t -> bool end ...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/vendor/stdune/comparator.ml
ocaml
module type S = sig type t val compare : t -> t -> Ordering.t end module type OPS = sig type t val equal : t -> t -> bool val ( = ) : t -> t -> bool val ( >= ) : t -> t -> bool val ( > ) : t -> t -> bool val ( <= ) : t -> t -> bool val ( < ) : t -> t -> bool val ( <> ) : t -> t -> bool end ...
16d6c150169cbad258015f0753c1f5fd0a1e42821a374394e195835fde46be29
htm-community/sanity
simple_sentences.cljs
(ns org.numenta.sanity.demos.simple-sentences (:require [org.nfrac.comportex.demos.simple-sentences :as demo] [org.nfrac.comportex.util :as util] [org.numenta.sanity.demos.comportex-common :refer [all-features]] [org.numenta.sanity.main :as main] [org.numenta.sanity.hel...
null
https://raw.githubusercontent.com/htm-community/sanity/0eae8a9a1fe732d761f6dd0cff3dba8b24ac5231/examples/demos/org/numenta/sanity/demos/simple_sentences.cljs
clojure
(ns org.numenta.sanity.demos.simple-sentences (:require [org.nfrac.comportex.demos.simple-sentences :as demo] [org.nfrac.comportex.util :as util] [org.numenta.sanity.demos.comportex-common :refer [all-features]] [org.numenta.sanity.main :as main] [org.numenta.sanity.hel...
8e2253c9e8c1491e94c67777abed56b4f74e44e79bee5690e8ecf0503ff0ac2b
jaked/froc
myocamlbuild.ml
open Ocamlbuild_plugin open Command open Ocamlbuild_pack.Ocaml_compiler open Ocamlbuild_pack.Ocaml_utils open Ocamlbuild_pack.Tools ;; let ocamljs = ref (A"ocamljs") let ocamljs_c tags arg out = let tags = tags++"ocaml"++"js" in Cmd (S [!ocamljs; A"-c"; T(tags++"compile"); ocaml_ppflags tags; ...
null
https://raw.githubusercontent.com/jaked/froc/6068a1fab883ed9254bfeb53a1f9c15e8af0bb20/tools/myocamlbuild.ml
ocaml
XXX ocamlmkjslib? from Ocaml_compiler copied from the ocamlc versions in Ocaml_commpiler. see above these functions are not really officially exported this lists all supported packages this is supposed to list available syntaxes, but I don't know how to do it. ocamlfind command override default comma...
open Ocamlbuild_plugin open Command open Ocamlbuild_pack.Ocaml_compiler open Ocamlbuild_pack.Ocaml_utils open Ocamlbuild_pack.Tools ;; let ocamljs = ref (A"ocamljs") let ocamljs_c tags arg out = let tags = tags++"ocaml"++"js" in Cmd (S [!ocamljs; A"-c"; T(tags++"compile"); ocaml_ppflags tags; ...
9e4d62cb8e1a340942747231d41d945941e940d8ed98b7146a6d212f645f83c6
gersh/erlang-rtmp
hmac256.erl
%%%------------------------------------------------------------------- %%% File : hmac256.erl Author : Sriram Krishnan< > Description : HMAC - SHA256 implementation . Implementation based on Wikipedia 's pseudocode description of HMAC . Relies on SHA256 implementation %%% from %%% Created : 30 Dec ...
null
https://raw.githubusercontent.com/gersh/erlang-rtmp/57157fb3be20278af19c87232f99aa9a83041d18/src/hmac256.erl
erlang
------------------------------------------------------------------- File : hmac256.erl from ------------------------------------------------------------------- respectively. The arrays need to be of the same size as the block length If key is longer than block size, hash it to bring it below block size
Author : Sriram Krishnan< > Description : HMAC - SHA256 implementation . Implementation based on Wikipedia 's pseudocode description of HMAC . Relies on SHA256 implementation Created : 30 Dec 2008 @private -module(hmac256). -export([hexdigest/2,digest/2,test/0]). -export([unhex/1]). -version(1.0). -...
b9d23e5ad23cb451aa83bdbd422e0e51b688e6cb17daa7d47cecb3e0e6587e76
tolysz/prepare-ghcjs
Compiler.hs
# LANGUAGE DeriveGeneric # ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Compiler Copyright : 2003 - 2004 -- License : BSD3 -- -- Maintainer : -- Portability : portable -- -- This should be a much more sophisticated abstractio...
null
https://raw.githubusercontent.com/tolysz/prepare-ghcjs/8499e14e27854a366e98f89fab0af355056cf055/spec-lts/cabal/Cabal/Distribution/Simple/Compiler.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Simple.Compiler License : BSD3 Maintainer : Portability : portable This should be a much more sophisticated abstraction than it is. Currently it's just a bit of data about the compiler, like it's ...
# LANGUAGE DeriveGeneric # Copyright : 2003 - 2004 ' PackageDB ' type which is used to refer to package databases . Most compilers only know about a single global package collection but GHC has a global and module Distribution.Simple.Compiler ( * implementations module Distribution.Compiler, ...
fddb942acf65c194c54f71c4cf09cfc0d75eba3d9e32149cfa03dcb9bb23463e
wireless-net/erlang-nommu
observer_backend.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2002 - 2014 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/runtime_tools/src/observer_backend.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2002 - 2014 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(observer_backend). -export([vsn/0]...
71f96ca148a8728b71788561ea50b8a09adae1ece558b0032db6c21c08ae5c1c
ddmcdonald/sparser
military-aircraft.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- copyright ( c ) 2022 -- all rights reserved ;;; ;;; File: "military-aircraft" ;;; Module: "model/dossiers/ version : July 2022 initiated 7/10/22 for NGA prototyping (in-package :...
null
https://raw.githubusercontent.com/ddmcdonald/sparser/fbc2318fcbe6ad0a8d32bf80cff15d56f393c8b9/Sparser/code/s/grammar/model/dossiers/military-aircraft.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- File: "military-aircraft" Module: "model/dossiers/ names kinds (define-kind-of-aircraft "") (define-kind-of-aircraft "") (define-kind-of-aircraft "") attributes (define-aircraft-property "")
copyright ( c ) 2022 -- all rights reserved version : July 2022 initiated 7/10/22 for NGA prototyping (in-package :sparser) (define-aircraft-designator "MiG-15") (define-aircraft-designator "MiG-17") (define-aircraft-designator "MiG-21") (define-aircraft-designator "MiG-29") (define-aircraft-designator...
354bab7789aada4d0623d070e857ae05ab4ed7c07292a8e3eeea4f771d7021e6
GrammaTech/sel
defun-2.lisp
(defun f (a b) (+ a b) (- a b) (/ a b) (* a b))
null
https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/test/etc/lisp-scopes/defun-2.lisp
lisp
(defun f (a b) (+ a b) (- a b) (/ a b) (* a b))
d29398712feec6073fbf34126c673085fbda4a11513a79797b0566e9d57619f6
icicle-lang/icicle-ambiata
Builtin.hs
# LANGUAGE DeriveGeneric # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Icicle.Source.Query.Builtin where import GHC.Generics (Generic) import Icicle.Internal.Pretty import P data BuiltinFun = BuiltinMath !BuiltinMath | BuiltinTime !BuiltinTime | Built...
null
https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-source/src/Icicle/Source/Query/Builtin.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------
# LANGUAGE DeriveGeneric # # LANGUAGE NoImplicitPrelude # module Icicle.Source.Query.Builtin where import GHC.Generics (Generic) import Icicle.Internal.Pretty import P data BuiltinFun = BuiltinMath !BuiltinMath | BuiltinTime !BuiltinTime | BuiltinData !BuiltinData | BuiltinArra...
bf44ebcd9491b705928eabafc8d4e0aa53a68263d64ae95b769a65cdf957cd08
fortytools/holumbus
DCount.hs
module Holumbus.MapReduce.Examples.Count.DCount ( countMap , countReduce , K1 , V1 ) where import Holumbus.MapReduce.Examples.Count.SimpleDMapReduceIO import Control.DeepSeq import Holumbus.MapReduce.Types import Data.Maybe (mapMaybe) type Options = String type K1 = Int type V1 = [String] type K2 = Int type V2 ...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/mapreduce/Examples2/Count/Count_Presi/source/Holumbus/MapReduce/Examples/Count/DCount.hs
haskell
type ReduceFunction a k2 v2 v3 = ActionEnvironment -> a -> k2 -> [v2] -> IO (Maybe v3)
module Holumbus.MapReduce.Examples.Count.DCount ( countMap , countReduce , K1 , V1 ) where import Holumbus.MapReduce.Examples.Count.SimpleDMapReduceIO import Control.DeepSeq import Holumbus.MapReduce.Types import Data.Maybe (mapMaybe) type Options = String type K1 = Int type V1 = [String] type K2 = Int type V2 ...
9ccd476fa6a1386dcb25c19cc920fb22378b7df13a4cdc4302c21aea7e59da7d
LexiFi/gen_js_api
issues_mli.mli
module Issue144: sig type t val f: t -> (args:int -> int [@js.dummy]) [@@js.call "f"] end
null
https://raw.githubusercontent.com/LexiFi/gen_js_api/bee3b595898fdaf7db0366a9b1a009db9a6c6026/ppx-test/issues_mli.mli
ocaml
module Issue144: sig type t val f: t -> (args:int -> int [@js.dummy]) [@@js.call "f"] end
c6fce6f94048a39c70704f3a530f24e4a68821cdada42ecec784868d4cf60bb9
ocaml-opam/opam-rt
packages.mli
* Copyright ( c ) 2013 - 2019 OCamlPro * Authors < > , * < > , * < > * * 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 app...
null
https://raw.githubusercontent.com/ocaml-opam/opam-rt/2f42d8dcdbd9f16e0e385314a8bf9396cb8a88fa/src/lib/packages.mli
ocaml
* Functions to create and set up packages * Create package content
* Copyright ( c ) 2013 - 2019 OCamlPro * Authors < > , * < > , * < > * * 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 app...
1793eb99a0fa33cb193b3242c2eeab743123fb56f0a73ec64bee497979c25693
SAP-archive/bosh-kubernetes-cpi-release
VmTypesSpec.hs
# LANGUAGE QuasiQuotes # module CPI.Kubernetes.VmTypesSpec(spec) where import qualified CPI.Base as Base import CPI.Kubernetes.VmTypes import Test.Hspec import Data.Aeson.QQ import Text.RawString.QQ import qualified Data.HashMap.Strict as HashMap import ...
null
https://raw.githubusercontent.com/SAP-archive/bosh-kubernetes-cpi-release/3166a74e118e75bbdedb01cff72cbe52968eee62/src/bosh-kubernetes-cpi/test/unit/CPI/Kubernetes/VmTypesSpec.hs
haskell
# LANGUAGE QuasiQuotes # module CPI.Kubernetes.VmTypesSpec(spec) where import qualified CPI.Base as Base import CPI.Kubernetes.VmTypes import Test.Hspec import Data.Aeson.QQ import Text.RawString.QQ import qualified Data.HashMap.Strict as HashMap import ...
eb284cefb28c949f161e58709a83d943f3e3cb8ed846c7d5f2aeac6fe4a86c89
intermine/bluegenes
events.cljs
(ns bluegenes.components.viz.events (:require [re-frame.core :refer [reg-event-db reg-event-fx reg-fx dispatch subscribe]] [bluegenes.utils :refer [suitable-entities]] [imcljs.fetch :as fetch] [bluegenes.components.viz.views :refer [all-viz]])) (reg-event-fx :viz/run-queries (fn...
null
https://raw.githubusercontent.com/intermine/bluegenes/417ea23b2d00fdca20ce4810bb2838326a09010e/src/cljs/bluegenes/components/viz/events.cljs
clojure
(ns bluegenes.components.viz.events (:require [re-frame.core :refer [reg-event-db reg-event-fx reg-fx dispatch subscribe]] [bluegenes.utils :refer [suitable-entities]] [imcljs.fetch :as fetch] [bluegenes.components.viz.views :refer [all-viz]])) (reg-event-fx :viz/run-queries (fn...
dde945c40457cf71afa387b57f0ad50469f26ca881fa965f72394efa65a3fadf
zkat/sheeple
elves.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*- (in-package :sheeple-user) Let 's set up a basic ' class ' hierarchy first . (defproto =entity= () ((name "NoName") (eyes "Ordinary") (height "Ordinary") (ears "Ordinary"))) ;; It's good to note that accessors...
null
https://raw.githubusercontent.com/zkat/sheeple/5393c74737ccf22c3fd5f390076b75c38453cb04/examples/elves.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*- It's good to note that accessors are being automatically defined for each property. Now let's say we want to make these entities mate, and vary the results. this reply will only dispatch if the item in position 'a' is an =entity=, AND 'b' i...
(in-package :sheeple-user) Let 's set up a basic ' class ' hierarchy first . (defproto =entity= () ((name "NoName") (eyes "Ordinary") (height "Ordinary") (ears "Ordinary"))) (defproto =human= (=entity=) ((eyes "Blue"))) (defproto =elf= (=entity=) ((height "Tall") (ears "Pointy"))) (defmessage m...
69dea1f1bcbfff402839dc6332744e16a2251ba94a008c33712b7081c4e00c05
ijvcms/chuanqi_dev
account_lib.erl
%%%------------------------------------------------------------------- @author zhengsiying ( C ) 2015 , < COMPANY > %%% @doc %%% %%% @end Created : 30 . 十月 2015 上午9:48 %%%------------------------------------------------------------------- -module(account_lib). -include("common.hrl"). -include("record.hrl"). -in...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/account/account_lib.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API ==================================================================== API functions 记录在线玩家账号 ==================================================================== 踢...
@author zhengsiying ( C ) 2015 , < COMPANY > Created : 30 . 十月 2015 上午9:48 -module(account_lib). -include("common.hrl"). -include("record.hrl"). -include("proto.hrl"). -include("language_config.hrl"). -export([ login/4, enter_game/7, logout/1, delete_player/3 ]). login(OpenId, Platform, SocketPid, Socket)...
24b85b5b07ebd771beba3c30d53d7d19e356ece257fa175098d8ab964a8a3555
SimonJF/monitored-session-erlang
protocol_registry.erl
-module(protocol_registry). -define(PROTO_ETS_TABLE_NAME, protocol_registry_ets). -behaviour(gen_server). -compile(export_all). % A table mapping protocol names to [(Role, Monitor)] %%%% gen_server callbacks init([ProtocolMapping]) -> init_ets(ProtocolMapping), {ok, no_state}. handle_call(_, _, State) -> {stop,...
null
https://raw.githubusercontent.com/SimonJF/monitored-session-erlang/5ec76f327d3d2da4050d4c5a468ac343207f4521/src/conversation/protocol_registry.erl
erlang
A table mapping protocol names to [(Role, Monitor)] gen_server callbacks Essentially a big ol' PROTO_ETS table. We're in the fortunate position that we only write right at the start. Afterwards, we can just blazing fast reads. API
-module(protocol_registry). -define(PROTO_ETS_TABLE_NAME, protocol_registry_ets). -behaviour(gen_server). -compile(export_all). init([ProtocolMapping]) -> init_ets(ProtocolMapping), {ok, no_state}. handle_call(_, _, State) -> {stop, unexpected_call, State}. handle_cast(_, State) -> {stop, unexpected_cast, State...
716954e8bb1249dbf412ffc6b9d9e5cdb1f9f90a5931dc837822cebb539e9af1
facebook/infer
Instrs.ml
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/14eb7f36e6c8e96d681f81e74c7e32a7785fb28e/infer/src/IR/Instrs.ml
ocaml
Functions on both reversed and non-reversed arrays * Return the list of normal ids occurring in the instructions
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
7418154d5ad429a97e86c4e4901801e90319daaceb3f65f0869e3f254a5617b3
awslabs/s2n-bignum
bignum_half_p521.ml
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) (* =================================================================...
null
https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/arm/proofs/bignum_half_p521.ml
ocaml
========================================================================= Halving modulo p_521, the field characteristic for the NIST P-521 curve. ========================================================================= *** print_literal_from_elf "arm/p521/bignum_half_p521.o";; *** ---------------------------...
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) let bignum_half_p521_mc = define_assert_from_elf "bignum_half_p521...
46a9a82239d679199b9c59ce3ee8535f5bcf499b934e2f57e7a0bf7ed2f2d768
pfdietz/ansi-test
array-element-type.lsp
;-*- Mode: Lisp -*- Author : ;;;; Contains: Tests of the function ARRAY-ELEMENT-TYPE Mosts tests are in other files , incidental to testing of ;;; other things (deftest array-element-type.1 (macrolet ((%m (z) z)) (notnot (array-element-type (expand-in-current-env (%m #(a b c)))))) t) (...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/arrays/array-element-type.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of the function ARRAY-ELEMENT-TYPE other things Error tests
Author : Mosts tests are in other files , incidental to testing of (deftest array-element-type.1 (macrolet ((%m (z) z)) (notnot (array-element-type (expand-in-current-env (%m #(a b c)))))) t) (deftest array-element-type.order.1 (let ((i 0)) (array-element-type (progn (incf i) #(a b c...
c0c6384f78601d783e5abf9ae97b21e8fb63d52e1a266c0a183c845df7ad0fb6
charlesetc/feather
feather.mli
* { 2 { b Creating and combining Feather commands } } type cmd val process : string -> string list -> cmd (** [process] constructs a new [cmd] that can be run with [run] or [collect] *) val ( |. ) : cmd -> cmd -> cmd * [ | . ] is Feather 's version of a " | " in bash ; pipe the first process 's stdout to the ...
null
https://raw.githubusercontent.com/charlesetc/feather/c3c854db26b137a09a7c8ad45a1463300fa663c8/src/feather.mli
ocaml
* [process] constructs a new [cmd] that can be run with [run] or [collect] * [ or_ ] is feather's version of a "||" in bash. See Infix module for more. * [ sequence ] is feather's version of a ";" in bash. See Infix module for more. * Run a command without collecting anything * The type that determines what should...
* { 2 { b Creating and combining Feather commands } } type cmd val process : string -> string list -> cmd val ( |. ) : cmd -> cmd -> cmd * [ | . ] is Feather 's version of a " | " in bash ; pipe the first process 's stdout to the next 's stdin . stdout to the next's stdin. *) val and_ : cmd -> cmd -> cmd ...
7fcd76abba685b5d89e287bfa3288cc24cf7cfc94af0509a917784610e913e40
roburio/openvpn
config.ml
module Logs = (val Logs.(src_log @@ Src.create ~doc:"Openvpn library's configuration module" "ovpn.config") : Logs.LOG) open Angstrom module A = Angstrom type inlineable = [ `Auth_user_pass | `Ca | `Connection | `Pkcs12 | `Tls_auth of [`Incoming | `Outgoing] o...
null
https://raw.githubusercontent.com/roburio/openvpn/e66b6f1a76e6442075fed85630d71cad5c0e7b4b/src/config.ml
ocaml
Checklist when adding a new entry here: - This file: - Defaults.client_config Declare default value as per `man openvpn`, if any. - Conf_map.pp_b: Enable config-serialization of the values (must be in the format from `man openvpn`) - a_config_entry: ...
module Logs = (val Logs.(src_log @@ Src.create ~doc:"Openvpn library's configuration module" "ovpn.config") : Logs.LOG) open Angstrom module A = Angstrom type inlineable = [ `Auth_user_pass | `Ca | `Connection | `Pkcs12 | `Tls_auth of [`Incoming | `Outgoing] o...
d1706a3433dc85692532429d86415e1f3bdae72d49a01a91a928c0a957989fab
marick/fp-oo
recursion-5.clj
Exercise 5 (prn (recursive-function (fn [elt so-far] (assoc so-far elt 0)) [:a :b :c] {})) (prn (recursive-function (fn [elt so-far] (assoc so-far elt (count so-far))) [:a :b :c] ...
null
https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/solutions/pieces/recursion-5.clj
clojure
Exercise 5 (prn (recursive-function (fn [elt so-far] (assoc so-far elt 0)) [:a :b :c] {})) (prn (recursive-function (fn [elt so-far] (assoc so-far elt (count so-far))) [:a :b :c] ...
629b5fe2f272cda1e96f38670d03181f80bbfb86af5e6ecbac018388b328d940
anonymous-admin/anonymous
tracker_interactor.erl
Author : Creation Date : 2 - Nov-2011 -module(tracker_interactor). -export([init/1,start_link/1,handle_call/3,terminate/2]). -export([create_record/0]). -behaviour(gen_server). -include("defs.hrl"). init(Data)-> {ok,Data}. terminate(_Reason,Data)-> ok. start_link(Data)-> io:format("yes~n"), gen_ser...
null
https://raw.githubusercontent.com/anonymous-admin/anonymous/0d178f8f02dce74d5f76d78f81f70da9229a77cd/tracker_interactor.erl
erlang
gen_server:cast(logger,{peers_list,Peers}), gen_server:cast(logger,{tracker_request_error,Reason})
Author : Creation Date : 2 - Nov-2011 -module(tracker_interactor). -export([init/1,start_link/1,handle_call/3,terminate/2]). -export([create_record/0]). -behaviour(gen_server). -include("defs.hrl"). init(Data)-> {ok,Data}. terminate(_Reason,Data)-> ok. start_link(Data)-> io:format("yes~n"), gen_ser...
700f9ce4ff9f0629030b83e45cdac19072ef27a76856f71d0d55f11e5fba66f3
syntax-objects/syntax-parse-example
struct-list.rkt
#lang typed/racket/base (provide struct-list) (require (for-syntax racket/base racket/syntax syntax/parse)) (define-syntax (struct-list stx) (syntax-parse stx #:datum-literals (:) [(_ name:id ([f*:id : t*] ...) #:type-name Name:id) #:fail-when (free-identifier=? #'name #'Name) "struct name and...
null
https://raw.githubusercontent.com/syntax-objects/syntax-parse-example/0675ce0717369afcde284202ec7df661d7af35aa/struct-list/struct-list.rkt
racket
#lang typed/racket/base (provide struct-list) (require (for-syntax racket/base racket/syntax syntax/parse)) (define-syntax (struct-list stx) (syntax-parse stx #:datum-literals (:) [(_ name:id ([f*:id : t*] ...) #:type-name Name:id) #:fail-when (free-identifier=? #'name #'Name) "struct name and...
a58f68620299f78fa1762be98186e85f29705acae10875699d6fa4ae494b20a7
zack-bitcoin/MerkleTrie
ram_store.erl
-module(ram_store). -export([store/3]). store(Leaf, Trie, CFG) -> P = leaf:path(Leaf, CFG), LH = leaf:hash(Leaf, CFG), Weight = leaf:weight(Leaf), B = case get_branch(P, 0, leaf:value(Leaf), Trie, [], CFG) of split leaf , add stem(s ) {A, N2} = path_match(P, leaf:path(Leaf2, CFG), 0), [H|T] =...
null
https://raw.githubusercontent.com/zack-bitcoin/MerkleTrie/2893945881349f6f409fe599564048c534b95c36/unused/ram_store.erl
erlang
overwrite +leaf:weight(Leaf)}
-module(ram_store). -export([store/3]). store(Leaf, Trie, CFG) -> P = leaf:path(Leaf, CFG), LH = leaf:hash(Leaf, CFG), Weight = leaf:weight(Leaf), B = case get_branch(P, 0, leaf:value(Leaf), Trie, [], CFG) of split leaf , add stem(s ) {A, N2} = path_match(P, leaf:path(Leaf2, CFG), 0), [H|T] =...
51e419c15e75435b20ad7f386493f66f2e98dff6833e0afc254ca0f665702644
rurban/clisp
analyse-funtab.lisp
Copyright ( C ) 2008 by This is Free Software , distributed under the GNU GPL v2 + ;;; See ;;; Study which functions should be added to eval.d : FUNTAB . This is not TRT , of course : we are counting how many other functions ;;; call the not-inlined system functions, not how often they are actually ;;; calle...
null
https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/src/analyse-funtab.lisp
lisp
See call the not-inlined system functions, not how often they are actually called, but this still may be useful. empty! some subrs, e.g., LOAD, are later redefined in Lisp map-calls is by far the trickiest part of the code
Copyright ( C ) 2008 by This is Free Software , distributed under the GNU GPL v2 + Study which functions should be added to eval.d : FUNTAB . This is not TRT , of course : we are counting how many other functions (defun byte-compiled-closure (fdef) "Check whether the object is a byte compiled lisp function...
8cdd214cfa4bd7c87a90cce355e5f16c46f6d7921a6a404e15059a87c6c754f2
dkess/BJukebox
manager.erl
-module(manager). -behavior(gen_server). -export([start_link/0]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, code_change/3, terminate/2]). -record(state, {queues :: [{nonempty_string(), [song_fetcher:songtuple()]}], current :: {nonempty_string(), song_fetcher:songtuple()} | noone | disconn...
null
https://raw.githubusercontent.com/dkess/BJukebox/4e1e7cfd04842226ad5de805f5c53a719a3f0cb9/src/manager.erl
erlang
if this is the last element in the queue, remove the whole queue we got the streaurl of a song, now play it client has disconnected
-module(manager). -behavior(gen_server). -export([start_link/0]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, code_change/3, terminate/2]). -record(state, {queues :: [{nonempty_string(), [song_fetcher:songtuple()]}], current :: {nonempty_string(), song_fetcher:songtuple()} | noone | disconn...
ee3f7eb0c850a31ea146b77bd933121160ead700a606aba92c6f192bc5613618
carp-lang/Carp
Util.hs
module Util where import Data.Bifunctor import Data.List import Data.Maybe (fromMaybe) import qualified Map import qualified Set import System.Info (os) joinWith :: String -> [String] -> String joinWith = intercalate joinLines :: [String] -> String joinLines = joinWith "\n" joinWithSpace :: [String] -> String joinW...
null
https://raw.githubusercontent.com/carp-lang/Carp/3b429541a338949b02742f52e01a9eedc3a19602/src/Util.hs
haskell
| Unwraps a Maybe value a to Right a, or returns a default value (Left b) if it was Nothing. as names, e.g. (fn <> [] ()). This can result in invalid c code. This function checks a lambda's nesting level. If the lambda is declared at the top level it returns a constant string, otherwise it returns the provided nam...
module Util where import Data.Bifunctor import Data.List import Data.Maybe (fromMaybe) import qualified Map import qualified Set import System.Info (os) joinWith :: String -> [String] -> String joinWith = intercalate joinLines :: [String] -> String joinLines = joinWith "\n" joinWithSpace :: [String] -> String joinW...
0787d4ef63d5aba3ff3b8ef99f8eba656c1bce23e43d7f00cd4dc8f2c406760d
haskell/time
MonthDayRef.hs
module Test.Calendar.MonthDayRef where testMonthDayRef :: String testMonthDayRef = unlines [ "Regular:" , "DIFF: -2 -> 1-1 -> 1" , "DIFF: -1 -> 1-1 -> 1" , "DIFF: 0 -> 1-1 -> 1" , "1 == 1-1" , "2 == 1-2" , "3 == 1-3" , "4 == 1-4" , "5 == 1-5" ...
null
https://raw.githubusercontent.com/haskell/time/ab2c0c28b8b7a12bce12eedd357a73e39b00afc2/test/main/Test/Calendar/MonthDayRef.hs
haskell
module Test.Calendar.MonthDayRef where testMonthDayRef :: String testMonthDayRef = unlines [ "Regular:" , "DIFF: -2 -> 1-1 -> 1" , "DIFF: -1 -> 1-1 -> 1" , "DIFF: 0 -> 1-1 -> 1" , "1 == 1-1" , "2 == 1-2" , "3 == 1-3" , "4 == 1-4" , "5 == 1-5" ...
b323253d84028dbfa683f5949f997cbf22479f7b5222e70c767955212815df5d
ndpar/erlang
mutex_monitor_test.erl
%% F.Cesarini & S.Thomson , Erlang Programming , p.154 . Exercise 6 - 2 : Reliable %% %% See also: mutex_reliable_test.erl %% 1 > mutex_monitor : start ( ) . %% true %% -module(mutex_monitor_test). -export([test1/0, test2/0]). -export([first/0, second/0]). first() -> io:format("~p requesting mutex~n", [sel...
null
https://raw.githubusercontent.com/ndpar/erlang/e215841a1d370e0fc5eb6b9ff40ea7ae78fc8763/src/mutex_monitor_test.erl
erlang
See also: mutex_reliable_test.erl true ok ok
F.Cesarini & S.Thomson , Erlang Programming , p.154 . Exercise 6 - 2 : Reliable 1 > mutex_monitor : start ( ) . -module(mutex_monitor_test). -export([test1/0, test2/0]). -export([first/0, second/0]). first() -> io:format("~p requesting mutex~n", [self()]), mutex_monitor:wait(), receive cont -> ok e...
bdd096776379cfbe900cf5ff662c33867dcbba6bf8cf6f7f4c55a3099b9d7722
fccm/OCamlSDL2
ex_draw_render.ml
let () = let width, height = (640, 480) in Random.self_init (); Sdl.init [`VIDEO]; let window, renderer = Sdlrender.create_window_and_renderer ~width ~height ~flags:[] in for i = 1 to 32 do let r, g, b = (Random.int 256, Random.int 256, Random.int 256) in let alpha = 255 ...
null
https://raw.githubusercontent.com/fccm/OCamlSDL2/01fa29187cab90052d2581eb509d1bca1a85418f/examples/ex_draw_render.ml
ocaml
let () = let width, height = (640, 480) in Random.self_init (); Sdl.init [`VIDEO]; let window, renderer = Sdlrender.create_window_and_renderer ~width ~height ~flags:[] in for i = 1 to 32 do let r, g, b = (Random.int 256, Random.int 256, Random.int 256) in let alpha = 255 ...
0fb0ea815fe00169f7f91ad6d715f5021ef6d1fece3667d2c2396d96a89461d1
aspiwack/porcupine
ExamplePokeAPI.hs
{-# LANGUAGE Arrows #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE DuplicateRecordFields # {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedLabels #-} # LANGUAGE OverloadedStrings # {-# LANGUAGE Sc...
null
https://raw.githubusercontent.com/aspiwack/porcupine/23dcba1523626af0fdf6085f4107987d4bf718d7/porcupine-http/examples/example-Poke/ExamplePokeAPI.hs
haskell
# LANGUAGE Arrows # # LANGUAGE DataKinds # # LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedLabels # # LANGUAGE ScopedTypeVariables # Don't forget to map locations to http urls in the 'exampleHTTP.yaml' gene...
# LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # import Control.Monad import Data.Aeson import Data.DocRecord import qualified Data.Text as T import GHC.Generics im...
bd29b3035cf5998efc908e2f47103d50dacd1f9024c6b4d12f66de4535aeb642
synacktiv/toy-wasm-symbexp
Symbolic.hs
# LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE TupleSections # module Domain.Symbolic where import Data.Bits import Data.Functor.Classes (Show1 (liftShowsPr...
null
https://raw.githubusercontent.com/synacktiv/toy-wasm-symbexp/5bdaab163b32f53880429fe77fddc98795d3f0e7/src/Domain/Symbolic.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # anything interesting, really | debug show, useful when something goes wrong and you want to copy paste an expression in the REPL completing is left as an exercise to the reader :) | A pretty printer that understands operator precedence | evaluate with a map containing t...
# LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TupleSections # module Domain.Symbolic where import Data.Bits import Data.Functor.Classes (Show1 (liftShowsPrec)) import Data.Int (Int32) import qualified Data....
8527e403657285a13ce4dd3e5568f57c7c608db8f6caf678d3e31ba144ba1302
roswell/roswell
patch-quicklisp.lisp
load from quicklisp (roswell:include '("util" "extend-quicklisp-system")) (ql:quickload "roswell.extend.quicklisp" :silent t)
null
https://raw.githubusercontent.com/roswell/roswell/0107dfb54393aff1a776deb79d58f67f642135cb/lisp/patch-quicklisp.lisp
lisp
load from quicklisp (roswell:include '("util" "extend-quicklisp-system")) (ql:quickload "roswell.extend.quicklisp" :silent t)
008a86c187049cd52ba76113191be420de0c57a4a08b92dc4341273a926a22a3
Kakadu/fp2022
ast.ml
* Copyright 2021 - 2022 , * SPDX - License - Identifier : LGPL-3.0 - or - later open KeyMap type modifiers = | Public | Private | Protected | Static | Const | Virtual | Override | Abstract | New [@@deriving show { with_path = false }] type types = TInt | TVoid | TString | TRef of string | TBool ...
null
https://raw.githubusercontent.com/Kakadu/fp2022/07b6d0cb6b3d990355ccd620ecee7482630ffc61/CSharpOOP/lib/ast.ml
ocaml
type method name (identifier or interface key, dot and identifier) args body
* Copyright 2021 - 2022 , * SPDX - License - Identifier : LGPL-3.0 - or - later open KeyMap type modifiers = | Public | Private | Protected | Static | Const | Virtual | Override | Abstract | New [@@deriving show { with_path = false }] type types = TInt | TVoid | TString | TRef of string | TBool ...
03dbf0c20939996876b0ad267f5b68fff320d55a0932c5315e7b739905da80cd
facebook/duckling
IS_XX.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory . -------------...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Ranking/Classifiers/IS_XX.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant --------------------------------------------------------------- Auto-generated by regenClassifiers DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW W...
Copyright ( c ) 2016 - present , Facebook , Inc. of patent rights can be found in the PATENTS file in the same directory . @generated module Duckling.Ranking.Classifiers.IS_XX (classifiers) where import Data.String import Prelude import qualified Data.HashMap.Strict as HashMap import Duckling.Ranking.Types cla...