_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
82f923cb2613e43ed3ffb9ff20ea741dfd05d59060beba887e5e732e390b88c4
mbutterick/typesetting
vector.rkt
#lang racket/base (require "core.rkt" "page.rkt" "color.rkt" racket/match racket/string sugar/unstable/js sugar/unstable/dict brag/support sugar/list racket/list) (provide (all-defined-out)) (define default-ctm-value '(1 0 0 1 0 0)) (define (save doc) (set-pdf-ctm-stack! doc (cons (pdf-ctm doc) ...
null
https://raw.githubusercontent.com/mbutterick/typesetting/6f7a8bbc422a64d3a54cbbbd78801a01410f5c92/pitfall/pitfall/vector.rkt
racket
based on -to-draw-an-oval-in-html5-canvas/2173084#2173084 This constant is used to approximate a symmetrical arc using a cubic Bezier curve. control point offset horizontal control point offset vertical x-end y-end x-middle y-middle fill-color method is from color mixin todo other path ops
#lang racket/base (require "core.rkt" "page.rkt" "color.rkt" racket/match racket/string sugar/unstable/js sugar/unstable/dict brag/support sugar/list racket/list) (provide (all-defined-out)) (define default-ctm-value '(1 0 0 1 0 0)) (define (save doc) (set-pdf-ctm-stack! doc (cons (pdf-ctm doc) ...
f1d14b3d2c6b89ec1cbf95ffe5e1030c060bd15f7d09becb63b4f8a85301cacf
heyoka/faxe
faxe_metrics_sup.erl
%%%------------------------------------------------------------------- @author ( C ) 2020 , < COMPANY > %%% @doc %%% @end %%%------------------------------------------------------------------- -module(faxe_metrics_sup). -behaviour(supervisor). -export([start_link/0, init/1]). start_link() -> supervisor:start...
null
https://raw.githubusercontent.com/heyoka/faxe/83c27bf85e570746147f38af7b182db8a90fab15/apps/faxe/src/faxe_metrics_sup.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- ,
@author ( C ) 2020 , < COMPANY > -module(faxe_metrics_sup). -behaviour(supervisor). -export([start_link/0, init/1]). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> P = [ {event_handler_starter, {event_handler_starter, start_link, []}, transient, 2000, wo...
21813b638be9d581b1c33f0adeaf4a636dff2f04e99edbc9b0c8bf2454698542
binghe/PCL
iterate.lisp
-*- Package : ITERATE ; Syntax : Common - Lisp ; Base : 10 -*- ;;; ;;; ************************************************************************* Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation . ;;; All rights reserved. ;;; ;;; Use and copying of this software and preparation of derivative w...
null
https://raw.githubusercontent.com/binghe/PCL/7021c061c5eef1466e563c4abb664ab468ee0d80/tools/iterate.lisp
lisp
Syntax : Common - Lisp ; Base : 10 -*- ************************************************************************* All rights reserved. Use and copying of this software and preparation of derivative works based upon this software are permitted. Any distribution of this States export control laws. warranty abo...
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation . software or derivative works must comply with all applicable United This software is made available AS IS , and Xerox Corporation makes no CommonLoops Coordinator Xerox PARC 3333 Coyote Hill Rd . Palo Alto , CA 94304 ( o...
5f281cf6bb792651576c54562d01477ebd47865969784baedb1bce8d10463e4a
balsoft/lambda-launcher
Qalc.hs
{-# LANGUAGE OverloadedStrings #-} module LambdaLauncher.Plugins.Qalc where import LambdaLauncher.Plugins.Support (copyAction) import System.Process (readProcess) import LambdaLauncher.Types import Data.Text (pack, unpack) qalc :: Plugin qalc s = sequence $ pure $ copyAction 1 . pack <$> readProcess "qalc" ["-...
null
https://raw.githubusercontent.com/balsoft/lambda-launcher/1fee681459d2698856c533a8a69f32874a531356/src/LambdaLauncher/Plugins/Qalc.hs
haskell
# LANGUAGE OverloadedStrings #
module LambdaLauncher.Plugins.Qalc where import LambdaLauncher.Plugins.Support (copyAction) import System.Process (readProcess) import LambdaLauncher.Types import Data.Text (pack, unpack) qalc :: Plugin qalc s = sequence $ pure $ copyAction 1 . pack <$> readProcess "qalc" ["-t", unpack s] mempty
f838da8b2a3692ef9cdf52ccc7a99d73e18c369f704572b3b48894df83c20dfd
MastodonC/terraboot
core_test.clj
(ns terraboot.core-test (:require [terraboot.core :refer :all] [clojure.test :refer :all]))
null
https://raw.githubusercontent.com/MastodonC/terraboot/ff01428214539ad884e5c4a5fcdae8f91feae4a9/test/terraboot/core_test.clj
clojure
(ns terraboot.core-test (:require [terraboot.core :refer :all] [clojure.test :refer :all]))
ba785c112a198e6f0f35ec9fad11759f3a3f73414477a7eeb247ce296529a663
ocsigen/js_of_ocaml
effects.mli
Js_of_ocaml compiler * / * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at your option ) any l...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/eae34864ebe70c3e93d373e87fcd7432f5a6d1d4/compiler/lib/effects.mli
ocaml
Js_of_ocaml compiler * / * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at your option ) any l...
f6412750819f85c0284edfd51e88721d1680d443395dd1cd22775c4d87a82c5b
Frama-C/Qed
partition.mli
(**************************************************************************) (* *) This file is part of Qed Library (* *) Copyright ( ...
null
https://raw.githubusercontent.com/Frama-C/Qed/69fa79d9ede7a76f320c935405267a97c660814e/src/partition.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Qed Library Copyright ( C ) 2007 - 2016 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ver...
4bcde3e80aa1d88bad25f6e3615bf421d3bc09d926bd331f8e1ceee2567ad7e8
NorfairKing/tickler
PutAccountSubscription.hs
# LANGUAGE RecordWildCards # module Tickler.Server.Handler.Admin.PutAccountSubscription (serveAdminPutAccountSubscription) where import Data.Time import Database.Persist import Import import Servant import Tickler.API import Tickler.Server.Handler.Utils import Tickler.Server.Types serveAdminPutAccountSubscription ::...
null
https://raw.githubusercontent.com/NorfairKing/tickler/71c6aec471d095fe2357e135bed90a92619de393/tickler-server/src/Tickler/Server/Handler/Admin/PutAccountSubscription.hs
haskell
# LANGUAGE RecordWildCards # module Tickler.Server.Handler.Admin.PutAccountSubscription (serveAdminPutAccountSubscription) where import Data.Time import Database.Persist import Import import Servant import Tickler.API import Tickler.Server.Handler.Utils import Tickler.Server.Types serveAdminPutAccountSubscription ::...
72d9368fec75460034dbf2edc450430ea38fd5a4cec79b95e72ac99437f917ea
dym/movitz
eval.lisp
;;;;------------------------------------------------------------------ ;;;; Copyright ( C ) 2001 - 2005 , Department of Computer Science , University of Tromso , Norway . ;;;; ;;;; For distribution policy, see the accompanying file COPYING. ;;;; ;;;; Filename: eval.lisp ;;;; Description: Autho...
null
https://raw.githubusercontent.com/dym/movitz/56176e1ebe3eabc15c768df92eca7df3c197cb3d/losp/muerte/eval.lisp
lisp
------------------------------------------------------------------ For distribution policy, see the accompanying file COPYING. Filename: eval.lisp Description: ------------------------------------------------------------------ (warn "env: ~S in ~S" var env) These ...
Copyright ( C ) 2001 - 2005 , Department of Computer Science , University of Tromso , Norway . Author : < > Created at : Fri Oct 19 21:15:12 2001 $ I d : eval.lisp , v 1.35 2008 - 07 - 09 20:11:23 ffjeld Exp $ (require :muerte/basic-macros) (provide :muerte/eval) (in-package muerte) (...
74f03ae712991aef49bfd56908bddd2da625e720df316849fb93c5dfba678f0d
bamos/snowglobe
Time.hs
Time - based helper functions for EnrichedEvents . -- < > -- 2015.05.08 module SnowGlobe.Time(parse, getDaysEvents, getWeeksEvents) where import Control.Applicative import Data.Time(Day, LocalTime(..), TimeZone, defaultTimeLocale, getCurrentTime, getCurrentTimeZone, parseTimeM, ...
null
https://raw.githubusercontent.com/bamos/snowglobe/b5211bbc2029b52339175af413aea52cf9ab2eb9/analysis/SnowGlobe/Time.hs
haskell
2015.05.08
Time - based helper functions for EnrichedEvents . < > module SnowGlobe.Time(parse, getDaysEvents, getWeeksEvents) where import Control.Applicative import Data.Time(Day, LocalTime(..), TimeZone, defaultTimeLocale, getCurrentTime, getCurrentTimeZone, parseTimeM, utcToLocalTime) i...
3db1f2a9a6afa44cfe7838eb845d1fdaa93b98460126c2fa6e883ea9e8bbc656
soarlab/FPTaylor
test.ml
open List open Rounding open Expr open Environment open Taylor_form open Log let var_bound_float name = variable_interval name let print_form f = let _ = report (Format.sprintf "v0 = %s" (print_expr_str f.v0)) in let _ = map (fun (e, err) -> report (Format.sprintf "%d, %d: %s" err.index err.exp (print_expr...
null
https://raw.githubusercontent.com/soarlab/FPTaylor/efbbc83970fe3c9f4cb33fafbbe1050dd18749cd/unused/test.ml
ocaml
open List open Rounding open Expr open Environment open Taylor_form open Log let var_bound_float name = variable_interval name let print_form f = let _ = report (Format.sprintf "v0 = %s" (print_expr_str f.v0)) in let _ = map (fun (e, err) -> report (Format.sprintf "%d, %d: %s" err.index err.exp (print_expr...
604c46e961a62a545fc1a7ca31fcdb11f9470e1485049706af7a0028f794cc25
ghcjs/ghcjs
weak001.hs
module Main where import Control.Concurrent import System.Mem import System.Mem.Weak import Data.IORef delay :: IO () delay = performGC >> threadDelay 2000000 >> performGC main :: IO () main = test1 >> test2 >> test3 >> test4 test1 :: IO () test1 = do putStrLn "# test1" x <- newIORef "xyz" wx <- mkWeakIORef ...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/rts/weak/weak001.hs
haskell
key keeps value alive even if weak reference is unreachable finalization should happen here
module Main where import Control.Concurrent import System.Mem import System.Mem.Weak import Data.IORef delay :: IO () delay = performGC >> threadDelay 2000000 >> performGC main :: IO () main = test1 >> test2 >> test3 >> test4 test1 :: IO () test1 = do putStrLn "# test1" x <- newIORef "xyz" wx <- mkWeakIORef ...
813f644a0444e750d168374f02a09f7110b9a463bdb619b327c281a391eb4a05
grin-compiler/ghc-wpc-sample-programs
ContentReader.hs
{-# LANGUAGE Arrows #-} {-# LANGUAGE DeriveFoldable #-} # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE PatternGuards #-} # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE OverloadedStrings #-} | Module : Text . Pandoc . R...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Readers/Odt/ContentReader.hs
haskell
# LANGUAGE Arrows # # LANGUAGE DeriveFoldable # # LANGUAGE PatternGuards # # LANGUAGE ViewPatterns # # LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ | A co...
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # | Module : Text . Pandoc . Readers . Odt . ContentReader Copyright : Copyright ( C ) 2015 License : GNU GPL , version 2 or above Maintainer : < > Stability : alpha ...
fdfbfa32c6d3c60aca2cf58ab472fd8828a97c9c7b5603f47ebb5ac27c80f011
igorhvr/bedlam
procdoc.scm
; A module utilizing procedure-properties to allow online help for ; arbitrary procedures (module procedure-selfdoc ((document-procedure) help) (import procedure-properties) (define-syntax document-procedure (syntax-rules (args:) ((_ proc (args: arguments ...) (return-type: r...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-contrib/pure-scheme/procdoc.scm
scheme
A module utilizing procedure-properties to allow online help for arbitrary procedures
(module procedure-selfdoc ((document-procedure) help) (import procedure-properties) (define-syntax document-procedure (syntax-rules (args:) ((_ proc (args: arguments ...) (return-type: rt) helplines ...) (begin (set-procedure-property! proc 'help ...
f41bea6d7e1c821f61fb8f764d467a2657df5b638230bb617d6e3f86c22bc4f7
ros/roslisp_common
ops.lisp
(in-package :cl-prob) (defgeneric probability (dist event) (:documentation "Return probability of event under a distribution. How events are represented depends on the distribution type. For example, for alist distributions, an event is a boolean function.")) (defgeneric condition-on-event (dist event &key return...
null
https://raw.githubusercontent.com/ros/roslisp_common/4db311da26497d84a147f190200e50c7a5b4106e/cl_utils/src/cl-prob/ops.lisp
lisp
(in-package :cl-prob) (defgeneric probability (dist event) (:documentation "Return probability of event under a distribution. How events are represented depends on the distribution type. For example, for alist distributions, an event is a boolean function.")) (defgeneric condition-on-event (dist event &key return...
ec653869c44e9e3a0f1e9d6d6e4375415f6c35393f4f46e47173afe521124d81
Mainframe-Archive/switchboard
switchboard_jmap.erl
%%------------------------------------------------------------------------------ %% All rights reserved. %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions are met: %% 1 . Redistributions of source code must retain the above c...
null
https://raw.githubusercontent.com/Mainframe-Archive/switchboard/37b66a53265e1a51b10aa76fcc3e622b8c2c261c/src/switchboard_jmap.erl
erlang
------------------------------------------------------------------------------ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: list of conditions and the following disclaimer. this list of conditi...
1 . Redistributions of source code must retain the above copyright notice , this 2 . Redistributions in binary form must reproduce the above copyright notice , 3 . Neither the name of the copyright holder nor the names of its contributors THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS ...
718f3b0769b4364e675a8223553719be251b4da49c35ba5d6609212a8fdf00f7
JonyEpsilon/gorilla-test
core.clj
(ns gorilla-test.core (:gen-class)) (defn gaussian [x sigma mu] (* (/ 0.4 sigma) (Math/exp (- (/ (* (- x mu) (- x mu)) (* 2 (* sigma sigma))))))) (defn -main "I don't do a whole lot ... yet." [& args] (println "Hello, World!"))
null
https://raw.githubusercontent.com/JonyEpsilon/gorilla-test/d24028f44911dc99f63679f1de30817db8c83947/src/gorilla_test/core.clj
clojure
(ns gorilla-test.core (:gen-class)) (defn gaussian [x sigma mu] (* (/ 0.4 sigma) (Math/exp (- (/ (* (- x mu) (- x mu)) (* 2 (* sigma sigma))))))) (defn -main "I don't do a whole lot ... yet." [& args] (println "Hello, World!"))
49ab534c52156110e882ea3b7e3e79e7c4e4e08e4d5ed53e13b1ab469616a6eb
ml4tp/tcoq
genintern.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/interp/genintern.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Substitution functions
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Mod_subst ope...
600ac39d80573b7a54b4cdb06ea77b7e675091a351d61285325a486205cde720
hidaris/thinking-dumps
printer.rkt
#lang racket (provide (all-defined-out)) convert back to the concrete NASM syntax ;; Asm -> String (define (asm->string a) (foldr (λ (i s) (string-append (instr->string i) s)) "" a)) ;; Instruction -> String (define (instr->string i) (match i [`(mov ,a1 ,a2) (string-append "\tmov " (arg->string a1) ",...
null
https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/compiler/abscond/asm/printer.rkt
racket
Asm -> String Instruction -> String Arg -> String Label -> String Asm -> Void
#lang racket (provide (all-defined-out)) convert back to the concrete NASM syntax (define (asm->string a) (foldr (λ (i s) (string-append (instr->string i) s)) "" a)) (define (instr->string i) (match i [`(mov ,a1 ,a2) (string-append "\tmov " (arg->string a1) ", " (arg->string a2) "\n")] [`ret "\tre...
5b114724fef9adea74e7e9e7ae3234c85f5a74831183346f20012fb3cefeba9d
satos---jp/mincaml_self_hosting
printf.ml
Printf.printf "%d %s\n" 3 "hoge"; print_string ("nyan" ^ (Printf.sprintf "%s %d %d %s\n" "ga" 2 4 "her") ^ "hwehe")
null
https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/test/printf.ml
ocaml
Printf.printf "%d %s\n" 3 "hoge"; print_string ("nyan" ^ (Printf.sprintf "%s %d %d %s\n" "ga" 2 4 "her") ^ "hwehe")
26b6f9a38fac51b1d13c81b7770c4dea73c06c7a422bb76d7bbf90d672b51f7f
modular-macros/ocaml-macros
wc.ml
Counts characters , lines and words in one or several files . let chars = ref 0 and words = ref 0 and lines = ref 0 type state = Inside_word | Outside_word let count_channel in_channel = let rec count status = let c = input_char in_channel in incr chars; match c with '\n' -> incr lines...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/basic-io/wc.ml
ocaml
No command-line arguments
Counts characters , lines and words in one or several files . let chars = ref 0 and words = ref 0 and lines = ref 0 type state = Inside_word | Outside_word let count_channel in_channel = let rec count status = let c = input_char in_channel in incr chars; match c with '\n' -> incr lines...
95d3608ce0f122ac10ec4550c5bff3eac65821ceadacd67bde27c823ad5d1218
inaka/shotgun
http_binary_handler.erl
-module(http_binary_handler). -export([ init/2 , info/3 , terminate/3 ]). -spec init(cowboy_req:req(), any()) -> {ok | cowboy_loop, any(), integer()}. init(Req, _Opts) -> case cowboy_req:method(Req) of <<"GET">> -> Headers = #{ <<"content-type">> => <<"text/event-stream"...
null
https://raw.githubusercontent.com/inaka/shotgun/2fa6c86e7cc7c0d437c624aa72956a8f6e82f360/test/http_server/http_binary_handler.erl
erlang
Method not Allowed
-module(http_binary_handler). -export([ init/2 , info/3 , terminate/3 ]). -spec init(cowboy_req:req(), any()) -> {ok | cowboy_loop, any(), integer()}. init(Req, _Opts) -> case cowboy_req:method(Req) of <<"GET">> -> Headers = #{ <<"content-type">> => <<"text/event-stream"...
bddc3f3562eb6f2d337849fab2ed022c969cdfc39759ee321170282992b23201
GlideAngle/flare-timing
LinearFraction.hs
module LinearFraction (linearFractionUnits, linearFraction) where import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit as HU ((@?=), testCase) import Data.Ratio ((%)) import Data.UnitsOfMeasure (u) import qualified "flight-gap-allot" Flight.Score as FS import "flight-gap-allot" Flight.Score ( FlownMax(...
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/gap-math/test-suite-math/LinearFraction.hs
haskell
module LinearFraction (linearFractionUnits, linearFraction) where import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit as HU ((@?=), testCase) import Data.Ratio ((%)) import Data.UnitsOfMeasure (u) import qualified "flight-gap-allot" Flight.Score as FS import "flight-gap-allot" Flight.Score ( FlownMax(...
dadc96e60fcdc741760d7cc5d0b44831a5fe043801dc79c45487a04b375a6112
locusmath/locus
partpair.clj
(ns locus.set.copresheaf.dependency.difunction.partpair (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.mapping.genera...
null
https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/set/copresheaf/dependency/difunction/partpair.clj
clojure
Sets^2 are naturally associated to congruence lattices. The congruences of Sets^2, as generalized from the topos of Sets are simply ordered pairs of partitions. This file defines utility classes and helper functions for such pairs of partitions. Partition pairs
(ns locus.set.copresheaf.dependency.difunction.partpair (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.mapping.genera...
9fd100536ab5c17b03f84c3f2a38614509319a4602fb9493b652ea89003782ae
ekmett/name
Logic.hs
# language LambdaCase # # language DeriveGeneric # {-# language TypeFamilies #-} # language BangPatterns # --------------------------------------------------------------------------------- -- | Copyright : ( c ) 2018 License : BSD-2 - Clause OR Apache-2.0 Maintainer : < > -- Stability : experiment...
null
https://raw.githubusercontent.com/ekmett/name/cbb2ea930c719a13cd68d7703c68189e0e859767/src/Data/Name/Logic.hs
haskell
# language TypeFamilies # ------------------------------------------------------------------------------- | Stability : experimental Portability: non-portable ------------------------------------------------------------------------------- TODO: check my back of the envelope math the finite-cofinite algebra on at...
# language LambdaCase # # language DeriveGeneric # # language BangPatterns # Copyright : ( c ) 2018 License : BSD-2 - Clause OR Apache-2.0 Maintainer : < > module Data.Name.Logic ( Prop(..) , neg, implies, iff, top , liftB, liftB2 ) where import Control.Lens import Data.Semigroup import GHC.Gener...
dc739e60cd73bfa04e94887d33b0266d940d47cc7c4fbb12219d0e61ff9a5e46
haskell-compat/base-compat
Compat.hs
# LANGUAGE CPP , NoImplicitPrelude , PackageImports # module Data.Functor.Sum.Compat ( module Base ) where #if MIN_VERSION_base(4,9,0) import "base-compat" Data.Functor.Sum.Compat as Base #else import Data.Functor.Sum as Base #endif
null
https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat-batteries/src/Data/Functor/Sum/Compat.hs
haskell
# LANGUAGE CPP , NoImplicitPrelude , PackageImports # module Data.Functor.Sum.Compat ( module Base ) where #if MIN_VERSION_base(4,9,0) import "base-compat" Data.Functor.Sum.Compat as Base #else import Data.Functor.Sum as Base #endif
ab160a6dea3f11d677099bf820268a8871b5456c374da62587d9221e3ed5333e
dbuenzli/fpath
test.ml
--------------------------------------------------------------------------- Copyright ( c ) 2015 The fpath programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/dbuenzli/fpath/058ee28c067671e89bae819a6caf079add899812/test/test.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2015 The fpath programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------...
dd9d861e667ed1202f308d31cf21c6aa6476faf35d3e4be2ca3514197b0d6638
fakedata-haskell/fakedata
FreshPrinceOfBelAir.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} module Faker.TvShow.FreshPrinceOfBelAir where import Data.Text import Faker import Faker.Internal import Faker.Provider.FreshPrinceOfBelAir import Faker.TH $(generateFakeField "freshPrinceOfBelAir" "characters") | @since 1.0 $(generateFakeField "fres...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/ea938c38845b274e28abe7f4e8e342f491e83c89/src/Faker/TvShow/FreshPrinceOfBelAir.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.TvShow.FreshPrinceOfBelAir where import Data.Text import Faker import Faker.Internal import Faker.Provider.FreshPrinceOfBelAir import Faker.TH $(generateFakeField "freshPrinceOfBelAir" "characters") | @since 1.0 $(generateFakeField "freshPrinceOfBelAir" "actors") $(gener...
72b839b95b412ae812d09d7ba4d4361a3f56d9854cb5ff0fdebeac1f07195053
biokoda/actordb_core
actordb_queue.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 /. -module(actordb_queue). -compile(export_all). -include_lib("actordb_core/include/actordb.hrl"). -define(TYPE_EVENT,1). -define(TYPE_STATE,2). ...
null
https://raw.githubusercontent.com/biokoda/actordb_core/8dcd08a0897055af89c3ce20d99ed5e64d0c33eb/src/actordb_queue.erl
erlang
Implements a queue on top of actordb_sqlproc. Instead of using the sql engine, it uses File format Event Header: Event table item: Event data section: <<Item1:SizeInTable/binary, Item2:SizeInTable:/binary>>. Event table is an uncompressed lz4 frame, event data section may or may not be compressed. Term st...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(actordb_queue). -compile(export_all). -include_lib("actordb_core/include/actordb.hrl"). -define(TYPE_EVENT,1). -define(TYPE_STATE,2). ...
4bc7ede1c9848097fb20ee6cbffb4edcf0c863ee026a8c3690fbae5741646acd
TheClimateCorporation/squeedo
middleware.clj
(ns com.climate.squeedo.sqs-consumer.middleware (:require [clojure.tools.logging :as log] [cheshire.core :as json])) (defn wrap-deserialization-fn "Deserialize a message body using f" [handler f] (fn [msg done-chan] (handler (update msg :body f) done-chan))) (defn wrap-deserialize-json "Deserial...
null
https://raw.githubusercontent.com/TheClimateCorporation/squeedo/2ac107cae14ff5ac2d1be096d303db9fb39fdbb1/src/com/climate/squeedo/sqs_consumer/middleware.clj
clojure
(ns com.climate.squeedo.sqs-consumer.middleware (:require [clojure.tools.logging :as log] [cheshire.core :as json])) (defn wrap-deserialization-fn "Deserialize a message body using f" [handler f] (fn [msg done-chan] (handler (update msg :body f) done-chan))) (defn wrap-deserialize-json "Deserial...
965685f0b61d0354e45f1a22e236b4947eed3ef8f6fbec83d3211b3bba00921a
reanimate/reanimate
doc_waitOn.hs
#!/usr/bin/env stack -- stack runghc --package reanimate module Main(main) where import Reanimate import Reanimate.Builtin.Documentation main :: IO () main = reanimate $ docEnv $ scene $ do waitOn $ fork $ play drawBox play drawCircle
null
https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_waitOn.hs
haskell
stack runghc --package reanimate
#!/usr/bin/env stack module Main(main) where import Reanimate import Reanimate.Builtin.Documentation main :: IO () main = reanimate $ docEnv $ scene $ do waitOn $ fork $ play drawBox play drawCircle
2ec0d53a40da299efd3e3bc991c82d5129fca8e72aae3f7b8bf6c3ff38d3d826
davisp/couchdb
couch_secondary_sup.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/davisp/couchdb/b0420f9006915149e81607615720f32f21c76725/src/couchdb/couch_secondary_sup.erl
erlang
use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(couch_secondary_sup). -behaviour(supervisor). -export([init/1, start_link/0]). start_link() -> supervisor:start_link({local,couch_secondary_ser...
0150069422ff9b3fb7ac7a1c8ce7d1cef786da650fc1794236ecfc6f1b8ec0b0
danlarkin/subrosa
main.clj
(ns subrosa.main (:gen-class) (:require [carica.core :refer [config]] [clojure.tools.logging :as log] [subrosa.netty :refer [create-server]])) (defn -main [] (let [{:keys [start-fn stop-fn]} (create-server (config :port))] (start-fn) (.addShutdownHook (Runtime/getRuntime) (Thread....
null
https://raw.githubusercontent.com/danlarkin/subrosa/b8e554ffc1b83572acbbb8f50704d3db44b3770f/src/subrosa/main.clj
clojure
(ns subrosa.main (:gen-class) (:require [carica.core :refer [config]] [clojure.tools.logging :as log] [subrosa.netty :refer [create-server]])) (defn -main [] (let [{:keys [start-fn stop-fn]} (create-server (config :port))] (start-fn) (.addShutdownHook (Runtime/getRuntime) (Thread....
cc8112e708897a977d4b4016ba2bff62bca8aed37e70fb71e8b94925cc3d0d81
snoyberg/packdeps
PackDeps.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # # LANGUAGE TemplateHaskell # # LANGUAGE PatternGuards # # LANGUAGE ViewPatterns # module Distribution.PackDeps ( -- * Data types Newest (..) , CheckDepsRes (..) , Reason (..) , Outdated (..) , DescInfo -- * Read package databa...
null
https://raw.githubusercontent.com/snoyberg/packdeps/20389cf29f5556af22eefba6dbb9a1d08484167b/packdeps-yesod/src/Distribution/PackDeps.hs
haskell
# LANGUAGE OverloadedStrings # * Data types * Read package database * Check a package * Get a single package * Get multiple packages * Reverse dependencies * Licenses takes too long to parse dep = dependency, rel = relying package arbitrary hack to make this thing complete in reasonable time/memory | Whether...
# LANGUAGE TupleSections # # LANGUAGE TemplateHaskell # # LANGUAGE PatternGuards # # LANGUAGE ViewPatterns # module Distribution.PackDeps Newest (..) , CheckDepsRes (..) , Reason (..) , Outdated (..) , DescInfo , loadNewest , loadNewestFrom , parseNewest , checkDeps , getPackag...
defcb91d40f828dceb24adc4e4421ac9b473ac257027efbe3a05fba1b216f4e4
FireEmblemUniverse/EAFormattingSuite
PngType.hs
Taken from the JuicyPixels source so that PalettedPng.hs can work properly . # LANGUAGE CPP # | Low level png module , you should import ' Codec . Picture . ' instead . module PngType( PngIHdr( .. ) , PngFilter( .. ) , PngInterlaceMethod( .. ) ...
null
https://raw.githubusercontent.com/FireEmblemUniverse/EAFormattingSuite/af63810897c80c0cffee34313997dd3b2b58694e/PngType.hs
haskell
* Low level types I feel so dirty. :( ------------------------------------------------ -- Types ------------------------------------------------ ^ Image width in number of pixel ^ Image height in number of pixel ^ Number of bit per sample ^ Kind of png image (greyscale, true color, indexed...) ...
Taken from the JuicyPixels source so that PalettedPng.hs can work properly . # LANGUAGE CPP # | Low level png module , you should import ' Codec . Picture . ' instead . module PngType( PngIHdr( .. ) , PngFilter( .. ) , PngInterlaceMethod( .. ) ...
627eacad4d4142bac869aff8aab9792660f2f86294746dce9ec72a728b55dfe2
ocaml/merlin
short_paths.mli
module Desc = Short_paths_graph.Desc module Basis : sig type t val create : unit -> t val add : t -> string -> unit val load : t -> string -> string list -> string list -> Desc.Module.t -> Desc.deprecated -> unit end type t val initial : Basis.t -> t val add : t -> Desc.t list Lazy.t -> t type ty...
null
https://raw.githubusercontent.com/ocaml/merlin/e576bc75f11323ec8489d2e58a701264f5a7fe0e/src/ocaml/typing/short_paths.mli
ocaml
module Desc = Short_paths_graph.Desc module Basis : sig type t val create : unit -> t val add : t -> string -> unit val load : t -> string -> string list -> string list -> Desc.Module.t -> Desc.deprecated -> unit end type t val initial : Basis.t -> t val add : t -> Desc.t list Lazy.t -> t type ty...
54d9093c0ab2bd6ed09a31926b3c53f885ca6adbcc9a7027f2c7e13f2133577b
lichenscript/lichenscript
resizableArray.mli
(* An array that automatically expands when needed *) type t exception Out_of_bounds_set of string ` make x ` creates a ResizableArray.t where the underlying array has the initial size of ` x ` . * However , this is purely for the purposes of optimization : * ` ResizableArray.size ( ResizableArray.make 5 ) ...
null
https://raw.githubusercontent.com/lichenscript/lichenscript/5f9280f5927f1ed799d447940705eca11b8049dc/lib/typing/resizableArray.mli
ocaml
An array that automatically expands when needed `set arr i x` raises `Out_of_bounds_set` if `i >= ResizableArray.size arr`, or if `i < 0` Expands the underlying array if necessary Shrinks the representation to match the number of elements stored Returns None if the index is out of bounds. Exposed only for wh...
type t exception Out_of_bounds_set of string ` make x ` creates a ResizableArray.t where the underlying array has the initial size of ` x ` . * However , this is purely for the purposes of optimization : * ` ResizableArray.size ( ResizableArray.make 5 ) ` still * evaluates to ` 0 ` . * However, this is pur...
61a5144d25a29c8a576dd9dea88129d55eaa7185b61545c3e38356f8b798e48c
PhDP/Akarui
BinT.hs
module Akarui.FOL.BinT where import Akarui.ShowTxt -- | Supported binary connectives (in order of precedence). data BinT = -- | Conjunction. Returns true only if both sides are true. And | Disjunction . Returns true if at least one operand is true . | Or -- | Implication is... messed up. It returns true e...
null
https://raw.githubusercontent.com/PhDP/Akarui/4ad888d011f7115677e8f9ba18887865f5150746/Akarui/FOL/BinT.hs
haskell
| Supported binary connectives (in order of precedence). | Conjunction. Returns true only if both sides are true. | Implication is... messed up. It returns true except if the left operand is true and the right one is false, e.g. True implies False is the only situation where implication returns false. | Equivalen...
module Akarui.FOL.BinT where import Akarui.ShowTxt data BinT = And | Disjunction . Returns true if at least one operand is true . | Or | Implies | Exclusive disjunction . Returns true if one and only one operand is true . | Xor | Iff deriving (Eq, Ord, Show) instance ShowTxt BinT where showTxt An...
f5044bcb8b6484477575785428ab6e068c76c4f379683c0183599e3dba23d72c
PLTools/GT
test820spec.ml
open GT (* (* Have become broken when we intrduced combinatorial type abbreviations *) type 'a maybe = Just of 'a | Nothing [@@deriving gt ~options: { show } ] module P = struct type t = (int -> string) maybe [@@deriving gt ~options:{ show={ _1 = (fun () _ -> "<fun>") } }] end let () = Printf.printf "%s\n%!" ...
null
https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/regression/test820spec.ml
ocaml
(* Have become broken when we intrduced combinatorial type abbreviations
open GT type 'a maybe = Just of 'a | Nothing [@@deriving gt ~options: { show } ] module P = struct type t = (int -> string) maybe [@@deriving gt ~options:{ show={ _1 = (fun () _ -> "<fun>") } }] end let () = Printf.printf "%s\n%!" @@ GT.show P.t @@ Just (fun x -> "?") *) module O = struct type t = { a:int...
3bddd2f83206e5f6dfdf4c3b7d663a3ee80c029baf1c589a5203388e4aad48a2
onaio/milia
user_test.clj
(ns milia.api.user-test (:refer-clojure :exclude [get update]) (:require [clojure.string :refer [join]] [midje.sweet :refer :all] [milia.api.user :refer :all] [milia.api.http :refer [parse-http]] [milia.utils.remote :refer [make-url]])) (def username "fake-username"...
null
https://raw.githubusercontent.com/onaio/milia/718ac4d2952417d1db845bf17ea54663ac7fa6a8/test/clj/milia/api/user_test.clj
clojure
(ns milia.api.user-test (:refer-clojure :exclude [get update]) (:require [clojure.string :refer [join]] [midje.sweet :refer :all] [milia.api.user :refer :all] [milia.api.http :refer [parse-http]] [milia.utils.remote :refer [make-url]])) (def username "fake-username"...
8b8f10a7602fc565f53360ad43512cac8decae761465dc169ea9859b1191f6c2
lem-project/lem
asm-mode.lisp
(defpackage :lem-asm-mode (:use :cl :lem :lem.language-mode) (:export :*asm-mode-hook* :asm-mode) #+sbcl (:lock t)) (in-package :lem-asm-mode) #| I referenced softly these documents: - [GNU as](-2.34/as/index.html) - [rgbasm: assembler for gameboy development]() |# (defun make-tmlanguage-as...
null
https://raw.githubusercontent.com/lem-project/lem/26bd2dc10d92a90317d99ac818286371e5da9b14/modes/asm-mode/asm-mode.lisp
lisp
I referenced softly these documents: - [GNU as](-2.34/as/index.html) - [rgbasm: assembler for gameboy development]()
(defpackage :lem-asm-mode (:use :cl :lem :lem.language-mode) (:export :*asm-mode-hook* :asm-mode) #+sbcl (:lock t)) (in-package :lem-asm-mode) (defun make-tmlanguage-asm () (let ((patterns (make-tm-patterns (make-tm-region "\"" "\"" :name 'syntax-string-attribute) ...
a687a0e14908f92f4082b1213f5b8d52dcaa41ab9ac8e06a7cc945ea910ce063
anwarmamat/cmsc330spring18-public
public.ml
open OUnit2 open Types open Eval open Utils open TestUtils let env1 = [("var1", Int_Val 4); ("var2", Bool_Val false)] let test_expr_basic ctxt = let i = 5 in assert_equal (Int_Val i) (eval_expr [] (Int i)); let i = (-10) in assert_equal (Int_Val i) (eval_expr [] (Int i)); assert_equal (Bool_Val true) (eval_expr...
null
https://raw.githubusercontent.com/anwarmamat/cmsc330spring18-public/b401e5157c05c7f47ee2d0ec1b21c7b142316031/p3b/public.ml
ocaml
Simple sequence Simple if true and if false Simple define int/ bool - test defaults Simple assign int/bool/exp equal & not equal & less Some expressions NoOp More Comprehensive val eval_expr : Types.eval_environment -> Types.expr -> Types.value_type
open OUnit2 open Types open Eval open Utils open TestUtils let env1 = [("var1", Int_Val 4); ("var2", Bool_Val false)] let test_expr_basic ctxt = let i = 5 in assert_equal (Int_Val i) (eval_expr [] (Int i)); let i = (-10) in assert_equal (Int_Val i) (eval_expr [] (Int i)); assert_equal (Bool_Val true) (eval_expr...
4187d79128217c70515720760491e4c136579a85cedb605313468bbacb03dd02
cicakhq/potato
commands.lisp
;;; ;;; Handling of external commands. These commands are generally issued from the main binary using the --cmd parameter . ;;; (in-package :potato.commands) (declaim #.potato.common::*compile-decl*) (defun trim-spaces (s) (string-trim (coerce '(#\Space #\Tab) 'string) s)) (declaim (inline char-whitespace-p))...
null
https://raw.githubusercontent.com/cicakhq/potato/88b6c92dbbc80a6c9552435604f7b1ae6f2a4026/src/potato/commands.lisp
lisp
Handling of external commands. These commands are generally
issued from the main binary using the --cmd parameter . (in-package :potato.commands) (declaim #.potato.common::*compile-decl*) (defun trim-spaces (s) (string-trim (coerce '(#\Space #\Tab) 'string) s)) (declaim (inline char-whitespace-p)) (defun char-whitespace-p (ch) #+sb-unicode (sb-unicode:whitespace-p ...
9f3d9d8a35eb3534763312e54fa4477f2ca76190dd11ac31d9f5400734f42586
soegaard/racket-stories
parameters.rkt
#lang racket/base (provide (all-defined-out)) (require "structs.rkt") ;;; ;;; Parameters ;;; ; The server stores the current request in current-request. (define current-request (make-parameter #f)) (define current-user (make-parameter #f)) ; The control checks login-status and sets the parameter. ; The vie...
null
https://raw.githubusercontent.com/soegaard/racket-stories/78f66867f213acecd646b0b757819391cee9c261/app-racket-stories/parameters.rkt
racket
Parameters The server stores the current request in current-request. The control checks login-status and sets the parameter. The view needs this to display the login status.
#lang racket/base (provide (all-defined-out)) (require "structs.rkt") (define current-request (make-parameter #f)) (define current-user (make-parameter #f)) (define current-login-status (make-parameter #f)) (define current-output-cookies (make-parameter '())) (define (add-output-cookie c) (current-outp...
77f5dfee6ad23dfde09e9c1c4f2cd375ab225bb1f09e422bd55d75440dffbdbd
SKA-ScienceDataProcessor/RC
Cfg.hs
-- |Cfg.hs -- -- Configuration module (executable names, build specific functions, etc). -- Copyright ( C ) 2014 Braam Research module Cfg ( executableName , timePeriod , timePeriodPure , synchronizationPoint , eventMessage ) where import Control.Monad import Control....
null
https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS1/ddp-erlang-style/cfgs/SIMD-eventlog/Cfg.hs
haskell
|Cfg.hs Configuration module (executable names, build specific functions, etc). |Put measurements about time period into eventlog. |Measure time period of pure computation into eventlog. Is strict on argument. timePeriodPure ev a = (traceEvent ("START "++ev) ()) `seq` (a `seq` traceEvent ("END "++ev) a) |Synchr...
Copyright ( C ) 2014 Braam Research module Cfg ( executableName , timePeriod , timePeriodPure , synchronizationPoint , eventMessage ) where import Control.Monad import Control.Monad.Trans import Data.Time import Debug.Trace import System.IO.Unsafe (unsafeDupablePer...
723961006a49846442f9f0c24a531943d6971aa175e6620f40181bc0161eb010
ocaml-sf/learn-ocaml-corpus
makeT0.ml
let empty : heap = E let rank (h : heap) : rank = match h with | E -> 0 | T (r, _, _, _) -> r let makeT x h1 h2 = (* Fails. *) failwith "I am wrong"
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/leftist_heaps/wrong/makeT0.ml
ocaml
Fails.
let empty : heap = E let rank (h : heap) : rank = match h with | E -> 0 | T (r, _, _, _) -> r let makeT x h1 h2 = failwith "I am wrong"
e8155ef88720bce502b7a0b1900b6dbeea9e5119e3a77ed2c40b354c749c65ea
shnarazk/mios
DIMACS.hs
{-# LANGUAGE Safe #-} | Read / Write a CNF file only with ghc standard libraries module SAT.Mios.Util.DIMACS ( -- * Input fromFile , clauseListFromFile , fromMinisatOutput , clauseListFromMinisatOutput -- * Output , toFile , toDIMACSString ,...
null
https://raw.githubusercontent.com/shnarazk/mios/d032d761d73224f981a07ec2ea90936db6f495e8/MultiConflict/SAT/Mios/Util/DIMACS.hs
haskell
# LANGUAGE Safe # * Input * Output * Bool Operation | String from BoolFrom | String from BoolFrom
| Read / Write a CNF file only with ghc standard libraries module SAT.Mios.Util.DIMACS ( fromFile , clauseListFromFile , fromMinisatOutput , clauseListFromMinisatOutput , toFile , toDIMACSString , asDIMACSString , asDIMACSString_ , module SAT.Mi...
abd024ce60d966e5c063c1468ee2b68dabf74edb016352cb0403cfa518ec67e2
quil-lang/quilc
faithfulness-tests.lisp
;;;; faithfulness-tests.lisp ;;;; Author : ;;;; ;;;; Ensures that quilc's output matches its input, according to the -m switch. (in-package #:quilc-tests) (defparameter *faithfulness-test-file-directory* (asdf:system-relative-pathname ':quilc-tests "app/tests/faithfulness-test-files/")) (deftest test-fai...
null
https://raw.githubusercontent.com/quil-lang/quilc/3f3260aaa65cdde25a4f9c0027959e37ceef9d64/app/tests/faithfulness-tests.lisp
lisp
faithfulness-tests.lisp Ensures that quilc's output matches its input, according to the -m switch.
Author : (in-package #:quilc-tests) (defparameter *faithfulness-test-file-directory* (asdf:system-relative-pathname ':quilc-tests "app/tests/faithfulness-test-files/")) (deftest test-faithfulness () "Test whether compilation preserves semantic equivalence for some test programs." (finish-output) (l...
736a8959a157a3aca4e72164584e794f804ba248b46a71a285cd05e237ac1601
clojurecup2014/parade-route
sequences.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/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Internal/Plugins/clojure/test_clojure/sequences.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 . Contributors : (ns clojure.test-clojure.sequences (:use clojure.test)) (deftest test-reduce-from-chunked-into-unchunked (= [1 2 \a \b] (into [] (concat [1 2] "ab")))) (deftest test-reduce (let [int+ (fn [a b] (+ (int a) (int b))) avec (into [] arang...
8abfd56d536f29a63d007da5c66033a2d5b31438e6af1aa2403d0d1fbb15c4b9
nvim-treesitter/nvim-treesitter
highlights.scm
; HEEx delimiters [ "%>" "--%>" "-->" "/>" "<!" "<!--" "<" "<%!--" "<%" "<%#" "<%%=" "<%=" "</" "</:" "<:" ">" "{" "}" ] @tag.delimiter ; HEEx operators are highlighted as such "=" @operator HEEx inherits the DOCTYPE tag from HTML (doctype) @constant ; HEEx comments are highligh...
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/083aee08735fd5dcd02ef72d831b054244db73a4/queries/heex/highlights.scm
scheme
HEEx delimiters HEEx operators are highlighted as such HEEx comments are highlighted as such HEEx text content is treated as markup Tree-sitter parser errors HEEx tags and slots are highlighted as HTML HEEx attributes are highlighted as HTML attributes HEEx components are highlighted as modules and function cal...
[ "%>" "--%>" "-->" "/>" "<!" "<!--" "<" "<%!--" "<%" "<%#" "<%%=" "<%=" "</" "</:" "<:" ">" "{" "}" ] @tag.delimiter "=" @operator HEEx inherits the DOCTYPE tag from HTML (doctype) @constant (comment) @comment (text) @text (ERROR) @error [ (tag_name) (slot_name) ] @tag ...
0b05fe1df73f77023ee48795c59ed173cb1b6813934d571a2d5f628465e45bd8
sighingnow/mxnet-haskell
Symbol.hs
----------------------------------------------------------- -- | -- module: MXNet.Core.Base.Internal.TH.Symbol copyright : ( c ) 2016 license : MIT -- maintainer: -- -- Functions about Symbol that generated by template haskell. -- # OP...
null
https://raw.githubusercontent.com/sighingnow/mxnet-haskell/b8e8c6834519df512533094122ee223fd9fb91d8/mxnet/src/MXNet/Core/Base/Internal/TH/Symbol.hs
haskell
--------------------------------------------------------- | module: MXNet.Core.Base.Internal.TH.Symbol maintainer: Functions about Symbol that generated by template haskell. # OPTIONS_GHC -Wno-redundant-constraints # # OPTIONS_GHC -Wno-unused-local-binds # | Register symbol...
copyright : ( c ) 2016 license : MIT # OPTIONS_GHC -Wno - missing - signatures # # LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeAppl...
d5030c42916b48fe4dd23f268e58d0af824be208321a9d969ee2c9320f172928
quchen/generative-art
Triangulate.hs
module Geometry.Algorithms.Triangulate ( triangulate ) where import Data.List import Data.Ord import Geometry.Core import Util -- | Split a polygon into a number of triangles. -- -- <<docs/triangulation/3_haskell_logo.svg>> triangulate :: Polygon -> [Polygon] triangulate polygon = case clipEar polygon of ...
null
https://raw.githubusercontent.com/quchen/generative-art/32a7d0267439113998998759eab09312a60b7351/src/Geometry/Algorithms/Triangulate.hs
haskell
| Split a polygon into a number of triangles. <<docs/triangulation/3_haskell_logo.svg>> | Ear-clipping algorithm – find an isolated triangle we can cut off. Meant to be iterated until the input is fully triangulated. Probably terrible performance for large polygons. | All rotations of a list.
module Geometry.Algorithms.Triangulate ( triangulate ) where import Data.List import Data.Ord import Geometry.Core import Util triangulate :: Polygon -> [Polygon] triangulate polygon = case clipEar polygon of (ear, Nothing) -> [ear] (ear, Just rest) -> ear : triangulate rest isEar :: Polygon -> Poly...
1fe0ee17ed5eacecd8e1ff440a44ca25f70f8e488880e1985a7ee9b617a1b031
DavidAlphaFox/RabbitMQ
rabbit_mqtt.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-mqtt/src/rabbit_mqtt.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved . -module...
ae97853436471e6898c2d2eecd9df3ba80177b13c5dd2150ac789eae2172a141
Cahu/krpc-hs
KRPCHS.hs
# LANGUAGE RecordWildCards # module KRPCHS ( RPCClient , StreamClient , RPCContext , KRPCStream , KRPCStreamReq , KRPCStreamMsg , KRPCResponseExtractable , emptyKRPCStreamMsg , getStreamMessage , getStreamMessageIO , messageResultsCount , messageHasResultFor , addStream , removeStream , withStream , getStreamResult ...
null
https://raw.githubusercontent.com/Cahu/krpc-hs/418f88f2acad8d50dd716d9a3477178332f00806/src/KRPCHS.hs
haskell
, getServices establish connection
# LANGUAGE RecordWildCards # module KRPCHS ( RPCClient , StreamClient , RPCContext , KRPCStream , KRPCStreamReq , KRPCStreamMsg , KRPCResponseExtractable , emptyKRPCStreamMsg , getStreamMessage , getStreamMessageIO , messageResultsCount , messageHasResultFor , addStream , removeStream , withStream , getStreamResult ...
c56b1117820fb1b193bffdb2fcbe95129be5637ec74d9398725ed037ee8382d5
sebastiaanvisser/clay
Box.hs
# LANGUAGE OverloadedStrings , module Clay.Box ( BoxType , paddingBox, borderBox, contentBox , boxSizing -- * @box-shadow@ -- $box-shadow , boxShadow , shadow , shadowWithBlur , shadowWithSpread , bsInset , bsColor -- ** Deprecated -- $box-shadow-deprecated , boxShadow' , boxShadowWithSpread , boxShadows , insetBoxSh...
null
https://raw.githubusercontent.com/sebastiaanvisser/clay/16f55a5c6ab7fd98e39cedf852bd3400a02ac45f/src/Clay/Box.hs
haskell
* @box-shadow@ $box-shadow ** Deprecated $box-shadow-deprecated ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- $box-shadow ===...
# LANGUAGE OverloadedStrings , module Clay.Box ( BoxType , paddingBox, borderBox, contentBox , boxSizing , boxShadow , shadow , shadowWithBlur , shadowWithSpread , bsInset , bsColor , boxShadow' , boxShadowWithSpread , boxShadows , insetBoxShadow ) where import Data.List.NonEmpty (NonEmpty) import Clay.Color import...
62b0b20e37d2b901b80222ce8b7884c9adda8aab7776576956d7fa59d67776c4
Helium4Haskell/helium
PatternBindingGuardBug.hs
-- met dank aan Maarten. (main,_) | True = ("Hello", "world!")
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/correct/PatternBindingGuardBug.hs
haskell
met dank aan Maarten.
(main,_) | True = ("Hello", "world!")
9f42c886de77b639030c7809c890feacdbd3b62446ca383ac42dad803272a75d
ekmett/monoids
Reducer.hs
# LANGUAGE UndecidableInstances , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , GeneralizedNewtypeDeriving , TypeOperators , ScopedTypeVariables , CPP # ----------------------------------------------------------------------------- -- | -- Module : Data.Monoid.Reducer Copyright : ( c ) 2...
null
https://raw.githubusercontent.com/ekmett/monoids/711963df750ba3417f464fbc0c6c726f3a0c9c8c/Data/Monoid/Reducer.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Monoid.Reducer License : BSD3 Maintainer : Stability : experimental Portability : non-portable (MPTCs) This 'unit' acts in many ways like 'return' for a 'Monad' but is limited to a single type. ------...
# LANGUAGE UndecidableInstances , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , GeneralizedNewtypeDeriving , TypeOperators , ScopedTypeVariables , CPP # Copyright : ( c ) 2009 A @c@-'Reducer ' is a ' Monoid ' with a canonical mapping from @c@ to the Monoid . module Data.Monoid.Reducer ...
f856b7c5cb8fb79c270977c5553cabc46c01187fb940a637e60fe299a8361f83
codinuum/cca
parserlib_base.mli
Copyright 2012 - 2020 Codinuum Software Lab < > 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 wri...
null
https://raw.githubusercontent.com/codinuum/cca/3d97b64a5c23ff97c08455ac604ccb9fed471d91/src/ast/analyzing/langs/common/parserlib_base.mli
ocaml
Copyright 2012 - 2020 Codinuum Software Lab < > 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 wri...
b7a6ac4d25b1665b226a75dad17aee78ec806d322ff29b2bec74ee86d46c44fa
exercism/clojure
check_exercises.clj
(ns check-exercises (:require [cheshire.core :as json] [clojure.string :as string] [clojure.test :refer [deftest is run-tests successful?]])) (defn- ->snake_case [s] (string/replace s \- \_)) (deftest check-practice-exercises (doseq [exercise (((json/parse-string (slurp "config.json")) "ex...
null
https://raw.githubusercontent.com/exercism/clojure/dbbb3f23b2948520ca3d47dded6473d8ca2b1500/_test/check_exercises.clj
clojure
(ns check-exercises (:require [cheshire.core :as json] [clojure.string :as string] [clojure.test :refer [deftest is run-tests successful?]])) (defn- ->snake_case [s] (string/replace s \- \_)) (deftest check-practice-exercises (doseq [exercise (((json/parse-string (slurp "config.json")) "ex...
d7d0bf596b38dc8d1fb6b50fd877683994df6802e0a51776ee05accd61cb0542
clojure-interop/java-jdk
MetalInternalFrameUI.clj
(ns javax.swing.plaf.metal.MetalInternalFrameUI "Metal implementation of JInternalFrame." (:refer-clojure :only [require comment defn ->]) (:import [javax.swing.plaf.metal MetalInternalFrameUI])) (defn ->metal-internal-frame-ui "Constructor. b - `javax.swing.JInternalFrame`" (^MetalInternalFrameUI [^javax...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/metal/MetalInternalFrameUI.clj
clojure
(ns javax.swing.plaf.metal.MetalInternalFrameUI "Metal implementation of JInternalFrame." (:refer-clojure :only [require comment defn ->]) (:import [javax.swing.plaf.metal MetalInternalFrameUI])) (defn ->metal-internal-frame-ui "Constructor. b - `javax.swing.JInternalFrame`" (^MetalInternalFrameUI [^javax...
cb245402e7b5e7d0d107d70fd29eec61dae946f424b5553ad39b1fd78290ece9
atlas-engineer/ospm
ospm.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :ospm) ;; TODO: Add more typing. (defclass* manager () ((path "" :type (or string pathname)) (manifest-directory (uiop:xdg-data-home "manifests") :type (or string pathname))...
null
https://raw.githubusercontent.com/atlas-engineer/ospm/aa998e796343bcb56dcfcb63aeb02bd8c33038c8/ospm.lisp
lisp
TODO: Add more typing.
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :ospm) (defclass* manager () ((path "" :type (or string pathname)) (manifest-directory (uiop:xdg-data-home "manifests") :type (or string pathname))) (:export-class-name-p ...
73f65bc935e350be3e838df7536e01f77b40e554df80933e964ee848521e094e
huangz1990/real-world-haskell-cn
firstDigit.hs
-- file: ch12/Barcode.hs firstDigit :: [Parity a] -> Digit firstDigit = snd . head . bestScores paritySRL . runLengths . map parityBit . take 6 where parityBit (Even _) = Zero parityBit (Odd _) = One
null
https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch12/firstDigit.hs
haskell
file: ch12/Barcode.hs
firstDigit :: [Parity a] -> Digit firstDigit = snd . head . bestScores paritySRL . runLengths . map parityBit . take 6 where parityBit (Even _) = Zero parityBit (Odd _) = One
ee1ad61a8f9ecbf1f52def2f4eef80635b07e2783fdf81895943088fcac94fbb
heraldry/heraldicon
transform_test.cljs
(ns heraldicon.reader.blazonry.transform-test (:require [cljs.test :refer-macros [are deftest]] [heraldicon.reader.blazonry.transform.core :as transform])) (deftest transforming (are [ast form] (= (transform/transform ast) form) [:A "a"] 1 [:A "an"] 1 [:number/NUMBER "123"] 123 [:number/NUM...
null
https://raw.githubusercontent.com/heraldry/heraldicon/f3298ed0b3394f8db78c4e5e548adc61cd9a256d/test/heraldicon/reader/blazonry/transform_test.cljs
clojure
(ns heraldicon.reader.blazonry.transform-test (:require [cljs.test :refer-macros [are deftest]] [heraldicon.reader.blazonry.transform.core :as transform])) (deftest transforming (are [ast form] (= (transform/transform ast) form) [:A "a"] 1 [:A "an"] 1 [:number/NUMBER "123"] 123 [:number/NUM...
4f78416c9ece68233681b68d0608120aa3cac2927e43088d837fb0e22caf0967
wdebeaum/step
vienna.lisp
;;;; ;;;; (define-words :pos W::n :words ( ((W::VIENNA W::BREAD) (senses ((LF-PARENT ONT::BREAD) (syntax (W::morph (:forms (-none)))) (TEMPL MASS-PRED-TEMPL) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/vienna.lisp
lisp
(define-words :pos W::n :words ( ((W::VIENNA W::BREAD) (senses ((LF-PARENT ONT::BREAD) (syntax (W::morph (:forms (-none)))) (TEMPL MASS-PRED-TEMPL) ) ) ) ))
49d87a5a2b84f0593cec6536bd0bee7adf33fd02ee5333d8a33b222964f4ce0b
opennars/Narjure
projection_eternalization.clj
(ns nal.deriver.projection-eternalization (:require [nal.deriver.truth :refer [w2c frequency confidence]])) ;temporally project task to ref task (note: this is only for event tasks!!)" (defn project-to "projects the task t to the target-time given the current time cur-time." [target-time t cur-time] (when ...
null
https://raw.githubusercontent.com/opennars/Narjure/cd5a72e6777fc47271d721fef8362aa2dad664ca/src/nal/deriver/projection_eternalization.clj
clojure
temporally project task to ref task (note: this is only for event tasks!!)" temporally projecting/eternalizing a task to ref time
(ns nal.deriver.projection-eternalization (:require [nal.deriver.truth :refer [w2c frequency confidence]])) (defn project-to "projects the task t to the target-time given the current time cur-time." [target-time t cur-time] (when (= :eternal (:occurrence t)) (println "ERROR: Project called on eternal t...
bf25fb52cc9f8c72891699c5abac15bc6c769cfa8a988efcfbc487f4a8a9fc4a
AndrasKovacs/ELTE-func-lang
Lesson10_after.hs
{-# OPTIONS_GHC -Wincomplete-patterns #-} # LANGUAGE InstanceSigs # # LANGUAGE DeriveFunctor # # LANGUAGE LambdaCase # import Data.Maybe import Data.Char import Control.Applicative import Control.Monad import Debug.Trace Parser newtype Parser a = Parser {runParser :: String -> Maybe (a, String)} deriving Functor...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/3b3a0be52867e2bd998d5b895eb503545e9780ec/2020-21-2/gyak_3/Lesson10_after.hs
haskell
# OPTIONS_GHC -Wincomplete-patterns # (State String + Maybe) monad Nothing : parse error Just (a, s) : successful parsing with result and remaining input No input is consumed Executing parsers sequentially Basic parsers Read a character if it satisfies a certain criteria (And the input is not empty.) R...
# LANGUAGE InstanceSigs # # LANGUAGE DeriveFunctor # # LANGUAGE LambdaCase # import Data.Maybe import Data.Char import Control.Applicative import Control.Monad import Debug.Trace Parser newtype Parser a = Parser {runParser :: String -> Maybe (a, String)} deriving Functor Parser a : function , which can modify...
8ed012b92b7f2f27389a661c35a41b61c7186c9f9e1fdac251110a700b824136
lehins/primal
Class.hs
# LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE UnboxedTuples # # LANGUAGE UndecidableInstances # -- | -- Module : Primal.Element.Unbox.Class Copyright : ( c...
null
https://raw.githubusercontent.com/lehins/primal/c620bfd4f2a6475f1c12183fbe8138cf29ab1dad/primal/src/Primal/Element/Unbox/Class.hs
haskell
| Module : Primal.Element.Unbox.Class License : BSD3 Stability : experimental Portability : non-portable | Invariants: * Writing should always overwrite all of the bytes allocated for the element. In other words, writing to a dirty (uninitilized) region of memory should never leave any * A sin...
# LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE UnboxedTuples # # LANGUAGE UndecidableInstances # Copyright : ( c ) 2020 - 2021 Maintainer : < > module P...
7249462d2809012784055d362726ce8f8267550da4df4fd6e2b6a955c7e70cfe
clojure/test.check
runner.cljs
(ns clojure.test.check.test.runner (:require [clojure.string :as string] [cljs.nodejs :as nodejs] [cljs.js :as cljs] [cljs.reader :as reader])) (def out-dir "target/out-self-host") (def src-paths [out-dir "src/main/clojure" "src/test/clojure"]) (d...
null
https://raw.githubusercontent.com/clojure/test.check/c05034f911fa140913958b79aa51017d3f2f4426/src/target/cljs/self-host/clojure/test/check/test/runner.cljs
clojure
monkey-patch isProvided_ to avoid useless warnings monkey-patch goog.require, skip all the loaded checks setup printing Facilities for loading files An atom to keep track of things we've already loaded Facilities for driving cljs.js
(ns clojure.test.check.test.runner (:require [clojure.string :as string] [cljs.nodejs :as nodejs] [cljs.js :as cljs] [cljs.reader :as reader])) (def out-dir "target/out-self-host") (def src-paths [out-dir "src/main/clojure" "src/test/clojure"]) (d...
ac034c5b7f391d3bcc1e51931d07f20aeb5df715ebe78e1919bb87c9816be0b2
smaccoun/beam-servant
AppPrelude.hs
module AppPrelude ( module Protolude ) where import Protolude
null
https://raw.githubusercontent.com/smaccoun/beam-servant/1560f81c56ca7a324be1ee68208fb05c4dfea844/src/AppPrelude.hs
haskell
module AppPrelude ( module Protolude ) where import Protolude
29ae1c69b3bd34af96548fd62bf3b2c1886b5eb337350184ed0edd8d08f14020
GaloisInc/saw-script
Position.hs
| Module : . Position Description : Positions in source code Maintainer : , atomb Stability : provisional Module : SAWScript.Position Description : Positions in source code Maintainer : jhendrix, atomb Stability : provisional -} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveFun...
null
https://raw.githubusercontent.com/GaloisInc/saw-script/46249dbc7bae5f48623a709b1df1cc1ea002d4c5/src/SAWScript/Position.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings # Pos ------------------------------------------------------------------------ file start line, col end line, col show (Pos f 0 0) = f ++ ":end-of-file" show (Pos f l c) = f ++ ":" ++ show l ++ ":" ++ ...
| Module : . Position Description : Positions in source code Maintainer : , atomb Stability : provisional Module : SAWScript.Position Description : Positions in source code Maintainer : jhendrix, atomb Stability : provisional -} # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # L...
90abdb9a8329181ed848c933fe168d9df3130587efeff1783af0694128f3e707
pink-gorilla/ui-gorilla
deps.cljs
{:npm-deps {; shadow cljs creates package.json ; based on this dependencies ; video "react-player" "^2.9.0" ;sparklines "react-sparklines" "^1.7.0" ; }}
null
https://raw.githubusercontent.com/pink-gorilla/ui-gorilla/6ce11778256629f077e0267d0a85913a5823baa3/src/deps.cljs
clojure
shadow cljs creates package.json based on this dependencies video sparklines
{:npm-deps "react-player" "^2.9.0" "react-sparklines" "^1.7.0" }}
ac19c9ea5eaa55ab5c39046a1273ecd9dc081fb93c347e8e4eb46e06386f1e2f
semilin/layoup
crusty.lisp
(MAKE-LAYOUT :NAME "crusty" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL :KEYBOARD NIL)
null
https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/crusty.lisp
lisp
(MAKE-LAYOUT :NAME "crusty" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL :KEYBOARD NIL)
5a4be6f917491d2e6e3e361d090066bffb5bdf8e7bd27db6c207237955398eb2
rmloveland/scheme48-0.53
stack-check.scm
Copyright ( c ) 1993 - 1999 by and . See file COPYING . ; This determines the maximum stack depth needed by a code vector. (define (maximum-stack-use code-vector) (cond ((not (= (code-vector-ref code-vector 0) (enum op protocol))) 0) ((= (code-vector-ref code-vector 1) nary-dispatch-protocol) ; ha...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/bcomp/stack-check.scm
scheme
This determines the maximum stack depth needed by a code vector. has unjumped-to targets ---------------- depth at jump targets. Continue on at opcode I. This is used for opcodes that do not fall through to the next instruction. I is either the end of the code vector or the target of a jump or continuation. Sk...
Copyright ( c ) 1993 - 1999 by and . See file COPYING . (define (maximum-stack-use code-vector) (cond ((not (= (code-vector-ref code-vector 0) (enum op protocol))) 0) ((= (code-vector-ref code-vector 1) (stack-max code-vector 6 0 0 (do ((i 2 (+ i 1)) (r '() (let ((target (c...
cbd764fd64ccb864f862e451e19d2bc916b326ad2ea34f6c40f584f9337c7497
camllight/camllight
gram_aux.ml
Auxiliaries for the parser . #open "syntax";; let regexp_for_string s = re_string 0 where rec re_string n = if n >= string_length s then Epsilon else if succ n = string_length s then Characters([nth_char s n]) else Sequence(Characters([nth_char s n]), re_string (succ n)) ;; let char_class c1 c2 = cla...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/src/lex/gram_aux.ml
ocaml
Auxiliaries for the parser . #open "syntax";; let regexp_for_string s = re_string 0 where rec re_string n = if n >= string_length s then Epsilon else if succ n = string_length s then Characters([nth_char s n]) else Sequence(Characters([nth_char s n]), re_string (succ n)) ;; let char_class c1 c2 = cla...
6ef930780b9dbd92491d0d06e8e5bda7a4c2db32df1b16ddc41af5bd0c1f3266
andrejbauer/clerical
external.ml
(** Definitions of external function. *) type entry = prec:Runtime.precision -> Value.value list -> Value.result (** Helper functions for making external functions. The suffix X..ZT means that the inputs are of types X, ..., Z and the ouyput of type T, where I stands for integers and B for booleans. *...
null
https://raw.githubusercontent.com/andrejbauer/clerical/6916f1de50f812921fe187bdaec830e06f4dcde8/src/external.ml
ocaml
* Definitions of external function. * Helper functions for making external functions. The suffix X..ZT means that the inputs are of types X, ..., Z and the ouyput of type T, where I stands for integers and B for booleans. Shift [k] by [j] places to the left (or right if [j] is negative.
type entry = prec:Runtime.precision -> Value.value list -> Value.result let make_BB s f = s, begin fun ~prec -> function | [v] -> begin match Value.value_as_boolean v with | Some b -> Value.CBoolean (f b) | None -> Runtime.error ~loc:Location.nowhere (Runtime.InvalidExternal ...
b5d6dc948e41cb723aa188731fdd119cb8effc1bdabe38edadd8947406fb2f47
incoherentsoftware/defect-process
Sprites.hs
module Enemy.All.Wall.Sprites ( EnemySprites(..) , mkEnemySprites ) where import Control.Monad.IO.Class (MonadIO) import Enemy.Util import FileCache import Window.Graphics data EnemySprites = EnemySprites { _spawn :: Sprite , _idle :: Sprite , _hurt :: Sprite ...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Enemy/All/Wall/Sprites.hs
haskell
module Enemy.All.Wall.Sprites ( EnemySprites(..) , mkEnemySprites ) where import Control.Monad.IO.Class (MonadIO) import Enemy.Util import FileCache import Window.Graphics data EnemySprites = EnemySprites { _spawn :: Sprite , _idle :: Sprite , _hurt :: Sprite ...
9239ca0363d54500fb079b97d1ef468e173bc73768a73b610263afc1414b39c7
iu-parfunc/haskell_dsl_tour
L18NormalizeContext.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE StandaloneDeriving # module FrameworkHs.GenGrammars.L18NormalizeContext where import FrameworkHs.Prims import FrameworkHs.Helpers import Text.PrettyPrint.HughesPJ (text) import Blaze.ByteString.Builder (fromByteString) data Prog = Letrec [(Label,[UVar],Value)] Value d...
null
https://raw.githubusercontent.com/iu-parfunc/haskell_dsl_tour/f75a7e492a1e5d219a77fb128f70441d54a706eb/middle_end/nanopass/course_example/FrameworkHs/GenGrammars/L18NormalizeContext.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE StandaloneDeriving # module FrameworkHs.GenGrammars.L18NormalizeContext where import FrameworkHs.Prims import FrameworkHs.Helpers import Text.PrettyPrint.HughesPJ (text) import Blaze.ByteString.Builder (fromByteString) data Prog = Letrec [(Label,[UVar],Value)] Value data Pred = LetP [(UVar,Value)] Pr...
0c64b2ed7bc62805f3ca378d044070bb2f06a3633042a823264541599acc7269
CoNarrative/precept
accumulators.cljc
(ns precept.accumulators (:require [clara.rules.accumulators]) (:refer-clojure :exclude [min max distinct count])) Define 's accumulator functions in this ns so users can avoid requiring as a dependency (def accum clara.rules.accumulators/accum) (def reduce-to-accum clara.rules.accumulators/reduce-to-accum) ...
null
https://raw.githubusercontent.com/CoNarrative/precept/6078286cae641b924a2bffca4ecba19dcc304dde/src/cljc/precept/accumulators.cljc
clojure
(ns precept.accumulators (:require [clara.rules.accumulators]) (:refer-clojure :exclude [min max distinct count])) Define 's accumulator functions in this ns so users can avoid requiring as a dependency (def accum clara.rules.accumulators/accum) (def reduce-to-accum clara.rules.accumulators/reduce-to-accum) ...
dbef58d7544aee4f3707260ef27255508e37decee72e178aa47438fc7cd2ec7f
penpot/penpot
avatars.cljs
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) KALEIDOS INC (ns app.util.avatars (:require [app.util.object :as obj] [cuerdas.core :as str])) (defn generate* [...
null
https://raw.githubusercontent.com/penpot/penpot/cc18f84d620e37d8efafc5bed1bcdbe70ec23c1e/frontend/src/app/util/avatars.cljs
clojure
Copyright (c) KALEIDOS INC
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 /. (ns app.util.avatars (:require [app.util.object :as obj] [cuerdas.core :as str])) (defn generate* [{:keys [name color size] :or ...
3435e84e2e546bd84c492d2b10e5987e3521ba6ee49e61741d7bc5ab61e02b40
BillHallahan/G2
DerivingComp.hs
module DerivingComp where data X = A Int | B X deriving (Eq, Ord) data Y = C X | D Y deriving (Eq, Ord) eq :: Y -> Y -> Bool eq x y = x == y notEq :: Y -> Y -> Bool notEq x y = x /= y lt :: Y -> Y -> Bool lt x y = x < y gt :: Y -> Y -> Bool gt x y = x > y
null
https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/tests/TestFiles/Deriving/DerivingComp.hs
haskell
module DerivingComp where data X = A Int | B X deriving (Eq, Ord) data Y = C X | D Y deriving (Eq, Ord) eq :: Y -> Y -> Bool eq x y = x == y notEq :: Y -> Y -> Bool notEq x y = x /= y lt :: Y -> Y -> Bool lt x y = x < y gt :: Y -> Y -> Bool gt x y = x > y
de1e667f6222244ff00de5c0eadd00d6b1e6f64a35d75d361898b2e56b6b732f
rtoy/ansi-cl-tests
pprint-exit-if-list-exhausted.lsp
;-*- Mode: Lisp -*- Author : Created : Tue Jul 6 06:11:01 2004 Contains : Tests of PPRINT - EXIT - IF - LIST - EXHAUSTED , PPRINT - POP (in-package :cl-test) (deftest pprint-exit-if-list-exhausted.1 (with-standard-io-syntax (let ((*print-pretty* nil) (*print-escape* nil) (*pr...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/pprint-exit-if-list-exhausted.lsp
lisp
-*- Mode: Lisp -*- Tests focusing on pprint-pop pprint-pop and circularity/sharing pprint-pop when pprint-logical-block is given NIL Error cases
Author : Created : Tue Jul 6 06:11:01 2004 Contains : Tests of PPRINT - EXIT - IF - LIST - EXHAUSTED , PPRINT - POP (in-package :cl-test) (deftest pprint-exit-if-list-exhausted.1 (with-standard-io-syntax (let ((*print-pretty* nil) (*print-escape* nil) (*print-right-margin* 100) ...
07a1369fba144f6b76a0ef79901195228e11a1293295b76158346bbfc79dd970
andersfugmann/aws-s3
aws.ml
open StdLabels let sprintf = Printf.sprintf let debug = false let log fmt = match debug with | true -> Printf.kfprintf (fun _ -> ()) stderr ("%s: " ^^ fmt ^^ "\n%!") __MODULE__ | false -> Printf.ikfprintf (fun _ -> ()) stderr fmt let _ = log let empty_sha = Authorization.hash_sha256 "" |> Authorization.to_hex let...
null
https://raw.githubusercontent.com/andersfugmann/aws-s3/84af629119e313ba46cf3eab9dd7b914e6bae5e9/aws-s3/aws.ml
ocaml
Recursive call. Create headers structure Get errors if the chunk_writer fails
open StdLabels let sprintf = Printf.sprintf let debug = false let log fmt = match debug with | true -> Printf.kfprintf (fun _ -> ()) stderr ("%s: " ^^ fmt ^^ "\n%!") __MODULE__ | false -> Printf.ikfprintf (fun _ -> ()) stderr fmt let _ = log let empty_sha = Authorization.hash_sha256 "" |> Authorization.to_hex let...
de8bda34c3c4b211e18537f6e6f5764822c1a859027a0e9de46583c0bb2f1c18
athos/pogonos
protocols.cljc
(ns pogonos.protocols (:refer-clojure :exclude [read-line resolve])) (defprotocol IReader (read-line [this]) (end? [this]) (close [this])) (defprotocol ToReader (->reader [this])) (defprotocol IRenderable (render [this ctx out])) (defprotocol IStringifiable (stringify [this out])) (defprotocol IParti...
null
https://raw.githubusercontent.com/athos/pogonos/5e8e9d871a7c98bdff833124f89f3e1d9fa224a3/src/pogonos/protocols.cljc
clojure
(ns pogonos.protocols (:refer-clojure :exclude [read-line resolve])) (defprotocol IReader (read-line [this]) (end? [this]) (close [this])) (defprotocol ToReader (->reader [this])) (defprotocol IRenderable (render [this ctx out])) (defprotocol IStringifiable (stringify [this out])) (defprotocol IParti...
dc623cb13b34bedf37707684de0f4a6016b71f8546e34e63abf4108a66ecdc26
haskell/c2hs
Names.hs
C->Haskell Compiler : C name analysis -- Author : Created : 16 October 99 -- Copyright ( c ) 1999 -- -- This file 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...
null
https://raw.githubusercontent.com/haskell/c2hs/bb7079f4bf3ca4af00f6178d05a8da9238ddff7c/src/C2HS/C/Names.hs
haskell
This file is free software; you can redistribute it and/or modify (at your option) any later version. This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publ...
C->Haskell Compiler : C name analysis Author : Created : 16 October 99 Copyright ( c ) 1999 it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or language : 98 module C2HS.C.Names (nameAnalysis) where impo...
fb48ffd05021e3cddbb80507ba8d1b904d833e22da84133a8653224d75a068ac
LaurentMazare/ocaml-torch
imagenet.ml
open Base open Torch let imagenet_mean_and_std = function | `red -> 0.485, 0.229 | `green -> 0.456, 0.224 | `blue -> 0.406, 0.225 let mean_, std_ = [ imagenet_mean_and_std `red ; imagenet_mean_and_std `green ; imagenet_mean_and_std `blue ] |> List.unzip let clamp_ = let normalize kind x = let m...
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-torch/a82b906a22c7c23138af16fab497a08e5167d249/src/vision/imagenet.ml
ocaml
open Base open Torch let imagenet_mean_and_std = function | `red -> 0.485, 0.229 | `green -> 0.456, 0.224 | `blue -> 0.406, 0.225 let mean_, std_ = [ imagenet_mean_and_std `red ; imagenet_mean_and_std `green ; imagenet_mean_and_std `blue ] |> List.unzip let clamp_ = let normalize kind x = let m...
71c0143c94bced7f20186abe0a96e33fe4be2d43c79ee0b96e4a2c586cd7c6eb
eamsden/Animas
Diagnostics.hs
-- | Module : FRP.Animas . Diagnostics Copyright : ( c ) and , Yale University , 2003 -- License : BSD-style (see the LICENSE file in the distribution) -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- Standardized error-reporting for Animas module FRP.Anima...
null
https://raw.githubusercontent.com/eamsden/Animas/2404d1de20982a337109fc6032cb77b022514f9d/src/FRP/Animas/Diagnostics.hs
haskell
| License : BSD-style (see the LICENSE file in the distribution) Maintainer : Stability : provisional Portability : portable Standardized error-reporting for Animas | Error created by improper usage ^ Module name ^ Function name ^ Error message | Error internal to yampa (a bug) ^ Module name ...
Module : FRP.Animas . Diagnostics Copyright : ( c ) and , Yale University , 2003 module FRP.Animas.Diagnostics where -> a usrErr mn fn msg = error (mn ++ "." ++ fn ++ ": " ++ msg) -> a intErr mn fn msg = error ("[internal error] " ++ mn ++ "." ++ fn ++ ": " ...
5fe74587d2fd4d32389d1bd92696d419019067a936c5106c3da08832b658d604
Twinside/Eq
Preprocessor.hs
module Language.Eq.Preprocessor ( processFile , LangDef( .. ) , kindAssociation ) where import System.FilePath import Data.List import Control.Applicative import Text.Parsec.Error( ParseError ) import Language.Eq.Algorithm.Eval imp...
null
https://raw.githubusercontent.com/Twinside/Eq/60105372d55420735b722245db7021c239c812f4/Language/Eq/Preprocessor.hs
haskell
---------------------------------------------------- -- Choosing weapons for preprocessing ---------------------------------------------------- temp to avoid nasty warning ---------------------------------------------------- -- Processing file's lines ---------------------------------------------------- | Grab ...
module Language.Eq.Preprocessor ( processFile , LangDef( .. ) , kindAssociation ) where import System.FilePath import Data.List import Control.Applicative import Text.Parsec.Error( ParseError ) import Language.Eq.Algorithm.Eval imp...
5575f5b7f42031413e9606e10496d69087ba07b0d32f540ea0f538b1b97eac49
alanzplus/EOPL
let-interpreter.rkt
#lang eopl (require "../parser/let-spec.rkt") ; program ::= expression ; expression ::= number ; expression ::= -(expression, expression) expression : : = zero ? ( expression ) ; expression ::= if expression then expression else expression ; expression ::= identifier ; expression ::= let identifier = expression in ...
null
https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch3/let-interpreter.rkt
racket
program ::= expression expression ::= number expression ::= -(expression, expression) expression ::= if expression then expression else expression expression ::= identifier expression ::= let identifier = expression in expression
#lang eopl (require "../parser/let-spec.rkt") expression : : = zero ? ( expression ) TODO complete the specs (provide run) (provide num-val) (provide bool-val) (provide list-val) (provide proc-val) (provide procedure) (provide apply-procedure) (provide empty-list-val) (provide expval->num) (provide expval->bool)...
d628b8d16cb49d0212f4b32fe4b528321525b2f7aa81ad4993132652b21cc484
m4dc4p/haskelldb
ODBC.hs
----------------------------------------------------------- -- | -- Module : Database.HaskellDB.HSQL.ODBC Copyright : HWT Group 2003 , 2006 -- License : BSD-style -- Maintainer : -- Stability : experimental -- Portability : non-portable -- -------------------------------...
null
https://raw.githubusercontent.com/m4dc4p/haskelldb/a1fbc8a2eca8c70ebe382bf4c022275836d9d510/driver-hsql-odbc/Database/HaskellDB/HSQL/ODBC.hs
haskell
--------------------------------------------------------- | Module : Database.HaskellDB.HSQL.ODBC License : BSD-style Stability : experimental Portability : non-portable --------------------------------------------------------- ^ user id ^ password | DSN-less connection. | This driver require...
Copyright : HWT Group 2003 , 2006 Maintainer : module Database.HaskellDB.HSQL.ODBC ( ODBCOptions(..), odbcConnect, odbcDriverConnect, DriverInterface(..), ...
73b44b56ec9529c0002e8b6c17b571281a83f1b72ad49f5af900331f7faf0fe6
jeffshrager/biobike
load.lisp
;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: user; -*- (in-package :cl-user) (defparameter *test-mechanism-files* `( "package" "test-utils" "test-mechanism-code" )) ;; Make it so the test system can be loaded independently. (let ((actual-load-path nil)) (handler-case ;; this will erro...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Testing/load.lisp
lisp
-*- mode: Lisp; Syntax: Common-Lisp; Package: user; -*- Make it so the test system can be loaded independently. this will error if no logical host named 'websrc' is defined. Catch the error and try to load from the current directory.
(in-package :cl-user) (defparameter *test-mechanism-files* `( "package" "test-utils" "test-mechanism-code" )) (let ((actual-load-path nil)) (handler-case (setq actual-load-path (cl-user:translate-simple-lp "websrc:Testing;")) (error () (format t "~%;; Warning: No logical host...
0515c37b5672296f4a966ee42dd24fe6ed9b212886d0d2dcad19d1c7cb2b8ff8
montyly/gueb
uafgenerique.ml
type site_type = | SITE_NORMAL | SITE_ALLOC | SITE_FREE | SITE_USE | SITE_DF type site = Gueb_type.call_string let pp_site s = Gueb_type.pp_call_string s (* do not compare call_n *) let equal_site s1 s2 = let (((addr1,it1),_,_),t1) = s1 in let (((addr2,it2),_,_...
null
https://raw.githubusercontent.com/montyly/gueb/45f496a5a1e8e908e562928762ece304c2408c3a/src/uafgenerique.ml
ocaml
do not compare call_n On a list of site, add type, t for the last, SITE_NORMAL for others
type site_type = | SITE_NORMAL | SITE_ALLOC | SITE_FREE | SITE_USE | SITE_DF type site = Gueb_type.call_string let pp_site s = Gueb_type.pp_call_string s let equal_site s1 s2 = let (((addr1,it1),_,_),t1) = s1 in let (((addr2,it2),_,_),t2) = s2 in (&&) (...
f479fc9e37535f1a5fbeaecb261bd926ced28e8d034c504da4af2043e01dd154
olivermg/owlisp
restructure.lisp
(in-package #:owlisp/c) (export '(do-restructure)) (defmacro with-index-counters (&body body) (with-gensyms (varname-index-var procedurename-index-var) `(let ((,varname-index-var 0) (,procedurename-index-var 0)) (labels ((next-varname () (intern (format nil "VAR~d" (incf ,varname-index-v...
null
https://raw.githubusercontent.com/olivermg/owlisp/dbf6d1d9e813f16124c170a0e1bfe155752e017b/src/ctarget/restructure.lisp
lisp
FIXME: don't evaluate then/else depending on cond TODO: check location type | combine function-reference & reference types to both work TODO: implement macro that simplifies syntax for creating sequences
(in-package #:owlisp/c) (export '(do-restructure)) (defmacro with-index-counters (&body body) (with-gensyms (varname-index-var procedurename-index-var) `(let ((,varname-index-var 0) (,procedurename-index-var 0)) (labels ((next-varname () (intern (format nil "VAR~d" (incf ,varname-index-v...
928ac00f8c58b954d27aa282f0b3aa710664d6314a9b938a0432d70a4cc4dcd9
aistrate/Okasaki
Heap.hs
# LANGUAGE MultiParamTypeClasses # module Heap where class Ord a => Heap h a where empty :: h a isEmpty :: h a -> Bool insert :: a -> h a -> h a merge :: h a -> h a -> h a findMin :: h a -> a deleteMin :: h a -> h a fromList :: (Ord a, Heap h a) => [a] -> h a fromList = foldl (fl...
null
https://raw.githubusercontent.com/aistrate/Okasaki/cc1473c81d053483bb5e327409346da7fda10fb4/MyCode/Ch05/Heap.hs
haskell
# LANGUAGE MultiParamTypeClasses # module Heap where class Ord a => Heap h a where empty :: h a isEmpty :: h a -> Bool insert :: a -> h a -> h a merge :: h a -> h a -> h a findMin :: h a -> a deleteMin :: h a -> h a fromList :: (Ord a, Heap h a) => [a] -> h a fromList = foldl (fl...
5edbf0c95a07a3933f83ea32cc6e138cd6ee7f8c273e6912519167844b993f52
artyom-poptsov/guile-ics
cal-address.scm
cal-address.scm -- iCalendar CAL - ADDRESS ( RFC5545 , 3.3.3 ) type . Copyright ( C ) 2017 - 2022 Artyom V. Poptsov < > ;; ;; 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 ...
null
https://raw.githubusercontent.com/artyom-poptsov/guile-ics/0a313ed199eea4f28655cce8370add2acbec1e82/modules/ics/type/cal-address.scm
scheme
This program is free software: you can redistribute it and/or modify (at your option) any later version. The program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public ...
cal-address.scm -- iCalendar CAL - ADDRESS ( RFC5545 , 3.3.3 ) type . Copyright ( C ) 2017 - 2022 Artyom V. Poptsov < > 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 ...
dc3d0de684d7cb30275aebb44a3c259aa84caa7386f34d0685ca8770d76605d8
jarohen/advent-of-code
day12.clj
(ns aoc2018.day12 (:require [aoc2018.util :as util] [sss.arrows :refer [->% ->>%]] [clojure.java.io :as io] [clojure.string :as str] [clojure.test :as t])) (defn plant? [c] (= c \#)) (defn parse-rules [rule-lines] (->> rule-lines (into {} (map (fn [line] ...
null
https://raw.githubusercontent.com/jarohen/advent-of-code/3fa1d87a539fb9163b05b732973bbd415dd21312/2018/src/aoc2018/day12.clj
clojure
(ns aoc2018.day12 (:require [aoc2018.util :as util] [sss.arrows :refer [->% ->>%]] [clojure.java.io :as io] [clojure.string :as str] [clojure.test :as t])) (defn plant? [c] (= c \#)) (defn parse-rules [rule-lines] (->> rule-lines (into {} (map (fn [line] ...
a36a0b8029a2d37e7f0c56c5933e82bcb8e7eafb77dd3e8fa0a109615ce1d712
avsm/eeww
backoff.ml
* Copyright ( c ) 2015 , < > * Copyright ( c ) 2015 , < > * Copyright ( c ) 2021 , < > * * Permission to use , copy , modify , and/or distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice app...
null
https://raw.githubusercontent.com/avsm/eeww/a316137bc7550870c9fd0c6a907d87e9d9810ae4/lib/kcas/src/backoff.ml
ocaml
* Copyright ( c ) 2015 , < > * Copyright ( c ) 2015 , < > * Copyright ( c ) 2021 , < > * * Permission to use , copy , modify , and/or distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice app...
5d1edca78531c353be75e5b4406525f7ab583105b78f8321aedbcbe26e6ced7f
jfacorro/clojure-lab
nrepl.clj
(ns lab.plugin.clojure.nrepl "Clojure nREPL connection. Most of the ideas for this plugin were taken from the [Cider](-emacs/cider) and [REPLy]()" (:require [popen :refer [popen kill stdin stdout]] [clojure.java.io :as io] [clojure.zip :as zip] [clojure.string :refer [split]...
null
https://raw.githubusercontent.com/jfacorro/clojure-lab/f0b5a4b78172984fc876f063f66e5e1592178da9/src/clj/lab/plugin/clojure/nrepl.clj
clojure
Eval code View Commands Autocomplete Autocomplete Hooks Plugin definition
(ns lab.plugin.clojure.nrepl "Clojure nREPL connection. Most of the ideas for this plugin were taken from the [Cider](-emacs/cider) and [REPLy]()" (:require [popen :refer [popen kill stdin stdout]] [clojure.java.io :as io] [clojure.zip :as zip] [clojure.string :refer [split]...
059b686e036f3fa9e57eef7f10fbd58cd2b54b7bd70a8615cfed5da7c96c6280
spechub/Hets
Prover.hs
{-# LANGUAGE DeriveDataTypeable #-} | Module : ./Logic / Prover.hs Description : General datastructures for theorem prover interfaces Copyright : ( c ) , , Uni Bremen 2002 - 2005 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portabil...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Logic/Prover.hs
haskell
# LANGUAGE DeriveDataTypeable # * pack sentences with their proofs | the map from labels to the theorem plus status (and position) | putting Sentences from a list into a map | theories with a signature and sentences with proof states e.g. the file name, or the script itself, or a configuration string | failure re...
| Module : ./Logic / Prover.hs Description : General datastructures for theorem prover interfaces Copyright : ( c ) , , Uni Bremen 2002 - 2005 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : non - portable ( deriving )...
ffbe54fca24ce13753d90a8f57b1cebdc9ca2adf8506c1b84b9b54dc8fbb4465
fluree/db
core.cljc
(ns fluree.db.dbfunctions.core (:require [sci.core :as sci] [fluree.db.dbfunctions.fns] [fluree.db.dbproto :as dbproto] [fluree.db.util.core #?(:clj :refer :cljs :refer-macros) [condps]] [fluree.db.util.async :refer [go-try <? channel?]] [fluree.db.util.log ...
null
https://raw.githubusercontent.com/fluree/db/27999d15dcd90053119b06c6eb19c24fff137a56/src/fluree/db/dbfunctions/core.cljc
clojure
Unfortunately the ns below has to be a quoted symbol. If you can figure out how to make it anything else (e.g. a let var or an arg to this fn), please with it for quite some time. This is due to the assert in the CLJS version of `ns-publics`. I tried making it work with a macro instead but couldn't figure it out. ...
(ns fluree.db.dbfunctions.core (:require [sci.core :as sci] [fluree.db.dbfunctions.fns] [fluree.db.dbproto :as dbproto] [fluree.db.util.core #?(:clj :refer :cljs :refer-macros) [condps]] [fluree.db.util.async :refer [go-try <? channel?]] [fluree.db.util.log ...
d2fbbc90204d6b0f1dee988c04eabbda0bbe025fd4ef5d055429770b6efa9a83
atzedijkstra/chr
AST.hs
# LANGUAGE TypeFamilies , MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances , UndecidableInstances # {-| Simple term language with some builtin guards and predicates -} module CHR.Language.WithTerm.AST ( Key'(..) , C'(..) , G'(..) , P'(..) , E' , S' , Var , TmEval(..) , ...
null
https://raw.githubusercontent.com/atzedijkstra/chr/ad465828b1560831e90c4056e12338231872e8db/chr-lang/src/CHR/Language/WithTerm/AST.hs
haskell
| Simple term language with some builtin guards and predicates import UHC.Util.Debug | Constraint ^ builtin: unification ^ builtin: non unification ^ explicit fail | Guard ^ check for equality ^ check for inequality ^ determined by arithmetic evaluation Only necessary for non-builtin constraints ...
# LANGUAGE TypeFamilies , MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances , UndecidableInstances # module CHR.Language.WithTerm.AST ( Key'(..) , C'(..) , G'(..) , P'(..) , E' , S' , Var , TmEval(..) , TmOp ) where import CHR.Data.VarLookup import qualified...