_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
9bfc621d73b980666226c89340fba9e72a5ede4d11042a868f962e9d838aa4ad
sondresl/AdventOfCode
Day14.hs
# LANGUAGE TupleSections # module Day14 where import Lib (iterateN, freqs, zipWithTail) import Data.Maybe (fromJust) import Data.Function (on) import Data.List.Extra (splitOn) import Data.Map (Map) import qualified Data.Map as Map type Rules = Map (Char, Char) Char type Count = Map (Char, Char) Integer | Replace ...
null
https://raw.githubusercontent.com/sondresl/AdventOfCode/92199f74edb0b898e3cab03a10003b3c40923e71/2021/Haskell/src/Day14.hs
haskell
# LANGUAGE TupleSections # module Day14 where import Lib (iterateN, freqs, zipWithTail) import Data.Maybe (fromJust) import Data.Function (on) import Data.List.Extra (splitOn) import Data.Map (Map) import qualified Data.Map as Map type Rules = Map (Char, Char) Char type Count = Map (Char, Char) Integer | Replace ...
911ad21510804be5dcdddb96d65584e700c493c2f2f52570fe53d1e44879b9b1
elektronaut/advent-of-code
day12.clj
(ns advent-of-code.2022.12 (:require [clojure.string :as str])) (def inf Double/POSITIVE_INFINITY) (defn elevation [s] (let [char (first s)] (case char \S 1 \E 26 (- (int char) 96)))) (defn coordinates [grid] (for [x (range 0 (count (nth grid 0))) y (range 0 (count grid))] [y ...
null
https://raw.githubusercontent.com/elektronaut/advent-of-code/edebf7cfeb2993120056b0ae30a09bb1bccdf72e/2022/day12/day12.clj
clojure
(ns advent-of-code.2022.12 (:require [clojure.string :as str])) (def inf Double/POSITIVE_INFINITY) (defn elevation [s] (let [char (first s)] (case char \S 1 \E 26 (- (int char) 96)))) (defn coordinates [grid] (for [x (range 0 (count (nth grid 0))) y (range 0 (count grid))] [y ...
81966946dcdc4f18dca87984b16e8900a1c32e36992db284fc3887c93cc9f596
ghollisjr/cl-ana
uniform-binning.lisp
cl - ana is a Common Lisp data analysis library . Copyright 2013 , 2014 ;;;; This file is part of cl - ana . ;;;; ;;;; cl-ana is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the ...
null
https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/histogram/uniform-binning.lisp
lisp
cl-ana is free software: you can redistribute it and/or modify it (at your option) any later version. cl-ana is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Lice...
cl - ana is a Common Lisp data analysis library . Copyright 2013 , 2014 This file is part of cl - ana . under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License ...
b47698ad87a72683396a929aa12bf86bde018bb7d3910f2db01f2125535700d1
ruHaskell-learn/lhx
Browser.hs
module Lhx.Browser where import Control.Monad (void) import Control.Concurrent import Network.Socket.Free (getFreePort) import Network.Socket.Wait (waitWith) import System.Process withBrowserOnFreePort :: (Int -> IO ()) -> IO () withBrowserOnFreePort serveOn = do port <- getFreePort void $ forkIO do waitWith ...
null
https://raw.githubusercontent.com/ruHaskell-learn/lhx/b90540cf8b9aa0531a421e41b0ab3da3fd5d75f2/lib-browser/Lhx/Browser.hs
haskell
module Lhx.Browser where import Control.Monad (void) import Control.Concurrent import Network.Socket.Free (getFreePort) import Network.Socket.Wait (waitWith) import System.Process withBrowserOnFreePort :: (Int -> IO ()) -> IO () withBrowserOnFreePort serveOn = do port <- getFreePort void $ forkIO do waitWith ...
0e67f4d5a425de5799d6577e03e03541c4073358903e7646c0175a3c1367cca2
liamoc/holbert
Unification.hs
# LANGUAGE FlexibleContexts , OverloadedStrings # module Unification (unifier, fresh, UnifyM, runUnifyM, UnifyError) where import qualified Miso.String as MS import Control.Monad import Control.Monad.State import Control.Monad.Trans import Control.Monad.Except import qualified Data.Map.Strict as M import Data.Maybe...
null
https://raw.githubusercontent.com/liamoc/holbert/2f349f97188d2370780e729abd23b18af7221a58/Unification.hs
haskell
"Unification Error (rigid, rigid)"
# LANGUAGE FlexibleContexts , OverloadedStrings # module Unification (unifier, fresh, UnifyM, runUnifyM, UnifyError) where import qualified Miso.String as MS import Control.Monad import Control.Monad.State import Control.Monad.Trans import Control.Monad.Except import qualified Data.Map.Strict as M import Data.Maybe...
d4bfaa7221e38c09842bbd8a83130fb6673ce8a38707fa946ee2d7843e0c8cf3
inria-parkas/sundialsml
showball.mli
val start : bool -> float -> float array * float array -> unit val show : (float * float) -> unit val stop : unit -> unit
null
https://raw.githubusercontent.com/inria-parkas/sundialsml/0c46b0c6c067677af6ef8006260b9e697cc0562b/examples/ocaml/ball/showball.mli
ocaml
val start : bool -> float -> float array * float array -> unit val show : (float * float) -> unit val stop : unit -> unit
d9f5f04fe2964a73fe278e733b2f56638dfa4b43b9f013b9fb627276c52c8556
nuvla/api-server
user_username_password_lifecycle_test.clj
(ns sixsq.nuvla.server.resources.user-username-password-lifecycle-test (:require [clojure.data.json :as json] [clojure.test :refer [deftest is use-fixtures]] [peridot.core :refer [content-type header request session]] [ring.util.codec :as rc] [sixsq.nuvla.server.app.params :as p] [sixsq.nuvla....
null
https://raw.githubusercontent.com/nuvla/api-server/d1291d0499cd33ce3b331db84ea00f6e01c1b1b5/code/test/sixsq/nuvla/server/resources/user_username_password_lifecycle_test.clj
clojure
user collection query should succeed but be empty for all users create a new user; fails without reference create with invalid template fails create with bad parameters fails create user, username-password template is only accessible by admin verify the ACL of the user user should have all rights verify name at...
(ns sixsq.nuvla.server.resources.user-username-password-lifecycle-test (:require [clojure.data.json :as json] [clojure.test :refer [deftest is use-fixtures]] [peridot.core :refer [content-type header request session]] [ring.util.codec :as rc] [sixsq.nuvla.server.app.params :as p] [sixsq.nuvla....
c763c8c54497cc34d25a8762d033b2cb37b2afbcc845f90ad85d07c4718b9907
sbcl/sbcl
alloc.lisp
;;;; allocation VOPs for the x86-64 This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the public domain and i...
null
https://raw.githubusercontent.com/sbcl/sbcl/ce126d3512f8146164c64353db4f879f5513a02b/src/compiler/x86-64/alloc.lisp
lisp
allocation VOPs for the x86-64 more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. allocation helpers Most allocation is done by inline code with sometimes help from the C alloc() function by ...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB-VM") (defun tagify (result base lowtag) (if (eql lowtag 0) (inst mov result base) (inst lea...
41730dd12897d90c41998b36da506c1118e83dc0491ab4490934d67c7a4aebbc
dterei/SafeHaskellExamples
Main.hs
# LANGUAGE Trustworthy # # LANGUAGE StandaloneDeriving # module Main where import Data.Coerce import safe Set newtype MyInt = MyInt Int deriving (Eq, Show) instance Ord MyInt where (MyInt x) <= (MyInt y) = y <= x class IntIso t where intIso : : Set t - > Set Int -- deriving instance IntIso MInt main ::...
null
https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/roles/Main.hs
haskell
# LANGUAGE Trustworthy # # LANGUAGE StandaloneDeriving # module Main where import Data.Coerce import safe Set newtype MyInt = MyInt Int deriving (Eq, Show) instance Ord MyInt where (MyInt x) <= (MyInt y) = y <= x class IntIso t where intIso : : Set t - > Set Int deriving instance IntIso MInt main :: IO...
f3145a2d63c8e59da2cd25e2280fc52f6e1eb987d918cf5f6ce5c25a8b921a38
ghcjs/ghcjs
t7953.hs
module Main (main) where import Control.Monad import System.IO import System.Random main :: IO () main = do hSetBuffering stdout NoBuffering let q = fold $ zip [1..] (take 200 [500.0,400.0..]) print q putStrLn "Before atMost" let (xs,q') = atMost 0.5 q -- this causes seqfault with -O2 print x...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/codeGen/t7953.hs
haskell
this causes seqfault with -O2
module Main (main) where import Control.Monad import System.IO import System.Random main :: IO () main = do hSetBuffering stdout NoBuffering let q = fold $ zip [1..] (take 200 [500.0,400.0..]) print q putStrLn "Before atMost" print xs print q' putStrLn "After atMost" fold :: [(Key, Prio)...
9a09529215a82c7361a25c2b60c8266f6e163093c4e4cdff480e533fdcf040af
antoniogarrote/jobim
java.clj
(ns jobim.test.services.serialization.java (:use [jobim.definitions]) (:use [jobim.services.serialization.java] :reload) (:use [clojure.test])) (deftest java-encoding-decoding-test (let [serv (make-serialization-service :java {}) orig (java.util.Date.)] (is (= (str orig) (str (decode serv (encode s...
null
https://raw.githubusercontent.com/antoniogarrote/jobim/f041331d2c02cf38741e8604263bd08a3a1f11a5/jobim-core/test/jobim/test/services/serialization/java.clj
clojure
(ns jobim.test.services.serialization.java (:use [jobim.definitions]) (:use [jobim.services.serialization.java] :reload) (:use [clojure.test])) (deftest java-encoding-decoding-test (let [serv (make-serialization-service :java {}) orig (java.util.Date.)] (is (= (str orig) (str (decode serv (encode s...
98bf5321484d9ad0b7b247365a80a1bd9e2b26e1e32c9f68c3f9d7a7927e3a04
namin/propagators
profiler.scm
;;; ---------------------------------------------------------------------- Copyright 2009 - 2010 . ;;; ---------------------------------------------------------------------- This file is part of Propagator Network Prototype . ;;; Propagator Network Prototype is free software ; you can ;;; redistribute it and/o...
null
https://raw.githubusercontent.com/namin/propagators/ae694dfe680125e53a3d49e5e91c378f2d333937/support/profiler.scm
scheme
---------------------------------------------------------------------- ---------------------------------------------------------------------- you can redistribute it and/or modify it under the terms of the GNU any later version. will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of M...
Copyright 2009 - 2010 . This file is part of Propagator Network Prototype . General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) Propagator Network Prototype is distributed in the hope that it You should have received a copy of the G...
4a86ef2b352e6550df5a898c5eccf5b514061a18f247aac3608648576a99d09b
mk270/ocaml-prolog
shuffle.mli
OCaml - Prolog , a Prolog interpreter , by and Copyright ( C ) 2008 and This programme is free software ; you may redistribute and/or modify it under the terms of the GNU General Public Licence as published by the Free Software Foundation , either version 3 of said Licence , or ( at ...
null
https://raw.githubusercontent.com/mk270/ocaml-prolog/72b4d956eda1c86e35dde8e31b29977de6962120/lib/shuffle.mli
ocaml
OCaml - Prolog , a Prolog interpreter , by and Copyright ( C ) 2008 and This programme is free software ; you may redistribute and/or modify it under the terms of the GNU General Public Licence as published by the Free Software Foundation , either version 3 of said Licence , or ( at ...
3edd573d47f001d23243f867ee60d2ee534d1742da3ef5028f20fc63292be9a0
imdea-software/leap
tll.ml
(***********************************************************************) (* *) LEAP (* *) , IMDEA ...
null
https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/progs/tll/tll.ml
ocaml
********************************************************************* ...
LEAP , IMDEA Software Institute Copyright 2011 IMDEA Software Institute Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compl...
300793bf82ca1466fcce7e779edb9db26ee24482a40823c65cbeb22ef2a03b26
mbutterick/aoc-racket
day19.rkt
#lang scribble/lp2 @(require scribble/manual aoc-racket/helper) @aoc-title[19] @defmodule[aoc-racket/day19] @link[""]{The puzzle}. Our @link-rp["day19-input.txt"]{input} is list of ``molecule'' transformations that look like @tt{B => TiRnFAr}, and then a longer test molecule. @chunk[<day19> <day19-setup> ...
null
https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/day19.rkt
racket
#lang scribble/lp2 @(require scribble/manual aoc-racket/helper) @aoc-title[19] @defmodule[aoc-racket/day19] @link[""]{The puzzle}. Our @link-rp["day19-input.txt"]{input} is list of ``molecule'' transformations that look like @tt{B => TiRnFAr}, and then a longer test molecule. @chunk[<day19> <day19-setup> ...
7a4cc0d3e4a991fe87f89234212cdc57d1c0e027898470ff934455f39e1eac1b
dselsam/arc
Main.hs
Copyright ( c ) 2020 Microsoft Corporation . All rights reserved . Released under Apache 2.0 license as described in the file LICENSE . Authors : , , . {-# LANGUAGE DeriveDataTypeable, RecordWildCards, ScopedTypeVariables #-} # LANGUAGE ScopedTypeVariables # module Main where import Control.Exception.Base...
null
https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/app/run-all/Main.hs
haskell
# LANGUAGE DeriveDataTypeable, RecordWildCards, ScopedTypeVariables # TODO: not sure if this will catch or not Note: we are trusting the Solver to respect the timeout
Copyright ( c ) 2020 Microsoft Corporation . All rights reserved . Released under Apache 2.0 license as described in the file LICENSE . Authors : , , . # LANGUAGE ScopedTypeVariables # module Main where import Control.Exception.Base import System.FilePath.Posix import System.Directory import System.Random...
4668d7338ad4a219911acfcec3d3d9c0e6942f5a289ec046941d4ce84c3e904f
unclebob/more-speech
data_storage_spec.clj
(ns more-speech.data-storage-spec (:require [speclj.core :refer :all] [more-speech.data-storage :refer :all])) (defn- created-at [day n] (+ n (* day 86400))) (describe "data-storage" (context "partition-messages-by-day" (it "partitions messages by day" (let [m1 {:id 1 :created-at (created-...
null
https://raw.githubusercontent.com/unclebob/more-speech/fa4acece825734b4a98d29d091fad41a6bf90810/spec/more_speech/data_storage_spec.clj
clojure
(ns more-speech.data-storage-spec (:require [speclj.core :refer :all] [more-speech.data-storage :refer :all])) (defn- created-at [day n] (+ n (* day 86400))) (describe "data-storage" (context "partition-messages-by-day" (it "partitions messages by day" (let [m1 {:id 1 :created-at (created-...
ded23fba7e4700cfabcf2d91448d34be5ce149503b1f15b97aa9d0ca519e2914
liqd/thentos
StateSpec.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeOperators # # LANGUAGE ViewPatterns # {-# OPTIONS -fno-warn-incomplete-patterns #-} module Thentos.Frontend.StateSpec where import Contr...
null
https://raw.githubusercontent.com/liqd/thentos/f7d53d8e9d11956d2cc83efb5f5149876109b098/thentos-tests/tests/Thentos/Frontend/StateSpec.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # OPTIONS -fno-warn-incomplete-patterns # FIXME: it would be easy to get this to work with a catch-all combinator (-servant/servant/issues/257), or in a small middleware. (just checking that parser works)
# LANGUAGE FlexibleContexts # # LANGUAGE TypeOperators # # LANGUAGE ViewPatterns # module Thentos.Frontend.StateSpec where import Control.Exception (finally) import Data.Pool (destroyAllResources) import Network.HTTP.Types (RequestHeaders, methodGet, methodPost) import Network.Wai (Application)...
d91aebba88a954c451aa04615162cc0c9116619bc4186b57f484e7b77a268f19
let-def/lrgrep
test_ko_01.ml
let x = 5; let y = 6 let z = 7
null
https://raw.githubusercontent.com/let-def/lrgrep/29e64174dc9617bcd1871fd2e4fd712269568324/demo/test_ko_01.ml
ocaml
let x = 5; let y = 6 let z = 7
194b6932cbb16cae320e9a80eba6f340fcb6c5286cf4682a0279cb264585a710
dolotech/erlang_server
data_enemy.erl
-module(data_enemy). -export([get/1]). get(ids) -> [112,114,116,118,122,124,126,128,131,133,137,139,141,143,145,148]; get(112) -> [{tid, 30001}, {atk, 460}, {hp, 4500}, {agi, 25}]; get(114) -> [{tid, 30001}, {atk, 450}, {hp, 4500}, {agi, 25}]; get(116) -> [{tid, 30001}, {atk, 470}, {hp, 4500}, {agi, 25}]; get(118) -> [...
null
https://raw.githubusercontent.com/dolotech/erlang_server/44ea3693317f60e18b19c9ddfa179307cbd646d7/src/data/data_enemy.erl
erlang
-module(data_enemy). -export([get/1]). get(ids) -> [112,114,116,118,122,124,126,128,131,133,137,139,141,143,145,148]; get(112) -> [{tid, 30001}, {atk, 460}, {hp, 4500}, {agi, 25}]; get(114) -> [{tid, 30001}, {atk, 450}, {hp, 4500}, {agi, 25}]; get(116) -> [{tid, 30001}, {atk, 470}, {hp, 4500}, {agi, 25}]; get(118) -> [...
02ce91aaefdb5db2ce27ce470af2382080d10f7f91cecce0e42dac02b91523a6
5outh/chaosbox
Orphanage.hs
# OPTIONS_GHC -fno - warn - orphans # module ChaosBox.Orphanage () where import Control.Monad.Base import Data.Random ( Distribution , Distribution(..) , Normal ...
null
https://raw.githubusercontent.com/5outh/chaosbox/991ca3db48d8828287567302ba3293314b9127bd/src/ChaosBox/Orphanage.hs
haskell
These orphan instances do not leak to the end-user, since they're only used in wrapper functions.
# OPTIONS_GHC -fno - warn - orphans # module ChaosBox.Orphanage () where import Control.Monad.Base import Data.Random ( Distribution , Distribution(..) , Normal ...
e12c8e1ea1366b58660c881080307cbc3d50c7dbdfbda42beb79d20bac8db336
DomainDrivenArchitecture/dda-pallet
config.clj
Licensed to the Apache Software Foundation ( ASF ) under one ; or more contributor license agreements. See the NOTICE file ; distributed with this work for additional information ; regarding copyright ownership. The ASF licenses this file to you under the Apache License , Version 2.0 ( the ; "License"); you may not...
null
https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-pallet/aa251ac1c678a46ef9183d9fb2d447c4f77a99d3/main/src/dda/pallet/core/infra/config.clj
clojure
or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file "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 b...
Licensed to the Apache Software Foundation ( ASF ) under one to you under the Apache License , Version 2.0 ( the distributed under the License is distributed on an " AS IS " BASIS , (ns dda.pallet.core.infra.config (:require [pallet.api :as api] [pallet.crate :as crate])) (defn get-global-config "" ...
f44a85b2d04a21501eb39d82011f6596ea1f8d4bc37750f5a45eb496cff93662
lanl/APPFL
State.hs
module State ( State(..), state, runState, get, put, modify, liftM, concatMapM ) where import Control.Applicative (Applicative (..)) instance Functor (State s) where fmap = liftM instance Applicative (State s) where pure = return (<*>) = ap newtype State s a = State (s -> (a, ...
null
https://raw.githubusercontent.com/lanl/APPFL/0f29f390d4735e863904348711a48b8f38ca5d03/codegen/State.hs
haskell
module State ( State(..), state, runState, get, put, modify, liftM, concatMapM ) where import Control.Applicative (Applicative (..)) instance Functor (State s) where fmap = liftM instance Applicative (State s) where pure = return (<*>) = ap newtype State s a = State (s -> (a, ...
4d0cc213c22adf56ec987f78fd858d59861650732503e1270f493f067a3880c0
slagyr/speclj
progress.cljc
(ns speclj.report.progress (:require [clojure.string :as str] [speclj.config :refer [*omit-pending?* default-reporters]] [speclj.platform :as platform] [speclj.reporting :refer [green grey indent red stack-trace-str tally-time yellow]] [speclj.results :refer [categorize...
null
https://raw.githubusercontent.com/slagyr/speclj/6a2daa0fe0385c34bcfcf22c1d4417b5eef0a395/src/speclj/report/progress.cljc
clojure
(ns speclj.report.progress (:require [clojure.string :as str] [speclj.config :refer [*omit-pending?* default-reporters]] [speclj.platform :as platform] [speclj.reporting :refer [green grey indent red stack-trace-str tally-time yellow]] [speclj.results :refer [categorize...
3a1c193f4c36b48119fa4546c061318fbfb8453289793d083aff959d6018d665
ocurrent/opam-health-check
cache.ml
open Intf module Opams_cache = Map.Make (String) module Revdeps_cache = Map.Make (String) type merge = | Old | New module Pkg_htbl = Map.Make (struct type t = string * Compiler.t let compare (full_name, comp) y = let full_name = String.compare full_name (fst y) in if full_name <> 0 then full_...
null
https://raw.githubusercontent.com/ocurrent/opam-health-check/24ebb24f294e3356131ba9a410db56b5a42b1ff5/server/lib/cache.ml
ocaml
TODO: Maybe switch to assert false? TODO: Make use of the cache
open Intf module Opams_cache = Map.Make (String) module Revdeps_cache = Map.Make (String) type merge = | Old | New module Pkg_htbl = Map.Make (struct type t = string * Compiler.t let compare (full_name, comp) y = let full_name = String.compare full_name (fst y) in if full_name <> 0 then full_...
34da40927c89818e983eacc1cbf180d5083f9173f60e2acf60022bc40344bf04
erlangonrails/devdb
onecached_storage.erl
%%%---------------------------------------------------------------------- OneCached ( c ) 2007 Process - one ( -one.net/ ) $ Id$ %%%---------------------------------------------------------------------- -module(onecached_storage). -author(''). -vsn('$Revision$ '). % Handle all storage mechanisms (only mnesia for ...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/OneCached/src/onecached_storage.erl
erlang
---------------------------------------------------------------------- ---------------------------------------------------------------------- Handle all storage mechanisms (only mnesia for now). ==================================================================== API functions ========================================...
OneCached ( c ) 2007 Process - one ( -one.net/ ) $ Id$ -module(onecached_storage). -author(''). -vsn('$Revision$ '). -export([init/1, store_item/2, has_item/2, get_item/2, delete_item/2, update_item_value/4, flush_items/1]). -include("onecached.hrl"). -record(onecached, {key, flags, exptime, data})...
a22987fe0c21f74d82e1ec5d617f73cb9ddd707eab2a1ed9af638334b515aae6
DomainDrivenArchitecture/dda-managed-ide
java.clj
Licensed to the Apache Software Foundation ( ASF ) under one ; or more contributor license agreements. See the NOTICE file ; distributed with this work for additional information ; regarding copyright ownership. The ASF licenses this file to you under the Apache License , Version 2.0 ( the ; "License"); you may not...
null
https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-managed-ide/1a0d9b8dea4e3b7af1754bf99b38790a927d4d10/main/src/dda/pallet/dda_managed_ide/infra/java.clj
clojure
or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file "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 b...
Licensed to the Apache Software Foundation ( ASF ) under one to you under the Apache License , Version 2.0 ( the distributed under the License is distributed on an " AS IS " BASIS , (ns dda.pallet.dda-managed-ide.infra.java (:require [clojure.tools.logging :as logging] [schema.core :as s] [pallet.a...
8dbc65f4f8eda329f364d1d47e9efedf9582bb269c8619cc5ef4c6b5a1f9d5dd
gcross/LogicGrowsOnTrees
test-Worker.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE RecursiveDo # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # {-# LANGUAGE TypeSynonymIns...
null
https://raw.githubusercontent.com/gcross/LogicGrowsOnTrees/4befa81eb7152d877a7c78338d21bed61b06db66/LogicGrowsOnTrees/tests/test-Worker.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE GADTs # # LANGUAGE TypeSynonymInstances # {{{
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # # LANGUAGE RecursiveDo # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE UnicodeSyntax # # LANGUAGE ViewPatterns # import Control.Arrow ((&&&)) imp...
8f079aa70232e053e1d38d7386bc063d92ce6a3eb05c7b31415c5fc49328917f
brendanhay/ede
Quoting.hs
# LANGUAGE CPP # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # -- | -- Module : Text.EDE.Internal.Quoting Copyright : ( c ) 2013 - 2022 < > License : This Source Code Form is...
null
https://raw.githubusercontent.com/brendanhay/ede/6d62d1f38c4d5cc07cf392dcc9c76f56598afcde/lib/Text/EDE/Internal/Quoting.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # | Module : Text.EDE.Internal.Quoting you can obtain it at /. Stability : experimental /Warning/: this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by ...
# LANGUAGE CPP # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE TupleSections # Copyright : ( c ) 2013 - 2022 < > License : This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . A copy of t...
47dffb742dfb2c623f992352e2280b1caebcb1950c7a1a79af9d6b674ed057ac
modlfo/firmata
NonBlockingExample.ml
- NonBlockingExample - * This example is similar to ' SimpleExample ' but the main difference is that * the calls to the firmata functions do not block since they are called with * a wait time of zero [ update board 0 ] . * This example is similar to 'SimpleExample' but the main difference is that * the...
null
https://raw.githubusercontent.com/modlfo/firmata/b569d3e2b910ba5bcae4fd588d342596596d1070/examples/NonBlockingExample.ml
ocaml
updates the board without waiting if the board is ready move to configure state prints the information of the board writes it to the servo as angle infinite loop Do other stuff or sleep
- NonBlockingExample - * This example is similar to ' SimpleExample ' but the main difference is that * the calls to the firmata functions do not block since they are called with * a wait time of zero [ update board 0 ] . * This example is similar to 'SimpleExample' but the main difference is that * the...
5d25b8cfd9f48a55e5591819989a7bfe735f195c583639231a06fdbb63e1b061
acorrenson/Oratio
logic.ml
* Syntactic definition of the propositionnal logic Syntactic definition of the propositionnal logic *) open Printf type prop = | And of prop * prop | Or of prop * prop | Impl of prop * prop | Atom of char | Bot let priority p = match p with | And _ -> 3 | Or _ -> 2 | Impl _ -> 1 | Atom ...
null
https://raw.githubusercontent.com/acorrenson/Oratio/ade8d9a3253270e311ebbcff10cb955bd2c8af42/src/kernel/logic.ml
ocaml
* Syntactic definition of the propositionnal logic Syntactic definition of the propositionnal logic *) open Printf type prop = | And of prop * prop | Or of prop * prop | Impl of prop * prop | Atom of char | Bot let priority p = match p with | And _ -> 3 | Or _ -> 2 | Impl _ -> 1 | Atom ...
b0c6b88d03787a0d7144cdc27af686fa66c63475382442f95af727a804c0cd9e
fortytools/holumbus
PackageInfo.hs
{-# OPTIONS -XBangPatterns #-} -- ------------------------------------------------------------ module Hayoo.PackageInfo where import Control.DeepSeq import Data.Binary ( Binary(..) ) import qualified Data.Binary as B import Holumbus.Query.Result ...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/crawl2/examples/hayoo/Hayoo/PackageInfo.hs
haskell
# OPTIONS -XBangPatterns # ------------------------------------------------------------ ------------------------------------------------------------ | Additional information about a function. The strings in this record are not compressed into bytestrings. The document table contains bzip compressed bytestings of ...
module Hayoo.PackageInfo where import Control.DeepSeq import Data.Binary ( Binary(..) ) import qualified Data.Binary as B import Holumbus.Query.Result ( Score ) import Text.XML.HXT.Core data PackageInfo = PackageInfo } deriv...
505f1afd16435735457e6573a7e40432cfa2b4a650bfeb1825274e260996defd
input-output-hk/ouroboros-network
HotKey.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # -- | Hot key -- -- Intended for qualified import module Ouroboros.Consensus.Protocol.Ledger.HotKey ( --...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/67b7c9e7a684e97ad5a5ed7fe85e2b900e8bba11/ouroboros-consensus-protocol/src/Ouroboros/Consensus/Protocol/Ledger/HotKey.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE DeriveAnyClass # # LANGUAGE RankNTypes # | Hot key Intended for qualified import * KES Info * KES Status * Hot Key ------------------------------------------------------------------------------ KES Info ---------------------------------------------------...
# LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # module Ouroboros.Consensus.Protocol.Ledger.HotKey ( KESEvolution , KESInfo (..) , kesAbsolutePeriod , KESStatus (..) , kesStatus , HotKey (..) , KESEvolutionError (..) , KESEvolutionInfo , mkHotKey ...
d5a6a3f205badeb8fc7c980488ea89ca8f93ba691ac78de9507a18e68aad4265
joshuamiller/map-todo-demo
project.clj
(defproject map-todo-demo "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0-alpha16"] [org.clojure/clojur...
null
https://raw.githubusercontent.com/joshuamiller/map-todo-demo/24cfc555357401f079b709891f2d53272f88b5b2/project.clj
clojure
(defproject map-todo-demo "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0-alpha16"] [org.clojure/clojur...
1151d237bd9ffb9ebf8ed7715a47514964dcbc426f41fcb2651c52496f9eef25
ninenines/gun
gun_ct_hook.erl
Copyright ( c ) 2015 - 2023 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC...
null
https://raw.githubusercontent.com/ninenines/gun/33223e751267c5f249f3db1277c13904a1801b92/test/gun_ct_hook.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2015 - 2023 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(gun_ct_hook). -export([init/2]). init(_, _)...
15c3cfe9a36f80fa9212daea3f932fe1e2e62bb575a1094ed4bb5c2c7482be78
ejgallego/dualquery
simplescale_array.ml
(**************************************************************************) Sample use of , a simple library to perform Map computations on (* a multi-core *) (* *) Author(s ): ...
null
https://raw.githubusercontent.com/ejgallego/dualquery/f8355212a760ef77ad3fb07f3bb595e775bf06d2/parmap/tests/simplescale_array.ml
ocaml
************************************************************************ a multi-core This program is free softw...
Sample use of , a simple library to perform Map computations on Author(s ): it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 2 of the open Parmap open Utils let compute p =...
6663b33a816898ef5f2bd254ea08b25e24381be43daddae023f682e8d828efec
clojurewerkz/ogre
filter_test.clj
(ns clojurewerkz.ogre.suite.filter-test (:refer-clojure :exclude [and count drop filter group-by key key identity iterate loop map max min next not or range repeat reverse sort shuffle]) (:require [clojurewerkz.ogre.core :refer :all]) (:import (org.apache.tinkerpop.gremlin.structure Vertex Property) (o...
null
https://raw.githubusercontent.com/clojurewerkz/ogre/cfc5648881d509a55f8a951e01d7b2a166e71d17/test/clojure/clojurewerkz/ogre/suite/filter_test.clj
clojure
(ns clojurewerkz.ogre.suite.filter-test (:refer-clojure :exclude [and count drop filter group-by key key identity iterate loop map max min next not or range repeat reverse sort shuffle]) (:require [clojurewerkz.ogre.core :refer :all]) (:import (org.apache.tinkerpop.gremlin.structure Vertex Property) (o...
4ae3dfe6c20f3bce3fc748d2cd2613894d881ad2e0bc2f6439fa98c7d4675b8e
hercules-ci/hercules-ci-agent
Store.hs
# LANGUAGE BlockArguments # # LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # #ifdef __GHCIDE__ # define NIX_IS_AT_LEAST(mm,m,p) 1 #endif module Hercules.CNix.Store ( module Hercules.CNix.Store, module Hercules.CNix.Store.Contex...
null
https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/0d8c4f153e64c059d1d274306fb38da0ed870bb1/hercules-ci-cnix-store/src/Hercules/CNix/Store.hs
haskell
| Usually @"/nix/store"@ | Create 'StorePath' from hash and name. Throws C++ `BadStorePath` exception when invalid. Throws C++ `BadStorePath` exception when invalid. Useful for testing | Derivation name (store path name with ".drv" extension removed) | Contents # UNPACK # | See @content-address.hh@ | See @ha...
# LANGUAGE BlockArguments # # LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # #ifdef __GHCIDE__ # define NIX_IS_AT_LEAST(mm,m,p) 1 #endif module Hercules.CNix.Store ( module Hercules.CNix.Store, module Hercules.CNix.Store.Contex...
f82b7b35b496a937a1054c2398a66b9f56eb5f4c0c7340f1861f09c60a025f85
sigscale/snmp-collector
snmp_collector_server.erl
%%% snmp_collector_server.erl %%% vim: ts=3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2016 - 2019 SigScale Global Inc. %%% @end Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% you may not use this file except in compliance with the License. %%% You may ...
null
https://raw.githubusercontent.com/sigscale/snmp-collector/cb6b95ed331abd6f258d8ea55bf34c57f2992444/src/snmp_collector_server.erl
erlang
snmp_collector_server.erl vim: ts=3 @end 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 Lice...
2016 - 2019 SigScale Global Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(snmp_collector_server). -copyright('Copyright (c) 2016 - 2019 SigScale Global Inc.'). -behaviour(gen_server). export the snmp_col...
f563ab36d7b799cb151184c6fb629c2f5cfb0e94b0fa2dbdce304a7113bf4530
scalaris-team/scalaris
api_json_ring.erl
2018 Zuse Institute Berlin 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 distribut...
null
https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/json/api_json_ring.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2018 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > -module(api_json_ring). -author(''). for : -export([get_ring_size/1, wait_for_ring_size/2]). -include("scalaris.hrl"). ...
f8672574cd21346ff17495c0fc90b3a6a1bf7c6e29f8dab24663500626a689c1
reactorlabs/sourir
transform_cleanup.ml
open Instr open Types open Transform_utils let remove_jmp : transform_instructions = fun ({instrs; _} as inp) -> let pred = Analysis.predecessors instrs in let succ = Analysis.successors instrs in let transform pc = if (pc+1) = Array.length instrs then Unchanged else match[@warning "-4"] instrs.(pc), ins...
null
https://raw.githubusercontent.com/reactorlabs/sourir/381289c294157e58b257ec8edb9d5005b8a66daf/transform_cleanup.ml
ocaml
open Instr open Types open Transform_utils let remove_jmp : transform_instructions = fun ({instrs; _} as inp) -> let pred = Analysis.predecessors instrs in let succ = Analysis.successors instrs in let transform pc = if (pc+1) = Array.length instrs then Unchanged else match[@warning "-4"] instrs.(pc), ins...
c0bae19659ccb4b5694ee43edf3fb20060a3cabd217c5b3d67ec2442c6999304
ucsd-progsys/nate
bytepackager.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/bytecomp/bytepackager.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 2002 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . " Package " a set of .cmo files into...
aedc691b7167c1f02875a712c2c100d38e0ca5e44760c63abde27b252313bcb4
LaifsV1/YUP
newparse.ml
type var = string type pos = Lexing.position type range = (pos * pos) type token = | Zero | With | WeKnow | WeGet | Var of var | Truth | True | Therefore | Then | Tt | TpVar of var | Todo | Theorem | Suc | Since | Statement | Signatures | Semicolon | Right | Qed | Prop | P...
null
https://raw.githubusercontent.com/LaifsV1/YUP/480d8d6228092ec8e7881fde071bd65be703b4f1/src/parser/newparse.ml
ocaml
var app bool nats lists
type var = string type pos = Lexing.position type range = (pos * pos) type token = | Zero | With | WeKnow | WeGet | Var of var | Truth | True | Therefore | Then | Tt | TpVar of var | Todo | Theorem | Suc | Since | Statement | Signatures | Semicolon | Right | Qed | Prop | P...
e05649fdf2182af52d3be29a86a789681bec6b91a6db805991399dd9671ac125
borodust/mortar-combat
connector.lisp
(in-package :mortar-combat) (define-constant +supported-server-version+ 1) (declaim (special *message* *connector*)) (defstruct (server-identity (:constructor make-server-identity (id name))) (id nil :read-only t) (name nil :read-only t)) (defun connection-stream-of (connector) ...
null
https://raw.githubusercontent.com/borodust/mortar-combat/548bdda21594185f36c365f25015c5edcc37b828/client/src/connector.lisp
lisp
(in-package :mortar-combat) (define-constant +supported-server-version+ 1) (declaim (special *message* *connector*)) (defstruct (server-identity (:constructor make-server-identity (id name))) (id nil :read-only t) (name nil :read-only t)) (defun connection-stream-of (connector) ...
e4919a544371a91aceaa1acaea19defbdd082eba790815a0bd314a8c3a3693d8
bldl/magnolisp
test-type-infer-4.rkt
#lang magnolisp/2014 (typedef int (#:annos foreign)) (define (g x) x) (function (f) (#:annos export (type (fn int))) (g 1)) (f)
null
https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/tests/test-type-infer-4.rkt
racket
#lang magnolisp/2014 (typedef int (#:annos foreign)) (define (g x) x) (function (f) (#:annos export (type (fn int))) (g 1)) (f)
b07e5ffbe3d6e40c4698661e7b28f0a67920e2084b458ec1e2da7ae2f75f1d24
dyoo/whalesong
raphael-demo.rkt
#lang whalesong (require whalesong/resource whalesong/web-world whalesong/js) This is a small demonstration of the Javascript graphics library Raphael from / . ; The example below the bindings draws a Lissajous curve. ;;; Whalesong binding of ;;; (load-script "") (define paper #f) (define...
null
https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/examples/raphael-demo.rkt
racket
The example below the bindings draws a Lissajous curve. str in SVG path string format (cx,xy) is the center return current attribute values See for other values of a and b to try. tick: world view -> world draw: world view -> view
#lang whalesong (require whalesong/resource whalesong/web-world whalesong/js) This is a small demonstration of the Javascript graphics library Raphael from / . Whalesong binding of (load-script "") (define paper #f) (define (raphael-init id width height) (unless paper (set! pape...
448720d7d7350198e83f36349b0b4cba91f51a360b10fead25f3d35a4a6b0f11
jimcrayne/jhc
tc220.hs
{-# OPTIONS_GHC -fglasgow-exts #-} See Trac # 1033 module Pointful' where import Data.Generics import Control.Monad.State data HsExp = HsWildCard deriving( Typeable, Data ) data HsName = HsName deriving( Typeable, Data ) rename : : ( ) - > HsExp - > State ( , [ HsName ] ) HsExp -- Type sig commented out ren...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/uncat/tc220.hs
haskell
# OPTIONS_GHC -fglasgow-exts # Type sig commented out
See Trac # 1033 module Pointful' where import Data.Generics import Control.Monad.State data HsExp = HsWildCard deriving( Typeable, Data ) data HsName = HsName deriving( Typeable, Data ) rename : : ( ) - > HsExp - > State ( , [ HsName ] ) HsExp rename1 = \_ -> everywhereM (mkM (\e -> case e of HsWildCard -> ...
8c9c24312dc0b0e7946f07dbc5036931166176eed22e49a14c1fca2ea3c65784
fjvallarino/monomer
Core.hs
| Module : . Event . Core Copyright : ( c ) 2018 License : BSD-3 - Clause ( see the LICENSE file ) Maintainer : Stability : experimental Portability : non - portable Core functions for SDL event processing and conversion . Module : Monomer.Event.Core Copyright : (c) 2018 F...
null
https://raw.githubusercontent.com/fjvallarino/monomer/d1ddcc2d40a6151d50fca33dbca1302fa7b2e19b/src/Monomer/Event/Core.hs
haskell
^ The host operating system. ^ Device pixel rate. ^ Event pixel rate. ^ Whether wheel/trackpad x direction should be inverted. ^ Whether wheel/trackpad y direction should be inverted. ^ Settings for event conversion. ^ Mouse position. ^ Offset to apply ^ Source SystemEvent ^ Updated SystemEvent
| Module : . Event . Core Copyright : ( c ) 2018 License : BSD-3 - Clause ( see the LICENSE file ) Maintainer : Stability : experimental Portability : non - portable Core functions for SDL event processing and conversion . Module : Monomer.Event.Core Copyright : (c) 2018 F...
69f96265da10abdf4a4a2cd609be84879d305f30c47c08b44f3af4d8f2d412b7
slyrus/mcclim-old
puzzle.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - DEMO ; Base : 10 ; Lowercase : Yes -*- $ fiHeader : puzzle.lisp , v 1.23 1993/07/27 01:46:05 (in-package :clim-demo) "Copyright (c) 1989, 1990, 1991, 1992 Symbolics, Inc. All rights reserved." (define-application-frame puzzle () ((puzzle...
null
https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Examples/puzzle.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : CLIM - DEMO ; Base : 10 ; Lowercase : Yes -*- check row
$ fiHeader : puzzle.lisp , v 1.23 1993/07/27 01:46:05 (in-package :clim-demo) "Copyright (c) 1989, 1990, 1991, 1992 Symbolics, Inc. All rights reserved." (define-application-frame puzzle () ((puzzle :initform (make-array '(4 4)) :accessor puzzle-puzzle)) (:panes (display :application :di...
fb239c4c23102362de2973fef527629a39026eb3acfa48cf1593cb01b896f8f7
typedclojure/typedclojure
checker.clj
Copyright ( c ) , contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/a60a354e2da1daa8a3407f66474c6ddee17928e4/typed/clj.checker/src/typed/clj/checker.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , contributors . (ns typed.clj.checker (:require [clojure.core :as core] [clojure.core.typed.load-if-needed :refer [load-if-needed]] [typed.clj.checker.check-form :as check-form-clj] [typed.clj.checker.check-ns :as check-ns-clj])) (core/defn default-che...
c55415feca3a7e8014a50d41cd46aa5693fb8108b981bc67011bef6bb731d128
tweag/linear-base
Interop.hs
# LANGUAGE LambdaCase # {-# LANGUAGE LinearTypes #-} # LANGUAGE QualifiedDo # # LANGUAGE RecordWildCards # {-# OPTIONS_GHC -Wno-name-shadowing #-} {-# OPTIONS_HADDOCK hide #-} -- | This module contains functions for interoperating with other -- streaming libraries. module Streaming.Linear.Internal.Interop ( -- * Int...
null
https://raw.githubusercontent.com/tweag/linear-base/90dcbf0bbeabea9ef2c9d08bdb4f734935ecbdac/src/Streaming/Linear/Internal/Interop.hs
haskell
# LANGUAGE LinearTypes # # OPTIONS_GHC -Wno-name-shadowing # # OPTIONS_HADDOCK hide # | This module contains functions for interoperating with other streaming libraries. * Interoperating with other streaming libraries > reread readIORef :: IORef (Maybe a) -> Stream (Of a) IO () > reread Streams.read :: System....
# LANGUAGE LambdaCase # # LANGUAGE QualifiedDo # # LANGUAGE RecordWildCards # module Streaming.Linear.Internal.Interop reread, ) where import qualified Control.Functor.Linear as Control import Data.Unrestricted.Linear import Prelude.Linear (($)) import Streaming.Linear.Internal.Produce import Streaming.Linear.I...
e30d6954d6df1ba04327f7163ce3e61beea1eda2187baaa6dffe05bc7d8e49d3
LightAndLight/cbpv
Syntax.hs
# language BangPatterns # # language DataKinds , GADTs , KindSignatures # {-# language FlexibleContexts #-} {-# language OverloadedStrings #-} # language RankNTypes # # language StandaloneDeriving # # language TemplateHaskell # module Syntax where import Control.Lens.Lens (Lens') import Control.Lens.TH (makeLenses) im...
null
https://raw.githubusercontent.com/LightAndLight/cbpv/8c54deb312eb873c8e21e886aef42e515f9a93e5/src/Syntax.hs
haskell
# language FlexibleContexts # # language OverloadedStrings # | f : (a -> b) /\\ x : a ==> f x : b | k1 kind /\\ k1 |- b : k2 ==> ( forall (a : k1). b ) : k2 value types computation types | SomeCtor : a values computations
# language BangPatterns # # language DataKinds , GADTs , KindSignatures # # language RankNTypes # # language StandaloneDeriving # # language TemplateHaskell # module Syntax where import Control.Lens.Lens (Lens') import Control.Lens.TH (makeLenses) import Data.Bifunctor (first) import Data.List (iterate) import Data.Li...
9eb50e5a93290445c400c1bf8f873624e9d5b1ee987949941a336b446d5ce296
kazu-yamamoto/quic
server.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE Strict #-} {-# LANGUAGE StrictData #-} # LANGUAGE TupleSections # module Main where import Control.Monad import Data.ByteString (ByteString) import qualified Data.ByteString as BS import qualified Data.List as L...
null
https://raw.githubusercontent.com/kazu-yamamoto/quic/cecf4de6aef18d73ea03e7f0881a60d5206a5c03/util/server.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # # LANGUAGE Strict # # LANGUAGE StrictData #
# LANGUAGE RecordWildCards # # LANGUAGE TupleSections # module Main where import Control.Monad import Data.ByteString (ByteString) import qualified Data.ByteString as BS import qualified Data.List as L import Network.TLS (credentialLoadX509, Credentials(..)) import qualified Network.TLS.SessionManager as SM import Sy...
864966b46cc9973ee82fff4af9fd9fadcce9528b0153613b3a7d8d42ee6af0ad
let-def/cmon
test.ml
let print name value = print_string name; print_endline ":"; PPrint.ToChannel.pretty 0.9 80 stdout (Cmon.print value); print_newline (); print_newline () let short_args = Cmon.[int 1; bool true] let mid_args = short_args @ short_args @ short_args let long_args = mid_args @ mid_args @ mid_args let short_fiel...
null
https://raw.githubusercontent.com/let-def/cmon/26e86f9651ab92642431688dbc1bba64d0b46769/tests/test.ml
ocaml
Base types Integers Floats Chars Strings Tuple Terminated lists Open lists Nested lists and tuples Constructors Inline records Recursion test let rec rec_term3 = lazy (Cmon.of_lazy rec_term3) in print "rec-term3" (Cmon.of_lazy rec_term3); Multiple let bindings group let x = K A ...
let print name value = print_string name; print_endline ":"; PPrint.ToChannel.pretty 0.9 80 stdout (Cmon.print value); print_newline (); print_newline () let short_args = Cmon.[int 1; bool true] let mid_args = short_args @ short_args @ short_args let long_args = mid_args @ mid_args @ mid_args let short_fiel...
367ad0976ab53d9d659f02ccf6fdcb19e3445ee05854a5105ca8dc10909bb9d1
cram2/cram
fdist.lisp
;; Fdist distribution , Sat Sep 30 2006 Time - stamp : < 2010 - 01 - 17 10:12:32EST fdist.lisp > ;; Copyright 2006 , 2007 , 2008 , 2009 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU Ge...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/random/fdist.lisp
lisp
Fdist distribution This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See th...
, Sat Sep 30 2006 Time - stamp : < 2010 - 01 - 17 10:12:32EST fdist.lisp > Copyright 2006 , 2007 , 2008 , 2009 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the Licens...
e90aed9b55ec5a327e6ca6bb5e51b7a7ae7993c7d1e6034da7694bc88cebeafb
ocaml-explore/explore
test_collection.ml
open Core open Explore module W = Collection.Workflow let test_getters () = let pp_res ppf (p : W.resource) = Format.pp_print_string ppf (p.title ^ " " ^ p.description ^ " " ^ p.url ^ " ") in let equal_res = Stdlib.( = ) in let resource = Alcotest.testable pp_res equal_res in let path = "adding-u...
null
https://raw.githubusercontent.com/ocaml-explore/explore/117768b378959f18a8d818f37779a750e90f3438/explore/tests/test_collection.ml
ocaml
open Core open Explore module W = Collection.Workflow let test_getters () = let pp_res ppf (p : W.resource) = Format.pp_print_string ppf (p.title ^ " " ^ p.description ^ " " ^ p.url ^ " ") in let equal_res = Stdlib.( = ) in let resource = Alcotest.testable pp_res equal_res in let path = "adding-u...
90605cb8f373d4eea8434fa81c0d850bcc937a17284b4c5d3217eddb8b8d1b63
metaocaml/ber-metaocaml
typedecl_immediacy.ml
(**************************************************************************) (* *) (* OCaml *) (* *) , proj...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/typing/typedecl_immediacy.ml
ocaml
************************************************************************ OCaml ...
, projet , INRIA Saclay , projet Deducteam , INRIA Saclay Copyright 2018 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Types type error = Bad_immediacy_attribute of Typ...
f6f9cee1e775376e27688e7b699f8ca1025e39d139204c4ea22c78a077d57460
glguy/advent
17.hs
# Language ImportQualifiedPost , BlockArguments # | Module : Main Description : Day 17 solution Copyright : ( c ) , 2020 License : ISC Maintainer : < > This automata implementation uses a few optimizations : It precomputes the neighborhood map that can be quickly translated to a...
null
https://raw.githubusercontent.com/glguy/advent/2e96ba9a82be201293dffdf0f77ad609982a4ae5/solutions/src/2020/17.hs
haskell
| >>> :main ^ neighbor generator ^ input coordinates | Determine if a cell should be alive in the next generation. ^ previous generation ^ coordinate ^ live neighbor count ^ alive in next generation | Compute the next generation from the previous generati...
# Language ImportQualifiedPost , BlockArguments # | Module : Main Description : Day 17 solution Copyright : ( c ) , 2020 License : ISC Maintainer : < > This automata implementation uses a few optimizations : It precomputes the neighborhood map that can be quickly translated to a...
7cba24a9917b9ecf8ef365f5b59f93d0eeac46e026c4c56462eda650b80d4351
anurudhp/CPHaskell
a.hs
import Control.Applicative (liftA2) import Control.Arrow ((>>>)) chunksOf :: Int -> [a] -> [[a]] chunksOf _ [] = [] chunksOf k xs = let (hs, ts) = splitAt k xs in hs : chunksOf k ts main :: IO () main = interact $ lines >>> drop 1 >>> chunksOf 2 >>> map (last >>> words >>> map read >>> solve >>> show) >>> un...
null
https://raw.githubusercontent.com/anurudhp/CPHaskell/6504d7c0b311494feea7ff652060fb38b640171d/contests/codeforces/1538/a.hs
haskell
import Control.Applicative (liftA2) import Control.Arrow ((>>>)) chunksOf :: Int -> [a] -> [[a]] chunksOf _ [] = [] chunksOf k xs = let (hs, ts) = splitAt k xs in hs : chunksOf k ts main :: IO () main = interact $ lines >>> drop 1 >>> chunksOf 2 >>> map (last >>> words >>> map read >>> solve >>> show) >>> un...
4c59c48f8641fba63ca710fcdac7bb8a1a069208e188a1ca8f208c6308963aff
starburstdata/metabase-driver
driver_helpers.clj
;; 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 License is distributed on...
null
https://raw.githubusercontent.com/starburstdata/metabase-driver/69b7f411f5b076efe78e5d564bbc4fc4a1899560/drivers/starburst/src/metabase/driver/implementation/driver_helpers.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permi...
distributed under the License is distributed on an " AS IS " BASIS , (ns metabase.driver.implementation.driver-helpers "Driver api implementation for Starburst driver." (:require [metabase.driver :as driver])) (defmethod driver/db-start-of-week :starburst [_] :monday) (defmethod driver/describe-table-fks...
c2f4291d3e1cf40fb93a3f2cf52b55b02bd9a909dd599adbb8232535e8017124
alanz/ghc-exactprint
CommonUI.hs
module CommonUI where -- | Prints a document in a none XMl format createRuleItem frame state g n e = do when (isJust maybeRes) $ do{ ;let ;palette = getPalette doc }
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/103bc706c82300639985a15ba6cf762316352c92/tests/examples/ghc92/CommonUI.hs
haskell
| Prints a document in a none XMl format
module CommonUI where createRuleItem frame state g n e = do when (isJust maybeRes) $ do{ ;let ;palette = getPalette doc }
58f48f5ffd0991be872af83c308f30d43a6f81b6e7d0116a5562cc83fa1e1764
uw-unsat/serval-sosp19
riscv64-alu64-x.rkt
#lang racket/base (require "../riscv64.rkt") (require serval/lib/unittest) (define tests (test-suite+ "riscv64-alu64-x tests" (jit-test-case '(BPF_ALU64 BPF_MOV BPF_X)) (jit-test-case '(BPF_ALU64 BPF_ADD BPF_X)) (jit-test-case '(BPF_ALU64 BPF_SUB BPF_X)) (jit-test-case '(BPF_ALU64 BPF_AND BPF_X)...
null
https://raw.githubusercontent.com/uw-unsat/serval-sosp19/175c42660fad84b44e4c9f6f723fd3c9450d65d4/bpf/jit/test/riscv64-alu64-x.rkt
racket
#lang racket/base (require "../riscv64.rkt") (require serval/lib/unittest) (define tests (test-suite+ "riscv64-alu64-x tests" (jit-test-case '(BPF_ALU64 BPF_MOV BPF_X)) (jit-test-case '(BPF_ALU64 BPF_ADD BPF_X)) (jit-test-case '(BPF_ALU64 BPF_SUB BPF_X)) (jit-test-case '(BPF_ALU64 BPF_AND BPF_X)...
15500f2e0edc29a7950a02f99f85d9d64eaae75b235b679604f71e28c3295df6
reborg/clojure-essential-reference
3.clj
< 1 > (> (Math/abs (unchecked-subtract-int y1 y2)) (Math/abs (unchecked-subtract-int x1 x2)))) < 2 > (if (steep? x1 x2 y1 y2) [y1 x1 y2 x2] [x1 x2 y1 y2])) (defn- adjust-direction [x1 x2 y1 y2] ; <3> (if (> (int x1) (int x2)) [x2 y2 x1 y1] [x1 y1 x2 y2])) < 4 > (->>...
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OperationsonNumbers/unchecked-add-intandotherunckecked-intoperators/3.clj
clojure
<3>
< 1 > (> (Math/abs (unchecked-subtract-int y1 y2)) (Math/abs (unchecked-subtract-int x1 x2)))) < 2 > (if (steep? x1 x2 y1 y2) [y1 x1 y2 x2] [x1 x2 y1 y2])) (if (> (int x1) (int x2)) [x2 y2 x1 y1] [x1 y1 x2 y2])) < 4 > (->> [x1 x2 y1 y2] (apply adjust-slope) (apply...
972d0d9cb09e59bf804b208a35d96a03441335fc818daf91e82d94e5380e712a
macourtney/Dark-Exchange
identity.clj
(ns test.darkexchange.model.identity (:require [test.fixtures.identity :as identity-fixture] [test.fixtures.peer :as peer-fixture] [test.fixtures.util :as fixtures-util]) (:use clojure.contrib.test-is darkexchange.model.identity)) (fixtures-util/use-fixture-maps :once identi...
null
https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/test/test/darkexchange/model/identity.clj
clojure
(ns test.darkexchange.model.identity (:require [test.fixtures.identity :as identity-fixture] [test.fixtures.peer :as peer-fixture] [test.fixtures.util :as fixtures-util]) (:use clojure.contrib.test-is darkexchange.model.identity)) (fixtures-util/use-fixture-maps :once identi...
713b2ea4d5dde1f4116a1e021f10434ceb6ae09ab84cb54abef06cc0792157ba
hyperfiddle/electric
missionary5_reactor.clj
(ns dustin.missionary5_reactor (:require [minitest :refer [tests]] [missionary.core :as m :refer [? ?? ?! ap]])) (defn sleep-emit [delays] (ap (let [n (?? (m/enumerate delays))] (? (m/sleep n n))))) (tests (? (m/aggregate conj (sleep-emit [100 200 300]))) 600ms delay := [100 200 300] (? (...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2021/missionary/missionary5_reactor.clj
clojure
hang, reactor never terminates works async version
(ns dustin.missionary5_reactor (:require [minitest :refer [tests]] [missionary.core :as m :refer [? ?? ?! ap]])) (defn sleep-emit [delays] (ap (let [n (?? (m/enumerate delays))] (? (m/sleep n n))))) (tests (? (m/aggregate conj (sleep-emit [100 200 300]))) 600ms delay := [100 200 300] (? (...
5a5a8b25beba61188b348c3706da495b723a4b847186767bcdf948f5d33f5b1f
ragkousism/Guix-on-Hurd
derivations.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2012 , 2013 , 2014 , 2015 , 2016 , 2017 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Founda...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/tests/derivations.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2012 , 2013 , 2014 , 2015 , 2016 , 2017 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (unsetenv "http_proxy") (define-module (test-derivations) #:use-module (guix...
e6fff3e552fa479377bce22bb3b969f8d714fd5ec6e8f40a1af974a9ea2abd96
screenshotbot/screenshotbot-oss
impl-util.lisp
;;;; impl-util.lisp (in-package #:ql-impl-util) (definterface call-with-quiet-compilation (fun) (:documentation "Call FUN with warnings, style-warnings, and other verbose messages suppressed.") (:implementation t (let ((*load-verbose* nil) (*compile-verbose* nil) (*load-print* nil) ...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/9c420accecde01d15a2ca5773dec110a57eef92b/quicklisp/quicklisp/impl-util.lisp
lisp
impl-util.lisp probe-file is specified to return the truename of the path, truenamize it . The init-file is somewhere outside of the home directory Directory write date Deleting a directory tree :full gives pathnames as well as truenames, BUT: it returns a singleton pathname, not a list, on dead symlinks....
(in-package #:ql-impl-util) (definterface call-with-quiet-compilation (fun) (:documentation "Call FUN with warnings, style-warnings, and other verbose messages suppressed.") (:implementation t (let ((*load-verbose* nil) (*compile-verbose* nil) (*load-print* nil) (*compile-p...
38a4ad8f488fd31a0b1c3232118651d6808093fff5c03863a2cd3b9bf753f9b0
JohannesFKnauf/parti-time
yaml_test.clj
(ns parti-time.input.yaml-test (:require [yaml.core :as yaml] [clojure.test :as t] [parti-time.util.time :as time] [parti-time.input.yaml :as sut])) (t/deftest yaml-input-format-test (t/testing "Timeslice Mapping" (t/is (= {:start-time (time/parse-iso-date-time "2019-07-02t...
null
https://raw.githubusercontent.com/JohannesFKnauf/parti-time/ee85944e7ba201c4a46be152b09b2f7c591c0389/src/test/clj/parti_time/input/yaml_test.clj
clojure
(ns parti-time.input.yaml-test (:require [yaml.core :as yaml] [clojure.test :as t] [parti-time.util.time :as time] [parti-time.input.yaml :as sut])) (t/deftest yaml-input-format-test (t/testing "Timeslice Mapping" (t/is (= {:start-time (time/parse-iso-date-time "2019-07-02t...
ff1a92c3812c74f742ba1a5096f2fff19eeff1601877e15f2a320eefc9485717
wardle/pc4
events.cljs
(ns eldrix.pc4-ward.events "Main application events including - Database initialisation - Timers - Panel management / navigation" (:require [re-frame.core :as rf] [day8.re-frame.http-fx] ;; required for its side-effects in registering a re-frame "effect" [eldrix.pc4...
null
https://raw.githubusercontent.com/wardle/pc4/27471caddcb93af1cf93a19144b71333f54b703d/pc4-ward/src/eldrix/pc4_ward/events.cljs
clojure
required for its side-effects in registering a re-frame "effect" call our timer events at the required intervals usage: (rf/dispatch [:timer a-js-Date]) <-- notice how we de-structure the event vector
(ns eldrix.pc4-ward.events "Main application events including - Database initialisation - Timers - Panel management / navigation" (:require [re-frame.core :as rf] [eldrix.pc4-ward.db :as db] [eldrix.pc4-ward.user.events :as user-events] [eldrix.pc4-ward.server :as srv] [reitit.frontend.con...
303fc37bee4b9bf75a3d431123c15b5d0b637e18c7d3114e616b309c2bb48587
helium/plumtree
plumtree_broadcast.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may ob...
null
https://raw.githubusercontent.com/helium/plumtree/3ef02920bd1e31dd8d9b5d9ca88f49639036ad9b/src/plumtree_broadcast.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(...
1f12bb61963d58a818e4ee5a0a71e6f83c540f6409fc94125f22dceaf58bed8a
serokell/blockchain-util
BaseConf.hs
# LANGUAGE DataKinds # module Snowdrop.Block.Exec.BaseConf where import Universum import Control.Lens (makeLenses) import Data.Default (Default (..)) import Data.Vinyl.TypeLevel (type (++)) import Snowdrop.Block (BlkConfiguration, BlockRef, ForkVerificationException...
null
https://raw.githubusercontent.com/serokell/blockchain-util/a6428c6841e7002605a115002f58eff78ff9f128/snowdrop-block-exec/src/Snowdrop/Block/Exec/BaseConf.hs
haskell
# LANGUAGE DataKinds # module Snowdrop.Block.Exec.BaseConf where import Universum import Control.Lens (makeLenses) import Data.Default (Default (..)) import Data.Vinyl.TypeLevel (type (++)) import Snowdrop.Block (BlkConfiguration, BlockRef, ForkVerificationException...
8ff7550f7de2ce70f55afbfebdcc15dabd33fee5261d4571fefa42e052368131
MLstate/opalang
trx_auto_ast.ml
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/libtrx/trx_auto_ast.ml
ocaml
=========================================================================================================== ========================================= Utilities for --auto-ast ======================================== ===================================================================================================...
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
2435c456710d9fb7df3d0efea7b2661c2c386f5dfb35c1647b53125267e36da6
zadarnowski/postgresql-wire-protocol
Value.hs
-- | Module: Database.PostgreSQL.Protocol.Value -- Description: Asynchronous database client Copyright : © 2015 - 2020 < > License : BSD3 Maintainer : -- Stability: experimental -- Portability: portable -- -- ... {-# LANGUAGE OverloadedStrings #-} module Database.PostgreSQL.Value ( IsVa...
null
https://raw.githubusercontent.com/zadarnowski/postgresql-wire-protocol/00c1414ffd37b4157a335d8736a771175638dd92/src/Database/PostgreSQL/Value.hs
haskell
| Module: Database.PostgreSQL.Protocol.Value Description: Asynchronous database client Stability: experimental Portability: portable ... # LANGUAGE OverloadedStrings #
Copyright : © 2015 - 2020 < > License : BSD3 Maintainer : module Database.PostgreSQL.Value ( IsValue(..), toQuotedSqlLiteral ) where import Data.Bool import Data.Int import Data.Word import Database.PostgreSQL.Protocol.Types (ObjectID) import qualified Database.PostgreSQL.Protocol.ObjectID...
efd30d38658a84b20e0cf32e39a531c9885570a8b1108cb4d6909ad817443693
let-def/lrgrep
Glue.ml
(******************************************************************************) (* *) (* Fix *) (* ...
null
https://raw.githubusercontent.com/let-def/lrgrep/29e64174dc9617bcd1871fd2e4fd712269568324/lib/fix/Glue.ml
ocaml
**************************************************************************** Fix ...
, Paris . All rights reserved . This file is distributed under the terms of the GNU Library General Public License version 2 , with a open Sigs module CHAR = struct type t = char end module INT = struct type t = int end module STRING = struct...
443c2742e8d53dcb73c5a043ebe17c790e0c262f6f8a676c57381c43d404a478
mirage/mirage-skeleton
unikernel.ml
open Lwt.Infix module Make (Console : Mirage_console.S) (Store : Mirage_kv.RO) = struct module Key = Mirage_kv.Key let log console fmt = Fmt.kstr (Console.log console) fmt let start console store = Store.get store (Key.v (Key_gen.filename ())) >>= function | Error err -> log console "Error: %a.\n%!" St...
null
https://raw.githubusercontent.com/mirage/mirage-skeleton/144d68992a284730c383eb3d39c409a061bc452e/applications/docteur/unikernel.ml
ocaml
open Lwt.Infix module Make (Console : Mirage_console.S) (Store : Mirage_kv.RO) = struct module Key = Mirage_kv.Key let log console fmt = Fmt.kstr (Console.log console) fmt let start console store = Store.get store (Key.v (Key_gen.filename ())) >>= function | Error err -> log console "Error: %a.\n%!" St...
af5505cd46a40e2fa3c9acb734639c0bb9626ec625f946c7b620b9172469a61c
input-output-hk/plutus-apps
Plutus.hs
# LANGUAGE TemplateHaskell # module Test.PlutusExample.Plutus where import Cardano.Prelude import Cardano.Api import Cardano.Api.Shelley import Hedgehog (Property, forAll, property, (===)) import Cardano.Ledger.Alonzo.TxInfo qualified as Alonzo import PlutusExample.ScriptContextChecker import Gen.Cardano.Api.Typ...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/5ff40dafcdb07483442093efb4eaa39d12f34880/plutus-example/test/Test/PlutusExample/Plutus.hs
haskell
Api <-> ledger round trip
# LANGUAGE TemplateHaskell # module Test.PlutusExample.Plutus where import Cardano.Prelude import Cardano.Api import Cardano.Api.Shelley import Hedgehog (Property, forAll, property, (===)) import Cardano.Ledger.Alonzo.TxInfo qualified as Alonzo import PlutusExample.ScriptContextChecker import Gen.Cardano.Api.Typ...
7ff72e085a39d5b2c812c67ceb44e4a4a2553618db2abb47597ef6a75cdf85e6
cblp/stack-offline
Spec.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # # LANGUAGE PatternSynonyms # # LANGUAGE QuasiQuotes # import Control.Monad (unless) import Data.String.Interpolate (i) import Data.Tuple.Operator (pattern (:-)) import Development.Shake (Action, liftIO, s...
null
https://raw.githubusercontent.com/cblp/stack-offline/94215104d0cd295e39815db307513a5cc959e02f/test/Spec.hs
haskell
# LANGUAGE DeriveAnyClass # | Full cycle test configuration ghc-7.8.4 ghc-7.10.2 ghc-7.10.3 Tool local - bin - path="tmp / bin " --stack - root="$cwd / tmp / stack " install resolver="#{snapshot}" --tgz="#{packFile}"
# LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # # LANGUAGE PatternSynonyms # # LANGUAGE QuasiQuotes # import Control.Monad (unless) import Data.String.Interpolate (i) import Data.Tuple.Operator (pattern (:-)) import Development.Shake (Action, liftIO, shakeArgs, shakeOptions) import D...
ff77ce743a25d1c2d80af6d7e4a3b691b7ac89c366ed33dc5c548b595c982a0c
tweag/pirouette
Example.hs
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveLift #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # | Defines an example language to interact with Pirouette . We use this language to test Pirouette , but this module can be seen as...
null
https://raw.githubusercontent.com/tweag/pirouette/66f600942282b49c4d73d27aed91da79b914be7a/src/Language/Pirouette/Example.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveLift # # LANGUAGE OverloadedStrings # language in pirouette. We export just the builtin types and quasiquoters for easily writing pirouette terms * Language Definition | A type-level name for the example language there are definitions for its builtin types, terms...
# LANGUAGE PatternSynonyms # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # | Defines an example language to interact with Pirouette . We use this language to test Pirouette , but this module can be seen as a tutorial to defining your own Check the @tests / unit / Language / Pirouette / ExampleSpec.hs...
fb0aae0b550fa3c7dbce412e632ded18821812c879e0a7896fd836a611d9f54e
HealthSamurai/stresty
matcho_test.clj
(ns stresty.matchers.matcho-test (:require [stresty.matchers.matcho :as sut] [matcho.core :as matcho] [clojure.test :as t :refer [deftest]] [zen.core :as zen])) (def ztx (zen/new-context)) (zen/read-ns ztx 'sty) (defmacro match "Match against each pattern and assert with is" ...
null
https://raw.githubusercontent.com/HealthSamurai/stresty/f87f92c05c4813e954ad9fec7901a975384d9704/test/stresty/matchers/matcho_test.clj
clojure
(match {:a "string"} {:a "#str\\w+"} empty?) (match {:body {:id "new-patient"}} {:body {:id "{user.data.patient_id}"}})
(ns stresty.matchers.matcho-test (:require [stresty.matchers.matcho :as sut] [matcho.core :as matcho] [clojure.test :as t :refer [deftest]] [zen.core :as zen])) (def ztx (zen/new-context)) (zen/read-ns ztx 'sty) (defmacro match "Match against each pattern and assert with is" ...
017dfe6f7f435578e83800f1d3dff4a27219d7d9b4d7e8120a4de2698d6cd0b1
ulfsauer0815/ghmm
Markdown.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE OverloadedStrings #-} -- | Utility functions related to message formatting, especially markdown. module Message.Markdown ( quote , ml , mr , ma , tl , nl , italic , bold , codeblock , blockquote , link , h1, h2, h3, h4, h5...
null
https://raw.githubusercontent.com/ulfsauer0815/ghmm/fc81948316156c67f6af9fe08a8a49472e9a42b8/src/Message/Markdown.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings # | Utility functions related to message formatting, especially markdown. ---------------------------------------------- | Type constraints for spring-like types. | Text as a codeblock | Linkified text | Text put in quotes | Text in italics | Text in b...
module Message.Markdown ( quote , ml , mr , ma , tl , nl , italic , bold , codeblock , blockquote , link , h1, h2, h3, h4, h5 , itemize , uln , ln , cmb ) where import Data.Maybe import Data.Monoid import Data.String (...
3e3f32d8a821bcbb5b5c7c23370c8944d8f70fe3ac11be88f3cb15ee8e5ad087
Workiva/eva
spec.clj
Copyright 2015 - 2019 Workiva Inc. ;; ;; Licensed under the Eclipse Public License 1.0 (the "License"); ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -1.0.php ;; ;; Unless required by applicable law or agreed to in writing, software dist...
null
https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/src/eva/v2/utils/spec.clj
clojure
Licensed under the Eclipse Public License 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -1.0.php Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...
Copyright 2015 - 2019 Workiva Inc. distributed under the License is distributed on an " AS IS " BASIS , (ns eva.v2.utils.spec (:require [clojure.spec.alpha :as s] [eva.error :refer [raise]])) (defn conform-spec [spec x] (let [conformed (s/conform spec x)] (if (s/invalid? conformed) (rais...
0e81f3c9ae5cfa346168ff98d9a09c1a18a6c7b2a334f514785c5f4ddfeed98a
2600hz-archive/whistle
vm_memory_monitor.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/rabbitmq_server-2.4.1/src/vm_memory_monitor.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. of available me...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is VMware , Inc. Copyright ( c ) 2007 - 2011 VMware , Inc. All rights reserved . In practice...
f4ab2ed2d2e70e0dedd3db0af2013666e698a9534b7dec7d852807a669b097e5
tweag/asterius
T5900.hs
import Data.Bits import Data.Word import Debug.Trace fl :: Word64 -> Word64 -> Word64 fl fin sk = let (x1, x2) = w64tow32 fin in let (k1, k2) = w64tow32 sk in let y2 = x2 `xor` ((x1 .&. k1) `rotateL` 1) in let y1 = x1 `xor` (y2 .|. k2) in trace (show fin ++ " " ++ show sk ++ " -...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/codeGen/T5900.hs
haskell
import Data.Bits import Data.Word import Debug.Trace fl :: Word64 -> Word64 -> Word64 fl fin sk = let (x1, x2) = w64tow32 fin in let (k1, k2) = w64tow32 sk in let y2 = x2 `xor` ((x1 .&. k1) `rotateL` 1) in let y1 = x1 `xor` (y2 .|. k2) in trace (show fin ++ " " ++ show sk ++ " -...
ea868be86d84320f207940b4de8d1a870b0c26114feeb4ca355ee7117b03ba33
vouillon/animals
compact_tree_2.ml
#! /usr/bin/ocaml #load "str.cma" let (>>) x f = f x type 'a tree = Node of 'a * 'a tree list let important_node info = info.[0] = '|' let compress_nodes node = let rec compute is_root n = let Node (info, ch) = n in let ch = List.map (fun n -> compute false n) ch in let ch = List.fold_right ...
null
https://raw.githubusercontent.com/vouillon/animals/8dc1863e802c00aad352ca39ec2cd33a8c5565ec/tools/compact_tree_2.ml
ocaml
Remove nodes with a single child **
#! /usr/bin/ocaml #load "str.cma" let (>>) x f = f x type 'a tree = Node of 'a * 'a tree list let important_node info = info.[0] = '|' let compress_nodes node = let rec compute is_root n = let Node (info, ch) = n in let ch = List.map (fun n -> compute false n) ch in let ch = List.fold_right ...
8bda9ba7672d6d67a92e97765464002960ed939b7820ec9d00bc8ead4f250530
tfausak/strive
Client.hs
-- | Types and functions for dealing with the API client itself. module Strive.Client ( Client (..), buildClient, ) where import Data.ByteString.Lazy (ByteString) import Data.Text (Text, unpack) import Network.HTTP.Client (Request, Response, httpLbs, newManager) import Network.HTTP.Client.TLS (tlsManagerSettin...
null
https://raw.githubusercontent.com/tfausak/strive/82294daca85ca624ca1e746d7aa4c01d57233356/source/library/Strive/Client.hs
haskell
| Types and functions for dealing with the API client itself. | Strava V3 API client. | Build a new client using the default HTTP manager to make requests.
module Strive.Client ( Client (..), buildClient, ) where import Data.ByteString.Lazy (ByteString) import Data.Text (Text, unpack) import Network.HTTP.Client (Request, Response, httpLbs, newManager) import Network.HTTP.Client.TLS (tlsManagerSettings) data Client = Client { client_accessToken :: String, c...
d3491e81bfcedde5feaf43f067a1564b1f427314d8304843749e81ff7e18df70
racket/plot
90.rkt
#lang racket (require pict plot racket/draw (only-in racket/gui/base sleep/yield) rackunit) ; tests for PR#90, " Plotmetrics : access / calculate data about the plot area " (define pr90-test-suite (make-test-suite "PR#90: plotmetrics" (append (let...
null
https://raw.githubusercontent.com/racket/plot/297d01a7a949ca872ffa4800ee5a6c1bff60ddd8/plot-test/plot/tests/PRs/90.rkt
racket
tests for PR#90, It's uncertain that the sleep/yield will be long enough for the async update to finish for now this test is disabled. (test-suite "PR90: 3d/snip after resize"
#lang racket (require pict plot racket/draw (only-in racket/gui/base sleep/yield) rackunit) " Plotmetrics : access / calculate data about the plot area " (define pr90-test-suite (make-test-suite "PR#90: plotmetrics" (append (let* ([bm (make-object ...
d59decae0678b83ca64efa0c00e62ec1d6914f1b9b8826c6eb579d96956d92db
probprog/bopp
error_handling.clj
(ns bopp.error-handling "Error handling for BOPP") (defn- dist-type [dist-symbol] "Given a distribution object symbol, returns either 'continuous or 'discrete." (cond (some #(= dist-symbol %) ['bernoulli 'binomial 'categorical 'discrete 'flip 'poisson 'uniform-discrete]) 'd...
null
https://raw.githubusercontent.com/probprog/bopp/cfb93c22cd7f97ec303eb47b6748b6124b9b5914/src/bopp/error_handling.clj
clojure
the binding vector
(ns bopp.error-handling "Error handling for BOPP") (defn- dist-type [dist-symbol] "Given a distribution object symbol, returns either 'continuous or 'discrete." (cond (some #(= dist-symbol %) ['bernoulli 'binomial 'categorical 'discrete 'flip 'poisson 'uniform-discrete]) 'd...
bc8c34c5aa018d57973c10ee8a877ed3d7b5e2d87b1e4f7be3a1044b4a68fb62
ruuvi/ruuvitracker_server
util_test.clj
(ns ruuvi-server.util-test (:use ruuvi-server.util) (:use midje.sweet) (:require [clojure.java.io :as io]) ) ;; map handling (fact "remove-nil-values returns nil as nil" (remove-nil-values nil) => nil) (fact "remove-nil-values removes nils and empty values from top level" (remove-nil-values ...
null
https://raw.githubusercontent.com/ruuvi/ruuvitracker_server/269041aa2ff450c0f35183de0264d82a5c3881f1/test/ruuvi_server/util_test.clj
clojure
map handling wrap-dir-index wrap-add-html-suffix
(ns ruuvi-server.util-test (:use ruuvi-server.util) (:use midje.sweet) (:require [clojure.java.io :as io]) ) (fact "remove-nil-values returns nil as nil" (remove-nil-values nil) => nil) (fact "remove-nil-values removes nils and empty values from top level" (remove-nil-values {nil :x :a fals...
63e7ef76e1c2188cefce1e439ec90c306ff9e453cf77344a98c1a6750ef49eef
wavewave/hoodle
BBox.hs
# LANGUAGE RecordWildCards # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # module Data.Xournal.BBox where import Control.Monad (guard, liftM2) import qualified Data.Foldable as F import Data.Kind (Type) import Data.Serialize (Serialize, get, put) import Data.Strict.Tuple (Pair, fst, snd) import Data.Xourn...
null
https://raw.githubusercontent.com/wavewave/hoodle/0d94530020e3e9641a652edade77cd0eb8d9a1a4/xournal-types/src/Data/Xournal/BBox.hs
haskell
| bounding box type | | | | | | | | | | | | | | | | | | |
# LANGUAGE RecordWildCards # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # module Data.Xournal.BBox where import Control.Monad (guard, liftM2) import qualified Data.Foldable as F import Data.Kind (Type) import Data.Serialize (Serialize, get, put) import Data.Strict.Tuple (Pair, fst, snd) import Data.Xourn...
e916ba5d30455ff906957e158fd136fbe53276f66f70f0cb31c2b7d2b37c5e1e
lemmaandrew/CodingBatHaskell
noTriples.hs
From Given an array of ints , we 'll say that a triple is a value appearing 3 times in a row in the array . Return true if the array does not contain any triples . Given an array of ints, we'll say that a triple is a value appearing 3 times in a row in the array. Return true if the array does not contain any ...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Warmup-2/noTriples.hs
haskell
From Given an array of ints , we 'll say that a triple is a value appearing 3 times in a row in the array . Return true if the array does not contain any triples . Given an array of ints, we'll say that a triple is a value appearing 3 times in a row in the array. Return true if the array does not contain any ...
f7d8263ce6c9ff55f5335083297d8a32cfa95035c8e057eda3677a592aafc85d
cirodrig/triolet
Pretty.hs
{-# LANGUAGE TypeSynonymInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Language.Python.Common.Pretty Copyright : ( c ) 2009 -- License : BSD-style Maintainer : -- Stability : experimental Portability : ghc -- -- Convenience class for...
null
https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/Language/Python/Common/Pretty.hs
haskell
# LANGUAGE TypeSynonymInstances # --------------------------------------------------------------------------- | Module : Language.Python.Common.Pretty License : BSD-style Stability : experimental Convenience class for pretty printing combinators. --------------------------------------------------------...
Copyright : ( c ) 2009 Maintainer : Portability : ghc module Language.Python.Common.Pretty (module TextPP, module Language.Python.Common.Pretty) where import Text.PrettyPrint as TextPP class Pretty a where pretty :: a -> Doc prettyText :: Pretty a => a -> String prettyText = render . pretty prett...
45c4d3ce263a3097ea9ffc5fd17929dcce57a05dc2c1d1f8d6001eb45a06a948
clojure-interop/google-cloud-clients
CloudSchedulerClient$ListJobsPagedResponse.clj
(ns com.google.cloud.scheduler.v1beta1.CloudSchedulerClient$ListJobsPagedResponse (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.scheduler.v1beta1 CloudSchedulerClient$ListJobsPagedResponse])) (defn *create-async "context - `com.google.api.gax.rpc.PageContext` future-response - `co...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.scheduler/src/com/google/cloud/scheduler/v1beta1/CloudSchedulerClient%24ListJobsPagedResponse.clj
clojure
(ns com.google.cloud.scheduler.v1beta1.CloudSchedulerClient$ListJobsPagedResponse (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.scheduler.v1beta1 CloudSchedulerClient$ListJobsPagedResponse])) (defn *create-async "context - `com.google.api.gax.rpc.PageContext` future-response - `co...
840683464ca949d82b906a7139fce2bf493d00339f209fd9bdbdc0967b726210
scymtym/clim.flamegraph
recording.lisp
(cl:in-package #:clim.flamegraph.application) (defclass recording-status-pane (clim:application-pane) ((%run :initarg :run :accessor run :initform nil)) (:default-initargs :display-function 'display-recording-status)) (defmethod (setf run) :after ((new-value t) (object recording-status-pane)...
null
https://raw.githubusercontent.com/scymtym/clim.flamegraph/03b5e4f08b53af86a98afa975a8e7a29d0ddd3a7/src/application/recording.lisp
lisp
(cl:in-package #:clim.flamegraph.application) (defclass recording-status-pane (clim:application-pane) ((%run :initarg :run :accessor run :initform nil)) (:default-initargs :display-function 'display-recording-status)) (defmethod (setf run) :after ((new-value t) (object recording-status-pane)...
8c0d2d54aeefc330642f3e2df08cff08272a94179f7e9aa6363c21b8862d6ddc
gsakkas/rite
20060323-18:45:02-8c83180cdb55405fceb028edc3b8e52f.seminal.ml
exception Unimplemented exception AlreadyDone (*** part a ***) type move = Home | Forward of float | Turn of float | For of int * (move)list (*** part b -- return move***) let makePoly sides len = let fSides = float_of_int sides in let turnAmount = (2.0 *. 3.1416) /. fSides in let rec makeP...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060323-18%3A45%3A02-8c83180cdb55405fceb028edc3b8e52f.seminal.ml
ocaml
** part a ** ** part b -- return move** ::makePolyHelp 0 true ###################### ############# ######################################################## ############ ######### ############################################# ################################################ ###### ** part c ** ** part d ** **...
exception Unimplemented exception AlreadyDone type move = Home | Forward of float | Turn of float | For of int * (move)list let makePoly sides len = let fSides = float_of_int sides in let turnAmount = (2.0 *. 3.1416) /. fSides in let rec makePolyHelp sidesLeft turn = match sidesLeft with...
03845a4b5fcaba3bd7afa816a18236068468915eccbb6be67423e5f9636a1ddd
tsahyt/clingo-haskell
Model.hs
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -Wno - missing - pattern - synonym - signatures # module Clingo.Model ( Model, SolveControl, SymbolSelection (..), ModelType, pattern StableModel, pattern BraveConsequences, pattern CautiousConsequences, selectAll, selectNone, MonadMo...
null
https://raw.githubusercontent.com/tsahyt/clingo-haskell/083c84aae63565067644ccaa72223a4c12b33b88/src/Clingo/Model.hs
haskell
| Type for building symbol selections. | Get the type of a Model. | Get the number of a Model. | Get the selected symbols from a Model. | Constant time lookup to test whether an atom is in a model. | Get the cost vector of a Model | Check whether optimality of a model has been proven. | Add a clause from the mo...
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -Wno - missing - pattern - synonym - signatures # module Clingo.Model ( Model, SolveControl, SymbolSelection (..), ModelType, pattern StableModel, pattern BraveConsequences, pattern CautiousConsequences, selectAll, selectNone, MonadMo...
c32b0b2cd8dc9db7ce7d35c0c14fc9ebdd004e0ac287f72e85e18bc9ae3b435c
Frama-C/Frama-C-snapshot
widen.mli
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/utils/widen.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
9dded0586e7cf57f34291b870fe338b4cd0f7adaa37e4eeb745621aa90af970c
oofp/Beseder
Core.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeApplic...
null
https://raw.githubusercontent.com/oofp/Beseder/a0f5c5e3138938b6fa18811d646535ee6df1a4f4/src/Beseder/Base/Internal/Core.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # # LANGUAGE DefaultSignatures # # LANGUAGE ConstraintKinds # Base resource operations: - (St a) = St a --StateTransData (St a) Pai...
# LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # LANGUAGE FunctionalDependencies # # OPTIONS_GHC -fno - warn - unti...
1d22e820930425b7cd969eeaf6b66b6a76d48649718c5e7c51e094cb27e195b4
frenchfrog42/Baguette
parser.rkt
#lang racket/base ;; An interactive calculator inspired by the calculator example in the bison manual. ;; Import the parser and lexer generators. (require parser-tools/yacc parser-tools/lex (prefix-in : parser-tools/lex-sre)) (require "test.rkt") (define-tokens value-tokens (NUM VAR FNCT)) (define...
null
https://raw.githubusercontent.com/frenchfrog42/Baguette/ebb6fa6f5039f722550953a89c0784ca94cb2348/work-in-progress/parser.rkt
racket
An interactive calculator inspired by the calculator example in the bison manual. Import the parser and lexer generators. A hash table to store variable values in for the calculator recursively call the lexer on the remaining input after a tab or space. Returning the result of that operation. This effectively sk...
#lang racket/base (require parser-tools/yacc parser-tools/lex (prefix-in : parser-tools/lex-sre)) (require "test.rkt") (define-tokens value-tokens (NUM VAR FNCT)) (define-empty-tokens op-tokens (newline = OP CP + - * / ^ EOF NEG CREATE PUBLIC REQUIRE VIRGULE POINTVIRGULE OCROCHET CCROCHET FREE +BY...
42be9a6e0e3324788910e3982d343bd5f39dec9f63b6e99e58756737484ba427
alexandergunnarson/quantum
repack.cljc
(ns quantum.test.deploy.repack (:require [quantum.deploy.repack :as ns])) #?(:clj (defn test:repack! [{:keys [from-dir to-dir test-dir resources-dir license-filename logging-props-filename create-git?] :or {license-filename "LICENSE" test-dir "t...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/deploy/repack.cljc
clojure
(ns quantum.test.deploy.repack (:require [quantum.deploy.repack :as ns])) #?(:clj (defn test:repack! [{:keys [from-dir to-dir test-dir resources-dir license-filename logging-props-filename create-git?] :or {license-filename "LICENSE" test-dir "t...
eceeb10967eb8076c3de58c793489441a2bada86c8f8ff3f0d080bdc408d654e
input-output-hk/ouroboros-network
JobPool.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # | This module allows the management of a multiple Async jobs which are grouped by an ' group = > group ' type . -- module Control.Concurrent.JobPool ( JobPool , Job (..) , withJobPool , forkJob , rea...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/a8c9cfc8636172e519f7522fac04b5f6e476037b/network-mux/src/Control/Concurrent/JobPool.hs
haskell
# LANGUAGE BangPatterns # | JobPool allows to submit asynchronous jobs, wait for their completion or cancel. Jobs are grouped, each group can be cancelled separately. | An asynchronous job which belongs to some group and its exception handler. ^ job ^ error handler ^ job group ^ thread label 'bracket...
# LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # | This module allows the management of a multiple Async jobs which are grouped by an ' group = > group ' type . module Control.Concurrent.JobPool ( JobPool , Job (..) , withJobPool , forkJob , readSize , readGroupSize , waitForJob ...