_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
bf02642931ae171899e36a37459c8e82a7bdeb2cd355a912342b4ba5cc94c5ab
master/ejabberd
idna.erl
%%%---------------------------------------------------------------------- %%% File : idna.erl Author : < > %%% Purpose : Support for IDNA (RFC3490) Created : 10 Apr 2004 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne %%% %%% This program is free software; you can redistribute it an...
null
https://raw.githubusercontent.com/master/ejabberd/9c31874d5a9d1852ece1b8ae70dd4b7e5eef7cf7/src/idna.erl
erlang
---------------------------------------------------------------------- File : idna.erl Purpose : Support for IDNA (RFC3490) This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHO...
Author : < > Created : 10 Apr 2004 by < > ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License Founda...
a4a02ce3fabe9fc86337b6cefe967cb0cf240def8f0f3d0a797ece47e39afb0b
bluelisp/hemlock
lispeval.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; ;;; ;;; ******************************************...
null
https://raw.githubusercontent.com/bluelisp/hemlock/47e16ba731a0cf4ffd7fb2110e17c764ae757170/src/lispeval.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- ********************************************************************** ********************************************************************** This file contains code for sending requests to eval servers and the commands based on that code. The note structure holds e...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . Written by and . (in-package :hemlock) (defstruct (note (:print-function %print-note)) Server - Info for the server this op is on . (defun %print-note (note stream d) ...
98d2aef9bf2f4a1eebc0a69a84f8d3d68c46faaf5c7b03cca3b0b1e842f9d070
gvolpe/haskell-book-exercises
sing.hs
module Sing where fstString :: [Char] -> [Char] fstString x = x ++ " in the rain" sndString :: [Char] -> [Char] sndString x = x ++ " over the rainbow" sing = if (x > y) then fstString x else sndString y where x = "Singin" y = "Somewhere"
null
https://raw.githubusercontent.com/gvolpe/haskell-book-exercises/5c1b9d8dc729ee5a90c8709b9c889cbacb30a2cb/chapter5/sing.hs
haskell
module Sing where fstString :: [Char] -> [Char] fstString x = x ++ " in the rain" sndString :: [Char] -> [Char] sndString x = x ++ " over the rainbow" sing = if (x > y) then fstString x else sndString y where x = "Singin" y = "Somewhere"
29811463c90837e327dec3a2b66b9f9e95221f34ae5e34ca2fea0e8e1ed4c814
bcc32/advent-of-code
a.ml
open! Core open! Async open! Import let main () = let%bind events = Reader.with_file "input" ~f:(fun r -> r |> Reader.lines |> Pipe.to_list) (* times can be compared lexicographically *) >>| List.sort ~compare:String.compare >>| List.map ~f:Event.of_string in let sleeps = events |> Event.analyze ...
null
https://raw.githubusercontent.com/bcc32/advent-of-code/86a9387c3d6be2afe07d2657a0607749217b1b77/2018/04/a.ml
ocaml
times can be compared lexicographically
open! Core open! Async open! Import let main () = let%bind events = Reader.with_file "input" ~f:(fun r -> r |> Reader.lines |> Pipe.to_list) >>| List.sort ~compare:String.compare >>| List.map ~f:Event.of_string in let sleeps = events |> Event.analyze |> Int.Table.of_alist_multi in let sleepiest_gua...
3a5b93b1df1ee8ad12587a3b36b1df0e7ee48d98a6fcbadd3156c7c8e337d55d
poscat0x04/telegram-types
Document.hs
module Web.Telegram.Types.Internal.Document where import Common import Web.Telegram.Types.Internal.PhotoSize -- | A general file (as opposed to photos, voice messages and audio files) data Document = Document { -- | Identifier for this file, which can be used to download or reuse the file fileId :: Text, --...
null
https://raw.githubusercontent.com/poscat0x04/telegram-types/c09ccc81cff10399538894cf2d1273022c797e18/src/Web/Telegram/Types/Internal/Document.hs
haskell
| A general file (as opposed to photos, voice messages and audio files) | Identifier for this file, which can be used to download or reuse the file | Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. | Document thumbna...
module Web.Telegram.Types.Internal.Document where import Common import Web.Telegram.Types.Internal.PhotoSize data Document = Document fileId :: Text, fileUniqueId :: Text, thumb :: Maybe PhotoSize, fileName :: Maybe Text, mimeType :: Maybe Text, fileSize :: Maybe Int } deriving stock (Show...
ff4378a30853275b506fb24a0faa212848819ed09550df4b83e9fa5f847ee3e3
typedclojure/typedclojure
gen_doc.clj
(ns gen-doc (:require [codox.main :as codox])) (defn -main [& args] (codox/generate-docs {:language :clojure :source-uri "/{git-commit}/typed/clj.refactor/{filepath}#L{line}" :output-path "target/codox"}) (shutdown-agents) (System/exit 0))
null
https://raw.githubusercontent.com/typedclojure/typedclojure/45556897356f3c9cbc7b1b6b4df263086a9d5803/typed/clj.refactor/script/gen_doc.clj
clojure
(ns gen-doc (:require [codox.main :as codox])) (defn -main [& args] (codox/generate-docs {:language :clojure :source-uri "/{git-commit}/typed/clj.refactor/{filepath}#L{line}" :output-path "target/codox"}) (shutdown-agents) (System/exit 0))
39b6837e8eb67afccc759c7eb9246eba2d6c6e28a63cf544d84bcb1077da1b26
jfacorro/clojure-lab
toolbar.clj
(ns lab.ui.swing.toolbar (:require [lab.ui.core :as ui] [lab.ui.protocols :refer [impl to-map listen ignore]] [lab.ui.util :refer [defattributes definitializations]] [lab.ui.swing.util :as util]) (:import [javax.swing JToolBar])) (definitializations :toolbar JToolBar) (defat...
null
https://raw.githubusercontent.com/jfacorro/clojure-lab/f0b5a4b78172984fc876f063f66e5e1592178da9/src/clj/lab/ui/swing/toolbar.clj
clojure
(ns lab.ui.swing.toolbar (:require [lab.ui.core :as ui] [lab.ui.protocols :refer [impl to-map listen ignore]] [lab.ui.util :refer [defattributes definitializations]] [lab.ui.swing.util :as util]) (:import [javax.swing JToolBar])) (definitializations :toolbar JToolBar) (defat...
ca3b3579fc0bb1998bc8aa11590ad72a637d0b003a9770e7e76627b65b325ddd
ghc/packages-dph
HybU.hs
module HybU ( hybrid_connected_components ) where import Data.Array.Parallel.Unlifted enumerate :: UArr Bool -> UArr Int # INLINE enumerate # enumerate = scanU (+) 0 . mapU (\b -> if b then 1 else 0) pack_index :: UArr Bool -> UArr Int # INLINE pack_index # pack_index bs = mapU fstS . filterU sndS $ zipU (enumFromTo...
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/icebox/examples/concomp/HybU.hs
haskell
module HybU ( hybrid_connected_components ) where import Data.Array.Parallel.Unlifted enumerate :: UArr Bool -> UArr Int # INLINE enumerate # enumerate = scanU (+) 0 . mapU (\b -> if b then 1 else 0) pack_index :: UArr Bool -> UArr Int # INLINE pack_index # pack_index bs = mapU fstS . filterU sndS $ zipU (enumFromTo...
1a8bb3ef14a82f87bff0dc1df7f1ed25a4a3c2904bf5f59f5d5dee93d642e81d
xu-hao/QueryArrow
HSLogger.hs
module QueryArrow.Control.Monad.Logger.HSLogger where import Control.Monad.Logger import System.Log.FastLogger import System.Log.Logger import qualified Data.Text as T import Data.Text.Encoding instance MonadLogger IO where monadLoggerLog loc logsource loglevel msg = do let priority = case loglevel of ...
null
https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/log-adapter/src/QueryArrow/Control/Monad/Logger/HSLogger.hs
haskell
module QueryArrow.Control.Monad.Logger.HSLogger where import Control.Monad.Logger import System.Log.FastLogger import System.Log.Logger import qualified Data.Text as T import Data.Text.Encoding instance MonadLogger IO where monadLoggerLog loc logsource loglevel msg = do let priority = case loglevel of ...
8042d9303ca8a221af28848788869a709ffc6d8cf76042527e10d98acaef481d
bigmlcom/clj-bigml
utils.clj
Copyright 2016 , 2017 BigML Licensed under the Apache License , Version 2.0 ;; -2.0 (ns bigml.test.api.utils "Contains a few facilities especially meant tor testing" (:require (bigml.api [core :as api] [source :as source] [dataset :as dataset] ...
null
https://raw.githubusercontent.com/bigmlcom/clj-bigml/61579ad473d7e191ed06fb6338847dcb0a664497/test/bigml/test/api/utils.clj
clojure
-2.0 it can also be a file path/url additionally, it deletes
Copyright 2016 , 2017 BigML Licensed under the Apache License , Version 2.0 (ns bigml.test.api.utils "Contains a few facilities especially meant tor testing" (:require (bigml.api [core :as api] [source :as source] [dataset :as dataset] [model...
91ba84b376111757ce3ffd30377199234394dc1db5d7c0eee8b98425babd6e08
rauhs/clj-bench
misc.clj
(ns clj-bench.misc (:require [criterium.core :as crit]))
null
https://raw.githubusercontent.com/rauhs/clj-bench/6c7148e84fc3ad9cd70db6991fdd8fdb4fc7fdbd/src/clj_bench/misc.clj
clojure
(ns clj-bench.misc (:require [criterium.core :as crit]))
3028a9c48cb16ef1dc4a3d3db25c253b58c35d1107bab1415bf23d10269199ca
threatgrid/ctia
riemann.clj
(ns ctia.lib.riemann (:require [clojure.string :as str] [clojure.tools.logging :as log] [riemann.client :as riemann] [ctia.lib.utils :as utils]) (:import [clojure.lang ExceptionInfo] [io.riemann.riemann.client RiemannBatchClient])) ;; based on riemann-reporter.core/re...
null
https://raw.githubusercontent.com/threatgrid/ctia/9b9f333aeb91dd9faf2541f9d736b8539162d6e9/src/ctia/lib/riemann.clj
clojure
based on riemann-reporter.core/request-to-event based on riemann-reporter.core/send-request-metrics :trace-id (search-event [:trace :id] event) ?? should align with riemann-reporter.core/extract-infos-from-event copied from riemann-reporter.core copied from riemann-reporter.core copied from riemann-reporter.core...
(ns ctia.lib.riemann (:require [clojure.string :as str] [clojure.tools.logging :as log] [riemann.client :as riemann] [ctia.lib.utils :as utils]) (:import [clojure.lang ExceptionInfo] [io.riemann.riemann.client RiemannBatchClient])) (defn request->event [request extr...
75e9004642ea133fa46f2e2c97cfaff32153776cc99bc1cb5fd7d85c0cb31658
ashinn/chibi-scheme
totient.scm
(define-library (euler totient) (export totient) (import (scheme base) (scheme inexact)) (include "totient-impl.scm"))
null
https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/tests/snow/repo3/totient.scm
scheme
(define-library (euler totient) (export totient) (import (scheme base) (scheme inexact)) (include "totient-impl.scm"))
8d3df8b4030eb60a8b2047e756a82423d60668bf425cfebc4dee5806a8865f24
rodo/tsung-gis
postgis_tests.erl
-*- coding : utf-8 -*- %% Copyright ( c ) 2014 < > %% %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or %% (at your option) any later ...
null
https://raw.githubusercontent.com/rodo/tsung-gis/d6fc43e5c21d7d12f703cf0766dcd0900ab1d6bc/test/postgis_tests.erl
erlang
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See th...
-*- coding : utf-8 -*- Copyright ( c ) 2014 < > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License Unit tests for module : -module(postgis_t...
c877abbdf755ad1b9820a405c519757c08420f390a1c8ae1781f43307883d37c
gothinkster/clojurescript-keechma-realworld-example-app
validators.cljs
(ns app.validators (:require [clojure.string :as str] [forms.validator :as v])) (def countries ["United States" "United Kingdom" "Afghanistan" "Albania" "Algeria" "American Samoa" "Andorra" "Angola" "Anguilla" "Antarctica" "Antigua and Barbuda" "Argentina" "Armenia" "Aruba" "Australia" "Austria" ...
null
https://raw.githubusercontent.com/gothinkster/clojurescript-keechma-realworld-example-app/f6d32f8eea5439b0b33df1afb89da6d27b7da66b/src/app/validators.cljs
clojure
(ns app.validators (:require [clojure.string :as str] [forms.validator :as v])) (def countries ["United States" "United Kingdom" "Afghanistan" "Albania" "Algeria" "American Samoa" "Andorra" "Angola" "Anguilla" "Antarctica" "Antigua and Barbuda" "Argentina" "Armenia" "Aruba" "Australia" "Austria" ...
8cc2012bfe8b6f27765ff4a8eb640a4d12e6005f0dfade51fe5636c1e2831e98
hududed/cardano-cli-scripts
HelloWorldPerson.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE MultiParamTypeClasses # module Cardano.Plutu...
null
https://raw.githubusercontent.com/hududed/cardano-cli-scripts/6844548eb0f5f05d4756c3bd1bd6523de010147f/plutus-sources/plutus-helloworld/src/Cardano/PlutusExample/HelloWorldPerson.hs
haskell
# LANGUAGE OverloadedStrings # As a Validator As a Script As a Short Byte String As a Serialised Script
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE MultiParamTypeClasses # module Cardano.PlutusExample.HelloWorldPerson ( perso...
79a1f887e0c3bfda6d49f61ffd44eb88589ded8ef9be8cc3df92b50da9f58532
binsec/haunted
sploit1.mli
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2019 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/dynamic/examples/sploit1.mli
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
86f4bb92c417aaf8a0ac0f4f302aa820993eacf3c0b754753bf1980795d49aae
lojic/RacketChess
board-slow.rkt
#lang racket ;; Functions that are not speed sensitive (require "./board.rkt" "./global.rkt" "./piece.rkt") (provide get-pieces-file-rank) ;; Return a list of all pieces on the board in the following form: ;; ( (piece file rank) ;; (piece file rank) ;; ... ) ;; Where file & rank are characte...
null
https://raw.githubusercontent.com/lojic/RacketChess/115ca7fecca9eaf31f9b2f4ef59935372c9920c8/src/board-slow.rkt
racket
Functions that are not speed sensitive Return a list of all pieces on the board in the following form: ( (piece file rank) (piece file rank) ... )
#lang racket (require "./board.rkt" "./global.rkt" "./piece.rkt") (provide get-pieces-file-rank) Where file & rank are characters e.g. # \c & # \4 (define (get-pieces-file-rank b [ pred? is-piece? ]) (define squares (board-squares b)) (for*/fold ([ result '() ]) ([ rank (in-ran...
8cda902873c15680f4bcd64e9fb9b9836a133861ab518a6bb15764ef5e76b50e
MastodonC/kixi.datastore
file.clj
(ns kixi.datastore.file (:import [java.io File OutputStream])) (defn temp-file ^File [name] (doto (File/createTempFile name ".tmp") .deleteOnExit)) (defn close [^OutputStream os] (.close os))
null
https://raw.githubusercontent.com/MastodonC/kixi.datastore/f33bba4b1fdd8c56cc7ac0f559ffe35254c9ca99/src/kixi/datastore/file.clj
clojure
(ns kixi.datastore.file (:import [java.io File OutputStream])) (defn temp-file ^File [name] (doto (File/createTempFile name ".tmp") .deleteOnExit)) (defn close [^OutputStream os] (.close os))
30b4c22b6c36b0109e934be34408048c062df91f83b4e641c9cafb0887e1829b
phoe-trash/gateway
standard-persona.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; GATEWAY " phoe " Herda 2016 ;;;; standard-persona.lisp (in-package #:gateway) (defclass standard-persona (persona) ((%name :accessor name :initarg :name :initform "Must provide name.") (%player :accesso...
null
https://raw.githubusercontent.com/phoe-trash/gateway/a8d579ccbafcaee8678caf59d365ec2eab0b1a7e/_old/classes/standard-persona.lisp
lisp
GATEWAY standard-persona.lisp
" phoe " Herda 2016 (in-package #:gateway) (defclass standard-persona (persona) ((%name :accessor name :initarg :name :initform "Must provide name.") (%player :accessor player :initarg :player :initform nil) (%owner :accessor owner :initarg :owner ...
85e3bc3612109939ad61bd2997822f46878023714d0112f5cadad7851fe557b5
yeller/logfmt
logfmt.clj
(ns logfmt (:require [clojure.string :as s])) (defn ^String msg "takes a series of k/v pairs and turns them into a formatted string. retains order of the pairs" [& pairs] (s/join " " (map (fn [[k v]] (str (name k) "=" v)) (partition 2 pairs)))) (defn ^String map->msg "takes a map, and turns it...
null
https://raw.githubusercontent.com/yeller/logfmt/381af9fe7717b64a79f3eba617ccceeb59b77323/src/logfmt.clj
clojure
(ns logfmt (:require [clojure.string :as s])) (defn ^String msg "takes a series of k/v pairs and turns them into a formatted string. retains order of the pairs" [& pairs] (s/join " " (map (fn [[k v]] (str (name k) "=" v)) (partition 2 pairs)))) (defn ^String map->msg "takes a map, and turns it...
ae694c5b1e776015cf53a205851553b289e8ac94bfa0d9162d577cf495f99b40
circuithub/rel8
Eq.hs
{-# language FlexibleContexts #-} # language FlexibleInstances # # language MonoLocalBinds # # language MultiParamTypeClasses # # language StandaloneKindSignatures # {-# language UndecidableInstances #-} module Rel8.Type.Eq ( DBEq ) where -- aeson import Data.Aeson ( Value ) -- base import Data.List.NonEmpty ( N...
null
https://raw.githubusercontent.com/circuithub/rel8/93638f8bdf98023fb5ac2d9b38867af51561a063/src/Rel8/Type/Eq.hs
haskell
# language FlexibleContexts # # language UndecidableInstances # aeson base bytestring case-insensitive rel8 scientific text time uuid | Database types that can be compared for equality in queries. If a type is using the SQL @=@ operator.
# language FlexibleInstances # # language MonoLocalBinds # # language MultiParamTypeClasses # # language StandaloneKindSignatures # module Rel8.Type.Eq ( DBEq ) where import Data.Aeson ( Value ) import Data.List.NonEmpty ( NonEmpty ) import Data.Int ( Int16, Int32, Int64 ) import Data.Kind ( Constraint, Type ) i...
f94edcbe7b38df1dfbca1762921f38a2c001554301f210180a6e6e79457d8888
fogus/thneed
maps.clj
(ns fogus.maps (:require fogus.meta)) (defn keys-apply [m ks f] "Takes a function, a set of keys, and a map and applies the function to the map on the given keys. A new map of the results of the function applied to the keyed entries is returned." (let [only (select-keys m ks)] (zipmap (keys only) (...
null
https://raw.githubusercontent.com/fogus/thneed/0d791418b7b20a1249c52c925eac0f1254756eff/src/fogus/maps.clj
clojure
(ns fogus.maps (:require fogus.meta)) (defn keys-apply [m ks f] "Takes a function, a set of keys, and a map and applies the function to the map on the given keys. A new map of the results of the function applied to the keyed entries is returned." (let [only (select-keys m ks)] (zipmap (keys only) (...
13c3ccc818c131000626689c0b7dc1bf60e1a928711558effc7af7401e1475ac
jasonstolaruk/CurryMUD
Database.hs
# LANGUAGE DeriveGeneric , DuplicateRecordFields , OverloadedStrings , RecordWildCards , TypeApplications , ViewPatterns # module Mud.Misc.Database ( AdminChanRec(..) , AdminMsgRec(..) , AlertExecRec(..) , AlertMsgRec(..) ...
null
https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/Misc/Database.hs
haskell
--- --- --- --- --- --- --- --- --- When was the last sacrifice bonus given? How many sacrifices have been made? ---
# LANGUAGE DeriveGeneric , DuplicateRecordFields , OverloadedStrings , RecordWildCards , TypeApplications , ViewPatterns # module Mud.Misc.Database ( AdminChanRec(..) , AdminMsgRec(..) , AlertExecRec(..) , AlertMsgRec(..) ...
df64f11503b77e7d04a725c9905fbe7535249d366dc3be55c094fbfbd59cc672
lispnik/iup
pixel.lisp
(eval-when (:compile-toplevel :load-toplevel :execute) (ql:quickload '("iup" "iup-cd" "cd"))) (defpackage #:iup-examples.pixel (:use #:common-lisp) (:export #:pixel)) (in-package #:iup-examples.pixel) (defparameter *canvas* nil) (defun canvas-redraw (handle x y) (declare (ignore handle x y)) (cd:activate ...
null
https://raw.githubusercontent.com/lispnik/iup/f8e5f090bae47bf8f91ac6fed41ec3bc01061186/examples/pixel.lisp
lisp
(eval-when (:compile-toplevel :load-toplevel :execute) (ql:quickload '("iup" "iup-cd" "cd"))) (defpackage #:iup-examples.pixel (:use #:common-lisp) (:export #:pixel)) (in-package #:iup-examples.pixel) (defparameter *canvas* nil) (defun canvas-redraw (handle x y) (declare (ignore handle x y)) (cd:activate ...
45d327a12e066a0d4301acc993082aa1e07b3ba5c29518d2fb633de5be3dde84
enaeher/local-time-duration
cl-postgres.lisp
(in-package :local-time-duration) (export 'set-local-time-duration-cl-postgres-reader :local-time-duration) (defun set-local-time-duration-cl-postgres-reader (&optional (table cl-postgres:*sql-readtable*)) (cl-postgres::set-interval-reader (lambda (months days usec) (assert (= ...
null
https://raw.githubusercontent.com/enaeher/local-time-duration/fa20a4a03a1ee076eada649796e2f2345c930c21/cl-postgres.lisp
lisp
(in-package :local-time-duration) (export 'set-local-time-duration-cl-postgres-reader :local-time-duration) (defun set-local-time-duration-cl-postgres-reader (&optional (table cl-postgres:*sql-readtable*)) (cl-postgres::set-interval-reader (lambda (months days usec) (assert (= ...
997ce4a0e31099cec41b18d51196d89a2bbe563afdc5a27163bc2f97ce9f5ea9
meooow25/haccepted
BinSearchBench.hs
module BinSearchBench where import Data.Array import Data.List import Criterion import BinSearch ( binSearch, binSearchA ) import Util ( evalR, randIntsR, sizedBench ) benchmark :: Benchmark benchmark = bgroup "BinSearch" [ -- n searches on a range of size n bgroup "binSearch" $ map benchBinSearch sizes ...
null
https://raw.githubusercontent.com/meooow25/haccepted/2bc153ca95038de3b8bac83eee4419b3ecc116c5/bench/BinSearchBench.hs
haskell
n searches on a range of size n n searches on an array of size n
module BinSearchBench where import Data.Array import Data.List import Criterion import BinSearch ( binSearch, binSearchA ) import Util ( evalR, randIntsR, sizedBench ) benchmark :: Benchmark benchmark = bgroup "BinSearch" bgroup "binSearch" $ map benchBinSearch sizes , bgroup "binSearchA" $ map benchBinS...
99ced789bbeed380b37c69751b29f8ead5a1e16d90227affdd56cbb0621c40bd
uhc/uhc
CoreSaturate.hs
----------------------------------------------------------------------- The Core Assembler . Copyright 2001 , . All rights reserved . This file is distributed under the terms of the GHC license . For more information , see the file " license.txt " , which is included in the distribution . ...
null
https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/lvm/Core/CoreSaturate.hs
haskell
--------------------------------------------------------------------- --------------------------------------------------------------------- ----------------------------------------------------------------------} -------------------------------------------------------------- saturate all calls to externals, instruc...
The Core Assembler . Copyright 2001 , . All rights reserved . This file is distributed under the terms of the GHC license . For more information , see the file " license.txt " , which is included in the distribution . The Core Assembler. Copyright 2001, Daan Leijen. All rights reserv...
4fa2f080dcd40e3fdaeb78808dd5a4cf1ed2ff64ae1ad86d6fa13ae3a7d06666
symbiont-io/detsys-testkit
LogicalTime.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE DeriveGeneric # This module implements logical time via Lamport clocks , we do n't need vector -- clocks because we can't have events happening concurrently anyway. module StuntDouble.LogicalTime where import GHC.Generics (Generic) import Data.Aeson (FromJSON, ToJ...
null
https://raw.githubusercontent.com/symbiont-io/detsys-testkit/29a3a0140730420e4c5cc8db23df6fdb03f9302c/src/runtime-prototype/src/StuntDouble/LogicalTime.hs
haskell
clocks because we can't have events happening concurrently anyway. ---------------------------------------------------------------------- Upon sending or logging local events we should increment the counter before creating the timestamp. Upon receving a timestamped message we should update our clock.
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE DeriveGeneric # This module implements logical time via Lamport clocks , we do n't need vector module StuntDouble.LogicalTime where import GHC.Generics (Generic) import Data.Aeson (FromJSON, ToJSON) import Data.IORef import Data.String (IsString) newtype NodeNam...
ccf93a6e21cc43d00250c97a89e19f02a59f0adad949aaba07e978dde51f3c8b
kit-ty-kate/mastodon-archive-viewer
gif_detect.mli
type filename = string val is_gif : filename -> bool
null
https://raw.githubusercontent.com/kit-ty-kate/mastodon-archive-viewer/09aa343054c6894dc2cc18ea09f04b5ebf6bab01/src/gif_detect.mli
ocaml
type filename = string val is_gif : filename -> bool
1f976bc8ac6c6bef161c8e2eb44b989786895cdc6caf2e05a704e47bc5e4b278
ha-mo-we/Racer
concrete-domains.lisp
-*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : RACER ; Base : 10 -*- Copyright ( c ) 1998 - 2014 , , , . ;;; All rights reserved. Racer is distributed under the following BSD 3 - clause license ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are p...
null
https://raw.githubusercontent.com/ha-mo-we/Racer/d690841d10015c7a75b1ded393fcf0a33092c4de/source/concrete-domains.lisp
lisp
Syntax : Ansi - Common - Lisp ; Package : RACER ; Base : 10 -*- All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of c...
Copyright ( c ) 1998 - 2014 , , , . Racer is distributed under the following BSD 3 - clause license Neither the name Racer nor the names of its contributors may be used CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , VOLKER HAARSLEV , RALF MOELLER , NOR FOR ANY ...
66e167f6f328258651743e00f1c4c522f1061c30effdbac101ed7335f051222d
hraberg/deuce
textprop.clj
(ns deuce.emacs.textprop (:use [deuce.emacs-lisp :only (defun defvar)]) (:require [clojure.core :as c]) (:refer-clojure :exclude [])) (defvar default-text-properties nil "Property-list used as default values. The value of a property in this list is seen as the value for every character that does not have i...
null
https://raw.githubusercontent.com/hraberg/deuce/9d507adb6c68c0f5c19ad79fa6ded9593c082575/src/deuce/emacs/textprop.clj
clojure
return LIMIT if nothing is found before LIMIT. return LIMIT if nothing is found before LIMIT." return LIMIT if nothing is found before reaching LIMIT." return LIMIT if nothing is found before LIMIT. return LIMIT if nothing is found before LIMIT." return LIMIT if nothing is found before LIMIT." return LIMIT if no...
(ns deuce.emacs.textprop (:use [deuce.emacs-lisp :only (defun defvar)]) (:require [clojure.core :as c]) (:refer-clojure :exclude [])) (defvar default-text-properties nil "Property-list used as default values. The value of a property in this list is seen as the value for every character that does not have i...
99600a294fda279425023d90c8b04bcdef4b9bd7ca56d020789309899f1dfbf0
cheshire/onumerical
number_intf.mli
(** Number type: anything comparable which supports basic arithmetic *) type t with sexp, compare (* OK what does compare generate? *) (** Constructors *) val zero : t val one : t val of_int : int -> t val infinity : t (** Arithmetics *) val (+/) : t -> t -> t val (-/) : t -> t -> t val ( */) : t -> t -> t val ( //) ...
null
https://raw.githubusercontent.com/cheshire/onumerical/2ebe77edb61c761f1e1397dc37369f2cdc8021f7/src/number_intf.mli
ocaml
* Number type: anything comparable which supports basic arithmetic OK what does compare generate? * Constructors * Arithmetics * Negation * Comparison * Pretty-printing
val zero : t val one : t val of_int : int -> t val infinity : t val (+/) : t -> t -> t val (-/) : t -> t -> t val ( */) : t -> t -> t val ( //) : t -> t -> t val abs : t -> t val (~/) : t -> t val compare : t -> t -> int val (<=/) : t -> t -> bool val (>=/) : t -> t -> bool val (=/) : t -> t -> bool val (</) : t -...
3b9690f9b714309d7dd3a0828bbfd10f68313a6f83209f00d41783947efb743a
borodust/bodge-nanovg
regen-spec.lisp
(bind-arguments build-directory system-name target &key (arch "x86_64") mode) (when (and (not (uiop:emptyp mode)) (string= (string-downcase mode) "gl2")) (pushnew :bodge-gl2 *features*)) (script "regen-local-spec-and-zip" "--arch" arch build-directory system-name target)
null
https://raw.githubusercontent.com/borodust/bodge-nanovg/fa9729747e1dcfb07fa49a4233d7da6bc879ee11/util/regen-spec.lisp
lisp
(bind-arguments build-directory system-name target &key (arch "x86_64") mode) (when (and (not (uiop:emptyp mode)) (string= (string-downcase mode) "gl2")) (pushnew :bodge-gl2 *features*)) (script "regen-local-spec-and-zip" "--arch" arch build-directory system-name target)
0fba8b3f102ef5cee23866b6e493ff91cd1c032dcfeb6b411074ffa28a6eacdd
zcaudate/hara
report.clj
(ns hara.print.base.report (:require [hara.core.base.result :as result] [hara.print.base.common :as common] [hara.string :as string] [hara.string.base.ansi :as ansi])) (defn pad "creates `n` number of spaces (pad 1) => \"\" (pad 5) => \"\"" {:added "3.0"} [len] (ap...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/print/base/report.clj
clojure
(ns hara.print.base.report (:require [hara.core.base.result :as result] [hara.print.base.common :as common] [hara.string :as string] [hara.string.base.ansi :as ansi])) (defn pad "creates `n` number of spaces (pad 1) => \"\" (pad 5) => \"\"" {:added "3.0"} [len] (ap...
83d28562e8685107cc967fe72be385d55fb9d91f87c3eaecc873f47e08d991b3
clj-kondo/clj-kondo
alt.clj
(ns core-async.alt (:require [clojure.core.async :as a] [clojure.string :as str])) (def c (a/chan)) (def t (a/timeout 10000)) (a/alt! [c t] ([v ch] [ch v]) ;; no unresolved symbol warnings x1 x2) ;; unresolved symbols ;; no unresolved symbol warnings ;; namespace clojure.string is loaded from ca...
null
https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/corpus/core_async/alt.clj
clojure
no unresolved symbol warnings unresolved symbols no unresolved symbol warnings namespace clojure.string is loaded from cache, so invalid arity unresolved symbols no invalid arity for recur
(ns core-async.alt (:require [clojure.core.async :as a] [clojure.string :as str])) (def c (a/chan)) (def t (a/timeout 10000)) (a/alt!! [c t] ([v ch] (str/join "\n" [ch v] 1)) (loop [] (a/alt!! (a/timeout 1000) ([v _ch] (println "got" v)
c1ae65babb53b9021064c297f31873b83eb705a3d46fe58f619f40fb1ebb6088
acieroid/scala-am
phil.scm
Adapted from Savina benchmarks ( " Dining Philosophers benchmarks " , coming from Wikipedia ) ;; This is the -seq version (letrec ((N 3) (M 3) (rounds M) (num-forks N) (counter-actor (actor "counter" (n) (add (m) (become counter-actor (+ n m))) ...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/actors/savina/phil.scm
scheme
This is the -seq version Modeled as side effects, probably not the best thing to do...
Adapted from Savina benchmarks ( " Dining Philosophers benchmarks " , coming from Wikipedia ) (letrec ((N 3) (M 3) (rounds M) (num-forks N) (counter-actor (actor "counter" (n) (add (m) (become counter-actor (+ n m))) (fi...
e837ae3ac033beb04bb404618a5fd3de54d07ba2d8cd5a4c490c18e605a3745f
YoEight/lambda-database-experiment
Main.hs
-------------------------------------------------------------------------------- -- | -- Module : Main Copyright : ( C ) 2017 -- License : (see the file LICENSE) -- Maintainer : < > -- Stability : provisional -- Portability : non-portable -- ---------------------------------------------------------------------...
null
https://raw.githubusercontent.com/YoEight/lambda-database-experiment/da4fab8bd358fb8fb78412c805d6f5bc05854432/lambda-protocol/test-suite/Main.hs
haskell
------------------------------------------------------------------------------ | Module : Main License : (see the file LICENSE) Stability : provisional Portability : non-portable ------------------------------------------------------------------------------ -------------------------------------------------------...
Copyright : ( C ) 2017 Maintainer : < > import ClassyPrelude import qualified Test.Tasty import Test.Tasty.Hspec import qualified Test.Serialize as Serialize main :: IO () main = do tree <- sequence [ testSpec "Serialize" Serialize.spec ] let test = Test.Tasty.testGroup "protocol"...
20e27ac536fe5956a83ac041544ed9d2d7a15d28f7375c0e27a4159f7e54892d
input-output-hk/cardano-wallet
Properties.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLabels # {-# LANGUAGE RankN...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/cfa4d812c7aae44c301a0b28752ea0b7e9476d4c/lib/wallet/test/unit/Cardano/Wallet/DB/Properties.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE RankNTypes # | Wrap the result of 'readTransactions' in an arbitrary identity Applicative ------------------------------------------------------------------------------ Utils -----------------------------------------------------------------...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLabels # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeV...
cdad968c6ab3f2194e23fda6dfe34f93e4efc3c5a1eaa5bb629088b0743920c2
disteph/cdsat
hCons.mli
(**********************************************************) (* This file contains the implementation of HConsed types *) (**********************************************************) module type OptionValue = sig type t type index val value: (t,index) Opt.gadt end module BackIndex: OptionValue with type index =...
null
https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/lib/general.mld/hCons.mli
ocaml
******************************************************** This file contains the implementation of HConsed types ********************************************************
module type OptionValue = sig type t type index val value: (t,index) Opt.gadt end module BackIndex: OptionValue with type index = Opt.some module NoBackIndex: OptionValue with type index = Opt.none module EmptyData : sig type t val build : int -> 'a -> t end module type PolyS = sig type ('t,'a) initial ...
ccd63ab1921f56182c4f240b38c3bf935fb98c9a967a6d7bfb099c8582751a81
MarcosPividori/push-notify
Constants.hs
-- GSoC 2013 - Communicating with mobile devices. {-# LANGUAGE OverloadedStrings #-} -- | This Module define the main constants for sending Push Notifications through Cloud Connection Server (GCM). module Network.PushNotify.Ccs.Constants where import Data.Text cCCS_URL :: Text cCCS_URL = "gcm.googleapis.com" cCCS_...
null
https://raw.githubusercontent.com/MarcosPividori/push-notify/4c023c3fd731178d1d114774993a5e337225baa1/push-notify-ccs/Network/PushNotify/Ccs/Constants.hs
haskell
GSoC 2013 - Communicating with mobile devices. # LANGUAGE OverloadedStrings # | This Module define the main constants for sending Push Notifications through Cloud Connection Server (GCM).
module Network.PushNotify.Ccs.Constants where import Data.Text cCCS_URL :: Text cCCS_URL = "gcm.googleapis.com" cCCS_PORT :: Integer cCCS_PORT = 5235 cREGISTRATION_IDS :: Text cREGISTRATION_IDS = "registration_ids" cMessageId :: Text cMessageId = "message_id" cTo :: Text cTo = "to" cMessageType :: Text cMessag...
bb6b2fc56f520ef03d2dcb30317e6ecb4598b372d3a4c0d6f41a780bd84dd5cd
bgusach/exercises-htdp2e
ex-462-to-470.rkt
#lang htdp/isl+ (require test-engine/racket-tests) (require 2htdp/abstraction) An SOE is a non - empty Matrix . constraint for ( list r1 ... rn ) , ( length ri ) is ( + n 1 ) ; interpretation represents a system of linear equations ; An Equation is a [List-of Number]. constraint an Equation contains at least...
null
https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/5-generative-recursion/ex-462-to-470.rkt
racket
interpretation represents a system of linear equations An Equation is a [List-of Number]. interpretation if (list a1 ... an b) is an Equation, a1, ..., an are the left-hand-side variable coefficients and b is the right-hand side A Solution is a [List-of Number] an Equation a Solution Equation -> [List-of Nu...
#lang htdp/isl+ (require test-engine/racket-tests) (require 2htdp/abstraction) An SOE is a non - empty Matrix . constraint for ( list r1 ... rn ) , ( length ri ) is ( + n 1 ) constraint an Equation contains at least two numbers . an SOE (2 5 12 31) (4 1 -2 1) )) (check-expect (lhs (fir...
35035d530d0f9419ae90dbc53b2df3b137934d22f482a3edaf1b4f1ca3091e7a
tautologico/progfun
metacirc.rkt
#lang racket ;; --- ambiente com valores das variáveis ------------------ (define env '()) o valor de um símbolo no ambiente , existir (define (symbol-value fn) (define val (assoc fn env)) (if val (second val) (error (format "Nome nao definido: ~a" fn)))) avalia uma expressão condicional ( if )...
null
https://raw.githubusercontent.com/tautologico/progfun/0e8b2985e48445d289fa96f27c2485710c356709/codigo/metacirc.rkt
racket
--- ambiente com valores das variáveis ------------------ aplica a primitiva f aos argumentos args aos argumentos args avalia a expressão exp de acordo com o ambiente (global) env em testes. --- primitivas do interpretador ------------------------- --- testes ----------------------------------------------
#lang racket (define env '()) o valor de um símbolo no ambiente , existir (define (symbol-value fn) (define val (assoc fn env)) (if val (second val) (error (format "Nome nao definido: ~a" fn)))) avalia uma expressão condicional ( if ) (define (eval-if args) (define cnd (eval (first args)))...
b214f23d26545bc74256f4c73f151202d0e92ed18031f9ace4820b197fd99f64
LeventErkok/sbv
Kind.hs
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.Core.Kind Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- Internal data - structures for the sbv library -----------------------------------------------------------------...
null
https://raw.githubusercontent.com/LeventErkok/sbv/c5c02c5e245a8ac3b568836d6c4e6010aaefe42f/Data/SBV/Core/Kind.hs
haskell
--------------------------------------------------------------------------- | Module : Data.SBV.Core.Kind License : BSD3 Maintainer: Stability : experimental --------------------------------------------------------------------------- # LANGUAGE CPP # # LANGUAGE DataKinds # # LANG...
Copyright : ( c ) Internal data - structures for the sbv library # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # LANGUAGE ViewPatterns # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wall -Werror -fno - war...
5da6da32506467ddb7dd57e938c616e18d9506ef6b475ebcaf4f6bb5c35045f2
Commonfare-net/macao-social-wallet
confirm_transaction_form.clj
Freecoin - digital social currency toolkit part of Decentralized Citizen Engagement Technologies ( D - CENT ) R&D funded by the European Commission ( FP7 / CAPS 610349 ) Copyright ( C ) 2015 Dyne.org foundation Copyright ( C ) 2015 Thoughtworks , Inc. designed , written and maintained by < > ;; Wi...
null
https://raw.githubusercontent.com/Commonfare-net/macao-social-wallet/d3724d6c706cdaa669c59da439fe48b0373e17b7/src/freecoin/handlers/confirm_transaction_form.clj
clojure
With contributions by This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See th...
Freecoin - digital social currency toolkit part of Decentralized Citizen Engagement Technologies ( D - CENT ) R&D funded by the European Commission ( FP7 / CAPS 610349 ) Copyright ( C ) 2015 Dyne.org foundation Copyright ( C ) 2015 Thoughtworks , Inc. designed , written and maintained by < > <...
bb6b1629f0db95160fa2ab9d2e648ea4e5b5f6880f460d50600c0fb7a9e49de6
8c6794b6/guile-tjit
array.scm
ECMAScript for Copyright ( C ) 2009 , 2010 Free Software Foundation , Inc. ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 3 of the License , or ( at your o...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/language/ecmascript/array.scm
scheme
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See...
ECMAScript for Copyright ( C ) 2009 , 2010 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA (define-module (language...
580f822308cfa957b72f628c4124db813ffed1f03ac5ed638e4238c68a7d2fd1
facebookincubator/retrie
Demo.hs
Copyright ( c ) Facebook , Inc. and its affiliates . -- This source code is licensed under the MIT license found in the -- LICENSE file in the root directory of this source tree. -- {-# LANGUAGE OverloadedStrings #-} module Demo (stringToFooArg) where import Retrie argMapping :: [(FastString, String)] argMapping ...
null
https://raw.githubusercontent.com/facebookincubator/retrie/4b59de66e2b04b7e737c23592c86f6253e5e7a53/tests/Demo.hs
haskell
LICENSE file in the root directory of this source tree. # LANGUAGE OverloadedStrings #
Copyright ( c ) Facebook , Inc. and its affiliates . This source code is licensed under the MIT license found in the module Demo (stringToFooArg) where import Retrie argMapping :: [(FastString, String)] argMapping = [("foo", "Foo"), ("bar", "Bar")] stringToFooArg :: LibDir -> MatchResultTransformer stringToFooAr...
0d82e3761d11dfcaf2d47617e16c5c20bb438ca9645426ed90a5335abc747134
Bodigrim/tasty-bench
bench-fibo.hs
module Main (main) where import Test.Tasty.Bench fibo :: Int -> Integer fibo n = if n < 2 then toInteger n else fibo (n - 1) + fibo (n - 2) main :: IO () main = defaultMain [ bgroup "fibonacci numbers" [ bench "fifth" $ nf fibo 5 , bench "tenth" $ nf fibo 10 , bench "twentieth" $ nf fibo 20 ...
null
https://raw.githubusercontent.com/Bodigrim/tasty-bench/3790437ae4a075b5046f3226eeef6c75e022de9b/bench/bench-fibo.hs
haskell
module Main (main) where import Test.Tasty.Bench fibo :: Int -> Integer fibo n = if n < 2 then toInteger n else fibo (n - 1) + fibo (n - 2) main :: IO () main = defaultMain [ bgroup "fibonacci numbers" [ bench "fifth" $ nf fibo 5 , bench "tenth" $ nf fibo 10 , bench "twentieth" $ nf fibo 20 ...
8bab0e4680d34d1d3a9ecaabb270537504327e75b0eb0df6204806ed42076aae
aryx/ocamltarzan
pa_value.ml
pp camlp4orf * Copyright ( c ) 2009 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS...
null
https://raw.githubusercontent.com/aryx/ocamltarzan/4140f5102cee83a2ca7be996ca2d92e9cb035f9c/pa/pa_value.ml
ocaml
Type generator Fork of -api-libs.hg?file/7a17b2ab5cfc/rpc-light/pa_rpc.ml Conversion ML type -> Value.t Conversion Value.t -> ML type
pp camlp4orf * Copyright ( c ) 2009 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS...
fb82837cb626001ce4e60eba503a6479df0fb950344d37e6e44f0cba560e571f
imandra-ai/ocaml-cimgui
Imgui_sys_sdl2.ml
open Ctypes open Tsdl module Types = Imgui_sdl2_ffi_f.Types module Ffi = Imgui_sdl2_ffi_f.Make(Imgui_sdl2_generated_funs) let unwrap_ = function | Ok x -> x | Error (`Msg e) -> failwith @@ "sdl error " ^ e (** Cast: get a window pointer *) let get_w_ptr (w:Sdl.window) : Types.window ptr = Ctypes.coerce (ptr v...
null
https://raw.githubusercontent.com/imandra-ai/ocaml-cimgui/55c71078705099ea60d91630610f6d750fd07abb/src/sys/sdl2/Imgui_sys_sdl2.ml
ocaml
* Cast: get a window pointer * Cast: get a unit pointer * Cast: get a unit pointer TODO: provide these flags somewhere else
open Ctypes open Tsdl module Types = Imgui_sdl2_ffi_f.Types module Ffi = Imgui_sdl2_ffi_f.Make(Imgui_sdl2_generated_funs) let unwrap_ = function | Ok x -> x | Error (`Msg e) -> failwith @@ "sdl error " ^ e let get_w_ptr (w:Sdl.window) : Types.window ptr = Ctypes.coerce (ptr void) (ptr Types.window) @@ ptr_o...
41cdfd14da6be3227ffd5a4d233866858c420d951bec46326676b6c28aba70fa
grin-compiler/ghc-wpc-sample-programs
Impl.hs
----------------------------------------------------------------------------- -- | -- Module : Text.Regex.Impl Copyright : ( c ) 2006 SPDX - License - Identifier : BSD-3 - Clause -- -- Maintainer : -- Stability : experimental -- Portability : non-portable (Text.Regex.Base needs MPTC+FD) -- -- ...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/regex-base-0.94.0.0/src/Text/Regex/Base/Impl.hs
haskell
--------------------------------------------------------------------------- | Module : Text.Regex.Impl Maintainer : Stability : experimental Portability : non-portable (Text.Regex.Base needs MPTC+FD) Helper functions for defining certain instances of with repeated types: @ @ runs into ove...
Copyright : ( c ) 2006 SPDX - License - Identifier : BSD-3 - Clause RegexContext . These help when defining instances of RegexContext instance ( RegexLike regex source ) = > RegexContext regex source source where define , for its own Regex type : match = polymatch instance RegexContext Regex Byte...
0a6194efda44749092136d3a1d0d286c322a6b5d04655bc580ec0b9fc96b9e45
janestreet/bonsai
default_legend.ml
open Core open Import module Model = struct module Series = struct type t = { label : string ; value : Raw_html.t option ; dash : Raw_html.t option ; color : string option ; is_visible : bool ; is_highlighted : bool } [@@deriv...
null
https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/bindings/dygraph/src/default_legend.ml
ocaml
mostly copied from bonsai_multi_select Mostly copied from vdom_input_widgets keep last color if [color] is none Every time the [model_y_labels] changes, we want to remember the visibility status of all the series labels we know about so far. This will help in the case where we toggle v...
open Core open Import module Model = struct module Series = struct type t = { label : string ; value : Raw_html.t option ; dash : Raw_html.t option ; color : string option ; is_visible : bool ; is_highlighted : bool } [@@deriv...
9251a7b80208ee1b06ee465692f4f0e638efa510c765da23dedf1b1e71c5d32f
klutometis/clrs
quicksort.scm
(define (quicksort-general! vector p r partition!) (if (< p r) (let ((q (partition! vector p r))) (quicksort-general! vector p (- q 1) partition!) (quicksort-general! vector (+ q 1) r partition!)))) (define (quicksort! vector p r) (quicksort-general! vector p r partition!)) (define (partitio...
null
https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/7.1/quicksort.scm
scheme
(define (quicksort-general! vector p r partition!) (if (< p r) (let ((q (partition! vector p r))) (quicksort-general! vector p (- q 1) partition!) (quicksort-general! vector (+ q 1) r partition!)))) (define (quicksort! vector p r) (quicksort-general! vector p r partition!)) (define (partitio...
faaa478291830a2853995ff947c36a69b5b2c16b9680e877108fb41727a74723
KingMob/clojure-trie-performance
trie09.clj
(ns modulo-lotus.trie.trie09 (:require [clojure.string :refer (split triml)] [modulo-lotus.trie.helpers :refer [alpha-idx]] [modulo-lotus.trie.trie-node :as tr :refer [TrieNode add-substring count-w-prefix count-words prefix]] [taoensso.tufte :as tufte :refer (defnp p profiled profile)]) (:import [java....
null
https://raw.githubusercontent.com/KingMob/clojure-trie-performance/4c0c77799a0763c670fdde70b737e0af936a2bb8/src/modulo_lotus/trie/trie09.clj
clojure
Like 07, but remove reflection and type hint more
(ns modulo-lotus.trie.trie09 (:require [clojure.string :refer (split triml)] [modulo-lotus.trie.helpers :refer [alpha-idx]] [modulo-lotus.trie.trie-node :as tr :refer [TrieNode add-substring count-w-prefix count-words prefix]] [taoensso.tufte :as tufte :refer (defnp p profiled profile)]) (:import [java....
baa33e02324e0d5d7e91a126f7cfe546a23a06bef59606a9f0a1eba897a23f91
joaopaulomoraes/7-days-of-clojure
numbers.clj
(ns seven-days-of-clojure.numbers) (+ 1 1 2 3 5 8) (- 1 1 2 3 5 8) (* 1 2 (* 5 8) 13) (/ 135 3) (mod 3 2) (min 21 13 8 5 3 2 1 1) (max 1 1 2 3 5 8 13 21)
null
https://raw.githubusercontent.com/joaopaulomoraes/7-days-of-clojure/ef26ca84f6e149ea44bdac13ef2e391e735b8347/day2/numbers.clj
clojure
(ns seven-days-of-clojure.numbers) (+ 1 1 2 3 5 8) (- 1 1 2 3 5 8) (* 1 2 (* 5 8) 13) (/ 135 3) (mod 3 2) (min 21 13 8 5 3 2 1 1) (max 1 1 2 3 5 8 13 21)
5eefa4eada3d48928ae0a3e1dfcac53918b45bd0ec2e5157153faee0753b3baa
fractalide/fractalide
sidebar.rkt
#lang racket (require racket/draw) (require racket/runtime-path) (require fractalide/modules/rkt/rkt-fbp/graph) (define-runtime-path cantor-logo-path "cantor-logo-min.png") (define cantor-logo (read-bitmap cantor-logo-path)) (define-graph (node "vp" ${gui.vertical-panel}) (edge-out "vp" "out" "out") (node "h...
null
https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/agents/cardano-wallet/sidebar.rkt
racket
#lang racket (require racket/draw) (require racket/runtime-path) (require fractalide/modules/rkt/rkt-fbp/graph) (define-runtime-path cantor-logo-path "cantor-logo-min.png") (define cantor-logo (read-bitmap cantor-logo-path)) (define-graph (node "vp" ${gui.vertical-panel}) (edge-out "vp" "out" "out") (node "h...
6f1b4697c0cd10dcb72add30a92cd833672aca958d3a5332fd6f6848fba8371f
thosmos/riverdb
ui.cljc
(ns riverdb.ui (:require [clojure.string :as str] [edn-query-language.core :as eql] [riverdb.model :as model] [riverdb.model.person :as person] [com.fulcrologic.fulcro.components :as comp :refer [defsc]] [com.fulcrologic.fulcro.algorithms.form-state :as fs] #?(:clj [com.fulcrologic.fulcro...
null
https://raw.githubusercontent.com/thosmos/riverdb/b47f01a938da26298ee7924c8b2b3a2be5371927/src/rad/riverdb/ui.cljc
clojure
Use computed props to inform subform of its role. (def account-validator (fs/make-validator (fn [form field] (case field :account/email (let [prefix (or ...
(ns riverdb.ui (:require [clojure.string :as str] [edn-query-language.core :as eql] [riverdb.model :as model] [riverdb.model.person :as person] [com.fulcrologic.fulcro.components :as comp :refer [defsc]] [com.fulcrologic.fulcro.algorithms.form-state :as fs] #?(:clj [com.fulcrologic.fulcro...
1bdf287f3bc2d362c0743cea8dc883deac0db0dcaad7c3f02b5d2c3caad652a0
fossas/fossa-cli
Paket.hs
module Strategy.NuGet.Paket ( discover, findProjects, getDeps, mkProject, findSections, buildGraph, PaketDep (..), Section (..), Remote (..), ) where import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject'), analyzeProject) import Control.Effect.Diagnostics ( Diagnostics, Has, context, ...
null
https://raw.githubusercontent.com/fossas/fossa-cli/187f19afec2133466d1998c89fc7f1c77107c2b0/src/Strategy/NuGet/Paket.hs
haskell
module Strategy.NuGet.Paket ( discover, findProjects, getDeps, mkProject, findSections, buildGraph, PaketDep (..), Section (..), Remote (..), ) where import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject'), analyzeProject) import Control.Effect.Diagnostics ( Diagnostics, Has, context, ...
f28e86133a39bd29d944ea301ccc495c82ea9f672881f85cfaedc765c9f7ba83
nervous-systems/cljs-lambda
core.cljs
(ns {{name}}.core (:require [cljs-lambda.util :as lambda] [cljs-lambda.context :as ctx] [cljs-lambda.macros :refer-macros [deflambda]] [cljs.reader :refer [read-string]] [cljs.nodejs :as nodejs] [cljs.core.async :as async] [promesa.core :as p]) ...
null
https://raw.githubusercontent.com/nervous-systems/cljs-lambda/ecd74ec7046e619b3c097c222124fea4b9973241/templates/cljs-lambda/src/leiningen/new/cljs_lambda/core.cljs
clojure
We can fail/succeed wherever w/ fail!/succeed! - we can also leave an Error instance on the channel we return, or return a reject promised - see :delayed-failure above.
(ns {{name}}.core (:require [cljs-lambda.util :as lambda] [cljs-lambda.context :as ctx] [cljs-lambda.macros :refer-macros [deflambda]] [cljs.reader :refer [read-string]] [cljs.nodejs :as nodejs] [cljs.core.async :as async] [promesa.core :as p]) ...
df01d98a46e7a20e5bd3afa1686167a6624e530625e39838aa0945cc00c0eb96
tazjin/democrify
User.hs
# LANGUAGE ForeignFunctionInterface # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module User where import Control.Applicative (optional, (<$>)) import Control.Monad (msum, when) import Control.Monad.IO.Class (lift...
null
https://raw.githubusercontent.com/tazjin/democrify/44d839428f881dff488d2e152ddb828dfd308dde/Democrify/User.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # This is an orphan instance! |This function renders 'Html' as 'Text' and passes it to scotty *Helpers |Direct path to the web resources ^ Title ^ Additional head-tag-elements ^ Additional scripts ^ Body The weird-looking line below make...
# LANGUAGE ForeignFunctionInterface # module User where import Control.Applicative (optional, (<$>)) import Control.Monad (msum, when) import Control.Monad.IO.Class (liftIO) import Data.ByteString.Char8 (ByteString) import Dat...
0f0bf2aa3baf86823b125501f0ccaf3f04f1a39c3563cda81deb879ddeaf15bc
danr/hipspec
DifficultRotate.hs
{-# LANGUAGE DeriveDataTypeable #-} module Challenges.DifficultRotate where import Prelude hiding (reverse,(++),(+),(*),(-),(<),(<=),length,drop,take) import HipSpec.Prelude data List = Cons A List | Nil deriving (Eq,Typeable,Ord) data Nat = S Nat | Z deriving (Eq,Show,Typeable,Ord) (+) :: Nat -> Nat -> Nat S ...
null
https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/examples/Challenges/DifficultRotate.hs
haskell
# LANGUAGE DeriveDataTypeable # From productive use of failure
module Challenges.DifficultRotate where import Prelude hiding (reverse,(++),(+),(*),(-),(<),(<=),length,drop,take) import HipSpec.Prelude data List = Cons A List | Nil deriving (Eq,Typeable,Ord) data Nat = S Nat | Z deriving (Eq,Show,Typeable,Ord) (+) :: Nat -> Nat -> Nat S n + m = S (n + m) Z + m = m (*) :...
6d33a3400b8b4adcd6c0026efef5cff887904023034d369a05ce3325b47dbe84
chapmanb/bcbio.variation
trusted.clj
(ns bcbio.variation.filter.trusted "Retrieve trusted variants from comparisons based on configured thresholds. Allows specification of cases where we should trust variants to pass, such as: found in more than two sequencing technologies, or called in 3 aligners, or called in 7 out of 8 inputs." (:use [bcbio.v...
null
https://raw.githubusercontent.com/chapmanb/bcbio.variation/c48834a6819e63dcccb5bc51540c7e19b212a019/src/bcbio/variation/filter/trusted.clj
clojure
(ns bcbio.variation.filter.trusted "Retrieve trusted variants from comparisons based on configured thresholds. Allows specification of cases where we should trust variants to pass, such as: found in more than two sequencing technologies, or called in 3 aligners, or called in 7 out of 8 inputs." (:use [bcbio.v...
545b7c0203733da50f44cc76426ccc9fe693497bbb80f74c47a6820fddc57491
ghc/packages-Cabal
PackageEnvironment.hs
# LANGUAGE DeriveGeneric # ----------------------------------------------------------------------------- -- | Module : Distribution . Client . . PackageEnvironment -- Maintainer : -- Portability : portable -- Utilities for working with the package environment file . Patterned after -- Distribution.Cli...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-install/Distribution/Client/Sandbox/PackageEnvironment.hs
haskell
--------------------------------------------------------------------------- | Maintainer : Portability : portable Distribution.Client.Config. --------------------------------------------------------------------------- * Configuration saved in the package environment file TODO: would be nice to remove dupli...
# LANGUAGE DeriveGeneric # Module : Distribution . Client . . PackageEnvironment Utilities for working with the package environment file . Patterned after module Distribution.Client.Sandbox.PackageEnvironment ( PackageEnvironment(..) , PackageEnvironmentType(..) , classifyPackageEnvironment , r...
05ffeac66efe4f06e8407cf75b507ebbea7709532995bbedaa6edcbe6687784a
apache/couchdb-couch
couch_httpd_proxy.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/apache/couchdb-couch/21c8d37ac6ee1a7fed1de1f54f95a4d3cd9f5248/src/couch_httpd_proxy.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_httpd_proxy). -export([handle_proxy_req/2]). -include_lib("couch/include/couch_db.hrl"). -include_lib("ibrowse/include/ibrowse.hrl"). -defin...
ac0bf0466a7c67a8a9cdd19e0a30a48f7f933d2d26ebf6395cbb41723899137d
manuel-serrano/bigloo
ast.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / comptime / Write / ast.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/comptime/Write/ast.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The ast pretty-printer */ *===========================...
* serrano / prgm / project / bigloo / comptime / Write / ast.scm * / * Author : * / * Creation : Sat Dec 31 07:29:03 1994 * / * Last change : Fri Mar 18 11:43:48 2011 ( serrano ) * / * Copy...
9a9ad9144b1f8db8e66efdae8da9107775bb139875621c0de39657a000827db6
gwathlobal/CotD
level-modifier.lisp
(in-package :cotd) ;;--------------------------------- ;; LEVEL-MOD-TYPE Constants ;;--------------------------------- (defenum:defenum level-mod-type-enum (:level-mod-controlled-by :level-mod-sector-feat :level-mod-sector-item ...
null
https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/level-modifiers/level-modifier.lisp
lisp
--------------------------------- LEVEL-MOD-TYPE Constants --------------------------------- --------------------------------- LEVEL-MODIFIER Constants --------------------------------- the func that takes world-sector-type and returns a list of faction-ids takes world-sector-type-id, mission-type-id and world-time...
(in-package :cotd) (defenum:defenum level-mod-type-enum (:level-mod-controlled-by :level-mod-sector-feat :level-mod-sector-item :level-mod-tod :level-mod-weather ...
6e065162d35bfce70250a9a7122073a6db0a5b321dc2277fe66d440e4de976a2
toaq/zugai
Xbar.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Xbar where -- This module convers zugai parse trees to -org.netlify.app/parser/ style *binary* (X-bar) parse trees. import C...
null
https://raw.githubusercontent.com/toaq/zugai/2168cfb865a243dbf5516db30d3fc3ef5840c8b8/src/Xbar.hs
haskell
This module convers zugai parse trees to -org.netlify.app/parser/ style *binary* (X-bar) parse trees. Turn n≥1 terms into a parse tree with a "term" or "terms" head. termsToXbar :: Foldable t => t Term -> Mx Xbar When rendering an elided VP after "sa", this "∅" VP is rendered as a fallback. Pair a construct with i...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Xbar where import Control.Monad.State import Data.Aeson.Micro (object, (.=)) import Data.Aeson.Micro qualified as J import D...
fe68eda7dfd15eea6bd80d1ee64bdb4bcc52a7d063e3dca35fafa63dd2bdf215
dbtoaster/dbtoaster-a5
Plan.ml
* A plan is the third representation in the compiler pipeline ( SQL - > Calc - > Plan ) Each plan consists of a set of compiled datastructures , which consist of { ul { - A datastructure description , including a name and a definition of the the query which the datastructure i...
null
https://raw.githubusercontent.com/dbtoaster/dbtoaster-a5/6436110ad283378085a935ecca69080b7127467b/src/compiler/Plan.ml
ocaml
* A datastructure description * The name of the datastructure. The content of this expr_t must always be a single external leaf and can always be simply (assuming its schema matches) dropped into an existing expression in ...
* A plan is the third representation in the compiler pipeline ( SQL - > Calc - > Plan ) Each plan consists of a set of compiled datastructures , which consist of { ul { - A datastructure description , including a name and a definition of the the query which the datastructure i...
81276b7fd72b143db8a305c976268294983b72e91e3385eb1df22fa881af1f6e
vii/dysfunkycom
color.lisp
;; lispbuilder-sdl ( C)2006 < > (in-package #:lispbuilder-sdl) (defclass color () ((color-vector :accessor fp :initform (vector 0 0 0) :initarg :color)) (:documentation "A color containing `INTEGER` Red, Green and Blue components. Free using [FREE](#free).")) (defclass color-a (color) ((color-vector :acce...
null
https://raw.githubusercontent.com/vii/dysfunkycom/a493fa72662b79e7c4e70361ad0ea3c7235b6166/addons/lispbuilder-sdl/sdl/color.lisp
lisp
lispbuilder-sdl
( C)2006 < > (in-package #:lispbuilder-sdl) (defclass color () ((color-vector :accessor fp :initform (vector 0 0 0) :initarg :color)) (:documentation "A color containing `INTEGER` Red, Green and Blue components. Free using [FREE](#free).")) (defclass color-a (color) ((color-vector :accessor fp :initform (...
6f23672b084a2ab45b0501caf18c228f34495f9a6534ed78de8f983d2776181e
TrustInSoft/tis-kernel
utils_parser.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/aorai/utils_parser.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of Aorai plug - in of Frama - C. Copyright ( C ) 2007 - 2015 ...
397d88a26f34c03f69422aa3d0a223d6d7569718e0c3be2512e55b641959f48e
kennknowles/aspcc
configure.ml
open Conf;; open Util;; type aspcc_module = { name : string; findlibs : string list; desc : string; } let available_modules = [ { name = "VbPervasives"; findlibs = ["unix"; "netstring"]; desc = "The documented standard VbScript functions." }; { name = "aspIntrinsics"; findlibs ...
null
https://raw.githubusercontent.com/kennknowles/aspcc/951a91cc21e291b1d3c750bbbca7fa79209edd08/configure.ml
ocaml
Dealing with which modules were selected Inform the user of the configuration The makefile generation information document all modules regardless of inclusion
open Conf;; open Util;; type aspcc_module = { name : string; findlibs : string list; desc : string; } let available_modules = [ { name = "VbPervasives"; findlibs = ["unix"; "netstring"]; desc = "The documented standard VbScript functions." }; { name = "aspIntrinsics"; findlibs ...
47ca77cd37d13094eb622b21809f222e0ad8388f1c353bc4920d92ce1ce9654b
CodyReichert/qi
regex-class-util.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*- $ Header : /usr / local / cvsrep / cl - ppcre / regex - class - util.lisp , v 1.9 2009/09/17 19:17:31 edi Exp $ ;;; This file contains some utility methods for REGEX objects. Copyright ( c ) 2002 - 2009 , Dr. . All rights reserved...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cl-ppcre-master/regex-class-util.lisp
lisp
Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*- This file contains some utility methods for REGEX objects. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the...
$ Header : /usr / local / cvsrep / cl - ppcre / regex - class - util.lisp , v 1.9 2009/09/17 19:17:31 edi Exp $ Copyright ( c ) 2002 - 2009 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,...
5c7656d490ea904077dbbda6dd1159ecf094c45ab3c8dc7ab08010973066cd27
WorksHub/client
db.cljs
(ns wh.logged-in.personalised-jobs.db)
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/logged_in/personalised_jobs/db.cljs
clojure
(ns wh.logged-in.personalised-jobs.db)
343e0eb7d055422f9a553dca4163d6d5f48e62f05f26e8489c8e306af81012a4
haskell-mafia/projector
Check.hs
# LANGUAGE CPP # # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TupleSections # module Projecto...
null
https://raw.githubusercontent.com/haskell-mafia/projector/6af7c7f1e8a428b14c2c5a508f7d4a3ac2decd52/projector-core/src/Projector/Core/Check.hs
haskell
# LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings # * Interface * Guts | Like 'typeCheckAll', but accepting a map of expressions of known type. This is appropriate for use in a left fold for incremental (dependency-ordered) typechecking. This is essentially top-level letrec. TODO: This admits general ...
# LANGUAGE CPP # # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TupleSections # module Projector.Core.Check ( TypeError (..) , typeCheckIncremental , typeChe...
38ae3b8d37967b2b3f2ceb1d8112cededf904f93ad6628e4e2ad6ba2ae96522d
matteoredaelli/ebot
ebot_html.erl
EBOT , an erlang web crawler . Copyright ( C ) 2010 ~ matteo DOT AT libero DOT it %% / %% %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the Lice...
null
https://raw.githubusercontent.com/matteoredaelli/ebot/6a6af4eb345adfa05b4508ed2dec529413d97da8/src/ebot_html.erl
erlang
/ This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See...
EBOT , an erlang web crawler . Copyright ( C ) 2010 ~ matteo DOT AT libero DOT it it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License Created : 19 Jun 201...
c42ad9af0d2877f89dbd0357135d3c8045e3ce3a4f5c9786af79980870413314
martintrojer/datalog
rules.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 t...
null
https://raw.githubusercontent.com/martintrojer/datalog/bd64e76ceb02c0494a654010c0221ada5fc2a002/src/datalog/rules.clj
clojure
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 this notice, or an...
Copyright ( c ) . All rights reserved . The use and A Clojure implementation of Datalog -- Rules Engine straszheimjeffrey ( gmail ) Created 2 Feburary 2009 Converted to Clojure1.4 by 2012 . (ns datalog.rules (:use [datalog.util] [datalog.literals] [datalog.database]) (:use [clo...
f205da0f19769ee2dec555c62cb1e26166924f2b521da7e93b63d87724b2d4d2
bsaleil/lc
do.scm
;;--------------------------------------------------------------------------- ;; Copyright ( c ) 2015 , . 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 so...
null
https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/unit-tests/do.scm
scheme
--------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list ...
Copyright ( c ) 2015 , . All rights reserved . THIS SOFTWARE IS PROVIDED ` ` AS IS '' AND ANY EXPRESS OR INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT (do ((i 0 (+ i 1))) ((= i 4) (println #t)) ...
320a457ff249acad8d31a8bce3e56645d04f0716f12eb93ba5d82de6c1509fc2
nvim-treesitter/nvim-treesitter
injections.scm
(preproc_arg) @c (comment) @comment
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/67f08570152792c6a4f0815e71a0093ad97f2725/queries/c/injections.scm
scheme
(preproc_arg) @c (comment) @comment
a7a842a3b5de029406fcc253066c9d5f3cd9e6d5d10d8160f2e521c60f6bf3f3
macchiato-framework/examples
config.cljs
(ns file-upload.config (:require [macchiato.env :as config] [mount.core :refer [defstate]])) (defstate env :start (config/env))
null
https://raw.githubusercontent.com/macchiato-framework/examples/946bdf1a04f5ef787fc83affdcbf6603bbf29b5c/file-upload/src/file_upload/config.cljs
clojure
(ns file-upload.config (:require [macchiato.env :as config] [mount.core :refer [defstate]])) (defstate env :start (config/env))
b6c4d32745481699d3839a83148b66dfb16add425a2650c36e8cac40ab28ffdc
nineties-retro/sps
sps-io.scm
(define sps:io:stdout current-output-port) (define (sps:io:write port string length) (if (= length (string-length string)) (display string port) (display (substring string 0 length) port))) (define (sps:io:write-substring port string start end) (display (substring string start end) port)) (define (sp...
null
https://raw.githubusercontent.com/nineties-retro/sps/bf15b415f4cdf5d6d69ae2f39c250db2090c0817/scm/sps-io.scm
scheme
(define sps:io:stdout current-output-port) (define (sps:io:write port string length) (if (= length (string-length string)) (display string port) (display (substring string 0 length) port))) (define (sps:io:write-substring port string start end) (display (substring string start end) port)) (define (sp...
aaec73b0634ae6b2aa4075c2a927085e8f132328df085ab2e2a92a54204cbe4f
TheLortex/mirage-monorepo
header.ml
{ { { Copyright ( c ) 2012 Anil Madhavapeddy < > * Copyright ( c ) 2011 - 2012 < > * Copyright ( c ) 2010 * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission ...
null
https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ocaml-cohttp/cohttp/src/header.ml
ocaml
Grab "foo/bar" from " foo/bar ; charset=UTF-8" It should actually be [get] as the interresting value is actually the last. Only add a header if one doesnt already exist, e.g. from the app TODO: this is a protocol violation
{ { { Copyright ( c ) 2012 Anil Madhavapeddy < > * Copyright ( c ) 2011 - 2012 < > * Copyright ( c ) 2010 * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission ...
9b39201ef23f25b5b0f491afeb5cee194a33fc0d99a699de1f868e9d6f6651db
2600hz-archive/whistle
j5_acctmgr.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2011 , VoIP INC %%% @doc %%% Handle serializing account access for crossbar accounts TODO : convert to gen_listener %%% @end Created : 16 Jul 2011 by < > %%%-----------------------------------------------------------...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/whistle_apps/apps/jonny5/src/j5_acctmgr.erl
erlang
------------------------------------------------------------------- @doc Handle serializing account access for crossbar accounts @end ------------------------------------------------------------------- API gen_server callbacks {CallID, Type :: inbound | two_way} ===================================================...
@author < > ( C ) 2011 , VoIP INC TODO : convert to gen_listener Created : 16 Jul 2011 by < > -module(j5_acctmgr). -behaviour(gen_server). -export([start_link/1, authz_trunk/3, authz_trunk/4, known_calls/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3])....
68f8eef2e67408905c83d9e55422059351a2f14c1cca21e556fabca557274914
skrah/minicaml
Unify.mli
* Copyright ( c ) 2015 . All rights reserved . * * This file is distributed under the terms of the Q Public License * version 1.0 . * Copyright (c) 2015 Stefan Krah. All rights reserved. * * This file is distributed under the terms of the Q Public License * version 1.0. *) exception ValidationErr...
null
https://raw.githubusercontent.com/skrah/minicaml/e5f5cad7fdbcfc11561f717042fae73fa743823f/Unify.mli
ocaml
* Copyright ( c ) 2015 . All rights reserved . * * This file is distributed under the terms of the Q Public License * version 1.0 . * Copyright (c) 2015 Stefan Krah. All rights reserved. * * This file is distributed under the terms of the Q Public License * version 1.0. *) exception ValidationErr...
17b142a1cb225978ca13d2159457dcb110204ed4d39a7ff9ac37711899c47bf7
gildor478/ocaml-fileutils
FileUtilREADLINK.ml
(******************************************************************************) (* ocaml-fileutils: files and filenames common operations *) (* *) Copyright ( C ) 2003 - 2014 , (* ...
null
https://raw.githubusercontent.com/gildor478/ocaml-fileutils/9ad8d2ee342c551391f2a9873de01982d24b36d5/src/lib/fileutils/FileUtilREADLINK.ml
ocaml
**************************************************************************** ocaml-fileutils: files and filenames common operations This libra...
Copyright ( C ) 2003 - 2014 , the Free Software Foundation ; either version 2.1 of the License , or ( at You should have received a copy of the GNU Lesser General Public License along with this library ; if not , write to the Free Software Foundation , Inc. , 51 Franklin St , Fifth Floor , Bo...
9df2c35e9ba67c9a3294d3cceb1d89f5ac053140d4b3d7e4492734706610eec4
dradtke/Lisp-Text-Editor
generics.lisp
(in-package :gtk-cffi) ;; (defgeneric destroy (gtk-object)) ;; (defgeneric flags (gtk-object)) ;; (defgeneric text (widget &rest flags)) ( defgeneric ( setf text ) ( text widget & rest rest ) ) ( defgeneric ( setf mnemonic - widget ) ( widget label ) ) ;; (defgeneric mnemonic-widget (label)) ;; (defgeneric activa...
null
https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/gtk-cffi-20120208-cvs/gtk/generics.lisp
lisp
(defgeneric destroy (gtk-object)) (defgeneric flags (gtk-object)) (defgeneric text (widget &rest flags)) (defgeneric mnemonic-widget (label)) (defgeneric activate (widget)) (defgeneric realize (widget)) (defgeneric size-request (widget)) (defgeneric style-field (widget field &optional state type)) (defgeneric ...
(in-package :gtk-cffi) ( defgeneric ( setf text ) ( text widget & rest rest ) ) ( defgeneric ( setf mnemonic - widget ) ( widget label ) ) ( defgeneric ( setf size - request ) ( size widget ) ) ( defgeneric ( setf style - field ) ( value widget field & optional state type ) ) ( defgeneric ( setf color ) ( c...
dd6f65f952b6a8cadf7eef625199fb393c0085fb80203635d438aea2ceb5c35a
mstksg/advent-of-code-2019
Day24.hs
-- | -- Module : AOC.Challenge.Day24 -- License : BSD3 -- -- Stability : experimental -- Portability : non-portable -- Day 24 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day24 ( day24a , day24b ) where import AOC.Common (Point, cardinalNeighbsSet...
null
https://raw.githubusercontent.com/mstksg/advent-of-code-2019/df2b1c76ad26ad20306f705e923a09b14d538374/src/AOC/Challenge/Day24.hs
haskell
| Module : AOC.Challenge.Day24 License : BSD3 Stability : experimental Portability : non-portable ^ get the set of all points to check, from current alive ^ neighbors ^ initial ^ yipee ^ positive: zoom in, negative: zoom out ^ position in layer. out layer
Day 24 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day24 ( day24a , day24b ) where import AOC.Common (Point, cardinalNeighbsSet, parseAsciiMap, firstRepeated, (!!!), Dir(..)) import AOC.Solver ((:~>)(..), dyno_) import Control.DeepS...
d56320a976644005e34f864d8b54e2f87cc96a570600ba187cfd83cdd3ed0b3d
leptonyu/boots
Web.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE...
null
https://raw.githubusercontent.com/leptonyu/boots/335d58baafb1e0700b1a7dbe595a7264bd4d83ba/boots-web/src/Boots/Factory/Web.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # ** Configuration ** Environment ** Modified Middleware ** Api se...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # module Boots.Factory.Web( buildWeb , HasWeb(..) , HasWebConfig(..) , WebConfig(..) , EndpointConfig(..) , WebEnv(..) , ...
0b2859507fe06db5d8df47cc48c8715e78588ac88bc04ae02d9e6bae2a625a83
jeapostrophe/exp
dpr.rkt
#lang racket/base (require (for-syntax racket/base syntax/parse) racket/stxparam) (define-syntax-parameter queue-defer #f) (define-syntax (defere stx) (define qdv (syntax-parameter-value #'queue-defer)) (unless qdv (raise-syntax-error 'defer "Illegal use outside of define/dpr" stx...
null
https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/dpr.rkt
racket
xxx Named function returns would be a lot more complicated, so we don't have example c
#lang racket/base (require (for-syntax racket/base syntax/parse) racket/stxparam) (define-syntax-parameter queue-defer #f) (define-syntax (defere stx) (define qdv (syntax-parameter-value #'queue-defer)) (unless qdv (raise-syntax-error 'defer "Illegal use outside of define/dpr" stx...
c1940f2cfc67c61fbaf169fe6230e7bc04047a2af1bf0d62d6e84544cb9052de
mirage/ocaml-vhd
f.ml
* Copyright ( C ) 2011 - 2013 Citrix Inc * * 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 ; version 2.1 only . with the special * exception on linking described in file...
null
https://raw.githubusercontent.com/mirage/ocaml-vhd/8efec5c3930d81e471d04e134fb8b3c640afef3a/vhd_format/f.ml
ocaml
never happens always set TODO: use the optimised mirage version Adjust the checksum [t] by removing the contribution of [x] high bits low bits Check if there's a byte order marker UTF-16 strings end with a \000\000 "conectix" No alignment necessary Interpret as a NULL-terminated string bytes se...
* Copyright ( C ) 2011 - 2013 Citrix Inc * * 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 ; version 2.1 only . with the special * exception on linking described in file...
1671aae0eb0e03198bb7f592973c4d980223d856c397e40f164a44bbed1553de
fukamachi/clozure-cl
x8632env.lisp
-*- Mode : Lisp ; Package : CCL ; -*- ;;; Copyright ( C ) 2005 - 2009 Clozure Associates This file is part of Clozure CL . ;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the ;;; file "LICENSE". The LLGPL con...
null
https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/lib/x8632env.lisp
lisp
Package : CCL ; -*- file "LICENSE". The LLGPL consists of a preamble and the LGPL, conflict, the preamble takes precedence. Clozure CL is referenced in the preamble as the "LIBRARY." The LLGPL is also available online at not so hot when using x87 hmm.
Copyright ( C ) 2005 - 2009 Clozure Associates This file is part of Clozure CL . Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the which is distributed with Clozure CL as the file " LGPL " . Where these (in-p...
a9baf14ed8972f23a0f1ebc62f13cf5254e9f391afb644e60dcf5cbdbb56a2db
fulcrologic/fulcro-rad-datomic
indexed_access_common_spec.clj
(ns com.fulcrologic.rad.database-adapters.indexed-access-common-spec (:require [cljc.java-time.local-date :as ld] [cljc.java-time.local-date-time :as ldt] [clojure.test :refer [use-fixtures]] [clojure.test.check :as tc] [clojure.test.check.generators :as gen] [clojure.test.check.properties :as...
null
https://raw.githubusercontent.com/fulcrologic/fulcro-rad-datomic/801f69ba370cf0c604d255139495b76373a2b497/src/test/com/fulcrologic/rad/database_adapters/indexed_access_common_spec.clj
clojure
(ns com.fulcrologic.rad.database-adapters.indexed-access-common-spec (:require [cljc.java-time.local-date :as ld] [cljc.java-time.local-date-time :as ldt] [clojure.test :refer [use-fixtures]] [clojure.test.check :as tc] [clojure.test.check.generators :as gen] [clojure.test.check.properties :as...
db0f4edce16eb6ffb4b45fd1b0e8a41e4f65509f1ffdd05fe9e8aba4bed4f928
Odie/gd-edit
game_dirs.clj
(ns gd-edit.game-dirs (:require [clojure.java.io :as io] [gd-edit.utils :as u] [gd-edit.globals :as globals] [gd-edit.vdf-parser :as vdf] [com.rpl.specter :as specter] [taoensso.timbre :as t] [clojure.string :as str]) (:import [com.sun.jna.plat...
null
https://raw.githubusercontent.com/Odie/gd-edit/d1ac46fd6eb89c9571199641d9cc2f95e68d139b/src/gd_edit/game_dirs.clj
clojure
Sort by the directory priority Grab the directories only ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Transfer stash --------...
(ns gd-edit.game-dirs (:require [clojure.java.io :as io] [gd-edit.utils :as u] [gd-edit.globals :as globals] [gd-edit.vdf-parser :as vdf] [com.rpl.specter :as specter] [taoensso.timbre :as t] [clojure.string :as str]) (:import [com.sun.jna.plat...
74dda3fe79778c608e3661bd00e83806d7f30a6761d7902da980ca1ca76f2c37
pebrc/ninety-nine-clojure
logic_test.clj
(ns ninety-nine-clojure.logic-test (:require [clojure.test :refer :all] [ninety-nine-clojure.logic :refer :all])) (deftest infix-and (is true (infix true and true))) (deftest infix-nested (is true (infix true and (false or true) ))) (deftest infix-double-operator (is true (infix true and not fal...
null
https://raw.githubusercontent.com/pebrc/ninety-nine-clojure/4aec31b42bd47509c3ef3d1b874eb1f5c1172f54/test/ninety_nine_clojure/logic_test.clj
clojure
I assume subtle differences during tree building are OK as long as the resulting code lengths for each value are identical Therefore I am comparing code lengths by normalizing the expected results and the actual results to a sorted sequence of tuples of value and code length
(ns ninety-nine-clojure.logic-test (:require [clojure.test :refer :all] [ninety-nine-clojure.logic :refer :all])) (deftest infix-and (is true (infix true and true))) (deftest infix-nested (is true (infix true and (false or true) ))) (deftest infix-double-operator (is true (infix true and not fal...
f4ea4cdfd79c9d80cb3fada9d6b1e6315aa9ab3ea22efdcb6b5c00c993818f31
jeffshrager/biobike
javascript.lisp
;; Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved . ;; (in-package :com.gigamonkeys.foo.javascript) (defclass javascript (language) () (:default-initargs :special-operator-symbol 'javascript-special-operator :macro-symbol 'javascript-macro :input-readtable (let ((readtable (copy-re...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/ThirdParty/monkeylib/foo/javascript.lisp
lisp
File compiler implementation Language implementation This is where better smarts about translating Lisp values to output. The special form is naturally an expression but if it is being proceessed as a statement then we need to tack on a semicolon. If it's already a statement then it will have taken care of ...
Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved . (in-package :com.gigamonkeys.foo.javascript) (defclass javascript (language) () (:default-initargs :special-operator-symbol 'javascript-special-operator :macro-symbol 'javascript-macro :input-readtable (let ((readtable (copy-readtabl...
6ac6adf4ceff79b7462c9c7d10174321cf6461530531247d88ef4b33d6b2cc49
shop-planner/shop3
pfile1.lisp
(in-package :shop-user) (defproblem umt.pfile1 UM-TRANSLOG-2 ( ;;; ;;; facts ;;; (REGION REGION0) (CITY CITY0) (CITY CITY1) (LOCATION LOCATION0) (LOCATION LOCATION1) (LOCATION LOCATION2) (LOCATION LOCATION3) (LOCATION LOCATION4) (LOCATION LOCATION5) (VEHICLE TRUCK0...
null
https://raw.githubusercontent.com/shop-planner/shop3/ba429cf91a575e88f28b7f0e89065de7b4d666a6/shop3/examples/UMT2/pfile1.lisp
lisp
facts initial states goals
(in-package :shop-user) (defproblem umt.pfile1 UM-TRANSLOG-2 ( (REGION REGION0) (CITY CITY0) (CITY CITY1) (LOCATION LOCATION0) (LOCATION LOCATION1) (LOCATION LOCATION2) (LOCATION LOCATION3) (LOCATION LOCATION4) (LOCATION LOCATION5) (VEHICLE TRUCK0) (VEHICLE TRUCK1) (VEH...
2cbb53321197dbe9ececabbafe6ef2322bf748618db524053086b116fd1eeb1e
patrikja/AFPcourse
ANSI.hs
-- | Some helper functions to form ANSI codes suitable for terminal -- output. module ANSI where data Colour = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White deriving (Eq,Show,Enum) ansiClearScreen :: String ansiClearScreen = "\ESC[2J" ansiGoto :: Int -> Int -> String ansiGoto x y = "\ESC[" ++ s...
null
https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L3/src/ANSI.hs
haskell
| Some helper functions to form ANSI codes suitable for terminal output.
module ANSI where data Colour = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White deriving (Eq,Show,Enum) ansiClearScreen :: String ansiClearScreen = "\ESC[2J" ansiGoto :: Int -> Int -> String ansiGoto x y = "\ESC[" ++ show y ++ ";" ++ show x ++ "H" ansiColour :: Colour -> String -> String ansiColou...
0936814ee4502ae4ebf9686ad4b7b05ebc86468b7bfb3f8fe5fa2030cda6b761
dalaing/little-languages
TestLanguage.hs
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable -} {-# LANGUAGE DeriveFoldable #-} # LANGUAGE DeriveFunctor #...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/modular/test-lang/src/TestLanguage.hs
haskell
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveTraversable # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE RankNTypes # (Maybe n) ( Show n ) => ( Eq n , Show n ) =>
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable -} # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleInstances # ...
45c79ffe6a8b772f0e43ba9eaf3eb3b9055386b4fc28bb30148f937c35133305
reborg/clojure-essential-reference
4.clj
< 1 > < 2 > (first output) ; <3> evaluating 1 1 < 4 > 1
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Sequences/OtherGenerators/lazy-seq/4.clj
clojure
<3>
< 1 > < 2 > evaluating 1 1 < 4 > 1
fc7deae6effeb757d9e91ac5dd166ba8fb25229a0b21196b48d4c42c715b1cca
kit-ty-kate/visitors
expr13double.ml
open Expr12 open Expr13 let double : expr -> expr = let v = object inherit [_] map method! visit_EConst _env k = EConst (2 * k) end in v # visit_'expr ()
null
https://raw.githubusercontent.com/kit-ty-kate/visitors/fc53cc486178781e0b1e581eced98e07facb7d29/test/expr13double.ml
ocaml
open Expr12 open Expr13 let double : expr -> expr = let v = object inherit [_] map method! visit_EConst _env k = EConst (2 * k) end in v # visit_'expr ()
1588917a7225be28bc98b95495378fd8e96c42b4dcc3b3816f23fae0a9af03a8
mvoidex/hsdev
Base.hs
module HsDev.Tools.Base ( runTool, runTool_, Result, ToolM, runWait, runWait_, tool, tool_, matchRx, splitRx, replaceRx, at, at_, module HsDev.Tools.Types ) where import Control.Monad.Except import Data.Array (assocs) import Data.List (unfoldr, intercalate) import Data.Maybe (fromMaybe) import Data.String imp...
null
https://raw.githubusercontent.com/mvoidex/hsdev/016646080a6859e4d9b4a1935fc1d732e388db1a/src/HsDev/Tools/Base.hs
haskell
| Run tool, throwing HsDevError on fail | Run command and wait for result | Run command with no input | Tool | Tool with no input
module HsDev.Tools.Base ( runTool, runTool_, Result, ToolM, runWait, runWait_, tool, tool_, matchRx, splitRx, replaceRx, at, at_, module HsDev.Tools.Types ) where import Control.Monad.Except import Data.Array (assocs) import Data.List (unfoldr, intercalate) import Data.Maybe (fromMaybe) import Data.String imp...