_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
c62e5bcbf256e97f07fa46422a785cbc279c53d79d5b5250bdf42ebfd21593b1
racket/racklog
fac.rkt
#lang racket (require racklog tests/eli-tester) (define %factorial (%rel (x y x1 y1) [(0 1) !] [(x y) (%< x 0) ! %fail] [(x y) (%is x1 (- x 1)) (%factorial x1 y1) (%is y (* y1 x))])) (test (%which () (%factorial 0 1)) => empty (%more) => #f (%whi...
null
https://raw.githubusercontent.com/racket/racklog/89e983ec7d2df0ed919e6630403b0f4d0393728e/tests/fac.rkt
racket
#lang racket (require racklog tests/eli-tester) (define %factorial (%rel (x y x1 y1) [(0 1) !] [(x y) (%< x 0) ! %fail] [(x y) (%is x1 (- x 1)) (%factorial x1 y1) (%is y (* y1 x))])) (test (%which () (%factorial 0 1)) => empty (%more) => #f (%whi...
e34e759848af043de1b2b3ccb577f9c0099a7c563dd0f82655309c9287a90ca1
kloimhardt/bb-web
guestbook_4.cljs
;--- Excerpted from " Web Development with Clojure , Third Edition " , published by The Pragmatic Bookshelf . Copyrights apply to this code . It may not be used to create training material , ; courses, books, articles, and the like. Contact us if you are in doubt. ; We make no guarantees that this code is fit for...
null
https://raw.githubusercontent.com/kloimhardt/bb-web/c8739d29ecceabf40c0d9e536ca43b78268b8225/examples/guestbook_4.cljs
clojure
--- courses, books, articles, and the like. Contact us if you are in doubt. We make no guarantees that this code is fit for any purpose. Visit for more book information. --- small changes made for use with -web zip archive retrieved from the "Resources" section of -development-with-clojure-third-edition/ file: ...
Excerpted from " Web Development with Clojure , Third Edition " , published by The Pragmatic Bookshelf . Copyrights apply to this code . It may not be used to create training material , (require '[reagent.core :as r] '[ajax.core :refer [GET POST]] '[clojure.string :as string] '[goog.do...
4e97fdde80c43fa988f24571e7de677fa98a8dcf0a992a30da403632f20249bb
dcos/dcos-net
dcos_l4lb_route_mgr.erl
%%%------------------------------------------------------------------- @author sdhillon ( C ) 2016 , < COMPANY > %%% @doc %%% %%% @end Created : 02 . Nov 2016 9:36 AM %%%------------------------------------------------------------------- -module(dcos_l4lb_route_mgr). -author("sdhillon"). -behaviour(gen_server)....
null
https://raw.githubusercontent.com/dcos/dcos-net/7bd01ac237ff4b9a12a020ed443e71c45f7063f4/apps/dcos_l4lb/src/dcos_l4lb_route_mgr.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API gen_server callbacks local table main table =================================================================== API ==============================================...
@author sdhillon ( C ) 2016 , < COMPANY > Created : 02 . Nov 2016 9:36 AM -module(dcos_l4lb_route_mgr). -author("sdhillon"). -behaviour(gen_server). -export([start_link/0, get_routes/2, add_routes/3, remove_routes/3, add_netns/2, remove_netns/2, init_metric...
3f815bcbc6482ed52874b1d297f2077b7142668cfc5299e208fdc34a256f9633
15Galan/asignatura-204
Permutaciones.hs
permutation :: Integer -> Integer -> Integer permutation n r = div (fact n) $ fact (n - r) where fact x = product [1..x]
null
https://raw.githubusercontent.com/15Galan/asignatura-204/894f33ff8e0f52a75d8f9ff15155c656f1a8f771/Recursos/data.structures/haskell/Permutaciones.hs
haskell
permutation :: Integer -> Integer -> Integer permutation n r = div (fact n) $ fact (n - r) where fact x = product [1..x]
cb4a77015e45a8b6d2411338bb5788770f83f573084f186db387a5c921f3c497
cole-k/call-by-push-block
call-by-push-block-ungolfed.hs
module Sokoban where -- This is the basic ungolfed version, although I ended up making significant changes to the golfed version so the two have diverged quite a bit . import Data.List (transpose) sokobanGame :: [[Char]] sokobanGame = lines "@..._\n..o..\n..o..\n_...." main :: IO () main = gameLoop sokobanGame g...
null
https://raw.githubusercontent.com/cole-k/call-by-push-block/365ea21f36f402941f3d15f8a6544a304edaaa80/call-by-push-block-ungolfed.hs
haskell
This is the basic ungolfed version, although I ended up making significant
module Sokoban where changes to the golfed version so the two have diverged quite a bit . import Data.List (transpose) sokobanGame :: [[Char]] sokobanGame = lines "@..._\n..o..\n..o..\n_...." main :: IO () main = gameLoop sokobanGame gameLoop :: [[Char]] -> IO () gameLoop sokoban = do mapM_ putStrLn sokoban ...
81ef3fc56c508e96c391ee2e25c3aa97059c9e3a5f5f0413dd8dd3af6b84892c
lojic/RacketChess
utility.rkt
#lang racket (provide number->delimited) (define (number->delimited n #:include-fraction? [ include-fraction? #t ]) (let* ([ sign (if (negative? n) "-" "") ] [ n (+ (abs n) 0.005) ] [ whole (if include-fraction? (exact-truncate n) ...
null
https://raw.githubusercontent.com/lojic/RacketChess/115ca7fecca9eaf31f9b2f4ef59935372c9920c8/src/utility.rkt
racket
-------------------------------------------------------------------------------------------- Tests -------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------ number->delimited -------------...
#lang racket (provide number->delimited) (define (number->delimited n #:include-fraction? [ include-fraction? #t ]) (let* ([ sign (if (negative? n) "-" "") ] [ n (+ (abs n) 0.005) ] [ whole (if include-fraction? (exact-truncate n) ...
6574511f0ef83f6434e9cd3f341a2f0467ad680ce697b5325dea23d0f54b140b
slindley/dependent-haskell
Edit.hs
{- deprecated {-# INCLUDE <mycurses.h> #-} -} # LANGUAGE ForeignFunctionInterface # -- use flag -lncurses to compile import Foreign import Foreign.C (CInt(..)) import ANSIEscapes import System.IO import System.Environment import Box import CharBox import Cursor data Window = Window type WindowPtr = Ptr Window fore...
null
https://raw.githubusercontent.com/slindley/dependent-haskell/f0ea64b4e50464e8c60c11a82a7f432b0fccf122/PlainBox/Edit.hs
haskell
deprecated {-# INCLUDE <mycurses.h> # use flag -lncurses to compile position in buffer of top left corner of screen, screen size in range, no change
# LANGUAGE ForeignFunctionInterface # import Foreign import Foreign.C (CInt(..)) import ANSIEscapes import System.IO import System.Environment import Box import CharBox import Cursor data Window = Window type WindowPtr = Ptr Window foreign import ccall initscr :: IO () foreign import ccall "endwin" endwin ::...
24fa3b192e93bd6333cef5b07ce964c6d3e81d0fe597a201498309369b105e47
UU-ComputerScience/uhc
Prelude8.hs
This prelude can be compiled by EHC 8 , and contains : * datatypes : , Ordering , [ ] , PackedString , Maybe , Either -- * very polymorphic functions: 9id, flip etc.) -- * functions on lists: (head, ++, filter, foldr etc.) -- * primitives for Int and for this prelude only ( will be removed in Prelude9.hs ) * ...
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/nofib-jvschie/tools/Prelude8.hs
haskell
* very polymorphic functions: 9id, flip etc.) * functions on lists: (head, ++, filter, foldr etc.) * primitives for Int * some overloaded functions specialized to Int ----------------------------------------------------------- Ordering type ------------------------------------------------------------ Lists -----...
This prelude can be compiled by EHC 8 , and contains : * datatypes : , Ordering , [ ] , PackedString , Maybe , Either and for this prelude only ( will be removed in Prelude9.hs ) * classes Eq , Ord , Integral , , specialized to Int infixr 9 . infixl 9 !! infixr 8 ^, ^^, ** infixl 7 *, /, `quot`, `rem`, ...
1cd423cc7576d0646f70120e72766d2b44491609fb1b59a1ff005fedbc4eb0dc
mro/geohash
cgi.ml
* cgi.ml * * Created by on 16.05.20 . * Copyright © 2020 - 2021 mobile Software /~me . All rights reserved . * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , eithe...
null
https://raw.githubusercontent.com/mro/geohash/cec5e8f3ec360a8e2557f6668fbd5a3d03d716c4/lib/cgi.ml
ocaml
-cgi/blob/master/cgi.ml#L169 Almost trivial. request_uri = Os.getenv "REQUEST_URI";
* cgi.ml * * Created by on 16.05.20 . * Copyright © 2020 - 2021 mobile Software /~me . All rights reserved . * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , eithe...
3e603123f3f87e5ed1f2941a294f96480e162bdb15d46f8b7d5516a2e0cfec53
haskell-opengl/OpenGL
VertexArrayObjects.hs
----------------------------------------------------------------------------- -- | Module : Graphics . Rendering . Copyright : ( c ) 2011 - 2019 , 2011 - 2016 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- --------------------------------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGL/f7af8fe04b0f19c260a85c9ebcad612737cd7c8c/src/Graphics/Rendering/OpenGL/GL/VertexArrayObjects.hs
haskell
--------------------------------------------------------------------------- | License : BSD3 Stability : stable Portability : portable --------------------------------------------------------------------------- ---------------------------------------------------------------------------
Module : Graphics . Rendering . Copyright : ( c ) 2011 - 2019 , 2011 - 2016 Maintainer : < > module Graphics.Rendering.OpenGL.GL.VertexArrayObjects ( VertexArrayObject, bindVertexArrayObject ) where import Control.Monad.IO.Class import Data.ObjectName import Data.StateVar import F...
2242c5f012740a89e9369659f550d27d979fd3298a7ca347842083bfad5ef95f
siraben/haoc-2020
day12.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} import Criterion.Main ( defaultMain, bench, bgroup, whnf ) import Data.Foldable ( Foldable(foldl') ) data Orientation = N | E | S | W deriving (Show, Eq, Ord, Enum) type ShipState = ((Int, Int), Orientation) move :: ShipState -> (Char, Int) -> ShipSta...
null
https://raw.githubusercontent.com/siraben/haoc-2020/448fa03b6353b8ea9e17c1d9610222fbfd27f1c8/day12.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # Start working down here
import Criterion.Main ( defaultMain, bench, bgroup, whnf ) import Data.Foldable ( Foldable(foldl') ) data Orientation = N | E | S | W deriving (Show, Eq, Ord, Enum) type ShipState = ((Int, Int), Orientation) move :: ShipState -> (Char, Int) -> ShipState move ((!x, !y), d) ('N', n) = ((x, y + n), d) move ((!x, !y), ...
49f72205a556906d6b8f01f61f104b0764bccedaf27c1e385f2f92bd443c1559
amnh/poy5
pdfimage.mli
(** Extract Images *) type pixel_layout = | BPP1 | BPP8 | BPP24 | BPP48 FIXME : We need to deal with decode and other things for JPEG , if we 're not going to decode them . going to decode them. *) type image = | JPEG of Utility.bytestream | JPEG2000 of Utility.bytestream | JBIG2 of Utili...
null
https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/camlpdf-0.3/pdfimage.mli
ocaml
* Extract Images i (** Similarly, but a bit-packed, rows-padded-to-bytes bytestream.
type pixel_layout = | BPP1 | BPP8 | BPP24 | BPP48 FIXME : We need to deal with decode and other things for JPEG , if we 're not going to decode them . going to decode them. *) type image = | JPEG of Utility.bytestream | JPEG2000 of Utility.bytestream | JBIG2 of Utility.bytestream | Raw ...
9fe8a5564ecff0404c94117653e2da2d91e58f1816f20c20887014db9135a26c
aimacode/aima-lisp
wumpus.lisp
;;; File: wumpus.lisp -*- Mode: Lisp; Syntax: Common-Lisp; -*- The Wumpus World Environment (defstructure (wumpus-world (:include grid-environment (size (@ 6 6)) (aspec '(aimless-wumpus-agent)) (bspec '((at edge wall) (* 1 gold) (* 1 wumpus) (at all (p 0.2 pit)))))) "A dangerous world with pits and wu...
null
https://raw.githubusercontent.com/aimacode/aima-lisp/fbbe545aa3797c031877e62de49a991faff458ed/agents/environments/wumpus.lisp
lisp
File: wumpus.lisp -*- Mode: Lisp; Syntax: Common-Lisp; -*- Defining the generic functions See if anyone died Sounds dissipate Do the normal thing stench breeze glitter bump sound Actions Only effect is to end the game; see termination?
The Wumpus World Environment (defstructure (wumpus-world (:include grid-environment (size (@ 6 6)) (aspec '(aimless-wumpus-agent)) (bspec '((at edge wall) (* 1 gold) (* 1 wumpus) (at all (p 0.2 pit)))))) "A dangerous world with pits and wumpuses, and some gold.") (defstructure (wumpus-agent-body (:in...
bf6d67f92d2a924b9992012492f33766e094debf8832f383d2b50a9989b180ef
backtracking/ocamlgraph
test_johnson.ml
Test file for open Graph module Int = struct type t = int let compare = compare let hash = Hashtbl.hash let equal = (=) let default = 0 end module G = Imperative.Digraph.ConcreteLabeled(Int)(Int) module W = struct type edge = G.E.t type t = int let weight e = G.E.label e let zero = 0 let...
null
https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/tests/test_johnson.ml
ocaml
Test file for open Graph module Int = struct type t = int let compare = compare let hash = Hashtbl.hash let equal = (=) let default = 0 end module G = Imperative.Digraph.ConcreteLabeled(Int)(Int) module W = struct type edge = G.E.t type t = int let weight e = G.E.label e let zero = 0 let...
4d0919951192f1fa2e67da669d4f9897587477d46793d8f573a513e308a97c6b
stabilized/clojurescript
util.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/stabilized/clojurescript/f38f141525576b2a89cde190f25f9cf2fc4c418a/src/clj/cljs/util.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns cljs.util (:require [clojure.java.io :as io] [clojure.string :as string] [clojure.edn :as edn]) (:import [java.io File] [java.net URL])) (def ^:dynamic *clojurescript-version*) (defn ^String clojurescript-version "Returns cloj...
5edf1003d18454b914b27a25f7ce575b026272fda94b677520b43c20aea35943
OCamlPro/freeton_wallet
main.ml
(**************************************************************************) (* *) Copyright ( c ) 2021 OCamlPro SAS (* *) (* All right...
null
https://raw.githubusercontent.com/OCamlPro/freeton_wallet/441f0b5a7c865d8d89d9eb17711235533a9259c4/src/freeton_crawler_db_versions/main.ml
ocaml
************************************************************************ All rights reserved. This file is distributed u...
Copyright ( c ) 2021 OCamlPro SAS Public License version 2.1 , with the special exception on linking let database () = "ftc" let versions = [ 0, from 0 to 1 {| CREATE TABLE freeton_events( serial SERIAL PRIMARY KEY, msg_id VARCHAR NOT NULL UNIQUE, ...
07a79f9ed2d9a423a7f3da93f1c9492f08aaae3060f99a4e715698e211ea1d68
vbmithr/ocaml-binance
test.ml
open Core open Async open Alcotest_async let wrap ?timeout ?(speed=`Quick) n f = test_case ?timeout n speed begin fun () -> f () end let request ?timeout ?(speed=`Quick) ?auth n req = test_case ?timeout n speed begin fun () -> Fastrest.request ?auth req |> Deferred.ignore_m end open Binance open ...
null
https://raw.githubusercontent.com/vbmithr/ocaml-binance/8ee18a9f87423d592a9c9b06a816acb028800fbb/test/test.ml
ocaml
open Core open Async open Alcotest_async let wrap ?timeout ?(speed=`Quick) n f = test_case ?timeout n speed begin fun () -> f () end let request ?timeout ?(speed=`Quick) ?auth n req = test_case ?timeout n speed begin fun () -> Fastrest.request ?auth req |> Deferred.ignore_m end open Binance open ...
b0fc9f04f3e5e877b430fb5fe9bc11c01a4ba0069f2831d5ff48fa3c021b8093
BenjaminVanRyseghem/great-things-done
db.cljs
Copyright ( c ) 2015 , . All rights reserved . ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; t...
null
https://raw.githubusercontent.com/BenjaminVanRyseghem/great-things-done/1db9adc871556a347426df842a4f5ea6b3a1b7e0/src/front/gtd/db.cljs
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. (...
Copyright ( c ) 2015 , . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns gtd.db (:require [gtd.crypto :as crypto] [gtd.platform :as platform] [utils.core :as utils] [utils.date :as date] [utils.keychain :as keychain] [node.fs :as fs...
8dd6703efb5fe3e98b43ed36304e50916f37ba083586363b0b57a92cb887c461
ivanperez-keera/Yampa
Conditional.hs
-- | Module : Copyright : ( c ) , 2014 - 2022 ( c ) , 2007 - 2012 ( c ) , 2005 - 2006 ( c ) and , Yale University , 2003 - 2004 -- License : BSD-style (see the LICENSE file in the distribution) -- -- Maintainer : -- Stability : pr...
null
https://raw.githubusercontent.com/ivanperez-keera/Yampa/e00c94f39ceaa017d0c5f48c5f504da3ee0c15fa/yampa/src/FRP/Yampa/Conditional.hs
haskell
| License : BSD-style (see the LICENSE file in the distribution) Maintainer : Stability : provisional Apply SFs only under certain conditions. * Guards and automata-oriented combinators | Runs a signal function only when a given predicate is satisfied, otherwise runs the other signal function. tr...
Module : Copyright : ( c ) , 2014 - 2022 ( c ) , 2007 - 2012 ( c ) , 2005 - 2006 ( c ) and , Yale University , 2003 - 2004 Portability : non - portable ( GHC extensions ) module FRP.Yampa.Conditional ( provided , pause ) wh...
a4284882c24808d0e1ea5b730319954d39dd1c44420fc796e85ead3ddd8b2887
cyppan/grape
user.clj
(ns user) (defn dev "Load and switch to the 'dev' namespace." [] (require 'dev) (in-ns 'dev))
null
https://raw.githubusercontent.com/cyppan/grape/62488a335542fc58fc9126b8d5ff7fccdd16f1d7/dev/user.clj
clojure
(ns user) (defn dev "Load and switch to the 'dev' namespace." [] (require 'dev) (in-ns 'dev))
d2ae62d7e07004c772e01f2d206e2c089b35f408324f76532d377186f1be426d
no-defun-allowed/lc3-in-lc3
control-flow.lisp
(in-package :lc3) (defmacro with-gentemps ((&rest names) &body body) `(let ,(loop for name in names collect `(,name (gentemp ,(symbol-name name)))) ,@body)) (defmacro with-skip ((name) &body body) (let ((label (gentemp "SKIP"))) `(let ((,name ',label)) ,@body (label ,label)))...
null
https://raw.githubusercontent.com/no-defun-allowed/lc3-in-lc3/666956a36a3e7c5d483f1f3d9c84fe1306d3cf2e/macro-assembler/control-flow.lisp
lisp
Don't bother emitting a jump if this is the last case.
(in-package :lc3) (defmacro with-gentemps ((&rest names) &body body) `(let ,(loop for name in names collect `(,name (gentemp ,(symbol-name name)))) ,@body)) (defmacro with-skip ((name) &body body) (let ((label (gentemp "SKIP"))) `(let ((,name ',label)) ,@body (label ,label)))...
b390d9e881455e8a29f5474c03bf47b27a12d373fcf1581475351fe087f35309
alesya-h/live-components
connection.cljs
(ns live-components.client.connection) (defonce socket (atom nil)) (defn send-msg! [msg] ;; it is safe to ignore messages if socket is not connected, ;; because the only types of messages we have are subscribe/unsubscribe ;; and those will be resent in on-open callback (when (and @socket (= (.-readyState @soc...
null
https://raw.githubusercontent.com/alesya-h/live-components/8ca7f9dcabaa452a67bb18d24a8661e8de83aecc/src/live_components/client/connection.cljs
clojure
it is safe to ignore messages if socket is not connected, because the only types of messages we have are subscribe/unsubscribe and those will be resent in on-open callback
(ns live-components.client.connection) (defonce socket (atom nil)) (defn send-msg! [msg] (when (and @socket (= (.-readyState @socket) js/WebSocket.OPEN)) (.send @socket (js/JSON.stringify (clj->js msg))))) (defn remove-subscription! [url] (println "Removing server subscription for " url) (send-msg! [:unsub...
2ab1c22b4770ba73dd5261a66324b7030b8428283f2ffa556ad939192ef65d16
input-output-hk/project-icarus-importer
UnitOfMeasure.hs
module Cardano.Wallet.API.Types.UnitOfMeasure where import Universum -- | A finite sum type representing time units we might want to show to -- clients. The idea is that whenever we have a quantity represeting some -- form of time, we should render it together with the relevant unit, to -- not leave anythi...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/src/Cardano/Wallet/API/Types/UnitOfMeasure.hs
haskell
| A finite sum type representing time units we might want to show to clients. The idea is that whenever we have a quantity represeting some form of time, we should render it together with the relevant unit, to not leave anything to guessing. | Number of blocks.
module Cardano.Wallet.API.Types.UnitOfMeasure where import Universum data UnitOfMeasure = Seconds | Milliseconds | Microseconds | % ranging from 0 to 100 . | Percentage100 | Blocks | Number of blocks per second . | BlocksPerSecond deriving (Show, Eq) data MeasuredIn (a ::...
4d22e2bf6327b6763274fc14402489eae5121fb6c6b9dc8d2afecd82572cc3b8
clojure-emacs/refactor-nrepl
fully_qualified_macro_usage.clj
(ns com.example.fully-qualified-macro-usage (:require com.example.macro-def com.example.macro-def-cljc)) (defn fully-qualified-macro-usage [] (com.example.macro-def/my-macro :fully-qualified) (com.example.macro-def-cljc/cljc-macro :fully-qualified))
null
https://raw.githubusercontent.com/clojure-emacs/refactor-nrepl/8457b0341fdb220d4cba577ed150565e4d103364/testproject/src/com/example/fully_qualified_macro_usage.clj
clojure
(ns com.example.fully-qualified-macro-usage (:require com.example.macro-def com.example.macro-def-cljc)) (defn fully-qualified-macro-usage [] (com.example.macro-def/my-macro :fully-qualified) (com.example.macro-def-cljc/cljc-macro :fully-qualified))
c70d0d64eed7b93c6e57b38baf068ed4fea8ae72957ca9680d9f5104d77cbe86
cs136/seashell
place.rkt
#lang typed/racket Seashell 's Clang interface . Copyright ( C ) 2013 - 2015 The Seashell Maintainers . ;; ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License ,...
null
https://raw.githubusercontent.com/cs136/seashell/17cc2b0a6d2cdac270d7168e03aa5fed88f9eb02/src/collects/seashell/compiler/place.rkt
racket
This program is free software: you can redistribute it and/or modify (at your option) any later version. See also 'ADDITIONAL TERMS' at the end of the included LICENSE file. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTAB...
#lang typed/racket Seashell 's Clang interface . Copyright ( C ) 2013 - 2015 The Seashell Maintainers . it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (re...
cad8eeb31a55db8058fbe02aacfc6083edf8a6e34e75f5079d17d609255afc38
mattmundell/nightshade
text.lisp
Operations on units of texts , such as paragraphs , sentences , lines , and ;;; words. (in-package "ED") (export '(mark-paragraph paragraph-offset sentence-offset)) #[ English Text Buffers This section describes some routines that understand basic English language forms. {function:ed:word-offset} {function:ed:se...
null
https://raw.githubusercontent.com/mattmundell/nightshade/7a67f9eac96414355de1463ec251b98237cb4009/src/ed/text.lisp
lisp
words. New Variables Paragraph Commands %MARK-TO-PARAGRAPH moves mark to next immediate (current) paragraph in the specified direction. Nil is returned when no paragraph is found. COND must be as it is, and mark must be at the beginning of the line it is on. over a paragraph to find the beginning or end depend...
Operations on units of texts , such as paragraphs , sentences , lines , and (in-package "ED") (export '(mark-paragraph paragraph-offset sentence-offset)) #[ English Text Buffers This section describes some routines that understand basic English language forms. {function:ed:word-offset} {function:ed:sentence-offs...
ecfbedf14728679632c50abb4c748977507f73b7aed5dd1a9aa99bb82179eeaa
Kappa-Dev/KappaTools
product.mli
(** Functor to combine several abstract domains (with explicit communiaction among them) *) module Product: functor (New_domain:Analyzer_domain_sig.Domain) -> functor (Underlying_domain:Analyzer_domain_sig.Domain) -> Analyzer_domain_sig.Domain * The functor is almost symmetric , but better time perfor...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/KaSa_rep/reachability_analysis/product.mli
ocaml
* Functor to combine several abstract domains (with explicit communiaction among them)
module Product: functor (New_domain:Analyzer_domain_sig.Domain) -> functor (Underlying_domain:Analyzer_domain_sig.Domain) -> Analyzer_domain_sig.Domain * The functor is almost symmetric , but better time performances will be obtained by using as a single domain and UNderlying_domain as a ...
ac55209166f7f7e5ac112da9ba15b4864dc3196b9fcd50e5f6fa9d3ba4975755
jeffkreeftmeijer/shine
test_project_erlang.erl
-module(test_project_erlang). -export([hello_world/0]). hello_world() -> "Hello world!".
null
https://raw.githubusercontent.com/jeffkreeftmeijer/shine/dd7703426e30f1cf8d8137b761128a7af42a3c87/test_project_erlang/src/test_project_erlang.erl
erlang
-module(test_project_erlang). -export([hello_world/0]). hello_world() -> "Hello world!".
bc4f7d14d7c5eb840f0c283623658807c0fa6f6d71db17ece8159192f186fb10
polyfy/polylith
interface.clj
(ns polylith.clj.core.git.interface (:require [polylith.clj.core.git.core :as core] [polylith.clj.core.git.tag :as tag])) (def repo core/repo) (def branch core/branch) (defn is-git-repo? [ws-dir] (core/is-git-repo? ws-dir)) (defn init [ws-dir git-repo? branch] (core/init ws-dir git-repo? branch)) ...
null
https://raw.githubusercontent.com/polyfy/polylith/36b75565032dea88ee20cdc0bc5af18f6f4d4cf4/components/git/src/polylith/clj/core/git/interface.clj
clojure
(ns polylith.clj.core.git.interface (:require [polylith.clj.core.git.core :as core] [polylith.clj.core.git.tag :as tag])) (def repo core/repo) (def branch core/branch) (defn is-git-repo? [ws-dir] (core/is-git-repo? ws-dir)) (defn init [ws-dir git-repo? branch] (core/init ws-dir git-repo? branch)) ...
7b54d18fcc86675ece01ec22e3a6473f4e511337700d61c33f158dfbcc9db716
nvim-treesitter/nvim-treesitter
highlights.scm
; Types ;------ (scalar_type_definition (name) @type) (object_type_definition (name) @type) (interface_type_definition (name) @type) (union_type_definition (name) @type) (enum_type_definition (name) @type) (input_object_type_definition (name) @type) (scalar_type_extension (name) @type) (object_typ...
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/67332894efcb6a51a18e1120f2fc242089de7dd1/queries/graphql/highlights.scm
scheme
Types ------ Directives ----------- Properties ----------- Variable Definitions and Arguments ----------------------------------- Constants ---------- Literals --------- Keywords ---------- Punctuation ------------
(scalar_type_definition (name) @type) (object_type_definition (name) @type) (interface_type_definition (name) @type) (union_type_definition (name) @type) (enum_type_definition (name) @type) (input_object_type_definition (name) @type) (scalar_type_extension (name) @type) (object_type_extension (n...
447160d7bd981dd02c062a6d563b24fb4dac9ad7517304eaa50d6a08c09c6a73
eponai/sulolive
chat.cljs
(ns eponai.web.chat (:require [om.next :as om] [eponai.common.database :as db] [eponai.common.shared :as shared] [eponai.client.chat :as chat] [eponai.web.sente :as sente] [taoensso.timbre :refer [debug]])) (defn chat-update-handler [reconciler] (letfn [(has-update [store-id basis-t] ...
null
https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/web/chat.cljs
clojure
(ns eponai.web.chat (:require [om.next :as om] [eponai.common.database :as db] [eponai.common.shared :as shared] [eponai.client.chat :as chat] [eponai.web.sente :as sente] [taoensso.timbre :refer [debug]])) (defn chat-update-handler [reconciler] (letfn [(has-update [store-id basis-t] ...
c7c54c45ee2a0a742a766f44f41ffc3e26cbafcfae5b40185bd12b9f2ffd43f8
circuithub/oso
Main.hs
# language BlockArguments # # language DeriveGeneric # {-# language DerivingVia #-} # language DuplicateRecordFields # # language LambdaCase # # language NamedFieldPuns # {-# language OverloadedStrings #-} # language QuasiQuotes # # language TemplateHaskell # # language TypeApplications # module Main ( main ) where -...
null
https://raw.githubusercontent.com/circuithub/oso/bd21f40396c9558214bb0bedb492cbb30804cd73/tests/Main.hs
haskell
# language DerivingVia # # language OverloadedStrings # aeson base containers oso streaming string-qq text transformers queries. Define our resources
# language BlockArguments # # language DeriveGeneric # # language DuplicateRecordFields # # language LambdaCase # # language NamedFieldPuns # # language QuasiQuotes # # language TemplateHaskell # # language TypeApplications # module Main ( main ) where import Data.Aeson ( FromJSON, ToJSON, Value, toJSON ) import Data...
77d7df40976dbbaaf721009ee1492a506a88641cb6d00cfc73bc369fa269b3a6
janestreet/bonsai
bonsai_chat_open_source_native.ml
open! Core open! Async let initialize_connection _initiated_from _addr _inet connection = { User_state.user = "sample-username"; connection } ;; let respond_string ~content_type ?flush ?headers ?status s = let headers = Cohttp.Header.add_opt headers "Content-Type" content_type in Cohttp_async.Server.respond_str...
null
https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/examples/open_source/rpc_chat/server/src/bonsai_chat_open_source_native.ml
ocaml
open! Core open! Async let initialize_connection _initiated_from _addr _inet connection = { User_state.user = "sample-username"; connection } ;; let respond_string ~content_type ?flush ?headers ?status s = let headers = Cohttp.Header.add_opt headers "Content-Type" content_type in Cohttp_async.Server.respond_str...
d8952965342b3745178eaae412b3350e000c623cf3cdb90b13c40bee6a85164b
liebke/apogee
demo.cljs
(ns examples.demo (:require [apogee.xml :as xml] [apogee.svg :as svg])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ANALEMMA SVG EXAMPLES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (def ^:export ex-group (xml/emit (svg/svg (svg/svg {...
null
https://raw.githubusercontent.com/liebke/apogee/b29e8d71142d666b4656a93da441973c31a28356/src/examples/demo.cljs
clojure
ANALEMMA SVG EXAMPLES -element.html -element.html
(ns examples.demo (:require [apogee.xml :as xml] [apogee.svg :as svg])) (def ^:export ex-group (xml/emit (svg/svg (svg/svg {:x 50 :y 50} (-> (svg/group (-> (svg/line 10 10 85 10) (svg/style :stroke "#006600")) (-> (svg/rect 10 20 50 75) (svg/style :stroke "#006600" :...
6f3815c4b05f0fbf09305eb20dcaa1bfb34208c1017f443d027467947396ba07
rtoy/ansi-cl-tests
subtypep.lsp
;-*- Mode: Lisp -*- Author : Created : We d Jan 29 17:28:19 2003 Contains : Tests of SUBTYPEP (in-package :cl-test) (compile-and-load "types-aux.lsp") More subtypep tests are in types-and-class.lsp (deftest subtypep.order.1 (let ((i 0) x y) (values (notnot (subtypep (progn (setf x (inc...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/subtypep.lsp
lisp
-*- Mode: Lisp -*- Extended characters Some and, or combinations Check that types that are supposed to be nonempty are not subtypes of NIL
Author : Created : We d Jan 29 17:28:19 2003 Contains : Tests of SUBTYPEP (in-package :cl-test) (compile-and-load "types-aux.lsp") More subtypep tests are in types-and-class.lsp (deftest subtypep.order.1 (let ((i 0) x y) (values (notnot (subtypep (progn (setf x (incf i)) t) ...
d8ad09bf9444ae9376ae62a6e4f8aa8c38735ad5c7d825b00e30ee2c242fa3e3
alanz/ghc-exactprint
TH_unresolvedInfix_Lib.hs
# LANGUAGE TypeOperators # # LANGUAGE NoStarIsType # module TH_unresolvedInfix_Lib where import Language.Haskell.TH import Language.Haskell.TH.Lib import Language.Haskell.TH.Quote infixl 6 :+ infixl 7 :* data Tree = N | Tree :+ Tree | Tree :* Tree -- custom instance, including redundant parentheses instance Sh...
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc810/TH_unresolvedInfix_Lib.hs
haskell
custom instance, including redundant parentheses VarE versions ------------------------------------------------------------------------------ Patterns -- ------------------------------------------------------------------------------ ------------ Compl...
# LANGUAGE TypeOperators # # LANGUAGE NoStarIsType # module TH_unresolvedInfix_Lib where import Language.Haskell.TH import Language.Haskell.TH.Lib import Language.Haskell.TH.Quote infixl 6 :+ infixl 7 :* data Tree = N | Tree :+ Tree | Tree :* Tree instance Show Tree where show N = "N" show (a :+ b) = "(" +...
d010b13d8642f4cae107085089c39fce718d5c6b07fa0b33a5c3e5cd37e436b9
metametadata/cljs-elmish-todomvc
todos.cljs
(ns unit.todos (:require [unit.utils :as u] [cljs.test :as ct :refer-macros [deftest is testing]] [clojure.test.check.generators :as gen :include-macros true] [com.gfredericks.test.chuck.clojure-test :refer-macros [checking]] [cljs.core.match :refer-macros [match]])) ;;;;;;;;;;;;;;;; Customize re...
null
https://raw.githubusercontent.com/metametadata/cljs-elmish-todomvc/2466d0cccf6fb5147a0e108960f378038c7cea88/test/unit/todos.cljs
clojure
Customize reporting of test.chuck Property Tests title is hardcoded, because we are not interested in testing different string values (println (count signals)) Stateful Property Tests setup {<id> <completed?>} returns modified test-model depending on handled signal based on current test model returns a generato...
(ns unit.todos (:require [unit.utils :as u] [cljs.test :as ct :refer-macros [deftest is testing]] [clojure.test.check.generators :as gen :include-macros true] [com.gfredericks.test.chuck.clojure-test :refer-macros [checking]] [cljs.core.match :refer-macros [match]])) (defmethod ct/report [::ct/de...
03dfbcdfdcd61ee0708165a8f0bd310811b32d454f22686f5b08b8bc6e6103f4
mauke/data-default
Containers.hs
Copyright ( c ) 2013 All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : * Redistributions of source code must retain the above copyright notice , this list of conditions and the follo...
null
https://raw.githubusercontent.com/mauke/data-default/b1a08788ca3d6a714319726e3768cf93df92458e/data-default-instances-containers/Data/Default/Instances/Containers.hs
haskell
| This module defines 'Default' instances for the types 'S.Set', 'M.Map',
Copyright ( c ) 2013 All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : * Redistributions of source code must retain the above copyright notice , this list of conditions and the follo...
347f7f919fbe6643a9e3d43d64fa5adaf6e5c4d3f27c2ad3ee27e80a9cb58eec
borodust/alien-works
math.lisp
(cl:in-package :%alien-works.filament) ;;; VEC4 ;;; (defun vec4f (vec idx) (cffi:mem-ref (%filament::math+details+operator[] '(claw-utils:claw-pointer %filament::math+details+t-vec4<float>) vec '%filament::size-t idx) :float)) (defun (setf vec4f) (value vec idx) ...
null
https://raw.githubusercontent.com/borodust/alien-works/8e15ca1d7000b1ae287b458185f53dc9ad019f56/src/graphics/filament/math.lisp
lisp
VEC3 VEC2 MAT3
(cl:in-package :%alien-works.filament) VEC4 (defun vec4f (vec idx) (cffi:mem-ref (%filament::math+details+operator[] '(claw-utils:claw-pointer %filament::math+details+t-vec4<float>) vec '%filament::size-t idx) :float)) (defun (setf vec4f) (value vec idx) (let (...
228629f3d5f20c72b0102c0bfffd65a7a65edcc8c3f0bfba370f1efb809dbf1b
expipiplus1/vulkan
VK_EXT_vertex_input_dynamic_state.hs
{-# language CPP #-} -- | = Name -- -- VK_EXT_vertex_input_dynamic_state - device extension -- -- == VK_EXT_vertex_input_dynamic_state -- -- [__Name String__] @VK_EXT_vertex_input_dynamic_state@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] 353 -- -- [__Revision_...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Extensions/VK_EXT_vertex_input_dynamic_state.hs
haskell
# language CPP # | = Name VK_EXT_vertex_input_dynamic_state - device extension == VK_EXT_vertex_input_dynamic_state [__Name String__] [__Extension Type__] Device extension [__Registered Extension Number__] [__Revision__] [__Extension and Version Dependencies__] - Requires @VK_KHR_get_physic...
@VK_EXT_vertex_input_dynamic_state@ 353 2 - Requires support for Vulkan 1.0 - 2020 - 08 - 21 - , NVIDIA - , Samsung - , AMD One of the states that contributes to the combinatorial explosion of state in ' Vulkan . Core10.Pipeline . Pipeline...
ca4506463d2646484f4427b48798b735826c476731a87962d3f693bc03ba845a
clojure-quant/infra-guix
tailscale.scm
(define-module (awb99 package tailscale) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (gnu packages base) #:use-module (guix download) #:use-module (guix utils) #:use-module (gnu packages gcc) #:use-module (gnu packages compression) #:use-module (nonguix build-system binary...
null
https://raw.githubusercontent.com/clojure-quant/infra-guix/1df1e676a852ca26d6d4453355c1e1c414970d05/modules/awb99/package/tailscale.scm
scheme
guix build -f ./modules/awb99/package/tailscale.scm "${V}_${ARCH}.tgz" tar -xf `(("tailscale_1.32.2_amd64/tailscaled" ("libc" "zlib" "libstdc++"))) #:phases (modify-phases %standard-phases ;; this is required because standard unpack expects ;; the archive to contain a directory with everything inside it,...
(define-module (awb99 package tailscale) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (gnu packages base) #:use-module (guix download) #:use-module (guix utils) #:use-module (gnu packages gcc) #:use-module (gnu packages compression) #:use-module (nonguix build-system binary...
1bc982527d3b3ec374dbb254661b4734008a2b118c059cfdc4b443ee2ae099fa
gedge-platform/gedge-platform
rabbit_sharding_interceptor.erl
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 /. %% Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_sharding_interceptor). -include_l...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_sharding/src/rabbit_sharding_interceptor.erl
erlang
exported for tests Since as an interceptor we can't modify what the channel will return, we then modify the queue name so the channel can at least return a queue.declare_ok for that particular arbitrary. ---------------------------------------------------------------------------- If the queue is not part of a s...
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 /. Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_sharding_interceptor). -include_lib("ra...
60f1c94eae3d796ad6a8b1311dba7eb082dd5d1842af31fdb78c7e79c17b2e6a
ktakashi/sagittarius-scheme
image.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; win32/gui/image.scm - Win32 Image component ;;; Copyright ( c ) 2021 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1....
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/c35b31237d6c7c876c4448bb9d1eeddc3904d29e/ext/ffi/win32/gui/image.scm
scheme
coding : utf-8 ; -*- win32/gui/image.scm - Win32 Image component Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this l...
Copyright ( c ) 2021 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING #!nounbound (library (win32 gui image) (export ...
cdc473db0dd126bb97cbf975c6bed5816716bbc7ba41757c297cd8e1810970c5
squest/clojure-tutorial
two.clj
(ns pratwo.two (:require [pratwo.core :refer :all] [pratwo.one :refer [mapin] :as one])) (defn another-one [] (mapin 10)) (defn pake-one [] (one/mapin 10)) (defn semua [] (+ (cube 100) (square 20)))
null
https://raw.githubusercontent.com/squest/clojure-tutorial/5cf97832cb226928f63f043a56328c9a79c4a321/pratwo/src/pratwo/two.clj
clojure
(ns pratwo.two (:require [pratwo.core :refer :all] [pratwo.one :refer [mapin] :as one])) (defn another-one [] (mapin 10)) (defn pake-one [] (one/mapin 10)) (defn semua [] (+ (cube 100) (square 20)))
3be7774bc67af6b592afc3230f63b12f16273d051262b89aa2b9203670cdef56
zadean/xqerl
math_atan_SUITE.erl
-module('math_atan_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(['math-atan-001'/1]). -export(['math-atan-002'/1]). -export(['math-atan-003'/1]). -exp...
null
https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/math/math_atan_SUITE.erl
erlang
-module('math_atan_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(['math-atan-001'/1]). -export(['math-atan-002'/1]). -export(['math-atan-003'/1]). -exp...
c91fbd2ceb72b19df10b3d203d322bd0b73707cbc39195af9f2e27fe2a076b26
Helium4Haskell/helium
PMC13.hs
module PMC13 where main :: Int main = a [1, 2, 3] a :: [Int] -> Int a [1,2,3] = 4
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/correct/PMC13.hs
haskell
module PMC13 where main :: Int main = a [1, 2, 3] a :: [Int] -> Int a [1,2,3] = 4
0a63b021407f164c32c0166a7805f0a808943a5897156922c17eed85409889f6
bobot/FetedelascienceINRIAsaclay
labyrinth.ml
File : labyrinth.ml Copyright ( C ) 2008 < > < > WWW : / This library is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.1 or later as published by the Free Software Foundation , with the special ...
null
https://raw.githubusercontent.com/bobot/FetedelascienceINRIAsaclay/87765db9f9c7211a26a09eb93e9c92f99a49b0bc/2010/robot/examples_mindstorm_lab/labyrinth/labyrinth.ml
ocaml
************************************************************************ * Implementation ************************************************************************ For the current realisation, it is enough but in general a more extensible datastructure is needed. We have chosen this for ...
File : labyrinth.ml Copyright ( C ) 2008 < > < > WWW : / This library is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.1 or later as published by the Free Software Foundation , with the special ...
cecf2ba48e7a85f10413d5f289a6ac925d67cdb7918c2694de32c1d77ccf6ab7
huangz1990/SICP-answers
test-29-mobile-represent.scm
(load "test-manager/load.scm") (load "29-mobile-represent.scm") (define left (make-branch 10 25)) (define right (make-branch 5 20)) (define mobile (make-mobile left right)) (define-each-check (eq? (left-branch mobile) left) (eq? (right-branch mobile) right) (= (branch-length (rig...
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/test-29-mobile-represent.scm
scheme
(load "test-manager/load.scm") (load "29-mobile-represent.scm") (define left (make-branch 10 25)) (define right (make-branch 5 20)) (define mobile (make-mobile left right)) (define-each-check (eq? (left-branch mobile) left) (eq? (right-branch mobile) right) (= (branch-length (rig...
06ddbb1a82c39b8f5dcb81e0242ab32d5cef6afbcf686421100595fd95426483
lspitzner/brittany
Test453.hs
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } module Main ( main -- main , test1 , test2 Test 3 , test3 , test4 Test 5 , test5 Test 6 ) where
null
https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test453.hs
haskell
brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } main
module Main ( main , test1 , test2 Test 3 , test3 , test4 Test 5 , test5 Test 6 ) where
79ba2a708d2ecf7046125d7150f2d6e7670084faea0046a1c222cf32b4f7bdce
lpgauth/swirl
swirl_sup.erl
-module(swirl_sup). -include("swirl.hrl"). %% internal -export([ start_link/0 ]). -behaviour(supervisor). -export([ init/1 ]). %% internal -spec start_link() -> {ok, pid()}. start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). %% supervisor callbacks init([]) -> Workers = [ ...
null
https://raw.githubusercontent.com/lpgauth/swirl/0b6cbe6979d65d28c17fa13b7dbc798e9413806a/src/swirl_sup.erl
erlang
internal internal supervisor callbacks
-module(swirl_sup). -include("swirl.hrl"). -export([ start_link/0 ]). -behaviour(supervisor). -export([ init/1 ]). -spec start_link() -> {ok, pid()}. start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> Workers = [ ?CHILD(swirl_ets_manager, worker), ?CHIL...
b683e967bf2d2c252559dda92e8a8bcfea5e7fdd7fac64bfc76c38bdc6b0a593
portkey-cloud/aws-clj-sdk
_2016-08-01.clj
(ns portkey.aws.cloudfront.-2016-08-01 (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "cloudfront", :region "us-east-1"}, :ssl-common-name "cloudfront.amazonaws.com", :endpoint "", :signature-version :v4}, "eu-west-1" {:credential-scope {:service "cloudf...
null
https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/cloudfront/_2016-08-01.clj
clojure
(ns portkey.aws.cloudfront.-2016-08-01 (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "cloudfront", :region "us-east-1"}, :ssl-common-name "cloudfront.amazonaws.com", :endpoint "", :signature-version :v4}, "eu-west-1" {:credential-scope {:service "cloudf...
e1936bea520ef0c70cc8c900ceb395aa75aa535884fbbf1a27ca125da970bdf3
liquidz/antq
json_test.clj
(ns antq.report.json-test (:require [antq.report :as report] [antq.report.json] [antq.test-helper :as h] [clojure.data.json :as json] [clojure.string :as str] [clojure.test :as t])) (t/deftest json-reporter-test (let [deps [(h/test-dep {:file "a" :name "foo" :version "1" :latest-version "2"}) ...
null
https://raw.githubusercontent.com/liquidz/antq/ca8472b28702f5e568492001bc476fb09e5b2e6b/test/antq/report/json_test.clj
clojure
(ns antq.report.json-test (:require [antq.report :as report] [antq.report.json] [antq.test-helper :as h] [clojure.data.json :as json] [clojure.string :as str] [clojure.test :as t])) (t/deftest json-reporter-test (let [deps [(h/test-dep {:file "a" :name "foo" :version "1" :latest-version "2"}) ...
ac8c492eb07d0d8217dfd41b80c20071a3879eb960e73485f9fbed41bec335c3
seckcoder/course-compiler
s0_8.rkt
(let ([x 20]) (+ (let ([x 22]) x) x))
null
https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s0_8.rkt
racket
(let ([x 20]) (+ (let ([x 22]) x) x))
7ed2497b2e1d18f0c9338c48bc888e0e971b1417137ec11005cd9da14a764737
pheaver/netlist-verilog
GenVerilog.hs
-------------------------------------------------------------------------------- -- | Module : Language . Netlist . Copyright : ( c ) Signali Corp. 2010 -- License : All rights reserved -- Maintainer : -- Stability : experimental -- Portability : non-portable (DeriveDataTypeable) -- ...
null
https://raw.githubusercontent.com/pheaver/netlist-verilog/9bc9e7864f64fadf74dffd628243cc2543abcd8d/netlist-to-verilog/Language/Netlist/GenVerilog.hs
haskell
------------------------------------------------------------------------------ | License : All rights reserved Stability : experimental Portability : non-portable (DeriveDataTypeable) ------------------------------------------------------------------------------ TODO: endianness - currently we're har...
Module : Language . Netlist . Copyright : ( c ) Signali Corp. 2010 Maintainer : Translate a Netlist AST into a Verilog AST . The @netlist@ package defines the Netlist AST and the @verilog@ package defines the Verilog AST . Not every Netlist AST is compatible with Verilog . For exampl...
6b3bfb8c762b8dd642d8c042ca995489768f389801082d0872f0dee0adedd4c7
discus-lang/ddc
ToTetra.hs
module DDC.Driver.Command.Flow.ToTetra ( cmdFlowToTetraFromFile , cmdFlowToTetraCoreFromFile , cmdFlowToTetraCoreFromString , pipelineFlowToTetra) where import DDC.Driver.Stage import DDC.Driver.Config import DDC.Driver.Interface.Source import DDC.Build.Pipeline import DDC.Build.Languag...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-driver/DDC/Driver/Command/Flow/ToTetra.hs
haskell
----------------------------------------------------------------------------- The output is printed to @stdout@. Any errors are thrown in the `ExceptT` monad. ^ Driver config. ^ Config for the lowering transform. ^ Module file path. Don't know how to convert this file. ---------------------------------------...
module DDC.Driver.Command.Flow.ToTetra ( cmdFlowToTetraFromFile , cmdFlowToTetraCoreFromFile , cmdFlowToTetraCoreFromString , pipelineFlowToTetra) where import DDC.Driver.Stage import DDC.Driver.Config import DDC.Driver.Interface.Source import DDC.Build.Pipeline import DDC.Build.Languag...
e50a268adea3f733ca0eff700904c854d8ef3c4bf1cd83649b6338d5a8c96c44
gjord/gwern.net
Feed.hs
Copyright ( C ) 2009 < > and < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . This program is dis...
null
https://raw.githubusercontent.com/gjord/gwern.net/ea0bfea955d8e4c0c805728df7a2a48fb967ce3d/Feed.hs
haskell
TODO: this boilerplate can be removed by changing Data.FileStore.Types to say data Change = Modified {extract :: FilePath} | Deleted {extract :: FilePath} | Added {extract :: FilePath} TODO: figure out how to create diff links in a non-broken manner diff :: String -> String -> Revision -> Link di...
Copyright ( C ) 2009 < > and < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . This program is dis...
2e8b1b7188455a90b292f689f5327045f4e75377af6fc7e9bf6f982f2cbb777a
whitequark/ocaml-expat
unittest.ml
(***********************************************************************) The OcamlExpat library (* *) Copyright 2002 , 2003 . All rights reserved . See (* LICENCE for details. ...
null
https://raw.githubusercontent.com/whitequark/ocaml-expat/14879cf7b20351655abb6adc91462fd9d6ceaf65/unittest.ml
ocaml
********************************************************************* LICENCE for details. ********************************************************************* All errors except XML_ERROR_NONE (Sho...
The OcamlExpat library Copyright 2002 , 2003 . All rights reserved . See open Bytes open Expat open OUnit let xml_errors = [NO_MEMORY; SYNTAX; NO_ELEMENTS; INVALID_TOKEN; UNCLOSED_TOKEN; PARTIAL_CHAR; TAG_MISMATCH; DUPLICATE_ATTRIBUTE; JUNK_AFTER_DOC_ELE...
70187238c712c0086c4d10254b964b20750f8ca24a34ec96e82d9e5312b0a412
sharplispers/montezuma
segment-merge-info.lisp
(in-package #:montezuma) (defclass segment-merge-info () ((base :initarg :base :reader base) (term-enum :initarg :term-enum :reader term-enum) (reader :initarg :reader) (postings :initform '()) (term-buffer :reader term-buffer) (doc-map :initform nil))) (defmethod initialize-instance :after ((self se...
null
https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/src/index/segment-merge-info.lisp
lisp
(in-package #:montezuma) (defclass segment-merge-info () ((base :initarg :base :reader base) (term-enum :initarg :term-enum :reader term-enum) (reader :initarg :reader) (postings :initform '()) (term-buffer :reader term-buffer) (doc-map :initform nil))) (defmethod initialize-instance :after ((self se...
71dc7b2e31574950893c45e319b53eb3587756cbb1c559b39828bd21cc6439e1
mirage/mirage-nat
unikernel.ml
open Lwt.Infix module Main our unikernel is functorized over the physical , ethernet , ARP , and IPv4 modules for the public and private interfaces , so each one shows up as a module argument . modules for the public and private interfaces, so each one shows up as a module argument. *...
null
https://raw.githubusercontent.com/mirage/mirage-nat/5e91cb985edd3a8585fe8b114953985c8feaced2/example/unikernel.ml
ocaml
configure logs, so we can use them later We'll need to make routing decisions on both the public and private interfaces. the specific impls we're using show up as arguments to start. if writing a packet into a given memory buffer failed, log the failure, pass information on how much was written ...
open Lwt.Infix module Main our unikernel is functorized over the physical , ethernet , ARP , and IPv4 modules for the public and private interfaces , so each one shows up as a module argument . modules for the public and private interfaces, so each one shows up as a module argument. *...
4a2ddf47044df15247a89d3e7174ca3682a6cda01fa1095bc46fedf90b64c20f
byorgey/comprog-hs
BinarySearch.hs
-- -programming-in-haskell-better-binary-search/ -- -search-over-floating-point-representations/ -- module BinarySearch where import Data.Bits import Data.Word (Word64) import Unsafe.Coerce (unsafeCoerce) -- | Generic search function. Takes a step function, a predicate, and -- l...
null
https://raw.githubusercontent.com/byorgey/comprog-hs/27948312fa46403f0756109b08a5233fa415b9b9/BinarySearch.hs
haskell
-programming-in-haskell-better-binary-search/ -search-over-floating-point-representations/ | Generic search function. Takes a step function, a predicate, and low and high values, and it finds values (l,r) right next to each other where the predicate switches from False to True. - PRECONDITIONS: ...
module BinarySearch where import Data.Bits import Data.Word (Word64) import Unsafe.Coerce (unsafeCoerce) More specifically , for @search mid p l r@ : - @(p l)@ must be @False@ and @(p r)@ must be @True@ ! - If using one of the binary search step functions , the ...
2125a6ef834a31a3d63372c35459a21f2e4c91a98a27278a77bbefc64fbc6994
disco-lang/disco
SubQual.hs
# LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE DeriveFunctor # {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE GADTs # 26 May 2018 . Study for ...
null
https://raw.githubusercontent.com/disco-lang/disco/68b96b233b04f26229fe6277678eeb8710422523/explore/sub%2Bqual/SubQual.hs
haskell
# LANGUAGE PatternSynonyms # # LANGUAGE DeriveGeneric # bidirectional checker with constraint generation. ---------------------------------------------------------- Atomic types ---------------------------------------------------------- ---------------------------------------------------------- Type st...
# LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE GADTs # 26 May 2018 . Study for disco type system . STLC extended with arithmetic , subtyping , and type qu...
518916356481018581e100ce399a9b38a6e00358853af6b2d75f137dc8444c24
input-output-hk/cardano-sl
LogReaderOptions.hs
# LANGUAGE ScopedTypeVariables # -- | Command line options of pos-node. module LogReaderOptions ( Args (..) , argsParser ) where import Data.Monoid ((<>)) import Options.Applicative.Simple (Parser, help, long, metavar, short, showDefault, some, strOption,...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/networking/bench/LogReader/LogReaderOptions.hs
haskell
| Command line options of pos-node.
# LANGUAGE ScopedTypeVariables # module LogReaderOptions ( Args (..) , argsParser ) where import Data.Monoid ((<>)) import Options.Applicative.Simple (Parser, help, long, metavar, short, showDefault, some, strOption, value) data Args = Args { inputFi...
121d48eb9d429407d076723125bbddc7d04c8e511ca2229d3e3ddb34e11299ac
disco-lang/disco
STLCProvenance.hs
A version of the STLC extended with pairs and natural number -- arithmetic, with constraint-based type -- checking/inference/reconstruction, and tracking provenance of -- constraints and errors, in order to produce informative/explorable -- error messages. # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleInstan...
null
https://raw.githubusercontent.com/disco-lang/disco/68b96b233b04f26229fe6277678eeb8710422523/explore/provenance/STLCProvenance.hs
haskell
arithmetic, with constraint-based type checking/inference/reconstruction, and tracking provenance of constraints and errors, in order to produce informative/explorable error messages. # LANGUAGE GADTs # # LANGUAGE TemplateHaskell # # LANGUAGE TypeSynonymInstances # ------------------------------...
A version of the STLC extended with pairs and natural number # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleInstances # module STLCProvenance where import Parsing2 import qualified Data.Set as S import Data.Tree import Data.Monoid ((<>)) import Control.Arrow ((**...
67333498523d21012cfd5671b8ac9bef67404f6c4d6c699abb3842d75c05cbd0
hanshuebner/vlm
tranrule.lisp
-*- Package : ALPHA - AXP - INTERNALS ; Syntax : Common - Lisp ; Mode : LISP ; Base : 10 ; Lowercase : Yes -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Translation support for SetSpToAddressHW instruction ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ( ...
null
https://raw.githubusercontent.com/hanshuebner/vlm/20510ddc98b52252a406012a50a4d3bbd1b75dd0/translator/tranrule.lisp
lisp
Syntax : Common - Lisp ; Mode : LISP ; Base : 10 ; Lowercase : Yes -*- (do-default instn)) #o0151 restore TOS (do-default instn)) #o0152 get TOS cached. store TOS now pop Translation support for PushHW instruction #o0100 #o0340 get TOS cached. Translation support for MovemHW ins...
Translation support for SetSpToAddressHW instruction ( def - halfword - translation SetSpToAddressHW ( instn ) (compute-operand-address instn 'iSP) Translation support for SetSpToAddressSaveTosHW instruction ( def - halfword - translation SetSpToAddressSaveTosHW ( instn ) (multiple-value-bind ...
48e4a372a1fca532be2ca33ebdaef92e27f567db5bfd026a59b59d9926d1b3dc
pflanze/chj-schemelib
write-csv.scm
Copyright 2016 - 2018 by < > ;;; This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License ( GPL ) as published by the Free Software Foundation , either version 2 of the License , or ;;; (at your option) any later version. (require eas...
null
https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/write-csv.scm
scheme
This file is free software; you can redistribute it and/or modify (at your option) any later version. -separated_values #\, #\:]) #\, #\:) #t) -detect-CSV-separator : "Rules for writing CSV files are pretty simple: If value contains separator character or new line character or begins with a quote – ...
Copyright 2016 - 2018 by < > it under the terms of the GNU General Public License ( GPL ) as published by the Free Software Foundation , either version 2 of the License , or (require easy (oo-util-lazy iseq?) U eol csv-defaults (char-util char-alphanumeric+?) test safe - fx error) (ex...
083b9664ecdd3e8f9b961a0a7807100f4753386685017e6efc1a8515990d7906
jessealama/laramie
rcdata.rkt
#lang racket/base (require racket/require (multi-in ".." ("types.rkt" "tokenize.rkt" "tokens.rkt" "rcdata.rkt" "parameters.rkt"))) (module+ test (require rackunit syntax/parse/define)) (module+ te...
null
https://raw.githubusercontent.com/jessealama/laramie/89dee24f6977d668ee1e1ae958c5644d1d15be2c/laramie-lib/laramie/tokenizer/tests/rcdata.rkt
racket
))
#lang racket/base (require racket/require (multi-in ".." ("types.rkt" "tokenize.rkt" "tokens.rkt" "rcdata.rkt" "parameters.rkt"))) (module+ test (require rackunit syntax/parse/define)) (module+ te...
c7fa6fd6046d53246cb11ea7eea120f2b28d2004f198519b3faec422577fd76b
scalaris-team/scalaris
lb_psv_split.erl
2010 - 2011 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software d...
null
https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/lb_psv_split.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2010 - 2011 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > Splits loads in half , if there is no load address ranges are split -module(lb_psv_split). -author(''). -v...
ef6cb404345f8bf0dda5e115bac8971e2892299781db1ba87647da3a9b9aa889
goldfirere/video-resources
Vec.hs
# LANGUAGE DataKinds , StandaloneKindSignatures , GADTs , StandaloneDeriving , DerivingStrategies # StandaloneDeriving, DerivingStrategies #-} # OPTIONS_GHC -Wall -Wno - unticked - promoted - constructors -Wno - unused - imports # module Vec where import Data.Kind ( Type ) import Prelude (...
null
https://raw.githubusercontent.com/goldfirere/video-resources/8bc06dd701f308564c13ac1b802f8812158636d0/2021-04-13-vectors/after/Vec.hs
haskell
-- these are pretty straightforward: and these are a little harder : these are a little harder: these need fancy type families ( quite hard ): these need existentials : these need Fin : these need custom GADTs to encode the right conditions : these need fancy type families (quite hard): these need existe...
# LANGUAGE DataKinds , StandaloneKindSignatures , GADTs , StandaloneDeriving , DerivingStrategies # StandaloneDeriving, DerivingStrategies #-} # OPTIONS_GHC -Wall -Wno - unticked - promoted - constructors -Wno - unused - imports # module Vec where import Data.Kind ( Type ) import Prelude (...
1cc7bd13e6b3fe67221b6174665762d60e5daf44c03bfb8e04bc7e4ce7789bb3
GaloisInc/HaLVM
OtherDomain.hs
Copyright 2013 Galois , Inc. This software is distributed under a standard , three - clause BSD license . -- Please see the file LICENSE, distributed with this software, for specific -- terms and conditions. -- |Various routines for doing things to other domains. Running these will -- almost certainly require a non...
null
https://raw.githubusercontent.com/GaloisInc/HaLVM/3ec1d7e4b6bcb91304ba2bfe8ee280cb1699f24d/src/HALVMCore/Hypervisor/OtherDomain.hs
haskell
Please see the file LICENSE, distributed with this software, for specific terms and conditions. |Various routines for doing things to other domains. Running these will almost certainly require a non-default security policy. mapping update. again, that the return value is a list of machine frame numbers, not a lis...
Copyright 2013 Galois , Inc. This software is distributed under a standard , three - clause BSD license . module Hypervisor.OtherDomain( allocForeignMachineFrames , updateOthersVAMapping , allocPortForDomain , setDomainMaxMemory , TLBEffect(..) , TLBTarget(..) ) w...
70cbbbe306f4cd3eab184906259f5ba0054dfb8472b89d44e81b845bd50167ae
nikodemus/raylisp
wood.lisp
by Nikodemus Siivola < > , 2009 . ;;;; ;;;; Permission is hereby granted, free of charge, to any person ;;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , ;;;; including without limitation the rights to use, copy, modify, m...
null
https://raw.githubusercontent.com/nikodemus/raylisp/f79f61c6df283baad265dfdc207d798b63ca19a9/patterns/wood.lisp
lisp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files including without limitation the rights to use, copy, modify, merge, subject to the following conditions: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF IN NO EVEN...
by Nikodemus Siivola < > , 2009 . ( the " Software " ) , to deal in the Software without restriction , publish , distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ...
d1ddd044fe2cb7d99b61766109c946e385bfbc23018c2cae16aaa90084995536
KavrakiLab/tmkit
util.lisp
(in-package :tmsmt) (defvar *resolution* .1) (defvar *refine-functions* (make-hash-table :test #'equal)) (defvar *scene-state-function*) (defvar *goal-state-function*) (defvar *scene-objects-function*) (defvar *refine-operator-function*) (defvar *constraint-function*) (defparameter *tmsmt-root* (make-pathname :d...
null
https://raw.githubusercontent.com/KavrakiLab/tmkit/4fb6fc0fa02c5b242dfcbe0013d3c1178e9d9224/lisp/util.lisp
lisp
a valid s-expression will never EQ this (declaim (inline fold)) (defun fold (function initial-value sequence &rest more-sequences) (apply #'sycamore::fold function initial-value sequence more-sequences)) `(let ((,sym1 ,compare-exp-1)) (declare (fixnum ,sym1)) ,compare-exp-2 ,sym1)...
(in-package :tmsmt) (defvar *resolution* .1) (defvar *refine-functions* (make-hash-table :test #'equal)) (defvar *scene-state-function*) (defvar *goal-state-function*) (defvar *scene-objects-function*) (defvar *refine-operator-function*) (defvar *constraint-function*) (defparameter *tmsmt-root* (make-pathname :d...
6d9be1df1d6f1b225a0009c9ef66a8abfa5c06e11ebfb4064d744c085385d9b6
jpmonettas/flow-storm-debugger
websocket.clj
(ns flow-storm.debugger.websocket (:require [flow-storm.utils :refer [log log-error]] [flow-storm.json-serializer :as serializer] [mount.core :as mount :refer [defstate]] [flow-storm.debugger.config :refer [config]] [flow-storm.debugger.events-queue]) (:import [org.ja...
null
https://raw.githubusercontent.com/jpmonettas/flow-storm-debugger/6a8f3d1957314ebdeef36e365bab09f68aa5bdff/src-dbg/flow_storm/debugger/websocket.clj
clojure
TODO: we should report errors to callers if we don't have this we get Address already in use when starting twice in a row wait for the websocket to be ready before finishing this subsystem start just to avoid weird race conditions
(ns flow-storm.debugger.websocket (:require [flow-storm.utils :refer [log log-error]] [flow-storm.json-serializer :as serializer] [mount.core :as mount :refer [defstate]] [flow-storm.debugger.config :refer [config]] [flow-storm.debugger.events-queue]) (:import [org.ja...
815046679775a9b7e0231581bfbae25450a4b0f9f4de523ba250aeb4341eac16
ulricha/dsh
Unused.hs
# LANGUAGE TemplateHaskell # Based on the ReqColumns property , remove columns or entire operators which produce value vectors but whose payload output is not needed downstream . This is of course only sound if the operator in question does not change the vertical layout . produce value vectors but whose pay...
null
https://raw.githubusercontent.com/ulricha/dsh/e6cd5c6bea575e62a381e89bfc4cc7cb97485106/src/Database/DSH/VSL/Opt/Rewrite/Unused.hs
haskell
unusedProject Do n't remove top - level projections . They ensure that all required columns required for the result type are actually there . Don't remove top-level projections. They ensure that all required columns required for the result type are actually there.
# LANGUAGE TemplateHaskell # Based on the ReqColumns property , remove columns or entire operators which produce value vectors but whose payload output is not needed downstream . This is of course only sound if the operator in question does not change the vertical layout . produce value vectors but whose pay...
61095a2eedf74c4465cd52c69bd3f5ed096350f19193c67c79060a9f97f8b34b
comtihon/social_network_example
sn_facebook.erl
%%%------------------------------------------------------------------- @author tihon ( C ) 2017 , < COMPANY > %%% @doc This module is responsible for working with Facebook service . %%% It is not big, so no need to split it to manager and logic. %%% @end %%%-------------------------------------------------------...
null
https://raw.githubusercontent.com/comtihon/social_network_example/eed32f43947fc8d88c41e38fc2d31d2371be0c2b/src/services/sn_facebook.erl
erlang
------------------------------------------------------------------- @doc It is not big, so no need to split it to manager and logic. @end ------------------------------------------------------------------- API
@author tihon ( C ) 2017 , < COMPANY > This module is responsible for working with Facebook service . -module(sn_facebook). -author("tihon"). -export([check_token/2, get_friends/1]). -spec check_token(integer(), binary()) -> boolean(). check_token(_UserId, _Token) -> erlang:error(not_implemented). -spec ge...
b687030d8630870a1d08014d24b3b5d8d788725e125a8f9485f8fc2162e10672
takikawa/racket-ppa
interaction-info.rkt
(module language '#%kernel (#%provide current-interaction-info) (define-values (current-interaction-info) (make-parameter #f (lambda (v) (if (if (not v) #t (if (vector? v) (if ...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/collects/racket/interaction-info.rkt
racket
(module language '#%kernel (#%provide current-interaction-info) (define-values (current-interaction-info) (make-parameter #f (lambda (v) (if (if (not v) #t (if (vector? v) (if ...
ead0e825228ae0c551b0456ae2f292843514e95d4f485388bb2dab0158c0ef3f
microsoft/SLAyer
Graph.mli
Copyright ( c ) Microsoft Corporation . All rights reserved . (** Mutable edge- and vertex-labelled multi-graphs *) open Library module type GRAPH = Graph_sig.GRAPH module Make (Index: sig type t val compare: t -> t -> int val equal: t -> t -> bool val hash: t -> int val fmt : t form...
null
https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/Graph.mli
ocaml
* Mutable edge- and vertex-labelled multi-graphs
Copyright ( c ) Microsoft Corporation . All rights reserved . open Library module type GRAPH = Graph_sig.GRAPH module Make (Index: sig type t val compare: t -> t -> int val equal: t -> t -> bool val hash: t -> int val fmt : t formatter end) (VertexLabel: sig type t val...
e93e95db19fad8ad84dbb5ff38f93bd186d19c3ee6cd2baede344a183c8248eb
ghc/packages-dph
World.hs
module World ( Segment , World(..), Rect, Polar , initialWorld , normaliseWorld , polarOfRectWorld) where import Geometry.Point import Geometry.Segment import qualified Data.Vector.Unboxed as V import Data.Vector.Unboxed (Vector) -- We keep this unpacked so we can use unboxed vector. -- index, x1, y1, x2, y2 d...
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-examples/broken/Visibility/World.hs
haskell
We keep this unpacked so we can use unboxed vector. index, x1, y1, x2, y2 | Generate the initial world. | Normalise the world so that the given point is at the origin, and split segements that cross the y=0 line. | Convert a world from rectangular to polar coordinates.
module World ( Segment , World(..), Rect, Polar , initialWorld , normaliseWorld , polarOfRectWorld) where import Geometry.Point import Geometry.Segment import qualified Data.Vector.Unboxed as V import Data.Vector.Unboxed (Vector) data World coord = World { worldSegments :: Vector (Segment coord) } initial...
5699017f8e4ed0aab1adc8d8c6c5907da1fdeca5ea750e21ef86561d1938953f
jaspervdj/number-six
Weather.hs
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} module NumberSix.Handlers.Weather ( handler , getWeather , Weather (..) , Temperature (..) ) where -------------------------------------------------------------------------------- im...
null
https://raw.githubusercontent.com/jaspervdj/number-six/1aba681786bd85bd20f79406c681ea581b982cd6/src/NumberSix/Handlers/Weather.hs
haskell
------------------------------------------------------------------------------ # LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----------------------------------------------------...
module NumberSix.Handlers.Weather ( handler , getWeather , Weather (..) , Temperature (..) ) where import Control.Applicative ((<$>), (<*>)) import Control.Exception (handle) import Control.Monad (mzero) import Control.Monad.Trans (liftIO) import...
ebd31e8428765badffaf802bfe39918db69c9ed6bbba71330cbeb0515932bd88
bobzhang/fan
test_lexer.ml
let rec translate = {:lexer| |"current_directory" -> begin print_string (Sys.getcwd ()); translate lexbuf end | _ as c -> begin print_char c; translate lexbuf; end | ! -> exit 0 |} ;; (* let _ = *) let chan = open_in " / test_lexer.ml " in translate ( ) (* (\* #f...
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/testr/test_lexer.ml
ocaml
let _ = (\* #filter "lift" ;; *\)
let rec translate = {:lexer| |"current_directory" -> begin print_string (Sys.getcwd ()); translate lexbuf end | _ as c -> begin print_char c; translate lexbuf; end | ! -> exit 0 |} ;; let chan = open_in " / test_lexer.ml " in translate ( ) let num_lines = ref 0 ...
b91db944a68a41d2519ff4a6d7eb68d415d68c88a12db920101314119bdd4b0d
nfrisby/coxswain
RecordAndVariantTH.hs
# LANGUAGE KindSignatures # # LANGUAGE ParallelListComp # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # | Splices for " Data . Sculls . Internal . RecordAndVariant " . module Data.Sculls.Internal.RecordAndVariantTH ( genericsTH, rAllTH, ) where import Coxswain (NRow(..)) import GHC.Generics import ...
null
https://raw.githubusercontent.com/nfrisby/coxswain/bfd5777964a5b4ba64e1bcc4cf18df1c9d8fc558/sculls/src/Data/Sculls/Internal/RecordAndVariantTH.hs
haskell
--- --- | The instances of 'RAll2'. ---
# LANGUAGE KindSignatures # # LANGUAGE ParallelListComp # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # | Splices for " Data . Sculls . Internal . RecordAndVariant " . module Data.Sculls.Internal.RecordAndVariantTH ( genericsTH, rAllTH, ) where import Coxswain (NRow(..)) import GHC.Generics import ...
98cc3402fd573d1a703242a94cc5700262b8a98eeec10b0a3d6e162a07601eb2
rodrigosetti/stamps
cf-context-overlap.rkt
#lang s-exp stamps/lang Original version by at #design/979 Translated to Racket - Stamps by . Creative Commons licensed : Creative Commons Attribution 3.0 Unported / (define-shape tres ((loop ([i 3]) (d2 [y .3] [r (* i 120)])))) (define-shape d2 ((loop ([i 30]) (tough [s .4] [y .5]...
null
https://raw.githubusercontent.com/rodrigosetti/stamps/958938dd71fdaa64041ea13f1b491bda628bda9c/examples/context-free/cf-context-overlap.rkt
racket
#lang s-exp stamps/lang Original version by at #design/979 Translated to Racket - Stamps by . Creative Commons licensed : Creative Commons Attribution 3.0 Unported / (define-shape tres ((loop ([i 3]) (d2 [y .3] [r (* i 120)])))) (define-shape d2 ((loop ([i 30]) (tough [s .4] [y .5]...
ee78cfe098d074da2b0a6a2a4fad3fbeb54d929531df88fd3904311dbb317c45
chenyukang/eopl
34.scm
(load-relative "../libs/init.scm") (load-relative "./base/store.scm") (load-relative "./base/test.scm") (load-relative "./base/pair-v1.scm") (load-relative "./base/callref-cases.scm") ;; extend call-by-ref to multi argments for procedure ;; see new stuff, for example letref a = b, if b is not a variable, just do ;; th...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch4/34.scm
scheme
extend call-by-ref to multi argments for procedure see new stuff, for example letref a = b, if b is not a variable, just do the same thing as let, otherwise, just use the reference of b new stuff sllgen boilerplate ;;;;;;;;;;;;;;;; extractors: procedures ;;;;;;;;;;;;;;;; environment data structures ;;;;;;;;;;;;;...
(load-relative "../libs/init.scm") (load-relative "./base/store.scm") (load-relative "./base/test.scm") (load-relative "./base/pair-v1.scm") (load-relative "./base/callref-cases.scm") (define the-lexical-spec '((whitespace (whitespace) skip) (comment ("%" (arbno (not #\newline))) skip) (identifier (let...
9990f28161d68ac15e8d454e6591d444eb2937be4931b230c9fe8e0add2f2c0d
thheller/shadow-cljsjs
airbrake.cljs
(ns cljsjs.airbrake (:require ["airbrake-js" :as airbrake])) (js/goog.exportSymbol "airbrake" airbrake)
null
https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/airbrake.cljs
clojure
(ns cljsjs.airbrake (:require ["airbrake-js" :as airbrake])) (js/goog.exportSymbol "airbrake" airbrake)
900e2c80d8297938fd7ddc11fc0fe3fc1ac5ef6ee6351c73c5bc1e0f8c4053dd
clojureverse/clojurians-log-app
request_response_context.clj
(ns request-response-context) ;; Ring ;; handler = request -> response ;; Pedestal -> Cognitect ;; handler = context -> context ;; context = request + response {:request } (def req {:http-method :post :uri "/"}) (defn handler-1 [req] (when (= (:uri req) "/") {:status 200 :body "OK"})) (handl...
null
https://raw.githubusercontent.com/clojureverse/clojurians-log-app/d34c9bd715e492c8f1899653548716d32c623fad/repl/request_response_context.clj
clojure
Ring handler = request -> response Pedestal -> Cognitect handler = context -> context context = request + response
(ns request-response-context) {:request } (def req {:http-method :post :uri "/"}) (defn handler-1 [req] (when (= (:uri req) "/") {:status 200 :body "OK"})) (handler-1 req) = > { : status 200 , : body " OK " } (defn handler-2 [ctx] (when (= (:uri (:request ctx)) "/") (assoc ctx ...
4445097cc09b0027490711851200929650ef111eaa710b752a444bbd402a2f11
dongcarl/guix
sssd.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2016 , 2017 < > Copyright © 2017 , 2018 < > Copyright © 2020 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as publis...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/sssd.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2016 , 2017 < > Copyright © 2017 , 2018 < > Copyright © 2020 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages sssd) #:use-mod...
ecc5ca2c29b41afeaa91c5ddfbf56632304e0f68e46d60bde400791d78231326
ThoughtWorksInc/stonecutter
kerodon_helpers.clj
(ns stonecutter.integration.kerodon.kerodon-helpers) (defn print-enlive [state] (prn (-> state :enlive)) state) (defn print-request [state] (prn (-> state :request)) state) (defn print-state [state] (prn state) state)
null
https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/test/stonecutter/integration/kerodon/kerodon_helpers.clj
clojure
(ns stonecutter.integration.kerodon.kerodon-helpers) (defn print-enlive [state] (prn (-> state :enlive)) state) (defn print-request [state] (prn (-> state :request)) state) (defn print-state [state] (prn state) state)
c2c29be70af86d79b865ec5e2c6d2b71cac45bd6d9ecf04f8c5ef889073b8c99
cburgmer/buildviz
bundle.clj
(ns buildviz.bundle (:gen-class) (:require [buildviz.data.results :as results] [buildviz.controllers [builds :refer [get-builds]] [fail-phases :refer [get-fail-phases]] [flaky-testcases :refer [get-flaky-testclasses]] [wait-times :refer [get-wait-times...
null
https://raw.githubusercontent.com/cburgmer/buildviz/a048ca9adccf56916f74764352844d2f73a9393e/src/buildviz/bundle.clj
clojure
(ns buildviz.bundle (:gen-class) (:require [buildviz.data.results :as results] [buildviz.controllers [builds :refer [get-builds]] [fail-phases :refer [get-fail-phases]] [flaky-testcases :refer [get-flaky-testclasses]] [wait-times :refer [get-wait-times...
2aa2cf672959aa897df1736ed5e8efa7eac68f483c7c0367f531d8871d709a8e
Clozure/ccl-tests
cl-symbols-aux.lsp
;-*- Mode: Lisp -*- Author : Created : Thu Nov 28 06:43:51 2002 ;;;; Contains: Aux. functions for cl-symbols.lsp (in-package :cl-test) #-clozure (eval-when (:compile-toplevel) (declaim (optimize (safety 3)))) (defun is-external-symbol-of (sym package) (multiple-value-bind (sym2 status) (find...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/cl-symbols-aux.lsp
lisp
-*- Mode: Lisp -*- Contains: Aux. functions for cl-symbols.lsp Symbol not present in the common lisp package as an external symbol Check if it has any properties whose indicators are external in any of the standard packages or are accessible
Author : Created : Thu Nov 28 06:43:51 2002 (in-package :cl-test) #-clozure (eval-when (:compile-toplevel) (declaim (optimize (safety 3)))) (defun is-external-symbol-of (sym package) (multiple-value-bind (sym2 status) (find-symbol (symbol-name sym) package) (and (eqt sym sym2) (eqt status ...
a761b98827fa124e98eeffe938ce7f0424be3f053968417c087b432489ba8f77
pingles/clj-hector
cassandra_helper.clj
(ns clj-hector.test.cassandra-helper (:import [org.apache.cassandra.service EmbeddedCassandraService] [java.util UUID]) (:use [clojure.test] [clj-hector.core :only (cluster keyspace)] [clj-hector.ddl :only (add-keyspace drop-keyspace)])) use an in - process daemon ;; make tests easier...
null
https://raw.githubusercontent.com/pingles/clj-hector/020239c4148b21898a57830ef1696e6ca27a266c/test/clj_hector/test/cassandra_helper.clj
clojure
make tests easier to specify and work
(ns clj-hector.test.cassandra-helper (:import [org.apache.cassandra.service EmbeddedCassandraService] [java.util UUID]) (:use [clojure.test] [clj-hector.core :only (cluster keyspace)] [clj-hector.ddl :only (add-keyspace drop-keyspace)])) use an in - process daemon with isolated (d...
35f2b5cd63ad7088ad8d0a6ef8c6f8d5f7564ebc3aabe09f6768ff4326ad4c5c
racket/web-server
all-managers-tests.rkt
#lang racket/base (require rackunit) (provide all-managers-tests) (define all-managers-tests (test-suite "Continuation Managers" ; XXX test timeout.rkt ; XXX test none.rkt ; XXX test lru.rkt ))
null
https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-test/tests/web-server/managers/all-managers-tests.rkt
racket
XXX test timeout.rkt XXX test none.rkt XXX test lru.rkt
#lang racket/base (require rackunit) (provide all-managers-tests) (define all-managers-tests (test-suite "Continuation Managers" ))
a60d4fb47c466f0891a9ebb32716ac1208d22203ba3144708c14b77e3f45256f
monadbobo/ocaml-core
shell__line_buffer.ml
open Core.Std (** Look for a newline in a given substring and returns its absolute position. Returns None if no newlines are found. *) let rec nl_between (s:string) ~(eol:char) ~(pos:int) ~(len:int) : int option = if len = 0 then None else if s.[pos] = eol then Some pos else nl_between s ~eol ~pos:(pos +...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/shell__line_buffer.ml
ocaml
* Look for a newline in a given substring and returns its absolute position. Returns None if no newlines are found. * Type for line buffers. [flush] will be called back on every fully read newline or when the buffer itself is flushed by the user. whatever is in the buffer + this suffix is our new...
open Core.Std let rec nl_between (s:string) ~(eol:char) ~(pos:int) ~(len:int) : int option = if len = 0 then None else if s.[pos] = eol then Some pos else nl_between s ~eol ~pos:(pos + 1) ~len:(len - 1) TEST = nl_between "abcd" ~eol:'\n' ~pos:0 ~len:4 = None TEST = nl_between "a\nb\ncd" ~eol:'\n' ~pos:0 ~len:6...
ad3328d00c4cee94d99c7b34047141e93ed63e9a6ce9ff9374b2519ea128b38b
ThoughtWorksInc/stonecutter
delete_account.clj
(ns stonecutter.test.view.delete-account (:require [midje.sweet :refer :all] [net.cgrand.enlive-html :as html] [stonecutter.test.view.test-helpers :as th] [stonecutter.translation :as t] [stonecutter.routes :as r] [stonecutter.view.delete-account :refer [del...
null
https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/test/stonecutter/test/view/delete_account.clj
clojure
(ns stonecutter.test.view.delete-account (:require [midje.sweet :refer :all] [net.cgrand.enlive-html :as html] [stonecutter.test.view.test-helpers :as th] [stonecutter.translation :as t] [stonecutter.routes :as r] [stonecutter.view.delete-account :refer [del...
fb0ba77cc6c3a0ad424b4a187ab0787c3b5b732acf3e9ae0a4b838c34c075387
mikelevins/categories
utils.scm
;;;; *********************************************************************** ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: utils.scm ;;;; Project: Categories ;;;; Purpose: general utilities ;;;; Author: mikel evins Copyright : 2013 by mikel evins ;;;; ;;;; *********************************...
null
https://raw.githubusercontent.com/mikelevins/categories/66e3861071e4d88b7b27421a78ab497e1fb5fa0c/0.4/src/utils.scm
scheme
*********************************************************************** FILE IDENTIFICATION Name: utils.scm Project: Categories Purpose: general utilities Author: mikel evins ***********************************************************************
Copyright : 2013 by mikel evins (define (every? fn ls) (let loop ((items ls)) (if (null? items) #t (if (fn (car items)) (loop (cdr items)) #f)))) (define (filter test ls) (if (null? ls) '() (if (test (car ls)) (cons (car ls) ...
cbd3ac94f748dd2be0cbfa741d9da315266a8ac253ef8d75e4a7b4384402b3ce
1HaskellADay/1HAD
Exercise.hs
module HAD.Y2014.M02.D26.Exercise where -- | Sum the value inside the maybe if there aren't any Nothing, -- otherwise return Nothing -- -- Examples -- > > > sumIfAll [ Just 1 , Just 2 ] Just 3 -- > > > sumIfAll [ Just 1 , Nothing ] -- Nothing -- sumIfAll :: Num a => [Maybe a] -> Maybe a sumIfAll = undefined
null
https://raw.githubusercontent.com/1HaskellADay/1HAD/3b3f9b7448744f9b788034f3aca2d5050d1a5c73/exercises/HAD/Y2014/M02/D26/Exercise.hs
haskell
| Sum the value inside the maybe if there aren't any Nothing, otherwise return Nothing Examples Nothing
module HAD.Y2014.M02.D26.Exercise where > > > sumIfAll [ Just 1 , Just 2 ] Just 3 > > > sumIfAll [ Just 1 , Nothing ] sumIfAll :: Num a => [Maybe a] -> Maybe a sumIfAll = undefined
cd448e9dba4afacac0989ff4e88d2b65afd964f9e0f8f44c0bb2a7f89076015f
ntoronto/pict3d
sphere.rkt
#lang typed/racket/base (require racket/match racket/list typed/opengl math/flonum math/base "../math.rkt" "../engine.rkt" "../soup.rkt" "types.rkt" "sphere/sphere-type.rkt" (prefix-in 30: "sphere/ge_30.rkt") (prefix-in ...
null
https://raw.githubusercontent.com/ntoronto/pict3d/09283c9d930c63b6a6a3f2caa43e029222091bdb/pict3d/private/shape/sphere.rkt
racket
=================================================================================================== Constructors =================================================================================================== Set attributes =======================================================================================...
#lang typed/racket/base (require racket/match racket/list typed/opengl math/flonum math/base "../math.rkt" "../engine.rkt" "../soup.rkt" "types.rkt" "sphere/sphere-type.rkt" (prefix-in 30: "sphere/ge_30.rkt") (prefix-in ...
8743c7ebcb6e68bdd30bb07c6a882962de640456a6c38e0f79af65f490f7078b
ocaml/odoc
c.ml
class type d = object method e : B.t method f : #B.u -> unit end let f : B.t = assert false let g : #B.u -> unit = fun _ -> () let h : B.u -> unit = fun _ -> () let i : < m : B.u > -> unit = fun _ -> ()
null
https://raw.githubusercontent.com/ocaml/odoc/3aca7eac014e69866694fa44f1c3915e5bb75872/test/xref2/classes.t/c.ml
ocaml
class type d = object method e : B.t method f : #B.u -> unit end let f : B.t = assert false let g : #B.u -> unit = fun _ -> () let h : B.u -> unit = fun _ -> () let i : < m : B.u > -> unit = fun _ -> ()
675842f0e8d09a4e48b214ae5eaab258a01dade82354c7e4c00d8832003d955f
haskell/text
Substrings.hs
| Tests for substring functions ( @take@ , @split@ , @isInfixOf@ , etc . ) # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - missing - signatures # module Tests.Properties.Substrings ( testSubstrings ) where import Prelude hiding (head, tail) import Control.Monad.Trans.State (State, state, runState) im...
null
https://raw.githubusercontent.com/haskell/text/d791bc21e28b311abc54d20fad0a1b38bb906a1f/tests/Tests/Properties/Substrings.hs
haskell
| Tests for substring functions ( @take@ , @split@ , @isInfixOf@ , etc . ) # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - missing - signatures # module Tests.Properties.Substrings ( testSubstrings ) where import Prelude hiding (head, tail) import Control.Monad.Trans.State (State, state, runState) im...
bd0bdbdf4539b21068cd1dbb169bb92be290bb0d014101b8c698f1e1f4aa9160
atlas-engineer/nkeymaps
modifiers.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nkeymaps/modifier) (defparameter +control+ (nkeymaps:define-modifier :string "control" :shortcut "C")) (defparameter +meta+ (define-modifier :string "meta" :shortcut "M")) (defparameter +shift+ (define-modifier...
null
https://raw.githubusercontent.com/atlas-engineer/nkeymaps/d43267a56f0ac264e4bdb3c75bbfc426f5ac5b2e/modifiers.lisp
lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nkeymaps/modifier) (defparameter +control+ (nkeymaps:define-modifier :string "control" :shortcut "C")) (defparameter +meta+ (define-modifier :string "meta" :shortcut "M")) (defparameter +shift+ (define-modifier...
5b2e5bab646fd492947241382cc6b5b539c28cafe98458a5daaa69b3a471a696
jordanthayer/ocaml-search
idastar_sspath.ml
* @author jtd7 @since 2011 - 10 - 18 @author jtd7 @since 2011-10-18 *) type vals = { g : float; d : float; h : float; depth : float; h_err : float; d_err : float; fhat : float; } type 'a node = { data : 'a; values : vals; } let alt_col_name = "iterations" let output_col_hdr...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/iterative/idastar_sspath.ml
ocaml
* Unwraps a solution which is in the form of a search node and presents it in the format the domain expects it, which is domain data followed by cost * Sorts nodes solely on total cost information * Takes the domain expand function and a heuristic calculator and creates an expand function which retu...
* @author jtd7 @since 2011 - 10 - 18 @author jtd7 @since 2011-10-18 *) type vals = { g : float; d : float; h : float; depth : float; h_err : float; d_err : float; fhat : float; } type 'a node = { data : 'a; values : vals; } let alt_col_name = "iterations" let output_col_hdr...
77e059e76ee0cccbe2930a18901861a5697ea9556e40cfa2d8a15aa7e61eb9ad
LaurentMazare/tensorflow-ocaml
layer.ml
open Base open Float.O_dot (* TODO: add some trainable gamma/beta variables and return beta + gamma * current_output. *) module Batch_norm = struct type 'a t = { running_mean : 'a Node.t ; running_var : 'a Node.t ; epsilon : float ; decay : float } let create ?(epsilon = 1e-8) ?(decay = 0.99) ...
null
https://raw.githubusercontent.com/LaurentMazare/tensorflow-ocaml/52c5f1dec1a8b7dc9bc6ef06abbc07da6cd90d39/src/graph/layer.ml
ocaml
TODO: add some trainable gamma/beta variables and return beta + gamma * current_output. max xs (alpha * xs)
open Base open Float.O_dot module Batch_norm = struct type 'a t = { running_mean : 'a Node.t ; running_var : 'a Node.t ; epsilon : float ; decay : float } let create ?(epsilon = 1e-8) ?(decay = 0.99) xs = let type_ = Node.output_type xs in let feature_count = Node.shape xs |> List.last...