_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
695972242f952910cb03f5b68aeaa80a1ee416e8c1b03836bf802393103ac56d
racket/typed-racket
module-plus.rkt
#lang typed/racket/base/shallow ;; Make sure defender runs in module+ (module u racket/base (define b (box "hello")) (provide b)) (require/typed 'u (b (Boxof Integer))) (module+ test (require typed/rackunit) (check-exn exn:fail:contract? (lambda () (unbox b))))
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/module-plus.rkt
racket
Make sure defender runs in module+
#lang typed/racket/base/shallow (module u racket/base (define b (box "hello")) (provide b)) (require/typed 'u (b (Boxof Integer))) (module+ test (require typed/rackunit) (check-exn exn:fail:contract? (lambda () (unbox b))))
abc60ba5a9b8532d46f196f40ac588887337d846105c72e4053fb83fb80ed933
nvim-treesitter/nvim-treesitter
highlights.scm
(user) @namespace (auth) @symbol (gecos) @string (home) @text.uri @constant (shell) @text.uri @string.special [ (gid) (uid) ] @number (separator) @punctuation.delimiter
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/3fe80dbecdf1fa88cf81a4d7b30ab0714f8c443a/queries/passwd/highlights.scm
scheme
(user) @namespace (auth) @symbol (gecos) @string (home) @text.uri @constant (shell) @text.uri @string.special [ (gid) (uid) ] @number (separator) @punctuation.delimiter
91201485dcdb777bc7fcbf739bf2b724f4cbe2792b0935aad57f21448f1e8794
gergoerdi/clash-shake
F4PGA.hs
# LANGUAGE OverloadedStrings , RecordWildCards , TemplateHaskell # module Clash.Shake.F4PGA ( xilinx7 , openFPGALoader ) where import Clash.Shake import qualified Clash.Shake.Xilinx as Xilinx import Development.Shake import Development.Shake.Command import Development.Shake.FilePath import Development.Sha...
null
https://raw.githubusercontent.com/gergoerdi/clash-shake/e7729b0c8bf1cdbe98dd9f204b3881f843b82490/src/Clash/Shake/F4PGA.hs
haskell
# LANGUAGE OverloadedStrings , RecordWildCards , TemplateHaskell # module Clash.Shake.F4PGA ( xilinx7 , openFPGALoader ) where import Clash.Shake import qualified Clash.Shake.Xilinx as Xilinx import Development.Shake import Development.Shake.Command import Development.Shake.FilePath import Development.Sha...
7c916847401a1106a3ab466244b53752cd33ae12232cd06b06d2a8e7d4916c81
hakaru-dev/hakaru
SubstBug.hs
{-# LANGUAGE TypeOperators , DataKinds #-} module Tests.SubstBug where import Data.Text (pack) import Language.Hakaru.Syntax.ABT import Language.Hakaru.Syntax.AST import Language.Hakaru.Syntax.Prelude (pair) import Language.Hakaru.Types.Sing import Language.Hakaru.Types.DataKind z :: Variab...
null
https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Tests/SubstBug.hs
haskell
# LANGUAGE TypeOperators , DataKinds # Works Crashes Crashes we could have had a variable ( z::int ) from a long time ago , we could have had a variable (z::int) from a long time ago,
module Tests.SubstBug where import Data.Text (pack) import Language.Hakaru.Syntax.ABT import Language.Hakaru.Syntax.AST import Language.Hakaru.Syntax.Prelude (pair) import Language.Hakaru.Types.Sing import Language.Hakaru.Types.DataKind z :: Variable 'HInt z = Variable (pack "z") 3 SInt y :: Variable 'HReal...
c6f8869fb783716ad1925233c2ef83951dfe9eb75345f618b087d26c5083e43f
turbopape/postagga
trainer_test.cljc
Copyright ( c ) 2017 < > ;;Distributed under the MIT License (ns postagga.trainer-test (:require [clojure.test :refer :all] [clojure.data :refer [diff]] [postagga.trainer :refer :all])) (deftest process-annotated-sentence-test (testing "process-annotated-sentence") (is (= {:states #{},...
null
https://raw.githubusercontent.com/turbopape/postagga/a17a20942024be00800a15de7aeb7c0277023660/test/postagga/trainer_test.cljc
clojure
Distributed under the MIT License
Copyright ( c ) 2017 < > (ns postagga.trainer-test (:require [clojure.test :refer :all] [clojure.data :refer [diff]] [postagga.trainer :refer :all])) (deftest process-annotated-sentence-test (testing "process-annotated-sentence") (is (= {:states #{}, :transitions {}, :emissions {}, :in...
2d3f245570fc1ac0b1c07120b229a67c25c8f9195483418d7d701f416214dfc1
8thlight/hyperion
connection_spec.clj
(ns hyperion.sql.connection-spec (:require [speclj.core :refer :all] [hyperion.sql :refer :all] [hyperion.sql.connection :refer :all])) (clojure.lang.RT/loadClassForName "org.sqlite.JDBC") (describe "Connection Management" (with connection-url "jdbc:sqlite::memory:") (with connection-url...
null
https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/sql/spec/hyperion/sql/connection_spec.clj
clojure
(ns hyperion.sql.connection-spec (:require [speclj.core :refer :all] [hyperion.sql :refer :all] [hyperion.sql.connection :refer :all])) (clojure.lang.RT/loadClassForName "org.sqlite.JDBC") (describe "Connection Management" (with connection-url "jdbc:sqlite::memory:") (with connection-url...
286d8263e5c30e6bd7d6c829e50405bd818f319d85bf3bda325789d6b6ea88d2
nuprl/gradual-typing-performance
reader.rkt
#lang s-exp htdp/bsl/reader lang/htdp-beginner '()
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/htdp/bsl/lang/reader.rkt
racket
#lang s-exp htdp/bsl/reader lang/htdp-beginner '()
89382e929adea36404191cd2ffb261e2c8bc7c49ddfeda815adb6ca346d1157a
kostmo/circleci-failure-tracker
GitRev.hs
{-# LANGUAGE OverloadedStrings #-} -- | This module is intentionally small so that -- it can export a "smart constructor" to validate SHA1s module GitRev (GitSha1, validateSha1, sha1) where import Control.Monad (when) import Data.Char (isHexDigit) import Data.Text (Text) import...
null
https://raw.githubusercontent.com/kostmo/circleci-failure-tracker/393d10a72080bd527fdb159da6ebfea23fcd52d1/app/fetcher/src/GitRev.hs
haskell
# LANGUAGE OverloadedStrings # | This module is intentionally small so that it can export a "smart constructor" to validate
SHA1s module GitRev (GitSha1, validateSha1, sha1) where import Control.Monad (when) import Data.Char (isHexDigit) import Data.Text (Text) import qualified Data.Text as T newtype GitSha1 = NewGitSha1 { sha1 :: Text } deriving Show validateSha1 :: Text -> Either Tex...
6d632ea3cc2ed7f7efd774add575731719f8448649f87e1c2c2a65c3b5be511f
google/ormolu
TypeFamily.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # -- | Rendering of data\/type families. module Ormolu.Printer.Meat.Declaration.TypeFamily ( p_famDecl, p_tyFamInstEqn, ) where import Control.Monad import Data.Maybe (isNothing) import GHC import Ormolu.Printer.Combinators ...
null
https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/src/Ormolu/Printer/Meat/Declaration/TypeFamily.hs
haskell
# LANGUAGE OverloadedStrings # | Rendering of data\/type families. -------------------------------------------------------------------------- Helpers
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # module Ormolu.Printer.Meat.Declaration.TypeFamily ( p_famDecl, p_tyFamInstEqn, ) where import Control.Monad import Data.Maybe (isNothing) import GHC import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Type import O...
adb53f2a166c3b6743c895d14dd16ac11288e9a8f258c05a907d2b864be8410c
alt-romes/ghengin
Device.hs
# LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE OverloadedRecordDot # # LANGUAGE DataKinds # # LANGUAGE RecordWildCards # # LANGUAGE LambdaCase # module Ghengin.Vulkan.Device where import Data.Ord import Data.Bits import Data.Maybe import Data.Word import Data.ByteString (ByteString) import...
null
https://raw.githubusercontent.com/alt-romes/ghengin/986ccc8b9ba3d597dcca4392fc88ff50ee7f1ce1/src/Ghengin/Vulkan/Device.hs
haskell
# LANGUAGE OverloadedStrings # We create a logical device always with a graphics queue and a present queue | Device rating function. ^ Validation Layers ^ Device Extensions For now all queues have same priority (there should only be one queue anyway?)
# LANGUAGE OverloadedLists # # LANGUAGE OverloadedRecordDot # # LANGUAGE DataKinds # # LANGUAGE RecordWildCards # # LANGUAGE LambdaCase # module Ghengin.Vulkan.Device where import Data.Ord import Data.Bits import Data.Maybe import Data.Word import Data.ByteString (ByteString) import Data.Vector (Vector) import qualif...
5f9c7afb53708af03b82239b0272f717793a77f46fb2af4c68023b0599e2b88a
weavejester/codox
main.clj
(ns codox.main "Main namespace for generating documentation" (:use [codox.utils :only (add-source-paths)]) (:require [clojure.string :as str] [clojure.java.shell :as shell] [codox.reader.clojure :as clj] [codox.reader.plaintext :as text])) (defn- writer [{:keys [writer]}] (l...
null
https://raw.githubusercontent.com/weavejester/codox/bc41c2bbc270f52bceba095e57be30de80b892e0/codox/src/codox/main.clj
clojure
(ns codox.main "Main namespace for generating documentation" (:use [codox.utils :only (add-source-paths)]) (:require [clojure.string :as str] [clojure.java.shell :as shell] [codox.reader.clojure :as clj] [codox.reader.plaintext :as text])) (defn- writer [{:keys [writer]}] (l...
46e2b86c1b4822ee54954cc12e0e0d34babe0b6619807e0f0a6c6d48c418502a
racket/slideshow
code-pict.rkt
#lang racket/base (require pict/code) (provide (all-from-out pict/code))
null
https://raw.githubusercontent.com/racket/slideshow/4588507e83e9aa859c6841e655b98417d46987e6/slideshow-lib/slideshow/code-pict.rkt
racket
#lang racket/base (require pict/code) (provide (all-from-out pict/code))
fbebf7d22cb39ec14dc3970f5b988016a2bf5122235a5e7964358bdd92a9fd56
Clojure2D/clojure2d-examples
color.clj
(ns rt4.color (:require [clojure2d.color :as c] [fastmath.vector :as v] [fastmath.core :as m]) (:import [fastmath.vector Vec3 Vec4])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defn ->color "Convert to clojure2d color, optionally ...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/639db92fa509bd206726faf95607e8fb073e9f5e/src/rt4/color.clj
clojure
linear to gamma linear-to-gamma
(ns rt4.color (:require [clojure2d.color :as c] [fastmath.vector :as v] [fastmath.core :as m]) (:import [fastmath.vector Vec3 Vec4])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defn ->color "Convert to clojure2d color, optionally ...
299c1674f2d61e7cbcb3034bec6066ee493edf00eddb534b4ee2133b185e5ed1
geophf/1HaskellADay
Solution.hs
# LANGUAGE OverloadedStrings , QuasiQuotes # module Y2018.M04.D04.Solution where - So you have the data from the last two day 's exercises , let 's start storing those data into a PostgreSQL database . Today 's exercise is to store just the authors . But there 's a catch : you have to consider you 're doing ...
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M04/D04/Solution.hs
haskell
} looking forward in time, m'kay table state } - >>> auths <- lookupAuthors conn fromList [] - because '5' is a nice number ------------ ------------ }
# LANGUAGE OverloadedStrings , QuasiQuotes # module Y2018.M04.D04.Solution where - So you have the data from the last two day 's exercises , let 's start storing those data into a PostgreSQL database . Today 's exercise is to store just the authors . But there 's a catch : you have to consider you 're doing ...
65a862743202869285216170666f81597020d3310cd58a41728f852f4d247104
Mathieu-Desrochers/Schemings
time.scm
(declare (unit time)) (foreign-declare " #include <time.h> // allocates a tm struct tm* malloc_tm() { struct tm* tm = malloc(sizeof(struct tm)); if (tm != NULL) { tm->tm_sec = 0; tm->tm_min = 0; tm->tm_hour = 0; tm->tm_mday = 1; tm->tm_mon = 0; tm->tm_year = 0; } return tm; } // ...
null
https://raw.githubusercontent.com/Mathieu-Desrochers/Schemings/a7c322ee37bf9f43b696c52fc290488aa2dcc238/sources/foreign-interfaces/time.scm
scheme
} } } } } } } } } } } } } tm pointers definitions tm pointers memory management gets the parts of a broken down time sets the parts of a broken down time format a broken down time parses a broken down time
(declare (unit time)) (foreign-declare " #include <time.h> // allocates a tm struct tm* malloc_tm() { if (tm != NULL) { } } // gets the values pointed by a tm* // sets the values pointed by a tm* // frees a tm void free_tm(struct tm* tm) { } // wraps the gmtime_r function struct tm* gmtime_r_wrapped(int6...
10786b23f2d8aa4e93381d5387c1c537154959b693c1db95051b579723705250
Soyn/sicp
Ex2.33.rkt
#lang racket Ex 2.33 题干条件 (define (square x) (* x x)) (define (accumulate op initial sequence) (if (null? sequence) initial (op (car sequence) (accumulate op initial (cdr sequence))))) (define (my-map p sequence) (accumulate (lambda (x y) (cons (p x) y)) ...
null
https://raw.githubusercontent.com/Soyn/sicp/d2aa6e3b053f6d4c8150ab1b033a18f61fca7e1b/CH2/CH2.2/Ex2.33.rkt
racket
test usage
#lang racket Ex 2.33 题干条件 (define (square x) (* x x)) (define (accumulate op initial sequence) (if (null? sequence) initial (op (car sequence) (accumulate op initial (cdr sequence))))) (define (my-map p sequence) (accumulate (lambda (x y) (cons (p x) y)) ...
6bf22faf852e0d6b8ee8e1c5ae4cfd7f0004ec64e3b171272fc7e331d9df22b4
xmonad/xmonad-contrib
CycleSelectedLayouts.hs
----------------------------------------------------------------------------- -- | Module : XMonad . Actions . CycleSelectedLayouts -- Description : Cycle through the given subset of layouts. Copyright : ( c ) Roman Cheplyaka -- License : BSD3-style (see LICENSE) -- -- Maintainer : Roman Cheply...
null
https://raw.githubusercontent.com/xmonad/xmonad-contrib/3058d1ca22d565b2fa93227fdde44d8626d6f75d/XMonad/Actions/CycleSelectedLayouts.hs
haskell
--------------------------------------------------------------------------- | Description : Cycle through the given subset of layouts. License : BSD3-style (see LICENSE) Maintainer : Roman Cheplyaka <> Stability : unstable Portability : unportable This module allows to cycle through the given subse...
Module : XMonad . Actions . CycleSelectedLayouts Copyright : ( c ) Roman Cheplyaka module XMonad.Actions.CycleSelectedLayouts ( cycleThroughLayouts) where import XMonad import XMonad.Prelude (elemIndex, fromMaybe) import qualified XMonad.StackSet as S > import XMonad > import XMonad . Action...
9eed46402ffb5044543bc2b2a674e0cb6db076a3e6ef4938c9311703dff491a3
CardanoSolutions/ogmios
Babbage.hs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. # LANGUAGE TypeApplications # module Ogmios.Data.Json.Babbage where import Ogmios.Data.Json.Prelude import Cardano.Binary ( serialize...
null
https://raw.githubusercontent.com/CardanoSolutions/ogmios/317c826d9d0388cb7efaf61a34085fc7c1b12b06/server/src/Ogmios/Data/Json/Babbage.hs
haskell
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. # LANGUAGE TypeApplications # module Ogmios.Data.Json.Babbage where import Ogmios.Data.Json.Prelude import Cardano.Binary ( serialize...
095cd2460d663995f66acdd28efc8295d0fcab61238d6b383e59c40814d791ff
broadinstitute/firecloud-ui
library_view.cljs
(ns broadfcui.page.workspace.summary.library-view (:require [dmohs.react :as react] [broadfcui.common.links :as links] [broadfcui.common.style :as style] [broadfcui.components.collapse :refer [Collapse]] [broadfcui.components.spinner :refer [spinner]] [broadfcui.endpoints :as endpoints] [broadfcu...
null
https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/page/workspace/summary/library_view.cljs
clojure
(ns broadfcui.page.workspace.summary.library-view (:require [dmohs.react :as react] [broadfcui.common.links :as links] [broadfcui.common.style :as style] [broadfcui.components.collapse :refer [Collapse]] [broadfcui.components.spinner :refer [spinner]] [broadfcui.endpoints :as endpoints] [broadfcu...
2ce378c1ffb8255ea29adc37b6616292eb4a8feb1995e8e47607f74b627df793
avh4/elm-format
Extra.hs
module Shakefiles.Extra (phonyPrefix, forEach) where import Development.Shake import Data.List (stripPrefix) phonyPrefix :: String -> (String -> Action ()) -> Rules () phonyPrefix prefix action = phonys $ \s -> case stripPrefix prefix s of Nothing -> Nothing Just match -> Just (action match) f...
null
https://raw.githubusercontent.com/avh4/elm-format/b670cb9dce2601d6b90504f94e947eeaad46e05d/Shakefile/src/Shakefiles/Extra.hs
haskell
module Shakefiles.Extra (phonyPrefix, forEach) where import Development.Shake import Data.List (stripPrefix) phonyPrefix :: String -> (String -> Action ()) -> Rules () phonyPrefix prefix action = phonys $ \s -> case stripPrefix prefix s of Nothing -> Nothing Just match -> Just (action match) f...
10312d7aad45fd9c942849d35cfc222dd76c78f6e517d3b08c92955631efa8a7
skogsbaer/HTF
Test1.hs
# OPTIONS_GHC -F -pgmF .. / .. /scripts / local - htfpp # import "HTF" Test.Framework #include "Foo.h" foo :: Int -> Int foo i = i + "Stefan" main :: IO () main = return ()
null
https://raw.githubusercontent.com/skogsbaer/HTF/a42450c89b7a3a3a50e381f36de3ac28faab2a16/tests/compile-errors/Test1.hs
haskell
# OPTIONS_GHC -F -pgmF .. / .. /scripts / local - htfpp # import "HTF" Test.Framework #include "Foo.h" foo :: Int -> Int foo i = i + "Stefan" main :: IO () main = return ()
270eaa5d1f49411014016cb1ff36378ec9ece036263bbda245e4597ebac23833
clojure-interop/aws-api
AbstractAWSStepFunctionsAsync.clj
(ns com.amazonaws.services.stepfunctions.AbstractAWSStepFunctionsAsync "Abstract implementation of AWSStepFunctionsAsync. Convenient method forms pass through to the corresponding overload that takes a request object and an AsyncHandler, which throws an UnsupportedOperationException." (:refer-clojure :only [req...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.stepfunctions/src/com/amazonaws/services/stepfunctions/AbstractAWSStepFunctionsAsync.clj
clojure
(ns com.amazonaws.services.stepfunctions.AbstractAWSStepFunctionsAsync "Abstract implementation of AWSStepFunctionsAsync. Convenient method forms pass through to the corresponding overload that takes a request object and an AsyncHandler, which throws an UnsupportedOperationException." (:refer-clojure :only [req...
4b98e15e73dfeb1db2b959d9bd83f6e4abdbe85c90040a24d706f85375485e0a
marcoheisig/Typo
ntype-contagion.lisp
(in-package #:typo.ntype) ;;; The rules of numeric contagion are as follows: ;;; ;;; CLHS 12.1.4.1: When rationals and floats are combined by a numerical function , the rational is first converted to a float of the same ;;; format. ;;; ;;; CLHS 12.1.4.4: The result of a numerical function is a float of the ;;; large...
null
https://raw.githubusercontent.com/marcoheisig/Typo/a06eecdcee6994fb5731409fe75fad6b7c59d3a9/code/ntype/ntype-contagion.lisp
lisp
The rules of numeric contagion are as follows: CLHS 12.1.4.1: When rationals and floats are combined by a numerical format. CLHS 12.1.4.4: The result of a numerical function is a float of the largest format among all the floating-point arguments to the function. CLHS 12.1.5.2: When a real and a complex are bot...
(in-package #:typo.ntype) function , the rational is first converted to a float of the same computation , the real is first converted to a complex by providing an imaginary part of 0 . (defmethod ntype-contagion ((ntype1 ntype) (ntype2 ntype)) (primitive-ntype-contagion (ntype-primitive-ntype ntype1) (n...
7f9a30c8a1175a7fc65e427f05aee174d6aa5862cf88cc489aa6971ff150b319
Factual/riffle
project.clj
(defproject factual/riffle-hadoop "0.1.0" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0-alpha3"] [byte-transforms "0.1.3"] [byte-streams "0.2.0-alpha4"] ...
null
https://raw.githubusercontent.com/Factual/riffle/f102db1a96dd2de212d555154a231b76016c632a/riffle-hadoop/project.clj
clojure
(defproject factual/riffle-hadoop "0.1.0" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0-alpha3"] [byte-transforms "0.1.3"] [byte-streams "0.2.0-alpha4"] ...
db63c79502cf4dd69ae6f1f241ff67fbee5364e1f5f1abed7b87b16295aa034f
herd/herdtools7
AllBarrier.mli
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/c3b5079aed4bf9d92a5c7de04ef3638d6af0f8c0/herd/AllBarrier.mli
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2010 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
ef1c865cd5ee5662d6d06d4b4914c52c95f6bc0aa14e32a8f09d13d5fa7e122b
Bogdanp/racket-gui-easy
container.rkt
#lang racket/base (require racket/class) (provide container%) (define container% (class object% (init-field children) (super-new) (define deps-to-children (make-hash)) (for* ([c (in-list children)] [d (in-list (send c dependencies))]) (hash-update! deps-to-children d (λ (cs) (con...
null
https://raw.githubusercontent.com/Bogdanp/racket-gui-easy/5095d2fd921f025846620c2c1ae0722dc8cd7425/gui-easy-lib/gui/easy/private/view/container.rkt
racket
#lang racket/base (require racket/class) (provide container%) (define container% (class object% (init-field children) (super-new) (define deps-to-children (make-hash)) (for* ([c (in-list children)] [d (in-list (send c dependencies))]) (hash-update! deps-to-children d (λ (cs) (con...
4a93a3453baf618e1764ad4b1130fa097df9c667609fdeec2071693110e2cb4f
helins/kafka.clj
builder.clj
(ns dvlopt.kstreams.builder "Kafka Streams high level API, rather functional. Overview ======== This API revolves mainly around these abstractions : Streams (`dvlopt.kstreams.stream`) ---------------------------------------- A stream represent a sequence of records which need to ...
null
https://raw.githubusercontent.com/helins/kafka.clj/ecf688f1a8700491c2cd65bcfb19a3781aa4f575/src/dvlopt/kstreams/builder.clj
clojure
Public
(ns dvlopt.kstreams.builder "Kafka Streams high level API, rather functional. Overview ======== This API revolves mainly around these abstractions : Streams (`dvlopt.kstreams.stream`) ---------------------------------------- A stream represent a sequence of records which need to ...
e874c906cae317e2f2e63281b6d5a0e1d229d4837929fce57832ce650b072950
lemmaandrew/CodingBatHaskell
zeroFront.hs
From Return an array that contains the exact same numbers as the given array , but rearranged so that all the zeros are grouped at the start of the array . The order of the non - zero numbers does not matter . So { 1 , 0 , 0 , 1 } becomes { 0 , 0 , 1 , 1 } . You may modify and return the given array or make ...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Array-2/zeroFront.hs
haskell
From Return an array that contains the exact same numbers as the given array , but rearranged so that all the zeros are grouped at the start of the array . The order of the non - zero numbers does not matter . So { 1 , 0 , 0 , 1 } becomes { 0 , 0 , 1 , 1 } . You may modify and return the given array or make ...
27c5fd7618be100886bb149838abefd1d9612881a64555ff6fa17132e788d2c6
LeventErkok/sbv
Bench.hs
----------------------------------------------------------------------------- -- | Module : . Bench . Bench Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- Assessing the overhead of calling solving examples via sbv vs individual solvers ------------...
null
https://raw.githubusercontent.com/LeventErkok/sbv/9cd3662cb6ae31a95b99570f91ae4639807dc1ab/SBVBenchSuite/BenchSuite/Bench/Bench.hs
haskell
--------------------------------------------------------------------------- | License : BSD3 Maintainer: Stability : experimental Assessing the overhead of calling solving examples via sbv vs individual solvers --------------------------------------------------------------------------- # LANGUAGE CPP ...
Module : . Bench . Bench Copyright : ( c ) # OPTIONS_GHC -Wall -Werror -fno - warn - orphans # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # module BenchSuite.Bench.Bench (...
d657c70c1405d083c0edb101afa91fb1130563cbb1460e62b2c726c80c68d0e0
janestreet/learn-ocaml-workshop
game.ml
open! Base type t = { mutable snake : Snake.t ; mutable apple : Apple.t ; mutable game_state : Game_state.t ; height : int ; width : int ; amount_to_grow : int } [@@deriving sexp_of] (* TODO: Implement [in_bounds]. *) let in_bounds t { Position.row; col } = col >= 0 && col < t.width && row >= 0 && row...
null
https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/solutions/snake/game.ml
ocaml
TODO: Implement [in_bounds]. TODO: Implement [create]. Make sure that the game returned by [create] is in a valid state. In particular, we should fail with the message "unable to create initial apple" if [Apple.create] is unsuccessful, and "unable to create initial snake" if the initial snake is invalid ...
open! Base type t = { mutable snake : Snake.t ; mutable apple : Apple.t ; mutable game_state : Game_state.t ; height : int ; width : int ; amount_to_grow : int } [@@deriving sexp_of] let in_bounds t { Position.row; col } = col >= 0 && col < t.width && row >= 0 && row < t.height ;; let create ~height ...
b033e812bd26c0a3bd7a56fd7b9601709db3c4b5f8017dcb6e9a9dd0de1748d4
ndaniels/MRFy
PrefixMemo.hs
# LANGUAGE ScopedTypeVariables # module PrefixMemo ( isoLawOfIndex , listPrefixIso , quickCheck , goodLengthLaw ) ( isoLawOfIndex , listPrefixIso , quickCheck , goodLengthLaw ) -} where import Data.Array.IArray import Data.List import Dat...
null
https://raw.githubusercontent.com/ndaniels/MRFy/9b522d991a9bf98a6690f791dc92ad6fe675115c/PrefixMemo.hs
haskell
prefix of length N is isomorphic to that number
# LANGUAGE ScopedTypeVariables # module PrefixMemo ( isoLawOfIndex , listPrefixIso , quickCheck , goodLengthLaw ) ( isoLawOfIndex , listPrefixIso , quickCheck , goodLengthLaw ) -} where import Data.Array.IArray import Data.List import Dat...
6b51c0d6cc816ade82ed12a8068670fb5ddcf6cb6f93695d764c51aa458b6f8e
softlab-ntua/bencherl
hashtable_test.erl
Copyright ( C ) 2003 - 2014 % This file is part of the Ceylan Erlang library . % % This library is free software: you can redistribute it and/or modify % it under the terms of the GNU Lesser General Public License or the GNU General Public License , as they are published by the Free Software Foundation , eith...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/common/src/data-management/hashtable_test.erl
erlang
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License or any later version. You can also redistribute it and/or modify it under the terms of the This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; w...
Copyright ( C ) 2003 - 2014 This file is part of the Ceylan Erlang library . the GNU General Public License , as they are published by the Free Software Foundation , either version 3 of these Licenses , or ( at your option ) Mozilla Public License , version 1.1 or later . GNU Lesser General Public License...
4fac44ee3a90ec68c5253a3ddd79b8a52250a325db71b80fb4cd4adb8a94777a
GregoryTravis/rhythmr
Rc.hs
# LANGUAGE DeriveGeneric # module Rc (rc, Rc(..)) where import Data.Aeson import Data.ByteString.Lazy.UTF8 as BLU (fromString) import Data.Maybe import GHC.Generics import System.Directory (doesFileExist) import System.IO import System.IO.Unsafe (unsafePerformIO) rcFile = ".rhythmrc" data Rc = Rc { cacheDownloads :...
null
https://raw.githubusercontent.com/GregoryTravis/rhythmr/55fd5b5af6a52da16b7d730c27fb408aa3c61538/src/Rc.hs
haskell
# LANGUAGE DeriveGeneric # module Rc (rc, Rc(..)) where import Data.Aeson import Data.ByteString.Lazy.UTF8 as BLU (fromString) import Data.Maybe import GHC.Generics import System.Directory (doesFileExist) import System.IO import System.IO.Unsafe (unsafePerformIO) rcFile = ".rhythmrc" data Rc = Rc { cacheDownloads :...
a7c660b39ea6c43d6353f4fde836380aeb7bb5f21b64ecb1faa3102c78a741ce
jordanthayer/ocaml-search
vector_aseps.ml
* Sorts the focal list based on an estimate of true cost to go , found by multiplying a weight vector over a set of features available at the given node . Vector is typically gotten through offline regression . Search is carried out in an A * epsilon like manner . multiplying a weight vector...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/adaptive/vector_aseps.ml
ocaml
* Ordering predicate based on node cost *********************************************************************** * Performs a search in domains where there are no duplicates. [sface] is the domain's search interface [vector] is a list of weights to be used * Performs a search in domains where there are no ...
* Sorts the focal list based on an estimate of true cost to go , found by multiplying a weight vector over a set of features available at the given node . Vector is typically gotten through offline regression . Search is carried out in an A * epsilon like manner . multiplying a weight vector...
223d898c15084a5d056e08db6c47e5bc0fd85955e01cb9ffef947a2eb0abcb4f
CafeOBJ/cafeobj
convert.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*- $ Header : /usr / local / cvsrep / cl - ppcre / convert.lisp , v 1.57 2009/09/17 19:17:31 edi Exp $ ;;; Here the parse tree is converted into its internal representation ;;; using REGEX objects. At the same time some optimizations are...
null
https://raw.githubusercontent.com/CafeOBJ/cafeobj/261e3a50407f568272321378df370e5cf7492aaf/cl-ppcre/convert.lisp
lisp
Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*- Here the parse tree is converted into its internal representation using REGEX objects. At the same time some optimizations are already applied. Redistribution and use in source and binary forms, with or without modification, are permitted provided tha...
$ Header : /usr / local / cvsrep / cl - ppcre / convert.lisp , v 1.57 2009/09/17 19:17:31 edi Exp $ Copyright ( c ) 2002 - 2009 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-packag...
7e0d4602460d71169fc4bc3ab7fb247b40434ea18a191ce34226039c9543d879
Rydgel/Clojure-Instagram-API
creds.clj
(ns instagram.creds (:use instagram.oauth) (:import (java.util Properties))) (defn load-config-file "This loads a config file from the classpath" [file-name] (let [file-reader (.. (Thread/currentThread) (getContextClassLoader) (getResourceAsStream file...
null
https://raw.githubusercontent.com/Rydgel/Clojure-Instagram-API/f2de2c8b8c3b852bfbb2bca3c4d1a4252f1216bf/test/instagram/creds.clj
clojure
(ns instagram.creds (:use instagram.oauth) (:import (java.util Properties))) (defn load-config-file "This loads a config file from the classpath" [file-name] (let [file-reader (.. (Thread/currentThread) (getContextClassLoader) (getResourceAsStream file...
b564f52509fbba7526a712aea2c4f3a56f05d54a15a15e91219ebfd9ea4c640a
ghc/packages-dph
Config.hs
-- | Top level hard-wired configuration flags. TODO : This should be generated by the make system module Data.Array.Parallel.Base.Config ( debugCritical , debug , tracePrimEnabled) where -- | Enable internal consistency checks for operations that could -- corrupt the heap. debugCritical :...
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-base/Data/Array/Parallel/Base/Config.hs
haskell
| Top level hard-wired configuration flags. | Enable internal consistency checks for operations that could corrupt the heap. | Enable internal consistency checks. This is NOT implied by `debugCritical` above. If you want both you need to set both to `True.` | Print tracing information for each flat array p...
TODO : This should be generated by the make system module Data.Array.Parallel.Base.Config ( debugCritical , debug , tracePrimEnabled) where debugCritical :: Bool debugCritical = False debug :: Bool debug = False tracePrimEnabled :: Bool tracePrimEnable...
9a61308a00f2f5c3d1af1a1827aa2fe92feb6527b9139dc737ab7da800177fb4
srid/neuron
Open.hs
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # module Neuron.CLI.Open ( openLocallyGeneratedFile, ) where import Data.Some (foldSome) import Neuron.CLI.Types (MonadApp, OpenCommand (..), getOutputDir) import Neuron.Frontend.Route (routeHtmlPath) import Relude import System.Directory (doesFileExist) import S...
null
https://raw.githubusercontent.com/srid/neuron/1f127b8343dbe05e057688988b289066df1cdedb/src/Neuron/CLI/Open.hs
haskell
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # module Neuron.CLI.Open ( openLocallyGeneratedFile, ) where import Data.Some (foldSome) import Neuron.CLI.Types (MonadApp, OpenCommand (..), getOutputDir) import Neuron.Frontend.Route (routeHtmlPath) import Relude import System.Directory (doesFileExist) import S...
28d4677427c54507217f562d002919157d76d516c95f1b872ee7e4cc40fd3297
smallhadroncollider/taskell
Card.hs
# LANGUAGE TemplateHaskell # module Taskell.IO.HTTP.GitHub.Card ( MaybeCard(MaybeCard) , maybeCardToTask , content_url ) where import ClassyPrelude import Control.Lens (makeLenses, (^.)) import qualified Taskell.Data.Task as T (Task, new) import Taskell.IO.HTTP.Aeson ...
null
https://raw.githubusercontent.com/smallhadroncollider/taskell/3c731476e9a58ede300cfa83aba412509b132a3e/src/Taskell/IO/HTTP/GitHub/Card.hs
haskell
strip underscores from field labels create lenses operations
# LANGUAGE TemplateHaskell # module Taskell.IO.HTTP.GitHub.Card ( MaybeCard(MaybeCard) , maybeCardToTask , content_url ) where import ClassyPrelude import Control.Lens (makeLenses, (^.)) import qualified Taskell.Data.Task as T (Task, new) import Taskell.IO.HTTP.Aeson ...
2fe175f84ea07d15b0fd9361290e9b2748f8224e04b00301c31ffec3ee404074
kappamodeler/kappa
experiment.mli
type dep = LESSER_TIME of float | RULE_FLAGS of (string list) | GREATER_TIME of float type ast = Mult of ast * ast | Add of ast * ast | Div of ast * ast | Val_float of float | Val_sol of string | Val_kin of string | Val_infinity type test = Comp of ast*ast | Timeg of float | Timel of float type ord = VAL of ...
null
https://raw.githubusercontent.com/kappamodeler/kappa/de63d1857898b1fc3b7f112f1027768b851ce14d/simplx_rep/src/kappa/experiment.mli
ocaml
test = fun fake_rules_indices -> bool rule_of_name,rules pert_dep: [obs_name -> {pert_indices}] remove time_of: pert_id -> time [pert_indice -> perturbation] pert_dep: [obs_name -> {pert_indices}] remove time_of: pert_id -> time [pert_indice -> perturbation]
type dep = LESSER_TIME of float | RULE_FLAGS of (string list) | GREATER_TIME of float type ast = Mult of ast * ast | Add of ast * ast | Div of ast * ast | Val_float of float | Val_sol of string | Val_kin of string | Val_infinity type test = Comp of ast*ast | Timeg of float | Timel of float type ord = VAL of ...
991e6a265b0e8e1c0265de8939ba1eb9ed3b62a0eaa9380447343cf21aaf73ab
TheLortex/ocaml-maelstrom
unique_id.ml
open Maelstrom let counter = ref 0 let node_id_to_int s = (* format: "n1" *) int_of_string (String.sub s 1 (String.length s - 1)) let rec find_ofs = function 0 -> 0 | n -> 1 + find_ofs (n / 2) (* the goal is to generate globally unique IDs with full availability even when the network is partioned. By encodin...
null
https://raw.githubusercontent.com/TheLortex/ocaml-maelstrom/90cf1c335751d41fbf54dff7879f1d0a7b0d9735/bin/unique_id.ml
ocaml
format: "n1" the goal is to generate globally unique IDs with full availability even when the network is partioned. By encoding the worker id in the ID it's possible to do that easily.
open Maelstrom let counter = ref 0 let node_id_to_int s = int_of_string (String.sub s 1 (String.length s - 1)) let rec find_ofs = function 0 -> 0 | n -> 1 + find_ofs (n / 2) let () = Eio_main.run @@ fun env -> with_init ~stdout:env#stdout ~stdin:env#stdin @@ fun ms -> Eio.traceln "init!"; let worker_id =...
dc04cdba5216e82c0b71c4e63e38e87a871288a6174fb23cf8868046ce6866c1
andrewzhurov/brawl-haus
events.clj
(ns brawl-haus.events (:require [clj-time.core :as t] [clj-time.coerce :as c] [re-frame.events] [re-frame.cofx] [re-frame.fx] [re-frame.std-interceptors] [brawl-haus.data :as data] [re-frame.core :as rf] [brawl-haus.subs :...
null
https://raw.githubusercontent.com/andrewzhurov/brawl-haus/7f560c3dcee7b242fda545d87c102471fdb21888/src/clj/brawl_haus/events.clj
clojure
(ns brawl-haus.events (:require [clj-time.core :as t] [clj-time.coerce :as c] [re-frame.events] [re-frame.cofx] [re-frame.fx] [re-frame.std-interceptors] [brawl-haus.data :as data] [re-frame.core :as rf] [brawl-haus.subs :...
a3588be3ad163d8a371dc06a53a49297300d4f5a78abab870a0edefff817ee79
borgeby/jarl
schema_test.cljc
(ns jarl.config.schema-test (:require #?(:clj [clojure.test :refer [deftest testing is]] :cljs [cljs.test :refer [deftest testing is]]) [jarl.config.reader :as reader] [jarl.config.schema :as schema] [jarl.encoding.json :as json] ...
null
https://raw.githubusercontent.com/borgeby/jarl/2659afc6c72afb961cb1e98b779beb2b0b5d79c6/core/src/test/cljc/jarl/config/schema_test.cljc
clojure
(ns jarl.config.schema-test (:require #?(:clj [clojure.test :refer [deftest testing is]] :cljs [cljs.test :refer [deftest testing is]]) [jarl.config.reader :as reader] [jarl.config.schema :as schema] [jarl.encoding.json :as json] ...
25273749e9f1eec29f44210132876411d26a428869d2efcd87db307a94612d4d
fp-works/2019-winter-Haskell-school
JoinListBuffer.hs
module JoinListBuffer where import Data.Monoid () import Buffer import JoinList import Scrabble import Sized -- ex4 -- to avoid orphan instance warning newtype BufferJoinList = BufferJoinList { getJoinList :: JoinList (Score, Size) String } -- for score and size, we...
null
https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week7/zehua/src/JoinListBuffer.hs
haskell
ex4 to avoid orphan instance warning for score and size, we trust that their values have been correctly calculated during construction
module JoinListBuffer where import Data.Monoid () import Buffer import JoinList import Scrabble import Sized newtype BufferJoinList = BufferJoinList { getJoinList :: JoinList (Score, Size) String } getJoinListScore :: JoinList (Score, Size) String -> Score getJoinLi...
eca9b1fc47b8c931762bdd8b2d88063014a4cd25ffdaf63cb0faf30a6f6d88f0
coccinelle/coccinelle
pretty_print_popl.mli
* This file is part of Coccinelle , licensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, licensed under the terms of the GPL v2. * See copyright.txt in the Cocci...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/popl/pretty_print_popl.mli
ocaml
* This file is part of Coccinelle , licensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, licensed under the terms of the GPL v2. * See copyright.txt in the Cocci...
a6c36f268228802af5c1a55547bbe03d6555f598299abb0507516b8a9032826a
mauny/the-functional-approach-to-programming
graph.mli
#open "MLgraph";; #open "compatibility";; #open "prelude";; #open "sketches";; #open "pictures";; value fold : ('a -> 'b -> 'a * 'c) -> 'a -> 'b list -> 'a * 'c list;; value try_find : ('a -> 'b) -> 'a list -> 'b;; value nth : int -> 'a list -> 'a;; value substituteNth : int -> (graph * pos -> g...
null
https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/MLGRAPH.DIR/graph.mli
ocaml
#open "MLgraph";; #open "compatibility";; #open "prelude";; #open "sketches";; #open "pictures";; value fold : ('a -> 'b -> 'a * 'c) -> 'a -> 'b list -> 'a * 'c list;; value try_find : ('a -> 'b) -> 'a list -> 'b;; value nth : int -> 'a list -> 'a;; value substituteNth : int -> (graph * pos -> g...
a917c1ca75f79b8800756bbd6b6b6c52fed4216847d254032663083e94ed7231
macourtney/Conjure
test_view_generator.clj
(ns conjure.script.generators.test-view-generator (:use clojure.test conjure.script.generators.view-generator) (:require [conjure.view.util :as view-util])) (deftest test-generate-standard-content (is (generate-standard-content "views.test.show" "[:test]")))
null
https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_script_view/test/conjure/script/generators/test_view_generator.clj
clojure
(ns conjure.script.generators.test-view-generator (:use clojure.test conjure.script.generators.view-generator) (:require [conjure.view.util :as view-util])) (deftest test-generate-standard-content (is (generate-standard-content "views.test.show" "[:test]")))
22af99b7cb2b34da0409741d2012b39af7708a78b60634553ec743f1e42a3e05
uw-unsat/jitsynth
test-no-load.rkt
#lang rosette (require "synthesis/compiler-query.rkt" "genc/genc.rkt" "common/options.rkt") (require racket/system) (define args (current-command-line-arguments)) (define dir (~a (vector-ref args 0))) (define stp-file (~a dir "/" (cond [(>= (vector-length args) 2) (~a (vecto...
null
https://raw.githubusercontent.com/uw-unsat/jitsynth/69529e18d4a8d4dace884bfde91aa26b549523fa/test-no-load.rkt
racket
#lang rosette (require "synthesis/compiler-query.rkt" "genc/genc.rkt" "common/options.rkt") (require racket/system) (define args (current-command-line-arguments)) (define dir (~a (vector-ref args 0))) (define stp-file (~a dir "/" (cond [(>= (vector-length args) 2) (~a (vecto...
25c8f2951ecdced21022233bcbb93f03d98ce82a9dca69559b566b46afd130e0
korya/efuns
twm.ml
(***********************************************************************) (* *) (* ____ *) (* *) Fabrice Le Fessa...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/gwml/twm.ml
ocaml
********************************************************************* ____ ...
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt Copyright 1999 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . open Options open Xlib open Xtypes open Gwml open Stdconfig open Twm_t open Wob let load file = ...
1f059253deda5026ffd8d601005784d86340d95b0076ead61fdb3b5de8033604
lspector/Clojush
mux_indexed.clj
an example problem for clojush , a Push / PushGP system written in Clojure , , 2010 - 2012 ;; ;; This is code for multiplexer problems of various sizes, using integers to index address and data bits ( which are Boolean values ) . (ns clojush.problems.boolean.mux-indexed (:use [clojush.pushgp.pushgp] ...
null
https://raw.githubusercontent.com/lspector/Clojush/685b991535607cf942ae1500557171a0739982c3/src/clojush/problems/boolean/mux_indexed.clj
clojure
This is code for multiplexer problems of various sizes, using integers We store address bits in a vector on top of the auxiliary stack and data bits in a vector under the address bits vector. push an address bit, indexed by an integer push a data bit, indexed by an integer
an example problem for clojush , a Push / PushGP system written in Clojure , , 2010 - 2012 to index address and data bits ( which are Boolean values ) . (ns clojush.problems.boolean.mux-indexed (:use [clojush.pushgp.pushgp] [clojush.pushstate] [clojush.interpreter] [clojush.random...
a62c2e87ac340df9ac6ddcefc0b231255dfd6dee8d10cfacfade59ddc2b4c270
softwarelanguageslab/maf
R5RS_gambit_perm9-4.scm
; Changes: * removed : 1 * added : 0 * swaps : 0 * negated predicates : 1 ; * swapped branches: 0 * calls to i d fun : 1 (letrec ((permutations (lambda (x) (let ((x x) (perms (list x))) (letrec ((P (lambda (n) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gambit_perm9-4.scm
scheme
Changes: * swapped branches: 0
* removed : 1 * added : 0 * swaps : 0 * negated predicates : 1 * calls to i d fun : 1 (letrec ((permutations (lambda (x) (let ((x x) (perms (list x))) (letrec ((P (lambda (n) (if (> n ...
fb30da1b2e8f0f41daa26eea1c27b830f09c65e6cfd403af74c9aa7319d1d3bc
RefactoringTools/HaRe
MultiFun1.expected.hs
module MultiFun1 where Remove the second parameter from every equation for the function foo . Remove the second parameter from every equation for the function foo. -} foo [] = [] foo xs = [1]
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/RmOneParameter/MultiFun1.expected.hs
haskell
module MultiFun1 where Remove the second parameter from every equation for the function foo . Remove the second parameter from every equation for the function foo. -} foo [] = [] foo xs = [1]
c2c0e57e5d42ae34efac35eb1dca0f6869dd04a5c368b429f7f89834ae678b25
mzp/coq-ruby
typeclasses_errors.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/pretyping/typeclasses_errors.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i i Class name, method found, exp...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : typeclasses_error...
03bd25d7eb05ef287008e96d67e87f7025daea53786552ec6d0c40cd215f3a82
squirrel-prover/squirrel-prover
theory.ml
open Utils open Env module SE = SystemExpr module L = Location type lsymb = string L.located (*------------------------------------------------------------------*) (** {2 Types} *) type p_ty_i = | P_message | P_boolean | P_index | P_timestamp | P_tbase of lsymb | P_tvar of lsymb type p_ty = p_ty_i L.l...
null
https://raw.githubusercontent.com/squirrel-prover/squirrel-prover/12424c7a975a54953428866908071bdf9765f398/src/theory.ml
ocaml
------------------------------------------------------------------ * {2 Types} ------------------------------------------------------------------ ------------------------------------------------------------------ * An application of a symbol to some arguments, at a given timestamp. As for [App _], the head func...
open Utils open Env module SE = SystemExpr module L = Location type lsymb = string L.located type p_ty_i = | P_message | P_boolean | P_index | P_timestamp | P_tbase of lsymb | P_tvar of lsymb type p_ty = p_ty_i L.located let pp_p_ty_i fmt = function | P_message -> Fmt.pf fmt "message" | P_boole...
7725a9b31bbd6b500abd420bbc30f1f39430e72377ab3f59546e600170a6ce3e
mzp/scheme-abc
sexpTest.ml
open Base open Node open Sexp open OUnit let pos x n a b = {(Node.ghost x) with Node.filename = "<string>"; lineno = n; start_pos = a; end_pos = b} let of_tokens tokens = Sexp.of_stream @@ Stream.of_list tokens let ok sexp tokens = let sexp' = of_tokens tokens in OU...
null
https://raw.githubusercontent.com/mzp/scheme-abc/2cb541159bcc32ae4d033793dea6e6828566d503/scm/parser/sexpTest.ml
ocaml
open Base open Node open Sexp open OUnit let pos x n a b = {(Node.ghost x) with Node.filename = "<string>"; lineno = n; start_pos = a; end_pos = b} let of_tokens tokens = Sexp.of_stream @@ Stream.of_list tokens let ok sexp tokens = let sexp' = of_tokens tokens in OU...
c5a7a35aedc45019b5a4815aa77713dfe43b847eb25253f247d941b8c7c71e39
MaximGB/TetrisRF
next_panel.cljs
(ns tetrisrf.views.next-panel (:require [re-frame.core :as rf] [tetrisrf.views.game-field :refer [game-field]])) (defn next-panel [next-field-sub] [:div.next-field.fluid.ui.labeled.big.input [:div.ui.label.big "Next"] [:div.field-frame [game-field next-field-sub]]])
null
https://raw.githubusercontent.com/MaximGB/TetrisRF/19a91c145a27e8819efebcc9f4e86bbfc15c8d7f/src/tetrisrf/views/next_panel.cljs
clojure
(ns tetrisrf.views.next-panel (:require [re-frame.core :as rf] [tetrisrf.views.game-field :refer [game-field]])) (defn next-panel [next-field-sub] [:div.next-field.fluid.ui.labeled.big.input [:div.ui.label.big "Next"] [:div.field-frame [game-field next-field-sub]]])
548e317f525f076c954bc44ca364d2dc015e5920f5da0a744a09c0526590a9e9
txyyss/Project-Euler
Euler053.hs
There are exactly ten ways of selecting three from five , 12345 : 123 , 124 , 125 , 134 , 135 , 145 , 234 , 235 , 245 , and 345 In combinatorics , we use the notation , 5C3 = 10 . -- In general, nCr = n ! / r!(nr ) ! where r < = n , n ! = n(n1) ... 321 , and 0 ! = 1 . It is not until n = 23 , that a ...
null
https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler053.hs
haskell
In general,
There are exactly ten ways of selecting three from five , 12345 : 123 , 124 , 125 , 134 , 135 , 145 , 234 , 235 , 245 , and 345 In combinatorics , we use the notation , 5C3 = 10 . nCr = n ! / r!(nr ) ! where r < = n , n ! = n(n1) ... 321 , and 0 ! = 1 . It is not until n = 23 , that a value exceeds o...
9bdedc3b56f9419adf9dcbafd662f15b61b8ada5b5efff635de5a9370540ac43
bennn/dissertation
quad-types.rkt
#lang typed/racket/base (provide BoxQuad RunQuad SpacerQuad DocQuad Optical-KernQuad PieceQuad WordQuad Word-BreakQuad PageQuad Page-BreakQuad ColumnQuad Column-BreakQuad LineQuad BlockQuad Block-BreakQuad ;; -- page-break? column-break? block-break? word-break? column? line...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/quadT/base/quad-types.rkt
racket
-- ----------------------------------------------------------------------------- =============================================================================
#lang typed/racket/base (provide BoxQuad RunQuad SpacerQuad DocQuad Optical-KernQuad PieceQuad WordQuad Word-BreakQuad PageQuad Page-BreakQuad ColumnQuad Column-BreakQuad LineQuad BlockQuad Block-BreakQuad page-break? column-break? block-break? word-break? column? line? run?...
15b269539836b85d86129e0544a141864406f40d2748d131a5b08f695cce7f20
Storkle/clj-forex
map.clj
(clojure.core/use 'nstools.ns) (ns+ forex.module.indicator.map (:clone clj.core) (:use forex.module.indicator.util) (:use forex.util.emacs [clj-time.core :exclude [extend start]] [clj-time.coerce] forex.util.spawn forex.util.core forex.util.log forex.util.general forex.module....
null
https://raw.githubusercontent.com/Storkle/clj-forex/1800b982037b821732b9df1e2e5ea1eda70f941f/src/forex/module/indicator/map.clj
clojure
TODO: handle situation where multiple pids get it?? - not too important, actually
(clojure.core/use 'nstools.ns) (ns+ forex.module.indicator.map (:clone clj.core) (:use forex.module.indicator.util) (:use forex.util.emacs [clj-time.core :exclude [extend start]] [clj-time.coerce] forex.util.spawn forex.util.core forex.util.log forex.util.general forex.module....
841d042cdd94ac9a28f83cdaf462d96d38a9abad2a98f6722185c0286d0a15bc
Airtnp/Notes
subtying.hs
-- ref: /~bcpierce/tapl/checkers/fullfsub/syntax.ml -- TODO: the error handling is shit. Try replace everything by Either Type/Term Error -- TODO: add Kind system Fullformsub is the ultra in TAPL : /~bcpierce/tapl/checkers/fullfomsub/ import Data.Maybe import Data.List import Control.Exception import System.IO.Unsafe...
null
https://raw.githubusercontent.com/Airtnp/Notes/d0d2677d0316f24fd5681516b4f38daa7f7269ab/Books/subtying.hs
haskell
ref: /~bcpierce/tapl/checkers/fullfsub/syntax.ml TODO: the error handling is shit. Try replace everything by Either Type/Term Error TODO: add Kind system invariant subtyping covariant subtyping Type operations Γ⊢a Γ⊢x:T.t1 (T->) Γ⊢M N record <-> proj as type application t[T] type abstraction (\lambda X.t) ...
Fullformsub is the ultra in TAPL : /~bcpierce/tapl/checkers/fullfomsub/ import Data.Maybe import Data.List import Control.Exception import System.IO.Unsafe data Kind = KnStar | KnArr Kind Kind data Type = TyVar Int Int | TyId String | TyTop | TyBot | TyArr Type Type | TyRecord [(St...
9ac28ca8f857aed22685b7fb51210317478600d1b8c9af7038d172d51cc3139b
drathier/elm-offline
Args.hs
module Terminal.Args ( simple , Interface(..) , Summary(..) , complex , Flags, noFlags, flags, (|--) , Flag, flag, onOff , Parser(..) , Args, noArgs, required, optional, zeroOrMore, oneOrMore, oneOf , require0, require1, require2, require3, require4, require5 , RequiredArgs, args, exactly, (!), (?),...
null
https://raw.githubusercontent.com/drathier/elm-offline/f562198cac29f4cda15b69fde7e66edde89b34fa/ui/terminal/src/Terminal/Args.hs
haskell
) GET AUTO-COMPLETE | | | ) :: Flags (a -> b) -> Flag a -> Flags b ) = FLAG | | FANCY ARGS | | | | | | SIMPLE ARGS | | | | | | | | | | | SUGGEST FILES suggests any file suggests only .elm files suggests only .js and .html files suggests any file suggests only .elm files suggests only .js and .html files
module Terminal.Args ( simple , Interface(..) , Summary(..) , complex , Flag, flag, onOff , Parser(..) , Args, noArgs, required, optional, zeroOrMore, oneOrMore, oneOf , require0, require1, require2, require3, require4, require5 , RequiredArgs, args, exactly, (!), (?), (...) ) where import quali...
ca6e4f704d5bd333c56a6000265d19934914a44f0ba806b78c10712a154deffb
AccelerationNet/buildnode
buildnode.lisp
(in-package :net.acceleration.buildnode) (cl-interpol:enable-interpol-syntax) ;;;; Common string util, stoplen from adwutils (defparameter +common-white-space-trimbag+ '(#\space #\newline #\return #\tab #\u00A0 ;; this is #\no-break_space )) (defun trim-whitespace (s) (string-trim +common-white-space-tri...
null
https://raw.githubusercontent.com/AccelerationNet/buildnode/c614ead94d00795c1a862f344d45aef52e568e2b/src/buildnode.lisp
lisp
Common string util, stoplen from adwutils this is #\no-break_space (with ,cont = (lambda () (%walk-dom-cont ,tree))) probably why this was not implemented on dom-builder) we will just make a text node of it for now :/ other thoughts would be a processing instruction or something I think we might be able to use...
(in-package :net.acceleration.buildnode) (cl-interpol:enable-interpol-syntax) (defparameter +common-white-space-trimbag+ '(#\space #\newline #\return #\tab )) (defun trim-whitespace (s) (string-trim +common-white-space-trimbag+ s)) (defmacro trim-and-nullify! (&rest places) `(setf ,@(iter (for p in pla...
fb61aef66f5b126ad0598439f65995818a48d515d9b478fcc7bde974b1f216d0
nextjournal/advent-of-clerk
day_18.clj
# 🎄 Advent of Clerk : Day 18 (ns advent-of-clerk.day-18 (:require [nextjournal.clerk :as clerk]))
null
https://raw.githubusercontent.com/nextjournal/advent-of-clerk/9f358c9f13995f591981a26fc3683dea574933b1/src/advent_of_clerk/day_18.clj
clojure
# 🎄 Advent of Clerk : Day 18 (ns advent-of-clerk.day-18 (:require [nextjournal.clerk :as clerk]))
a506b8d37de7c3f735467c9d13765ec233dcc056232a93750371196076a7bbdb
skanev/playground
14.scm
SICP exercise 5.14 ; ; Measure the number of pushes and the maximum stack depth required to compute ; n! for various small values of n using the factorial machine shown in figure 5.11 . From your data determine formulas in terms of n for the total number ; of push operations and the maximum stack depth used in comp...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/14.scm
scheme
Measure the number of pushes and the maximum stack depth required to compute n! for various small values of n using the factorial machine shown in figure of push operations and the maximum stack depth used in computing n! for any will have to augment the factorial machine with instructions to initialize the stack...
SICP exercise 5.14 5.11 . From your data determine formulas in terms of n for the total number n > 1 . Note that each of these is a linear function of n and is thus determined by two constants . In order to get the statistics printed , you prints the result ( as we did for the GCD machine in figure 5.4 ) , so...
ad1a4e71a824a3b59ff3fabbff01b2eb1639353c4718ffc9924ffe582441383c
lokke-org/lokke
invoke.scm
Copyright ( C ) 2019 - 2020 < > SPDX - License - Identifier : LGPL-2.1 - or - later OR EPL-1.0 + (define-module (lokke base invoke) #:use-module ((guile) #:select ((apply . %scm-apply))) #:use-module (oop goops) #:export (invoke) #:replace (apply) #:duplicates (merge-generics replace warn-override-cor...
null
https://raw.githubusercontent.com/lokke-org/lokke/a6616b3de60b62d787bf9b98206f8ad9eeb10844/mod/lokke/base/invoke.scm
scheme
FIXME: do we want this?
Copyright ( C ) 2019 - 2020 < > SPDX - License - Identifier : LGPL-2.1 - or - later OR EPL-1.0 + (define-module (lokke base invoke) #:use-module ((guile) #:select ((apply . %scm-apply))) #:use-module (oop goops) #:export (invoke) #:replace (apply) #:duplicates (merge-generics replace warn-override-cor...
d590041fcce11187b7e0b853a5bbef27f38969bbad9c67ca299fdd7df8277037
jbclements/RSound
interactive-drr-frequency-response.rkt
#lang racket (require "../frequency-response.rkt" "../filter.rkt" "../filter-typed.rkt" racket/flonum rackunit plot) 100 - pole comb (define (poly1 z) (/ 1 (- 1 (* 0.95 (expt z -100))))) (module+ main (printf "100-pole comb filter, 0 up to Nyquist:\n") ;; show th...
null
https://raw.githubusercontent.com/jbclements/RSound/c699db1ffae4cf0185c46bdc059d7879d40614ce/rsound/test/interactive-drr-frequency-response.rkt
racket
show the whole range: min-freq max-freq min-freq max-freq this one shows that lpf-sig is doing something sane: and should have 0 db gain at 0 Hz. okay, let's see if these filters are actually doing what they're supposed to. ( * 2 pi 0.25 ) 0 22050 # : db # f )
#lang racket (require "../frequency-response.rkt" "../filter.rkt" "../filter-typed.rkt" racket/flonum rackunit plot) 100 - pole comb (define (poly1 z) (/ 1 (- 1 (* 0.95 (expt z -100))))) (module+ main (printf "100-pole comb filter, 0 up to Nyquist:\n") (response-...
dff850556139092f3379c8fea9baedb9776847df7f5f17c8f5c5e28e44529cb8
hyperfiddle/rcf
analyzer_test.clj
(ns hyperfiddle.rcf.analyzer-test (:require [hyperfiddle.rcf.analyzer :as ana] [clojure.test :as t :refer [deftest are testing]])) (defn roundtrip ([form] (roundtrip (ana/empty-env) form)) ([env form] (ana/emit (ana/analyze env form)))) (deftest roundtrips (testing "hf.analyzer should parse and un...
null
https://raw.githubusercontent.com/hyperfiddle/rcf/89ce7b01091a0b74036e5130b3e9202c27b61439/test/hyperfiddle/rcf/analyzer_test.clj
clojure
(ns hyperfiddle.rcf.analyzer-test (:require [hyperfiddle.rcf.analyzer :as ana] [clojure.test :as t :refer [deftest are testing]])) (defn roundtrip ([form] (roundtrip (ana/empty-env) form)) ([env form] (ana/emit (ana/analyze env form)))) (deftest roundtrips (testing "hf.analyzer should parse and un...
d269e2ae954005ceaafc53716f48bc45a54413b78d58bf386a1a974d552baa95
jlouis/graphql-erlang
dungeon_type.erl
-module(dungeon_type). -include("dungeon.hrl"). -export([execute/1]). execute(#monster{}) -> {ok, 'Monster'}; execute(#dice{}) -> {ok, 'Dice'}; execute(kraken) -> {error, kraken}; execute(X) -> case dungeon:unwrap(X) of {Ty, _} -> object_type(Ty) end. object_type(room) -> {ok, 'Room'}; object_type(di...
null
https://raw.githubusercontent.com/jlouis/graphql-erlang/4fd356294c2acea42a024366bc5a64661e4862d7/test/dungeon_type.erl
erlang
-module(dungeon_type). -include("dungeon.hrl"). -export([execute/1]). execute(#monster{}) -> {ok, 'Monster'}; execute(#dice{}) -> {ok, 'Dice'}; execute(kraken) -> {error, kraken}; execute(X) -> case dungeon:unwrap(X) of {Ty, _} -> object_type(Ty) end. object_type(room) -> {ok, 'Room'}; object_type(di...
d1bb46a30148f52897156561c118cfd0aede1cc3e10805a8850bfc9c07422e28
brendanhay/gogol
Cancel.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-securitycenter/gen/Gogol/SecurityCenter/Organizations/Operations/Cancel.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated /See:/ < Security Command Center API Reference> for @securitycenter.organizations.operations.cancel@. * Resource ** Constructing a Request | A resource alias for @securitycenter.organizations.operations.cancel@ method which th...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
b9154d46a11080feb499a3840dce00b590a3c25cda79520f10bbec68d0e81975
parapluu/Concuerror
test.erl
-module(test). -export([scenarios/0]). -export([t_simple_reg/0, t_simple_reg_or_locate/0, t_reg_or_locate2/0]). -export([test1/0, test2/0, test3/0, test4/0]). -concuerror_options_forced( [ {after_timeout, 1000} , {treat_as_normal, shutdown} , {ignore_error, deadlock} ]). -include_lib("eunit/include/eunit...
null
https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests-real/suites/gproc/test.erl
erlang
E1 -> receive E2 -> {event1, event2} = {E1, E2} end
-module(test). -export([scenarios/0]). -export([t_simple_reg/0, t_simple_reg_or_locate/0, t_reg_or_locate2/0]). -export([test1/0, test2/0, test3/0, test4/0]). -concuerror_options_forced( [ {after_timeout, 1000} , {treat_as_normal, shutdown} , {ignore_error, deadlock} ]). -include_lib("eunit/include/eunit...
bf94a1a7c8a35a557f5b0feb23e560910b0e7dca2a02d8febe9760962372f7e8
exoscale/clojure-kubernetes-client
v1_pod_condition.clj
(ns clojure-kubernetes-client.specs.v1-pod-condition (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] ) (:import (java.io File))) (declare v1-pod-condition-data v1-pod-condition) (def v1-pod-condition-data { (ds/opt :lastProbeTime) inst? (ds/opt :lastTransitionTim...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_pod_condition.clj
clojure
(ns clojure-kubernetes-client.specs.v1-pod-condition (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] ) (:import (java.io File))) (declare v1-pod-condition-data v1-pod-condition) (def v1-pod-condition-data { (ds/opt :lastProbeTime) inst? (ds/opt :lastTransitionTim...
5d37fe0889ca066014bafb78cba3965c4ac735e7901698924c72e6ef51b9dd58
donaldsonjw/bigloo
function.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / cigloo / Translate / function.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/cigloo/Translate/function.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The function definition and declaration translation. */ *===========================...
* serrano / prgm / project / bigloo / cigloo / Translate / function.scm * / * Author : * / * Creation : Tue Nov 28 09:49:40 1995 * / * Last change : Sun Dec 30 09:11:05 2007 ( serrano ) * / (module t...
06bd9fc569b3511561c99115045763178c7af7e7b11863a49e5a6703a97c6d14
schemeorg-community/index.scheme.org
srfi.78.scm
(((name . "check") (signature syntax-rules (=>) ((_ expr (=> equal) expected)) ((_ expr => expected))) (subsigs (equal (value procedure?)))) ((name . "check-ec") (signature syntax-rules (=>) ((_ qualifier ... expr (=> equal) expected (argument ...))) ((_ qualifier ... expr => expected (ar...
null
https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/types/srfi.78.scm
scheme
(((name . "check") (signature syntax-rules (=>) ((_ expr (=> equal) expected)) ((_ expr => expected))) (subsigs (equal (value procedure?)))) ((name . "check-ec") (signature syntax-rules (=>) ((_ qualifier ... expr (=> equal) expected (argument ...))) ((_ qualifier ... expr => expected (ar...
2bb053a7fec05a1f1eb9283897203d90d7b1ea9018096a112bfde31cb2c8efca
grammarly/omniconf
core_test.clj
(ns omniconf.core-test (:require [omniconf.core :as cfg] [clojure.java.io :as io] [clojure.test :refer :all])) (cfg/enable-functions-as-defaults) (cfg/define {:help {:description "prints this help message" :help-name "my-script" :help-description "description of the who...
null
https://raw.githubusercontent.com/grammarly/omniconf/588e9e9200509f7c6afe1ff5f2bddad7bab5b0a4/test/omniconf/core_test.clj
clojure
Hack because setting from map doesn't allow overriding whole nested maps. Hack because setting from file doesn't allow overriding whole nested maps.
(ns omniconf.core-test (:require [omniconf.core :as cfg] [clojure.java.io :as io] [clojure.test :refer :all])) (cfg/enable-functions-as-defaults) (cfg/define {:help {:description "prints this help message" :help-name "my-script" :help-description "description of the who...
dd92dd11a187814c04f00d4dcf13bb20c42922a7204917a8db15ae734327dfeb
fission-codes/fission
Natural.hs
# OPTIONS_GHC -fno - warn - orphans # # OPTIONS_GHC -fno - warn - missing - methods # module Network.IPFS.Internal.Orphanage.Natural () where import System.Envy import Network.IPFS.Prelude instance Display Natural where display nat = display (fromIntegral nat :: Integer) instance Var Natural where fro...
null
https://raw.githubusercontent.com/fission-codes/fission/fb76d255f06ea73187c9b787bd207c3778e1b559/ipfs/library/Network/IPFS/Internal/Orphanage/Natural.hs
haskell
# OPTIONS_GHC -fno - warn - orphans # # OPTIONS_GHC -fno - warn - missing - methods # module Network.IPFS.Internal.Orphanage.Natural () where import System.Envy import Network.IPFS.Prelude instance Display Natural where display nat = display (fromIntegral nat :: Integer) instance Var Natural where fro...
1717f2939395d06d84174fb4b9d682935310f87e734dd46c9cfb38366fc84621
facebookarchive/duckling_old
measure.clj
( ;; Distance ; latent distance "number as distance" (dim :number) {:dim :distance :latent true :value (:value %1)} "<latent dist> km" [(dim :distance) #"(?i)k(ilo)?m?([eéè]tre)?s?"] (-> %1 (dissoc :latent) (merge {:unit "kilometre" :normalized {:value (* 1000 (-> %1 :value)) ...
null
https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/fr/rules/measure.clj
clojure
Distance latent distance volume latent volume Quantity a pound an apple
( "number as distance" (dim :number) {:dim :distance :latent true :value (:value %1)} "<latent dist> km" [(dim :distance) #"(?i)k(ilo)?m?([eéè]tre)?s?"] (-> %1 (dissoc :latent) (merge {:unit "kilometre" :normalized {:value (* 1000 (-> %1 :value)) :unit "metre"}})) "<dist> mete...
139dc49e4eddeebbfe8fe6f0695a972e0470b78a1ecfba217fd247b562308ece
softlab-ntua/bencherl
deployment_firewall_restriction_test.erl
Copyright ( C ) 2008 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca 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 3 of the License , or ( at your option ) a...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/sim-diasca/src/core/src/scheduling/tests/deployment_firewall_restriction_test.erl
erlang
it under the terms of the GNU Lesser General Public License as but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the If not, see </>. For all facilities common to all tests: Runs a distributed simulation (of course if relevant computing hosts ...
Copyright ( C ) 2008 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca is free software : you can redistribute it and/or modify published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . Sim - Diasca is distributed in the hope tha...
3f9147ddd556f5e26e931544743b2c34d3125d280439b1335fbdbcc485351596
geoffder/dometyl-keyboard
snapper.ml
open OSCADml let () = let f i = let n = Filename.(chop_extension @@ basename Sys.argv.(i + 1)) ^ ".png" in let f e = Printf.printf "Failed to take snapshot %s:\n%s\n%!" n e in Export.( snapshot ~colorscheme:TomorrowNight ~size:(1000, 1000) ~view:[ Axes; Scales ] n ...
null
https://raw.githubusercontent.com/geoffder/dometyl-keyboard/12ea44abf3e52de9a3b4624c8349457e7b770cb4/dune_helpers/snapper.ml
ocaml
open OSCADml let () = let f i = let n = Filename.(chop_extension @@ basename Sys.argv.(i + 1)) ^ ".png" in let f e = Printf.printf "Failed to take snapshot %s:\n%s\n%!" n e in Export.( snapshot ~colorscheme:TomorrowNight ~size:(1000, 1000) ~view:[ Axes; Scales ] n ...
c52a22fab09f40cac951c09d7d763fff1a20610a17f8c6278b89d81b68382f54
facundoolano/advenjure
verb_map.cljc
(ns advenjure.verb-map (:require [advenjure.verbs :as verbs] #?(:cljs [xregexp]))) (defn expand-verb "Creates a map of command regexes to handler for the given verb spec." [{:keys [commands handler]}] (let [patterns (map #(str "^" % "$") commands)] (zipmap patterns (repeat handler)))) (def def...
null
https://raw.githubusercontent.com/facundoolano/advenjure/2f05fdae9439ab8830753cc5ef378be66b7db6ef/src/advenjure/verb_map.cljc
clojure
single match, no params match with params
(ns advenjure.verb-map (:require [advenjure.verbs :as verbs] #?(:cljs [xregexp]))) (defn expand-verb "Creates a map of command regexes to handler for the given verb spec." [{:keys [commands handler]}] (let [patterns (map #(str "^" % "$") commands)] (zipmap patterns (repeat handler)))) (def def...
7a84be47757f7d816c1c826e7e0f9c83c3392cde6df43c47d0d903ebf8417dbc
0xfei/mnesia_redis
mnesis_help.erl
-module(mnesis_help). %% API -export([ lower_binary/1, find_number/2, pattern_match/2, binary_to_number/1, number_to_binary/1, join_list/2, calc_index/2, add_elements/3, remove_elements/3, add_hash/2, remove_hash/3, add_orddict/4, del_orddict/4, list_find_low/4, list_find_high/4, add_ke...
null
https://raw.githubusercontent.com/0xfei/mnesia_redis/9353dfbcfc8c5197b6907c94cdfa4abf13d5f0c8/src/mnesis_help.erl
erlang
API join_list calc_index using with try list_find_low list_find_high binary_to_number number_to_binary insert sets remove sets add multi hash remove hash add orddict del orddict expire key manage
-module(mnesis_help). -export([ lower_binary/1, find_number/2, pattern_match/2, binary_to_number/1, number_to_binary/1, join_list/2, calc_index/2, add_elements/3, remove_elements/3, add_hash/2, remove_hash/3, add_orddict/4, del_orddict/4, list_find_low/4, list_find_high/4, add_key_expir...
24c204c83b8ae0a74ff0500b3ab996c647af720ff6de10f70200b5caef8fffe3
fujita-y/ypsilon
%3a64.scm
#!nobacktrace (library (srfi :64) (export test-begin test-end test-group test-group-with-cleanup test-skip test-expect-fail test-match-name test-match-nth test-match-all test-match-any test-assert test-eqv ...
null
https://raw.githubusercontent.com/fujita-y/ypsilon/44260d99e24000f9847e79c94826c3d9b76872c2/sitelib/srfi/%253a64.scm
scheme
#!nobacktrace (library (srfi :64) (export test-begin test-end test-group test-group-with-cleanup test-skip test-expect-fail test-match-name test-match-nth test-match-all test-match-any test-assert test-eqv ...
5583138ec3f2833a809ab4f8f86da033afb491582a274c073eb9f78014117a68
ocamllabs/ocaml-modular-implicits
pi_num.ml
(*************************************************************************) (* *) (* OCaml *) (* *) ,...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/lib-num-2/pi_num.ml
ocaml
*********************************************************************** OCaml ...
, projet Estime , INRIA Rocquencourt Copyright 2008 Institut National de Recherche en Informatique et under the terms of the Q Public License version 1.0 . Pi digits computed with the sreaming algorithm given on pages 4 , 6 & 7 of " Unbounded Spigot Algori...
de7abe384cf89c76c72a9b0e168bda3c5bcf789b1265f46c31c86a28d9e25e91
HaskellForCats/HaskellForCats
devel.hs
{-# LANGUAGE PackageImports #-} import "yogsothoth" Application (getApplicationDev) import Network.Wai.Handler.Warp (runSettings, defaultSettings, settingsPort) import Control.Concurrent (forkIO) import System.Directory (doesFileExist, removeFile) import System.Exit (exitSuccess) import Control.Concurrent (threadDe...
null
https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/yogsothoth/devel.hs
haskell
# LANGUAGE PackageImports #
import "yogsothoth" Application (getApplicationDev) import Network.Wai.Handler.Warp (runSettings, defaultSettings, settingsPort) import Control.Concurrent (forkIO) import System.Directory (doesFileExist, removeFile) import System.Exit (exitSuccess) import Control.Concurrent (threadDelay) main :: IO () main = do ...
15822b359da0f21a2fcee06df017154b48422279bb877c7096006a57999cc1ae
Lysxia/twentyseven
Extra.hs
# LANGUAGE TypeFamilies , TypeOperators , TemplateHaskell # module Data.Tuple.Extra where import Control.Monad ( forM ) import Data.Tuple.Template ( decTupleCons ) class TupleCons b where type (:|) a b :: * (|:|) :: a -> b -> a :| b split :: a :| b -> (a, b) forM [3 .. 10] decTupleCons newtype Tuple1 a = Tupl...
null
https://raw.githubusercontent.com/Lysxia/twentyseven/bfcd3ddcf938bc6db933a364d331877b0fd1257e/src/Data/Tuple/Extra.hs
haskell
# INLINE (|:|) #
# LANGUAGE TypeFamilies , TypeOperators , TemplateHaskell # module Data.Tuple.Extra where import Control.Monad ( forM ) import Data.Tuple.Template ( decTupleCons ) class TupleCons b where type (:|) a b :: * (|:|) :: a -> b -> a :| b split :: a :| b -> (a, b) forM [3 .. 10] decTupleCons newtype Tuple1 a = Tupl...
1f81fb1dc5710fe35ec6103769e3b98f6bc692728ed05275e9f76029a896b45f
brendanhay/credentials
Options.hs
{-# LANGUAGE OverloadedStrings #-} -- | -- Module : Credentials.CLI.Options Copyright : ( c ) 2015 - 2016 License : Mozilla Public License , v. 2.0 . Maintainer : < > -- Stability : provisional Portability : non - portable ( GHC extensions ) -- module Credentials.CLI.Options where import...
null
https://raw.githubusercontent.com/brendanhay/credentials/4cba2c238b7d99712ee6745748864134096a106b/credentials-cli/src/Credentials/CLI/Options.hs
haskell
# LANGUAGE OverloadedStrings # | Module : Credentials.CLI.Options Stability : provisional | Setup an option with formatted help text. ^ The options' description. ^ The help body (title/footer in tabular). | Setup a tabular list of possible values for an option, a default value, and an auto-completer. ^...
Copyright : ( c ) 2015 - 2016 License : Mozilla Public License , v. 2.0 . Maintainer : < > Portability : non - portable ( GHC extensions ) module Credentials.CLI.Options where import Credentials.CLI.Types import Data.Bifunctor import Data.List (foldl') import Data.Maybe (isJust) impo...
b2946aa2372572226a2012ea935833b4356b88efe382d7e98e4c69f18907385e
dwysocki/hidden-markov-music
init.clj
(ns hidden-markov-music.model.init (:require [hidden-markov-music.hmm :as hmm] [hidden-markov-music.util :as util] [clojure.tools.cli :refer [parse-opts]] [clojure.string :as string])) (def usage (util/usage-descriptor (->> ["Usage: hidden-markov-music init [<options>] <mode>...
null
https://raw.githubusercontent.com/dwysocki/hidden-markov-music/5601e17dd582d0a73be16fe98fec099296303c95/src/hidden_markov_music/model/init.clj
clojure
create a seq out of the lines of the alphabet built a set from that seq add nil to that set, which represents end-of-song
(ns hidden-markov-music.model.init (:require [hidden-markov-music.hmm :as hmm] [hidden-markov-music.util :as util] [clojure.tools.cli :refer [parse-opts]] [clojure.string :as string])) (def usage (util/usage-descriptor (->> ["Usage: hidden-markov-music init [<options>] <mode>...
c7a4d627719d5360a276b3ba671d3cfe70b95e8fe4caf073521aea731205afd7
CarlWright/NGerlguten
erlguten.erl
%%========================================================================== Copyright ( C ) 2003 %% %% 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 ...
null
https://raw.githubusercontent.com/CarlWright/NGerlguten/3c87f2e3a44ae9069f9379933b99c0feb8262d66/lib/ngerlguten/src/erlguten.erl
erlang
========================================================================== Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish, following conditions: The above cop...
Copyright ( C ) 2003 " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , subject to the in all copies or substantial portions of the Software . THE SOFTWAR...
36111ce728617ea950e443f6f1b1c11ae45f9fbc0a19f94cdf2e9caea7a07d4b
apache/couchdb-mango
mango_httpd_handlers.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an ...
null
https://raw.githubusercontent.com/apache/couchdb-mango/312e2c45535913c190cdef51f6ea65066ccd89dc/src/mango_httpd_handlers.erl
erlang
the License at -2.0 Unless required by applicable law or agreed to in writing, software WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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 distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(mango_httpd_handlers). -export([url_handler/1, db_handler/1, des...
345e9eda005a311a32c7d88520e3c24318d62028e33fcc822319d344f83a4830
ddmcdonald/sparser
display-ontology.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- copyright ( c ) 2016 - 2021 -- all rights reserved ;;; ;;; File: "display-ontology" ;;; Module: interface/grammar/ Version : October 2021 Adapted 10/22/16 from MAB 's code for Trips . (in-package :sparser) ;;;----------------------...
null
https://raw.githubusercontent.com/ddmcdonald/sparser/f1ab378ceab5523014e504e7a2e71d25e5e773b7/Sparser/code/s/interface/grammar/display-ontology.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- File: "display-ontology" Module: interface/grammar/ ------------------------------------- words with multiple interpretations ------------------------------------- (write-multi-cat-data :descriptor "fire" :file-location "Sparser/code/s/grammar/tes...
copyright ( c ) 2016 - 2021 -- all rights reserved Version : October 2021 Adapted 10/22/16 from MAB 's code for Trips . (in-package :sparser) (defun write-multi-cat-data (&key descriptor reference-system file-location file-name) "Parameters modeled on save-subcat-tr...
131527f695421d4aae720c946358cd4c679343a080949e7571729dbe4ada3d6a
tomprimozic/type-systems
core.ml
open Expr open Infer let core = let core_ref = ref Env.empty in let assume name ty_str = let ty = Parser.ty_forall_eof Lexer.token (Lexing.from_string ty_str) in core_ref := Env.extend !core_ref name ty in assume "head" "forall[a] list[a] -> a" ; assume "tail" "forall[a] list[a] -> list[a]" ; assume "nil...
null
https://raw.githubusercontent.com/tomprimozic/type-systems/4403586a897ee94cb8f0de039aeee8ef1ecef968/gradual_typing/core.ml
ocaml
open Expr open Infer let core = let core_ref = ref Env.empty in let assume name ty_str = let ty = Parser.ty_forall_eof Lexer.token (Lexing.from_string ty_str) in core_ref := Env.extend !core_ref name ty in assume "head" "forall[a] list[a] -> a" ; assume "tail" "forall[a] list[a] -> list[a]" ; assume "nil...
64d79739a729a1f3b0464f01834126d5bfe74a6b3ea15fe61a9bec3efb03bb0f
TerrorJack/ghc-alter
QSemN.hs
{-# LANGUAGE Safe #-} {-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -funbox-strict-fields #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.QSemN Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file l...
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/Control/Concurrent/QSemN.hs
haskell
# LANGUAGE Safe # # LANGUAGE BangPatterns # # OPTIONS_GHC -funbox-strict-fields # --------------------------------------------------------------------------- | Module : Control.Concurrent.QSemN License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Porta...
Copyright : ( c ) The University of Glasgow 2001 module Control.Concurrent.QSemN * General ) where import Control.Concurrent.MVar ( MVar, newEmptyMVar, takeMVar, tryTakeMVar , putMVar, newMVar , tryPutMVar, isEmptyMVar) import Control.Exception imp...
673be396ef2b22417ec7e8113a8ddbaa68b94a9dc7f6882e4151a57ed4600145
SRI-CSL/f3d
sysdef-lisp-extensions.lisp
(in-package :cl-user) (defvar config::weak-eval-cache nil) (st:define-system :lisp-extensions :required-systems '(common-symbols ev-pathnames lcl) :files `("lx-pkg.lisp" "custom.lisp" "colors.lisp" ; Not the best place, but see file for issues. "file-property-list.lisp" ; this pr...
null
https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-core/lx/sysdef-lisp-extensions.lisp
lisp
Not the best place, but see file for issues. this probably should move to system-tool would like to eliminate this swank-weak-hash-table.lisp is broken with recent slime/swank versions
(in-package :cl-user) (defvar config::weak-eval-cache nil) (st:define-system :lisp-extensions :required-systems '(common-symbols ev-pathnames lcl) :files `("lx-pkg.lisp" "custom.lisp" "lisp-extensions.lisp" "struct-class.lisp" ,@(if config::weak-eval-cache `("weak-eval-cache.lisp" ...
ec64d126787c11045453c5bfdda2fdb62f5f09449cef632ed3617ee67c143799
jeffshrager/biobike
table-data-utils.lisp
;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: bioutils; -*- ;;; Author: JP Massar. (in-package :bioutils) (defvar *td*) (defparameter *test-table3-data* (make-array '(4 9) :initial-contents CODE NAME SSN LEVEL0 R1 R2 '(("a" "Fred" "62-055" 1.0 2.0 -3.0 50.0e-2 23 "the big ...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Biotests/table-data-utils.lisp
lisp
-*- mode: Lisp; Syntax: Common-Lisp; Package: bioutils; -*- Author: JP Massar. double floats) to single floats in arrays (which, if the element type of the array is 'single-float, are really single floats)
(in-package :bioutils) (defvar *td*) (defparameter *test-table3-data* (make-array '(4 9) :initial-contents CODE NAME SSN LEVEL0 R1 R2 '(("a" "Fred" "62-055" 1.0 2.0 -3.0 50.0e-2 23 "the big man") ("v" "Wilma" "37-999" 2.05 3.0 17.0 0.50 24 "his wife") ("c" "Ba...
1f4ed46b55e466fe38505a8199f9fdf417d1b9355f3af6159f7cdfeb806e4acd
Opetushallitus/aipal
kayttaja.clj
Copyright ( c ) 2013 The Finnish National Board of Education - Opetushallitus ;; This program is free software : Licensed under the EUPL , Version 1.1 or - as soon as they will be approved by the European Commission - subsequent versions of the EUPL ( the " Licence " ) ; ;; ;; You may not use this work except...
null
https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal/src/clj/aipal/arkisto/kayttaja.clj
clojure
You may not use this work except in compliance with the Licence. You may obtain a copy of the Licence at: / This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lisätään uusi...
Copyright ( c ) 2013 The Finnish National Board of Education - Opetushallitus This program is free software : Licensed under the EUPL , Version 1.1 or - as soon as they will be approved by the European Commission - subsequent versions European Union Public Licence for more details . (ns aipal.arkisto.kayttaj...
29a98da12b36b4ac0761fa91ddea93f6d52acc1ba347be6afc9b88acf015d9ed
FranklinChen/hugs98-plus-Sep2006
Validate.hs
-- | Validate a document against a dtd. module Text.XML.HaXml.Validate ( validate , partialValidate ) where import Text.XML.HaXml.Types import Text.XML.HaXml.Combinators (multi,tag,iffind,literal,none,o) import Text.XML.HaXml.XmlContent (attr2str) import Maybe (fromMaybe,isNothing,fromJust) import List (interspe...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/HaXml/src/Text/XML/HaXml/Validate.hs
haskell
| Validate a document against a dtd. real finite map, if it is available otherwise, a very simple and inefficient implementation of a finite map content model of elem type of (elem,attr) required attributes of elem all (element,attr) with ID type all (element,attr) with IDREF type not implemented simple auxil...
module Text.XML.HaXml.Validate ( validate , partialValidate ) where import Text.XML.HaXml.Types import Text.XML.HaXml.Combinators (multi,tag,iffind,literal,none,o) import Text.XML.HaXml.XmlContent (attr2str) import Maybe (fromMaybe,isNothing,fromJust) import List (intersperse,nub,(\\)) import Char (isSpace) #if...
a3dc7747b028152f7d7bcbccb5d2a1a39be1cf4e47196bc154d7d788a825361d
haskell/haskell-ide-engine
TypeMap.hs
# LANGUAGE TupleSections # # LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE LambdaCase # module Haskell.Ide.Engine.TypeMap where import qualified Data.IntervalMap.FingerTree as IM import qualified GHC import GHC ...
null
https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/hie-plugin-api/Haskell/Ide/Engine/TypeMap.hs
haskell
# LANGUAGE RankNTypes # | Generate a mapping from an Interval to types. Intervals may overlap and return more specific results. | Obtain details map for types. | Variation of "everything" that does not recurse into children of type t | Returns true if a == t. | Variation of "everything" with an added stop conditi...
# LANGUAGE TupleSections # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE LambdaCase # module Haskell.Ide.Engine.TypeMap where import qualified Data.IntervalMap.FingerTree as IM import qualified GHC import GHC ( Typeche...
0f0f347b9cd771340d6deacea3ed99cef189580bc0bf159752fa93941a483276
crategus/cl-cffi-gtk
gdk-demo.lisp
(defpackage :gdk-demo (:use :gtk :gdk :gdk-pixbuf :gobject :glib :cairo :cffi :common-lisp) (:export #:demo-put-pixel)) (in-package :gdk-demo) (defun rel-path (filename) (let ((system-path (asdf:system-source-directory :gtk-example))) (princ-to-string (merge-pathnames filename system-path)))) 2020 - 11 -...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/22156e3e2356f71a67231d9868abcab3582356f3/demo/gdk-demo/gdk-demo.lisp
lisp
(defpackage :gdk-demo (:use :gtk :gdk :gdk-pixbuf :gobject :glib :cairo :cffi :common-lisp) (:export #:demo-put-pixel)) (in-package :gdk-demo) (defun rel-path (filename) (let ((system-path (asdf:system-source-directory :gtk-example))) (princ-to-string (merge-pathnames filename system-path)))) 2020 - 11 -...
eb4a63ac455fa464e8bf842850487526d7f7518dc25b57df64434c539c7b332e
rvantonder/hack_parallel
marshal_tools.mli
* * Copyright ( c ) 2015 , Facebook , Inc. * All rights reserved . * * This source code is licensed under the BSD - style license found in the * LICENSE file in the root directory of this source tree . An additional grant * of patent rights can be found in the PATENTS file in the same directory . *...
null
https://raw.githubusercontent.com/rvantonder/hack_parallel/c9d0714785adc100345835c1989f7c657e01f629/src/utils/marshal_tools.mli
ocaml
* * Copyright ( c ) 2015 , Facebook , Inc. * All rights reserved . * * This source code is licensed under the BSD - style license found in the * LICENSE file in the root directory of this source tree . An additional grant * of patent rights can be found in the PATENTS file in the same directory . *...
56ca03452ca7fa4a2a4f3ef022e2283eabaa30380f5a102b72b11e99757bf009
lemmaandrew/CodingBatHaskell
allStar.hs
From Given a string , compute recursively a new string where all the adjacent chars are now separated by a " . Given a string, compute recursively a new string where all the adjacent chars are now separated by a \"*\". -} import Test.Hspec ( hspec, describe, it, shouldBe ) allStar :: String -> String allSt...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Recursion-1/allStar.hs
haskell
From Given a string , compute recursively a new string where all the adjacent chars are now separated by a " . Given a string, compute recursively a new string where all the adjacent chars are now separated by a \"*\". -} import Test.Hspec ( hspec, describe, it, shouldBe ) allStar :: String -> String allSt...
a7b319f6c0a2ad5352a23635374dca18b5556b8a2d2b268d2ce40ad19bed6dbd
samrushing/irken-compiler
scheduler.scm
;; -*- Mode: Irken -*- (require "doom/kqueue.scm") (require "doom/timeq.scm") ;; XXX there's a strong argument here for using vectors rather than a map for the pending events , since all unixen maintain a strict fd ;; limit (FD_SETSIZE). will revisit this for performance tuning. ;; [I'll probably try that when I...
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/doom/scheduler.scm
scheme
-*- Mode: Irken -*- XXX there's a strong argument here for using vectors rather than a limit (FD_SETSIZE). will revisit this for performance tuning. [I'll probably try that when I do epoll for linux] XXX we will need a priority queue. how many events are waiting? store the thread-id and current exc handler alo...
(require "doom/kqueue.scm") (require "doom/timeq.scm") map for the pending events , since all unixen maintain a strict fd for each EVFILT , we have separate map of ident=>continuation (define (make-poller) { kqfd = (kqueue/kqueue) runnable = (queue/make) filters = (make-vector EVFILT_SYSCOUNT (tree/...