_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
267433cbf32d4a53f3d313e2fdc6b0a380fb5937422621cf73ec50346a78f30d
ejlilley/AbstractMusic
Analysis.hs
# LANGUAGE EmptyDataDecls , MultiParamTypeClasses , UndecidableInstances , IncoherentInstances , DataKinds , FunctionalDependencies , FlexibleContexts , RankNTypes , ImpredicativeTypes , ...
null
https://raw.githubusercontent.com/ejlilley/AbstractMusic/815ab33ee204dd3ebf29076bde330bfdf6938677/Analysis.hs
haskell
module Analysis (simultaneous, flattenUntil, makeContext, List all possible zippers! Just a flat list of all notes that appear in the phrase tree. Starting from the top of a zipper, return all zippers that occur at the specified elapsed duration. This implementation is pretty inefficient. Given a zipper focussed...
# LANGUAGE EmptyDataDecls , MultiParamTypeClasses , UndecidableInstances , IncoherentInstances , DataKinds , FunctionalDependencies , FlexibleContexts , RankNTypes , ImpredicativeTypes , ...
eefd99577f209b360d5604d1a7ce3c608e3cd159237506dc854edad4c752d95d
journeyman-cc/smeagol
formatting.clj
(ns smeagol.test.formatting (:require [clojure.test :refer :all] [clojure.string :as cs] [smeagol.formatting :refer :all] [smeagol.extensions.test :refer :all] [smeagol.local-links :refer :all])) (deftest test-apply-formatter (testing "apply-formatter" (let [actu...
null
https://raw.githubusercontent.com/journeyman-cc/smeagol/a775ef7b831a2fbcf9c98380367edc16d39c4c6c/test/smeagol/test/formatting.clj
clojure
is&#95;a&#95;test\">This is a test</h1>"
(ns smeagol.test.formatting (:require [clojure.test :refer :all] [clojure.string :as cs] [smeagol.formatting :refer :all] [smeagol.extensions.test :refer :all] [smeagol.local-links :refer :all])) (deftest test-apply-formatter (testing "apply-formatter" (let [actu...
6e4d173999ae792a6a10784ebf538a0c8fa46e95c46c02e20a14b5d741aeaf59
morazanm/fsm
main.rkt
FSM Library Version 1.0 Copyright ( C ) 2015 by Written by : , 2015 (module main racket (require rackunit "fsm-core/interface.rkt" "fsm-gviz/interface.rkt" "fsm-gui/interface.rkt") (provide (all-from-out racket) (all-from-out rackunit) (all-from-out "fsm-gu...
null
https://raw.githubusercontent.com/morazanm/fsm/665f1ca5f2f2aa5fcf531d2f7aecb11ef6e7a091/main.rkt
racket
sm constructors sm observers sm graph sm testers grammar constructors grammar observers grammar testers regexp constructors regexp observers regexp transformers some helpful functions constants close module
FSM Library Version 1.0 Copyright ( C ) 2015 by Written by : , 2015 (module main racket (require rackunit "fsm-core/interface.rkt" "fsm-gviz/interface.rkt" "fsm-gui/interface.rkt") (provide (all-from-out racket) (all-from-out rackunit) (all-from-out "fsm-gu...
4204f43ce6cfa75649d02a04cd005ceb6f86fe29d2a8a1a4ab46124b8ecb48aa
dmjio/stripe
Customer.hs
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # ------------------------------------------- -- | -- Module : Web.Stripe.Customer Copyright : ( c ) , 2014 -- Maintainer : -- Stability : experimental -- Portabil...
null
https://raw.githubusercontent.com/dmjio/stripe/967334629933fcb55247eb3270c7801c05d6bf61/stripe-core/src/Web/Stripe/Customer.hs
haskell
----------------------------------------- | Module : Web.Stripe.Customer Maintainer : Stability : experimental Portability : POSIX @ main :: IO () main = do case result of Right customer -> print customer Left stripeError -> print stripeError @ * API -- * Create customer -- * Retr...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # Copyright : ( c ) , 2014 < https:/\/\stripe.com / docs / api#customers > { -\ # LANGUAGE OverloadedStrings \#- } import Web . Stripe import Web . Stripe . Custome...
d126274c902c56a30863164797654b7a2138cfc188935a1b9c953ac835bebc4c
fused-effects/diffused-effects
Internal.hs
{-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # module Effect.Choose.Internal ( Choose(..) ) where import Data.Kind (Type) data Choose (m :: Type -> Type) k where Choose :: Choose m Bool
null
https://raw.githubusercontent.com/fused-effects/diffused-effects/83e070da3232d9a909e06d775f3f245eabb70a84/src/Effect/Choose/Internal.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE KindSignatures # module Effect.Choose.Internal ( Choose(..) ) where import Data.Kind (Type) data Choose (m :: Type -> Type) k where Choose :: Choose m Bool
68743685a9514995577424e6d891e3d4f4b144dab4c9eacab9123b396e503e31
mhuebert/chia
fps.cljs
(ns chia.view.fps (:require ["react" :as react] ["react-dom" :as react-dom] [applied-science.js-interop :as j])) (goog-define count-fps?* false) ;; allows setting a default at compile time (defonce ^:private count-fps? count-fps?*) (defonce ^:private last-fps-time...
null
https://raw.githubusercontent.com/mhuebert/chia/74ee3ee9f86efbdf81d8829ab4f0a44d619c73d3/view/src/chia/view/fps.cljs
clojure
allows setting a default at compile time
(ns chia.view.fps (:require ["react" :as react] ["react-dom" :as react-dom] [applied-science.js-interop :as j])) (defonce ^:private count-fps? count-fps?*) (defonce ^:private last-fps-time 1) (defonce frame-rate 0) (defonce frame-count 0) (defonce fps-element (memoize (fn [] ...
5266f0cd167db662eaef00223b24b3cad7e691e27741f00effc590f6cd1efc93
agner/agner
agner_index.erl
-*- Mode : Erlang ; tab - width : 4 -*- -module(agner_index). -export([behaviour_info/1]). -spec behaviour_info(atom()) -> undefined | list({atom(), arity()}). behaviour_info(callbacks) -> [{repositories,1}, {repository, 2}, {tags,2}, {branches, 2}, {spec, 3}, {spec_url, 3},{exists, 2}]; behaviour_info(_Ot...
null
https://raw.githubusercontent.com/agner/agner/65de1cc6555a7186f442012a3702c0cd1d1852e7/src/agner_index.erl
erlang
-*- Mode : Erlang ; tab - width : 4 -*- -module(agner_index). -export([behaviour_info/1]). -spec behaviour_info(atom()) -> undefined | list({atom(), arity()}). behaviour_info(callbacks) -> [{repositories,1}, {repository, 2}, {tags,2}, {branches, 2}, {spec, 3}, {spec_url, 3},{exists, 2}]; behaviour_info(_Ot...
a29d79124f6b72c82410f82ccef1fed24a9fbacf2e17fd203628f5f278f198e3
shayan-najd/NativeMetaprogramming
T9260.hs
# LANGUAGE DataKinds , TypeOperators , GADTs # module T9260 where import GHC.TypeLits data Fin n where Fzero :: Fin (n + 1) Fsucc :: Fin n -> Fin (n + 1) test :: Fin 1 test = Fsucc Fzero Only the second error is legitimate . % ghc --version The Glorious Glasgow Haskell Compilation System , version 7.8.2...
null
https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_fail/T9260.hs
haskell
version version
# LANGUAGE DataKinds , TypeOperators , GADTs # module T9260 where import GHC.TypeLits data Fin n where Fzero :: Fin (n + 1) Fsucc :: Fin n -> Fin (n + 1) test :: Fin 1 test = Fsucc Fzero Only the second error is legitimate . The Glorious Glasgow Haskell Compilation System , version 7.8.2 % ghc -ignore -...
39855e80ba3382eeabcec3dd3d5b78196bfbed7364f95f5a23a9739fc97f4b58
scrive/log
Bulk.hs
-- | Bulk stdout logging back-end. module Log.Backend.StandardOutput.Bulk ( withBulkStdOutLogger , withBulkJsonStdOutLogger ) where import Control.Monad.IO.Unlift import Data.Aeson import System.IO (hFlush, stdout) import qualified Data.Text.IO as T import qualified Data.ByteString.Lazy.Char8 as BSL import Log....
null
https://raw.githubusercontent.com/scrive/log/55e0031fef14ed897f2c585b93a9e0b5c8903026/log-base/src/Log/Backend/StandardOutput/Bulk.hs
haskell
| Bulk stdout logging back-end. | Create an asynchronouis logger thread that prints messages to standard on each bulk write. | Create a bulk logger that prints messages in the JSON format to standard on each bulk write.
module Log.Backend.StandardOutput.Bulk ( withBulkStdOutLogger , withBulkJsonStdOutLogger ) where import Control.Monad.IO.Unlift import Data.Aeson import System.IO (hFlush, stdout) import qualified Data.Text.IO as T import qualified Data.ByteString.Lazy.Char8 as BSL import Log.Data import Log.Logger import Log.I...
bba02c12f17be93b3cf522a807cc458e9290c55db443b097e130554f14671bf3
autotaker/smopeck
Location.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFunctor #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE PatternSynonyms #-} # LANGUAGE StandaloneDeriving # module Smopeck.Mock.Location where imp...
null
https://raw.githubusercontent.com/autotaker/smopeck/d68a16e413a836c62a85d0f55707ef228c9d17ab/src/Smopeck/Mock/Location.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveTraversable # # LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE PatternSynonyms #
# LANGUAGE DeriveGeneric # # LANGUAGE StandaloneDeriving # module Smopeck.Mock.Location where import Data.Hashable import GHC.Generics import Unsafe.Coerce data LocationF root a = Root root | Chain (LocationF root a) (Field a) deriving (Eq, Ord, Show, Functor, Generic,...
0006d006acea7c1f106e6b8f9d1da3753a49c9d68643bcbe9eda433c6bf37cda
samrushing/irken-compiler
irkenb.scm
;; -*- Mode: Irken -*- ;; this is a modified version of compile.scm that includes only the ;; bytecode backend. (include "lib/core.scm") (include "lib/pair.scm") (include "lib/string.scm") (include "lib/format.scm") (include "lib/symbol.scm") (%backend bytecode (include "lib/vmffi.scm")) (include "lib/sexp.scm") (in...
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/self/irkenb.scm
scheme
-*- Mode: Irken -*- this is a modified version of compile.scm that includes only the bytecode backend. (printf "reading file '" path "'\n") XXX make these mutually exclusive? disable inlining so every function has a type. clear some memory usage try to free up some memory rebuild the graph yet again, so strong...
(include "lib/core.scm") (include "lib/pair.scm") (include "lib/string.scm") (include "lib/format.scm") (include "lib/symbol.scm") (%backend bytecode (include "lib/vmffi.scm")) (include "lib/sexp.scm") (include "lib/io.scm") (include "lib/os.scm") (include "lib/stdio.scm") (include "lib/alist.scm") (include "lib/frb....
b7a0ba455d5d3d1257a6770c40892a0965dbc20935c8a59982d78dd647682915
kudu-dynamics/blaze
CfgSpec.hs
# OPTIONS_GHC -fno - warn - incomplete - uni - patterns # HLINT ignore " Redundant do " module Blaze.Import.Source.Ghidra.CfgSpec where import Blaze.Import.CallGraph (CallGraphImporter (getFunctions)) import Blaze.Prelude hiding (Symbol) import qualified Blaze.Types.Pil as Pil import qualified Blaze.Cfg as Cfg imp...
null
https://raw.githubusercontent.com/kudu-dynamics/blaze/2220a07d372a817e79525ec2707984b189fe98c9/test/ghidra/Blaze/Import/Source/Ghidra/CfgSpec.hs
haskell
# OPTIONS_GHC -fno - warn - incomplete - uni - patterns # HLINT ignore " Redundant do " module Blaze.Import.Source.Ghidra.CfgSpec where import Blaze.Import.CallGraph (CallGraphImporter (getFunctions)) import Blaze.Prelude hiding (Symbol) import qualified Blaze.Types.Pil as Pil import qualified Blaze.Cfg as Cfg imp...
d29dec007d89f671faf4e0f17d6e4c3bc4a9f9acbb3fcddd4e9cd6ec86d55cef
daigotanaka/mern-cljs
frontend_config.cljs
(ns common.frontend-config) (def LOCAL-IP "localhost") (def API-DOMAIN LOCAL-IP) ; Change this to domain in production (def API-PORT 5000) (def PRIMARY-SOCIAL-AUTH "facebook")
null
https://raw.githubusercontent.com/daigotanaka/mern-cljs/a9dedbb3b622f96dd0b06832733b4fd961e6437d/example/common/src/common/frontend_config.cljs
clojure
Change this to domain in production
(ns common.frontend-config) (def LOCAL-IP "localhost") (def API-PORT 5000) (def PRIMARY-SOCIAL-AUTH "facebook")
73bb93c89eb232e01172d09e7d15a869f8909731f04e1f148873952ba06003dc
evincarofautumn/Toody
Neighborhood.hs
| Module : . Neighborhood Description : An 8 - way neighborhood of cells in a grid . Copyright : ( c ) , 2017 License : MIT Maintainer : Module : Toody.Neighborhood Description : An 8-way neighborhood of cells in a grid. Copyright : (c) Jon Purdy, 2017 License : MIT Maintainer...
null
https://raw.githubusercontent.com/evincarofautumn/Toody/f0fe0bb2fe1289e9ee7a6eda064edd879a11b109/lib/Toody/Neighborhood.hs
haskell
# LANGUAGE RankNTypes # | The neighborhood of the currently focused item in a grid. @'Neighborhood' ('Maybe' a)@ is more useful since it tells you which items were successfully extracted.
| Module : . Neighborhood Description : An 8 - way neighborhood of cells in a grid . Copyright : ( c ) , 2017 License : MIT Maintainer : Module : Toody.Neighborhood Description : An 8-way neighborhood of cells in a grid. Copyright : (c) Jon Purdy, 2017 License : MIT Maintainer...
5fe41550bc879a4c693ad3651f71fda698b3972f605e5ff204af1d60724cbe76
LaurentMazare/ocaml-torch
densenet.ml
open Base open Torch let sub = Var_store.sub let conv2d ?(stride = 1) ?(padding = 0) = Layer.conv2d_ ~stride ~padding ~use_bias:false let dense_layer vs ~bn_size ~growth_rate ~input_dim = let inter_dim = bn_size * growth_rate in let bn1 = Layer.batch_norm2d (sub vs "norm1") input_dim in let conv1 = conv2d (sub ...
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-torch/a82b906a22c7c23138af16fab497a08e5167d249/src/vision/densenet.ml
ocaml
open Base open Torch let sub = Var_store.sub let conv2d ?(stride = 1) ?(padding = 0) = Layer.conv2d_ ~stride ~padding ~use_bias:false let dense_layer vs ~bn_size ~growth_rate ~input_dim = let inter_dim = bn_size * growth_rate in let bn1 = Layer.batch_norm2d (sub vs "norm1") input_dim in let conv1 = conv2d (sub ...
26aa2c54ef6b8d0f22f13860df5e099118ca0aa899356eadd6bda2ced8c7d088
samrocketman/home
plastic-logo.scm
; plastic logo ; ; -------------------------------------------------------------------- version 1.0 by 2003/02/17 ; -------------------------------------------------------------------- ; (define (script-fu-plastic-logo inText inFont inFontSize inBackGroundColor inHighlightColor inTextColor inDarkColor inHighligh...
null
https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/plastic-logo.scm
scheme
plastic logo -------------------------------------------------------------------- -------------------------------------------------------------------- (gimp-display-new img) (gimp-floating-sel-anchor theText theTextLayer) (gimp-image-clean-all img)
version 1.0 by 2003/02/17 (define (script-fu-plastic-logo inText inFont inFontSize inBackGroundColor inHighlightColor inTextColor inDarkColor inHighlightValue inThreshold inShrink inFeather inShadow inAbsolute inImageWidth inImageHeight inFlatten) (let* ( Definition unserer Erzeugen des neuen Bildes ...
1fa2770587b5cf3b63ced3f590bf80d9442d19888eec2d27bb652675a90479c3
input-output-hk/rscoin-core
AesonSpec.hs
# LANGUAGE ScopedTypeVariables # module Test.RSCoin.Core.Identity.AesonSpec ( spec ) where import Data.Aeson (FromJSON, ToJSON, decode, encode) import Data.Proxy (Proxy (Proxy)) import Test.Hspec (Spec, describe) import Test.Hspec....
null
https://raw.githubusercontent.com/input-output-hk/rscoin-core/5b3fde8de1bdce71ee6ea0e8f1582ea28f451171/test/Test/RSCoin/Core/Identity/AesonSpec.hs
haskell
# LANGUAGE ScopedTypeVariables # module Test.RSCoin.Core.Identity.AesonSpec ( spec ) where import Data.Aeson (FromJSON, ToJSON, decode, encode) import Data.Proxy (Proxy (Proxy)) import Test.Hspec (Spec, describe) import Test.Hspec....
0491e8889d52ce5361161b327f132751ae1994b426771273bf794efa49ed72c3
input-output-hk/project-icarus-importer
Local.hs
# LANGUAGE TypeFamilies # | BlockchainImporter 's local Txp . module Pos.BlockchainImporter.Txp.Local ( eTxProcessTransaction , eTxProcessTransactionNoLock , eTxNormalize ) where import JsonLog (CanJsonLog (..)) import Universum import qualified Data.HashMap.Strict ...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/blockchain-importer/src/Pos/BlockchainImporter/Txp/Local.hs
haskell
3. Set new tip to txp local data
# LANGUAGE TypeFamilies # | BlockchainImporter 's local Txp . module Pos.BlockchainImporter.Txp.Local ( eTxProcessTransaction , eTxProcessTransactionNoLock , eTxNormalize ) where import JsonLog (CanJsonLog (..)) import Universum import qualified Data.HashMap.Strict ...
9b9186f2eae49a16b8afbf52e6d91890aadfebebda41f7e8d471e3b839c9cb5a
JoelSanchez/ventas
infinite_scroll.cljs
(ns ventas.components.infinite-scroll "Shamelessly stolen from: -infinite-scroll" (:require [reagent.core :as r] [ventas.utils :as utils])) (defn- get-scroll-top [] (if (exists? (.-pageYOffset js/window)) (.-pageYOffset js/window) (.-scrollTop (or (.-documentElement js/document) ...
null
https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/cljs/ventas/components/infinite_scroll.cljs
clojure
(ns ventas.components.infinite-scroll "Shamelessly stolen from: -infinite-scroll" (:require [reagent.core :as r] [ventas.utils :as utils])) (defn- get-scroll-top [] (if (exists? (.-pageYOffset js/window)) (.-pageYOffset js/window) (.-scrollTop (or (.-documentElement js/document) ...
1cf5722cddc0e243f190350fd60f2338ed2bdbd8d738239f4d3b30b1dea39e87
racket/racket7
engine.rkt
#lang racket/base (require racket/private/primitive-table "internal-error.rkt" (only-in '#%linklet primitive-table) (for-syntax racket/base)) (void (unless (primitive-table '#%engine) (internal-error "engines not provided by host"))) (void (unless (primitive-table '#%pthread) ...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/thread/engine.rkt
racket
This `#%pthread` table's entries are linked more directly Just `exn:break`, etc., but the host may need to distinguish breaks raised by the thread implementation: Check for async foreign callbacks: Disabling interrupts prevents a race with interrupt handlers.
#lang racket/base (require racket/private/primitive-table "internal-error.rkt" (only-in '#%linklet primitive-table) (for-syntax racket/base)) (void (unless (primitive-table '#%engine) (internal-error "engines not provided by host"))) (void (unless (primitive-table '#%pthread) ...
96a0de8d53f51501ec2b3630445ad148cc5f6028be75ccbb1bff4bf26a286b18
esl/MongooseIM
shaper_srv.erl
%%%------------------------------------------------------------------- @author Michael < > ( C ) 2013 , Uvarov Michael %%% @doc Shared shapers. %%% @end %%%------------------------------------------------------------------- -module(shaper_srv). -behaviour(gen_server). %% API Function Exports -export([start_link...
null
https://raw.githubusercontent.com/esl/MongooseIM/72db0598643804e70863170bff3af280659551eb/src/shaper_srv.erl
erlang
------------------------------------------------------------------- @doc Shared shapers. @end ------------------------------------------------------------------- API Function Exports Record definitions Maximum ammount of milliseconds to wait How many seconds to store each shaper API Function Definitions @doc Sh...
@author Michael < > ( C ) 2013 , Uvarov Michael -module(shaper_srv). -behaviour(gen_server). -export([start_link/1, wait/5, reset_all_shapers/1]). -ignore_xref([start_link/1, reset_all_shapers/1]). -record(state, { max_delay :: non_neg_integer(), ttl :: non_neg_integer(), shapers :: map...
d95f4fedc6ea917a08c10c4e563e0349b06ee2d15dd6ba02f2e9a4c9cddc72ad
webmachine/webmachine
wm_echo_host_header.erl
%% %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software distributed under the ...
null
https://raw.githubusercontent.com/webmachine/webmachine/8a3460fcc5fa1ffabe8bf2bdf3875bb62b5ee196/test/wm_echo_host_header.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. limitations under the License. Trans...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , See the License for the specific language governing permissions and -module(wm_echo_host_header). -export([ init/1, to_html/2, parse_body...
34f3949282803c2082ff03ef5d5c7f01f506d6b030e60437a3410da632ea1176
jrm-code-project/LISP-Machine
host.lisp
ZWEI host -*-Mode : Lisp ; Package : ZWEI ; Base : 10.;Readtable : Copyright ( c ) 1982 , all rights reserved . ;;; I may give you permission to use this -- ask if you ;;; are interested -- but I will insist that you agree to ;;; return all improvements to me for redistribution. Make ZWEI a host so Lisp Mach...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/zwei/host.lisp
lisp
Package : ZWEI ; Base : 10.;Readtable : I may give you permission to use this -- ask if you are interested -- but I will insist that you agree to return all improvements to me for redistribution. hosts: ED: accepts any name the completing reader would ED-BUFFER: must have the exact buffer name or will...
Copyright ( c ) 1982 , all rights reserved . Make ZWEI a host so Lisp Machine programs can treat buffers like files . ED - FILE : accepts a pathname and does a find file ( like Control - X Control - F ) known bugs : ED - FILE wo n't allow : NEW - FILE nil ( I 'll fix later ) (defmacro zwei-h...
c221c744df9c8174487deba3f9bf24912314c0d76abae4697e5a1d354399cc81
riemann/riemann
mailgun.clj
(ns riemann.mailgun "Forwards events to Mailgun" (:require [clj-http.client :as client] [riemann.common :refer [body subject]])) (def ^:private event-url "") (defn- post "POST to the Mailgun events API." [mgun-opts msg-opts] (let [body (:body msg-opts) [body-type content] (if (= (:type...
null
https://raw.githubusercontent.com/riemann/riemann/1649687c0bd913c378701ee0b964a9863bde7c7c/src/riemann/mailgun.clj
clojure
TODO: error checking to ensure sandbox and service-key are set
(ns riemann.mailgun "Forwards events to Mailgun" (:require [clj-http.client :as client] [riemann.common :refer [body subject]])) (def ^:private event-url "") (defn- post "POST to the Mailgun events API." [mgun-opts msg-opts] (let [body (:body msg-opts) [body-type content] (if (= (:type...
857bc062193017435dfe44177f9ec60dc1c409e3be409345e081317f271aa307
awkward-squad/ki
Tests.hs
module Main (main) where import Control.Concurrent (newEmptyMVar, putMVar, takeMVar, threadDelay) import Control.Concurrent.STM (atomically) import Control.Exception import Control.Monad import GHC.IO (unsafeUnmask) import qualified Ki import Test.Tasty import Test.Tasty.HUnit import Prelude main :: IO () main = de...
null
https://raw.githubusercontent.com/awkward-squad/ki/efbccde4bbf24d5983386b9621cd0868dbe163c0/ki/test/Tests.hs
haskell
module Main (main) where import Control.Concurrent (newEmptyMVar, putMVar, takeMVar, threadDelay) import Control.Concurrent.STM (atomically) import Control.Exception import Control.Monad import GHC.IO (unsafeUnmask) import qualified Ki import Test.Tasty import Test.Tasty.HUnit import Prelude main :: IO () main = de...
aa0fe68ed185d34d07f26339d40a182d8b3685692bdb66ec1deeb9aef79c0848
rvirding/flavors
flavors_sup.erl
%%%------------------------------------------------------------------- %% @doc flavors top level supervisor. %% @end %%%------------------------------------------------------------------- -module(flavors_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link...
null
https://raw.githubusercontent.com/rvirding/flavors/249efc49d4c8e38f97c98720b746d21082ecdc73/src/flavors_sup.erl
erlang
------------------------------------------------------------------- @doc flavors top level supervisor. @end ------------------------------------------------------------------- sup_flags() = #{strategy => strategy(), % optional intensity => non_neg_integer(), % optional optional child_spec(...
-module(flavors_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). init([]) -> SupFlags = #{strategy => one_for_all, intensity => 0, period => 1}, C...
067f5556a22a7c465ea2e30cb4c373e55c07193ce19cac0ab274dc0e34387471
metabase/metabase
text_fingerprint.clj
(ns metabase.sync.analyze.classifiers.text-fingerprint "Logic for inferring the semantic types of *Text* fields based on their TextFingerprints. These tests only run against Fields that *don't* have existing semantic types." (:require [metabase.sync.interface :as i] [metabase.sync.util :as sync-util] [m...
null
https://raw.githubusercontent.com/metabase/metabase/dad3d414e5bec482c15d826dcc97772412c98652/src/metabase/sync/analyze/classifiers/text_fingerprint.clj
clojure
(ns metabase.sync.analyze.classifiers.text-fingerprint "Logic for inferring the semantic types of *Text* fields based on their TextFingerprints. These tests only run against Fields that *don't* have existing semantic types." (:require [metabase.sync.interface :as i] [metabase.sync.util :as sync-util] [m...
8abd85dbb222937a3c51e761ee8099cb2f2553244732e49c317414b57d63394d
clj-commons/ordered
project.clj
(defproject org.flatland/ordered (or (System/getenv "PROJECT_VERSION") "1.5.10") :url "-commons/ordered" :license {:name "Eclipse Public License - v 1.0" :url "-v10.html"} :description "Pure-clojure implementation of ruby's ordered hash and set types - instead of sorting by key, these collections reta...
null
https://raw.githubusercontent.com/clj-commons/ordered/5c5d3221557a8ebbac90bad070300cc53ce195eb/project.clj
clojure
Not required except for benchmarks.
(defproject org.flatland/ordered (or (System/getenv "PROJECT_VERSION") "1.5.10") :url "-commons/ordered" :license {:name "Eclipse Public License - v 1.0" :url "-v10.html"} :description "Pure-clojure implementation of ruby's ordered hash and set types - instead of sorting by key, these collections reta...
0834b190554ce7ca81d3d17039c3e66b96cb48fa792be8d1f75f6d1afbc24d52
lisp/de.setf.resource
n3.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.resource.implementation ; -*- (in-package :de.setf.resource.implementation) (eval-when (:compile-toplevel :load-toplevel :execute) (unless (intersection '(:digitool :clozure :allegro :sbcl :lispworks) *features*) (cerror "Compile...
null
https://raw.githubusercontent.com/lisp/de.setf.resource/27bf6dfb3b3ca99cfd5a6feaa5839d99bfb4d29e/n3.lisp
lisp
Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.resource.implementation ; -*- without even the flip the order !!! this need to properly escape skip the ^ and the next, and save the read data type. to the literal skip the @, save the language token pass through the literal string and whatever data t...
(in-package :de.setf.resource.implementation) (eval-when (:compile-toplevel :load-toplevel :execute) (unless (intersection '(:digitool :clozure :allegro :sbcl :lispworks) *features*) (cerror "Compile it anyway." "This file lacks conditionalization for ~a." (lisp-implementation-type)))) (:documenta...
383666833d9d8b6ab26d4a8245c28f2b0fee747ea45dca756dbb0677135dd19d
cloverage/cloverage
project.clj
(defproject lein-cloverage "1.3.0-SNAPSHOT" :description "Lein plugin for cloverage" :url "" :scm {:name "git" :dir ".." :url "" :tag "HEAD"} :vcs :git :license {:name "Eclipse Public License - v 1.0" :url "-v10.html" :distribution :repo :comments "s...
null
https://raw.githubusercontent.com/cloverage/cloverage/87fd10f82ea7c0f47c03354105e513b160d1e047/lein-cloverage/project.clj
clojure
Because we're not in the top-level directory, so it doesn't auto-detect tags only by version, but we share a repository with cloverage itself. It's up to the maintainers to make this not desync too much.
(defproject lein-cloverage "1.3.0-SNAPSHOT" :description "Lein plugin for cloverage" :url "" :scm {:name "git" :dir ".." :url "" :tag "HEAD"} :vcs :git :license {:name "Eclipse Public License - v 1.0" :url "-v10.html" :distribution :repo :comments "s...
5250de562fc25addf12fefcca4659114324d8c60b19526aecdf73a07de1650ba
kingcons/cl-store
mop.lisp
-*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;; See the file LICENCE for licence information. (in-package :cl-store) (defmacro use-primitive (partial-name) (let* ((pname (symbol-name partial-name)) (standard-name (symbolicate "SLOT-DEFINITION-" pname)) (primitive (find-symbol ...
null
https://raw.githubusercontent.com/kingcons/cl-store/e9328632cd6bf51cb79adeb5d40c6ee5c6f805b4/abcl/mop.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- See the file LICENCE for licence information.
(in-package :cl-store) (defmacro use-primitive (partial-name) (let* ((pname (symbol-name partial-name)) (standard-name (symbolicate "SLOT-DEFINITION-" pname)) (primitive (find-symbol (format nil "%SLOT-DEFINITION-~a" pname) :system))) `(defmethod ,stan...
6ce005d5b03e22d6ee306dc221a2a62f272a5bc51b6858a6d40e9fcb6768fcad
hasufell/abstract-filepath
Common.hs
# LANGUAGE CPP # This template expects CPP definitions for : -- WINDOWS -- POSIX -- FILEPATH_NAME = PosixFilePath | WindowsFilePath | AbstractFilePath -- OSSTRING_NAME = PosixString | WindowsString | OsString WORD_NAME = PosixChar | WindowsChar | OsChar WTOR ...
null
https://raw.githubusercontent.com/hasufell/abstract-filepath/05ece5d3c8ab0471f7edaf3209717e841b746ff8/abstract-filepath/lib/AFP/AbstractFilePath/Common.hs
haskell
WINDOWS POSIX FILEPATH_NAME = PosixFilePath | WindowsFilePath | AbstractFilePath OSSTRING_NAME = PosixString | WindowsString | OsString ---------------------- Separator predicates | Ideal path separator character: '\\'. | Ideal path separator character: '/'. | Ideal path separator characte...
# LANGUAGE CPP # This template expects CPP definitions for : WORD_NAME = PosixChar | WindowsChar | OsChar WTOR = PW | WW | OsChar CTOR = PS | WS | OsString #ifdef WINDOWS #elif defined POSIX #else #endif p...
f2da8d379ab1423c98830e3b0a12050c79f4608364b23da099b2690607939084
damballa/parkour
graph_test.clj
(ns parkour.graph-test (:require [clojure.test :refer :all] [clojure.string :as str] [clojure.java.io :as io] [clojure.core.reducers :as r] [parkour (graph :as pg) (mapreduce :as mr) (reducers :as pr) (conf :as conf) (fs :as fs) (wrapper :as w)] ...
null
https://raw.githubusercontent.com/damballa/parkour/2b3c5e1987e18b4c4284dfd4fcdaba267a4d7fbc/test/parkour/graph_test.clj
clojure
(ns parkour.graph-test (:require [clojure.test :refer :all] [clojure.string :as str] [clojure.java.io :as io] [clojure.core.reducers :as r] [parkour (graph :as pg) (mapreduce :as mr) (reducers :as pr) (conf :as conf) (fs :as fs) (wrapper :as w)] ...
a1b953539b25403afd4a71f91caa0fdc96189a1443e73c5ebbfa86e0f0441df9
returntocorp/semgrep
Parse_clojure_tree_sitter.ml
* * Copyright ( C ) 2023 r2c * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file LICENSE . ...
null
https://raw.githubusercontent.com/returntocorp/semgrep/a891f707c33aa2ccb245b9c8640002951e033167/languages/lisp/tree-sitter/Parse_clojure_tree_sitter.ml
ocaml
*************************************************************************** Prelude *************************************************************************** *************************************************************************** Helpers ************************************************************************...
* * Copyright ( C ) 2023 r2c * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file LICENSE . ...
5e54b2c8aad368506cea730f8a5139b81c51156a7480eb863c04ada8f97cc486
basho/riak_api
pb_service_test.erl
-module(pb_service_test). -compile([export_all, nowarn_export_all]). -include_lib("eunit/include/eunit.hrl"). %% =================================================================== Implement a dumb PB service %% =================================================================== -behaviour(riak_api_pb_service). -exp...
null
https://raw.githubusercontent.com/basho/riak_api/41f4b72d6a946c710e1523fd69b5b8deb5b57153/test/pb_service_test.erl
erlang
=================================================================== =================================================================== =================================================================== =================================================================== Need riak_core.security capability, let's f...
-module(pb_service_test). -compile([export_all, nowarn_export_all]). -include_lib("eunit/include/eunit.hrl"). Implement a dumb PB service -behaviour(riak_api_pb_service). -export([init/0, decode/2, encode/1, process/2, process_stream/3]). -define(MSGMIN, 99). -define(MSGMAX, 109)...
eaf17e80bac30d567fcac0214899b399f324bd1a7013acce34305e98972cf1ca
microsoft/SLAyer
Timer.ml
Copyright ( c ) Microsoft Corporation . All rights reserved . (** Timers for runtime statistics *) open Library type t = { mutable ustart: float; mutable sstart: float; mutable ufinish: float; mutable sfinish: float; mutable uduration: float; mutable sduration: float; mutable running: bool; muta...
null
https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/Timer.ml
ocaml
* Timers for runtime statistics
Copyright ( c ) Microsoft Corporation . All rights reserved . open Library type t = { mutable ustart: float; mutable sstart: float; mutable ufinish: float; mutable sfinish: float; mutable uduration: float; mutable sduration: float; mutable running: bool; mutable pending: int; mutable count: in...
e64d56c6a1a6619f42223170b0b5efdcee5b15c6c6b9733b6ed1f253f804575a
mchakravarty/hoas-conv
Main.hs
# LANGUAGE ExtendedDefaultRules # {-# LANGUAGE DeriveDataTypeable #-} import Data.Typeable import qualified DeBruijn import qualified HOAS import HOAS (con, lam, app) import Convert i = HOAS.lam $ \x -> x zero = HOAS.lam $ \f -> HOAS.lam $ \x -> x one = HOAS.lam $ \f -> HOAS.lam $ \x -> f `HOAS.app` x two = HO...
null
https://raw.githubusercontent.com/mchakravarty/hoas-conv/8f98d562c9ca2a7c08b3a22d471582d5b42ffbe8/Main.hs
haskell
# LANGUAGE DeriveDataTypeable #
# LANGUAGE ExtendedDefaultRules # import Data.Typeable import qualified DeBruijn import qualified HOAS import HOAS (con, lam, app) import Convert i = HOAS.lam $ \x -> x zero = HOAS.lam $ \f -> HOAS.lam $ \x -> x one = HOAS.lam $ \f -> HOAS.lam $ \x -> f `HOAS.app` x two = HOAS.lam $ \f -> HOAS.lam $ \x -> f `H...
6163e64d918f200a1929a9b0bcbc7d3f9e57c353a59b8a69c2bf344a4257395f
jyh/metaprl
pmn_core_terms.mli
* Typed core language . * * ---------------------------------------------------------------- * * @begin[license ] * Copyright ( C ) 2003 - 2006 Mojave Group , Caltech * * This program is free software ; you can redistribute it and/or * modify it under the terms of the GNU General Public Licen...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/poplmark/naive/pmn_core_terms.mli
ocaml
*********************************************************************** * Types. *********************************************************************** * Expressions. * Normal abstraction and application. * Type abstraction and application. ! * @docoff * * -*- * Local Variables: * Caml-master: "comp...
* Typed core language . * * ---------------------------------------------------------------- * * @begin[license ] * Copyright ( C ) 2003 - 2006 Mojave Group , Caltech * * This program is free software ; you can redistribute it and/or * modify it under the terms of the GNU General Public Licen...
1eefe378919c4a72df281aca700cc45792de31cfe2609e4e5a5ac2db47322df3
nitrogen/simple_bridge
cowboy_simple_bridge_anchor.erl
%% vim: ts=4 sw=4 et -module(cowboy_simple_bridge_anchor). -export([ init/2, handle/2, terminate/2, websocket_init/1, websocket_handle/2, websocket_info/2, websocket_terminate/2 ]). -record(ws_state, {handler, keepalive_interval, bridge, state, init_req}). ...
null
https://raw.githubusercontent.com/nitrogen/simple_bridge/cb919b1ae2000ad31de3394fb94632fb9ea2f8e6/src/cowboy_bridge_modules/cowboy_simple_bridge_anchor.erl
erlang
vim: ts=4 sw=4 et Keepalive stuff We don't need to pong, cowboy does that automatically. So just carry on! be handled by cowboy.
-module(cowboy_simple_bridge_anchor). -export([ init/2, handle/2, terminate/2, websocket_init/1, websocket_handle/2, websocket_info/2, websocket_terminate/2 ]). -record(ws_state, {handler, keepalive_interval, bridge, state, init_req}). init(Req, State) -> ...
dfaf256097c40475854c68d5a8c0822ce535702908504e070053340023685e8e
clojure-lsp/clojure-lsp
server_test.clj
(ns clojure-lsp.server-test (:require [clojure-lsp.server :as server] [clojure-lsp.test-helper :as h] [clojure.test :refer [deftest is testing]])) (h/reset-components-before-test) (deftest test-client-settings (testing "initializationOptions are null" (let [params {:initialization-options nil}] ...
null
https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/d611822eec77079a805168afb0cbb2c92ff626c4/cli/test/clojure_lsp/server_test.clj
clojure
(ns clojure-lsp.server-test (:require [clojure-lsp.server :as server] [clojure-lsp.test-helper :as h] [clojure.test :refer [deftest is testing]])) (h/reset-components-before-test) (deftest test-client-settings (testing "initializationOptions are null" (let [params {:initialization-options nil}] ...
297c32a837b062abba2f86298de83dd69d06cf93641a74c7a838c799a88345b6
onyx-platform/onyx-twitter-sample
math.clj
(ns twit.tasks.math (:require [schema.core :as s])) (defn inc-in-segment "A specialized version of update-in that increments a key in a segment" [ks segment] (update-in segment ks inc)) (def IncKeyTask {::inc-key [s/Keyword]}) (s/defn inc-key ([task-name :- s/Keyword task-opts] {:task {:task-map (merg...
null
https://raw.githubusercontent.com/onyx-platform/onyx-twitter-sample/bd206630a0ee083867f44e856544c6bd664962e8/src/twit/tasks/math.clj
clojure
(ns twit.tasks.math (:require [schema.core :as s])) (defn inc-in-segment "A specialized version of update-in that increments a key in a segment" [ks segment] (update-in segment ks inc)) (def IncKeyTask {::inc-key [s/Keyword]}) (s/defn inc-key ([task-name :- s/Keyword task-opts] {:task {:task-map (merg...
bf1cfcc4edef1099acc10bfd3617082759bf3c5687fd368b08f26eeba128a15c
sile/passage
passage_sampler_null_tests.erl
2017 < > -module(passage_sampler_null_tests). -include_lib("eunit/include/eunit.hrl"). %%------------------------------------------------------------------------------ %% Test Cases %%------------------------------------------------------------------------------ sampler_null_test_() -> {foreach, fun ()...
null
https://raw.githubusercontent.com/sile/passage/2bbc1847e172e28c766fcc62fb66f6643fb52679/test/passage_sampler_null_tests.erl
erlang
------------------------------------------------------------------------------ Test Cases ------------------------------------------------------------------------------
2017 < > -module(passage_sampler_null_tests). -include_lib("eunit/include/eunit.hrl"). sampler_null_test_() -> {foreach, fun () -> ok = application:start(passage) end, fun (_) -> ok = application:stop(passage) end, [ {"All spans are discarded in sampling phase", fun () -> ...
3f30c5948ab15ae2d189ee59a3a07e4bf06917a00959ceff19ef8fc96b31f9ae
mbj/stratosphere
S3OutputProperty.hs
module Stratosphere.SageMaker.ModelQualityJobDefinition.S3OutputProperty ( S3OutputProperty(..), mkS3OutputProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data ...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/ModelQualityJobDefinition/S3OutputProperty.hs
haskell
module Stratosphere.SageMaker.ModelQualityJobDefinition.S3OutputProperty ( S3OutputProperty(..), mkS3OutputProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data ...
e9bae6b1c3b2e843862fb9b0cb3541ef7f9db3a906af6c6af1e5d0ce1fe670ea
drewr/postal
smtp.clj
Copyright ( c ) ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;; restriction, including without limitation the rights to use, ;; copy, modify, merge, publish, distrib...
null
https://raw.githubusercontent.com/drewr/postal/7606a66c10b66abd3476c6f4c828fb4b87d3792d/test/postal/test/smtp.clj
clojure
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell Software is furnished to do so, subject to the following condit...
Copyright ( c ) files ( the " Software " ) , to deal in the Software without copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , (ns postal.test.smtp (:use [clojure...
2a8210d786319e18a02918102a5adf46714cfe0a64e2e4ca2cfefab7e05d90b3
brendanhay/gogol
Cancel.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-testing/gen/Gogol/Testing/Projects/TestMatrices/Cancel.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated /See:/ <-test-lab/ Cloud Testing API Reference> for @testing.projects.testMatrices.cancel@. * Resource ** Constructing a Request | A resource alias for @testing.projects.testMatrices.cancel@ method which the 'TestingProjectsT...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
d5c89fa28c8c775407ac56ed661e7b098edf1267d9a645f4d6581c9993775ede
jarohen/yoyo
http_kit.clj
(ns yoyo.http-kit (:require [yoyo.core :as yc] [org.httpkit.server :as http] [clojure.tools.logging :as log])) (defn start-server! " :: {server-opts} -> Component {server-opts} This returns a Component containing a started HTTP-kit server Usage: (require '[yoyo.http-kit :refer [st...
null
https://raw.githubusercontent.com/jarohen/yoyo/b579d21becd06b5330dee9f5963708db03ce1e25/modules/http-kit/src/yoyo/http_kit.clj
clojure
... anything else you'd pass to org.httpkit.server/run-server
(ns yoyo.http-kit (:require [yoyo.core :as yc] [org.httpkit.server :as http] [clojure.tools.logging :as log])) (defn start-server! " :: {server-opts} -> Component {server-opts} This returns a Component containing a started HTTP-kit server Usage: (require '[yoyo.http-kit :refer [st...
e83be7d969e30a20b6b9f5a45e7d5ad398246e85848fc0c09308425a91173cae
gbwey/persistent-odbc
ODBCTypes.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} module Database.Persist.ODBCTypes where import Data.Text (Text) import Database.Persist.Sql -- | List of DBMS that are supported data DBType = MySQL | Postgres | MSSQL { mssql2012 :: Bool} | Oracle { oracle12c :: Bool } | DB2 | Sqlite { sqlite3619 :: Bool ...
null
https://raw.githubusercontent.com/gbwey/persistent-odbc/cfe90437486a9e738c02cf22a0de43d4ac99619b/src/Database/Persist/ODBCTypes.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE Rank2Types # | List of DBMS that are supported load up the dbmsMigration depending on the dbms then somehow pass in the partially apply if it is limitoffset-capable to dbmsLimitOffset
module Database.Persist.ODBCTypes where import Data.Text (Text) import Database.Persist.Sql data DBType = MySQL | Postgres | MSSQL { mssql2012 :: Bool} | Oracle { oracle12c :: Bool } | DB2 | Sqlite { sqlite3619 :: Bool } deriving (Show,Read) mysql,postgres,mssqlMin2012,mssql,oracleMin12c,oracle,db2,sqlite,sqliteMin36...
dccdfbcd24fd5cc02d45446dd8bfc630eafbb202125928f92a446937959810ac
facebook/duckling
Rules.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. {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} module Duckling.Temperatu...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Temperature/RO/Rules.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. # LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. # LANGUAGE LambdaCase # module Duckling.Temperature.RO.Rules ( rules ) where import Data.String import Prelude import Duckling.Dimensions.Types import Duckling.Temperature.Helpers import Duckling.Types import qualified Duckling.Temperature.Types as TTemperatur...
e2e0f1b311072d8cce2c0c432816140f1d1504b3684ac0a48032c15e24825a2a
monadbobo/ocaml-core
throttle.ml
open Core.Std open Import open Deferred_std type 'a outcome = [ `Ok of 'a | `Aborted | `Raised of exn ] module Internal_job : sig type t with sexp_of val create : (unit -> 'a Deferred.t) -> t * 'a outcome Deferred.t val run : t -> [ `Ok | `Raised ] Deferred.t val abort : t -> unit end = struct type t = ...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/async/core/lib/throttle.ml
ocaml
Check [~continue_on_error:false]. Check [~continue_on_error:true]. Check that [max_concurrent_jobs] limit works, and is fully utilized.
open Core.Std open Import open Deferred_std type 'a outcome = [ `Ok of 'a | `Aborted | `Raised of exn ] module Internal_job : sig type t with sexp_of val create : (unit -> 'a Deferred.t) -> t * 'a outcome Deferred.t val run : t -> [ `Ok | `Raised ] Deferred.t val abort : t -> unit end = struct type t = ...
a1ba8433475cf5efbef4dac0ffd9bf526e29990012eea3dab20572138b624aca
opencog/opencog
whichobjQ.scm
; This rule is for which-objects as in ; "Which book did you read?" ( AN June 2015 ) (define whichobjQ (BindLink (VariableList (var-decl "$a-parse" "ParseNode") (var-decl "$subj" "WordInstanceNode") (var-decl "$verb" "WordInstanceNode") (var-decl "$obj" "WordInstanceNode") (var-decl "$qVar" "WordIn...
null
https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/relex2logic/rules/whichobjQ.scm
scheme
This rule is for which-objects as in "Which book did you read?"
( AN June 2015 ) (define whichobjQ (BindLink (VariableList (var-decl "$a-parse" "ParseNode") (var-decl "$subj" "WordInstanceNode") (var-decl "$verb" "WordInstanceNode") (var-decl "$obj" "WordInstanceNode") (var-decl "$qVar" "WordInstanceNode") (var-decl "$subj-lemma" "WordNode") (var-decl "$v...
c04a44990381abab369a7f70a1c90b11e52fef7404edd4688c012248d8cd7b7e
fused-effects/fused-effects
Sum.hs
{-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # -- | Operations on /sums/, combining effects into a /signature/. -- @since ...
null
https://raw.githubusercontent.com/fused-effects/fused-effects/9790ed4fb2cbaaf8933ce0eb42d7c55bc38f12ac/src/Control/Effect/Sum.hs
haskell
# LANGUAGE DeriveTraversable # | Operations on /sums/, combining effects into a /signature/. * Membership * Sums | Higher-order sums are used to combine multiple effects into a signature, typically by chaining on the right. | The class of types present in a signature. It should not generally be necessary for...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # @since 0.1.0.0 module Control.Effect.Sum Member(..) , Members , (:+:)(..) , reassociateSumL ) where import ...
4d619a363574fe969116ebb6e6e9e410a8143756953b370ac423060ee76588e7
CloudI/CloudI
cloudi_service_quorum.erl
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et nomod : %%% %%%------------------------------------------------------------------------ %%% @doc = = CloudI Quorum Service== Using this service can provide Byzantine fault tolerance...
null
https://raw.githubusercontent.com/CloudI/CloudI/ec951deffbedcce823b16f82cef89e768f2ac07c/src/lib/cloudi_service_quorum/src/cloudi_service_quorum.erl
erlang
------------------------------------------------------------------------ @doc services. The service prefix is used to accept any service requests that match the prefix, while the suffix is used to achieve the configured number of service request responses (i.e., quorum: the minimum number of services able to pro...
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et nomod : = = CloudI Quorum Service== Using this service can provide Byzantine fault tolerance for any other MIT License Copyright ( c ) 2013 - 2022 < mjtruog at protonmail dot ...
e5c1e28f313367bffe4912537f2455f893017f4fd2fffe7daee46256528c0153
apache/couchdb-rebar
rebar3_deps1_rt.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et -module(rebar3_deps1_rt). -export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), ok. %% Test deps with rebar3-type dependencies (that is, dependencies without...
null
https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/inttest/rebar3_deps1/rebar3_deps1_rt.erl
erlang
ex: ts=4 sw=4 et Test deps with rebar3-type dependencies (that is, dependencies without Regexes) A application B application properly Generate the contents of a simple .app file
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- -module(rebar3_deps1_rt). -export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), ok. Example : { git , { appname , " git / something " , { branch , master } } } files() -> ...
2b5439800ef5d2b1566aa50825815b20ff9af99249647362b990378a102e1e5f
votinginfoproject/data-processor
test_helpers.clj
(ns vip.data-processor.test-helpers (:require [clojure.test :refer :all] [clojure.tools.logging :as log] [clojure.java.io :as io] [clojure.java.jdbc :as jdbc] [korma.core :as korma] [turbovote.resource-config :refer [config]] [vip.data-processor....
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/test_helpers.clj
clojure
find all the places using xml-input and change to singular file type don't set psql-tables until after that's been run give a moment
(ns vip.data-processor.test-helpers (:require [clojure.test :refer :all] [clojure.tools.logging :as log] [clojure.java.io :as io] [clojure.java.jdbc :as jdbc] [korma.core :as korma] [turbovote.resource-config :refer [config]] [vip.data-processor....
7f3f8bab65c226b138b407ae510cd1e5484a3c3f84ca7371a0b0499bd20cb2fd
haskell-works/avro
HasAvroSchema.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Data.Avro.HasAvroSchema where import Control.Monad.Identity (Identity) import qualified Data.Array as Ar import Data.Avro.Schema.Decimal a...
null
https://raw.githubusercontent.com/haskell-works/avro/cee0869ce9e52db8942deb86aa66dd7355508d3c/src/Data/Avro/HasAvroSchema.hs
haskell
# LANGUAGE ConstraintKinds #
# LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Data.Avro.HasAvroSchema where import Control.Monad.Identity (Identity) import qualified Data.Array as Ar import Data.Avro.Schema.Decimal as D import Data.Avro.Schema...
f86af9dfd7a90b5d4436345f180f6145320d68b76cb68f3d358fa76f3d64ae1a
theodormoroianu/SecondYearCourses
LambdaChurch_20210415165459.hs
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415165459.hs
haskell
alpha-equivalence subst u x t defines [u/x]t, i.e., substituting u for x in t This substitution avoids variable captures so it is safe to be used when reducing terms with free variables (e.g., if evaluating inside lambda abstractions) ^ substitution term ^ variable to be substitutes ^ term in which the substit...
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
0b1e74e5832fe56ece290b145299e5975cd7f43be93aaf8f4cc23a6caf6ac924
chicken-mobile/chicken-sdl2-android-builder
joy-ball-event.scm
;; chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2 ;; Copyright © 2013 , 2015 - 2016 . ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions ;; are met: ;; ;; - Redistributions...
null
https://raw.githubusercontent.com/chicken-mobile/chicken-sdl2-android-builder/90ef1f0ff667737736f1932e204d29ae615a00c4/eggs/sdl2/lib/sdl2-internals/accessors/events/joy-ball-event.scm
scheme
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributio...
chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2 Copyright © 2013 , 2015 - 2016 . " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT N...
a12e05811f78a6e0269808e9eef3c6b24401d472705ea340ade39638a8890b88
wireless-net/erlang-nommu
ssh_daemon_channel.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2013 . 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 Public Licen...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/ssh/src/ssh_daemon_channel.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 limitatio...
Copyright Ericsson AB 2013 . 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 " over SSH -module(ssh_daemon_channel). API t...
cd410786b4271906776e15b94cf9cf0a10745f76a7751f6a6a16a98eb794a6ff
rorokimdim/stash
Cipher.hs
module Cipher ( encrypt , decrypt , generateHashSalt , hash , maxEncryptionKeyLength ) where import Control.Monad (unless) import qualified Crypto.Data.Padding as Padding (pad, Format(..)) import qualified Crypto.Simple.CTR as C import qualified Data.ByteString.Base64 as Base64 import qualified Data.ByteS...
null
https://raw.githubusercontent.com/rorokimdim/stash/18bdb25b9d1cb0386daf7a2c93bcb4ef654729d9/src/Cipher.hs
haskell
|Checks if an encryption key in valid. |Computes hash of a value using given salt. Use generateHashSalt to get a good random salt. |Generates a random salt to be used for hashing values.
module Cipher ( encrypt , decrypt , generateHashSalt , hash , maxEncryptionKeyLength ) where import Control.Monad (unless) import qualified Crypto.Data.Padding as Padding (pad, Format(..)) import qualified Crypto.Simple.CTR as C import qualified Data.ByteString.Base64 as Base64 import qualified Data.ByteS...
dc78a356fd1da9efa6718c488c60dacfcbdee3024c69394f16f2efdc5aebfb1e
yzh44yzh/practical_erlang
great_ideas_catalogue.erl
-module(great_ideas_catalogue). -include_lib("stdlib/include/ms_transform.hrl"). -export([init/0, add_idea/5, get_idea/1, ideas_by_author/1, ideas_by_rating/1, get_authors/0]). -record(idea, {id, title, author, rating, description}). init() -> ets:new(great_ideas_table, [set, named_t...
null
https://raw.githubusercontent.com/yzh44yzh/practical_erlang/c9eec8cf44e152bf50d9bc6d5cb87fee4764f609/06_ets/exercise/great_ideas_catalogue.erl
erlang
-module(great_ideas_catalogue). -include_lib("stdlib/include/ms_transform.hrl"). -export([init/0, add_idea/5, get_idea/1, ideas_by_author/1, ideas_by_rating/1, get_authors/0]). -record(idea, {id, title, author, rating, description}). init() -> ets:new(great_ideas_table, [set, named_t...
07a832d216aad92a35644075a9f667fb15351d7baa53f2e506973179f949e306
bufferswap/ViralityEngine
materials-table.lisp
(in-package #:virality) ;; materials-table impl ;;; Internal Materials-table API (defun make-materials-table (&rest init-args) (apply #'make-instance 'materials-table init-args)) (defun %lookup-material (material-name core) "Find a material by its ID in CORE and return a gethash-like values. If the material isn'...
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/core-late/materials-table.lisp
lisp
materials-table impl Internal Materials-table API gameedv makes an initial material they must pass a context to it (so that it can immediately go into core state, etc). export PUBLIC API export PUBLIC API current-mat-name must exist. new-mat-name must not exist. :)
(in-package #:virality) (defun make-materials-table (&rest init-args) (apply #'make-instance 'materials-table init-args)) (defun %lookup-material (material-name core) "Find a material by its ID in CORE and return a gethash-like values. If the material isn't there, return the 'x:missing-material. The return value...
6c2574c277abdf0839ce806a3fcef34024db96706dbdb042f0ac0f116c777722
ds923y/nd4clj
project.clj
(defproject org.clojars.ds923y/nd4clj "0.1.1-SNAPSHOT" :plugins [[lein-cljfmt "0.5.3"]] :description "An implementation of core.matrix protocols with nd4j." :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [net...
null
https://raw.githubusercontent.com/ds923y/nd4clj/2ff38bc473a904f253166d1ad8065e34f7521691/project.clj
clojure
(defproject org.clojars.ds923y/nd4clj "0.1.1-SNAPSHOT" :plugins [[lein-cljfmt "0.5.3"]] :description "An implementation of core.matrix protocols with nd4j." :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [net...
26305ed7349206acaf0f2df48118f1739c3cfd8dd6451ddb3145533c40fc7f16
qitab/bazelisp
c.lisp
Copyright 2015 - 2020 Google LLC ;;; Use of this source code is governed by an MIT - style ;;; license that can be found in the LICENSE file or at ;;; . (in-package :cl-user) (eval-when (:compile-toplevel) (format t "Compile C~%")) (eval-when (:compile-toplevel :load-toplevel :execute) (push 'C *compile-symb...
null
https://raw.githubusercontent.com/qitab/bazelisp/674f05c38585528d7d18e00b0def98493b646510/test/c.lisp
lisp
license that can be found in the LICENSE file or at . yet defined
Copyright 2015 - 2020 Google LLC Use of this source code is governed by an MIT - style (in-package :cl-user) (eval-when (:compile-toplevel) (format t "Compile C~%")) (eval-when (:compile-toplevel :load-toplevel :execute) (push 'C *compile-symbols*)) (format t "Load C~%") (push 'C *load-symbols*) (eval-when...
8f6754ed763591cdd8ce649f9520babfd588bc21e3036f07372c3604aa712328
ivanp7/cl-image2text
conversion.lisp
;;;; conversion.lisp (in-package #:cl-image2text) ( define - conversion blocks ( 1 2 ) ; ; Numeration of cell pixels : ; ; 0 ; ; 1 ( (: mono # \Space ( ) ) (: lw12 # \ ▄ ( 1 ) ) ) ) ( define - conversion blocks ( 2 4 ) ; ; Numeration of cell pixels : ; ; 0 1 ; ; 2 3 ; ; 4 5 ; ...
null
https://raw.githubusercontent.com/ivanp7/cl-image2text/74b08f61d63d90e93c98628c9dd807f7cbff2b83/conversion.lisp
lisp
conversion.lisp ; Numeration of cell pixels : ; 0 ; 1 ; Numeration of cell pixels : ; 0 1 ; 2 3 ; 4 5 ; 6 7 ((:mono #\Space ()) ; Numeration of cell pixels : ; 0 1 2 3 ; 4 5 6 7 ; 8 9 10 11 ; 12 13 14 15 ; 16 17 18 19 ; 20 21 22 23 ; 24 25 26 27 ; 28 29 30 31 `((:mono #\S...
(in-package #:cl-image2text) ( define - conversion blocks ( 1 2 ) ( (: mono # \Space ( ) ) (: lw12 # \ ▄ ( 1 ) ) ) ) ( define - conversion blocks ( 2 4 ) (: qu1 # \ ▝ ( 1 3 ) ) (: qu2 # \ ▗ ( 5 7 ) ) (: qu3 # \ ▖ ( 4 6 ) ) (: qu4 # \ ▘ ( 0 2 ) ) (: # \ ( 1 3 4 6 ) ) (: lw14 # \ ▂ ( 6 7 ) ) (...
462133ad3df61d8abaa68b8a03139ae7cb0950b3695b3c9db7b73732f230d8c5
jakubriegel/clojure-spring
JavaController.clj
(ns cljspring.rest.JavaController (:import (cljspring.service JavaService)) (:gen-class :name ^{org.springframework.web.bind.annotation.RestController {}} cljspring.rest.JavaController :methods [ [^{org.springframework.web.bind.annotation.RequestMapping ["/add"]} add [ ^{org.sp...
null
https://raw.githubusercontent.com/jakubriegel/clojure-spring/4f7689dd0437f4a417aa34420df94f86f58b5689/src/main/clojure/cljspring/rest/JavaController.clj
clojure
(ns cljspring.rest.JavaController (:import (cljspring.service JavaService)) (:gen-class :name ^{org.springframework.web.bind.annotation.RestController {}} cljspring.rest.JavaController :methods [ [^{org.springframework.web.bind.annotation.RequestMapping ["/add"]} add [ ^{org.sp...
a59e20cef8278ece91026e89c34eb36a465813318cd40f7ce93004d8a88f0127
okuoku/nausicaa
test-mpc.sps
;;; Part of : / MP Contents : tests for the MPC numbers ;;;Date: Wed Dec 10, 2008 ;;; ;;;Abstract ;;; ;;; ;;; Copyright ( c ) 2008 , 2009 < > ;;; ;;;This program is free software: you can redistribute it and/or modify ;;;it under the terms of the GNU General Public License as published by the Free Software Founda...
null
https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/mp/tests/test-mpc.sps
scheme
Date: Wed Dec 10, 2008 Abstract This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without eve...
Part of : / MP Contents : tests for the MPC numbers Copyright ( c ) 2008 , 2009 < > the Free Software Foundation , either version 3 of the License , or ( at General Public License for more details . You should have received a copy of the GNU General Public License (import (nausicaa) (compensations) (...
b42c451ea02ef5b5990e6fd6d1a3b1e46a0a33e2273cb943c21f2a3f6040da77
joes-esolangs/smalc
lexer.erl
-file("c:/Program Files/erl-24.0/lib/parsetools-2.3/include/leexinc.hrl", 0). %% The source of this file is part of leex distribution, as such it %% has the same Copyright as the other files in the leex %% distribution. The Copyright is defined in the accompanying file COPYRIGHT . However , the resultant scanner gene...
null
https://raw.githubusercontent.com/joes-esolangs/smalc/082630b4a6177cbe2727201f8f3e1b959f4d12ad/src/lexer.erl
erlang
The source of this file is part of leex distribution, as such it has the same Copyright as the other files in the leex distribution. The Copyright is defined in the accompanying file property of the creator of the scanner and is not covered by that Copyright. User code. This is placed here to allow extra attribut...
-file("c:/Program Files/erl-24.0/lib/parsetools-2.3/include/leexinc.hrl", 0). COPYRIGHT . However , the resultant scanner generated by is the -module(lexer). -export([string/1,string/2,token/2,token/3,tokens/2,tokens/3]). -export([format_error/1]). -file("src/lex/lexer.xrl", 22). -file("c:/Program Files/erl-24.0...
8895826c744397620b50ecd6fd64bdec965cebd3f25dd5f4bee76ad253fff7cc
arichiardi/replumb
test_helpers.cljs
(ns replumb.test-helpers (:require cljs.pprint replumb.core replumb.repl replumb.ast goog.Promise) (:require-macros cljs.test)) (defn read-eval-call-promise "Return a promise that resolves with the result of accumulating the actual call to replumb.repl/read-eval-...
null
https://raw.githubusercontent.com/arichiardi/replumb/dde2228f2e364c3bafdf6585bb1bc1c27a3e336c/test/cljs/replumb/test_helpers.cljs
clojure
(ns replumb.test-helpers (:require cljs.pprint replumb.core replumb.repl replumb.ast goog.Promise) (:require-macros cljs.test)) (defn read-eval-call-promise "Return a promise that resolves with the result of accumulating the actual call to replumb.repl/read-eval-...
74b459d272a11d86d2e1ead4d832a16537b6ef8cfd146b6b51536fa5773f9a80
noinia/hgeometry
BezierSpline.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE UndecidableInstances # -------------------------------------------------------------------------------- -- | Module : Geometry . Copyright : ( C ) -- License : see the LICENSE file Maintainer : --------------------------------------------...
null
https://raw.githubusercontent.com/noinia/hgeometry/ddc7d456cbee3e2cd998857780089e1469ba81ba/hgeometry/src/Geometry/BezierSpline.hs
haskell
# LANGUAGE BangPatterns # ------------------------------------------------------------------------------ | License : see the LICENSE file ------------------------------------------------------------------------------ import Debug.Trace --------------------------------------------------------------------...
# LANGUAGE UndecidableInstances # Module : Geometry . Copyright : ( C ) Maintainer : module Geometry.BezierSpline( BezierSpline (BezierSpline, Bezier2, Bezier3) , controlPoints , fromPointSeq , endPoints , Geometry.BezierSpline.reverse , evaluate , split , splitMany , sp...
d5d49f0b4c33a6fcbec60c318a614f4a4758a82caf4872ded716f4996f72b553
zepto-lang/zepto
CharStrPrimitives.hs
module Zepto.Primitives.CharStrPrimitives where import Data.Char import Data.List (findIndex) import Data.List.Utils import Control.Monad.Except import Zepto.Types import Zepto.Primitives.ListPrimitives stringToList :: LispVal -> ThrowsError LispVal stringToList (SimpleVal (String s)) = return $ List $ fmap (fromSimp...
null
https://raw.githubusercontent.com/zepto-lang/zepto/564fc1db72530040100d55538f49fec6fd9ff300/src/Zepto/Primitives/CharStrPrimitives.hs
haskell
module Zepto.Primitives.CharStrPrimitives where import Data.Char import Data.List (findIndex) import Data.List.Utils import Control.Monad.Except import Zepto.Types import Zepto.Primitives.ListPrimitives stringToList :: LispVal -> ThrowsError LispVal stringToList (SimpleVal (String s)) = return $ List $ fmap (fromSimp...
efd9898e9c22ed4dff9876a29eaacff7d29527f1b132203ae794a13d59c58d7f
vale1410/bule
Ground.ml
open Printf include Types.AST open T module P = Print module Print = struct let id x = x let cname = id let eoperator = function | Add -> "+" | Div -> "/" | Mult -> "*" | Max -> failwith "max operation not supported with gringo" | Min -> failwith "min operation not supported with gringo" ...
null
https://raw.githubusercontent.com/vale1410/bule/37f56381c278751490cbb344101220f74652d6c9/src/lib/Ground.ml
ocaml
open Printf include Types.AST open T module P = Print module Print = struct let id x = x let cname = id let eoperator = function | Add -> "+" | Div -> "/" | Mult -> "*" | Max -> failwith "max operation not supported with gringo" | Min -> failwith "min operation not supported with gringo" ...
72c0dec4d0f80b40a3c92d8c94ac6c3c1deaa4f0adfe619ab14bb5f9a439f280
CryptoKami/cryptokami-core
Util.hs
{-# LANGUAGE Rank2Types #-} | Various utilities for Wallet . module Pos.Wallet.Web.Util ( getAccountMetaOrThrow , getWalletAccountIds , getAccountAddrsOrThrow , getWalletAddrMetas , getWalletAddrs , getWalletAddrsDetector , decodeCTypeOrFail , getWalletAssuredDepth , testOnlyEndp...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/wallet/src/Pos/Wallet/Web/Util.hs
haskell
# LANGUAGE Rank2Types #
| Various utilities for Wallet . module Pos.Wallet.Web.Util ( getAccountMetaOrThrow , getWalletAccountIds , getAccountAddrsOrThrow , getWalletAddrMetas , getWalletAddrs , getWalletAddrsDetector , decodeCTypeOrFail , getWalletAssuredDepth , testOnlyEndpoint ) where import ...
a23880f00b8eb1b45ab2c8d70d1e7ae5bb5fd16bfc16d375ce3ef9e6fb055c56
kitlang/kit
CExpr.hs
# OPTIONS_GHC -fwarn - incomplete - patterns # module Kit.Compiler.Generators.C.CExpr ( cDecl, ctype, cIdent, u, transpileExpr, transpileStmt, initializerExpr ) where import Data.List import Numeric import Language.C import Language.C.Data.Position import Kit.Ast import Kit.Error import Kit.NameMangling...
null
https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Compiler/Generators/C/CExpr.hs
haskell
( [ u $ CEnumType $ u $ CEnum Nothing (Just ) [] ] , [] ) ctype (t) = throwk $ InternalError ("Unhandled ctype: " ++ show t) Nothing what a hack TODO: validate
# OPTIONS_GHC -fwarn - incomplete - patterns # module Kit.Compiler.Generators.C.CExpr ( cDecl, ctype, cIdent, u, transpileExpr, transpileStmt, initializerExpr ) where import Data.List import Numeric import Language.C import Language.C.Data.Position import Kit.Ast import Kit.Error import Kit.NameMangling...
13a087bed37d4cd7d1c90c7d672019a2e9730fcfbc4973a1e15b26628b963800
inria-parkas/sundialsml
cvsAtmDisp_ASAi_kry_bbd_p.ml
* ----------------------------------------------------------------- * $ Revision : 1.3 $ * $ Date : 2010/12/14 22:15:31 $ * ----------------------------------------------------------------- * Programmer(s ): and @ LLNL * ----------------------------------------------------------------- * OCaml ...
null
https://raw.githubusercontent.com/inria-parkas/sundialsml/a1848318cac2e340c32ddfd42671bef07b1390db/examples/cvodes/parallel/cvsAtmDisp_ASAi_kry_bbd_p.ml
ocaml
*------------------------------------------------------------------ * Constants *------------------------------------------------------------------ Domain definition no. of divisions in x dir. no. of divisions in x dir. no. of procs. in x dir. no. of procs. in z dir. no. of procs. in z dir. ...
* ----------------------------------------------------------------- * $ Revision : 1.3 $ * $ Date : 2010/12/14 22:15:31 $ * ----------------------------------------------------------------- * Programmer(s ): and @ LLNL * ----------------------------------------------------------------- * OCaml ...
dabae3c6bc208c3e291bf723f5055de78b1136e6108220f725da289cea1f8832
rsnikhil/Forvis_RISCV-ISA-Spec
PIPE.hs
# Language ExistentialQuantification , TemplateHaskell # module PIPE(PIPE_Policy, -- TODO: Maybe this is not needed? PolicyPlus(..), askPolicy, load_pipe_policy, TagSet, P, Color, APT : These might be useful one day ( even if not for autotestin...
null
https://raw.githubusercontent.com/rsnikhil/Forvis_RISCV-ISA-Spec/0c5590a12f4b39644d0497fa6285ad5e33003dfc/micropolicies/PIPE.hs
haskell
TODO: Maybe this is not needed? Still need to fix to translate tags to fully qualified form. mkTagSet, import Memory --------------------------------------------------------------- This type is defined here rather than within specific policies / because, similarly, the initNextColor field becomes an argument to ...
# Language ExistentialQuantification , TemplateHaskell # PolicyPlus(..), askPolicy, load_pipe_policy, TagSet, P, Color, APT : These might be useful one day ( even if not for autotesting ) Should wait until integrating 's new parser , which su...
d1eebdb152df29b1e33abcca78d9210e22fdc151593674a0426f3af9dcc5825a
bennn/dissertation
aux.rkt
#lang typed/racket (require "base-types.rkt") (require require-typed-check) (require/typed/check "tetras.rkt" [build-tetra-blocks (-> Color Real Real Real Real Real Real Real Real Real Real Tetra)] ) (provide list-pick-random neg-1 tetras) (define r (make-pseudo-random-generator)) (parameterize ((current-pseu...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/tetris/typed/aux.rkt
racket
#lang typed/racket (require "base-types.rkt") (require require-typed-check) (require/typed/check "tetras.rkt" [build-tetra-blocks (-> Color Real Real Real Real Real Real Real Real Real Real Tetra)] ) (provide list-pick-random neg-1 tetras) (define r (make-pseudo-random-generator)) (parameterize ((current-pseu...
20d08f56a174b9d5c629f49f8316b48fba3a0eedc6587d7c4cc778421f5c69a8
agda/agda
InstanceArguments.hs
# LANGUAGE NondecreasingIndentation # module Agda.TypeChecking.InstanceArguments ( findInstance , isInstanceConstraint , shouldPostponeInstanceSearch , postponeInstanceConstraints , getInstanceCandidates ) where import Control.Monad ( forM ) import Control.Monad.Except ( MonadError(..) ) import Con...
null
https://raw.githubusercontent.com/agda/agda/5d251d98739480692350221442e48d9f246c83e6/src/full/Agda/TypeChecking/InstanceArguments.hs
haskell
instance only # SOURCE # # SOURCE # | Compute a list of instance candidates. 'Nothing' if target type or any context type is a meta, error if type is not eligible for instance search. get a list of variables with their type, relative to current context Context variables with their types lifted to live in the f...
# LANGUAGE NondecreasingIndentation # module Agda.TypeChecking.InstanceArguments ( findInstance , isInstanceConstraint , shouldPostponeInstanceSearch , postponeInstanceConstraints , getInstanceCandidates ) where import Control.Monad ( forM ) import Control.Monad.Except ( MonadError(..) ) import Con...
10e68b560acf910a6ead96e7e8824ef8f906e26812b3913f24103fc919141b5b
aantron/lambdasoup
soup.mli
This file is part of Lambda Soup , released under the MIT license . See LICENSE.md for details , or visit . LICENSE.md for details, or visit . *) * Easy functional HTML scraping and manipulation . Lambda Soup is an HTML data extraction and analysis library . It supports CSS selectors , DOM trav...
null
https://raw.githubusercontent.com/aantron/lambdasoup/13aa9bcb40924c1919d70ef2fc78a719bb9de3d0/src/soup.mli
ocaml
Print the page title. Print the targets of all links. Print the contents of all its items. Find all subsequent sibling elements of the same list. Find all previous sibling elements instead. ... * {2 Types} * Sequence of nodes. This is always instantiated as either [element nodes] or or [general nodes]....
This file is part of Lambda Soup , released under the MIT license . See LICENSE.md for details , or visit . LICENSE.md for details, or visit . *) * Easy functional HTML scraping and manipulation . Lambda Soup is an HTML data extraction and analysis library . It supports CSS selectors , DOM trav...
28cb532ffdfefb19257ece7037d4658b815ec989427b29fee2f3cc98981dddf3
openbadgefactory/salava
translator.clj
(ns salava.core.translator (:require [clojure.tools.logging :as log] [clojurewerkz.propertied.properties :refer [properties->map map->properties]] [clojure.java.io :as io] [clojure.data] [salava.core.helper :refer [dump plugin-str]] [salava.core.util :as uti...
null
https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/clj/salava/core/translator.clj
clojure
(ns salava.core.translator (:require [clojure.tools.logging :as log] [clojurewerkz.propertied.properties :refer [properties->map map->properties]] [clojure.java.io :as io] [clojure.data] [salava.core.helper :refer [dump plugin-str]] [salava.core.util :as uti...
2db28813c335ad63ba8672818ea303c62f963560ff0e9dce045690acf1f56f76
a0-prw/simple-currency
currency-info.lisp
(in-package :cies) (defvar *currency-data* (make-hash-table :test #'equalp)) (defclass currency-data () ((country :initarg :country :reader ccy-country) (name :initarg :name :type 'string :reader ccy-name) (acode :initarg :acode :type 'string :reader ccy-acode) (ncode :initarg :ncode :type 'string :reader...
null
https://raw.githubusercontent.com/a0-prw/simple-currency/4619dc6e03db5d8aeb42bba9313393bfd5b03f52/currency-info.lisp
lisp
(defun build-currency-data-hash ()
(in-package :cies) (defvar *currency-data* (make-hash-table :test #'equalp)) (defclass currency-data () ((country :initarg :country :reader ccy-country) (name :initarg :name :type 'string :reader ccy-name) (acode :initarg :acode :type 'string :reader ccy-acode) (ncode :initarg :ncode :type 'string :reader...
43d256fc2679a0f01f359eb45e64b6c02e28f82737c7f063ef59a28c6b47d4e9
ngrunwald/datasplash
bq_test.clj
(ns datasplash.bq-test (:require [clojure.test :refer [are deftest is testing]] [datasplash.bq :as sut])) (deftest auto-parse-val-test (testing "num-string->long?" (is (= 3134 (sut/auto-parse-val "3134")))) (testing "string->string?" (is (= "asd" (sut/auto-parse-val "asd")))) (testing "other->oth...
null
https://raw.githubusercontent.com/ngrunwald/datasplash/2275ea15b6c906a234b4455cd94926d8b2d54b41/test/datasplash/bq_test.clj
clojure
TODO: add java.util.Date
(ns datasplash.bq-test (:require [clojure.test :refer [are deftest is testing]] [datasplash.bq :as sut])) (deftest auto-parse-val-test (testing "num-string->long?" (is (= 3134 (sut/auto-parse-val "3134")))) (testing "string->string?" (is (= "asd" (sut/auto-parse-val "asd")))) (testing "other->oth...
04d5202789d840fd012282cc55db5a73797d70a049722cfebd03aa35b133eb23
hidaris/thinking-dumps
top.rkt
#lang racket/base (require rackunit "ast.rkt" "parser.rkt" "env.rkt" "interp.rkt" "tests.rkt") (define run (lambda (str) (value-of-program (parse str)))) (define (test-all) (for ([test-item test-list]) (let ([the-name (car test-item)]) ;; if answer is er...
null
https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap3/3-08/top.rkt
racket
if answer is error, check it and report!
#lang racket/base (require rackunit "ast.rkt" "parser.rkt" "env.rkt" "interp.rkt" "tests.rkt") (define run (lambda (str) (value-of-program (parse str)))) (define (test-all) (for ([test-item test-list]) (let ([the-name (car test-item)]) (if (equal? (caddr...
b187406238a5357be0515fbd53980b4f1cf1f8866c95120def37c44e7e72d424
potatosalad/erlang-jose
jose_jws_alg_rsa_pkcs1_v1_5_props.erl
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- %% vim: ts=4 sw=4 ft=erlang noet -module(jose_jws_alg_rsa_pkcs1_v1_5_props). -include_lib("public_key/include/public_key.hrl"). -include_lib("proper/include/proper.hrl"). % -compile(export_all). base64url_binary() -> ?LET(B...
null
https://raw.githubusercontent.com/potatosalad/erlang-jose/43d3db467f909bbc932bd663ddcb1af93180dfd3/test/property_test/jose_jws_alg_rsa_pkcs1_v1_5_props.erl
erlang
vim: ts=4 sw=4 ft=erlang noet -compile(export_all). pos_integer().
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- -module(jose_jws_alg_rsa_pkcs1_v1_5_props). -include_lib("public_key/include/public_key.hrl"). -include_lib("proper/include/proper.hrl"). base64url_binary() -> ?LET(Binary, binary(), jose_jwa_base64url:encode(Binary)). ...
07c026d7dbf3d9635156783a1e110446991967da075ebee4494d497635b9ab47
jackfirth/rebellion
option.rkt
#lang racket/base (require racket/contract/base) (provide present) (provide (contract-out [option? predicate/c] [option-case (-> option? #:present (-> any/c any/c) #:absent (-> any/c) any/c)] [option-map (-> option? (-> any/c any/c) option?)] [option-filter (-> option? predicate/c option?)] [option-fla...
null
https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/base/option.rkt
racket
@------------------------------------------------------------------------------
#lang racket/base (require racket/contract/base) (provide present) (provide (contract-out [option? predicate/c] [option-case (-> option? #:present (-> any/c any/c) #:absent (-> any/c) any/c)] [option-map (-> option? (-> any/c any/c) option?)] [option-filter (-> option? predicate/c option?)] [option-fla...
dc8abc4c9e9cc4c77ee7c56ee03f595d23fd74dbe240814beda9e630da458afa
DKurilo/hackerrank
solution.hs
# LANGUAGE FlexibleInstances , UndecidableInstances # # LANGUAGE DuplicateRecordFields , UnicodeSyntax # module Main where import Prelude.Unicode import System.IO import Data.Maybe import qualified Data.List as DL import Data.List.Split import Control.Monad import System.IO import Debug.Trace class Queue a where ...
null
https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/simple-text-editor/solution.hs
haskell
# LANGUAGE FlexibleInstances , UndecidableInstances # # LANGUAGE DuplicateRecordFields , UnicodeSyntax # module Main where import Prelude.Unicode import System.IO import Data.Maybe import qualified Data.List as DL import Data.List.Split import Control.Monad import System.IO import Debug.Trace class Queue a where ...
33163a2cee003c90d56fed1349cc08713e8ae7588c45b70dfcdfed16c4848f3f
waddlaw/TAPL
Type.hs
{-# LANGUAGE OverloadedStrings #-} module Language.FJ.Type ( Program, ClassTable, Term (..), ClassDef (..), ConstDef (..), MethodDef (..), mkMethodDef, Class, mkClass, getClassName, Method, mkMethod, getMethodName, Field, mkField, getFieldName, Var, ...
null
https://raw.githubusercontent.com/waddlaw/TAPL/94576e46821aaf7abce6d1d828fc3ce6d05a40b8/subs/featherweight-java/src/Language/FJ/Type.hs
haskell
# LANGUAGE OverloadedStrings # | Class Table | Class Declaration Self class name Super class name Constructor declarations Method declarations | Constructor Declarations Constructor name | Method Declarations The name of the return type (Class) method name Method arguments (Argument type and argument variab...
module Language.FJ.Type ( Program, ClassTable, Term (..), ClassDef (..), ConstDef (..), MethodDef (..), mkMethodDef, Class, mkClass, getClassName, Method, mkMethod, getMethodName, Field, mkField, getFieldName, Var, mkVar, getVarName, ) where ...
1a71f8e7db2eb3bbb157ba428430a009973590fe083b310b3f370297911e6794
ucsd-progsys/liquidhaskell
ReWrite5.hs
{-@ LIQUID "--expect-error-containing=parameter \"xs\" contains an inner refinement" @-} module ReWrite5 where {-@ LIQUID "--reflection" @-} {-@ LIQUID "--ple" @-} {-@ infix ++ @-} import Prelude hiding (filter) @ reflect lt5 @ lt5 :: Int -> Bool lt5 x = x < 5 {-@ reflect filter @-} filter _ [] = [] filter p (x...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/errors/ReWrite5.hs
haskell
@ LIQUID "--expect-error-containing=parameter \"xs\" contains an inner refinement" @ @ LIQUID "--reflection" @ @ LIQUID "--ple" @ @ infix ++ @ @ reflect filter @ Reject inner refinements @ rewriteWith bad [rw] @ @ bad :: xs : [Int] -> { filter lt5 xs = [] } @
module ReWrite5 where import Prelude hiding (filter) @ reflect lt5 @ lt5 :: Int -> Bool lt5 x = x < 5 filter _ [] = [] filter p (x:xs) = if p x then x:(filter p xs) else filter p xs @ rw : : xs : [ { v : Int | v > 5 } ] - > { filter lt5 xs = [ ] } @ rw :: [Int] -> () rw [] = () rw (_:xs) = rw xs bad :: ...
a00e6e3cbdd03bb0aada0b77c8b4d26078d2ec1d12d53887448e26bd7aa6552a
qkrgud55/ocamlmulti
packed1.ml
let () = Api.reg_mod "Packed1" let bla = Sys.argv.(0) ^ "XXX" let mykey = Sys.argv.(0)
null
https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/testsuite/tests/lib-dynlink-native/packed1.ml
ocaml
let () = Api.reg_mod "Packed1" let bla = Sys.argv.(0) ^ "XXX" let mykey = Sys.argv.(0)
6f4c1341ffcd4567c64c172ee50b8055a2e0a8b6cc170330b185f0a71ca56ef6
namin/biohacker
atms.lisp
;;; -*- Mode: LISP; Syntax: Common-lisp; -*- Assumption - based truth maintenance system , version 61 of 7/21/92 . Copyright ( c ) 1986 - 1993 , , Northwestern University , and , the Xerox Corporation . ;;; All rights reserved. ;;; See the file legal.txt for a paragraph stating scope of permission ;;; a...
null
https://raw.githubusercontent.com/namin/biohacker/6b5da4c51c9caa6b5e1a68b046af171708d1af64/BPS/atms/atms.lisp
lisp
-*- Mode: LISP; Syntax: Common-lisp; -*- All rights reserved. See the file legal.txt for a paragraph stating scope of permission and disclaimer of warranty. The above copyright notice and that paragraph must be included in any separate copy of this file. Definitions. unique namer for nodes. unique namer for ju...
Assumption - based truth maintenance system , version 61 of 7/21/92 . Copyright ( c ) 1986 - 1993 , , Northwestern University , and , the Xerox Corporation . (in-package :COMMON-LISP-USER) (defstruct (atms (:PRINT-FUNCTION print-atms)) (title nil) List of all atms nodes . List of all atms assum...
59daa4f71e218b1468fd2e358bf83f384d0e6d9e8dadcc428bff06d9cc91cdc6
phantomics/seed
extension.lisp
;;;; extension.lisp (in-package #:seed.ui-model.react) (export 'text-view-mode)
null
https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/seed.ui-spec.form.mode-text/extension.lisp
lisp
extension.lisp
(in-package #:seed.ui-model.react) (export 'text-view-mode)
c846df29b63fd4e028f87c1b680b61f55ffb3a465dc572dc463af89d1df63617
simingwang/emqx-plugin-kafkav5
net_kernel.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2022 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/kernel-8.3/src/net_kernel.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 1996 - 2022 . 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(net_kernel). -behaviour(gen_server). -define(nodedown(N, State), verbose({?MODULE, ?LINE, nodedown, N}, 1, ...
cb1402c921b47f81788b77f250e25c007704e8f9c67aa081a4e47d435baee5d2
akiomik/dtx2midi
DTX.hs
{-# LANGUAGE OverloadedStrings #-} module DTX2MIDI.DTX ( DTX (..), Line (..), Object (..), ObjectValue (..), Header (..), Key (..), Channel (..), Comment (..), Note (..), object, header, comment, isHeader, isComment, isObject, isBPM, isBaseBPM, isNo...
null
https://raw.githubusercontent.com/akiomik/dtx2midi/12eb9a38eea45850b1d03e6fbbcd99f953d8e6ed/src/DTX2MIDI/DTX.hs
haskell
# LANGUAGE OverloadedStrings # TODO: Add support for tempo change event and measure length ratio change event
module DTX2MIDI.DTX ( DTX (..), Line (..), Object (..), ObjectValue (..), Header (..), Key (..), Channel (..), Comment (..), Note (..), object, header, comment, isHeader, isComment, isObject, isBPM, isBaseBPM, isNoteObject, headers, objects,...
1e98dc3e9bf341e325e132d6236b40c88969ef55c6347947be6db4613a7f14a6
mitchellwrosen/planet-mitchell
Unboxed.hs
module Vector.Unboxed ( module Data.Vector.Unboxed ) where import Data.Vector.Unboxed
null
https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Vector/Unboxed.hs
haskell
module Vector.Unboxed ( module Data.Vector.Unboxed ) where import Data.Vector.Unboxed
5c38e41c7e3a5b90325f9e2b1f44b26e2222cffeab70d2e003b8d85d4edc0033
shenxs/about-scheme
ufo-land.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ufo-land) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe....
null
https://raw.githubusercontent.com/shenxs/about-scheme/d458776a62cb0bbcbfbb2a044ed18b849f26fd0f/HTDP/ufo-land.rkt
racket
about the language level of this file in a form that our tools can easily process. interpretation height of UFO (from top) constants: visual constants: WorldState -> WorldState WorldState -> WorldState computes next location of UFO WorldState -> Image
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ufo-land) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(...
ffee7398cf231fbdf0a21db75de9cfae5a21a8a168c1ce7c70a2c054a64f8afc
herbelin/coq-hh
cbv.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/pretyping/cbv.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** *** Call by value reduction *** rel...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Util open Pp open Term o...
6957465831771a03ee231058e6e421af5e0500150a4befd6d139c15f62b31db9
waivio/cl3
NbodyMassiv.hs
# LANGUAGE ViewPatterns # # LANGUAGE ScopedTypeVariables # # LANGUAGE PartialTypeSignatures # # LANGUAGE InstanceSigs # import Algebra.Geometric.Cl3 import Data.Massiv.Array as A import Control.Monad (replicateM_,when) import Data.Time.Clock.POSIX (getPOSIXTime) import Foreign.Ptr (Ptr, castPtr, plusPtr) import For...
null
https://raw.githubusercontent.com/waivio/cl3/974b54b40325584f81b1d5c2382c8730ad7ad77e/benchmarks/NbodyMassiv.hs
haskell
generate immutible Massiv array of the planets position generate immutible Massiv array of the planets velocity generate immutible Massiv array of the planets mass copy to a mutible Massiv array of the planets position copy to a mutible Massiv array of the planets velocity Size of the velocity array size of the ...
# LANGUAGE ViewPatterns # # LANGUAGE ScopedTypeVariables # # LANGUAGE PartialTypeSignatures # # LANGUAGE InstanceSigs # import Algebra.Geometric.Cl3 import Data.Massiv.Array as A import Control.Monad (replicateM_,when) import Data.Time.Clock.POSIX (getPOSIXTime) import Foreign.Ptr (Ptr, castPtr, plusPtr) import For...
65b411e50e25bbeac656277f0b5a816b86afe44050d8ef361bc9628d28b12841
hatsugai/SyncStitch
eventCol.ml
open Printf module EventSet = struct module X = Set.Make ( struct type t = Event.t let compare = compare end) include X let hash s = fold (fun x acc -> acc + Hashtbl.hash x) s 0 let show s = let str = fold (fun u str -> ...
null
https://raw.githubusercontent.com/hatsugai/SyncStitch/cbf0d28aa77a6f4579233ff64227fd7150e300e0/src/eventCol.ml
ocaml
open Printf module EventSet = struct module X = Set.Make ( struct type t = Event.t let compare = compare end) include X let hash s = fold (fun x acc -> acc + Hashtbl.hash x) s 0 let show s = let str = fold (fun u str -> ...
da10422975a23a9bb8c64f1f21d43ba35d2c3e8cebe1a3f01820a23535986d9c
RBornat/jape
japeenv.mli
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . 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 ver...
null
https://raw.githubusercontent.com/RBornat/jape/afe9f207e89e965636b43ef8fad38fd1f69737ae/distrib/camlengine/japeenv.mli
ocaml
Variables now have names. Their values are still strings. guardedjapevars can't be set unless the guard says true. * example: vars which can be set until there is something in the thing store
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . 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 ver...
f904ec271c59d6b67228c5762860cf3c89982784a474cc3e95a7a27c3371b4a8
jordanthayer/ocaml-search
greedy_bootstrap.ml
* @author jtd7 @since 2012 - 09 - 30 Bootstrapping on top of greedy search @author jtd7 @since 2012-09-30 Bootstrapping on top of greedy search *) type 'a node = { data : 'a; g : float; f : float; h : float; d : float; depth : int; mutable pos : int; parent : 'a node; } ...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/adaptive/greedy_bootstrap.ml
ocaml
* takes a function to be applied to the data payload such as the goal-test or the domain heuristic and wraps it so that it can be applied to the entire node * Unwraps a solution which is in the form of a search node and presents it in the format the domain expects it, which is domain data follo...
* @author jtd7 @since 2012 - 09 - 30 Bootstrapping on top of greedy search @author jtd7 @since 2012-09-30 Bootstrapping on top of greedy search *) type 'a node = { data : 'a; g : float; f : float; h : float; d : float; depth : int; mutable pos : int; parent : 'a node; } ...
a07737d0aab56b63748fe4a203798c04ffd32cd80101289ded17bdf87a797de8
benoitc/mochicow
mochi_keepalive_handler.erl
-module(mochi_keepalive_handler). -export([init/3, loop/1]). %% internal export (so hibernate can reach it) -export([resume/2]). -define(LOOP, {?MODULE, loop}). init(_, _, _) -> {upgrade, protocol, mochicow_upgrade}. loop(Req) -> Path = Req:get(path), case lists:prefix("/keepalive", Path) of t...
null
https://raw.githubusercontent.com/benoitc/mochicow/901684759b63c9a3de152d81370d4d42b600a9c4/examples/upgrade_demo/src/mochi_keepalive_handler.erl
erlang
internal export (so hibernate can reach it) the "reentry" is a continuation -- what @mochiweb_http@ needs to do to start its loop back at the top here we could send a message to some other process and hope to get an interesting message back after a while. for simplicity let's just send ourselves a message after ...
-module(mochi_keepalive_handler). -export([init/3, loop/1]). -export([resume/2]). -define(LOOP, {?MODULE, loop}). init(_, _, _) -> {upgrade, protocol, mochicow_upgrade}. loop(Req) -> Path = Req:get(path), case lists:prefix("/keepalive", Path) of true -> Reentry = mochiweb_http:reen...