_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
588a5710b36936d1869e79ac6e2271e5ad71e9df5e305d574f10292a3d2da026
swaroopch/isbnnetinclj2
mongo.clj
(ns isbnnetinclj2.mongo (:require [monger.core :as mg] [monger.collection :as mc] [monger.query :as mq] [monger.joda-time] [monger.json] [clj-time.core :as time] [isbnnetinclj2.utils :as utils])) (defn uri [] (or (System/getenv "MONGOLAB_UR...
null
https://raw.githubusercontent.com/swaroopch/isbnnetinclj2/c43d473926a7c0b20a0f98f0284a40fabc07f79c/src/isbnnetinclj2/mongo.clj
clojure
(ns isbnnetinclj2.mongo (:require [monger.core :as mg] [monger.collection :as mc] [monger.query :as mq] [monger.joda-time] [monger.json] [clj-time.core :as time] [isbnnetinclj2.utils :as utils])) (defn uri [] "mongodb:27017/isbnnetinclj...
ba296dc4f70ab25e9c29610fdc77d10f77620041360343b1998c8c2a18ede12a
haskellari/lattices
Lifted.hs
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Safe #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE TypeOperators ...
null
https://raw.githubusercontent.com/haskellari/lattices/4db00f12756d092805f3e9e2583065bb7aaa804f/src/Algebra/Lattice/Lifted.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveTraversable # # LANGUAGE FlexibleContexts # # LANGUAGE Safe # # LANGUAGE TypeOperators # -------------------------------------------------------------------------- | Module ...
# LANGUAGE DeriveGeneric # # LANGUAGE ScopedTypeVariables # Copyright : ( C ) 2010 - 2015 , 2015 - 2019 Maintainer : < > module Algebra.Lattice.Lifted ( Lifted(..) , retractLifted , foldLifted ) where import Prelude () import Prelude.Compat import Algebra.Lattice import Algebra.Pa...
673f633ce2b6851b08529f34b53b534f004ecd53d2831a9e31515b61c0867f46
gebi/jungerl
esmb_browser.erl
%%%------------------------------------------------------------------- %%% File : esmb_browser.erl Created : 18 Apr 2005 by < > Desc . : Browser server for Windows Networks . %%% $ Id$ %%%------------------------------------------------------------------- -module(esmb_browser). -behaviour(gen_server). ...
null
https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/esmb/src/esmb_browser.erl
erlang
------------------------------------------------------------------- File : esmb_browser.erl ------------------------------------------------------------------- External exports gen_server callbacks Our NetBIOS name Name Service socket fd Domain Master Local Master Host name Ip address A host comment ...
Created : 18 Apr 2005 by < > Desc . : Browser server for Windows Networks . $ Id$ -module(esmb_browser). -behaviour(gen_server). -export([start/0, start_link/0, get_workgroups/0, get_backup_list/0, get_members/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_chang...
00ec0b689e9ec032d601e3cacae11c21a8a0af73aab2a1a03e0da89866294d0c
fogfish/datum
m_identity.erl
%% Copyright 2016 , All Rights Reserved %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing...
null
https://raw.githubusercontent.com/fogfish/datum/f5e8f0b5deb8b74d6febe046333dbb4f38b086d8/src/monad/m_identity.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language g...
Copyright 2016 , All Rights Reserved Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(m_identity). -export([unit/1, fail/1, '>>='/2, putT/1, getT/1]). -type m(A) :: A. -type f(A, B) :: fun((A) -> m(B)). ...
ea85be71b263b18a86c77887b9226f99222c96e39cef71c8cc2694e3e40d6ec9
stedolan/malfunction
test.ml
open Malfunction open Malfunction_parser open Malfunction_interpreter exception ReifyFailure of string let rec reify = function | Block (n, xs) -> reify_block n xs | Vec (`Array, xs) -> reify_block 0 xs | Vec (`Bytevec, xs) -> let to_char = function | Int (`Int, n) when 0 <= Z.to_int n && Z.to_int n < 256 -> ...
null
https://raw.githubusercontent.com/stedolan/malfunction/eb69eb74802540f95cf89f7b490678eedca6a2f9/test/test.ml
ocaml
expected output had undefined behaviour or was a function testcase had undefined behaviour compiled executable failed to run or crashed, even though testcase had defined behaviour interpreter and compiler agree that testcase does not match expected output interpreter and compiler disagree whether testcase matc...
open Malfunction open Malfunction_parser open Malfunction_interpreter exception ReifyFailure of string let rec reify = function | Block (n, xs) -> reify_block n xs | Vec (`Array, xs) -> reify_block 0 xs | Vec (`Bytevec, xs) -> let to_char = function | Int (`Int, n) when 0 <= Z.to_int n && Z.to_int n < 256 -> ...
3dc311a84387e043ae0230ef2b9d36f524ef8cef4b5f0f8dcb93a98f7ed2eb68
jlollis/sicp-solutions
7B.scm
Lecture : 7B Lecturer : ;# SLIDE 0:13:50 (define pair-up (lambda (vars vals) (cond ((eq? vars '()) (cond ((eq? vals '()) '()) (else (error TMA)))) ((symbol? vars) (cons (cons vars vals) '())) ((eq? vals '()) (error TFA)) (else (cons (cons (car vars) (car vals)) ...
null
https://raw.githubusercontent.com/jlollis/sicp-solutions/7b03befcfe82e26a7fb28d94bc99292bc484f9dd/Supplemental%20Materials/mit-lectures/7B.scm
scheme
# SLIDE 0:13:50 # END SLIDE # BOARD 0:19:00 # END BOARD # END BOARD ! corrected (exit to expt) # END BOARD # END BOARD # END BOARD # END BOARD # SLIDE 0:27:15 # END SLIDE ! ! # END SLIDE # SLIDE 0:30:45 ! magic body env ! # END SLIDE # END SLIDE BREAK 0:39:45 if not the predicate, then take the consequent else, ...
Lecture : 7B Lecturer : (define pair-up (lambda (vars vals) (cond ((eq? vars '()) (cond ((eq? vals '()) '()) (else (error TMA)))) ((symbol? vars) (cons (cons vars vals) '())) ((eq? vals '()) (error TFA)) (else (cons (cons (car vars) (car vals)) (pair-up (cdr va...
a4a4ffa34be46e6a3075d3c1fb4c119497addf2ae72d2fcea9d9b69ddc73799a
thheller/shadow-cljsjs
lv.cljs
(ns cljsjs.moment.locale.lv (:require ["moment/locale/lv"]))
null
https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/moment/locale/lv.cljs
clojure
(ns cljsjs.moment.locale.lv (:require ["moment/locale/lv"]))
2ecef689c52c3decb9653bef358c7161f027d9217169b7def2afdb0032cc4fc4
zellio/incrementum
tests-1.9-req.scm
(add-tests-with-string-output "cons" [(fxadd1 0) => "1\n"] [(pair? (cons 1 2)) => "#t\n"] [(pair? 12) => "#f\n"] [(pair? #t) => "#f\n"] [(pair? #f) => "#f\n"] [(pair? ()) => "#f\n"] [(fixnum? (cons 12 43)) => "#f\n"] [(boolean? (cons 12 43)) => "#f\n"] [(null? (cons 12 43)) => "#f\n"] [(not (cons 1...
null
https://raw.githubusercontent.com/zellio/incrementum/12060fefdcc2883ffda38c9233a37aad6b20625e/test/scheme/tests-1.9-req.scm
scheme
[(let ([x #f]) (if (pair? #f) #f) x) => "#f\n"]
(add-tests-with-string-output "cons" [(fxadd1 0) => "1\n"] [(pair? (cons 1 2)) => "#t\n"] [(pair? 12) => "#f\n"] [(pair? #t) => "#f\n"] [(pair? #f) => "#f\n"] [(pair? ()) => "#f\n"] [(fixnum? (cons 12 43)) => "#f\n"] [(boolean? (cons 12 43)) => "#f\n"] [(null? (cons 12 43)) => "#f\n"] [(not (cons 1...
150f0080382dca54722ed3417cc05362b1b7355f47bfc5829d4de32d9de99a70
GaloisInc/saw-script
Util.hs
# LANGUAGE CPP # module SAWScript.AutoMatch.Util where import qualified Data.Set as Set import Data.Set (Set) import qualified Data.Map as Map import Data.Map (Map) import Data.Maybe import Data.List import Control.Monad (mfilter) import Control.Arrow ( (&&&) ) #if !MIN_VERSION_base(4,8,0) i...
null
https://raw.githubusercontent.com/GaloisInc/saw-script/46249dbc7bae5f48623a709b1df1cc1ea002d4c5/src/SAWScript/AutoMatch/Util.hs
haskell
Some project-specific utilities... | How to print out a single argument of a given type which occurs at a particular index | How to print out an index for an argument | The symbol we use for saying things correspond to each other between modules Some general utilities... | Like fromJust, but with an error message...
# LANGUAGE CPP # module SAWScript.AutoMatch.Util where import qualified Data.Set as Set import Data.Set (Set) import qualified Data.Map as Map import Data.Map (Map) import Data.Maybe import Data.List import Control.Monad (mfilter) import Control.Arrow ( (&&&) ) #if !MIN_VERSION_base(4,8,0) i...
73a29cc6353c533468b2f6e5a5fbf6fa7e436819177ea7fd1d694caaec019bb1
YoshikuniJujo/test_haskell
try-color.hs
# LANGUAGE BlockArguments # {-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -Wall -fno - warn - tabs # module Main where import Foreign.C.Types import Data.Foldable import Data.Maybe import Data.Color import Graphics.Cairo.Drawing.CairoT import Graphics.Cairo.Drawing.Paths import Graphics.Cairo.Surfaces.ImageSurfac...
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/90aaa3030e82a3c0e2ca6c1fb6c03602b9253baa/themes/gui/cairo/try-image-data/app/try-color.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE BlockArguments # # OPTIONS_GHC -Wall -fno - warn - tabs # module Main where import Foreign.C.Types import Data.Foldable import Data.Maybe import Data.Color import Graphics.Cairo.Drawing.CairoT import Graphics.Cairo.Drawing.Paths import Graphics.Cairo.Surfaces.ImageSurfaces import Graphics.Cairo.Values im...
1f3bb4f047a316e7b3693f4471c096b765005f9022c7f91b5c21b4dde5fcefdb
jepst/CloudHaskell
MakeData.hs
module Main where import System.Random (randomR,getStdRandom) import System.Environment import KMeansCommon import Data.Binary import System.IO import Data.Array.Unboxed import qualified Data.ByteString.Lazy as B vectorsPerFile = 80000 -- should be 80000 numClusters = 10 vectorDimensions = KMeansCommon.vectorSize ...
null
https://raw.githubusercontent.com/jepst/CloudHaskell/6acbcb6b2fc6bb6789cce2083cdd4747ef427627/examples/kmeans/MakeData.hs
haskell
should be 80000
module Main where import System.Random (randomR,getStdRandom) import System.Environment import KMeansCommon import Data.Binary import System.IO import Data.Array.Unboxed import qualified Data.ByteString.Lazy as B numClusters = 10 vectorDimensions = KMeansCommon.vectorSize minValue = -1.0 maxValue = 1.0 val = getStd...
6aa2417c2dac368235545d0f3a58a181ba401ad720d086f05be7406d4a1dff86
obsidiansystems/rhyolite
Groundhog.hs
{-# Language DeriveGeneric #-} {-# Language GADTs #-} {-# Language QuasiQuotes #-} {-# Language TemplateHaskell #-} {-# Language TypeFamilies #-} # OPTIONS_GHC -Wno - orphans # module Rhyolite.Task.Groundhog where import Data.Aeson import Data.Text import Database.Groundhog.TH import GHC.Generics import Rhyolite.DB.G...
null
https://raw.githubusercontent.com/obsidiansystems/rhyolite/487b8732b0b8b754897b7490958d38332be7c312/groundhog-legacy/groundhog-legacy/src/Rhyolite/Task/Groundhog.hs
haskell
# Language DeriveGeneric # # Language GADTs # # Language QuasiQuotes # # Language TemplateHaskell # # Language TypeFamilies # | A value in the database whose presence indicates that some external work should be performed. The work will produce a value of type 'a' The backend node that has checked out this task --TO...
# OPTIONS_GHC -Wno - orphans # module Rhyolite.Task.Groundhog where import Data.Aeson import Data.Text import Database.Groundhog.TH import GHC.Generics import Rhyolite.DB.Groundhog.TH data Task a = Task { _task_result :: !(Maybe a) } deriving (Show, Read, Eq, Ord, Generic) instance ToJSON a => ToJSON (Task a)...
88b821173cd7ead9e056f5144f54738e5ba9c328b34de182e9026d2dad454151
racket/racklog
says.rkt
#lang racklog tpme(tpme1). ms(m1,'TPME',tpme1,ek,tp). says(TPME,M) :- tpme(TPME),ms(M,'TPME',TPME,A,B). says(A,B)?
null
https://raw.githubusercontent.com/racket/racklog/89e983ec7d2df0ed919e6630403b0f4d0393728e/tests/lang/says.rkt
racket
#lang racklog tpme(tpme1). ms(m1,'TPME',tpme1,ek,tp). says(TPME,M) :- tpme(TPME),ms(M,'TPME',TPME,A,B). says(A,B)?
dda6b76a22a2f487de387390232cb730670add411168cace36f104716478bdd4
alvatar/spheres
c-define-sizeof#.scm
;;! Build a size-of value equivalent to the C operator ;; c-build-sizeof float -> sizeof-float (define-macro (c-define-sizeof scheme-type . rest) (let ((c-type (%%get-key-arg rest c-type: (symbol->string scheme-type)))) `(define ,(string->symbol (string-append (symbol->string scheme-type) "-size")) ((c-lam...
null
https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/gambit/ffi/c-define-sizeof%23.scm
scheme
! Build a size-of value equivalent to the C operator c-build-sizeof float -> sizeof-float
(define-macro (c-define-sizeof scheme-type . rest) (let ((c-type (%%get-key-arg rest c-type: (symbol->string scheme-type)))) `(define ,(string->symbol (string-append (symbol->string scheme-type) "-size")) ((c-lambda () size-t ,(string-append "___result = sizeof(" c-type ");"))))))
9ca2cf20dcddea84920942eed309b78968a03c88c5855690a255fddac576a310
Ejhfast/Proof-Search
ProofTest.hs
module ProofTest where import List import ProofSearch import ProofParse import ProofTypes import ProofFuncs import System.Timeout import Control.Monad import Text.ParserCombinators.Parsec import Text.ParserCombinators.Parsec.Expr iter : : Int - > [ Ruleset String ] - > [ Ruleset String ] - > [ Expr String ] - > [ ...
null
https://raw.githubusercontent.com/Ejhfast/Proof-Search/45557c7ffb0337a414fb6b0be07610abb96c2551/ProofTest.hs
haskell
Look backward once with frees Generate one layer back from conclusion Look forward with frees Generate one layer forward from assumptions Look backward once with frees Generate one layer back from conclusion Look forward with frees Generate one layer forward from assumptions Look backward once with frees ...
module ProofTest where import List import ProofSearch import ProofParse import ProofTypes import ProofFuncs import System.Timeout import Control.Monad import Text.ParserCombinators.Parsec import Text.ParserCombinators.Parsec.Expr iter : : Int - > [ Ruleset String ] - > [ Ruleset String ] - > [ Expr String ] - > [ ...
17c154f18bbd4fff8ea93a3987d631158725c93896648aa6bfdd255f77471c3f
typedclojure/typedclojure
conduit.clj
(ns clojure.core.typed.test.conduit (:import (clojure.lang Seqable IMeta IPersistentMap LazySeq ISeq)) (:require [clojure.core.typed :as t :refer [check-ns ann defalias tc-ignore ann-form declare-names inst print-env inst-ctor cf declare-alias-kind]] [clojure.repl :refe...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/1b3c9ef6786a792ae991c438ea8dca31175aa4a7/typed/clj.checker/test/clojure/core/typed/test/conduit.clj
clojure
stream is closed abort/skip consume/continue `when` added to conform to Cont type - Ambrose added - Ambrose :a-loop ALoopCtor apply p to position n in passed pair select a value a-loop (ann-form (fn ([p initial-value] (loop-fn p initial-value)) ([p initial-valu...
(ns clojure.core.typed.test.conduit (:import (clojure.lang Seqable IMeta IPersistentMap LazySeq ISeq)) (:require [clojure.core.typed :as t :refer [check-ns ann defalias tc-ignore ann-form declare-names inst print-env inst-ctor cf declare-alias-kind]] [clojure.repl :refe...
50e72394cb7c09e8cef665cfbe078081ea202b4adb0ad7729b447b7dd6373c8b
nextjournal/viewers
localstorage.cljs
(ns nextjournal.ui.components.localstorage) (defn set-item! [key val] (.setItem (.-localStorage js/window) key val)) (defn get-item [key] (cljs.reader/read-string (.getItem (.-localStorage js/window) key))) (defn remove-item! "Remove the browser's localStorage value for the given `key`" [key] (.removeIte...
null
https://raw.githubusercontent.com/nextjournal/viewers/018ceae2c6c0730f2b3a7beb3121894a411077d5/modules/ui/src/nextjournal/ui/components/localstorage.cljs
clojure
(ns nextjournal.ui.components.localstorage) (defn set-item! [key val] (.setItem (.-localStorage js/window) key val)) (defn get-item [key] (cljs.reader/read-string (.getItem (.-localStorage js/window) key))) (defn remove-item! "Remove the browser's localStorage value for the given `key`" [key] (.removeIte...
f754bde836cdcb6e4126006de642527d404e5886d3293dd631963240beb69b22
juspay/euler-hs
Interpreter.hs
# OPTIONS_GHC -Werror -Wno - redundant - constraints # module EulerHS.Framework.Flow.Interpreter ( -- * Flow Interpreter runFlow , runFlow' ) where import Control.Exception (throwIO) import qualified Control.Exception as Exception import qualified Data.ByteString as Strict import qualified Data.By...
null
https://raw.githubusercontent.com/juspay/euler-hs/0fdda6ef43c1a6c9c7221d7c194c278e375b9936/src/EulerHS/Framework/Flow/Interpreter.hs
haskell
* Flow Interpreter requests TODO: Respect "Content-Transfer-Encoding" header | Set timeout in microseconds | Utility function to translate http-client HTTP responses back to HttpAPI responses TODO: Look up encoding and use some thread-safe unicode package to decode headers let encoding | Utility functio...
# OPTIONS_GHC -Werror -Wno - redundant - constraints # module EulerHS.Framework.Flow.Interpreter runFlow , runFlow' ) where import Control.Exception (throwIO) import qualified Control.Exception as Exception import qualified Data.ByteString as Strict import qualified Data.ByteString.Lazy as Lazy impo...
08916466d3e24ff6fd704cefad283d43205b5839232da7e17f490bc2bfec30fe
opencog/learn
common.scm
; ; common.scm ; ; Common functions shared between multpile functional units. ; Copyright ( c ) 2017 Linas Vepstas ; ; --------------------------------------------------------------------- ; (use-modules (srfi srfi-1)) (use-modules (opencog) (opencog persist)) XXX TODO FIXME All users of the three functions below ...
null
https://raw.githubusercontent.com/opencog/learn/0ceaaadc5e8f3129272c10b4f4399877058e2100/scm/common.scm
scheme
common.scm Common functions shared between multpile functional units. --------------------------------------------------------------------- converted into users of the add-count-api, add-storage-count and deprecated/obsolete. --------------------------------------------------------------------- ------------...
Copyright ( c ) 2017 Linas Vepstas (use-modules (srfi srfi-1)) (use-modules (opencog) (opencog persist)) XXX TODO FIXME All users of the three functions below need to be add - marginal - count API 's . The three functions below are get - count ATOM - return the raw observational count on ATOM . (define-public...
914ae29e526c15813bd048f8eea63eee93257c4fcf1fbd28bfb39a5e28db505f
ppaml-op3/insomnia
InsomniaProvider.hs
{-# LANGUAGE DeriveDataTypeable #-} module InsomniaProvider (testInsomnia) where import qualified Control.Exception as Exn import Data.Typeable (Typeable) import Data.Tagged (Tagged(..)) import qualified System.IO as IO import qualified System.IO.Temp as IOTemp import qualified System.Exit as ExitCode import qualif...
null
https://raw.githubusercontent.com/ppaml-op3/insomnia/5fc6eb1d554e8853d2fc929a957c7edce9e8867d/tests/InsomniaProvider.hs
haskell
# LANGUAGE DeriveDataTypeable # TODO: make this configurable on a per-test basis
module InsomniaProvider (testInsomnia) where import qualified Control.Exception as Exn import Data.Typeable (Typeable) import Data.Tagged (Tagged(..)) import qualified System.IO as IO import qualified System.IO.Temp as IOTemp import qualified System.Exit as ExitCode import qualified Insomnia.Main as Insomnia impor...
12526062ce16b6b4bcba70b566a9a496d217688bae4ed539a08bd338036e09f0
jabber-at/ejabberd
ejabberd_http.erl
%%%---------------------------------------------------------------------- File : Author : < > %%% Purpose : Created : 27 Feb 2004 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne %%% %%% This program is free software; you can redistribute it and/or modify it under the terms of ...
null
https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/ejabberd_http.erl
erlang
---------------------------------------------------------------------- Purpose : This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warra...
File : Author : < > Created : 27 Feb 2004 by < > ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public Li...
4023d5ce36edaf076e6e277d7d67fc0060681d6dd61230089e800e09ebbae9c6
umber-lang/umber
uchar.mli
open Core include module type of Uchar include Comparable.S with type t := t exception Malformed val add_to_buffer : Buffer.t -> t -> unit val of_gen_exn : char Gen.t -> t option val to_string : t -> string val of_string_exn : string -> t val to_int : t -> int
null
https://raw.githubusercontent.com/umber-lang/umber/407dff05da5ec771d8ff91a057ad7dfc73a341a3/src/uchar.mli
ocaml
open Core include module type of Uchar include Comparable.S with type t := t exception Malformed val add_to_buffer : Buffer.t -> t -> unit val of_gen_exn : char Gen.t -> t option val to_string : t -> string val of_string_exn : string -> t val to_int : t -> int
4af6d9ad09174e083cab0337116d6ee6e4d45fa80cee65e56bc1ac7c29530db4
rtoy/cmucl
sap.lisp
;;; -*- Package: VM; Log: C.Log -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; (ext:file-comment "$Header: src/compiler/alpha/sap.lisp $")...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/alpha/sap.lisp
lisp
-*- Package: VM; Log: C.Log -*- ********************************************************************** ********************************************************************** Moves and coercions: Move untagged sap values. Move untagged sap arguments/return-values. Use standard MOVE-ARGUMENT + coerci...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . (ext:file-comment "$Header: src/compiler/alpha/sap.lisp $") This file contains the Alpha VM definition of SAP operations . Written by . Alpha conversion by . (in-pac...
ca25b0ec0ce26e9a4944fbbe845b277bec1c930e28b79a860f615309d8278297
sile/logi
logi_context.erl
2014 - 2016 < > %% %% @doc Log Message Context %% @end -module(logi_context). %%---------------------------------------------------------------------------------------------------------------------- %% Exported API %%------------------------------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/sile/logi/1022fbc238a7d18765fe864a7174958142160ee8/src/logi_context.erl
erlang
@doc Log Message Context @end ---------------------------------------------------------------------------------------------------------------------- Exported API ---------------------------------------------------------------------------------------------------------------------- -----------------------------------...
2014 - 2016 < > -module(logi_context). -export([new/2, new/6, unsafe_new/6]). -export([is_context/1]). -export([to_map/1, from_map/1]). -export([get_channel/1, get_timestamp/1, get_severity/1, get_location/1, get_headers/1, get_metadata/1]). -export_type([context/0]). -export_type([map_form/0]). Macros & Rec...
2cf27b366e9c59b94a6559945e0cb40a3fdd0be38e8f0f4c04c01ce201af9321
camllight/camllight
bool.mli
Boolean operations value prefix & : bool -> bool -> bool = 2 "sequand";; value prefix && : bool -> bool -> bool = 2 "sequand";; value prefix or : bool -> bool -> bool = 2 "sequor";; value prefix || : bool -> bool -> bool = 2 "sequor";; (* The boolean and is written [e1 & e2] or [e1 && e2]. The bo...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/src/lib/bool.mli
ocaml
The boolean and is written [e1 & e2] or [e1 && e2]. The boolean or is written [e1 or e2] or [e1 || e2]. Both constructs are sequential, left-to-right: [e2] is evaluated only if needed. Actually, [e1 & e2] is equivalent to [if e1 then e2 else false], and ...
Boolean operations value prefix & : bool -> bool -> bool = 2 "sequand";; value prefix && : bool -> bool -> bool = 2 "sequand";; value prefix or : bool -> bool -> bool = 2 "sequor";; value prefix || : bool -> bool -> bool = 2 "sequor";; value prefix not : bool -> bool = 1 "not" ;; value string_of_bool : bool -> str...
5fec2b9a80b77c4e5b011b0f8c4e7977ec6889a9ea1b05de85ab4c514bab12e1
ghc/packages-Cabal
ExecutablePath.hs
# LANGUAGE ForeignFunctionInterface # # LANGUAGE CPP # Copied verbatim from base-4.6.0.0 . We ca n't simply import -- System.Environment.getExecutablePath because we need compatibility with older -- GHCs. module Distribution.Client.Compat.ExecutablePath ( getExecutablePath ) where import Prelude -- The imports ar...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-install/Distribution/Client/Compat/ExecutablePath.hs
haskell
System.Environment.getExecutablePath because we need compatibility with older GHCs. The imports are purposely kept completely disjoint to prevent edits The exported function is defined outside any if-guard to make sure every OS implements it with the same type. | Returns the absolute pathname of the current execu...
# LANGUAGE ForeignFunctionInterface # # LANGUAGE CPP # Copied verbatim from base-4.6.0.0 . We ca n't simply import module Distribution.Client.Compat.ExecutablePath ( getExecutablePath ) where import Prelude to one OS implementation from breaking another . #if defined(darwin_HOST_OS) import Data.Word import For...
678dfc2e908e3883f9babadd7580407ce2d101a5cdb0e8504cf5fdaa8933abee
OlivierSohn/hamazed
Jitter.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # module Test.Imj.Jitter ( testThreadDelay ) where import Prelude(print, putStrLn, unlines) import Imj.Prelude import Control.Concurrent(threadDelay, yield) import Imj.Timing impo...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-game-synths/test/Test/Imj/Jitter.hs
haskell
# LANGUAGE OverloadedStrings # verifies 'threadDelay' contract: "There is no guarantee that the thread will be rescheduled promptly when the delay has expired, but the thread will never continue to run earlier than specified." checking if "we are done waiting yet" : checking if "we are done waiting yet" :
# LANGUAGE NoImplicitPrelude # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # module Test.Imj.Jitter ( testThreadDelay ) where import Prelude(print, putStrLn, unlines) import Imj.Prelude import Control.Concurrent(threadDelay, yield) import Imj.Timing import Imj.Statistics | Results for ...
8b098a7531f008a6a5a8ac3a0b1dc4afd325c37be5e01452e56971882db3507e
psholtz/MIT-SICP
exercise2-05.scm
;; Exercise 2.5 ;; ;; Show that we can represent pairs of nonnegative integers using only numbers and arithmetic operations if we represent the pair a and b as the integer that is the product 2^a*3^b . Give the corresponding ;; definitions of the procedures cons, car and cdr. ;; ;; ;; Definition for the cons proc...
null
https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-2.1/mit-scheme/exercise2-05.scm
scheme
Show that we can represent pairs of nonnegative integers using only numbers and arithmetic operations definitions of the procedures cons, car and cdr. Definition for the cons procedure: The definitions for car and cdr can be given either as recursive or iterative processes. The following procedures ge...
Exercise 2.5 if we represent the pair a and b as the integer that is the product 2^a*3^b . Give the corresponding (define (cons a b) (* (expt 2 a) (expt 3 b))) (define (car n) (if (= (remainder n 2) 0) (+ 1 (car (/ n 2))) 0)) (define (cdr n) (if (= (remainder n 3) 0) (+ 1 (cdr (/ n 3))) ...
d6d607ca242ff55c3b96493f5006dda3c60c0bc02cb7372dec856abf3bb165b1
lspitzner/exference
Typeable.hs
module Data.Typeable where data TypeRep instance Data.Eq.Eq TypeRep instance Data.Ord.Ord TypeRep instance Text.Show.Show TypeRep class Typeable a where typeOf :: forall a. Typeable a => a -> TypeRep typeOf1 :: forall t a. Typeable t => t a -> TypeRep typeOf2 :: forall t a b. Typeable t => t a b -> TypeRep typeO...
null
https://raw.githubusercontent.com/lspitzner/exference/d8a336f8b9df905e54173339f78ba892daa3f688/environment/Typeable.hs
haskell
module Data.Typeable where data TypeRep instance Data.Eq.Eq TypeRep instance Data.Ord.Ord TypeRep instance Text.Show.Show TypeRep class Typeable a where typeOf :: forall a. Typeable a => a -> TypeRep typeOf1 :: forall t a. Typeable t => t a -> TypeRep typeOf2 :: forall t a b. Typeable t => t a b -> TypeRep typeO...
05e37b7000da562f03bad919e3f001a75bb51853b5c25a9b580307d4f7f370cd
camlp5/camlp5
asttools.ml
(* camlp5r *) (* asttools.ml,v *) Copyright ( c ) INRIA 2007 - 2017 (* #load "q_MLast.cmo" *) let fst3 (a, b, c) = a;; let snd3 (a, b, c) = b;; let third3 (a, b, c) = c;; let prefix_eq s0 s1 = let s0len = String.length s0 in s0len <= String.length s1 && s0 = String.sub s1 0 s0len ;; type ('a, 'b) choice = ...
null
https://raw.githubusercontent.com/camlp5/camlp5/9e8155f8ae5a584bbb4ad96d10d6fec63ed8204c/ocaml_src/main/asttools.ml
ocaml
camlp5r asttools.ml,v #load "q_MLast.cmo"
Copyright ( c ) INRIA 2007 - 2017 let fst3 (a, b, c) = a;; let snd3 (a, b, c) = b;; let third3 (a, b, c) = c;; let prefix_eq s0 s1 = let s0len = String.length s0 in s0len <= String.length s1 && s0 = String.sub s1 0 s0len ;; type ('a, 'b) choice = Left of 'a | Right of 'b ;; let isLeft = function ...
dc779e9c26410822413bd1215bf291a9fe332f8c480fcc59e7baacb14a269e2c
alekcz/pcp
index.clj
(require '[pcp :as pcp]) (pcp/response 200 (apply + (range 51)) "text/plain")
null
https://raw.githubusercontent.com/alekcz/pcp/0fd1860f9f5d2aa3a03473cc820c5662d7a46780/test-resources/index.clj
clojure
(require '[pcp :as pcp]) (pcp/response 200 (apply + (range 51)) "text/plain")
0b8951cfb8936a50e8a17f78453ddf27f46a650c87599cf74d502cc5a7ab0f6e
zadean/xqerl
prod_DirElemContent_SUITE.erl
-module('prod_DirElemContent_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['Constr-cont-invalid-1'/1]). -export(['Constr-cont-invalid-2'/1]). -export(...
null
https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/prod/prod_DirElemContent_SUITE.erl
erlang
-module('prod_DirElemContent_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['Constr-cont-invalid-1'/1]). -export(['Constr-cont-invalid-2'/1]). -export(...
3338c39ff4e966058bebeac412a16c11bd0cf470905cd8ad2046d017ebf3cf23
samrocketman/home
likins-glow.scm
; ; The GIMP -- an image manipulation program Copyright ( C ) 1995 and ; Selection glow script for GIMP 2.4 Copyright ( c ) 1997 ; ; ; Tags: glow, selection, effect ; ; Author statement: ; Makes a "glow" around the outside of the current selection ; ; ----------------------------------------------------...
null
https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/likins-glow.scm
scheme
The GIMP -- an image manipulation program Tags: glow, selection, effect Author statement: Makes a "glow" around the outside of the current selection -------------------------------------------------------------------- -------------------------------------------------------------------- - Changelog - ...
Copyright ( C ) 1995 and Selection glow script for GIMP 2.4 Copyright ( c ) 1997 Distributed by Gimp FX Foundry project Changed on June 15 , 2000 by < > Updated for GIMP 1.1.26 Changed on January 29 , 2004 by < > Updated for GIMP 2.0pre3 it under the terms of the GNU General Public Licen...
1b362178c0c9fc36b7706356eadecbfa51f4d54427856bfc0ba5296347604d50
madgen/vanillalog
Main.hs
# LANGUAGE DataKinds # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # module Main where import Protolude hiding (pred) import qualified Data.ByteString.Lazy.Char8 as BS import Data.Aeson (toEncodingList) import Data.Aeson.Encoding (encodingToLazyByteString)...
null
https://raw.githubusercontent.com/madgen/vanillalog/07317814120e1a46a2abe3b65f2909a0e29fb066/app/Main.hs
haskell
Interpret it as a query
# LANGUAGE DataKinds # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # module Main where import Protolude hiding (pred) import qualified Data.ByteString.Lazy.Char8 as BS import Data.Aeson (toEncodingList) import Data.Aeson.Encoding (encodingToLazyByteString)...
edbf27a678dbe6d3f6ed01d76748ef89375ef9968c669169e392784dbb47e468
overtone/overtone
mad2.clj
(ns overtone.examples.notation.mad2 {:clj-kondo/config '{:linters {:unresolved-symbol {:level :off}}}} (:use overtone.live overtone.inst.synth)) (definst tone [note 60 amp 0.3 dur 0.4] (let [snd (sin-osc (midicps note)) env (env-gen (perc 0.01 dur) :action FREE)] (* env snd amp))) (defn defp...
null
https://raw.githubusercontent.com/overtone/overtone/9afb513297662716860a4010bc76a0e73c65ca37/src/overtone/examples/notation/mad2.clj
clojure
(numerator t-sig) (play tone pitches metro) (stop)
(ns overtone.examples.notation.mad2 {:clj-kondo/config '{:linters {:unresolved-symbol {:level :off}}}} (:use overtone.live overtone.inst.synth)) (definst tone [note 60 amp 0.3 dur 0.4] (let [snd (sin-osc (midicps note)) env (env-gen (perc 0.01 dur) :action FREE)] (* env snd amp))) (defn defp...
f50999c59cfbcb3f61e2b2429e7adb15d21c7000d01ca7c3e91684e4ca7d756d
LaurentMazare/npy-ocaml
test.ml
let verbose = false Saves a npy file and reread it checking that the read content is identical . let save_and_read ?header_len (type a b) (array : (a, b, Bigarray.c_layout) Bigarray.Genarray.t) filename = Npy.write ?header_len array filename; let (Npy.P rarray) = Npy.read_mmap filename ~shared:...
null
https://raw.githubusercontent.com/LaurentMazare/npy-ocaml/e37dddf5130b848d501fbef9fc7b6c49da542de3/tests/test.ml
ocaml
let verbose = false Saves a npy file and reread it checking that the read content is identical . let save_and_read ?header_len (type a b) (array : (a, b, Bigarray.c_layout) Bigarray.Genarray.t) filename = Npy.write ?header_len array filename; let (Npy.P rarray) = Npy.read_mmap filename ~shared:...
091c9324f1bf487dc4cd66c5fc406f52ad281c82d8a42932402e45efdcfdb792
stepcut/plugins
Main.hs
import System.Plugins import API conf = "../Mailrc.conf" stub = "../Mailrc.stub" apipath = "../api" main = do status <- makeWith conf stub ["-i"++apipath] o <- case status of MakeFailure e -> mapM_ putStrLn e >> error "failed" MakeSuccess _ o -> return o ...
null
https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/conf/simple/prog/Main.hs
haskell
import System.Plugins import API conf = "../Mailrc.conf" stub = "../Mailrc.stub" apipath = "../api" main = do status <- makeWith conf stub ["-i"++apipath] o <- case status of MakeFailure e -> mapM_ putStrLn e >> error "failed" MakeSuccess _ o -> return o ...
ae6a691f6bbd7dde6e898f40bff4c085abf95a46acd9687197924480ea58d672
facebook/duckling
Rules.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Quantity.RU.Rules ( rules ) w...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Quantity/RU/Rules.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Quantity.RU.Rules ( rules ) where import Data.String import Data.Text (Text) import Prelude import qualified Data.Text as Text import Duckling.Dimensions.Types import Duckling.Numeral.Helpers import Duckling.Quantity.Helpers import Duckling.Reg...
ffcd50fddb8b713569b9d7dd0dc34485e63785a4fc725114abb736f68ec48b50
arianvp/generics-mrsop-diff
Diff3.hs
{-# LANGUAGE GADTs #-} # LANGUAGE StandaloneDeriving # # LANGUAGE PatternSynonyms # # LANGUAGE TypeOperators # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE DataKinds # ...
null
https://raw.githubusercontent.com/arianvp/generics-mrsop-diff/242f90dfbe7c99e12d374832811d970868845e7c/src/Generics/MRSOP/GraphViz/Diff3.hs
haskell
# LANGUAGE GADTs # # LANGUAGE TypeSynonymInstances # Easy case Edge from il to spine' TODO we might wanna return a portId here so that we can actually point to the zipper nicely Some state that we keep track off for visualization NOTE: we ignore deletions by doing an elimNPM and calling visualizeDeep NOTE: we ...
# LANGUAGE StandaloneDeriving # # LANGUAGE PatternSynonyms # # LANGUAGE TypeOperators # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE DataKinds # # LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables ...
c754b3b87077854bd060c6819edd40705268efdb7d01b8bc12ee595f8cb7a062
hiroshi-unno/coar
solver.ml
open Core open Common open Common.Ext open Ast open Ast.LogicOld module type SolverType = sig val solve: ?print_sol:bool -> PCSP.Problem.t -> PCSP.Problem.solution Or_error.t end module Make (Cfg: Config.ConfigType): SolverType = struct let config = Cfg.config module Debug = Debug.Make (val Debug.Config.(if con...
null
https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/Hoice/solver.ml
ocaml
* ToDo: return a solution set params make smt string
open Core open Common open Common.Ext open Ast open Ast.LogicOld module type SolverType = sig val solve: ?print_sol:bool -> PCSP.Problem.t -> PCSP.Problem.solution Or_error.t end module Make (Cfg: Config.ConfigType): SolverType = struct let config = Cfg.config module Debug = Debug.Make (val Debug.Config.(if con...
4fd4cca787695d04e59a18bcc580940d48f9c12b8b401aab1a18082ca72e0d43
ocaml-flambda/ocaml-jst
gpr1506.ml
(* TEST * expect *) type t = A [%%expect{| type t = A |}] module M = struct open struct type t' = t end type t = B of t * t' | C end [%%expect{| module M : sig type t = B of t/1 * t/2 | C end |}] (* test *) include struct open M let test = B (B (C, A), A) end [%%expect{| val test : M.t = M.B (M.B (M.C...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/b0a649516b33b83b7290c6fa5d7cb4c8c343df8c/testsuite/tests/generalized-open/gpr1506.ml
ocaml
TEST * expect test It was decided to not allow this anymore. It was decided to not allow this anymore. It was decided to not allow this anymore. module type S = sig open struct type t = int open struct type s = T | A of t end val x : char end val y : t end [%%expect{| module ty...
type t = A [%%expect{| type t = A |}] module M = struct open struct type t' = t end type t = B of t * t' | C end [%%expect{| module M : sig type t = B of t/1 * t/2 | C end |}] include struct open M let test = B (B (C, A), A) end [%%expect{| val test : M.t = M.B (M.B (M.C, A), A) |}] include struct ope...
6c4074dd2a826c0b7493dad58aac3d55da71564f9d4756e8904d3c2ed037aca6
DHSProgram/DHS-Indicators-SPSS
!AMmain.sps
* Encoding: UTF-8. ******************************************************************************** Program: AMmain.sps Purpose: Main file for the Adult Mortality Chapter The main file will call other do files that will produce the AM indicators and produce tables Data outputs: ...
null
https://raw.githubusercontent.com/DHSProgram/DHS-Indicators-SPSS/5de4f2b032646a99fe144a1adeaf09a82d8026a6/Chap16_AM/!AMmain.sps
scheme
* Encoding: UTF-8. ******************************************************************************** Program: AMmain.sps Purpose: Main file for the Adult Mortality Chapter The main file will call other do files that will produce the AM indicators and produce tables Data outputs: ...
2b451cf6103eb3d0ca25173fcd773e5435dfd310731655b556951deb671e91ee
psg-mit/probzelus-haskell
SymbolicDistr.hs
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE FlexibleContexts # module SymbolicDistr where import Control.Monad (replicateM) import Control.Monad.Bayes.Class (MonadSample) import Data.Proxy (Proxy (Proxy)) import GHC.TypeNats (KnownNat) import Numeric.LinearAlgebra.Static (R, Sym, L) import Delay...
null
https://raw.githubusercontent.com/psg-mit/probzelus-haskell/a4b66631451b6156938a9c5420cfff2999ecbbc6/haskell/src/SymbolicDistr.hs
haskell
Score should not modify the heap, but currently we do not enforce this
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE FlexibleContexts # module SymbolicDistr where import Control.Monad (replicateM) import Control.Monad.Bayes.Class (MonadSample) import Data.Proxy (Proxy (Proxy)) import GHC.TypeNats (KnownNat) import Numeric.LinearAlgebra.Static (R, Sym, L) import Delay...
0de00da17a3d2837b392c6d6d2a9b08040ee1755fc5cba018a7f672cef260521
lojic/LearningRacket
list-ops.rkt
#lang racket (provide append concat count filter map reduce reduce-r reverse) (define (count list) (let loop ([list list] [n 0]) (if (null? list) n (loop (cdr list) (+ n 1))))) (define (reverse list) (let loop ([list list] [acc '()]) (if (null? list) acc (loop (cdr list) ...
null
https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/exercism.io/list-ops/list-ops.rkt
racket
#lang racket (provide append concat count filter map reduce reduce-r reverse) (define (count list) (let loop ([list list] [n 0]) (if (null? list) n (loop (cdr list) (+ n 1))))) (define (reverse list) (let loop ([list list] [acc '()]) (if (null? list) acc (loop (cdr list) ...
2434847df2c6a49cd89d247fcc171e618a569b668ccc88aa26f7730b7449da49
zenspider/schemers
exercise.4.42.scm
#!/usr/bin/env csi -s (require rackunit) (use amb amb-extras) Exercise 4.42 Solve the following " Liars " puzzle ( from Phillips 1934 ): ;; Five schoolgirls sat for an examination . Their parents -- so they ;; thought--showed an undue degree of interest in the result. They ;; therefore agreed that, in writing ...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_4/exercise.4.42.scm
scheme
thought--showed an undue degree of interest in the result. They therefore agreed that, in writing home about the examination, each following are the relevant passages from their letters:
#!/usr/bin/env csi -s (require rackunit) (use amb amb-extras) Exercise 4.42 Solve the following " Liars " puzzle ( from Phillips 1934 ): Five schoolgirls sat for an examination . Their parents -- so they girl should make one true statement and one untrue one . The * : " was second in the examination ....
f89f1d94c736307d7425123e580a14917e753f1a38e2c9a1d96ad58a1f58f1c1
newque/newque
write_settings.ml
open Core type ack = | Instant | Saved type json_validation = { schema_name: string; parallelism_threshold: int; } type scripting = { mappers: string array; } type batching = { max_time: float; max_size: int; } type t = { http_format: Http_format.t; ack: ack; forward: string list; json_valida...
null
https://raw.githubusercontent.com/newque/newque/dee73e2cb7be8700847f9e5cf900731cc20b1b8c/src/channel/write_settings.ml
ocaml
open Core type ack = | Instant | Saved type json_validation = { schema_name: string; parallelism_threshold: int; } type scripting = { mappers: string array; } type batching = { max_time: float; max_size: int; } type t = { http_format: Http_format.t; ack: ack; forward: string list; json_valida...
1bc102f6054d2393a3f5e964f126102d3174c8efe79e22aad3bd6d8dcdf24211
eiri/grass
grass.erl
WorkDir = os : cmd("mktemp -d /tmp / grass . XXXXXX"),%% @doc is a toy graph database with as a backend . %% @version 0.1 < a href=" / eiri / grass"> / eiri / grass</a > @author < > 2012 @todo Make it compatable with < a href=" / tinkerpop">Tinkerpop</a > -module(grass). -author('Vitaliy Avdeyev <>...
null
https://raw.githubusercontent.com/eiri/grass/874f05c5e92f93611170fbab632dc9ff597d9150/src/grass.erl
erlang
@doc is a toy graph database with as a backend . @version 0.1 pub API stats, example & pick-inside functions behaviours callbacks API @doc Shows list of available graphs. This function not only drops all the verticies on the graph, but also removes graph's directory and shutting down graph's server. I...
< a href=" / eiri / grass"> / eiri / grass</a > @author < > 2012 @todo Make it compatable with < a href=" / tinkerpop">Tinkerpop</a > -module(grass). -author('Vitaliy Avdeyev <>'). -behaviour(application). -behaviour(supervisor). -define(SUPER(M), {M, {M, start_link, []}, permanent, 5000, supervisor,...
5904c302dc53ed3d153a95a5d324cef181d15a5af05d411372e7261a6daf728f
haskell-opengl/OpenGLRaw
F05.hs
{-# OPTIONS_HADDOCK hide #-} -------------------------------------------------------------------------------- -- | Module : Graphics . GL.Functions . F05 Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- -- Raw functions ...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/Functions/F05.hs
haskell
# OPTIONS_HADDOCK hide # ------------------------------------------------------------------------------ | License : BSD3 Stability : stable Portability : portable Raw functions from the </ OpenGL registry>. ------------------------------------------------------------------------------ ----------------...
Module : Graphics . GL.Functions . F05 Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.Functions.F05 ( glCopyTextureLevelsAPPLE, glCopyTextureSubImage1D, glCopyTextureSubImage1DEXT, glCopyTextureSubImage2D, glCopyTextureSubImage2DEXT, glCopyTextureSubImage3D, glCopy...
bb30a2d83b7b3344d10a9efcf1f20da07851777a8ec86701297dbf2f9539a274
nikita-volkov/rerebase
Util.hs
module Data.Vector.Fusion.Util ( module Rebase.Data.Vector.Fusion.Util ) where import Rebase.Data.Vector.Fusion.Util
null
https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/Vector/Fusion/Util.hs
haskell
module Data.Vector.Fusion.Util ( module Rebase.Data.Vector.Fusion.Util ) where import Rebase.Data.Vector.Fusion.Util
6ae0c777df45030124108c41be456a474c3c77bbb49073f4389d33528f9fff35
Ptival/language-ocaml
Longident.hs
# LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # module Language.OCaml.Definitions.Parsing.Longident ( Longident (..), last, ) where import GHC.Generics (Generic) import Prelude hiding (last) data Longident = Lident String | Ldot Longident String | Lapply Longident Longident deriving (Eq, Generic, ...
null
https://raw.githubusercontent.com/Ptival/language-ocaml/7b07fd3cc466bb2ad2cac4bfe3099505cb63a4f4/lib/Language/OCaml/Definitions/Parsing/Longident.hs
haskell
# LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # module Language.OCaml.Definitions.Parsing.Longident ( Longident (..), last, ) where import GHC.Generics (Generic) import Prelude hiding (last) data Longident = Lident String | Ldot Longident String | Lapply Longident Longident deriving (Eq, Generic, ...
8f4bc409250e052067fdb5e259f2551885c65654d9237527126911a0560bd9d4
ArulselvanMadhavan/mini_dalle
text_tokenizer.ml
type t = { token_from_subword : (string, int) Hashtbl.t ; rank_from_pair : (string * string, int) Hashtbl.t } let make token_from_subword merges = let take_two line = let parts = String.split_on_char ' ' line in List.hd parts, List.hd (List.tl parts) in let pairs = List.map take_two merges in let...
null
https://raw.githubusercontent.com/ArulselvanMadhavan/mini_dalle/5011a57c18c36c3af6ee5895217d6323fcd4f3f7/lib/text_tokenizer.ml
ocaml
type t = { token_from_subword : (string, int) Hashtbl.t ; rank_from_pair : (string * string, int) Hashtbl.t } let make token_from_subword merges = let take_two line = let parts = String.split_on_char ' ' line in List.hd parts, List.hd (List.tl parts) in let pairs = List.map take_two merges in let...
822fa6fdf00d927a62bcc02707254ea5f6039d1fc2df907531f3a4db764c01cf
purescript/purescript
CaseDeclarations.hs
-- | -- This module implements the desugaring pass which replaces top-level binders with -- case expressions. -- module Language.PureScript.Sugar.CaseDeclarations ( desugarCases , desugarCasesModule , desugarCaseGuards ) where import Prelude import Protolude (ordNub) import Data.List (groupBy, foldl1') import...
null
https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/src/Language/PureScript/Sugar/CaseDeclarations.hs
haskell
| This module implements the desugaring pass which replaces top-level binders with case expressions. | Replace all top-level binders in a module with case expressions. | series of nested case expressions. we may evaluate the scrutinee more than once when a guard occurs. Alternatives which do not have guards...
module Language.PureScript.Sugar.CaseDeclarations ( desugarCases , desugarCasesModule , desugarCaseGuards ) where import Prelude import Protolude (ordNub) import Data.List (groupBy, foldl1') import Data.Maybe (catMaybes, mapMaybe) import Control.Monad ((<=<), forM, replicateM, join, unless) import Control.Mo...
33fcc6fbb451eca1e73e66b9f79ada77fb1db7befc7840f847edf8e84b4df2a5
mauny/the-functional-approach-to-programming
mls.ml
#directory "../Util";; #open "lexer";; #open "parser_strict";; #open "eval_strict";; #open "ml_strict";; let rec print_val = function Int_Const n -> print_int n | Bool_Const true -> print_string "true" | Bool_Const false -> print_string "false" | Pair(v1,v2) -> print_string "("; print_val v1; print_s...
null
https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/Eval/mls.ml
ocaml
#directory "../Util";; #open "lexer";; #open "parser_strict";; #open "eval_strict";; #open "ml_strict";; let rec print_val = function Int_Const n -> print_int n | Bool_Const true -> print_string "true" | Bool_Const false -> print_string "false" | Pair(v1,v2) -> print_string "("; print_val v1; print_s...
4d02be103a44373c9d40eda65b8b62be4e17ebda6af6eca33aad7cbc9eb4ba01
namin/biohacker
jcoverage.lisp
(defvar *coverage-path* (make-path *trunk-home* "coverage")) (defvar *coverage-rules-file* (make-bps-source-file-name *coverage-path* "jcoverage-rules")) (defvar *debug-rules-file* (make-bps-source-file-name *coverage-path* "jcoverage-debug-rules")) (defvar *debugging-coverage* t) (defvar *organism* nil) (de...
null
https://raw.githubusercontent.com/namin/biohacker/6b5da4c51c9caa6b5e1a68b046af171708d1af64/coverage/jcoverage.lisp
lisp
Displays well-founded support for a fact Go down the support
(defvar *coverage-path* (make-path *trunk-home* "coverage")) (defvar *coverage-rules-file* (make-bps-source-file-name *coverage-path* "jcoverage-rules")) (defvar *debug-rules-file* (make-bps-source-file-name *coverage-path* "jcoverage-debug-rules")) (defvar *debugging-coverage* t) (defvar *organism* nil) (de...
6f2d47c4128df441b9bb757500a431462e52582929c826a336518ba5c85cc815
jrh13/hol-light
lhopital.ml
(* ========================================================================= *) # 64 : L'Hopital 's rule . (* ========================================================================= *) needs "Library/analysis.ml";; override_interface ("-->",`(tends_real_real)`);...
null
https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/100/lhopital.ml
ocaml
========================================================================= ========================================================================= ------------------------------------------------------------------------- Cauchy mean value theorem. ---------------...
# 64 : L'Hopital 's rule . needs "Library/analysis.ml";; override_interface ("-->",`(tends_real_real)`);; prioritize_real();; let MVT2 = prove (`!f g a b. a < b /\ (!x. a <= x /\ x <= b ==> f contl x /\ g contl x) /\ (!x. a < x /\ x < b...
54c0b8805b3103bd8b54879740fcd24fbb6a25fe65469f84bc22b888c52c059d
wireless-net/erlang-nommu
xmerl_xpath_lib.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2011 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/xmerl/src/xmerl_xpath_lib.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2008 - 2011 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(xmerl_xpath_lib). -include("xmerl...
e6ea5714d47730e804e11ee010d5f53da23f1b5de46106a8a6945335de0c2f0f
bcc32/projecteuler-ocaml
sol_058.ml
open! Core open! Import Interpolate the quadratic polynomial [ ax^2 + bx + c ] passing through points [ ( 1 , y1 ) , ( 2 , y2 ) , ( 3 , y3 ) ] using the Lagrange interpolation formula . [(1, y1), (2, y2), (3, y3)] using the Lagrange interpolation formula. *) let interpolate y1 y2 y3 = stage (fun x -> (...
null
https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/sol/sol_058.ml
ocaml
open! Core open! Import Interpolate the quadratic polynomial [ ax^2 + bx + c ] passing through points [ ( 1 , y1 ) , ( 2 , y2 ) , ( 3 , y3 ) ] using the Lagrange interpolation formula . [(1, y1), (2, y2), (3, y3)] using the Lagrange interpolation formula. *) let interpolate y1 y2 y3 = stage (fun x -> (...
9d1f15bde3a29f21a80e799d7ef621db4175a3fc956acd4cc60f52dba0a3da3e
links-lang/links
lens_type_conv.mli
type 'a die = string -> 'a (** Lookup a type alias in the typing environment context. *) val lookup_alias : Types.tycon_environment -> alias:string -> Types.typ val lens_type_of_type : die:Lens.Type.t die -> Types.typ -> Lens.Type.t (** Convert a native Links language type to a lens phrase type. *) val type_of_lens_...
null
https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/core/lens_type_conv.mli
ocaml
* Lookup a type alias in the typing environment context. * Convert a native Links language type to a lens phrase type. * Convert a lens phrase type to a native Links type. * Extract the relational lens columns of a table type. Use the specified table name.
type 'a die = string -> 'a val lookup_alias : Types.tycon_environment -> alias:string -> Types.typ val lens_type_of_type : die:Lens.Type.t die -> Types.typ -> Lens.Type.t val type_of_lens_phrase_type : context:Types.tycon_environment -> Lens.Phrase.Type.t -> Types.typ val lens_phrase_type_of_type : Types.typ -> L...
b760a4c884e0eda8a2bafe18cab797148a73ec5304bc946a947bfa8c98d8b1df
apache/couchdb-couch-mrview
couch_mrview_http.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 " A...
null
https://raw.githubusercontent.com/apache/couchdb-couch-mrview/f08c26a098a46366cfaf0e14b940af1f11d84577/src/couch_mrview_http.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(couch_mrview_http). -export([ handle_all_docs_req/2, handle_local_docs_req/2, handle_design_docs_req/2, handle_view_changes_req/3, ...
ba89a13cc0249d75437eade492bc5a1043ea4d37530b1a1efb46d36f0f31283d
lispnik/iup
constants.lisp
(in-package #:iup) (export '(+error+ +noerror+ +opened+ +invalid+ +invalid-id+ ;; callback returns +ignore+ +default+ +close+ +continue+ ;; +center+ +left+ +right+ +mousepos+ +current+ +centerparent+ +top+ +bottom+ ;; +primary+ +secondary+ ;; +recbin...
null
https://raw.githubusercontent.com/lispnik/iup/f8e5f090bae47bf8f91ac6fed41ec3bc01061186/iup/constants.lisp
lisp
callback returns
(in-package #:iup) (export '(+error+ +noerror+ +opened+ +invalid+ +invalid-id+ +ignore+ +default+ +close+ +continue+ +center+ +left+ +right+ +mousepos+ +current+ +centerparent+ +top+ +bottom+ +primary+ +secondary+ +recbinary+ +rectext+ )) (defconstant +er...
341fec4048452ec916e0972780c505a5afee5babb888a57e05d1132f4150773f
hasktorch/hasktorch
Native14.hs
-- generated by using spec/Declarations.yaml # LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} module Torch.Internal.Unmanaged.Native.Native14 where import Foreign.C.String import Foreign.C.Types i...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/6233c173e1dd9fd7218fd13b104da15fc457f67e/libtorch-ffi/src/Torch/Internal/Unmanaged/Native/Native14.hs
haskell
generated by using spec/Declarations.yaml # LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # module Torch.Internal.Unmanaged.Native.Native14 where import Foreign.C.String import Foreign.C.Types import Foreign import Torch.Internal.Type import qualified Language.C.Inline.Cpp...
f9bd551487da503da24b25448f2f509c0c4703eec3db375a7260d5265b08947b
GrantMatejka/rasm
lam_env3.rkt
(module add racket (provide x) (define f (let ((y 5)) (lambda (x) (+ x y)))) (define x (f 2)))
null
https://raw.githubusercontent.com/GrantMatejka/rasm/18fcd0c33b55462ca175a7c6ed76545832c60370/examples/lam_env3.rkt
racket
(module add racket (provide x) (define f (let ((y 5)) (lambda (x) (+ x y)))) (define x (f 2)))
31ee417e05f7c025af5e078fda9a10bfb753e1d60834d3fd2fc9aae1a8efc6e7
wkok/re-frame-crux
database_test.cljs
(ns wkok.re-frame-crux.database-test (:require [cljs.test :refer (deftest testing is)] [re-frame.core :as rf] [day8.re-frame.test :as rf-test] [wkok.re-frame-crux] [wkok.re-frame-crux.database :as database] [ajax.edn :refer [edn-request-format]])) (def on-s...
null
https://raw.githubusercontent.com/wkok/re-frame-crux/eb7e3683b22b6ed081c8d072a292908227528605/test/wkok/re_frame_crux/database_test.cljs
clojure
(ns wkok.re-frame-crux.database-test (:require [cljs.test :refer (deftest testing is)] [re-frame.core :as rf] [day8.re-frame.test :as rf-test] [wkok.re-frame-crux] [wkok.re-frame-crux.database :as database] [ajax.edn :refer [edn-request-format]])) (def on-s...
c492dd2a38232093c86d082442713133570c053c72c13fe36b475017d7272c90
codinuum/volt
bolt_pp.ml
* This file is part of Bolt . * Copyright ( C ) 2009 - 2012 . * * Bolt 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 ) ...
null
https://raw.githubusercontent.com/codinuum/volt/546207693ef102a2f02c85af935f64a8f16882e6/src/syntax/bolt_pp.ml
ocaml
re-defined here to avoid dependency re-defined here to avoid dependency <:class_type< $ci$ : $ct$ >>
* This file is part of Bolt . * Copyright ( C ) 2009 - 2012 . * * Bolt 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 ) ...
0050355be959b3050c8044f5d3adca1ae71fb9d1beb44b70f9e857a9d0d8bcf6
fetburner/Coq2SML
ind_tables.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/toplevel/ind_tables.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * This module provides support for r...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Term open Names open Lib...
f146f86dd4ec67ac5db2f51d44447784ca6e7814ed3a4c7c321940c66fae410f
klauso/KdP2012
marburg-utils.rkt
#lang racket/base (require scribble/eval) (require scribble/base) (require racket/sandbox) (require mzlib/pconvert) (require racket/pretty) (require file/convertible) (require 2htdp/image) (require scribble/manual) (provide block ev ex stdeval todo step multistep equiv prime e e0 e1 e2 e3 e4 eN-1 eN v v1 v2 v3 vN-1 ...
null
https://raw.githubusercontent.com/klauso/KdP2012/c0d0c34d3a7816c6aeb93d29d09822b151f44b86/underconstruction/marburg-utils.rkt
racket
(bitmap "arrow.png")) ===>>> tell `print-convert' to leave images as themselves: tell `pretty-print' that we'll handle images specially: tell `pretty-print' how to handle images, which is by using `write-special':
#lang racket/base (require scribble/eval) (require scribble/base) (require racket/sandbox) (require mzlib/pconvert) (require racket/pretty) (require file/convertible) (require 2htdp/image) (require scribble/manual) (provide block ev ex stdeval todo step multistep equiv prime e e0 e1 e2 e3 e4 eN-1 eN v v1 v2 v3 vN-1 ...
8ef11e4f33997796e9291f99337462ee1df2ab49d43010ebfc8a344505f6c167
Opetushallitus/ataru
permission_check.clj
(ns ataru.applications.permission-check (:require [taoensso.timbre :as log] [ataru.applications.application-access-control :as aac] [ataru.applications.application-store :as application-store])) (defn check [tarjonta-service check-dto] (try (let [orgs (set (:organisationOids check-dto))...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/clj/ataru/applications/permission_check.clj
clojure
(ns ataru.applications.permission-check (:require [taoensso.timbre :as log] [ataru.applications.application-access-control :as aac] [ataru.applications.application-store :as application-store])) (defn check [tarjonta-service check-dto] (try (let [orgs (set (:organisationOids check-dto))...
0350219003cd6b0843c4cdebb2a48030978ef0a0c654abfdc4b5778c480438da
coq/coq
wg_Debugger.mli
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/e0de9db708817cc08efb20d65b9819d8f2b0ea68/ide/coqide/wg_Debugger.mli
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
877809cac4a29b2d5251c55b6d7f3a2c10cc6f4dc2a7bad726d26559d1d8db4c
radusw/hpffp
ch17.hs
module Ch17 where import Data.Monoid import Control.Applicative data List a = Nil | Cons a (List a) deriving (Eq, Show) instance Functor List where fmap _ Nil = Nil fmap f (Cons x xs) = Cons (f x) (fmap f xs) instance Applicative List where pure a = Cons a Nil (<*>) Nil Nil = Nil ...
null
https://raw.githubusercontent.com/radusw/hpffp/114a55fec93f98995ed4cec64a95007330954eb4/ch17.hs
haskell
Failure ["err 1"] Failure ["err 2"]
module Ch17 where import Data.Monoid import Control.Applicative data List a = Nil | Cons a (List a) deriving (Eq, Show) instance Functor List where fmap _ Nil = Nil fmap f (Cons x xs) = Cons (f x) (fmap f xs) instance Applicative List where pure a = Cons a Nil (<*>) Nil Nil = Nil ...
af003602eb035358e3cf27969d80973aed3b57e87acdb5531d0fcd444e3bbea2
2600hz/kazoo
kz_data_tracing.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc 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 /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_data/src/kz_data_tracing.erl
erlang
----------------------------------------------------------------------------- @doc @end -----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz 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 /. -module(kz_data_tracing). -behaviour(gen_server). -export([start_link/0 ,status/0, status/1 ,clea...
01b7d29f4494ccd3ce7b0363ec112dd83d31362319350870a511c5fdce62d570
sirherrbatka/clusters
group-average.lisp
(cl:in-package #:clusters.metric) (defun group-average (fn a b &key (key #'identity) (element-type t) (distance-matrix (make-array (list (length a) (length b)) :e...
null
https://raw.githubusercontent.com/sirherrbatka/clusters/7381c0566ee3a7e130cc86982b6df78f6be9744f/source/metric/group-average.lisp
lisp
(cl:in-package #:clusters.metric) (defun group-average (fn a b &key (key #'identity) (element-type t) (distance-matrix (make-array (list (length a) (length b)) :e...
829642ccce63e2fd1d01e7ffcbc4bea28894fcd2bd21f817f093e7f60668fc6d
elaforge/karya
Twelve.hs
Copyright 2013 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt # LANGUAGE CPP # | The equal tempered 12 note scale , aka 12TET . For the note text , I use a non - traditional format that goes " octave note sharp " instead of " note sha...
null
https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Derive/Scale/Twelve.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt * keys * utils I'm worried that 'n' for natural looks ugly, so let's try the symbolic accidentals. * keys * utils * implementation | Keys that are diatonic, but have nonstandard key signatures. | The la...
Copyright 2013 # LANGUAGE CPP # | The equal tempered 12 note scale , aka 12TET . For the note text , I use a non - traditional format that goes " octave note sharp " instead of " note sharp octave " . General to specific is more aesthetically appealing . 4c is middle C , and the range...
cd47254f845e4cdf6b93c04ca6f08a5bc6539afeb023e16292ce3b55f744ad4c
LCBH/UKano
stringmap.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
null
https://raw.githubusercontent.com/LCBH/UKano/13c046ddaca48b45d3652c3ea08e21599e051527/src/stringmap.mli
ocaml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
6cfec521b85d9ac5109130e6bd80ac2dc76a4c5fcf0b1b5a7ab1a191b1e661c6
froggey/Mezzano
cons.lisp
;;;; CONS and LIST related functions (in-package :mezzano.internals) (declaim (inline caar cadr cdar cddr (setf caar) (setf cadr) (setf cdar) (setf cddr))) Define CAAR / CADR / etc to length 4 (macrolet ((def (length) `(progn ,@(loop ...
null
https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/system/cons.lisp
lisp
CONS and LIST related functions Counter. If fast pointer hits the end, return the count. If fast pointer eventually equals slow pointer, then we must be stuck in a circular list. Counter. If fast pointer hits the end, return the count. If fast pointer eventually equals slow pointer, then we must be stuck in ...
(in-package :mezzano.internals) (declaim (inline caar cadr cdar cddr (setf caar) (setf cadr) (setf cdar) (setf cddr))) Define CAAR / CADR / etc to length 4 (macrolet ((def (length) `(progn ,@(loop for i below (expt 2 length) ...
68d9bdab8cbb15497f330df4ab50f953f9da5ce8847bed5754022f13aba77a3c
jrm-code-project/LISP-Machine
supser.lisp
-*- Mode : LISP ; Package : SUPDUP ; -*- SUPDUP - TIMEOUT is time in which the LISTEN must win . Set high for debugging . (DEFVAR SUPDUP-TIMEOUT 100000.) ITS Output Buffer codes -- 0 - 177 are graphic characters which are output as is . The % TD codes control cursor movement and other terminal functions . ...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/gjc/supser.lisp
lisp
Package : SUPDUP ; -*- describe code function, arguments, and conditions in which the code can be used. Clear to end of page Clear to end of line Delete character after cursor, without moving cursor Newline character (CRLF) No-op Backspace use only if %TORAW set use only if %TORAW set Carriage return use only if ...
SUPDUP - TIMEOUT is time in which the LISTEN must win . Set high for debugging . (DEFVAR SUPDUP-TIMEOUT 100000.) ITS Output Buffer codes -- 0 - 177 are graphic characters which are output as is . The % TD codes control cursor movement and other terminal functions . Comments Linefeed Move cursor forward one...
589e865c18ad28c0cb6da1aebdb2b3e820217536aaf8e9bcf1f1eeef201879b8
exoscale/seql
fixtures.clj
(ns db.fixtures (:require [next.jdbc :as jdbc] [next.jdbc.sql :as sql] [clojure.string :as str] [clojure.java.io :as io] [clojure.edn :as edn])) (def jdbc-config "jdbc:h2:mem:privnet;DB_CLOSE_DELAY=-1") (defn create-table-ddl [table-id co...
null
https://raw.githubusercontent.com/exoscale/seql/7142132a5c364baf201936052095589489320e99/dataset/db/fixtures.clj
clojure
a different name on purpose
(ns db.fixtures (:require [next.jdbc :as jdbc] [next.jdbc.sql :as sql] [clojure.string :as str] [clojure.java.io :as io] [clojure.edn :as edn])) (def jdbc-config "jdbc:h2:mem:privnet;DB_CLOSE_DELAY=-1") (defn create-table-ddl [table-id co...
879cf4b399bcaa6a77c49ffbd62add2897695583470823b938ec619323593c54
tmfg/mmtis-national-access-point
form_fields.cljs
(ns ote.style.form-fields (:require [stylefy.core :as stylefy] [ote.style.base :as style-base] [ote.style.buttons :as buttons] [ote.theme.colors :as colors])) (def localized-text-language-container {:height "20px" :font-size "12px" :margin-top "-4px"}) (def localized-text...
null
https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/e36f9898bce005736e36153bdc7cca3386a44daf/ote/src/cljs/ote/style/form_fields.cljs
clojure
(ns ote.style.form-fields (:require [stylefy.core :as stylefy] [ote.style.base :as style-base] [ote.style.buttons :as buttons] [ote.theme.colors :as colors])) (def localized-text-language-container {:height "20px" :font-size "12px" :margin-top "-4px"}) (def localized-text...
e8aef7b88df1ab265d9289c0ca3e9b6e5e7852af2130e7ed730f96686f0bfad6
lasp-lang/lasp
lasp_plots_resource.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2016 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the ...
null
https://raw.githubusercontent.com/lasp-lang/lasp/1701c8af77e193738dfc4ef4a5a703d205da41a1/simulations/lasp_plots_resource.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2016 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(lasp_plots_resource)....
0b5e3693beb42b7271eab6ee12b4eba30e032af0e11cc4e12738d08453c70375
aws-beam/aws-erlang
aws_appconfigdata.erl
%% WARNING: DO NOT EDIT, AUTO-GENERATED CODE! See -beam/aws-codegen for more details . @doc AppConfig Data provides the data plane APIs your application uses to %% retrieve configuration data. %% %% Here's how it works: %% Your application retrieves configuration data by first establishing a configuration sess...
null
https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_appconfigdata.erl
erlang
WARNING: DO NOT EDIT, AUTO-GENERATED CODE! retrieve configuration data. Here's how it works: `StartConfigurationSession' API action. Your session's client then makes periodic calls to `GetLatestConfiguration' to check for and retrieve the latest data available. When calling `StartConfigurationSession', your c...
See -beam/aws-codegen for more details . @doc AppConfig Data provides the data plane APIs your application uses to Your application retrieves configuration data by first establishing a configuration session using the AppConfig Data < ul > < li > Identifiers ( ID or name ) of an AppConfig application , < /l...
cb846f44ffc08f171ae1a8b838974bbfa92f0bbe413d0f7f7e827fe0e88ffabe
dmitryvk/sbcl-win32-threads
type.before-xc.lisp
;;;; tests of the type system, intended to be executed as soon as ;;;; the cross-compiler is built This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch afte...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/type.before-xc.lisp
lisp
tests of the type system, intended to be executed as soon as the cross-compiler is built more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. n...
This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . (in-package "SB!KERNEL") (/show "beginning tests/type.before-xc.lisp") (assert (type= (specifier-type '(and fixnum (satisfies foo))) (specifier-type '...
419cfed8c4b77ab5856f6ca471c6d70941ee824fb13482f54d44e7f69d7993bb
8c6794b6/guile-tjit
t-nest-01.scm
(define (nest n) (let lp ((i n) (acc 0)) (if (< 0 i) (lp (- i 1) (let lp ((j n) (acc acc)) (if (< 0 j) (lp (- j 1) (+ acc 1)) acc))) acc))) (nest 100)
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-nest-01.scm
scheme
(define (nest n) (let lp ((i n) (acc 0)) (if (< 0 i) (lp (- i 1) (let lp ((j n) (acc acc)) (if (< 0 j) (lp (- j 1) (+ acc 1)) acc))) acc))) (nest 100)
295c985836ea2883a986f3997e67012c40b1d2cbe291692b47968596c696bcab
duct-framework/module.web
static.clj
(ns duct.handler.static (:require [clojure.java.io :as io] [duct.core.resource :as resource] [integrant.core :as ig] [ring.util.mime-type :as mime] [ring.util.response :as resp])) (defn- merge-response [a b] (-> a (assoc :body (:body b)) (update :headers (par...
null
https://raw.githubusercontent.com/duct-framework/module.web/bc11c28d81e2aa69c32c542c0f3a276224e72420/src/duct/handler/static.clj
clojure
(ns duct.handler.static (:require [clojure.java.io :as io] [duct.core.resource :as resource] [integrant.core :as ig] [ring.util.mime-type :as mime] [ring.util.response :as resp])) (defn- merge-response [a b] (-> a (assoc :body (:body b)) (update :headers (par...
4538f45b1cd584a0ab3a7eb10c4bcd7f8dd1e4d438ee7e20768a8f62bd1439b2
cryptosense/pkcs11
p11_slot_info.mli
type t = { slotDescription : string ; manufacturerID : string ; flags : P11_flags.t ; hardwareVersion : P11_version.t ; firmwareVersion : P11_version.t } [@@deriving eq, ord, show, yojson] val to_string : ?newlines:bool -> ?indent:string -> t -> string val to_strings : t -> string list val flags_to_string ...
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/lib/p11_slot_info.mli
ocaml
type t = { slotDescription : string ; manufacturerID : string ; flags : P11_flags.t ; hardwareVersion : P11_version.t ; firmwareVersion : P11_version.t } [@@deriving eq, ord, show, yojson] val to_string : ?newlines:bool -> ?indent:string -> t -> string val to_strings : t -> string list val flags_to_string ...
a9539c36854408671765104332517a108208ee72e368f9c0d366dc10224c592e
WormBase/wormbase_rest
overview.clj
(ns rest-api.classes.microarray-results.widgets.overview (:require [rest-api.classes.generic-fields :as generic] [rest-api.formatters.object :as obj :refer [pack-obj]])) (defn cds [mr] {:data (when-let [cdshs (:microarray-results/cds mr)] (for [cdsh cdshs :let [cds (:microarray-re...
null
https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/microarray_results/widgets/overview.clj
clojure
(ns rest-api.classes.microarray-results.widgets.overview (:require [rest-api.classes.generic-fields :as generic] [rest-api.formatters.object :as obj :refer [pack-obj]])) (defn cds [mr] {:data (when-let [cdshs (:microarray-results/cds mr)] (for [cdsh cdshs :let [cds (:microarray-re...
10448f3f2491ca4c4fa5dac9a87050b5865adaf8f36af25a80bdbcdff8289cd1
haskell-tls/hs-tls
Imports.hs
module Imports ( ByteString , module Control.Applicative , module Control.Monad , module Data.List , module Data.Maybe , module Data.Monoid , module Data.Word ) where import Control.Applicative import Control.Monad import Data.ByteString (ByteString) import Data.List import Data.Maybe import Data.Mon...
null
https://raw.githubusercontent.com/haskell-tls/hs-tls/31e95f40b75b541c9817b6b56c363e74c2f3b57d/debug/src/Imports.hs
haskell
module Imports ( ByteString , module Control.Applicative , module Control.Monad , module Data.List , module Data.Maybe , module Data.Monoid , module Data.Word ) where import Control.Applicative import Control.Monad import Data.ByteString (ByteString) import Data.List import Data.Maybe import Data.Mon...
9d3c4da30539d0b3437c695c92f97bca4b323a2902a41b83c0db80e907c4422f
benknoble/frosthaven-manager
common-menu.rkt
#lang racket (provide (contract-out [do-about (-> renderer?)] [about-menu-item (-> (is-a?/c view<%>))] [issue-menu-item (-> (is-a?/c view<%>))] [feature-menu-item (-> (is-a?/c view<%>))] [contribute-menu-item (-> (is-a?/c view<%>))] [send-feedback-menu-item (-> (is-a?/c view<%>))] [how-to...
null
https://raw.githubusercontent.com/benknoble/frosthaven-manager/9bfb7bc16bc2fe434285f9047a67f26360295408/gui/common-menu.rkt
racket
#lang racket (provide (contract-out [do-about (-> renderer?)] [about-menu-item (-> (is-a?/c view<%>))] [issue-menu-item (-> (is-a?/c view<%>))] [feature-menu-item (-> (is-a?/c view<%>))] [contribute-menu-item (-> (is-a?/c view<%>))] [send-feedback-menu-item (-> (is-a?/c view<%>))] [how-to...
066f8520bd4608ec4bd2909234ee8128e8163cc46901d03fa5061d4b71914a73
CSVdB/pinky
HyperParams.hs
module Pinky.Core.HyperParams ( HyperParams , constructHyperParams , hyperParamsFromBasics , hyperRate , hyperDecayRate , hyperRegulator , hyperMomentum , hyperBatchSize , decay ) where import Pinky.Core.HyperParams.Internal
null
https://raw.githubusercontent.com/CSVdB/pinky/e77a4c0812ceb4b8548c41a7652fb247c2ab39e0/pinky/src/Pinky/Core/HyperParams.hs
haskell
module Pinky.Core.HyperParams ( HyperParams , constructHyperParams , hyperParamsFromBasics , hyperRate , hyperDecayRate , hyperRegulator , hyperMomentum , hyperBatchSize , decay ) where import Pinky.Core.HyperParams.Internal
a678fc44646a5c2f946da73c46d0282eb75aa85ff61fa91befec50cc7975e91d
areina/elfeed-cljsrn
settings.cljs
(ns elfeed-cljsrn.android.scenes.settings (:require [reagent.core :as r] [re-frame.core :refer [subscribe dispatch]] [elfeed-cljsrn.rn :as rn] [elfeed-cljsrn.ui :as ui :refer [colors palette button]] [elfeed-cljsrn.events] [elfeed-cljsrn.subs])) (defn setti...
null
https://raw.githubusercontent.com/areina/elfeed-cljsrn/4dea27f785d24a16da05c0ab2ac0c6a6f23360f1/src/elfeed_cljsrn/android/scenes/settings.cljs
clojure
(ns elfeed-cljsrn.android.scenes.settings (:require [reagent.core :as r] [re-frame.core :refer [subscribe dispatch]] [elfeed-cljsrn.rn :as rn] [elfeed-cljsrn.ui :as ui :refer [colors palette button]] [elfeed-cljsrn.events] [elfeed-cljsrn.subs])) (defn setti...
874081eb725fa9c3d61e37f4e9deb290e3fc6fdea24876fbc6117413521f127b
oconn/domestic
logger.cljc
(ns domestic.logger) (def log-error #?(:cljs js/console.error :clj #(binding [*out* *err*] (println %))))
null
https://raw.githubusercontent.com/oconn/domestic/f50ccfde26eacad0e946baa5d752bbbfc76dd054/src/domestic/logger.cljc
clojure
(ns domestic.logger) (def log-error #?(:cljs js/console.error :clj #(binding [*out* *err*] (println %))))
425f1a17a67741c089a48a0e7548566e3afc756b67578470dc52945d770e94c4
potapenko/playphraseme-site
middleware.clj
(ns playphraseme.app.middleware (:require [playphraseme.env :refer [defaults]] [cognitect.transit :as transit] [clojure.tools.logging :as log] [playphraseme.app.layout :refer [*app-context* error-page]] [ring.middleware.anti-forgery :refer [wrap-anti-forgery]] ...
null
https://raw.githubusercontent.com/potapenko/playphraseme-site/d50a62a6bc8f463e08365dca96b3a6e5dde4fb12/src/clj/playphraseme/app/middleware.clj
clojure
If we're not inside a servlet environment (for example when using mock requests), then .getContextPath might not exist if the context is not specified in the request we check if one has been specified in the environment instead since they're not compatible with this middleware
(ns playphraseme.app.middleware (:require [playphraseme.env :refer [defaults]] [cognitect.transit :as transit] [clojure.tools.logging :as log] [playphraseme.app.layout :refer [*app-context* error-page]] [ring.middleware.anti-forgery :refer [wrap-anti-forgery]] ...
55ee235c46461d140e09add12edf657ac62343d4fd31dbe8fb58fad11a404d62
FreeAndFair/STAR-Vote
Main.hs
{-# LANGUAGE OverloadedStrings #-} | This is a simple client for the append - only BB . It allows the creation of new identities ( ) , the downloading of public keys from the BB , posting to the BB with a local private key , and reading and verifying the BB history . The keyserver feature should probably ...
null
https://raw.githubusercontent.com/FreeAndFair/STAR-Vote/2555cbae8794ec6f34889fdabac314ff9f22b437/append-only-bb/bbclient/Main.hs
haskell
# LANGUAGE OverloadedStrings # | The name of the local file storing private kys | The file storing public keys | The file storing bulletin board keys | Read the contents of the local key files | Either read JSON from the server, or crash with an error report | Save the bulletin board's public key. If one is alrea...
| This is a simple client for the append - only BB . It allows the creation of new identities ( ) , the downloading of public keys from the BB , posting to the BB with a local private key , and reading and verifying the BB history . The keyserver feature should probably be separated for a non - demonstr...
80062c0ba94f1725a00bc76a6bb1fceb2f2c37cd6825c7760bc2d7fcfe2e9dde
iperdomo/immutant-keycloak
project.clj
(defproject immutant-keycloak "0.0.1-SNAPSHOT" :description "Immutant Web - Keycloak integration" :url "" :license {:name "Apache License 2.0" :url "-2.0.txt"} :dependencies [[org.clojure/clojure "1.8.0"] [org.immutant/web "2.1.4"] [io.undertow/undertow-core "1.3.15...
null
https://raw.githubusercontent.com/iperdomo/immutant-keycloak/7f7f0245701bdc2b80d33802243a0fc55b47bc98/project.clj
clojure
(defproject immutant-keycloak "0.0.1-SNAPSHOT" :description "Immutant Web - Keycloak integration" :url "" :license {:name "Apache License 2.0" :url "-2.0.txt"} :dependencies [[org.clojure/clojure "1.8.0"] [org.immutant/web "2.1.4"] [io.undertow/undertow-core "1.3.15...
fe3338255d72b926b74fcaff4d2060468607097ffb89ce5f5e95040a6695e742
erlang/otp
f_include_1.erl
-module(f_include_1). -feature(experimental_ftr_1, enable). -ifdef(end_include). -feature(experimental_ftr_2, enable). -endif. %% This defines a record, so ends the prefix. -include("is_enabled.hrl"). -ifdef(end_include). -feature(approved_ftr_1, disable). -endif. -export([foo/1]). foo(1) -> one.
null
https://raw.githubusercontent.com/erlang/otp/018277451bc9d6fa249cd1d62b416b8721ce43ee/erts/test/erlc_SUITE_data/src/f_include_1.erl
erlang
This defines a record, so ends the prefix.
-module(f_include_1). -feature(experimental_ftr_1, enable). -ifdef(end_include). -feature(experimental_ftr_2, enable). -endif. -include("is_enabled.hrl"). -ifdef(end_include). -feature(approved_ftr_1, disable). -endif. -export([foo/1]). foo(1) -> one.
353d3cef4943582dc8e112df3ce66bbdeaa6ede56ba4cf8f4614280b2107b189
inria-parkas/sundialsml
cvodes_quad_skel.ml
open Sundials TODO : write a proper and working example ... Initialize a session [ s ] per the skeleton at { ! Cvode.session } } The vector of initial values should not include values for the quadrature variables . The vector of initial values should not include values for the quadrature variables...
null
https://raw.githubusercontent.com/inria-parkas/sundialsml/0c46b0c6c067677af6ef8006260b9e697cc0562b/examples/ocaml/skeletons/cvodes_quad_skel.ml
ocaml
Set vector of quadrature variables The length of this vector determines the number of quadrature variables. Specify integration tolerances (optional)}, e.g. Advance the solution in time as per normal Extract quadrature variables Get quadrature optional outputs Call any of the [get_*] functions to examine...
open Sundials TODO : write a proper and working example ... Initialize a session [ s ] per the skeleton at { ! Cvode.session } } The vector of initial values should not include values for the quadrature variables . The vector of initial values should not include values for the quadrature variables...
8cb16c7afff4013e773c1cc459befe3a1c5224dfe7683c3d073c134dd53d0fbd
skanev/playground
35.scm
SICP exercise 1.35 ; ; Show that the golden ratio 𝜙 (section 1.2.2) is a fixed point of the ; transformation x ↦ 1 + 1/x, and use this fact to compute 𝜙 by means of the ; fixed-point procedure. ; Showing that 𝜙 is a fixed point is trivial. We have that: ; ; 𝜙 = (1 + √5)/2 ; ; When we apply the transformation, we...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/01/35.scm
scheme
Show that the golden ratio 𝜙 (section 1.2.2) is a fixed point of the transformation x ↦ 1 + 1/x, and use this fact to compute 𝜙 by means of the fixed-point procedure. Showing that 𝜙 is a fixed point is trivial. We have that: 𝜙 = (1 + √5)/2 When we apply the transformation, we get 1 + ─ = ───── = ────────...
SICP exercise 1.35 1 𝜙 + 1 ( 1 + √5)/2 + 2/2 3 + √5 ( 3 + √5)(1 - √5 ) 3 - 3√5 + √5 - 5 -2 - 2√5 1 + √5 -4 -4 2 (define tolerance 0.00001) (define (fixed-point f first-guess) (define (close-enough? v1 v2) (< (abs (- v1 v2)) tolerance)) (define (tr...
47e9630b4319c7c86e47d815926a0fee3d6380ce3cc669504dee7dd3e37618ad
fdopen/depext-cygwinports
run.ml
module U = Unix type pipe_state = | Open | Closed | Uninit type pipe_with_status = { mutable state: pipe_state; mutable fd: U.file_descr } let win = match Sys.os_type.[0] with | 'W' -> true | _ -> false let null_device = if win then "NUL" else "/dev/null" let try_finalize f x final y = let res...
null
https://raw.githubusercontent.com/fdopen/depext-cygwinports/4caeb558598e2b62515909e98d95c70f0af5f420/run.ml
ocaml
|`Fun of (out_channel -> unit) (* not usable yet | `Fun f -> f (Unix.out_channel_of_descr p_stdin_write.fd); close_pipe p_stdin_write; ref "" only possible if the call was done using WUNTRACED or when the child is being traced
module U = Unix type pipe_state = | Open | Closed | Uninit type pipe_with_status = { mutable state: pipe_state; mutable fd: U.file_descr } let win = match Sys.os_type.[0] with | 'W' -> true | _ -> false let null_device = if win then "NUL" else "/dev/null" let try_finalize f x final y = let res...
36eb9bc99a665b95423bfa920b2638e2dd3e63b4126dee5cd2e9d351f67c1815
ghc/testsuite
rnfail020.hs
# LANGUAGE ScopedTypeVariables # -- !!! Error messages with scoped type variables module Foo where data Set a = Set a unionSetB :: Eq a => Set a -> Set a -> Set a unionSetB (s1 :: Set a) s2 = unionSets s1 s2 where unionSets :: Eq a => Set a -> Set a -> Set a unionSets a b = a In GHC 4.04 this gave the te...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/rename/should_fail/rnfail020.hs
haskell
!!! Error messages with scoped type variables
# LANGUAGE ScopedTypeVariables # module Foo where data Set a = Set a unionSetB :: Eq a => Set a -> Set a -> Set a unionSetB (s1 :: Set a) s2 = unionSets s1 s2 where unionSets :: Eq a => Set a -> Set a -> Set a unionSets a b = a In GHC 4.04 this gave the terrible message : None of the type variable...
7b7dc73559e0ff08d33733b7ae70d4522654cef5bfa19ebba25bf84090f4dd87
wdebeaum/DeepSemLex
supplies.lisp
;;;; W::SUPPLIES ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::SUPPLIES (wordfeats (W::morph (:forms (-none)))) (SENSES ( LF - PARENT ONT::Functional - phys - object ) (LF-PARENT ONT::COMMODITY) (TEMPL COUNT-PRED-3p-TEMPL) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/supplies.lisp
lisp
W::SUPPLIES (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::SUPPLIES (wordfeats (W::morph (:forms (-none)))) (SENSES ( LF - PARENT ONT::Functional - phys - object ) (LF-PARENT ONT::COMMODITY) (TEMPL COUNT-PRED-3p-TEMPL) ) ) ) ))
e971f6973614cd00374e33b53f234930065cfbed2af1e8327bbcffd3bd64f644
larcenists/larceny
cmpx.scm
( (cmpxchg al bh) (xadd (& eax) bh) (cmpxchg ax bx) (xadd (& eax) bx) (cmpxchg eax ebx) (xadd (& eax) ebx) )
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/cmpx.scm
scheme
( (cmpxchg al bh) (xadd (& eax) bh) (cmpxchg ax bx) (xadd (& eax) bx) (cmpxchg eax ebx) (xadd (& eax) ebx) )
a95baeed602aae3861a4e89866cdce76714d8240c0fe2c033114542919fe5e14
lisp/de.setf.xml
schema.lisp
20100513T120801Z00 ;;; from #<doc-node #x267E3716> (common-lisp:in-package "#")
null
https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/purl-org/net/vocab/2004/07/visit/schema.lisp
lisp
from #<doc-node #x267E3716>
20100513T120801Z00 (common-lisp:in-package "#")