_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
75c6010cc9ac164eab2b72a8e0b2181aaf33ea21ab8997062667de86f6e1e395
gafiatulin/codewars
CaesarCipher.hs
-- First Variation on Caesar Cipher -- / module Codewars.Kata.CaesarCipher (demovingShift, movingShift) where import Data.Char (chr, ord) import Data.List.Split (chunksOf) demovingShift :: [String] -> Int -> String demovingShift xs shift = zipWith (curry f) (concat xs) (map negate [shift, shift+1 ..]) movin...
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/5%20kyu/CaesarCipher.hs
haskell
First Variation on Caesar Cipher /
module Codewars.Kata.CaesarCipher (demovingShift, movingShift) where import Data.Char (chr, ord) import Data.List.Split (chunksOf) demovingShift :: [String] -> Int -> String demovingShift xs shift = zipWith (curry f) (concat xs) (map negate [shift, shift+1 ..]) movingShift :: String -> Int -> [String] movin...
c45929698a9d8843c63c66c4d177cbdb4ed9498eb27c82e51bf2743a60786c3e
acl2/acl2
find-a-base-case.lisp
Author : ( ) (in-package "APT") (include-book "std/util/bstar" :dir :system) (include-book "std/util/define" :dir :system) (include-book "kestrel/utilities/forms" :dir :system) (include-book "kestrel/terms-light/expr-calls-fn" :dir :system) (include-book "kestrel/utilities/translate" :dir :system) (include-book ...
null
https://raw.githubusercontent.com/acl2/acl2/44f76f208004466a9e6cdf3a07dac98b3799817d/books/kestrel/apt/utilities/find-a-base-case.lisp
lisp
Variant on translated terms Variant on untranslated terms
Author : ( ) (in-package "APT") (include-book "std/util/bstar" :dir :system) (include-book "std/util/define" :dir :system) (include-book "kestrel/utilities/forms" :dir :system) (include-book "kestrel/terms-light/expr-calls-fn" :dir :system) (include-book "kestrel/utilities/translate" :dir :system) (include-book ...
6ee1ff8870e13f463d45fb0c662c3b71d0eb74a5a2fdb5c404aa91e2b5de100e
racketscript/racketscript
list-of-list.rkt
#lang racket (define (append list1 list2) (if (null? list1) list2 (cons (car list1) (append (cdr list1) list2)))) (define (flatten lst) (cond [(empty? lst) '()] [else (let ([hd (first lst)] [tl (rest lst)]) (if (list? hd) (append (flatten hd) (flatte...
null
https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/tests/basic/list-of-list.rkt
racket
#lang racket (define (append list1 list2) (if (null? list1) list2 (cons (car list1) (append (cdr list1) list2)))) (define (flatten lst) (cond [(empty? lst) '()] [else (let ([hd (first lst)] [tl (rest lst)]) (if (list? hd) (append (flatten hd) (flatte...
118846e21c5c9912442da34f0d5b65f6e18d12890073932fa624b08b4578a5c2
qfpl/sv
Laws.hs
# LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE FlexibleContexts # module Data.Sv.Core.Laws (test_Laws) where import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.List.NonEmpty (NonEmpty ((:|))) import Data.Monoid (Last) im...
null
https://raw.githubusercontent.com/qfpl/sv/74aa56bcdcc0d7f1d7b5783bf59e3878dfbb64bc/sv-core/test/Data/Sv/Core/Laws.hs
haskell
# LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE FlexibleContexts # module Data.Sv.Core.Laws (test_Laws) where import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.List.NonEmpty (NonEmpty ((:|))) import Data.Monoid (Last) im...
b315cc99f64b609fcb0d4b4815dd8dce47b0e7623fc3a182c8cf94ea3052cea3
aryx/lfs
lfs.ml
open Common open Ofullcommon open Printf let (push: 'a -> 'a stack -> 'a stack) = fun x xs -> x::xs let copyright () = pr2 "LFS, the Logic File System -- Yoann Padioleau. Copyright (C) 2000-2008 University de Rennes 1, Institut National de Recherche en Informatique et en Automatique (INRIA). This program is free s...
null
https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/lfs_core/lfs.ml
ocaml
*************************************************************************** Data Structures *************************************************************************** Obj of mean: a |= b ? --------------------------------------------------------------------------- effect!: on w, could do it other way cos less...
open Common open Ofullcommon open Printf let (push: 'a -> 'a stack -> 'a stack) = fun x xs -> x::xs let copyright () = pr2 "LFS, the Logic File System -- Yoann Padioleau. Copyright (C) 2000-2008 University de Rennes 1, Institut National de Recherche en Informatique et en Automatique (INRIA). This program is free s...
212fcf365e3b20be4218d73df5c710f5bb0958fd6ac837de771887210828e0b8
cemerick/url
project.clj
(defproject com.cemerick/url "0.1.2-SNAPSHOT" :description "Makes working with URLs in Clojure a little more pleasant." :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"] [pathetic "0.5.0"] [org.clojure/cl...
null
https://raw.githubusercontent.com/cemerick/url/a785b844e178d6691d17b514aa217777224c9f59/project.clj
clojure
(defproject com.cemerick/url "0.1.2-SNAPSHOT" :description "Makes working with URLs in Clojure a little more pleasant." :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"] [pathetic "0.5.0"] [org.clojure/cl...
438924fcd0a053c4df716db69ba2ab323b402814b8ebdb1331922732012761fe
dzhus/csg
raycaster.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # # LANGUAGE RecordWildCards # {-# LANGUAGE OverloadedStrings #-} | Standalone raycaster for CSG objects powered by Gloss . | Standalone raycaster for CSG objects powered by Gloss. |-} import Prelude hiding (FilePath) import Control.Applicative import qualified Da...
null
https://raw.githubusercontent.com/dzhus/csg/a0fea0de2fd7928a0b9c99e68ce5abb1ca6efff9/exe/raycaster.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # | World state with observation point parameters and event helpers. Roll is always 0. ^ Distance to origin. ^ Where camera looks at. ^ Point where mouse button was held down. | Command line options for caster. ^ Color for bright surfaces parallel to view pl...
# LANGUAGE CPP # # LANGUAGE RecordWildCards # | Standalone raycaster for CSG objects powered by Gloss . | Standalone raycaster for CSG objects powered by Gloss. |-} import Prelude hiding (FilePath) import Control.Applicative import qualified Data.Strict.Maybe as S import GHC.Float import Data.String #if MIN...
817c148164380179ff465eb190b152b70cd5879fbcbc75aa7c42a4f1b45d4024
marick/Midje
pass-emitter.clj
(ns ^{:doc "Adding an emitter that brags about fact results"} example.pass-emitter (:require [midje.emission.plugins.util :as util] [midje.data.fact :as fact] [midje.emission.plugins.default :as default] [midje.emission.state :as state])) (defn finishing-top-level-fact [fact] ...
null
https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/examples/pass-emitter.clj
clojure
Plugins are not responsible for keeping track of successes and failures. That happens independently, and you gain access to the The emission map is how you hook your functions into the system. It also makes it convenient to "inherit" from an existing map. Here's where the installation happens.
(ns ^{:doc "Adding an emitter that brags about fact results"} example.pass-emitter (:require [midje.emission.plugins.util :as util] [midje.data.fact :as fact] [midje.emission.plugins.default :as default] [midje.emission.state :as state])) (defn finishing-top-level-fact [fact] ...
5bf10b8ac28c7ab1e9793ee76c4138a3bbb51250c9088e67b893e7dc45242cd7
S8A/htdp-exercises
ex025.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex025) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex025.rkt
racket
about the language level of this file in a form that our tools can easily process.
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex025) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none ...
89e05d2e85be1fc0f65ca52d11ba4b68d3f6bdded22f6b7aa8aa59466643d7cf
awakesecurity/language-ninja
Orphans.hs
-*- coding : utf-8 ; mode : ; -*- -- File: tests/Tests.hs -- -- License: -- Copyright 2017 Awake Security -- 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 -- -- ...
null
https://raw.githubusercontent.com/awakesecurity/language-ninja/e7badf49b45d9c28b558376be3152d51f5d2d437/tests/Tests/Orphans.hs
haskell
File: tests/Tests.hs License: Copyright 2017 Awake Security 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...
-*- coding : utf-8 ; mode : ; -*- Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , # OPTIONS_GHC -fno - warn - orphans # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE Overloade...
dcb6c4b14e113470a754f0eb9b17f19c88cb3d59c9ff7c64827f2e0747863e5f
awslabs/quivela
Pretty.hs
module Quivela.Pretty ( angled , binop , const , map , mapP , object , record , set , setP , show , step ) where import qualified Data.List as L import qualified Data.Map as M import qualified Data.Set as Set import qualified Data.Text.Prettyprint.Doc as P import Data.Text.Prettyprint.Doc (Doc,...
null
https://raw.githubusercontent.com/awslabs/quivela/c58a883c9387c18b51a83ede60fbb131357173e8/src/Quivela/Pretty.hs
haskell
module Quivela.Pretty ( angled , binop , const , map , mapP , object , record , set , setP , show , step ) where import qualified Data.List as L import qualified Data.Map as M import qualified Data.Set as Set import qualified Data.Text.Prettyprint.Doc as P import Data.Text.Prettyprint.Doc (Doc,...
ea4985923f19ffae1585a2b07ae60fa30690b50671356ade2a1c0d4b9ccccce7
frenchy64/fully-satisfies
benchmark_linear.clj
;; lein bench-linear (ns benchmark-linear (:require [criterium.core :as c] [clojure.pprint :as pp] [oz.core :as oz] [io.github.frenchy64.fully-satisfies.linear :refer [butlast+last count+last]] [io.github.f...
null
https://raw.githubusercontent.com/frenchy64/fully-satisfies/280391854b71ebe1d2565f2103ab8e8c9c52774a/scripts/benchmark_linear.clj
clojure
lein bench-linear
(ns benchmark-linear (:require [criterium.core :as c] [clojure.pprint :as pp] [oz.core :as oz] [io.github.frenchy64.fully-satisfies.linear :refer [butlast+last count+last]] [io.github.frenchy64.fully-satisf...
651f52ed7291241b8476fb117198e28bc232131216857fe9d4d02590af4a4d0b
lexi-lambda/hackett
signatures.rkt
#lang hackett (provide (for-type Catch)) (type (Catch e m a) {(m a) -> {e -> (m a)} -> (m a)})
null
https://raw.githubusercontent.com/lexi-lambda/hackett/e90ace9e4a056ec0a2a267f220cb29b756cbefce/hackett-lib/hackett/monad/trans/signatures.rkt
racket
#lang hackett (provide (for-type Catch)) (type (Catch e m a) {(m a) -> {e -> (m a)} -> (m a)})
2a6acf6e0fe16ae28db8e90d8b2ee20e07f004cb1c7fd939bb83100bbe54009b
SimonHauguel/Paso
Define.hs
module Paso.Parser.AST.Define where import Paso.Parser.AST.Function import Paso.Parser.AST.TypesRepresentation data WConstraint = Iso Type Type | Coerce Type Type deriving Show data Define = Define WConstraint [TypedFunction] deriving Show
null
https://raw.githubusercontent.com/SimonHauguel/Paso/61ae95f4b6383b400bd9fd03b07c2a92802ad220/src/Paso/Parser/AST/Define.hs
haskell
module Paso.Parser.AST.Define where import Paso.Parser.AST.Function import Paso.Parser.AST.TypesRepresentation data WConstraint = Iso Type Type | Coerce Type Type deriving Show data Define = Define WConstraint [TypedFunction] deriving Show
5c36bedbb57ff9b197a55df75164a8aae8693a576330957217c6fc6596862089
openworkload/swm-core
wm_ssh_sftp_ext.erl
-module(wm_ssh_sftp_ext). -behaviour(ssh_server_channel). -export([init/1, handle_msg/2, handle_ssh_msg/2, terminate/2]). -export([command/2, subsystem_spec/0]). -include("../lib/wm_log.hrl"). -include_lib("kernel/include/file.hrl"). -define(SSH_EXT_SUBSYSTEM, atom_to_list(?MODULE)). %% ==========================...
null
https://raw.githubusercontent.com/openworkload/swm-core/9302d13f5f9329c2975aa5d445da19ead19d978f/src/net/wm_ssh_sftp_ext.erl
erlang
============================================================================ Module API ============================================================================ ============================================================================ Server callbacks =======================================================...
-module(wm_ssh_sftp_ext). -behaviour(ssh_server_channel). -export([init/1, handle_msg/2, handle_ssh_msg/2, terminate/2]). -export([command/2, subsystem_spec/0]). -include("../lib/wm_log.hrl"). -include_lib("kernel/include/file.hrl"). -define(SSH_EXT_SUBSYSTEM, atom_to_list(?MODULE)). -spec command(pid(), term())...
1afef0b49426c7eee220f363840fc70483cba212decbe89363104a7c784b1f0a
janestreet/memtrace_viewer_with_deps
rpc_implementations.ml
open! Core_kernel open! Async open Memtrace_viewer_common let init global_state = let f user_state () = User_state.reset global_state user_state; return (User_state.data user_state) in Rpc.Rpc.implement Protocol.Init.t f ;; let update global_state = let f user_state action = User_state.update glob...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/server/src/rpc_implementations.ml
ocaml
open! Core_kernel open! Async open Memtrace_viewer_common let init global_state = let f user_state () = User_state.reset global_state user_state; return (User_state.data user_state) in Rpc.Rpc.implement Protocol.Init.t f ;; let update global_state = let f user_state action = User_state.update glob...
2e69b25579d0264ce46558d14361e6e9dc7810f2206776bf78cf713c05834061
notogawa/haiji
Filter.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} module Text.Haiji.Syntax.Filter ( Filter(..) , filter ) where #if MIN_VERSION_base(4,8,0) #else import Control.Applicative #endif import Data.Attoparsec.Text import Prelude hiding (filter) -- /#builtin-filters data Filter = FilterAbs ...
null
https://raw.githubusercontent.com/notogawa/haiji/a84f58ef0c3128dc5399ab9a63f3f21807664e6c/src/Text/Haiji/Syntax/Filter.hs
haskell
# LANGUAGE OverloadedStrings # /#builtin-filters | FilterAttr Identifier | FilterBatch | FilterCapitalize | FilterCenter Int | FilterDefault | FilterDictSort | FilterEscape | FilterFileSizeFormat | FilterFirst | FilterFloat | FilterForceEscape | FilterFormat | FilterGroupBy Variable | Filter...
# LANGUAGE CPP # module Text.Haiji.Syntax.Filter ( Filter(..) , filter ) where #if MIN_VERSION_base(4,8,0) #else import Control.Applicative #endif import Data.Attoparsec.Text import Prelude hiding (filter) data Filter = FilterAbs | FilterLength deriving Eq -} instance Sh...
bd129c7bb2c9e48108ff66b9899a184108520f5fecb4f95f4a6d866b5488ddd2
rorokimdim/stash
Main.hs
module Main where import Control.Monad (join, void, unless, when) import Control.Monad.Trans (liftIO) import Data.List (sortBy, findIndex) import Data.Maybe (fromMaybe) import System.Directory (copyFileWithMetadata, doesDirectoryExist) import System.Exit (die) import System.FilePath.Posix (combine, takeBaseName, takeD...
null
https://raw.githubusercontent.com/rorokimdim/stash/e03048f7ed0df243f51c9a87982d2e8d47cb5e5b/app/Main.hs
haskell
|Opens given value in an editor and returned the edited value. By default the editor set it EDITOR environment variable is used. If it is not set prompts user to enter editor command to use. If all fails, defaults to vim.
module Main where import Control.Monad (join, void, unless, when) import Control.Monad.Trans (liftIO) import Data.List (sortBy, findIndex) import Data.Maybe (fromMaybe) import System.Directory (copyFileWithMetadata, doesDirectoryExist) import System.Exit (die) import System.FilePath.Posix (combine, takeBaseName, takeD...
74e6e6a61fe38cb9edc5823ea88ef782794fa38ff04c82c33496e271db42a8c1
blindglobe/clocc
laser.lisp
;;; hardcopy printing ;;; Copyright ( C ) 1997 - 2001 , 2007 - 2008 by This is Free Software , covered by the GNU GPL ( v2 + ) ;;; See ;;; $ I d : , v 1.8 2008/06/16 16:02:33 sds Exp $ ;;; $Source: /cvsroot/clocc/clocc/src/cllib/laser.lisp,v $ (eval-when (:compile-toplevel :load-toplevel :execute) (require...
null
https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/cllib/laser.lisp
lisp
hardcopy printing See $Source: /cvsroot/clocc/clocc/src/cllib/laser.lisp,v $ for `list-format' for `run-prog', `pipe-output', `with-open-pipe' (let ((com (if printer "z:/public/nprint.exe" "print")) (switch (if printer '("/q=ddslaser") nil))) (mapc (lambda (fl) (run-program com :output nil ...
Copyright ( C ) 1997 - 2001 , 2007 - 2008 by This is Free Software , covered by the GNU GPL ( v2 + ) $ I d : , v 1.8 2008/06/16 16:02:33 sds Exp $ (eval-when (:compile-toplevel :load-toplevel :execute) (require :cllib-base (translate-logical-pathname "clocc:src;cllib;base")) (require :cllib-log (translate...
95be97650f03700fffaa91a9ab23a957a1f727067d5de0912b122d469c8d9698
uw-unsat/leanette-popl22-artifact
test.rkt
#lang rosette (require "machine.rkt" "indistinguishable.rkt" "verify.rkt" "basic.rkt" "jump.rkt" "call.rkt") (require rackunit rackunit/text-ui rosette/lib/roseunit rosette/solver/smt/boolector) (current-solver (boolector)) See verify-EENI-demo.rkt for details on the results expected by the tests . (def...
null
https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/ifcl/test.rkt
racket
Checks for counterexamples for bugs in basic semantics.
#lang rosette (require "machine.rkt" "indistinguishable.rkt" "verify.rkt" "basic.rkt" "jump.rkt" "call.rkt") (require rackunit rackunit/text-ui rosette/lib/roseunit rosette/solver/smt/boolector) (current-solver (boolector)) See verify-EENI-demo.rkt for details on the results expected by the tests . (def...
d8415e957be12d13595c80ebdcb65c2586dba73425d0031e05d26bd12bcd397a
project-oak/hafnium-verification
AL.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/al/AL.ml
ocaml
* Parse import files with macro definitions, and return a list of LET clauses L.(debug Linters Medium) "@\n >>>>>>Visit node %i <<<<<@\n" (Ctl_parser_types.ast_node_pointer an) ; The map should be visited when we enter the node before visiting children distinguish between then and else branch as they need diff...
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
3255aaab7b28559d84feaf91a2d3631f92b3d3e9dd4561500dd3e3f44369cae3
HeinrichApfelmus/reactive-banana
Setup.hs
-- Build .app bundles with the cabal-macosx package -- Modeled after the excellent documentation on -- -macosx/tree/master/examples import Distribution.MacOSX as Mac import Distribution.Simple import Distribution.Simple.LocalBuildInfo main :: IO () main = defaultMainWithHooks $ simpleUserHooks no - op if not ...
null
https://raw.githubusercontent.com/HeinrichApfelmus/reactive-banana/79482f3e9bfab493e2d2197f70cdb11787b33a03/reactive-banana-wx/Setup.hs
haskell
Build .app bundles with the cabal-macosx package Modeled after the excellent documentation on -macosx/tree/master/examples
import Distribution.MacOSX as Mac import Distribution.Simple import Distribution.Simple.LocalBuildInfo main :: IO () main = defaultMainWithHooks $ simpleUserHooks no - op if not } myPostBuild a b c d = Mac.appBundleBuildHook (filterApps a guiApps) a b c d filterApps :: [String] -> [MacApp] -> [MacApp] filte...
0470b5f45fdab632307e86329af267b065aeaf7c6f05dd5a1b625b44b2bbecf2
emmanueltouzery/hsexif
PrettyPrinters.hs
# LANGUAGE ScopedTypeVariables , OverloadedStrings , CPP # module Graphics.PrettyPrinters where import Text.Printf (printf) import Data.Map (Map) import Data.Maybe import qualified Data.Map as Map import qualified Data.ByteString as BS import Control.Arrow (first) import Data.Text.Encoding import qualified Data.Text a...
null
https://raw.githubusercontent.com/emmanueltouzery/hsexif/095b7711d9ec44d0d39dbd82e52e751c8dde39dc/Graphics/PrettyPrinters.hs
haskell
! Pretty print the undefined data ! Pretty-print aperture stored as APEX value. See: -can-the-aperture-value-written-in-exif-be-larger-than-the-nominal-limit-of-t ! Pretty print exposure time. faster times as fractions.
# LANGUAGE ScopedTypeVariables , OverloadedStrings , CPP # module Graphics.PrettyPrinters where import Text.Printf (printf) import Data.Map (Map) import Data.Maybe import qualified Data.Map as Map import qualified Data.ByteString as BS import Control.Arrow (first) import Data.Text.Encoding import qualified Data.Text a...
039438e41636f30ee080582120930f72b95ae2538087f42704088828b79b86c0
Bannerets/camlproto
PlatformTypes.ml
open! Base module type HashFn = sig type t val init: unit -> t val feed: t -> Cstruct.t -> unit val get: t -> Cstruct.t val digest: Cstruct.t -> Cstruct.t end module type AES = sig type key val ecb_create_key: Cstruct.t -> key val ecb_encrypt: key:key -> Cstruct.t -> Cstruct.t val ecb_decrypt: key:k...
null
https://raw.githubusercontent.com/Bannerets/camlproto/f67fe89fec3302fdb633781ef6155ae4433444fa/src/platform/types/PlatformTypes.ml
ocaml
val into_cstruct_be: t -> Cstruct.t -> unit val compress: Cstruct.t -> Cstruct.t
open! Base module type HashFn = sig type t val init: unit -> t val feed: t -> Cstruct.t -> unit val get: t -> Cstruct.t val digest: Cstruct.t -> Cstruct.t end module type AES = sig type key val ecb_create_key: Cstruct.t -> key val ecb_encrypt: key:key -> Cstruct.t -> Cstruct.t val ecb_decrypt: key:k...
4721bdfc6d58cbdb96d268479d70f72a82f184fa8cb1961ef9e457b8bd4ae7bc
ml4tp/tcoq
stdarg.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/interp/stdarg.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Basic generic arguments. * Aliase...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Genarg val wit_unit : ...
06a0882d3da0db5c546a0d587540dd4ecd12d71d16a4b640e62f8a18ecfc2e34
facebookarchive/pfff
ast_fuzzy.mli
type tok = Parse_info.info type 'a wrap = 'a * tok type tree = | Braces of tok * trees * tok | Parens of tok * (trees, tok (* comma*)) Common.either list * tok | Angle of tok * trees * tok (* note that gcc allows $ in identifiers, so using $ for metavariables * means we will not be able to match such ide...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/h_program-lang/ast_fuzzy.mli
ocaml
comma note that gcc allows $ in identifiers, so using $ for metavariables * means we will not be able to match such identifiers (but no big deal) note that "..." are allowed in many languages, so using "..." * to represent a list of anything means we will not be able to * match specifically "...". ...
type tok = Parse_info.info type 'a wrap = 'a * tok type tree = | Braces of tok * trees * tok | Angle of tok * trees * tok | Metavar of string wrap | Dots of tok | Tok of string wrap and trees = tree list val is_metavar: string -> bool val abstract_position_trees: trees -> trees val toks_of_trees: tr...
71802815acfb7c040d43a301c682da11126e714fbc9fc31d26b73c8f774c2035
racket/plai
mutator4.rkt
#lang plai/mutator (allocator-setup "../good-collectors/good-collector.rkt" 100) (cons 4 #t)
null
https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc/good-mutators/mutator4.rkt
racket
#lang plai/mutator (allocator-setup "../good-collectors/good-collector.rkt" 100) (cons 4 #t)
60d67386c1f7a52e3bb0d55602ac47d529d4da80778b97cdfa02ab9e9a6f747a
ultralisp/ultralisp
s3.lisp
(defpackage #:ultralisp/uploader/s3 (:use #:cl) (:import-from #:log4cl) (:import-from #:cl-fad #:walk-directory) (:import-from #:zs3 #:put-object #:get-object) (:import-from #:ultralisp/utils #:walk-dir #:path-to-string) (:im...
null
https://raw.githubusercontent.com/ultralisp/ultralisp/37bd5d92b2cf751cd03ced69bac785bf4bcb6c15/src/uploader/s3.lisp
lisp
(let* ((absolute-dir (probe-file dir)) (dir-as-string (path-to-string absolute-dir)) (base-dir-length (length dir-as-string)) (zs3:*credentials* (or zs3:*credentials* (make-credentials))) (bucket (or *bucket* ...
(defpackage #:ultralisp/uploader/s3 (:use #:cl) (:import-from #:log4cl) (:import-from #:cl-fad #:walk-directory) (:import-from #:zs3 #:put-object #:get-object) (:import-from #:ultralisp/utils #:walk-dir #:path-to-string) (:im...
9ae4eaa69ef6ee8aebffacf8d966cd9715f6ba981c2194a2267e92c82919110b
JHU-PL-Lab/jaylang
McCarthy9103.ml
let rec bot _ = bot () let fail _ = assert false let rec mc91_1030 mc91_without_checking_1058 prev_set_flag_mc91_1049 s_prev_mc91_n_1048 n_1031 = let u = if prev_set_flag_mc91_1049 then if (111 * 1) + (-s_prev_mc91_n_1048) > (111 * 1) + (-n_1031) && (111 * 1) + (-n_1031) >= 0 th...
null
https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/termination/McCarthy9103.ml
ocaml
let rec bot _ = bot () let fail _ = assert false let rec mc91_1030 mc91_without_checking_1058 prev_set_flag_mc91_1049 s_prev_mc91_n_1048 n_1031 = let u = if prev_set_flag_mc91_1049 then if (111 * 1) + (-s_prev_mc91_n_1048) > (111 * 1) + (-n_1031) && (111 * 1) + (-n_1031) >= 0 th...
488afc2dc402d913bc759a2c3d2f83bddae781d15e9e57414d8ee418e4e78027
silky/quipper
GateDecompositions.hs
This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the -- file COPYRIGHT for a list of authors, copyright holders, licensing, -- and other details. All rights reserved. -- -- ====================================================================== -- | This library contains special decompositions...
null
https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/QuipperLib/GateDecompositions.hs
haskell
file COPYRIGHT for a list of authors, copyright holders, licensing, and other details. All rights reserved. ====================================================================== | This library contains special decompositions of particular gates into particular gate bases. It also contains functions for decompo...
This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the provide more than one decomposition . * and , /Quantum Computation and Quantum Information/ , Cambridge University Press , 2002 . * , , , and , /Integrated Circuits and Systems/ 32(6):818 - 830 . * , , , ...
24d025574c905075f268b5993aab277945a1856dbf77fe1aa94e4d88cdea43ba
ocaml-multicore/parafuzz
stack_overflow.mli
external caml_to_c : (unit -> 'a) -> 'a = "caml_to_c"
null
https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/callback/stack_overflow.mli
ocaml
external caml_to_c : (unit -> 'a) -> 'a = "caml_to_c"
359ad6c3570019c685c17a0a9b5ed44ce954d1348bde3129bf4771e1fb9a498d
xvw/quasar
console.ml
open Js_of_ocaml open Util class type hook = object inherit Firebug.console method clear : unit Js.meth method count : Js.js_string Js.t Js.Optdef.t -> unit Js.meth method countReset : Js.js_string Js.t Js.Optdef.t -> unit Js.meth method timeLog : 'a. Js.js_string Js.t -> 'a -> unit Js.meth ...
null
https://raw.githubusercontent.com/xvw/quasar/a414d32ded53562802893590e2996bb8daeb0cf3/src/js/console.ml
ocaml
open Js_of_ocaml open Util class type hook = object inherit Firebug.console method clear : unit Js.meth method count : Js.js_string Js.t Js.Optdef.t -> unit Js.meth method countReset : Js.js_string Js.t Js.Optdef.t -> unit Js.meth method timeLog : 'a. Js.js_string Js.t -> 'a -> unit Js.meth ...
fccfecd34396f6e8956e0995b95a577058aa5f5578b1bc78ba3d58b52e4ba1e4
chrissound/GitChapter
GitTextPartial.hs
# LANGUAGE LambdaCase # module GitTextPartial where import Turtle hiding (f, e, x, o, s) import Hart import Data.Text (Text, lines) import Prelude hiding (lines) import Prelude hiding (lines) import Control.Exception as Excp import System.IO.Error data GitDiffError = EmptyDiff | Failed | FileDoesNotExist deriving (Sh...
null
https://raw.githubusercontent.com/chrissound/GitChapter/4bfd9bd47b622c1dac08ab8e5ab4427432c48d26/src/GitTextPartial.hs
haskell
# LANGUAGE LambdaCase # module GitTextPartial where import Turtle hiding (f, e, x, o, s) import Hart import Data.Text (Text, lines) import Prelude hiding (lines) import Prelude hiding (lines) import Control.Exception as Excp import System.IO.Error data GitDiffError = EmptyDiff | Failed | FileDoesNotExist deriving (Sh...
1486a805dd4c2cdc85210de6c88473566f4c591cc76efc70ceea772f76569cac
fendor/hsimport
ModuleTest8.hs
module Test where import Foo.Bar import Foo.Bar.Blub import Ugah.Argh import Control.Monad hiding (when) import Control.Monad f :: Int -> Int f = (+ 3)
null
https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/goldenFiles/ModuleTest8.hs
haskell
module Test where import Foo.Bar import Foo.Bar.Blub import Ugah.Argh import Control.Monad hiding (when) import Control.Monad f :: Int -> Int f = (+ 3)
bbcafc64a63145a9167160154bd19c28b65894c61737b6c216687507221f3105
hjcapple/reading-sicp
exercise_5_46_a.scm
#lang sicp P429 - [ 练习 5.46 ] , 编译 fib (#%require "ch5-eceval-compiler.scm") (compile-and-go '(define (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) )
null
https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_5/exercise_5_46_a.scm
scheme
#lang sicp P429 - [ 练习 5.46 ] , 编译 fib (#%require "ch5-eceval-compiler.scm") (compile-and-go '(define (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) )
451be5c0f676d0fd4de2404b534d52ea25c65e9d40b25168438ff41e11c7b58f
dongcarl/guix
libphidget.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 < > Copyright © 2018 < > Copyright © 2020 < > ;;; ;;; 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 F...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/libphidget.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 © 2013 < > Copyright © 2018 < > Copyright © 2020 < > 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 < / > . (define-module (gnu packages libphidget) #:use-module (gui...
5777dc8f5e3d14bacae9502f02a522def0100669c42cfa06583aab04f6e3bc08
cljs-audio/cljs-audio
time.cljc
(ns cljs-audio.time) (def lengths {"1/4" 1 "2/4" 2 "3/4" 3 "4/4" 4 "5/4" 5 "6/4" 6 "7/4" 7 "8/4" 8 "1/8" 0.5 "2/8" 1 "3/8" 1.5 "4/8" 2 ...
null
https://raw.githubusercontent.com/cljs-audio/cljs-audio/75b8326ff0d5d610be3ea1b39979eac45dfd5b4b/src/main/cljs_audio/time.cljc
clojure
(ns cljs-audio.time) (def lengths {"1/4" 1 "2/4" 2 "3/4" 3 "4/4" 4 "5/4" 5 "6/4" 6 "7/4" 7 "8/4" 8 "1/8" 0.5 "2/8" 1 "3/8" 1.5 "4/8" 2 ...
edebae8b5e76fdb1181d8e728a3ea0098f223644ee1c442700da9e53d83f1e2b
alwx/luno-react-native
ui.cljs
(ns luno.android.ui (:require [reagent.core :as r])) (set! js/React (js/require "react-native")) (set! js/MaterialDesign (js/require "react-native-material-design")) (set! js/AndroidDialog (js/require "react-native-dialogs")) (def navigator (r/adapt-react-class (.-Navigator js/React))) (def toolbar (r/adapt-rea...
null
https://raw.githubusercontent.com/alwx/luno-react-native/34f9f8b01c1248cf64f40be9638e8352fd8fd448/src/luno/android/ui.cljs
clojure
(ns luno.android.ui (:require [reagent.core :as r])) (set! js/React (js/require "react-native")) (set! js/MaterialDesign (js/require "react-native-material-design")) (set! js/AndroidDialog (js/require "react-native-dialogs")) (def navigator (r/adapt-react-class (.-Navigator js/React))) (def toolbar (r/adapt-rea...
a7f8d0cc3d85ba4acff1fe7241b8222d05c911f5506af2cb964d1106a8db3f06
FranklinChen/hugs98-plus-Sep2006
Environment.hs
----------------------------------------------------------------------------- -- | -- Module : System.Environment Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : provisional -- Portability : portabl...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/base/System/Environment.hs
haskell
--------------------------------------------------------------------------- | Module : System.Environment License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portability : portable Miscellaneous information about the system environment. -----------...
Copyright : ( c ) The University of Glasgow 2001 module System.Environment ( #ifndef __NHC__ withArgs, withProgName, #endif #ifdef __GLASGOW_HASKELL__ getEnvironment, #endif ) where import Prelude #ifdef __GLASGOW_HASKELL__ import Foreign import Foreign.C import Control.Exception ( b...
53cf5a0ccb67048698c4090ba04abbf6f3f11bb9afbb33153f4f8963a4d67e0a
nuprl/gradual-typing-performance
data-lattice.rkt
#lang racket/base ;; Provides functions for drawing lattices that show the perf data ;; for each configuration (require racket/contract racket/format racket/list data/bit-vector racket/vector (except-in math/number-theory permutations) (only-in racket/file file->v...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/tools/benchmark-util/data-lattice.rkt
racket
Provides functions for drawing lattices that show the perf data for each configuration constructs a pict for a point in the lattice, using the initial configuration to normalize (for coloring) adds lines between elements in levels Driver submodule for rapid visualization
#lang racket/base (require racket/contract racket/format racket/list data/bit-vector racket/vector (except-in math/number-theory permutations) (only-in racket/file file->value) (only-in math/statistics mean stddev) pict) (provide (contract-out...
a8e7e1562f11162aa329a230adad746e1f7e173920a0fc94f26eb7ef856c18a4
neovimhaskell/nvim-hs
String.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # # LANGUAGE NoOverloadedStrings # | Module : Neovim . API.String Description : String based API Copyright : ( c ) License : Apache-2.0 Maintainer : Stabilit...
null
https://raw.githubusercontent.com/neovimhaskell/nvim-hs/9d0a040c24f060da57e47e1b720b99ad32e6dfc7/src/Neovim/API/String.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE RankNTypes #
# LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # # LANGUAGE NoOverloadedStrings # | Module : Neovim . API.String Description : String based API Copyright : ( c ) License : Apache-2.0 Maintainer : Stability : experimental Note that this module is completely gen...
c701b23969e648c96ba91fd73ab8e118d3644fc6e658211b7e43b7407b070c3d
clojure-interop/aws-api
ImmutableMapParameter.clj
(ns com.amazonaws.util.ImmutableMapParameter "An immutable map that could be built by convenient constructors. Example of using map Builder: { @code Map<String, AttibuteValue> item = new ImmutableMapParameter.Builder<String, AttibuteValue>() .put(\"one\", new AttibuteValue(\"1\")) ...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.util/src/com/amazonaws/util/ImmutableMapParameter.clj
clojure
(ns com.amazonaws.util.ImmutableMapParameter "An immutable map that could be built by convenient constructors. Example of using map Builder: { @code Map<String, AttibuteValue> item = new ImmutableMapParameter.Builder<String, AttibuteValue>() .put(\"one\", new AttibuteValue(\"1\")) ...
b3264ff68045093b766f7454ca980a2a57d772af74f2508cca8bf7afef44aed1
microsoft/SLAyer
DisjTransClos.ml
Copyright ( c ) Microsoft Corporation . All rights reserved . (** Disjunctive Transitive Closure *) open Library open FORMULA open CONGRUENCE_RELATION open TRANSITIVE_RELATION module LblMap = IntMap module Make (Frm: FORMULA) (CngRel: CONGRUENCE_RELATION with type exp = Frm.Exp.t an...
null
https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/DisjTransClos.ml
ocaml
* Disjunctive Transitive Closure Compute disjunctive congruence closure Compute strongest transitive and trimmed congruence closed relation forced by each leaf branch For all the clauses that mention a particular sub formula, calculate the intersection of the relations Compute relations for interna...
Copyright ( c ) Microsoft Corporation . All rights reserved . open Library open FORMULA open CONGRUENCE_RELATION open TRANSITIVE_RELATION module LblMap = IntMap module Make (Frm: FORMULA) (CngRel: CONGRUENCE_RELATION with type exp = Frm.Exp.t and type exps = Frm.Exps.t ) (DisjCngC...
720ea0f94a872016b8ad224383125409ee2b9fcebdc8b2337c6c6eb76724c917
kevinlynx/dhtcrawler
torrent_index.erl
%% %% torrent_index.erl build text to torrent index in couchdb require applications : ssl , public_key , jiffy , ibrowse , couchbeam %% 06.15.2013 %% -module(torrent_index). -include("vlog.hrl"). -behaviour(gen_server). -export([init/1, handle_info/2, handle_cast/2, handle_call/3, code_change/3,...
null
https://raw.githubusercontent.com/kevinlynx/dhtcrawler/b8a486dbebb57f9672a773a6901d59ddae97a278/src/torrent_index.erl
erlang
torrent_index.erl 06.15.2013 [{single,Hash,{"movie name",1024},1}, {multi,Hash,{"this movie update name", if not `infinity` it may timeout (>5000ms), database busy?
build text to torrent index in couchdb require applications : ssl , public_key , jiffy , ibrowse , couchbeam -module(torrent_index). -include("vlog.hrl"). -behaviour(gen_server). -export([init/1, handle_info/2, handle_cast/2, handle_call/3, code_change/3, terminate/2]). -export([start_link/2...
caadc81b5dfe4685622af878b2baf9a6936d004ef8d2f657e39f8cf74d075f9f
graninas/The-Amoeba-World
Color.hs
module Amoeba.Middleware.OpenGL.Color where import Amoeba.Middleware.OpenGL.Common white, black, red, green, blue :: GLfColor4 white = color4 1 1 1 1 black = color4 0 0 0 1 red = color4 1 0 0 1 green = color4 0 1 0 1 blue = color4 0 0 1 1
null
https://raw.githubusercontent.com/graninas/The-Amoeba-World/a147cd4dabf860bec8a6ae1c45c02b030916ddf4/src/Amoeba/Middleware/OpenGL/Color.hs
haskell
module Amoeba.Middleware.OpenGL.Color where import Amoeba.Middleware.OpenGL.Common white, black, red, green, blue :: GLfColor4 white = color4 1 1 1 1 black = color4 0 0 0 1 red = color4 1 0 0 1 green = color4 0 1 0 1 blue = color4 0 0 1 1
36197e962258a53e04ce5c5d6683ebad07dd4aaca40141c4ea17b095ccbb08fc
serokell/haskell-crypto
Streamly.hs
SPDX - FileCopyrightText : 2020 -- SPDX - License - Identifier : MPL-2.0 # OPTIONS_GHC -Wno - incomplete - uni - patterns # module Test.Crypto.Sodium.Encrypt.Symmetric.Streamly where import Hedgehog (Property, (===), evalEither, evalIO, forAll, property) import Test.HUnit ((@?=), Assertion, assert) import Cont...
null
https://raw.githubusercontent.com/serokell/haskell-crypto/e57b04d103b428b03c83565060a36da442663a5a/crypto-sodium-streamly/test/Test/Crypto/Sodium/Encrypt/Symmetric/Streamly.hs
haskell
Always preserve the header Always preserve the header
SPDX - FileCopyrightText : 2020 SPDX - License - Identifier : MPL-2.0 # OPTIONS_GHC -Wno - incomplete - uni - patterns # module Test.Crypto.Sodium.Encrypt.Symmetric.Streamly where import Hedgehog (Property, (===), evalEither, evalIO, forAll, property) import Test.HUnit ((@?=), Assertion, assert) import Control...
49bae1a80cca6d9a529e43d4f1d40a10c25140d6802145862ff74dd9230ebd18
tnelson/Forge
ifte-performance.rkt
#lang forge/core (require (only-in macro-debugger/analysis/profile term-size)) ; Avoid conflict with forge/core keywords (require (only-in rackunit [check @check])) (require (only-in racket [< @<] [* @*])) (sig N1) (sig N2) (sig N3) (sig Thing) (define test-stx3 #'(ifte (some N1) (some T...
null
https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/tests/forge-core/expressions/ifte-performance.rkt
racket
Avoid conflict with forge/core keywords Remember when using this technique to expand syntax. E.g., (expand #'(some Thing)) NOT (expand (some Thing))
#lang forge/core (require (only-in macro-debugger/analysis/profile term-size)) (require (only-in rackunit [check @check])) (require (only-in racket [< @<] [* @*])) (sig N1) (sig N2) (sig N3) (sig Thing) (define test-stx3 #'(ifte (some N1) (some Thing) (ifte (some N2) ...
3aa7426a2b760fe7725b29246c0d89d5546a0f71a93257e41a1eca17a4a5e87c
CarlosMChica/HaskellBook
Spec.hs
module Main where import Test.Hspec import Test.QuickCheck import Lib genNonEmptyAlphaString :: Gen WordToDiscover genNonEmptyAlphaString = listOf1 genAlphaChar where genAlphaChar :: Gen Char genAlphaChar = elements ['a'..'z'] main :: IO () main = hspec $ describe "Hangman" $ do describe "fillInGuess...
null
https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter14/hangman/test/Spec.hs
haskell
test printing to console? Tried a property testing approach for the test above. As an exercise, add required functions to Lib module in order to expose properties letterNotInWord word = head [ x | x <- ['a'..'z'], x `notElem` word ] prop_goodGuesses ...
module Main where import Test.Hspec import Test.QuickCheck import Lib genNonEmptyAlphaString :: Gen WordToDiscover genNonEmptyAlphaString = listOf1 genAlphaChar where genAlphaChar :: Gen Char genAlphaChar = elements ['a'..'z'] main :: IO () main = hspec $ describe "Hangman" $ do describe "fillInGuess...
7f5b8dbd3ba11fd81ba0b13b8c103e84179043ab7981f0a90b26ec08c30c6193
lancelet/wgpu-hs
Shader.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # -- | -- Module : WGPU.Internal.Shader -- Description : Shader modules. module WGPU.Internal.Shader ( -- * Types ShaderModule, ShaderModuleDescriptor (..), ShaderSource (..), SPIRV (..), WG...
null
https://raw.githubusercontent.com/lancelet/wgpu-hs/29c6a7a3f21ec074f3b23e282ea69396bad337cb/wgpu-hs/src-internal/WGPU/Internal/Shader.hs
haskell
| Module : WGPU.Internal.Shader Description : Shader modules. * Types * Functions ----------------------------------------------------------------------------- | Handle to a compiled shader module. ----------------------------------------------------------------------------- | Device for the shader. | Desc...
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # module WGPU.Internal.Shader ShaderModule, ShaderModuleDescriptor (..), ShaderSource (..), SPIRV (..), WGSL (..), ShaderEntryPoint (..), createShaderModule, createShaderModuleSPIRV, ...
f2f4c6f63f996321b8ea45ca44001f6ab5d5a55967957d011958024f1a433969
robrix/Manifold
Unification.hs
# LANGUAGE DeriveFunctor , FlexibleContexts , FlexibleInstances , MultiParamTypeClasses , PolyKinds , TypeOperators , UndecidableInstances # module Manifold.Unification where import Control.Effect import Manifold.Constraint import Manifold.Context import Manifold.Name import Manifold.Name.Annotated import Manifold.Pro...
null
https://raw.githubusercontent.com/robrix/Manifold/3cc7a49c90b9cc7d1da61c532d0ee526ccdd3474/src/Manifold/Unification.hs
haskell
# LANGUAGE DeriveFunctor , FlexibleContexts , FlexibleInstances , MultiParamTypeClasses , PolyKinds , TypeOperators , UndecidableInstances # module Manifold.Unification where import Control.Effect import Manifold.Constraint import Manifold.Context import Manifold.Name import Manifold.Name.Annotated import Manifold.Pro...
9b95258fd67f237cffb1cf46458a89e0e25078dfee2cb68f327eac49d2de3b21
NorfairKing/validity
Antireflexivity.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # module Test.Syd.Validity.Relations.Antireflexivity ( antireflexiveOnElem, antireflexivityOnGen, antireflexivity, antireflexivityOnArbitrary, ) where import Data.GenValidity import Test.QuickCheck -- | -- -- \[ -- Antireflexive(\pre...
null
https://raw.githubusercontent.com/NorfairKing/validity/35bc8d45b27e6c21429e4b681b16e46ccd541b3b/genvalidity-sydtest/src/Test/Syd/Validity/Relations/Antireflexivity.hs
haskell
| \[ Antireflexive(\prec) \quad\equiv\quad \] | A relation | An element | prop> antireflexivity ((<) :: Int -> Int -> Bool) prop> antireflexivity ((/=) :: Int -> Int -> Bool) prop> antireflexivity ((>) :: Int -> Int -> Bool) |
# LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # module Test.Syd.Validity.Relations.Antireflexivity ( antireflexiveOnElem, antireflexivityOnGen, antireflexivity, antireflexivityOnArbitrary, ) where import Data.GenValidity import Test.QuickCheck \forall a : \neg ( a \prec a ) an...
bc6b10ac8e52832ee96207906e9707926a49c107b531a0f8971e26fd0b2e1ec9
thi-ng/ws-ldn-1
svgmap.clj
(ns ws-ldn-1.day2.svgmap (:require [thi.ng.geom.core :as g] [thi.ng.geom.svg.core :as svg] [ws-ldn-1.day2.mercator :as proj] [ws-ldn-1.day1.csv :as data])) ;; map image size (def map-width 1029) (def map-height 873) (def latlon-bounds "Angular bounds for mercator map projection" [-180 180 82 -82...
null
https://raw.githubusercontent.com/thi-ng/ws-ldn-1/090c851cc699f0f994779ddc09275fc1718400a8/src/ws_ldn_1/day2/svgmap.clj
clojure
map image size
(ns ws-ldn-1.day2.svgmap (:require [thi.ng.geom.core :as g] [thi.ng.geom.svg.core :as svg] [ws-ldn-1.day2.mercator :as proj] [ws-ldn-1.day1.csv :as data])) (def map-width 1029) (def map-height 873) (def latlon-bounds "Angular bounds for mercator map projection" [-180 180 82 -82]) (defn svg-imag...
4d8cbeb3d1a4d6c68a2adf100a97ce0524962d61a21ddc68563d093f8c71193c
cheecheeo/haskell-cgi
CGI.hs
----------------------------------------------------------------------------- -- | -- Module : Network.CGI Copyright : ( c ) The University of Glasgow 2001 ( c ) 2004 - 2006 ( c ) 2005 ( c ) 2005 -- License : BSD-style -- Maintainer : < ...
null
https://raw.githubusercontent.com/cheecheeo/haskell-cgi/a49660abdc5b711fcc99989f121eb4404bbde66c/src/Network/CGI.hs
haskell
--------------------------------------------------------------------------- | Module : Network.CGI License : BSD-style Stability : experimental Simple Library for writing CGI programs. See <> for the CGI specification. This version of the library is for systems with version 2.0 or greater syst...
Copyright : ( c ) The University of Glasgow 2001 ( c ) 2004 - 2006 ( c ) 2005 ( c ) 2005 Maintainer : < > Portability : non - portable ( uses Control . Monad . State ) of the network package . This includes GHC 6.6 and later . For older Ba...
4974353dc316c692a8067bac58b801ada3122d6127f7f41c94bda7cec0a1f923
lipas-liikuntapaikat/lipas
forms.cljs
(ns lipas.ui.components.forms (:require [lipas.ui.components.text-fields :as text-fields] [lipas.ui.mui :as mui] [lipas.ui.utils :as utils])) (defn ->display-tf [{:keys [label value]} multiline? rows] (let [value (utils/display-value value :empty "-" :links? false)] [text-fields/text-field {:labe...
null
https://raw.githubusercontent.com/lipas-liikuntapaikat/lipas/f60185b597d2a7fca5480b392cd33187bccfb34a/webapp/src/cljs/lipas/ui/components/forms.cljs
clojure
(ns lipas.ui.components.forms (:require [lipas.ui.components.text-fields :as text-fields] [lipas.ui.mui :as mui] [lipas.ui.utils :as utils])) (defn ->display-tf [{:keys [label value]} multiline? rows] (let [value (utils/display-value value :empty "-" :links? false)] [text-fields/text-field {:labe...
cfa4d541dec1ec4a79f0ef731a276789945ba4992b8c3ab12f71ddefaa8ff64f
Daniel-Diaz/HaTeX
Fancyhdr.hs
-- | This package provides extensive control of page headers and footers. -- CTAN page for fancyhdr : < > . module Text.LaTeX.Packages.Fancyhdr ( -- * fancyhdr package fancyhdr -- * Simple interface , HdrSettings (..) , defaultHdrSettings , applyHdrSettings -- * Raw interface , fancy , lhead, chead...
null
https://raw.githubusercontent.com/Daniel-Diaz/HaTeX/aae193763157378500ebedc733c913e74f53b060/Text/LaTeX/Packages/Fancyhdr.hs
haskell
| This package provides extensive control of page headers and footers. * fancyhdr package * Simple interface * Raw interface | The fancyhdr package. Please, consider to use 'applyHdrSettings' instead of importing the package manually. If you really want to do it manually, use the functions from the /r...
CTAN page for fancyhdr : < > . module Text.LaTeX.Packages.Fancyhdr ( fancyhdr , HdrSettings (..) , defaultHdrSettings , applyHdrSettings , fancy , lhead, chead, rhead , lfoot, cfoot, rfoot , renewheadrulewidth , renewfootrulewidth ) where import Text.LaTeX.Base.Syntax import Text.LaTeX.Base.Class imp...
2d2586bcc679f9b321808127afcc34cf67b24cba8afb9183b37db2fb1ca5c907
sjl/beast
main.lisp
(in-package :beast) Notes ;;; Entities are stored in an {id -> entity} hash table. ;;; ;;; Entities are also indexed by aspect in a nested hash table: ;;; ;;; {aspect-symbol -> {id -> entity}} ;;; Entities are indexed by system too , as a vector of hash tables , one entry ;;; for each of the system's argument...
null
https://raw.githubusercontent.com/sjl/beast/dd80fff520402f73e23aa8d9bdb743ee10777e8c/src/main.lisp
lisp
Entities are stored in an {id -> entity} hash table. Entities are also indexed by aspect in a nested hash table: {aspect-symbol -> {id -> entity}} for each of the system's arguments: {system-symbol -> #({id -> entity} ; arg1 } Systems are stored as: {system-symbol -> (system-fu...
(in-package :beast) Notes Entities are indexed by system too , as a vector of hash tables , one entry Global Data Structures --------------------------------------------------- (defvar *entity-id-counter* 0) (defvar *entity-index* (make-hash-table)) (defvar *aspect-index* (make-hash-table)) (defvar *system-in...
7573eb5134544edfbbf65baa4a334fce4b0b7cdebdea8d26eceaa90e52f3ab2f
guildhall/guile-haunt
haunt.scm
(use-modules (haunt site) (haunt reader) (haunt asset) (haunt builder blog) (haunt builder atom) (haunt builder assets)) (site #:title "Built with Guile" #:domain "example.com" #:default-metadata '((author . "Eva Luator") (email...
null
https://raw.githubusercontent.com/guildhall/guile-haunt/c67e8e924c664ae4035862cc7b439cd7ec4bcef6/example/haunt.scm
scheme
(use-modules (haunt site) (haunt reader) (haunt asset) (haunt builder blog) (haunt builder atom) (haunt builder assets)) (site #:title "Built with Guile" #:domain "example.com" #:default-metadata '((author . "Eva Luator") (email...
acaa76c4ebd61aba603509a9bb4fb868351368328cb98217c813b960bfdbf2e7
unnohideyuki/bunny
sample230.hs
main = sequence_ [print 1, print 2]
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample230.hs
haskell
main = sequence_ [print 1, print 2]
99dccbe9d6d11b3ab2531080c872d9719b9e6baa29ebcd9925e95d066040d59c
grayjay/json-rpc-server
TestSuite.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} module Main (main) where import qualified Network.JsonRpc.Server as S import Network.JsonRpc.Server ((:+:) (..)) import Internal ( request, defaultRq, defaultRsp , defaultIdErrRsp, nullIdErrRsp , version, result, rpcErr, method ...
null
https://raw.githubusercontent.com/grayjay/json-rpc-server/5a8844e8c8ef426b1ede83495932edafccf44fb2/tests/TestSuite.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE CPP # module Main (main) where import qualified Network.JsonRpc.Server as S import Network.JsonRpc.Server ((:+:) (..)) import Internal ( request, defaultRq, defaultRsp , defaultIdErrRsp, nullIdErrRsp , version, result, rpcErr, method , params, id', array, rsp...
37492c78c2244241662d373cfd6d9dcc766d1761302d39c72129ba57fa32b39a
shamazmazum/easy-audio
package.lisp
Copyright ( c ) 2012 - 2013 , ;; All rights reserved. ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions are met: 1 . Redistributions of source code must retain the above copyright notice , this ;; list of conditions and...
null
https://raw.githubusercontent.com/shamazmazum/easy-audio/774ede953082b1457a276dda16374fcec395fe89/wav/package.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: list of conditions and the following disclaimer. this list of conditions and the following disclaimer in the documentation and/or other materi...
Copyright ( c ) 2012 - 2013 , 1 . Redistributions of source code must retain the above copyright notice , this 2 . Redistributions in binary form must reproduce the above copyright notice , THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND DISCLAIMED . IN NO EVENT SHALL TH...
945ee02d55f41ee9c1d0ed467750583c00851d8d8b06b8b5c6ec667e24d28bcb
masterdezign/rc
Types.hs
module RC.NTC.Types ( Reservoir (..) , NTCParameters (..) , NTC (..) ) where import System.Random ( StdGen ) import Numeric.LinearAlgebra ( Matrix ) -- | Reservoir abstraction. -- -- Reservoir (a recurrent neural network) is an essential component in the NTC framework . newtype Reservoir...
null
https://raw.githubusercontent.com/masterdezign/rc/0a37c27aff70a096d010d2043ef6eab33dee2dc8/rc/RC/NTC/Types.hs
haskell
| Reservoir abstraction. Reservoir (a recurrent neural network) is an essential ^ Modify data before masking (e.g. compression) ^ Input weights (mask) range ^ Modify data before training or prediction (e.g. add biases)
module RC.NTC.Types ( Reservoir (..) , NTCParameters (..) , NTC (..) ) where import System.Random ( StdGen ) import Numeric.LinearAlgebra ( Matrix ) component in the NTC framework . newtype Reservoir = Reservoir { _transform :: Matrix Double -> Matrix Double } | Customizable NTC param...
1f44c049e6f649ad8c2cd7ed60f58f3831a110ff411a6b56869e2ffe0c76b045
the-concurrent-schemer/scm
scmi_iodev_server_std_test.erl
%%% The MIT License %%% Copyright ( C ) 2013 - 2014 by < > %%% %%% Permission is hereby granted, free of charge, to any person obtaining a copy %%% of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights %%% to u...
null
https://raw.githubusercontent.com/the-concurrent-schemer/scm/1726ec2e94e766893d80c286f816599defb6a524/src/scmi_iodev_server_std_test.erl
erlang
The MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above...
Copyright ( C ) 2013 - 2014 by < > in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E...
d134f5be3414ccae58e0ac6d0d479bb0902eee3adc04278cdee1557fc6f7cf13
TheLortex/mirage-monorepo
eio_mutex.mli
* A mutex can be used to ensure that only one piece of code can access a shared resource at one time . Unlike { ! . Mutex } , which blocks the whole domain while waiting to take the mutex , this module allows other Eio fibers to run while waiting . You should use this module if your critical section...
null
https://raw.githubusercontent.com/TheLortex/mirage-monorepo/0c29acffaf08dc0008097d36225a14960769f132/duniverse/eio/lib_eio/eio_mutex.mli
ocaml
* The type for a concurrency-friendly mutex. * Raised if you attempt to use a mutex that has been disabled. * [create ()] creates an initially unlocked mutex. * [unlock t] unlocks the mutex. @raises Sys_error if the mutex is unlocked. * Same as {!lock}, but does not suspend the calling thread if the mutex is al...
* A mutex can be used to ensure that only one piece of code can access a shared resource at one time . Unlike { ! . Mutex } , which blocks the whole domain while waiting to take the mutex , this module allows other Eio fibers to run while waiting . You should use this module if your critical section...
0259b6e004c7ce2499e0a24c0e0850d5908743af8a822f89904dd9ea6ead7bc0
kowainik/treap
Laws.hs
module Test.Rand.Laws ( lawsSpec ) where import GHC.Exts (IsList (..)) import HaskellWorks.Hspec.Hedgehog (require) import Hedgehog (Gen, forAll, property, (===)) import Test.Hspec (Spec, describe, it) import Test.Common (TestTreap()) import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Ran...
null
https://raw.githubusercontent.com/kowainik/treap/bd59f0ff0a938d7b67ebf5266427e100fce8e487/test/Test/Rand/Laws.hs
haskell
module Test.Rand.Laws ( lawsSpec ) where import GHC.Exts (IsList (..)) import HaskellWorks.Hspec.Hedgehog (require) import Hedgehog (Gen, forAll, property, (===)) import Test.Hspec (Spec, describe, it) import Test.Common (TestTreap()) import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Ran...
b6127e24ae129fea29be41749b8f7b06775a41aa03e7d2c5e8755f8878cd9ea2
bugczw/Introduction-to-Functional-Programming-in-OCaml
hideValues.ml
module Naturals : sig type t val zero : t (* val return_natural : int -> t *) val succ : t -> t val pred : t -> t end = struct type t = int let zero = 0 (* The following function is for internal purpose only. *) let return_natural n = assert (n >= 0 && n <= max_int); n let succ n = if n = max_int th...
null
https://raw.githubusercontent.com/bugczw/Introduction-to-Functional-Programming-in-OCaml/13c4d1f92e7479f8eb10ea5d4c43a598b6676d0f/OCaml_MOOC_W6_ALL/hideValues.ml
ocaml
val return_natural : int -> t The following function is for internal purpose only.
module Naturals : sig type t val zero : t val succ : t -> t val pred : t -> t end = struct type t = int let zero = 0 let return_natural n = assert (n >= 0 && n <= max_int); n let succ n = if n = max_int then 0 else return_natural (n + 1) let pred = function 0 -> 0 | n -> n - 1 end;; Naturals.return_n...
738e7b5dae65ea38d04ccf8720a11738db1f66b3151ec0911983495de1481bf8
pedestal/pedestal
server.clj
Copyright 2013 Relevance , Inc. Copyright 2014 - 2022 Cognitect , Inc. ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( ) ; which can be found in the file epl-v10.html at the root of this distribution. ; ; By using this software in any fashion, you are agreeing ...
null
https://raw.githubusercontent.com/pedestal/pedestal/53bfe70143a22cdfd2f0d183023334a199c9e9a2/samples/server-with-links/src/server_with_links/server.clj
clojure
The use and distribution terms for this software are covered by the 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 this notice, or any other, from this software. T...
Copyright 2013 Relevance , Inc. Copyright 2014 - 2022 Cognitect , Inc. Eclipse Public License 1.0 ( ) (ns server-with-links.server for -main method in uberjar (:require [io.pedestal.http :as server] [server-with-links.service :as service] [io.pedestal.http.route :as route])) (defon...
3748ff29a60eb9b61f32677cee02a35ad45d942c6d4bb14402be401e759663fc
eareese/htdp-exercises
144-will-funcs-work-for-nelist.rkt
Exercise 144 . Will sum and how - many work for NEList - of - temperatures even though they are designed for inputs from List - of - temperatures ? If you think they do n’t work , provide counter - examples . If you think they would , explain why . A NEList - of - temperatures is one of : – ( cons CTemperature '...
null
https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part02-arbitrarily-large-data/144-will-funcs-work-for-nelist.rkt
racket
interpretation non-empty lists of Celsius temperatures computes the average temperature even though sum and how-many both rely on checking for an empty list as a stop condition, functions just return the "default-by-the-time-you've-gotten-here" value for an empty list, and the empty list is still in there as part ...
Exercise 144 . Will sum and how - many work for NEList - of - temperatures even though they are designed for inputs from List - of - temperatures ? If you think they do n’t work , provide counter - examples . If you think they would , explain why . A NEList - of - temperatures is one of : – ( cons CTemperature '...
dfe1fd5c902f2371726d7d6f87d673b90a87c7874b4f5b420920f88dfa0b24d6
TheLortex/mirage-monorepo
driver.ml
* Copyright ( c ) 2014 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2014 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) (* Stub generation driver for...
null
https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ocaml-ctypes/tests/test-enums/stub-generator/driver.ml
ocaml
Stub generation driver for the enum tests.
* Copyright ( c ) 2014 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2014 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) let () = Tests_common.run Sy...
1f2b2678028398bf94740ff14873dcffeecbf50f806aaefaa83349438c042325
bobzhang/ocaml-book
existentials.ml
module Russo = struct (* An abstract type of integer streams *) module type Stream = sig type state val start : state val next : state -> state val value : state -> int end An instance of the stream abstract type : the natural numbers starting from 2 module TwoOnwards : Stream = struct ...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/lang/code/module/existentials.ml
ocaml
An abstract type of integer streams The nth state of the sieve algorithm An abstract type of integer streams The nth state of the sieve algorithm The operations of the stream interface The type of a stream value. We'll expose the type of elements ('a'), but leave the type of streams ('t') abstract. A...
module Russo = struct module type Stream = sig type state val start : state val next : state -> state val value : state -> int end An instance of the stream abstract type : the natural numbers starting from 2 module TwoOnwards : Stream = struct type state = int let start = 2 l...
6614e7b3f7c0f35be6331cf4e8491168812d2794496524ee350b928988da622b
hailstorm-hs/hailstorm
Error.hs
{-# LANGUAGE DeriveDataTypeable #-} module Hailstorm.Error ( HSError (..) , doubleThrow , forceEitherIO , warnOnLeftIO , wrapInHSError ) where import Control.Concurrent import Control.Exception import Data.Typeable import System.Log.Logger data HSError = UnknownWorkerException | BadStateError String ...
null
https://raw.githubusercontent.com/hailstorm-hs/hailstorm/3c595336038a7a6417a31cb8b1fc38780f27c520/src/Hailstorm/Error.hs
haskell
# LANGUAGE DeriveDataTypeable #
module Hailstorm.Error ( HSError (..) , doubleThrow , forceEitherIO , warnOnLeftIO , wrapInHSError ) where import Control.Concurrent import Control.Exception import Data.Typeable import System.Log.Logger data HSError = UnknownWorkerException | BadStateError String | UnexpectedZookeeperError ...
5b16ff623e2baf7b025b52f194367dfb044fdc2f72b6b1997727796f82d3e8f0
hexlet-codebattle/battle_asserts
desc_order.clj
(ns battle-asserts.issues.desc-order (:require [clojure.test.check.generators :as gen] [clojure.string :as s])) (def level :elementary) (def tags ["math"]) (def description {:en "Your task is to make a function that can take any non-negative integer as an argument and return it with its digits in des...
null
https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/2177dbdda39ae34ff397eea0c5c68f268b8ede12/src/battle_asserts/issues/desc_order.clj
clojure
(ns battle-asserts.issues.desc-order (:require [clojure.test.check.generators :as gen] [clojure.string :as s])) (def level :elementary) (def tags ["math"]) (def description {:en "Your task is to make a function that can take any non-negative integer as an argument and return it with its digits in des...
e465d616de864afa64466c0bc4c0c651c6a935828d51535928c2617e9335b0f7
anthonygalea/riemann-console
views.cljs
(ns riemann-console.views (:require [clojure.string :as string] [re-frame.core :as re-frame] [reagent.core :as reagent] [riemann-console.events :as events] [riemann-console.subs :as subs] ["echarts" :as echarts] ["react-grid-layout" :refer (WidthProvider Responsive)] ["react-select" :default r...
null
https://raw.githubusercontent.com/anthonygalea/riemann-console/d4eb21bbde8b191f6a4d853a3b14d370b9fc0761/src/cljs/riemann_console/views.cljs
clojure
utils navbar dashboard settings delete dashboard confirmation charts grid table gauge time-series widget widget-configurer dashboard
(ns riemann-console.views (:require [clojure.string :as string] [re-frame.core :as re-frame] [reagent.core :as reagent] [riemann-console.events :as events] [riemann-console.subs :as subs] ["echarts" :as echarts] ["react-grid-layout" :refer (WidthProvider Responsive)] ["react-select" :default r...
90c4287075f7939116d06cb4d1128903caf70dc3ef48a87c3da73f011952989e
imdea-software/leap
Expression.mli
(***********************************************************************) (* *) LEAP (* *) , IMDEA ...
null
https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/expression/Expression.mli
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...
49ce898bad797d3c08c069685fcf60849f41879791ad6d7c8cb97981ee8cd5a4
fourier/ppath
base.lisp
base.lisp ;; File containing common settings for all unit tests ;; (in-package :cl-user) (defpackage ppath.test.base (:use :cl :prove) (:export testfile test-input with-mocked-function random-shuffle random-shufflef chdir)) (in-package :ppath.test.base) ;; turn off ansi colors in report ...
null
https://raw.githubusercontent.com/fourier/ppath/eb1a8173b4d1d691ea9a7699412123462f58c3ce/t/base.lisp
lisp
File containing common settings for all unit tests turn off ansi colors in report output example of generated code: (is (ppath.details.nt::splitdrive "C:\\") '("C:" . "\\") :test #'equal "Testing input: 'C:\\'"))
base.lisp (in-package :cl-user) (defpackage ppath.test.base (:use :cl :prove) (:export testfile test-input with-mocked-function random-shuffle random-shufflef chdir)) (in-package :ppath.test.base) (setf prove.color:*enable-colors* nil) change type of the reporter to Test Anything Protoco...
ecd3b3740067749705011b78524946135499b470b178ba2bec7f77965e96dbf0
brownplt/LambdaS5
exp_util.ml
open Prelude open Ljs_delta open Ljs_opt module S = Ljs_syntax module V = Ljs_values exception ExpValError of string type pool = (S.exp * bool * bool) IdMap.t let print_ljs ljs = Ljs_pretty.exp ljs Format.std_formatter; print_newline() let ljs_str ljs = Ljs_pretty.exp ljs Format.str_formatter; Format.flush_str_f...
null
https://raw.githubusercontent.com/brownplt/LambdaS5/f0bf5c7baf1daa4ead4e398ba7d430bedb7de9cf/src/optimization/exp_util.ml
ocaml
lambda always has no side effect check the body of lambda and return false x has new se status assume x has no side effect check if f(x) has side effect any try..catch is assumed to throw out uncatched error any try..finally is assumed to throw out uncached error an const object requires extensible is fal...
open Prelude open Ljs_delta open Ljs_opt module S = Ljs_syntax module V = Ljs_values exception ExpValError of string type pool = (S.exp * bool * bool) IdMap.t let print_ljs ljs = Ljs_pretty.exp ljs Format.std_formatter; print_newline() let ljs_str ljs = Ljs_pretty.exp ljs Format.str_formatter; Format.flush_str_f...
36ca18ffb4c6a61a2421855d910a1632583010b78568a8fd7c2b5d0e056a7e04
theodormoroianu/SecondYearCourses
LambdaChurch_20210415165804.hs
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415165804.hs
haskell
alpha-equivalence subst u x t defines [u/x]t, i.e., substituting u for x in t This substitution avoids variable captures so it is safe to be used when reducing terms with free variables (e.g., if evaluating inside lambda abstractions) ^ substitution term ^ variable to be substitutes ^ term in which the substit...
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
18106a7ce349f7542f47dbd707e1892202ae1f9c65cb115d2eec019b20d77273
parsonsmatt/encoding-via
Lib.hs
# LANGUAGE TypeOperators , AllowAmbiguousTypes # {-# LANGUAGE DataKinds #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # {-# LANGUAGE DerivingVia #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE KindSignatures #-} # LANGUAGE NoSt...
null
https://raw.githubusercontent.com/parsonsmatt/encoding-via/1a5c3fd13b01737b5b98730f4ab943fc85e15b3e/src/Lib.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE KindSignatures # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # $> :set -XTypeApplications -XTypeOperators -XDataKinds | A newtype wrapper that allows us to propagate changes to the underlying encoding. | We ne...
# LANGUAGE TypeOperators , AllowAmbiguousTypes # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE NoStarIsType # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # module Lib where import...
3d81dee0bf524a32c804d0236cfde1e57afb3daf987e80d0899098d901be27fe
blindglobe/lisp-matrix
package.lisp
;;; -*- mode: lisp -*- Time - stamp : < 2011 - 03 - 17 11:59:42 tony > ;;; Creation: ?? ;;; File: package.lisp Author : mfh Maintainer : < > Copyright : ( c)2009 - -2011 , . Currently licensed under MIT ;;; license. See file LICENSE.mit in top-level directory ;;; ...
null
https://raw.githubusercontent.com/blindglobe/lisp-matrix/f9c88dae132baf52884dd54612581d1331b82b40/src/package.lisp
lisp
-*- mode: lisp -*- Creation: ?? File: package.lisp license. See file LICENSE.mit in top-level directory for information. Purpose: lisp-matrix package definition. What is this talk of 'release'? Klingons do not make software 'releases'. Our software 'escapes', leaving a blood...
Time - stamp : < 2011 - 03 - 17 11:59:42 tony > Author : mfh Maintainer : < > Copyright : ( c)2009 - -2011 , . Currently licensed under MIT (in-package :cl-user) (defpackage :lisp-matrix (:use :cl :xarray :cffi :cl-utilities :org.middleangle.foreign-numeric-vector ...
56d23164e91d3a67a333e5e6333bdef092db7ea9b6cd8ca16e2ae6801e787d2e
txyyss/Project-Euler
Euler022.hs
Using names.txt ( right click and ' Save Link / Target As ... ' ) , a 46 K text file containing over five - thousand first names , begin by -- sorting it into alphabetical order. Then working out the -- alphabetical value for each name, multiply this value by its -- alphabetical position in the list to obtain a nam...
null
https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler022.hs
haskell
sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name score. For example, when the list is sorted into alphabetical order, What is the total of all the name scores in the file?
Using names.txt ( right click and ' Save Link / Target As ... ' ) , a 46 K text file containing over five - thousand first names , begin by COLIN , which is worth 3 + 15 + 12 + 9 + 14 = 53 , is the 938th name in the list . So , would obtain a score of 938 * 53 = 49714 . module Euler022 where import Data.Ch...
9870daec02a0a726e76b4ffd4b60c602b1752e10bb15eba150b9dc43cd4e2745
ocurrent/ocurrent
current_web.mli
module User : sig type t (** Information about a site user. *) val v : string -> (t, [> `Msg of string]) result (** [v id] is a user with ID [id]. *) val v_exn : string -> t (** [v_exn id] is a user with ID [id]. *) val id : t -> string (** [id t] is the user ID (e.g. "github:alice") *) end module R...
null
https://raw.githubusercontent.com/ocurrent/ocurrent/009e5d00645efd44a21cd6c0ad5264bbe0fd1c18/lib_web/current_web.mli
ocaml
* Information about a site user. * [v id] is a user with ID [id]. * [v_exn id] is a user with ID [id]. * [id t] is the user ID (e.g. "github:alice") Read-only access, suitable for the general public. Can cancel and rebuild jobs. Can read the metrics. Can manage log matcher rules. * Site configuration settin...
module User : sig type t val v : string -> (t, [> `Msg of string]) result val v_exn : string -> t val id : t -> string end module Role : sig type t = [ ] val pp : t Fmt.t end module Site : sig type t class type raw_resource = object method get_raw : t -> Cohttp.Request.t -> (Cohttp.Response...
c9a87bc79d23e010322afe286a20d51c896771f62b104472c00fcadaa500c919
buntine/Simply-Scheme-Exercises
14-1.scm
> ( remove - once ’ morning ’ ( good morning good morning ) ) ; (GOOD GOOD MORNING) ; ; (It’s okay if your solution removes the other MORNING instead, as long as it removes only one of them . ) ; Classification: keep (define (remove-once wd sent) (cond ((empty? sent) sent) ((equal? (first sent) wd) (bf ...
null
https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/14-common-patterns-in-recursive-procedures/14-1.scm
scheme
(GOOD GOOD MORNING) (It’s okay if your solution removes the other MORNING instead, as long as it removes only Classification: keep
> ( remove - once ’ morning ’ ( good morning good morning ) ) one of them . ) (define (remove-once wd sent) (cond ((empty? sent) sent) ((equal? (first sent) wd) (bf sent)) (else (se (first sent) (remove-once (bf sent))))))
d10f03de8fc72ab4451624cd94c8fd806a18b08e1758112d00c75e5f7469842a
lambdaclass/webrtc-server
webrtc_utils.erl
-module(webrtc_utils). -export([json_encode/1, json_decode/1, text_event/1, text_event/2]). json_decode(Data) -> jsx:decode(Data, [return_maps, {labels, attempt_atom}]). json_encode(Data) -> jsx:encode(Data). text_event(Event) -> {text, json_encode(#{event => Event})}. text_event(E...
null
https://raw.githubusercontent.com/lambdaclass/webrtc-server/05bcc994d692f8d9f4a601ece1bfd4ff5e939062/src/webrtc_utils.erl
erlang
-module(webrtc_utils). -export([json_encode/1, json_decode/1, text_event/1, text_event/2]). json_decode(Data) -> jsx:decode(Data, [return_maps, {labels, attempt_atom}]). json_encode(Data) -> jsx:encode(Data). text_event(Event) -> {text, json_encode(#{event => Event})}. text_event(E...
a4d19061e089da069fc0e141f5f909d00ae1358d5dae8bc3ccbcec2142253b89
hstreamdb/hstream
RqliteUtilsSpec.hs
module HStream.RqliteUtilsSpec where import qualified Data.Aeson as A import qualified Data.ByteString.Lazy as BL import qualified Data.Map.Strict as Map import Data.Maybe (fromMaybe) import qualified Data.Text as T import ...
null
https://raw.githubusercontent.com/hstreamdb/hstream/125d9982d47874aee5e33324b55689d64bd664c2/common/hstream/test/HStream/RqliteUtilsSpec.hs
haskell
Insert Update check fail Update Delete
module HStream.RqliteUtilsSpec where import qualified Data.Aeson as A import qualified Data.ByteString.Lazy as BL import qualified Data.Map.Strict as Map import Data.Maybe (fromMaybe) import qualified Data.Text as T import ...
f4b5952f644ebb1952583d138ac1131fbaa5f0545d4bf31deb6fcb5223c3a6b2
janestreet/async_rpc_kernel
nat0.mli
(** The bin-prot representation of lengths of strings, arrays, etc. *) type t = Bin_prot.Nat0.t [@@deriving bin_io] (** fails on negative values *) val of_int_exn : int -> t
null
https://raw.githubusercontent.com/janestreet/async_rpc_kernel/e85e89c3898fd2164b4c7a7d479a437d9dd6d7f3/src/nat0.mli
ocaml
* The bin-prot representation of lengths of strings, arrays, etc. * fails on negative values
type t = Bin_prot.Nat0.t [@@deriving bin_io] val of_int_exn : int -> t
d56cd4d7afe061907ca5458235566d9defed1c545c05342cfb611b5f79ffe290
bitblaze-fuzzball/fuzzball
decision_tree.ml
Copyright ( C ) BitBlaze , 2009 - 2012 , and copyright ( C ) 2010 Ensighta Security Inc. All rights reserved . Copyright (C) BitBlaze, 2009-2012, and copyright (C) 2010 Ensighta Security Inc. All rights reserved. *) module V = Vine class virtual decision_tree = object method virtual init : decision...
null
https://raw.githubusercontent.com/bitblaze-fuzzball/fuzzball/b9a617b45e68fa732f1357fedc08a2a10f87a62c/execution/decision_tree.ml
ocaml
Copyright ( C ) BitBlaze , 2009 - 2012 , and copyright ( C ) 2010 Ensighta Security Inc. All rights reserved . Copyright (C) BitBlaze, 2009-2012, and copyright (C) 2010 Ensighta Security Inc. All rights reserved. *) module V = Vine class virtual decision_tree = object method virtual init : decision...
34b2b9b9c3f5c318b3fce6c00c46512b2e04188f8b88dced928d8f52fc50cb1e
savonarola/ulid
ulid_SUITE.erl
-module(ulid_SUITE). -export([all/0]). -export([ generate_0/1, generate_1/1, generate_list_0/1, generate_list_1/1, fuzzy/1 ]). all() -> [ generate_0, generate_1, generate_list_0, generate_list_1, fuzzy ]. generate_1(_Config) -> UG = ulid:new(), {UG1, <<_:26/binary>>} = ulid:generate(UG), ...
null
https://raw.githubusercontent.com/savonarola/ulid/0b5e674ea97b85773e68e1afc99ddf5b4a3f9c3c/test/ulid_SUITE.erl
erlang
-module(ulid_SUITE). -export([all/0]). -export([ generate_0/1, generate_1/1, generate_list_0/1, generate_list_1/1, fuzzy/1 ]). all() -> [ generate_0, generate_1, generate_list_0, generate_list_1, fuzzy ]. generate_1(_Config) -> UG = ulid:new(), {UG1, <<_:26/binary>>} = ulid:generate(UG), ...
dfab03d2b25a16450b03576ab87345b73cf741ee694b5ca1a23f701afa593d3f
death/constantia
test.lisp
;;;; +----------------------------------------------------------------+ | | ;;;; +----------------------------------------------------------------+ (defpackage #:constantia-test (:use #:cl #:constantia) (:import-from #:parachute #:test #:plain #:output ...
null
https://raw.githubusercontent.com/death/constantia/87379e2cf46a2be335e099e24a114717e26d4e96/test.lisp
lisp
+----------------------------------------------------------------+ +----------------------------------------------------------------+ Semantics for :word and :character wrapping are fuzzy... may Just a few funny cases... Not at all exhaustive...
| | (defpackage #:constantia-test (:use #:cl #:constantia) (:import-from #:parachute #:test #:plain #:output #:report-on #:result #:status #:test-result #:name #:expre...
0963a1533f0b93478b2f3d6e4857cbbb55f0a497ef651a843fa68e1dd1fe8f4a
project-oak/hafnium-verification
MethodMatcher.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/concurrency/MethodMatcher.ml
ocaml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
6b1c9b42e3e7849249c6179bea349a61e7f6dd63591290ceab8f4fc3abd09287
mfikes/coal-mine
problem_19.cljc
(ns coal-mine.problem-19 (:require [coal-mine.checks :refer [defcheck-19] :rename {defcheck-19 defcheck}] [clojure.test])) (defcheck solution-10dc0dda (partial reduce (fn [x y] y) nil)) (defcheck solution-11026951 (fn [xs] (if (= (count xs) 1) (first xs) (recur (rest xs))))) (defcheck solution-118b...
null
https://raw.githubusercontent.com/mfikes/coal-mine/0961d085b37f4e59489a8cf6a2b8fef0a698d8fb/src/coal_mine/problem_19.cljc
clojure
have anything left? explicitly processing the func-args
(ns coal-mine.problem-19 (:require [coal-mine.checks :refer [defcheck-19] :rename {defcheck-19 defcheck}] [clojure.test])) (defcheck solution-10dc0dda (partial reduce (fn [x y] y) nil)) (defcheck solution-11026951 (fn [xs] (if (= (count xs) 1) (first xs) (recur (rest xs))))) (defcheck solution-118b...
1fd07fb687506bccc3ce946b326eaca958ad611426809cb08638c5489c323f3c
elginer/Delve
SerializeUtil.hs
The Delve Programming Language Copyright 2009 Distributed under the terms of the GNU General Public License v3 , or ( at your option ) any later version . This file is part of Delve . Delve is free software : you can redistribute it and/or modify it under the terms of the GNU Ge...
null
https://raw.githubusercontent.com/elginer/Delve/997c25d2c43ac3ab06f7d70304a59f4a8d5f9670/src/SerializeUtil.hs
haskell
A few utilities for serialization It would be cool to use multi-param classes to paramitize this over
The Delve Programming Language Copyright 2009 Distributed under the terms of the GNU General Public License v3 , or ( at your option ) any later version . This file is part of Delve . Delve is free software : you can redistribute it and/or modify it under the terms of the GNU Ge...
de021bfc1ae3448dad687ff6943342120a8d484b21ecd9032239c30939e22d2e
pjotrp/guix
grub.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2014 , 2015 < > ;;; ;;; 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 Foundation ; either version...
null
https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/gnu/system/grub.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 © 2013 , 2014 , 2015 < > 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 < / > . (define-module (gnu system grub) #:use-module (guix store) #:use-module (guix packages) #:use-...
c5a3cb1b42fbae099e459c7962c7bf259bd8dd1225040dc8ffca1e4bbe93934d
sgbj/MaximaSharp
dorgbr.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy ...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/lapack/lapack/dorgbr.lisp
lisp
Compiled by f2cl version: Using Lisp CMU Common Lisp 20d (20D Unicode) Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy $ " " f2cl6.l , v 1d5cbacbb...
136a368e6909aa3e5c34a2f60848598dffce28721b5b2bd7e2dbbdcfc80ca560
sabine/ocaml-to-wasm
clambda_to_wasm.ml
let usage = "Usage: clambda_to_wasm <options> <files>\nOptions are:" let read_whole_file filename = let ch = open_in filename in let s = really_input_string ch (in_channel_length ch) in close_in ch; s let main () = let ppf_dump = Format.std_formatter in let file = Sys.argv.(1) in let sexp_stri...
null
https://raw.githubusercontent.com/sabine/ocaml-to-wasm/de98909a3ce3e902c4d18852a142c33ae75f7285/src/clambda_to_wasm.ml
ocaml
let usage = "Usage: clambda_to_wasm <options> <files>\nOptions are:" let read_whole_file filename = let ch = open_in filename in let s = really_input_string ch (in_channel_length ch) in close_in ch; s let main () = let ppf_dump = Format.std_formatter in let file = Sys.argv.(1) in let sexp_stri...
fa2cfd9f1dea06ed16d2b6f3888cbaecc54ce70fcad1996fc7072aa43d0e141d
google/ormolu
proc-forms2-out.hs
{-# LANGUAGE Arrows #-} bar0 f g h x = proc (y, z) -> (| test (h f . (h g) -< (y x) . y z) ((h g) . h f -< y z . (y x)) |) bar1 f g x y = proc _ -> (f -< x) &&& (g -< y) bar2 f g h x = proc (y, z) -> (h f . (h g) -< (y x) . y z) ||| ((h g) . h f -< y z . (y x)) bar3 f g h x = proc (y, z) -> ((h f ...
null
https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/value/function/arrow/proc-forms2-out.hs
haskell
# LANGUAGE Arrows #
bar0 f g h x = proc (y, z) -> (| test (h f . (h g) -< (y x) . y z) ((h g) . h f -< y z . (y x)) |) bar1 f g x y = proc _ -> (f -< x) &&& (g -< y) bar2 f g h x = proc (y, z) -> (h f . (h g) -< (y x) . y z) ||| ((h g) . h f -< y z . (y x)) bar3 f g h x = proc (y, z) -> ((h f . h g) -< ...
0188ade38586cccfdcecd7297cef93d1bed64143e9e2e2469574fbb2a5e734c5
swarmpit/swarmpit
info.cljs
(ns swarmpit.component.network.info (:require [material.icon :as icon] [material.components :as comp] [material.component.label :as label] [material.component.form :as form] [material.component.list.basic :as list] [swarmpit.component.mixin :as mixin] ...
null
https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/cljs/swarmpit/component/network/info.cljs
clojure
(ns swarmpit.component.network.info (:require [material.icon :as icon] [material.components :as comp] [material.component.label :as label] [material.component.form :as form] [material.component.list.basic :as list] [swarmpit.component.mixin :as mixin] ...
9d419ca863e3837f2c8d6160e2bdf96ec96c05e63e434c9ebf04f969ae4393df
vbrankov/hdf5-ocaml
test.ml
open Hdf5_caml let () = let h5 = H5.create_trunc "test.h5" in H5.write_float_array h5 "a" [| 0.; 1.; 2.; 3. |]; let a = H5.open_dataset h5 "a" in H5.write_attribute_float a "b" 4.; H5.close h5
null
https://raw.githubusercontent.com/vbrankov/hdf5-ocaml/7abc763189767cd6c92620f29ce98f6ee23ba88f/examples/caml/test.ml
ocaml
open Hdf5_caml let () = let h5 = H5.create_trunc "test.h5" in H5.write_float_array h5 "a" [| 0.; 1.; 2.; 3. |]; let a = H5.open_dataset h5 "a" in H5.write_attribute_float a "b" 4.; H5.close h5
f50affecbaf1bd74b63461ff6206ab17beb314a81bb3b10dd51976dd9a594aa2
vivid-inc/ash-ra-template
bind_log_fns_test.clj
; Copyright 2020 Vivid Inc. ; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; -2.0 ; ; Unless required by applicable law or agreed to in writing, software distributed under the L...
null
https://raw.githubusercontent.com/vivid-inc/ash-ra-template/f64be7efd6f52ccd451cddb851f02511d1665b11/art-cli/test/vivid/art/cli/bind_log_fns_test.clj
clojure
Copyright 2020 Vivid Inc. 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 speci...
distributed under the License is distributed on an " AS IS " BASIS , (ns vivid.art.cli.bind-log-fns-test (:require [clojure.test :refer :all] [vivid.art.cli.log])) (deftest bound (binding [vivid.art.cli.log/*info-fn* identity vivid.art.cli.log/*warn-fn* identity] (are [log-fn message] ...
016efd8d13bd96e18577e5411cb774464776fc8ded98f65a37d4941a855e9f39
dbuenzli/tsdl
myocamlbuild.ml
open Ocamlbuild_plugin open Command (* Generic pkg-config(1) support. *) let os = Ocamlbuild_pack.My_unix.run_and_read "uname -s" let pkg_config flags package = let cmd tmp = Command.execute ~quiet:true & Cmd( S [ A "pkg-config"; A ("--" ^ flags); A package; Sh ">"; A tmp]); List.map (fun arg -> A arg)...
null
https://raw.githubusercontent.com/dbuenzli/tsdl/9a5f889025305b7b028e72a7467adda162cf0d88/myocamlbuild.ml
ocaml
Generic pkg-config(1) support. tsdl_const.ml generation.
open Ocamlbuild_plugin open Command let os = Ocamlbuild_pack.My_unix.run_and_read "uname -s" let pkg_config flags package = let cmd tmp = Command.execute ~quiet:true & Cmd( S [ A "pkg-config"; A ("--" ^ flags); A package; Sh ">"; A tmp]); List.map (fun arg -> A arg) (string_list_of_file tmp) in wit...
55cd084bef803889db87f7509964940231c994d50e8d0b2cfa020294dd1c859c
reflex-frp/reflex-dom-contrib
DynamicList.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE RecursiveDo # module Reflex.Dom.Contrib.Widgets.DynamicList where ------------------------------------------------------------------------------ import qualified Data.Map as M import Reflex import Reflex.Dom.Core -----...
null
https://raw.githubusercontent.com/reflex-frp/reflex-dom-contrib/09d1223a3eadda768a6701410b4532fda8c7033d/src/Reflex/Dom/Contrib/Widgets/DynamicList.hs
haskell
# LANGUAGE GADTs # ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- | Dynamic list widget that creates a list that supports th...
# LANGUAGE FlexibleContexts # # LANGUAGE RecursiveDo # module Reflex.Dom.Contrib.Widgets.DynamicList where import qualified Data.Map as M import Reflex import Reflex.Dom.Core addition and removal of items . This widget is completely general with zero dynamicList :: MonadWidget t m ...
5202df4d5746b3a06e652b87e16bffd822ceceb6d8dd84a5dd5941e64876a748
CodyReichert/qi
package.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; ;;; package.lisp --- Groveler DEFPACKAGE. ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;;; restriction, including wi...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cffi-master/grovel/package.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- package.lisp --- Groveler DEFPACKAGE. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublic...
files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , (defpackage #:cffi-grovel (:use #:common-lisp #:ale...