_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
b067dd12eaac796af11eb3e2910e2e652a36ada06dfef6ae2a0e93c71f5bab9f
pmonks/spinner
determinate_test.clj
; Copyright © 2022 ; 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 Licen...
null
https://raw.githubusercontent.com/pmonks/spinner/bc29faefad8caf4bfa3ab2ef1785de04ed514fed/test/progress/determinate_test.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing pe...
Copyright © 2022 distributed under the License is distributed on an " AS IS " BASIS , SPDX - License - Identifier : Apache-2.0 (ns progress.determinate-test (:require [clojure.test :refer [deftest testing is]] [wcwidth.api :as w] [progress.ansi :as ansi] ...
a323e603493bb9df03414eedcf0a236b1aa590ad664b49ebc9e4cab9970ad3ae
o1-labs/snarkette
groth_maller.ml
open Core_kernel open Fold_lib let ( = ) = `Don't_use_polymorphic_equality module type Backend_intf = sig module N : Nat_intf.S module Fq : Fields.Fp_intf with type nat := N.t module Fqe : Fields.Extension_intf with type base = Fq.t module G1 : sig type t [@@deriving sexp, bin_io] val zero : t ...
null
https://raw.githubusercontent.com/o1-labs/snarkette/c4af4a5f654497183871b5f2ee99005020be20d8/src/groth_maller.ml
ocaml
open Core_kernel open Fold_lib let ( = ) = `Don't_use_polymorphic_equality module type Backend_intf = sig module N : Nat_intf.S module Fq : Fields.Fp_intf with type nat := N.t module Fqe : Fields.Extension_intf with type base = Fq.t module G1 : sig type t [@@deriving sexp, bin_io] val zero : t ...
f6b205f12940647948eb95381278876cb37a1277d67c23fd99ea9c66373080fa
CSCfi/rems
commands.clj
(ns rems.application.commands (:require [clojure.test :refer [deftest is testing]] [clojure.set] [medley.core :refer [assoc-some distinct-by find-first update-existing]] [rems.common.application-util :as application-util] [rems.common.form :as form] [rems.fo...
null
https://raw.githubusercontent.com/CSCfi/rems/a93ec75ed26706fa7703874ef0a61388693ef533/src/clj/rems/application/commands.clj
clojure
Command handlers XXX: handle-command will execute this method even when the permission for it is missing, so we need to guard against that to avoid the mutative operation of allocating new application IDs when the application already exists. Currently we want to tie all comments to the latest request. I...
(ns rems.application.commands (:require [clojure.test :refer [deftest is testing]] [clojure.set] [medley.core :refer [assoc-some distinct-by find-first update-existing]] [rems.common.application-util :as application-util] [rems.common.form :as form] [rems.fo...
c784076d1215f59354c1864bbb18c98e54678cea78b804805c778f16cb81e355
TaylanUB/scheme-bytestructures
run-tests.r7.scm
(import (scheme base) (srfi 64) (bytestructures r7 utils) (bytestructures r7) (bytestructures r7 numeric-metadata) (bytestructures r7 bytevectors) (bytestructures r7 explicit-endianness)) (include "run-tests.body.scm")
null
https://raw.githubusercontent.com/TaylanUB/scheme-bytestructures/27cadba6b69a01b38b33bb39b9766d713eb90c1b/run-tests.r7.scm
scheme
(import (scheme base) (srfi 64) (bytestructures r7 utils) (bytestructures r7) (bytestructures r7 numeric-metadata) (bytestructures r7 bytevectors) (bytestructures r7 explicit-endianness)) (include "run-tests.body.scm")
6f85a8da4d755878784ca1448e0b10109e2d5c7f7d859bca198f8d8bf6feee1c
PLTools/OCanren
pa_ocanren.mli
* Camlp5 syntax extension for { ! } . (** Documentation: TODO *) (** This function is not really requried. By some reason compilation crashed without it. An issue in pa_ppx? *) val fold_right1 : ('a -> 'a -> 'a) -> 'a list -> 'a
null
https://raw.githubusercontent.com/PLTools/OCanren/4d8facf6a1b4935a6054e1892087ff9e99ea4d6c/camlp5/pa_ocanren.mli
ocaml
* Documentation: TODO * This function is not really requried. By some reason compilation crashed without it. An issue in pa_ppx?
* Camlp5 syntax extension for { ! } . val fold_right1 : ('a -> 'a -> 'a) -> 'a list -> 'a
0948bf70c4bcd56bdc2cd2c5f9e8cfcd60dea959ef5d1bcf6d3459cbefee0357
UnNetHack/pinobot
Part.hs
{-# LANGUAGE OverloadedStrings #-} import qualified Data.Text as T import IRC.Types import System.Environment main = do [channel] <- getArgs (_, send) <- connectToBot "127.0.0.1" 27315 send $ Part $ T.pack channel
null
https://raw.githubusercontent.com/UnNetHack/pinobot/55cdcb224191d9ac16a486dee6099a5baa04b177/commands/Part.hs
haskell
# LANGUAGE OverloadedStrings #
import qualified Data.Text as T import IRC.Types import System.Environment main = do [channel] <- getArgs (_, send) <- connectToBot "127.0.0.1" 27315 send $ Part $ T.pack channel
bde59a7b20794aa369810a61b8717b6142cbd479c0a82ecee281067842389f95
mzp/coq-ruby
blast.mli
val blast_tac : (Tacexpr.raw_tactic_expr -> 'a) -> int list -> Proof_type.tactic
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/contrib/interface/blast.mli
ocaml
val blast_tac : (Tacexpr.raw_tactic_expr -> 'a) -> int list -> Proof_type.tactic
d948b2498cd675b4dc81de8a69c9962e1f88b4273d47daadf94ffa493702fc9c
Chris00/ocaml-benchmark
tree.ml
let () = let open Benchmark.Tree in "" @> lazy (let create() = Array.init 1_000_000 (fun i -> i) in Benchmark.latency1 18L create () ) |> register; "map" @> lazy (let a = Array.init 1_000_000 (fun i -> i) in let f x = x + 1 in Benchmark.latency1 18L (Array.map f)...
null
https://raw.githubusercontent.com/Chris00/ocaml-benchmark/72965ad1558c6f5d47b1559cee74423cbc5e970f/tests/tree.ml
ocaml
let () = let open Benchmark.Tree in "" @> lazy (let create() = Array.init 1_000_000 (fun i -> i) in Benchmark.latency1 18L create () ) |> register; "map" @> lazy (let a = Array.init 1_000_000 (fun i -> i) in let f x = x + 1 in Benchmark.latency1 18L (Array.map f)...
8e5497ebbc0710fdd32c7512b710eeb253b81665fd0f0fa4de33a376456749f8
spl/ivy
rand.ml
* * Copyright ( c ) 2001 - 2002 , * < > * < > * < > * Sumit Gulwani < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * me...
null
https://raw.githubusercontent.com/spl/ivy/b1b516484fba637eb24e83d27555d273495e622b/cil/src/ext/rand.ml
ocaml
* This is some testing code for polynomial encoding of trees A tree with named leaves A polynomial is a list of leaf * monomial. A monomial is a sorted list of * variables. Multiply a monomial by a variable. Keep the monomial sorted Multiply a polynomial by a variable Add a number of polynomials Group a p...
* * Copyright ( c ) 2001 - 2002 , * < > * < > * < > * Sumit Gulwani < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * me...
86a386a1cbdeae0616036710d8623aeeb2dfb0256e95189cb99b29f2e243d108
aiya000/haskell-examples
Main.hs
# LANGUAGE RebindableSyntax # RebindableSyntax turns on NoImplicitPrelude import Prelude hiding (fromInteger) In the report specification , a literal ` 1 ` is expanded to ` Prelude.fromInteger ( 1 : : Integer ) ` . -- RebindableSyntax changes it to that is expanded to ` fromInteger ( 1 : : Integer ) ` , -- a...
null
https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Language/Haskell/Extension/RebindableSyntax/Main.hs
haskell
also it means `1`'s convertion is able to rebind. {output} ;P
# LANGUAGE RebindableSyntax # RebindableSyntax turns on NoImplicitPrelude import Prelude hiding (fromInteger) In the report specification , a literal ` 1 ` is expanded to ` Prelude.fromInteger ( 1 : : Integer ) ` . RebindableSyntax changes it to that is expanded to ` fromInteger ( 1 : : Integer ) ` , fromInt...
c8f242008f54f7f29b21ba6cfe49b505891af85d1d1653e9c7bb8c6c4a94ead6
albertoruiz/easyVision
hreplace.hs
import Util.Replace import Util.Time(formattedDate) import Util.Options main :: IO () main = do pure <- getFlag "--pure" tex <- getFlag "--latex" grules <- optionString "--rules" "" let rules = parseRules grules ++ (if pure then [] else other tex) putStr . snd =<< ioReplace [] rules =<< getContents...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/tools/src/tools/hreplace.hs
haskell
import Util.Replace import Util.Time(formattedDate) import Util.Options main :: IO () main = do pure <- getFlag "--pure" tex <- getFlag "--latex" grules <- optionString "--rules" "" let rules = parseRules grules ++ (if pure then [] else other tex) putStr . snd =<< ioReplace [] rules =<< getContents...
beebc9001670f4a33f5c253382afc048acd1b120f165f201e531cbe6ae73bb61
Clozure/ccl
completion.lisp
;;; -*- Log: hemlock.log; Package: Hemlock -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; #+CMU (ext:file-comment "$Header$") ;;; ;;; ****...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/hemlock/src/completion.lisp
lisp
-*- Log: hemlock.log; Package: Hemlock -*- ********************************************************************** ********************************************************************** The top level structure here is an array that gets indexed with the a list of the strings with that prefix sorted in most-rec...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . #+CMU (ext:file-comment "$Header$") Written by and . General idea stolen from Jim Salem 's TMC completion code . (in-package :hemlock) The Completion Database . ...
e8b446ba51bbdf1c516323c8ae6933a1a0674d7e48dec030ba28b468e7e52ced
babashka/nbb
dom-server-test.cljs
(require '[reagent.dom.server :as srv]) (prn (srv/render-to-static-markup [:div [:a 1]]))
null
https://raw.githubusercontent.com/babashka/nbb/4d06aa142a5fb5baac48a8ad8e611d672f779b5f/test-scripts/react-test/dom-server-test.cljs
clojure
(require '[reagent.dom.server :as srv]) (prn (srv/render-to-static-markup [:div [:a 1]]))
a0a8c70c3170077b623567bc45894223e29a2def7c1e5cbf2ae4ebf0f3c7bee1
well-typed-lightbulbs/ocaml-esp32
sheep.ml
type t = int let s = 42 let baa _t = () [@@inline never]
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/lib-dynlink-private/plugin1/sheep.ml
ocaml
type t = int let s = 42 let baa _t = () [@@inline never]
d5ca57459af5e2b0847a0e7ed1775c1cb1d02678e66441f6a72975a8c392f1d7
themetaschemer/malt
test-A-scalar-ops.rkt
(module+ test (require rackunit) (require (only-in "../tensors.rkt" tensor)) ;; Check basic numericals (let ((a 2) (b 3)) (check-ρ-∇ (d+ a b) 5 (list 1.0 1.0)) (check-ρ-∇ (d- a b) -1 (list 1.0 -1.0)) (check-ρ-∇ (d* a b) 6 (list 3.0 2.0)) (check-ρ-∇ (d/ a b) 2/3 ...
null
https://raw.githubusercontent.com/themetaschemer/malt/78a04063a5a343f5cf4332e84da0e914cdb4d347/learner/ext-ops/test/test-A-scalar-ops.rkt
racket
Check basic numericals
(module+ test (require rackunit) (require (only-in "../tensors.rkt" tensor)) (let ((a 2) (b 3)) (check-ρ-∇ (d+ a b) 5 (list 1.0 1.0)) (check-ρ-∇ (d- a b) -1 (list 1.0 -1.0)) (check-ρ-∇ (d* a b) 6 (list 3.0 2.0)) (check-ρ-∇ (d/ a b) 2/3 '(0.3333333333333333 -0...
0a67975b862c1d13515f56ea368a973d39fe969ada7bf8f39b9be831f213b3b3
kivra/oauth2
oauth2.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright ( c ) 2012 - 2015 Kivra %%% %%% Permission to use, copy, modify, and/or distribute this software for any %%% purpose with or without fee is hereby granted, provided that the above %%% copyright notice and this permission notice ...
null
https://raw.githubusercontent.com/kivra/oauth2/c8e77e0830bc39ff44740f9f5df4a722e3573091/src/oauth2.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EV...
Copyright ( c ) 2012 - 2015 Kivra THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN @doc Erlang OAuth 2.0 implementation -module(oauth2). ...
88eaa2510ffe533c52bbb5a5b7ad5a50513f1e5746f4951b6eb2be807e1215dc
afiniate/aws_async
ddb_test_server.mli
open Core.Std open Async.Std val url : String.t (** The local DB server URL *) val access_id : String.t (** The Access ID for the local DB server *) val secret_key : String.t (** The Secret Key for the local DB server *) val region : String.t (** A fake region to use to access the local DB Server *) val start : Un...
null
https://raw.githubusercontent.com/afiniate/aws_async/44c27bf9f18f76e9e6405c2252098c4aa3d9a8bc/lib/dynamodb/ddb_test_server.mli
ocaml
* The local DB server URL * The Access ID for the local DB server * The Secret Key for the local DB server * A fake region to use to access the local DB Server * Ensures the test db server is started and responding to queries * Ensures the test db server is stopped * Whether the test db server is running * Runs ...
open Core.Std open Async.Std val url : String.t val access_id : String.t val secret_key : String.t val region : String.t val start : Unit.t -> Unit.t Deferred.t val stop : Unit.t -> Unit.t Deferred.t val is_running : Unit.t -> bool Deferred.t val with_test_server : (Unit.t -> 'a Deferred.t) -> 'a Deferred.t
78a7473fbe088d9b897f277baaf98c08a4c934d109cff0e2c8ddb6c842f2e9c8
kframework/semantic-approaches
Imp_Buffer.hs
-- This module defines convenience functions for a buffer (just a list) module Imp_Buffer where import qualified Data.List as List combine list1 list2 = list1 ++ list2 split list = case List.uncons list of Just (head, rest) -> (head, rest) Nothing -> error "Can't sp...
null
https://raw.githubusercontent.com/kframework/semantic-approaches/6f64eac09e005fe4eae7141e3c0e0f5711da0647/haskell/imp/2-imp-input-output/1-imp-bigstep/Imp_Buffer.hs
haskell
This module defines convenience functions for a buffer (just a list)
module Imp_Buffer where import qualified Data.List as List combine list1 list2 = list1 ++ list2 split list = case List.uncons list of Just (head, rest) -> (head, rest) Nothing -> error "Can't split empty list"
b8ff936020142bbfee89c71fb9c1e0eb5e08a233324ede7dc222389e34c37cb8
Opetushallitus/ataru
virkailija_cofx.cljs
(ns ataru.virkailija.virkailija-cofx (:require [re-frame.core :as re-frame])) (re-frame/reg-cofx :virkailija/scroll-y (fn [cofx] (let [scroll-y (.-scrollY js/window)] (assoc cofx :scroll-y scroll-y)))) (re-frame/reg-cofx :virkailija/resolve-url (fn [cofx {url-key :url-key target-key :target-key}] ...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/cljs/ataru/virkailija/virkailija_cofx.cljs
clojure
(ns ataru.virkailija.virkailija-cofx (:require [re-frame.core :as re-frame])) (re-frame/reg-cofx :virkailija/scroll-y (fn [cofx] (let [scroll-y (.-scrollY js/window)] (assoc cofx :scroll-y scroll-y)))) (re-frame/reg-cofx :virkailija/resolve-url (fn [cofx {url-key :url-key target-key :target-key}] ...
d5f1598fc7cb42e7ad9c0a5915cdaee34655725a9abe3cbbc064d11248d4b5c4
fragnix/fragnix
System.PosixCompat.Unistd.hs
# LANGUAGE Haskell98 # # LINE 1 " src / System / PosixCompat / Unistd.hs " # # LANGUAGE CPP # # LANGUAGE ForeignFunctionInterface # | This module makes the operations exported by . . Unistd@ available on all platforms . On POSIX systems it re - exports operations ...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/System.PosixCompat.Unistd.hs
haskell
* System environment * Sleeping
# LANGUAGE Haskell98 # # LINE 1 " src / System / PosixCompat / Unistd.hs " # # LANGUAGE CPP # # LANGUAGE ForeignFunctionInterface # | This module makes the operations exported by . . Unistd@ available on all platforms . On POSIX systems it re - exports operations ...
23d0939b60d6b83707ff90be18d4707640ea70e053c17e9270211d7dbdeea071
borodust/claw
primitive.lisp
(cl:in-package :claw.generator.common) (define-constant +emulated-primitives+ '("long double" "int128" "uint128" "float128" "nullptr" ...
null
https://raw.githubusercontent.com/borodust/claw/6bcff60938bc5c8897a45252341f59b9941525ac/src/gen/common/generator/primitive.lisp
lisp
(cl:in-package :claw.generator.common) (define-constant +emulated-primitives+ '("long double" "int128" "uint128" "float128" "nullptr" ...
31afa93a0f137714e6de77efb834351de569c7b7a6ba483ae9f58100eff6e093
adinapoli/mandrill
RawData.hs
# LANGUAGE QuasiQuotes # module RawData where import Data.Either import Test.QuickCheck import Test.Tasty.HUnit import Text.RawString.QQ usersInfoData :: String usersInfoData = [r| { "username": "", "created_at": "2014-03-27 09:42:20.62599", "public_id": "barbaz", ...
null
https://raw.githubusercontent.com/adinapoli/mandrill/3e57e9a2851df70a21ffe96c0cca14a575923334/test/RawData.hs
haskell
# LANGUAGE QuasiQuotes # module RawData where import Data.Either import Test.QuickCheck import Test.Tasty.HUnit import Text.RawString.QQ usersInfoData :: String usersInfoData = [r| { "username": "", "created_at": "2014-03-27 09:42:20.62599", "public_id": "barbaz", ...
986e50b355d5bbc4e7acc4d292b8d720707861b07fb6e8c0394398982fbbbf90
liquidz/antq
dep_test.clj
(ns antq.util.dep-test (:require [antq.record :as r] [antq.test-helper :as h] [antq.util.dep :as sut] [antq.util.maven :as u.mvn] [clojure.java.io :as io] [clojure.test :as t])) (t/deftest compare-deps-test (t/testing "positive" (let [aaa (h/test-dep {:file "aa" :name "bb"}) bbb (h/...
null
https://raw.githubusercontent.com/liquidz/antq/ca8472b28702f5e568492001bc476fb09e5b2e6b/test/antq/util/dep_test.clj
clojure
(ns antq.util.dep-test (:require [antq.record :as r] [antq.test-helper :as h] [antq.util.dep :as sut] [antq.util.maven :as u.mvn] [clojure.java.io :as io] [clojure.test :as t])) (t/deftest compare-deps-test (t/testing "positive" (let [aaa (h/test-dep {:file "aa" :name "bb"}) bbb (h/...
74fbc96675e0324ff86d101a952fa5e873fcdb5f36ecc693c91ac3ccc89a6f5f
NorfairKing/tickler
AuthRSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Tickler.Web.Server.Handler.AuthRSpec where import Network.HTTP.Types import Test.Syd.Yesod import TestImport import Tickler.Data (parseUsername) import Tickler.Web.Server.Foundation import Tickler.Web.Server.TestUtils import Yesod.Auth # ANN module ( " HLint : ignore Reduce ...
null
https://raw.githubusercontent.com/NorfairKing/tickler/1b0c05dc1d32847596bd3ffe4f93d094e1f6382a/tickler-web-server-gen/test/Tickler/Web/Server/Handler/AuthRSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Tickler.Web.Server.Handler.AuthRSpec where import Network.HTTP.Types import Test.Syd.Yesod import TestImport import Tickler.Data (parseUsername) import Tickler.Web.Server.Foundation import Tickler.Web.Server.TestUtils import Yesod.Auth # ANN module ( " HLint : ignore Reduce duplication " : : String ) # spec ...
2bcc33a9f6ac416e6ecfee812c04872f22172c461641f56315fbee72ffff9e5e
mainland/nikola
compile.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Main where import Prelude hiding (map, zipWith) import qualifie...
null
https://raw.githubusercontent.com/mainland/nikola/d86398888c0a76f8ad1556a269a708de9dd92644/tests/compile.hs
haskell
# LANGUAGE DeriveDataTypeable #
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Main where import Prelude hiding (map, zipWith) import qualified Prelude as P import Control.Monad...
f0c1d501b31ea039dbe0c02c7f7d3316bc770ae5e94075feb3e4c24243244893
anurudhp/CPHaskell
Basic2D.hs
import Data.List (sortBy) ----------------------------- -- 2D-Vectors ----------------------------- data Vec2D t = Vec2D t t deriving (Show, Eq) instance Functor Vec2D where fmap f (Vec2D x y) = Vec2D (f x) (f y) nullVector :: (Num t) => Vec2D t nullVector = Vec2D 0 0 -- vector addition infixl 6 |+| (|+|) :: (N...
null
https://raw.githubusercontent.com/anurudhp/CPHaskell/01ae8dde6aab4f6ddfebd122ded0b42779dd16f1/Templates/Geometry/Basic2D.hs
haskell
--------------------------- 2D-Vectors --------------------------- vector addition vector subtraction dot product cross product scaling other operations project u onto v --------------------------- Lines --------------------------- --------------------------- ---------------------------
import Data.List (sortBy) data Vec2D t = Vec2D t t deriving (Show, Eq) instance Functor Vec2D where fmap f (Vec2D x y) = Vec2D (f x) (f y) nullVector :: (Num t) => Vec2D t nullVector = Vec2D 0 0 infixl 6 |+| (|+|) :: (Num t) => Vec2D t -> Vec2D t -> Vec2D t (Vec2D x y) |+| (Vec2D x' y') = Vec2D (x + x') (y + y'...
9016e47298416b4371f46c6cb0a5b1fe889526b87d9e7122e2e61ae4195c6e6b
jimcrayne/jhc
tc181.hs
{-# OPTIONS -fglasgow-exts #-} # LANGUAGE UndecidableInstances # Example of improvement , due to module Folders where data Folder = Folder newtype SB x = SB x newtype SS x = SS x data NodeArcsHidden = NodeArcsHidden class HasSS hasS x | hasS -> x where toSS :: hasS -> SS x instance HasSS (SB x) x where ...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/tc181.hs
haskell
# OPTIONS -fglasgow-exts # The call to toSS gives rise to HasSS (SB (Maybe NodeArcsHidden)) x and hence arcsHidden :: x Then improvement should give x = Maybe NodeArcsHidden and hence option=Maybe NodeArcsHidden
# LANGUAGE UndecidableInstances # Example of improvement , due to module Folders where data Folder = Folder newtype SB x = SB x newtype SS x = SS x data NodeArcsHidden = NodeArcsHidden class HasSS hasS x | hasS -> x where toSS :: hasS -> SS x instance HasSS (SB x) x where toSS (SB x) = (SS x) class ...
f8f494c3d42bcfe1b94e02d9627d652ba4ea0a49a423abab2bc55b7acc720ff9
facebook/infer
PulseNonDisjunctiveDomain.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/ec1467a4ec971b2a1f616efd97e0f8f302449e91/infer/src/pulse/PulseNonDisjunctiveDomain.ml
ocaml
NOTE: This [join] definition is incorrect when given arguments do not have a total order. Make sure that the function is always applied to the arguments that have a total order. if source var is never used later on, we can still suggest removing the copy even though the copy is modified
* 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 ...
dfbdf72c11f74aa566e8a44c61ff7ccd5133daed816f1d30a5c221eaf5362e46
exercism/haskell
HelloWorld.hs
module HelloWorld (hello) where hello :: String hello = "Goodbye, Mars!"
null
https://raw.githubusercontent.com/exercism/haskell/4e9a2a286a6adf1e0ce237f701e6687949f153ce/exercises/practice/hello-world/src/HelloWorld.hs
haskell
module HelloWorld (hello) where hello :: String hello = "Goodbye, Mars!"
d63409690bc9a1a6a05212d4c9a622ee44e897eda7b9e92ff524981fe1babdfe
ekmett/bits
Extras.hs
# LANGUAGE CPP , ForeignFunctionInterface , BangPatterns # #if __GLASGOW_HASKELL__ >= 702 # LANGUAGE Trustworthy # #endif #ifndef HLINT # LANGUAGE MagicHash # # LANGUAGE UnboxedTuples # #endif -------------------------------------------------------------------- -- | Copyright : ( c ) 2013 - 2014 -- License : B...
null
https://raw.githubusercontent.com/ekmett/bits/5caffc77cfee40e13d1611962ef9a4b1474c9ccd/src/Data/Bits/Extras.hs
haskell
------------------------------------------------------------------ | License : BSD3 Stability : experimental Portability: non-portable Calculate a number of fiddly bit operations using fast de Bruijn multiplication tables. ------------------------------------------------------------------ $setup >>> import...
# LANGUAGE CPP , ForeignFunctionInterface , BangPatterns # #if __GLASGOW_HASKELL__ >= 702 # LANGUAGE Trustworthy # #endif #ifndef HLINT # LANGUAGE MagicHash # # LANGUAGE UnboxedTuples # #endif Copyright : ( c ) 2013 - 2014 Maintainer : < > module Data.Bits.Extras ( Ranked(..) , log2 #if __GLASGOW_HASKE...
d3659d2e829d024158d20bf63d280551de7bf50e380eeb28c19d4339b8db43d0
cojna/iota
GaloisFieldSpec.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - orphans # module Data.GaloisFieldSpec (main, spec) where import Data.GaloisField import Test.Prelude import Test.Prop.Fractional import Test.Prop.Num instance KnownNat p => Arbitr...
null
https://raw.githubusercontent.com/cojna/iota/6d2ad5b71b1b50bca9136d6ed84f80a0b7713d7c/test/Data/GaloisFieldSpec.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - orphans # module Data.GaloisFieldSpec (main, spec) where import Data.GaloisField import Test.Prelude import Test.Prop.Fractional import Test.Prop.Num instance KnownNat p => Arbitr...
ce8bbcef669af78d4e1424019600e1af55a5fddc040f7d8d561dff395e10dbc0
mariaschett/ppltr
rule_generator.ml
Copyright 2020 and 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 distr...
null
https://raw.githubusercontent.com/mariaschett/ppltr/67f45f9e329800e6c39094d7c3c3af8d168638da/lib/rule_generator.ml
ocaml
assumes group-able rules are consecutive remove timeouts from rows rows where optimizations gave rise to multiple rules
Copyright 2020 and 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 distr...
21229e8a0cbda3ba44a0d284d71bdeba7eebaddb662d0a538a0bb77c1b9afdef
Copilot-Language/copilot
Local.hs
Copyright © 2011 National Institute of Aerospace / Galois , Inc. -- | Let expressions. -- Although Copilot is a DSL embedded in Haskell and does support let -- expressions, we want Copilot to be able to implement sharing, to detect when -- the same stream is being used in multiple places in a specification and --...
null
https://raw.githubusercontent.com/Copilot-Language/copilot/17a9b45eea4e95a465d6e773c6fbcf9bf810b6cc/copilot-language/src/Copilot/Language/Operators/Local.hs
haskell
| Let expressions. expressions, we want Copilot to be able to implement sharing, to detect when the same stream is being used in multiple places in a specification and avoid recomputing it unnecessarily. # LANGUAGE Safe # | Let expressions. Create a stream that results from applying a stream to a function on ...
Copyright © 2011 National Institute of Aerospace / Galois , Inc. Although Copilot is a DSL embedded in Haskell and does support let module Copilot.Language.Operators.Local ( local ) where import Copilot.Core (Typed) import Copilot.Language.Stream (Stream (..)) streams . Standard usage would be similar...
42801073008bb0d9186433a188e0089c8cdbef9074af1a209ce9fa427c8431cc
zotonic/dispatch_compiler
dispatch_compiler.erl
@author < > 2015 %% @doc Compile dispatch rules to an Erlang module . %% %% The dispatch compiler takes all the list of dispatch rules and creates an Erlang module that matches those rules . %% The Erlang module exports a single function : ` ' . %% %% This function takes the binary request path, split...
null
https://raw.githubusercontent.com/zotonic/dispatch_compiler/742e6bf8cba3c7a71714426006612e9fe077c3f7/src/dispatch_compiler.erl
erlang
@doc The dispatch compiler takes all the list of dispatch rules and creates This function takes the binary request path, split on ``"/"'' and return the matched dispatch rule and list of bindings. The dispatch function looks like: ``` match([], Context) -> {ok, {{home, [], controller_page, [...]}, []...
@author < > 2015 Compile dispatch rules to an Erlang module . an Erlang module that matches those rules . The Erlang module exports a single function : ` ' . match([<<"page " > > , I d , ] , Context ) - > { ok , { { page , [ " page " , i d , slug ] , controller_page , [ ... ] } , [ { id , Id ...
9f6ea1ee35a037650e37fe2ec14f00171293f8a92b5019c9bf135b6e55ef9140
seandepagnier/cruisingplot
water.scm
Copyright ( C ) 2011 < > ;; This Program is free software ; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , or ( at your option ) any later version . ;; This file converts units fro...
null
https://raw.githubusercontent.com/seandepagnier/cruisingplot/d3d83e7372e2c5ce1a8e8071286e30c2028088cf/water.scm
scheme
you can redistribute it and/or modify it under the terms of the GNU General Public either This file converts units from weather sensors and calculates True and apparent wind speed in knots and direction in radians calculate the true win heading and speed apparent = course + true find the course of water over g...
Copyright ( C ) 2011 < > version 3 of the License , or ( at your option ) any later version . (declare (unit water)) (use srfi-1) (define (water-speed) (warning-once "no water speed data supported, assuming no current") (computation-calculate 'gps-speed)) (define (water-direction) (warning-once "no wa...
a6b4de2f998fbed4f643dfd66810c85647d02faa53f9d949ee2757a7228d5078
zwizwa/staapl
rpn-live.rkt
#lang racket/base ;; A late-bound dialect of the scat: language. Identifiers are ;; translated using the (live ...) mapper macro into code that ;; performs lookup and interpretation at runtime. ;; This language is used to implement the target: language which has ;; similar late-bound semantics. (require "../tools....
null
https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/live/rpn-live.rkt
racket
A late-bound dialect of the scat: language. Identifiers are translated using the (live ...) mapper macro into code that performs lookup and interpretation at runtime. This language is used to implement the target: language which has similar late-bound semantics. Same as scat: but all identifiers are late-bound. ...
#lang racket/base (require "../tools.rkt" "../scat.rkt" "../rpn.rkt" "../ns.rkt" (for-syntax "../ns-tx.rkt" racket/base)) (provide (all-defined-out)) (define (live-interpret sym) (define (dbg dict) '(printf "live-interpret: ~a ~a\n" sym dict)) (define defined? (make-ns-defined? sym)) (cond ((de...
a12c1ddc831b6b227e7c468c405478bba3249c336d2400da188245104315007e
k0dev/erlang-notes
firewall.erl
-module(firewall). -export([example1/0, example2/0, example3/0, dummy/1, dummy/2, dummy/3]). Situazione in % % % P1 P2 P7 % % \ % [ P3 ] ( system process ) % % ...
null
https://raw.githubusercontent.com/k0dev/erlang-notes/0f42d5e051f64f110e2ef22a7fd74336b9e9c3b2/code/examples/concurrency/firewall.erl
erlang
% \ % \ % P4 % \ % % tutti i processi sono vivi termino P5 con motivaz...
-module(firewall). -export([example1/0, example2/0, example3/0, dummy/1, dummy/2, dummy/3]). setup() -> P1 = spawn(?MODULE, dummy, [p1]), P2 = spawn(?MODULE, dummy, [p2]), P3 = spawn(?MODULE, dummy, [p3, P1, system]), P4 = spawn(?MODULE, dummy, [p4, P3]), P5 = spawn(?MODULE, dummy, [p5, P4]), ...
97791a28fada4ef0dfb0a3809abebdcf91831b68d8aade9a5c5d45eea833e8dd
pascalpoizat/fbpmn
Main.hs
import Colourista (errorMessage, successMessage) import Fbpmn.Analysis.Alloy.IO.Alloy as BGAlloy (writer) import Fbpmn.Analysis.Tla.IO.Dot as LogDot (writer) import Fbpmn.Analysis.Tla.IO.Html as LogHtml (writer, Extension (Communication, Space)) import Fbpmn.Analysis.Tla.IO.Json as LogJson (writer) import Fbpmn.Analysi...
null
https://raw.githubusercontent.com/pascalpoizat/fbpmn/2288504ca2b24f202f822cfc539dc06b8783bdbd/app/Main.hs
haskell
transformations from TLA+ logs reader (from input file to model) writer (from model to output file) model validator model filtering should validation be done? input file (without suffix) output file (without suffix)
import Colourista (errorMessage, successMessage) import Fbpmn.Analysis.Alloy.IO.Alloy as BGAlloy (writer) import Fbpmn.Analysis.Tla.IO.Dot as LogDot (writer) import Fbpmn.Analysis.Tla.IO.Html as LogHtml (writer, Extension (Communication, Space)) import Fbpmn.Analysis.Tla.IO.Json as LogJson (writer) import Fbpmn.Analysi...
7376330a8c57e5da44c86183acc588c1711c14979ab446bf60ef0b30556e556e
aantron/dream
chat.eml.ml
let home = <html> <body> <form> <input type="submit" value="Send"> <input type="text" id="message" size="64" autofocus> </form> <script> let message = document.getElementById("message"); let chat = document.querySelector("body"); let socket = new WebSocket("ws://" + window....
null
https://raw.githubusercontent.com/aantron/dream/9bec26f837febae64e37a5eb39f7ef66914db4b1/example/w-chat/chat.eml.ml
ocaml
let home = <html> <body> <form> <input type="submit" value="Send"> <input type="text" id="message" size="64" autofocus> </form> <script> let message = document.getElementById("message"); let chat = document.querySelector("body"); let socket = new WebSocket("ws://" + window....
4d21cdda5c9b4801f58a91334e0269952b59ebfea30e8e72ffa1ac7fd084df50
clojure/clojurescript
net.cljs
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; ...
null
https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/main/cljs/clojure/browser/net.cljs
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....
Copyright ( c ) . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns ^{:doc "Network communication library, wrapping goog.net. Includes a common API over XhrIo, CrossPageChannel, and Websockets." :author "Bobby Calderwood and Alex Redington"} clojure.browser.net (:require [clojure.brow...
20ec5d06ca6f8df2247d04444dfbd252eca55f30f16a8d118b880e4390f0cf19
Perry961002/SICP
exa2.4.2-tagged-data.scm
(define (attach-tag type-tag contents) (cons type-tag contents)) ;提取出类型标志 (define (type-tag datum) (if (pair? datum) (car datum) (error "Bad tagged datum -- TYPE-TAG" datum))) (define (contents datum) (if (pair? datum) (cdr datum) (error "Bad tagged datum -- CONTENTS" d...
null
https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap2/example/exa2.4.2-tagged-data.scm
scheme
提取出类型标志 谓词rectangular?和polar?,辨识复数用什么形式表示 ----------------------------------------------------------------------------- ---------------------------------------------------------------
(define (attach-tag type-tag contents) (cons type-tag contents)) (define (type-tag datum) (if (pair? datum) (car datum) (error "Bad tagged datum -- TYPE-TAG" datum))) (define (contents datum) (if (pair? datum) (cdr datum) (error "Bad tagged datum -- CONTENTS" datum))) ...
620627a3e3286de507576cf202afb490f5b8be76173d91c8aa988152a32f7ca3
oliyh/slacky
meme.clj
(ns slacky.meme (:require [clojure.core.async :as a] [clojure.string :as string] [clojure.tools.logging :as log] [slacky [bing :as bing] [memecaptain :as memecaptain] [slack :as slack] [templates :as templates]] [slack...
null
https://raw.githubusercontent.com/oliyh/slacky/909110e0555b7e443c3cf014c7c34b00b31c1a18/src/clj/slacky/meme.clj
clojure
pipe case insensitivity non-capturing group optional space optional question mark optional exclamation mark optional comma pipe optional punctuation
(ns slacky.meme (:require [clojure.core.async :as a] [clojure.string :as string] [clojure.tools.logging :as log] [slacky [bing :as bing] [memecaptain :as memecaptain] [slack :as slack] [templates :as templates]] [slack...
b2ae0ccb4a013c69b0f44ddb5b125d0af6d442afe9233f92bb113e3f60d54bbc
spurious/sagittarius-scheme-mirror
weak.scm
;; -*- scheme -*- #!compatible (import (rnrs) (sagittarius) (srfi :1) (srfi :64 testing)) (test-begin "Weak objects") ;; (define (scrub-stack . args) ;; (unless (null? args) ;; ;; we need to scrub c stack as well ;; (do ((i 0 (+ i 1))) ( (= i 10000 ) ) ( let ( ( v ( apply vector ( iota 10 ) )...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/weak.scm
scheme
-*- scheme -*- (define (scrub-stack . args) (unless (null? args) ;; we need to scrub c stack as well (do ((i 0 (+ i 1))) (apply scrub-stack (cdr args))) args) stack holds this non pointer we can't gurantee this ;; pointer (gc) (weak-box-empty? wb))) non pointer TODO wea...
#!compatible (import (rnrs) (sagittarius) (srfi :1) (srfi :64 testing)) (test-begin "Weak objects") ( (= i 10000 ) ) ( let ( ( v ( apply vector ( iota 10 ) ) ) ) ( vector - set ! v 0 1 ) ) ) TODO involve GC (test-assert "weak-box?" (make-weak-box (cons 1 2))) (test-assert "weak-box-empty? (1)" ...
0065b4fc8dc8545bbc6d855eb80f5f41f6f09f21d7edafe2b6b2bf640c019756
den1k/vimsical
commands_test.clj
(ns vimsical.backend.handlers.vims.commands-test (:require [clojure.test :refer [deftest is use-fixtures]] [orchestra.spec.test :as st] [vimsical.backend.components.server.test :as server.test] [vimsical.backend.data :as data] [vimsical.backend.handlers.vims.commands :as sut] [vimsical.backend.syste...
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/test/backend/vimsical/backend/handlers/vims/commands_test.clj
clojure
* New * Title * Snapshots
(ns vimsical.backend.handlers.vims.commands-test (:require [clojure.test :refer [deftest is use-fixtures]] [orchestra.spec.test :as st] [vimsical.backend.components.server.test :as server.test] [vimsical.backend.data :as data] [vimsical.backend.handlers.vims.commands :as sut] [vimsical.backend.syste...
88670598f87a86dc442a96077aa3bb92f56a25c6765bffa051598ddbe4964c57
BillHallahan/G2
Test46.hs
module Test46 (f) where {-@ f :: x:{ x:Int | x > 0 } -> Int @-} f :: Int -> Int f x = h g x {-@ g :: Int -> Int @-} g :: Int -> Int g x = x + x h :: (a -> a) -> a -> a h func x = func x
null
https://raw.githubusercontent.com/BillHallahan/G2/0683a633f9dad2cd5066d2515645fa79bb105401/tests_lh/test_files/Pos/Test46.hs
haskell
@ f :: x:{ x:Int | x > 0 } -> Int @ @ g :: Int -> Int @
module Test46 (f) where f :: Int -> Int f x = h g x g :: Int -> Int g x = x + x h :: (a -> a) -> a -> a h func x = func x
a269ea7e3f405b2ae09bbeb95d43d6490e1387b8400c87620711995228e329b5
bobzhang/ocaml-book
basic_ulex.ml
let regexp op_ar = ['+' '-' '*' '/'] let regexp op_bool = ['!' '&' '|'] let regexp rel = ['=' '<' '>'] let (|>) x f = f x (** get string output, not int array *) let lexeme = Ulexing.utf8_lexeme let rec basic = lexer | [' '] -> basic lexbuf | op_ar | op_bool -> let ar = lexeme lexbuf in `Lsymbol ar...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/lexing/basic_ulex.ml
ocaml
* get string output, not int array
let regexp op_ar = ['+' '-' '*' '/'] let regexp op_bool = ['!' '&' '|'] let regexp rel = ['=' '<' '>'] let (|>) x f = f x let lexeme = Ulexing.utf8_lexeme let rec basic = lexer | [' '] -> basic lexbuf | op_ar | op_bool -> let ar = lexeme lexbuf in `Lsymbol ar | "<=" | ">="| "<>" | rel -> `Lsymb...
35ddd7c2dab5a62f501795ebc1f96223b9b6e16a86e525c755ab087c5cb4d46a
kahua/Kahua
server.scm
;; Common server operations ;; Copyright ( c ) 2003 - 2007 Scheme Arts , L.L.C. , All rights reserved . Copyright ( c ) 2003 - 2007 Time Intermedia Corporation , All rights reserved . ;; See COPYING for terms and conditions of using this software ;; ;; This module integrates various kahua.* components, and prov...
null
https://raw.githubusercontent.com/kahua/Kahua/c90fe590233e4540923e4e5cc9f61da32873692c/src/kahua/server.scm
scheme
Common server operations See COPYING for terms and conditions of using this software This module integrates various kahua.* components, and provides framework. internally keep worker-id internally keep worker-type internally keep explicitly specified worker uri Context A context is established every time t...
Copyright ( c ) 2003 - 2007 Scheme Arts , L.L.C. , All rights reserved . Copyright ( c ) 2003 - 2007 Time Intermedia Corporation , All rights reserved . application servers a common utility to communicate - server (define-module kahua.server (use srfi-1) (use srfi-2) (use srfi-11) (use srfi-13) (us...
bf8874739f91a9a5b6c023ccbdb52cead70df075b2c3a442c61a8a1eba7f746f
akrmn/generic-constructors
Tagged.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE BlockArguments # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE InstanceSigs # # LANGUAGE NoStarIsType # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE ...
null
https://raw.githubusercontent.com/akrmn/generic-constructors/156cfa56e45cc2c8f91b126df9ed7aafc23711c1/src/Constructors/Tagged.hs
haskell
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE BlockArguments # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE InstanceSigs # # LANGUAGE NoStarIsType # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE ...
9a43c3ed3006ac15b7af62dcd601e8a8ecfaa0ede43d5647fea57c3ec3b8ebd9
RichiH/git-annex
OSX.hs
OSX stuff - - Copyright 2012 < > - - License : BSD-2 - clause - - Copyright 2012 Joey Hess <> - - License: BSD-2-clause -} # OPTIONS_GHC -fno - warn - tabs # module Utility.OSX where import Utility.UserInfo import System.FilePath autoStartBase :: String -> FilePath autoStartBase label = "L...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Utility/OSX.hs
haskell
OSX stuff - - Copyright 2012 < > - - License : BSD-2 - clause - - Copyright 2012 Joey Hess <> - - License: BSD-2-clause -} # OPTIONS_GHC -fno - warn - tabs # module Utility.OSX where import Utility.UserInfo import System.FilePath autoStartBase :: String -> FilePath autoStartBase label = "L...
4c1e0a782cec79927349f34ccecd66f2257cd35d8ba77a30a0544ab605400a03
huangjs/cl
output.lisp
Copyright ( c ) 1987 ;;; Permission is given to freely modify and distribute this code ;;; so long as this copyright notice is retained. These routines write the ps code stream to a file . ;;; This outputs a single token. Beware of case problems. A very hokey ;;; algorithm is user for formatting. Read ...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/plisp/compiler/output.lisp
lisp
Permission is given to freely modify and distribute this code so long as this copyright notice is retained. This outputs a single token. Beware of case problems. A very hokey algorithm is user for formatting. Read the generated postscript at your own risk! only for quoted items and frame sizes (& null) ...
Copyright ( c ) 1987 These routines write the ps code stream to a file . (defun write-token (tok) (cond ((eq (car tok) 'quote) (write-token-1 (cadr tok) T)) ((eq (car tok) 'save-temp) (when (caddr tok) (write-token 'dup) (write-token `',(caddr tok)) (write-token 'exch) ...
f0f96ffef341335904f56ac4fd148b3d0cb4879a4af5a9324c3730c99e2a3263
Zulu-Inuoe/clution
proxy.lisp
(defpackage #:qlot/proxy (:use #:cl) (:import-from #:uiop #:getenvp) (:export #:get-proxy)) (in-package #:qlot/proxy) (defvar *proxy* (let ((proxy (or (getenvp "http_proxy") (getenvp "HTTP_PROXY")))) (and (not (string= "" proxy)) proxy))) (defun get-proxy () *proxy*) ...
null
https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/qlot-20180131-git/proxy.lisp
lisp
dummy for suppress style warning do not use proxy if connect localhost
(defpackage #:qlot/proxy (:use #:cl) (:import-from #:uiop #:getenvp) (:export #:get-proxy)) (in-package #:qlot/proxy) (defvar *proxy* (let ((proxy (or (getenvp "http_proxy") (getenvp "HTTP_PROXY")))) (and (not (string= "" proxy)) proxy))) (defun get-proxy () *proxy*) ...
32563f69b7ec557ee9623d96b74cdc95189823beef237290db29b460074f516f
dyoo/brainfudge
hello-world.rkt
#lang planet dyoo/bf +++++ +++++ initialize counter (cell #0) to 10 [ use loop to set the next four cells to 70/100/30/10 > +++++ ++ add 7 to cell #1 > +++++ +++++ add 10 to cell #2 > +++ add 3 to cell #3 > + ...
null
https://raw.githubusercontent.com/dyoo/brainfudge/cafaa03cf710f13a2ce5f381ba17c6dfd2ef493a/examples/hello-world.rkt
racket
#lang planet dyoo/bf +++++ +++++ initialize counter (cell #0) to 10 [ use loop to set the next four cells to 70/100/30/10 > +++++ ++ add 7 to cell #1 > +++++ +++++ add 10 to cell #2 > +++ add 3 to cell #3 > + ...
c0418bd35bd4bdd7f54d865bb0e7b9f797b4da530ace8d29d3b9da8889890c12
jobjo/popper
test_result.ml
open Format type failure = { num_shrinks : int ; num_attempts : int ; pp : Format.formatter -> unit -> unit ; explanation : string ; location : string option } type discard = { num_discarded : int } type status = | Pass | Fail of failure | Discarded of discard type result = { name : string optio...
null
https://raw.githubusercontent.com/jobjo/popper/8d9ed1e97d3d81cfd118bf4e70c87c0f8127add6/src/lib/test_result.ml
ocaml
n/n tests passed! a/n tests passed, x discared and 0 failed in ns! a/n tests passed, x discared and y failed in ns. a/n tests passed and x failed in ns.
open Format type failure = { num_shrinks : int ; num_attempts : int ; pp : Format.formatter -> unit -> unit ; explanation : string ; location : string option } type discard = { num_discarded : int } type status = | Pass | Fail of failure | Discarded of discard type result = { name : string optio...
b2ec3ed2dbeef801e4ead68fd2107c800212dee5456621674b3b566661d44ac3
ananthakumaran/eopl
9.clj
;; Add to the environment interface an observer called has-binding? ;; that takes an environment env and a variable s and tests to see if ;; s has an associated value in env. Implement it using the a-list ;; representation (ns eopl.chap-2.9 (:use clojure.test) (:use eopl.chap-2.5) (:use eopl.chap-2.8)) (defn ha...
null
https://raw.githubusercontent.com/ananthakumaran/eopl/876d6c2e44865e2c89a05a683d99a289c71f1487/src/eopl/chap_2/9.clj
clojure
Add to the environment interface an observer called has-binding? that takes an environment env and a variable s and tests to see if s has an associated value in env. Implement it using the a-list representation
(ns eopl.chap-2.9 (:use clojure.test) (:use eopl.chap-2.5) (:use eopl.chap-2.8)) (defn has-binding? [env s] (if (not (empty-env? env)) (let [[var val] (first env)] (if (= var s) true (recur (rest env) s))) false)) (deftest has-binding-test (let [env (extend-env 'y "y" ...
bfb635b80f07f576c2e32311d8022def0ae341175a67025b50e763c0828bb6e7
well-typed-lightbulbs/ocaml-esp32
ocaml_tests.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/ocamltest/ocaml_tests.ml
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Paris Copyright 2016 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Tests open Builtin_actions open Ocaml_actions let bytecode = let opt_actions = [ setup_ocamlc_op...
76794bbd298a531138ffd4aed6d8c470c2f23339d215d2a33f5c0ca806cb1240
bdeket/rktsicm
legendre.rkt
#lang racket/base (provide (all-defined-out)) (require "../kernel-gnrc.rkt" "../simplify/pcf.rkt" ) bdk ; ; start original file LEGENDRE.SCM -- the Legendre Polynomials returned as a stream or singly Edited by GJS 10Jan09 ;;; The following defines a stream whose nth term (0-based) is P[n ]...
null
https://raw.githubusercontent.com/bdeket/rktsicm/225a43bc3d9953f9dbbdbfb2fa4a50028a7a41ce/rktsicm/sicm/poly/legendre.rkt
racket
; start original file The following defines a stream whose nth term (0-based) is P[n](x) = ((2n-1)/n)*x*P[n-1](x) - ((n-1)/n)*P[n-2](x)
#lang racket/base (provide (all-defined-out)) (require "../kernel-gnrc.rkt" "../simplify/pcf.rkt" ) LEGENDRE.SCM -- the Legendre Polynomials returned as a stream or singly Edited by GJS 10Jan09 P[n ] . We use the recurrence relation : P[0](x ) = 1 , P[1](x ) = x and for n > 1 (...
b967efa645615465c3987d6d1fca51f66fcb252cfdfc0781ecff68b8504aa68a
triffon/fp-2022-23
03-add.rkt
#lang racket (require "00-stream.rkt") (define (add stream1 stream2) (if (or (empty-stream? stream1) (empty-stream? stream2)) the-empty-stream (cons-stream (+ (head stream1) (head stream2)) (add (tail stream1) (tail stream2)))))
null
https://raw.githubusercontent.com/triffon/fp-2022-23/22826e457f2d1add264aa1f02ebb9e796712d5b6/exercises/inf2/09/scheme/03-add.rkt
racket
#lang racket (require "00-stream.rkt") (define (add stream1 stream2) (if (or (empty-stream? stream1) (empty-stream? stream2)) the-empty-stream (cons-stream (+ (head stream1) (head stream2)) (add (tail stream1) (tail stream2)))))
dc4874df4c78b82d65edf61a3be15b81f52b9f3daa0d13474b45f7fdb58f45c7
nspin/hs-arm
ReadLogic.hs
{-# LANGUAGE OverloadedStrings #-} module ReadLogic ( readLogic , Logic , GroupId , FieldName , testReadLogic ) where import MnemGroups import ARM.MRAS import Prelude hiding (takeWhile, hGetContents) import Control.Applicative import Control.Monad import Data.Attoparsec.ByteString.Char8 impo...
null
https://raw.githubusercontent.com/nspin/hs-arm/8f10870a4afbbba010e78bd98e452ba67adc34e0/harm/harm-tables-gen/ReadLogic.hs
haskell
# LANGUAGE OverloadedStrings # This is slow, but it doesn't matter because the input is always small
module ReadLogic ( readLogic , Logic , GroupId , FieldName , testReadLogic ) where import MnemGroups import ARM.MRAS import Prelude hiding (takeWhile, hGetContents) import Control.Applicative import Control.Monad import Data.Attoparsec.ByteString.Char8 import Data.Char import Data.List hidin...
282e7748cc7e40f03f34864981e03a68a8c3a57af640683c75ebbba30d32ab86
mikelevins/categories
load-gambit.scm
;;;; *********************************************************************** ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: load-gambit.scm ;;;; Project: Categories ;;;; Purpose: load Gambit-specific Categories ;;;; Author: mikel evins Copyright : Copyright 2009 by mikel evins , all rights ...
null
https://raw.githubusercontent.com/mikelevins/categories/66e3861071e4d88b7b27421a78ab497e1fb5fa0c/0.2.1/scm/load-gambit.scm
scheme
*********************************************************************** FILE IDENTIFICATION Name: load-gambit.scm Project: Categories Purpose: load Gambit-specific Categories Author: mikel evins See the accompanying file "License" for more information ***************...
Copyright : Copyright 2009 by mikel evins , all rights reserved License : Licensed under the Apache License , version 2.0 (define $root "/Users/mikel/Valise/xg/repositories/categories/scm") (define $load-files "/gambit/errors.scm" "/gambit/utils.scm" "/gambit/tagged-vectors.scm" "/ga...
471d4fa2955790da06be9097752b29df815ba1597fe2c96287b306acf19f69d6
fterrier/pylos
state.cljs
(ns pylos.game.state (:require [om.core :as om] [pylos.game.game-state :refer [initial-state-game]] [pylos.ui :refer [game-infos-with-meta]])) (def initial-state {:game initial-state-game}) ; state (defonce app-state (atom initial-state)) (defonce app-channels (atom {})) ; get state ...
null
https://raw.githubusercontent.com/fterrier/pylos/f9283cf58a32000ed271e768ab6151ac081ed37d/src/cljs/pylos/game/state.cljs
clojure
state get state convenience stuff for development
(ns pylos.game.state (:require [om.core :as om] [pylos.game.game-state :refer [initial-state-game]] [pylos.ui :refer [game-infos-with-meta]])) (def initial-state {:game initial-state-game}) (defonce app-state (atom initial-state)) (defonce app-channels (atom {})) (defn game [] (om/...
b79b4e00816a3e8ac1a4907e709824f4433b275d69efc4e92af3ec2c571983a8
AshleyYakeley/Truth
Store.hs
module Data.Store ( module Data.Store , Key ) where import Shapes.Import data Store a = MkStore Key (IntMap a) instance Functor Store where fmap ab (MkStore key mp) = MkStore key $ fmap ab mp instance Foldable Store where foldMap am (MkStore _ mp) = mconcat $ fmap am $ toList mp ...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/d704b8baaa77dac002922eccecdd91018c4b7eef/Changes/shapes/src/Data/Store.hs
haskell
module Data.Store ( module Data.Store , Key ) where import Shapes.Import data Store a = MkStore Key (IntMap a) instance Functor Store where fmap ab (MkStore key mp) = MkStore key $ fmap ab mp instance Foldable Store where foldMap am (MkStore _ mp) = mconcat $ fmap am $ toList mp ...
ef2ef6c28d02eca76b7b8445ff9b5e547ede28f2ff8c16cc11da182908f0c2b2
yzhs/ocamlllvm
sets.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/tests/basic/sets.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : sets.ml 10713 2010 - 10 - 08 ...
6916b00bbd9313b99a318547294d22d514e554a8af7ace161d79ad13dc76c591
exoscale/pithos
response.clj
(ns io.pithos.response "Provides ring like facilities for working with HTTP responses" (:require [clojure.tools.logging :refer [debug error]])) (defn response "Create a basic response, with optional body" ([] {:status 200 :headers {}}) ([body] {:status 200 :headers {} :body body})) (defn redire...
null
https://raw.githubusercontent.com/exoscale/pithos/54790f00fbfd330c6196d42e5408385028d5e029/src/io/pithos/response.clj
clojure
(ns io.pithos.response "Provides ring like facilities for working with HTTP responses" (:require [clojure.tools.logging :refer [debug error]])) (defn response "Create a basic response, with optional body" ([] {:status 200 :headers {}}) ([body] {:status 200 :headers {} :body body})) (defn redire...
7cc38763a0c5e37a6293c3b93c9922fd20a83f6991320e1e6a9b7b5b8dca4e0f
palkan/influx_udp
influx_udp_app.erl
-module(influx_udp_app). -behaviour(application). -include_lib("influx_udp/include/influx_udp_priv.hrl"). -include_lib("influx_udp/include/influx_udp.hrl"). -define(SERVER, ?MODULE). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> ?I(#{msg => "Starting application: influx_udp"}), influx_udp_sup:start...
null
https://raw.githubusercontent.com/palkan/influx_udp/23e0ef865405743fd0fbf8711183ce9ea236a7d5/src/influx_udp_app.erl
erlang
-module(influx_udp_app). -behaviour(application). -include_lib("influx_udp/include/influx_udp_priv.hrl"). -include_lib("influx_udp/include/influx_udp.hrl"). -define(SERVER, ?MODULE). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> ?I(#{msg => "Starting application: influx_udp"}), influx_udp_sup:start...
0f0168461d2ee8ca184a648f8b660db312601439b2a1d1bed6bc98d8022fe103
michaelmelanson/erlyweb
erlsql.erl
@author < > [ ] @copyright Yariv Sadan 2006 - 2007 %% %% @doc ErlSQL is a domain specific embedded language for expressing SQL statements in Erlang as well as a library for generating the literal equivalents of expressions . %% lets you describe SQL queries using a combination of Erlang %% lists, tupl...
null
https://raw.githubusercontent.com/michaelmelanson/erlyweb/997df18b70459bfaaf8c3ab70ab4f54907045d0f/src/erlsql/erlsql.erl
erlang
@doc lists, tuples, atoms and values in a way that resembles the structure of SQL statements. You can pass this structure to the sql/1 or sql/2 functions, which parse it and return an iolist (a tree of strings and/or binaries) or a single binary, either of which can be sent to database engine through a socket ...
@author < > [ ] @copyright Yariv Sadan 2006 - 2007 ErlSQL is a domain specific embedded language for expressing SQL statements in Erlang as well as a library for generating the literal equivalents of expressions . lets you describe SQL queries using a combination of Erlang ErlSQL supports a large su...
3ca17ea1c9d6f3181b0af1a5e1756720c4b2f883f34a88577e03db15b5bb9a55
cxphoe/SICP-solutions
3.27.rkt
(load "3.25.rkt") (define (fib n) (cond ((= n 0) 0) ((= n 1) 1) (else (+ (fib (- n 1)) (fib (- n 2)))))) (define (memoize f) (let ((table (make-table))) (lambda (x) (let ((previously-computed-result (get (list x)))) (or previously-computed-result (let...
null
https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%203-Modeling%20with%20Mutable%20Data/3.Changed%20Data/3.27.rkt
racket
(load "3.25.rkt") (define (fib n) (cond ((= n 0) 0) ((= n 1) 1) (else (+ (fib (- n 1)) (fib (- n 2)))))) (define (memoize f) (let ((table (make-table))) (lambda (x) (let ((previously-computed-result (get (list x)))) (or previously-computed-result (let...
0de279fcd42021861da9eb72249f681f02c651a119d040852da9bd4600bb7052
racket/eopl
sec2.1.rkt
#lang eopl (require eopl/tests/private/utils) (let () ;; Unary Representation page 33 (define zero (lambda () '())) (define is-zero? (lambda (n) (null? n))) (define successor (lambda (n) (cons #t n))) (define predecessor (lambda (n) (cdr n))) (define plus (lambda (x y) (if (is-zero? x) ...
null
https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter2/sec2.1.rkt
racket
Unary Representation (report-unit-tests-completed 'unary-representation) Scheme number representation (report-unit-tests-completed 'scheme-number-representation) Reverse-number representation unchanged below here! (report-unit-tests-completed 'reverse-number-representation)
#lang eopl (require eopl/tests/private/utils) (let () page 33 (define zero (lambda () '())) (define is-zero? (lambda (n) (null? n))) (define successor (lambda (n) (cons #t n))) (define predecessor (lambda (n) (cdr n))) (define plus (lambda (x y) (if (is-zero? x) y (success...
b22668eb6446e54c52a96cc29a6e3ff7f542d2fb7a23b18a3600da4be990dc19
FlowerWrong/mblog
shop2.erl
%% --- Excerpted from " Programming Erlang , Second Edition " , published by The Pragmatic Bookshelf . %% Copyrights apply to this code. It may not be used to create training material, %% courses, books, articles, and the like. Contact us if you are in doubt. %% We make no guarantees that this code is fit for...
null
https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/shop2.erl
erlang
--- Copyrights apply to this code. It may not be used to create training material, courses, books, articles, and the like. Contact us if you are in doubt. We make no guarantees that this code is fit for any purpose. Visit for more book information. ---
Excerpted from " Programming Erlang , Second Edition " , published by The Pragmatic Bookshelf . -module(shop2). -export([total/1]). -import(lists, [map/2, sum/1]). total(L) -> sum(map(fun({What, N}) -> shop:cost(What) * N end, L)).
a0f8137ec7572d322ccfd092099e8b408fa24d0a31d028fc179a8ea62a291fa8
soarlab/FPTaylor
test_opt.ml
(* Use INTERVAL/ocamlfpu *) #directory "./INTERVAL";; #load "INTERVAL/interval.cma";; open List;; open Interval;; let mk_const_interval f = {low = f; high = f};; let intersect x1 x2 = { low = max x1.low x2.low; high = min x1.high x2.high; };; let iabs x = max (abs_float x.low) (abs_float x.high);; let mk_l...
null
https://raw.githubusercontent.com/soarlab/FPTaylor/efbbc83970fe3c9f4cb33fafbbe1050dd18749cd/unused/test_opt.ml
ocaml
Use INTERVAL/ocamlfpu -------------------------- --------------------------- -------------------------------- let tf, dom' = estimate_mono dom f in let v = tform1_interval dom' tf in let v = tform1_interval dom tf in All conditions are assumed to be (g x <= 0) ------------------------ ****...
#directory "./INTERVAL";; #load "INTERVAL/interval.cma";; open List;; open Interval;; let mk_const_interval f = {low = f; high = f};; let intersect x1 x2 = { low = max x1.low x2.low; high = min x1.high x2.high; };; let iabs x = max (abs_float x.low) (abs_float x.high);; let mk_list n f = let rec mk n acc...
cccc5b721ceea88231b663d133803202d21d070eead7015acd0fe3d1d28da928
ghc/packages-dph
ObjImport.hs
module ObjImport ( parseObj , model) where import Common import qualified Common as C import Data.List import qualified Data.Vector.Unboxed as VU import Debug.Trace parseObj :: String -> ([Vec3], [(Int,Int,Int,Colour)]) parseObj s = go (lines s) ([],[]) where go [] (vs,ts) = (reverse vs,ts) go (c:cs...
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-examples/examples/spectral/Pluecker/ObjImport.hs
haskell
read the model, fix it up a bit, add a floor plane
module ObjImport ( parseObj , model) where import Common import qualified Common as C import Data.List import qualified Data.Vector.Unboxed as VU import Debug.Trace parseObj :: String -> ([Vec3], [(Int,Int,Int,Colour)]) parseObj s = go (lines s) ([],[]) where go [] (vs,ts) = (reverse vs,ts) go (c:cs...
aabb4d6cd721a6b4d3d67d9faae2f54d103ce0ba5d44b6ad1169c94757414886
simingwang/emqx-plugin-kafkav5
gpb_compile_descr.erl
Copyright ( C ) 2013 %%% Author : < > %%% %%% This library is free software; you can redistribute it and/or %%% modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later version . %...
null
https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/plugins/gpb/descr_src/gpb_compile_descr.erl
erlang
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
Copyright ( C ) 2013 Author : < > License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA ...
22cd642620b2ed7e93975dc5b58f89aaefc1a8ba622a2248214d3a8f0088da43
ertugrulcetin/procedure.async
db.cljs
(ns favorite-songs.db) (def default-db {:name "re-frame"})
null
https://raw.githubusercontent.com/ertugrulcetin/procedure.async/2f9af363904c297ef8332e4710db899c5c94e7cd/examples/favorite-songs/src/cljs/favorite_songs/db.cljs
clojure
(ns favorite-songs.db) (def default-db {:name "re-frame"})
8ef5679f731110dc5bacccbb2e954b3202b0c916ef4d3ba6fc25399d8a0b83a4
andorp/bead
Validators.hs
# LANGUAGE CPP # module Bead.View.Validators where import Prelude #ifndef FAY import Data.List (find) import Test.Tasty.TestSet #endif This module is compiled with Fay and -- | Validator for an input field data FieldValidator = FieldValidator { Produces True if the is valid , message :: String -- ...
null
https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/snaplets/fay/src/Bead/View/Validators.hs
haskell
| Validator for an input field The message to shown when the validation fails
# LANGUAGE CPP # module Bead.View.Validators where import Prelude #ifndef FAY import Data.List (find) import Test.Tasty.TestSet #endif This module is compiled with Fay and data FieldValidator = FieldValidator { Produces True if the is valid } validate :: FieldValidator -> String -> a -> (String -> a) -> a ...
3490292fe94a54cadc4d4ccacd8a52d97603da2e8652005fef0cd327f7f5956a
nboldi/c-parser-in-haskell
ASTNode.hs
# LANGUAGE MultiParamTypeClasses , TypeOperators , FlexibleInstances , FlexibleContexts , DefaultSignatures , OverlappingInstances , ImpredicativeTypes # -- | Provides a derivable class that can be used to access information stored in nodes. module SourceCode.ASTNode where import Control.Lens (Lens', lens) impor...
null
https://raw.githubusercontent.com/nboldi/c-parser-in-haskell/1a92132e7d1b984cf93ec89d6836cc804257b57d/SourceCode/ASTNode.hs
haskell
| Provides a derivable class that can be used to access information stored in nodes. No data type should ever be instantiated with both 'ASTData' and 'ASTNode' classes. | Mark a datatype that it is an AST node. Provides access to the node information. | Generic class to access info members inside nodes | No in...
# LANGUAGE MultiParamTypeClasses , TypeOperators , FlexibleInstances , FlexibleContexts , DefaultSignatures , OverlappingInstances , ImpredicativeTypes # module SourceCode.ASTNode where import Control.Lens (Lens', lens) import GHC.Generics import Control.Applicative import Data.Maybe | data in the AST tha...
05af24193ae6db9fe0ffdb5994fd3644a11b60a67652ad37f49d647b4f4354e8
ygmpkk/house
Main.hs
-------------------------------------------------------------- ( c ) 2001 . $ Revision : 1.1 $ $ Author : ross $ $ Date : 2003/07/31 17:45:36 $ -------------------------------------------------------------- Daan Leijen (c) 2001. $Revision: 1.1 $ $Author: ross $ $Date: 2003/07/31 17:45:36 $ ----------...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/parsec/examples/while/Main.hs
haskell
------------------------------------------------------------ ------------------------------------------------------------ -------------------------------------------------------------}
( c ) 2001 . $ Revision : 1.1 $ $ Author : ross $ $ Date : 2003/07/31 17:45:36 $ Daan Leijen (c) 2001. $Revision: 1.1 $ $Author: ross $ $Date: 2003/07/31 17:45:36 $ module Main where import While( prettyWhileFromFile ) main = prettyWhileFromFile "fib.wh"
9d6d8630583795d64a611adb94dd6005f7fc2ab1b7df0a41fadc86db470334b6
benashford/redis-async
protocol.clj
Copyright 2015 ;; 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 Li...
null
https://raw.githubusercontent.com/benashford/redis-async/06487ae8352870e2c9120958aa89d02f356fb357/src/redis_async/protocol.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Copyright 2015 distributed under the License is distributed on an " AS IS " BASIS , (ns redis-async.protocol (:import [jresp.protocol Ary BulkStr Int RespType])) (defprotocol ToResp (->resp [this])) (extend-protocol ToResp RespType (->resp [this] this) String (->resp [^String this] (BulkStr...
97aa7b259bec9d150196f8ceebf311e17366b123d6842115d649962bfa22891c
slyrus/mcclim-old
commands.lisp
(in-package :clim-tests) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; command tables (define-command-table no-menu-test-table) (add-command-to-command-table '(com-test-command) 'no-menu-test-table :keystroke '(#\t)) (let ((count 0)) (map-over-command-table-keystrokes (lambd...
null
https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Tests/commands.lisp
lisp
command tables not actually required to DTRT here, but we use this form (without control and arguments) internally, so make sure that we don't
(in-package :clim-tests) (define-command-table no-menu-test-table) (add-command-to-command-table '(com-test-command) 'no-menu-test-table :keystroke '(#\t)) (let ((count 0)) (map-over-command-table-keystrokes (lambda (menu-name gesture item) (incf count) (assert (an...
bbf4a2d0c8df5b769549d90f628611aaf999c0e660453b04085eb15bb22b4490
privet-kitty/cl-competitive
undoable-disjoint-set.lisp
(defpackage :cp/undoable-disjoint-set (:use :cl) (:export #:define-undoable-disjoint-set)) (in-package :cp/undoable-disjoint-set) (defmacro define-undoable-disjoint-set (name &key operator (element-type 'fixnum) (identity 0) conc-name) (check-type name symbol) (let* ((conc-string (if conc-name ...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/2c4d4e82af2a1672eef334a0a229c67d4fb37188/module/undoable-disjoint-set.lisp
lisp
record record update
(defpackage :cp/undoable-disjoint-set (:use :cl) (:export #:define-undoable-disjoint-set)) (in-package :cp/undoable-disjoint-set) (defmacro define-undoable-disjoint-set (name &key operator (element-type 'fixnum) (identity 0) conc-name) (check-type name symbol) (let* ((conc-string (if conc-name ...
a4dd991e76e2b3840fef6783363bdccd83ad13c075b7442d03905646bfa82b0f
tommaisey/aeon
radians-per-sample.help.scm
;; radians-per-sample
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/information/radians-per-sample.help.scm
scheme
radians-per-sample
22e52f5d88f370c123cb1ba8569d3ebfe5403cd35fd49f07a40c98a83e006498
heechul/crest-z3
steensgaard.ml
* * Copyright ( c ) 2001 - 2002 , * < > * 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 abov...
null
https://raw.githubusercontent.com/heechul/crest-z3/cfcebadddb5e9d69e9956644fc37b46f6c2a21a0/cil/src/ext/pta/steensgaard.ml
ocaml
********************************************************************* distribution for reference only. ...
* * Copyright ( c ) 2001 - 2002 , * < > * 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 abov...
d86395f986ca9b7844f42838accf0146f8be85824348aa397ea044af474bb7d5
mbj/stratosphere
SlackWorkspaceConfiguration.hs
module Stratosphere.SupportApp.SlackWorkspaceConfiguration ( SlackWorkspaceConfiguration(..), mkSlackWorkspaceConfiguration ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Val...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/supportapp/gen/Stratosphere/SupportApp/SlackWorkspaceConfiguration.hs
haskell
module Stratosphere.SupportApp.SlackWorkspaceConfiguration ( SlackWorkspaceConfiguration(..), mkSlackWorkspaceConfiguration ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Val...
b184591f07a8c1af71b15018845484c9397cb8d7d55d3ee0c9f076ed723f19c2
nickzuber/infrared
token.ml
* * Copyright ( c ) 2013 - present , Facebook , Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENS...
null
https://raw.githubusercontent.com/nickzuber/infrared/b67bc728458047650439649605af7a8072357b3c/InfraredParser/flow_parser/lib/token.ml
ocaml
/pattern/flags Syntax Keywords Extra tokens Type primitives string after processing special chars string as specified in source same as raw, plus characters like ` and ${ *************************************************************************** Pretty printer (pretty?) ******************************...
* * Copyright ( c ) 2013 - present , Facebook , Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENS...
9deb45dc3af5700d5c182eafbb9a58bf4fab3ace56f3ddc31dd6d824d74e0187
wfnuser/sicp-solutions
e3-39.scm
101 121
null
https://raw.githubusercontent.com/wfnuser/sicp-solutions/2c94b28d8ee004dcbfe7311f866e5a346ee01d12/ch3/e3-39.scm
scheme
101 121
b8c5064ab54f59f49bd3796474ac47ff6eab1177c589351ebf7401fd751c6351
igarnier/vplot
anim.ml
open Vplot module G = Graph open Gg module I = struct type t = int let compare = compare let equal = ( = ) let hash = Hashtbl.hash end module GraphImpl = G.Persistent.Graph.Concrete (I) let impl : ('t, 'v, 'e) Graph_sig.impl = (module GraphImpl) let g = let open GraphImpl in let g = empty in let g ...
null
https://raw.githubusercontent.com/igarnier/vplot/146467257f110f71d48415fc3ddaf0f46a71035a/lib_test/anim.ml
ocaml
open Vplot module G = Graph open Gg module I = struct type t = int let compare = compare let equal = ( = ) let hash = Hashtbl.hash end module GraphImpl = G.Persistent.Graph.Concrete (I) let impl : ('t, 'v, 'e) Graph_sig.impl = (module GraphImpl) let g = let open GraphImpl in let g = empty in let g ...
2df38b633ac49343628e2acba1ce1076239777b78b4b5e51fc43180caaa1c514
cbaggers/varjo
uint.lisp
(in-package :vari.cl) (v-def-glsl-template-fun %uint (x) "uint(~a)" (v-bool) v-uint) (v-def-glsl-template-fun %uint (x) "uint(~a)" (v-float) v-uint) (v-def-glsl-template-fun %uint (x) "uint(~a)" (v-double) v-uint) (v-def-glsl-template-fun %uint (x) "uint(~a)" (v-int) v-uint) (v-defspecial uint (val) :args-valid t...
null
https://raw.githubusercontent.com/cbaggers/varjo/9e77f30220053155d2ef8870ceba157f75e538d4/src/vari.cl/special-operators/uint.lisp
lisp
(in-package :vari.cl) (v-def-glsl-template-fun %uint (x) "uint(~a)" (v-bool) v-uint) (v-def-glsl-template-fun %uint (x) "uint(~a)" (v-float) v-uint) (v-def-glsl-template-fun %uint (x) "uint(~a)" (v-double) v-uint) (v-def-glsl-template-fun %uint (x) "uint(~a)" (v-int) v-uint) (v-defspecial uint (val) :args-valid t...
22fe459f821a3c2472a584c55eb18ddff70fc222dc11336ae017846149611d5e
SquidDev/illuaminate
lint_undocumented.ml
open Linter open IlluaminateCore open IlluaminateSemantics open! Doc.Syntax module E = Doc.Extract let tag = Error.Tag.make ~attr:[ Default ] ~level:Warning "doc:undocumented" let arg_tag = Error.Tag.make ~attr:[ Default ] ~level:Warning "doc:undocumented-arg" let return_tag = Error.Tag.make ~attr:[ Default ] ~level:W...
null
https://raw.githubusercontent.com/SquidDev/illuaminate/7a6e4bf56f01e81a47c743cb452791c2168ccbda/src/lint/lint_undocumented.ml
ocaml
Modules are a little odd, as we allow any module with the same name to have documentation.
open Linter open IlluaminateCore open IlluaminateSemantics open! Doc.Syntax module E = Doc.Extract let tag = Error.Tag.make ~attr:[ Default ] ~level:Warning "doc:undocumented" let arg_tag = Error.Tag.make ~attr:[ Default ] ~level:Warning "doc:undocumented-arg" let return_tag = Error.Tag.make ~attr:[ Default ] ~level:W...
d9de64bd2af4ce7e523b043d7e5304e1f6c532c73ff2a55de840d72fda9bca44
wireapp/wire-server
LegalHold.hs
# OPTIONS_GHC -Wno - incomplete - uni - patterns # # OPTIONS_GHC -Wno - orphans # -- Disabling to stop warnings on HasCallStack {-# OPTIONS_GHC -Wno-redundant-constraints #-} -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you ...
null
https://raw.githubusercontent.com/wireapp/wire-server/72a03a776d4a8607b0a9c3e622003467be914894/services/galley/test/integration/API/Teams/LegalHold.hs
haskell
Disabling to stop warnings on HasCallStack # OPTIONS_GHC -Wno-redundant-constraints # This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY...
# OPTIONS_GHC -Wno - incomplete - uni - patterns # # OPTIONS_GHC -Wno - orphans # Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a co...
9253641289bc48276fa9eecb5be06795feaa2e0c26d9d3266fe5f549c0329212
SimulaVR/simula-godot
WestonSurfaceSprite.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE ScopedTypeVariables # module Plugin.WestonSurfaceSprite ( GodotWestonSurfaceSprite(..) , newGodotWestonSurfaceSprite , setWestonSurfaceTexture , getWeston...
null
https://raw.githubusercontent.com/SimulaVR/simula-godot/31472f967e15ddfaf0878f34522b02920573a74b/addons/godot-haskell-plugin/src/Plugin/WestonSurfaceSprite.hs
haskell
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE ScopedTypeVariables # module Plugin.WestonSurfaceSprite ( GodotWestonSurfaceSprite(..) , newGodotWestonSurfaceSprite , setWestonSurfaceTexture , getWestonSurfaceTexture , updateWestonSurfaceS...
40c87ec55f4953fdae2fbae8a08cebc386ba6b484290d5a5cbdb0bd1d5b0ba21
charlieg/Sparser
loader2.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- copyright ( c ) 1991,1992,1993,1994 -- all rights reserved extensions copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved $ Id:$ ;;; ;;; File: "loader" ;;; Module: "objects;model:variables:" version : July 2009 initia...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/model/variables/loader2.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- File: "loader" Module: "objects;model:variables:" 7/16/92 v2.3 bumped for the new regime 2.0 (6/16/09) Switching to a lexical treatment and tighter integration already loaded by [model;] level
copyright ( c ) 1991,1992,1993,1994 -- all rights reserved extensions copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved $ Id:$ version : July 2009 initiated 11/18 v2.1 0.1 ( 8/12/94 ) boke out [ structure ] for loading earlier with indexing of psi . Bumping index , make , object ...
f33d194183f7eca695dbbba79f4e218815d97eb3144483b8ce7c00afe32e226b
oscoin/oscoin
Eval.hs
# LANGUAGE UndecidableInstances # module Oscoin.Crypto.Blockchain.Eval ( Evaluator , Receipt(..) , buildBlock , evalBlock ) where import Oscoin.Prelude import Oscoin.Crypto.Blockchain.Block hiding (parentHash) import Oscoin.Crypto.Hash (Hash) import qualified Oscoin....
null
https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/src/Oscoin/Crypto/Blockchain/Eval.hs
haskell
| A 'Receipt' is generated whenever a transaction is evaluated as part of a block. ^ Identifies the block the output was generated in | Build a block by evaluating all the transactions and generating receipts for them. Only transactions that evaluate successfully are included in the block but we generate receip...
# LANGUAGE UndecidableInstances # module Oscoin.Crypto.Blockchain.Eval ( Evaluator , Receipt(..) , buildBlock , evalBlock ) where import Oscoin.Prelude import Oscoin.Crypto.Blockchain.Block hiding (parentHash) import Oscoin.Crypto.Hash (Hash) import qualified Oscoin....
9ac767124a54c6f72d34fd916b2acfed0609d0f23ca1ca46931b32adacbe0fba
mauny/the-functional-approach-to-programming
geometry.mli
#open "MLgraph";; value make_point : float * float -> point;; value origin : point;; value make_transformation : float * float * float * float * float * float -> transformation;; value id_trans : transformation;; value transform_point : transformation -> point -> point;; value compose_transformation : transformation ...
null
https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/MLGRAPH.DIR/geometry.mli
ocaml
#open "MLgraph";; value make_point : float * float -> point;; value origin : point;; value make_transformation : float * float * float * float * float * float -> transformation;; value id_trans : transformation;; value transform_point : transformation -> point -> point;; value compose_transformation : transformation ...
d480ca7c08ced36d93b08a7b934bb5a44af89c32073271bdf6ed5f22624aaf30
grin-compiler/ghc-wpc-sample-programs
List.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} | Module : Tests . Readers . Org . Block . Header Copyright : © 2014 - 2020 License : GNU GPL , version 2 or above Maintainer : > Stability : alpha Portability : portable Test parsing of org lists ...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/test/Tests/Readers/Org/Block/List.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoImplicitPrelude # | Module : Tests . Readers . Org . Block . Header Copyright : © 2014 - 2020 License : GNU GPL , version 2 or above Maintainer : > Stability : alpha Portability : portable Test parsing of org lists . Module : Tests.Readers....
b81cdc63d8755ff90f73ad73c68d9f4505c621a50c5573b8b4d070c6c14bb1f3
input-output-hk/cardano-sl
Packet.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # # LANGUAGE ViewPatterns # module Ntp.Packet ( NtpPacket (..) , ntpPacketSize , mkNtpPacket , NtpOffset (..) , clockOffsetPure , clockOffset , realMcsToNtp , ntpToRealMcs ) where import ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/networking/src/Ntp/Packet.hs
haskell
^ some magic parameters ^ poll delay between requests ^ when server sent reply ^ when server got request ^ when client sent request | references: * #section-6 * #appendix-A.4 | | be right inverse of @'realMsgToNtp'@. In general it is not injective (for that we'd need to use @'Picosecond'@ instead of @'...
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # # LANGUAGE ViewPatterns # module Ntp.Packet ( NtpPacket (..) , ntpPacketSize , mkNtpPacket , NtpOffset (..) , clockOffsetPure , clockOffset , realMcsToNtp , ntpToRealMcs ) where import ...
c5342303cd59498a028c66b3486dd53d069725ff409a4c8b9fec56c56c113881
heraldry/heraldicon
shared.cljs
(ns heraldicon.shared (:require ["paper" :refer [paper Size]] [heraldicon.entity.charge.data] [heraldicon.entity.collection.data] [heraldicon.entity.collection.element] [heraldicon.entity.core] [heraldicon.heraldry.achievement] [heraldicon.heraldry.charge-group.core] [heraldicon.heraldry.charg...
null
https://raw.githubusercontent.com/heraldry/heraldicon/7bf4dd4149e1f69c9e4f9a0b6b826f73f532a01d/src/heraldicon/shared.cljs
clojure
(ns heraldicon.shared (:require ["paper" :refer [paper Size]] [heraldicon.entity.charge.data] [heraldicon.entity.collection.data] [heraldicon.entity.collection.element] [heraldicon.entity.core] [heraldicon.heraldry.achievement] [heraldicon.heraldry.charge-group.core] [heraldicon.heraldry.charg...
8b28ca3445d48d9cd8017802003dca44cb1ee536c7a3f2f3ee94bbd7b936fb3d
inconvergent/weird
rnd.lisp
(in-package #:weird-tests) (plan 1) (veq:vprogn (subtest "rnd" () (rnd:set-rnd-state 1) (is (length (rnd:rndspace 10 0f0 10f0)) 10) (is (rnd:rndspace 10 0f0 10f0) '(1.8467712 7.931614 3.7252033 7.7582145 6.9112134 3.3949196 7.9353485 8.710781 0.7763338 6.926218)) (is (rnd:rnd...
null
https://raw.githubusercontent.com/inconvergent/weird/4ea557c8cc9ab7b3d3723338356cd80acdcec673/test/rnd.lisp
lisp
(in-package #:weird-tests) (plan 1) (veq:vprogn (subtest "rnd" () (rnd:set-rnd-state 1) (is (length (rnd:rndspace 10 0f0 10f0)) 10) (is (rnd:rndspace 10 0f0 10f0) '(1.8467712 7.931614 3.7252033 7.7582145 6.9112134 3.3949196 7.9353485 8.710781 0.7763338 6.926218)) (is (rnd:rnd...
95c336295c2519b3f855ef7be8dac0d02000b564e345061262d785085478d610
clojure-android/lein-droid
manifest.clj
(ns leiningen.droid.manifest "Contains functions to manipulate AndroidManifest.xml file" (:require [clojure.data.zip.xml :refer :all] [clojure.xml :as xml] [clojure.java.io :as jio] [clojure.string :as str] [clojure.zip :refer [up xml-zip]] [clostache.pars...
null
https://raw.githubusercontent.com/clojure-android/lein-droid/1e0f8d5a5dd3c53232e21a1874867c212edb9848/src/leiningen/droid/manifest.clj
clojure
Name of the category for the launcher activities. Attribute name for target SDK version. Attribute name for minimal SDK version.
(ns leiningen.droid.manifest "Contains functions to manipulate AndroidManifest.xml file" (:require [clojure.data.zip.xml :refer :all] [clojure.xml :as xml] [clojure.java.io :as jio] [clojure.string :as str] [clojure.zip :refer [up xml-zip]] [clostache.pars...
569fd30e24cd0db0473fceaf8de37f3295b5478466d8b6195b911058528e3892
glebec/haskell-programming-allen-moronuki
13.14-exercises.hs
# OPTIONS_GHC -W # module Ch13Exercises where import Data.Char import Control.Monad (forever) import System.Exit (exitSuccess) -- Hangman: see ./projects/hangman -- Modifying code 1 . Ciphers vigenere, unVigenere :: String -> String -> String vigenere keyword = zipWith translate shifts where shifts = cycle $ ...
null
https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/13-building-projects/13.14-exercises.hs
haskell
Hangman: see ./projects/hangman Modifying code prompt the user for a name and age, try to construct a Person, print result
# OPTIONS_GHC -W # module Ch13Exercises where import Data.Char import Control.Monad (forever) import System.Exit (exitSuccess) 1 . Ciphers vigenere, unVigenere :: String -> String -> String vigenere keyword = zipWith translate shifts where shifts = cycle $ map alphaToNum keyword unVigenere keyword = zipWith t...
2da419b32808651f3f6226d702e9acbc6ecfde49dd35cb252482207444faab0b
glondu/belenios
question_sigs.mli
(**************************************************************************) (* BELENIOS *) (* *) Copyright © 2012 - 2022 (* ...
null
https://raw.githubusercontent.com/glondu/belenios/a1f9e4cc8c9aa823f3d0f9ba1e21b8c700cd5522/src/lib/core/question_sigs.mli
ocaml
************************************************************************ BELENIOS This program is free softw...
Copyright © 2012 - 2022 it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the exemption that compiling , linking , and/or using OpenSSL is allowed . You should have rece...
2fab68a107da2dcfe8db182f134b55c7073abb0a0d238eee2e1db5c2b159304c
thheller/shadow-cljs
test_util.clj
(ns shadow.cljs.test-util (:require [clojure.pprint :as pp :refer (pprint)])) (defn wide-pprint [x] (binding [clojure.pprint/*print-right-margin* 120] (pprint x)))
null
https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/repl/shadow/cljs/test_util.clj
clojure
(ns shadow.cljs.test-util (:require [clojure.pprint :as pp :refer (pprint)])) (defn wide-pprint [x] (binding [clojure.pprint/*print-right-margin* 120] (pprint x)))
c6b5cd5856317bbbf89a1633c7cc85f233ffe19ad5da81a62ffbbb5ea51196c0
azimut/shiny
xyz.lisp
(in-package :shiny) (make-orc :ourvoice :filename "ourvoice" :filepath "/home/sendai/projects/csound-instruments/pinkston/") ;;(start-csound (get-orchestra :ourvoice)) (start-thread) (start-csound (merge-orcs (get-orchestra :ourvoice) (get-orchestra :xanadu))) (make-play voice-a "i1" ...
null
https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/compositions/xyz.lisp
lisp
(start-csound (get-orchestra :ourvoice)) (bbuffer-load "/home/sendai/clips/numerologist.wav") (put-phrase "numerologist" (word-play "soon" :amp .2) (word-play "discard" :amp .2) (word-play "longer" :amp .2) (word-play "numerologist" :amp .2)
(in-package :shiny) (make-orc :ourvoice :filename "ourvoice" :filepath "/home/sendai/projects/csound-instruments/pinkston/") (start-thread) (start-csound (merge-orcs (get-orchestra :ourvoice) (get-orchestra :xanadu))) (make-play voice-a "i1" :amp 10000 :keynum 60 :fmt1 609 :db1 0...