_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
32ef7ff6c255f129c3971cfe4eb268ba56ac9cb2c2c74180a1a766bb34294e71
greglook/cljstyle
version_test.clj
(ns cljstyle.task.version-test (:require [cljstyle.task.version :as version] [cljstyle.test-util :refer [suppress-task-exit capture-io]] [clojure.string :as str] [clojure.test :refer [use-fixtures deftest testing is]])) (use-fixtures :once suppress-task-exit) (deftest version-string (is (string?...
null
https://raw.githubusercontent.com/greglook/cljstyle/1f58e2e7af4c193aa77ad0695f6c2b9ac2c5c5ec/test/cljstyle/task/version_test.clj
clojure
(ns cljstyle.task.version-test (:require [cljstyle.task.version :as version] [cljstyle.test-util :refer [suppress-task-exit capture-io]] [clojure.string :as str] [clojure.test :refer [use-fixtures deftest testing is]])) (use-fixtures :once suppress-task-exit) (deftest version-string (is (string?...
a2a67591cd4a30279cdced596e9a5acf4acca2b95cf2a24f660032fe2701a684
janestreet/core
univ_map.ml
open! Base include Univ_map_intf module Uid = Type_equal.Id.Uid module Make1 (Key : Key) (Data : sig type ('s, 'a) t [@@deriving sexp_of] end) = struct A wrapper for the [ Key ] module that adds a dynamic check to [ Key.type_id ] . It 's a bug if the user - provided [ ...
null
https://raw.githubusercontent.com/janestreet/core/f382131ccdcb4a8cd21ebf9a49fa42dcf8183de6/univ_map/src/univ_map.ml
ocaml
test-friendly sexp conversion cannot raise -- see [invariant] Can't raise due to the invariant Can't raise due to the invariant
open! Base include Univ_map_intf module Uid = Type_equal.Id.Uid module Make1 (Key : Key) (Data : sig type ('s, 'a) t [@@deriving sexp_of] end) = struct A wrapper for the [ Key ] module that adds a dynamic check to [ Key.type_id ] . It 's a bug if the user - provided [ ...
08a8ccfb8502d42d086dd65ca09c26fc4d6a92d39d966b5366ddbc07548932c6
ml4tp/tcoq
taccoerce.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/ltac/taccoerce.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** includes idents known to be bound a...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Util open Names open Ter...
c644ac0cb71135da2972b90b29d94e3c2a093a0ccea8a6b68b4e5b54694f8431
greghendershott/pdb
meta-lang.rkt
#lang at-exp racket/base (require racket/format) (println @~a{bar})
null
https://raw.githubusercontent.com/greghendershott/pdb/dc236a23a0ad1103f3d83cf3b12df2cf16776569/example/meta-lang.rkt
racket
#lang at-exp racket/base (require racket/format) (println @~a{bar})
2e76ee2ac38420149c1c95b6050af294e9a3a7fd3b90e402d63389ae5d5978f4
spurious/sagittarius-scheme-mirror
ssh.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; rfc / ssh.scm - SSH2 protocol library . ;;; Copyright ( c ) 2010 - 2013 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/rfc/ssh.scm
scheme
coding : utf-8 ; -*- 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 of conditions and the following disclaime...
rfc / ssh.scm - SSH2 protocol library . Copyright ( c ) 2010 - 2013 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (l...
7f336a5f8514607e42bf23f6eaa3c9077ea8190195c0fe395e795420af867dbf
ocaml/odoc
odoc_examples.ml
(** Examples of the output from [odoc] *) (** These examples are intended to be viewed alongside the source code. See {:} *) module Expansion = Expansion module Resolution = Resolution module Wrapping = Wrapping module Markup = Markup
null
https://raw.githubusercontent.com/ocaml/odoc/37196b0066c0382619676cecd335d332b8cc9022/doc/examples/odoc_examples.ml
ocaml
* Examples of the output from [odoc] * These examples are intended to be viewed alongside the source code. See {:}
module Expansion = Expansion module Resolution = Resolution module Wrapping = Wrapping module Markup = Markup
f830a2fce607752cfb760ec8460d5c27338a5e371102260e5e5a47e5ff213130
mentat-collective/MathBox.cljs
field_lines.clj
^#:nextjournal.clerk {:toc true :no-cache true :visibility :hide-ns} (ns mathbox.examples.math.field-lines #_(:require [nextjournal.clerk :as clerk] [mentat.clerk-utils.show :refer [show-sci]])) ;; # Field Lines ;; // Number of samples on each 3D axis var SAMPLES = 10 ; ;; // Accuracy of integra...
null
https://raw.githubusercontent.com/mentat-collective/MathBox.cljs/281fc373ca2e2e05de7b789f0c1764ab5a66ea05/dev/mathbox/examples/math/field_lines.clj
clojure
# Field Lines // Number of samples on each 3D axis // Accuracy of integration steps // Jitter range // Maximum integration steps drawn var mathbox = MathBox.mathBox({ plugins: ["core", "controls", "cursor", "mathbox"], controls: { // Trackball controls, i.e. Free quaternion rotation klass: TH...
^#:nextjournal.clerk {:toc true :no-cache true :visibility :hide-ns} (ns mathbox.examples.math.field-lines #_(:require [nextjournal.clerk :as clerk] [mentat.clerk-utils.show :refer [show-sci]])) // Bootstrap MathBox speed : 1 , x : 0 , y : 0 , z : 0 , jitter : 1 , st...
15ab8ee0bc82f1d5f9141d49c7669fa0676048e18d1d41bbdce9fcb47309ab44
lachenmayer/arrowsmith
Canonicalize.hs
module Transform.Canonicalize (module') where import Control.Applicative ((<$>),(<*>)) import Control.Monad.Error (runErrorT, throwError) import Control.Monad.State (runState) import qualified Data.List as List import qualified Data.Map as Map import qualified Data.Set as Set import qualified Data.Traversable as T im...
null
https://raw.githubusercontent.com/lachenmayer/arrowsmith/34b6bdeddddb2d8b9c6f41002e87ec65ce8a701a/elm-compiler/src/Transform/Canonicalize.hs
haskell
| Split a list of values into categories so we can work with them independently.
module Transform.Canonicalize (module') where import Control.Applicative ((<$>),(<*>)) import Control.Monad.Error (runErrorT, throwError) import Control.Monad.State (runState) import qualified Data.List as List import qualified Data.Map as Map import qualified Data.Set as Set import qualified Data.Traversable as T im...
14673c0c6ec8423796fdf3ddf07d9215abbdb9c65957c7d7ea6e035ce1a93602
herd/herdtools7
memOrderOrAnnot.mli
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/lib/memOrderOrAnnot.mli
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2016 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
09c90460b5e90689c2c254e3480c02bfe7bb14a3e1760ca15fe4f309531e33e8
chenyukang/eopl
renaming.scm
(module renaming (lib "eopl.ss" "eopl") (require "lang.scm") (provide rename-in-iface fresh-module-name) (define rename-in-iface (lambda (m-type old new) (cases interface m-type (simple-iface (decls) (simple-iface (rename-in-decls decls old new))) ))) ;; ...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter8/abstract-types-lang/renaming.scm
scheme
this isn't a map because we have let* scoping in a list of declarations this can't appear in an input identifier
(module renaming (lib "eopl.ss" "eopl") (require "lang.scm") (provide rename-in-iface fresh-module-name) (define rename-in-iface (lambda (m-type old new) (cases interface m-type (simple-iface (decls) (simple-iface (rename-in-decls decls old new))) ))) (de...
d0ee5c8ac97c103b5916343bf0d6a56287f8edf43036f7b3f1b6abba9636d506
google-research/dex-lang
Linearize.hs
Copyright 2021 Google LLC -- -- Use of this source code is governed by a BSD-style -- license that can be found in the LICENSE file or at -- -source/licenses/bsd module Linearize (linearize, linearizeLam) where import Control.Category ((>>>)) import Control.Monad.Reader import Data.Foldable (toList) import Data.Fun...
null
https://raw.githubusercontent.com/google-research/dex-lang/a24a77143bd2863b7085439ff5472adb381d69c2/src/lib/Linearize.hs
haskell
Use of this source code is governed by a BSD-style license that can be found in the LICENSE file or at -source/licenses/bsd # SOURCE # === linearization monad === includes refs and regions TODO: maybe we shouldn't roll subst into this TODO: Be more precise here, such as checking whether the effects are themsel...
Copyright 2021 Google LLC module Linearize (linearize, linearizeLam) where import Control.Category ((>>>)) import Control.Monad.Reader import Data.Foldable (toList) import Data.Functor import Data.List (elemIndex) import Data.Maybe (catMaybes, isJust) import qualified Data.Set as S import GHC.Stack import Builder ...
72f37d347971249fa56a7cddecb1ce0965042e31fdf10c6c86bdffc33e46b60c
GaloisInc/jvm-verifier
Common.hs
| Module : Verinf . Symbolic . Common Description : License : BSD3 Stability : stable Point - of - contact : Module : Verinf.Symbolic.Common Description : License : BSD3 Stability : stable Point-of-contact : jhendrix -} {-# LANGUAGE DeriveD...
null
https://raw.githubusercontent.com/GaloisInc/jvm-verifier/3905dda18d0bdd5c595eef49804780f4a48c22f5/src/Verinf/Symbolic/Common.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveFunctor # # LANGUAGE PatternGuards # # LANGUAGE Rank2Types # # OPTIONS_GHC -O0 # ** Width expressions ** DagType expressions | Returns number of elements in bit vector with given size. | Make constant width expression...
| Module : Verinf . Symbolic . Common Description : License : BSD3 Stability : stable Point - of - contact : Module : Verinf.Symbolic.Common Description : License : BSD3 Stability : stable Point-of-contact : jhendrix -} # LANGUAGE Generaliz...
f037119a79d982b18586fcf2cbb8ca35831ed57d36b52dc3d10169fda093d612
NorfairKing/the-notes
Terms.hs
module Sets.Algebra.Difference.Terms where import Notes makeDefs [ "difference" ] makeThms [ "Symmetric difference in terms of union and intersection" , "Intersection over difference" ]
null
https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Sets/Algebra/Difference/Terms.hs
haskell
module Sets.Algebra.Difference.Terms where import Notes makeDefs [ "difference" ] makeThms [ "Symmetric difference in terms of union and intersection" , "Intersection over difference" ]
aa75716bc5f6410e87ae4d62be18ca8ab60a1d9228a09a2638093983b9a328d9
danfran/cabal-macosx
macosx-app.hs
module Main where import Distribution.MacOSX import Distribution.MacOSX.AppBuildInfo import System.Directory import System.Environment import System.FilePath main = do pname <- getProgName xs <- getArgs exe <- case xs of [x1] -> return x1 _ -> fail $ "Usage: " ++ pname ++ " <exe>" ...
null
https://raw.githubusercontent.com/danfran/cabal-macosx/6714a7018ddcd71efd96044bd55c0e19fb690939/macosx-app.hs
haskell
module Main where import Distribution.MacOSX import Distribution.MacOSX.AppBuildInfo import System.Directory import System.Environment import System.FilePath main = do pname <- getProgName xs <- getArgs exe <- case xs of [x1] -> return x1 _ -> fail $ "Usage: " ++ pname ++ " <exe>" ...
78294714e0033520de1f254a9ace1a58c0099d7f479fab11ba788a791a2f0097
roman01la/clojurescript-workshop
project.clj
(defproject calculator "0.1.0-SNAPSHOT" :description "FIXME: write this!" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :min-lein-version "2.7.1" :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.9.229"] [reagent "0....
null
https://raw.githubusercontent.com/roman01la/clojurescript-workshop/48b02266d65cae8113edd4ce34c4ab282ad256d1/16.re-frame/calculator/project.clj
clojure
(defproject calculator "0.1.0-SNAPSHOT" :description "FIXME: write this!" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :min-lein-version "2.7.1" :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.9.229"] [reagent "0....
506755c16d6b207a05c5692d43b983d7d28f4535bbebd4a716219a621b4a0185
Plutonomicon/pluto
Tokenize.hs
# LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module PlutusCore.Assembler.Tokenize ( tokenize , printToken , printBuiltin , printInfixBuiltin , escapeText , Token (..) , ErrorMessage (..) ) where import qualified Data.ByteString ...
null
https://raw.githubusercontent.com/Plutonomicon/pluto/aab7447040b0fe2c8bb79b5b3e87c9d23ac41683/src/PlutusCore/Assembler/Tokenize.hs
haskell
# LANGUAGE OverloadedStrings # infixBuiltin must come before force to deal with ambiguity byteStringLiteral must come before integerLiteral to deal with ambiguity var must come last in order to deal with ambiguity This parser consumes no input but resolves parsing ambiguity by not accepting the parse if the thing ...
# LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # module PlutusCore.Assembler.Tokenize ( tokenize , printToken , printBuiltin , printInfixBuiltin , escapeText , Token (..) , ErrorMessage (..) ) where import qualified Data.ByteString as BS import Data.Ei...
5b12cff8caa876a9cc1ae0b604ee83a473466ff05783aceea0b044af0bf8cb32
trskop/command-wrapper
Main.hs
-- | -- Module: Main Description : CommandWrapper subcommand for executing commands with a -- predefined environment. Copyright : ( c ) 2018 - 2020 License : BSD3 -- -- Maintainer: -- Stability: experimental Portability : GHC specific language extensions . -- CommandWrapper sub...
null
https://raw.githubusercontent.com/trskop/command-wrapper/4f2e2e1f63a3296ccfad9f216d75a708969890ed/command-wrapper/app-exec/Main.hs
haskell
| Module: Main predefined environment. Maintainer: Stability: experimental environment. Basically more advanced aliases. Most of the features should Get rid of dependency on turtle, use process. TODO: Defaults for: - Notifications - Command line completion defaults | Empty 'Config' us...
Description : CommandWrapper subcommand for executing commands with a Copyright : ( c ) 2018 - 2020 License : BSD3 Portability : GHC specific language extensions . CommandWrapper subcommand for executing commands with a predefined come from using Dhall . module Main (main) where import Prelude ...
adeef786cefe150de147e6cea09ecc55e071c9d452baa463e1138ecf39790ffe
lehins/massiv
Unsafe.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ExplicitForAll #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # -- | -- Module : Data.Massiv.Array.Unsafe Copyright : ( c ) 2018 - 2022 -- License : BSD3 Maintainer : < > -- Stability : experimental -...
null
https://raw.githubusercontent.com/lehins/massiv/c8aaf29d02eab535f13aa03949fca58fce6d6384/massiv/src/Data/Massiv/Array/Unsafe.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE ExplicitForAll # | Module : Data.Massiv.Array.Unsafe License : BSD3 Stability : experimental Portability : non-portable * Creation * Indexing * Manipulations * Slicing * Mutable interface ** Read ** Write ** Modify ** Swap ** Range modification ** Resizing...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # Copyright : ( c ) 2018 - 2022 Maintainer : < > module Data.Massiv.Array.Unsafe ( unsafeMakeLoadArray, unsafeMakeLoadArrayAdjusted, Sz (SafeSz), Stride (SafeStride), unsafeIndex, unsafePrefIndex, ...
c63a895e182b02a4215c8544f97810c218286ac62f1398043f05146577b0bc91
static-analysis-engineering/codehawk
jCHBasicTypes.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) ...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchlib/jCHBasicTypes.mli
ocaml
chutil jchlib
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) ...
47b6513d6a3d6b3c308e904a2fc23f9c36fc2a091b7e3e02bd8e04733651f12b
racket/redex
lw-test-util.rkt
#lang racket/base (require redex/private/loc-wrapper) (provide normalize-lw) (define (normalize-lw lw) (define-values (min-line min-column) (find-min-line/col lw)) (define (normalize/lw lw) (cond [(lw? lw) (make-lw (normalize/e (lw-e lw)) (- (lw-line lw) min-line) ...
null
https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-test/redex/tests/private/lw-test-util.rkt
racket
#lang racket/base (require redex/private/loc-wrapper) (provide normalize-lw) (define (normalize-lw lw) (define-values (min-line min-column) (find-min-line/col lw)) (define (normalize/lw lw) (cond [(lw? lw) (make-lw (normalize/e (lw-e lw)) (- (lw-line lw) min-line) ...
57997ebc6392806238a2222c2834a9628e377ad32b34858e7d7d8f1f2e12603a
DavidAlphaFox/RabbitMQ
rabbit_mgmt_wm_consumers.erl
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in %% compliance with the License. You may obtain a copy of the License at %% / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITH...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_consumers.erl
erlang
compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. --------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ Management Plugin . The Initial Developer of the Original Code...
838ffe657832fc007a7a11a32bac2a175d797c89e91ca80dd0b9bf2429c3f846
facebook/flow
fix_statement.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/53cb368aa41e73ef16ebabe62c6b693606116857/src/typing/fix_statement.ml
ocaml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
4a446510b2fd2387e21c38ebe70e202479892fba53d6e2d0eb725ab659455a68
owickstrom/gi-gtk-declarative
TestUtils.hs
module GI.Gtk.Declarative.TestUtils where import Control.Concurrent import Control.Monad.IO.Class import qualified GI.GLib.Constants as GLib import qualified GI.Gdk as Gdk import GI.Gtk.Declarative import GI.Gtk.Declarative.State runUI :: Mona...
null
https://raw.githubusercontent.com/owickstrom/gi-gtk-declarative/205351a54698be7b583dd34d189a89470ee2b11b/gi-gtk-declarative/test/GI/Gtk/Declarative/TestUtils.hs
haskell
module GI.Gtk.Declarative.TestUtils where import Control.Concurrent import Control.Monad.IO.Class import qualified GI.GLib.Constants as GLib import qualified GI.Gdk as Gdk import GI.Gtk.Declarative import GI.Gtk.Declarative.State runUI :: Mona...
ce28d44c75466b400f6b56c9f41cea334e68e38d5620c7c584a152135b4de088
nrnrnr/qc--
one01Nbe.ml
open One01Syntax open Syntax module M = One01Trees.M module T = Tdpe module C = T.Ctrl let amode_C = fun () -> (T.RR ((fun t -> (match t with | M.Short -> (XTRA (T__amode Short)) | M.Hword -> (XTRA (T__amode Hword)) | M.Word -> (XTRA (T__amode Word)) | M.Dword -> (XTRA (...
null
https://raw.githubusercontent.com/nrnrnr/qc--/ec56191b669729e7ce8181a2bd97a912842ea716/tdpe/one01Nbe.ml
ocaml
open One01Syntax open Syntax module M = One01Trees.M module T = Tdpe module C = T.Ctrl let amode_C = fun () -> (T.RR ((fun t -> (match t with | M.Short -> (XTRA (T__amode Short)) | M.Hword -> (XTRA (T__amode Hword)) | M.Word -> (XTRA (T__amode Word)) | M.Dword -> (XTRA (...
c218c6482591f69675921d0d55bddc9a9b10f81f3449fb9369f703baeb224e0c
clojure/algo.generic
generic.clj
;; Support code for generic interfaces by Copyright ( c ) , 2009 - 2011 . 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 so...
null
https://raw.githubusercontent.com/clojure/algo.generic/48f3894155abbc14835213281d01355af683b47a/src/main/clojure/clojure/algo/generic.clj
clojure
Support code for generic interfaces 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 any other, from this software. A...
by Copyright ( c ) , 2009 - 2011 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns ^{:author "Konrad Hinsen" :skip-wiki true :doc "Generic interfaces This library provides generic interfaces in the form of multimethod...
525bd9ae41fcc3c59695654b4f67348b2712544f8c138ce0ae4e2fa4e6a3c616
kupl/FixML
sub4.ml
let rec iter (n, f) = if n = 0 then (fun x -> x) else (fun x -> iter (n - 1, f) x)
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/iter/iter/submissions/sub4.ml
ocaml
let rec iter (n, f) = if n = 0 then (fun x -> x) else (fun x -> iter (n - 1, f) x)
c0db028260f5f21cf79e37fa507a56590815f93967e23b594304881663d01051
default-kramer/plisqin
info.rkt
#lang info (define collection "plisqin") (define deps '("base" "db-lib" "plisqin-lib")) (define implies '("plisqin-lib")) (define build-deps '("plisqin-lib" "scribble-lib" "racket-doc" "rackunit-lib" "sandbox-lib")) ;(define scribblings '(("scribblings/plisqin.scrbl" (multi-page)))) (define pkg-desc "SQL Generator") (d...
null
https://raw.githubusercontent.com/default-kramer/plisqin/26421c7c42656c873c4e0a4fc7f48c0a3ed7770f/plisqin/info.rkt
racket
(define scribblings '(("scribblings/plisqin.scrbl" (multi-page))))
#lang info (define collection "plisqin") (define deps '("base" "db-lib" "plisqin-lib")) (define implies '("plisqin-lib")) (define build-deps '("plisqin-lib" "scribble-lib" "racket-doc" "rackunit-lib" "sandbox-lib")) (define pkg-desc "SQL Generator") (define version "0.3") (define pkg-authors '(|Ryan Kramer|))
8d60ee6bb60af9bcb52fa5fe0096a36961f4d384ae1e47de7bf23aa4b8718be9
smallmelon/sdzmmo
pp_rank.erl
%%%------------------------------------ %%% @Module : pp_rank @Author : huangyongxing %%% @Email : @Created : 2010.07.22 %%% @Description: 排行榜处理 %%%------------------------------------ -module(pp_rank). -export([handle/3]). -include("common.hrl"). -include("record.hrl"). handle(22001, PlayerS...
null
https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/pp/pp_rank.erl
erlang
------------------------------------ @Module : pp_rank @Email : @Description: 排行榜处理 ------------------------------------ 查询装备排名
@Author : huangyongxing @Created : 2010.07.22 -module(pp_rank). -export([handle/3]). -include("common.hrl"). -include("record.hrl"). handle(22001, PlayerStatus, [Realm, Career, Type]) -> RankInfo = lib_rank:get_role_rank(Realm, Career, Type), {ok, BinData} = pt_22:write(22001, RankInfo), li...
0db73bb1e00b7c072b358c4ee34c4a2e8675c932a0b44edb910f5aaf6065c543
footprintanalytics/footprint-web
values.clj
(ns metabase.driver.common.parameters.values "These functions build a map of information about the types and values of the params used in a query. (These functions don't parse the query itself, but instead look at the values of `:template-tags` and `:parameters` passed along with the query.) (query->params-m...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/driver/common/parameters/values.clj
clojure
various schemas are used to check that various functions return things in expected formats Since 'FieldFilter' are considered their own `:type` (confusingly enough, called `:dimension`), to *actually* store for other types of params FieldFilter Params (Field Filters) (e.g. WHERE {{x}}) remove `:target` which is n...
(ns metabase.driver.common.parameters.values "These functions build a map of information about the types and values of the params used in a query. (These functions don't parse the query itself, but instead look at the values of `:template-tags` and `:parameters` passed along with the query.) (query->params-m...
374defafc8172425ffe251747746eab377cdcd42c7ef1de42bb148a23524944e
thi-ng/geom
rings.clj
(ns thi.ng.geom.examples.svg.rings (:require [thi.ng.geom.core :as g] [thi.ng.geom.vector :refer [vec3]] [thi.ng.geom.matrix :as mat] [thi.ng.geom.circle :as c] [thi.ng.geom.polygon :as p] [thi.ng.geom.gmesh :as gm] [thi.ng.geom.mesh.subdivision :as sd] [thi.ng.geom.svg.core :as svg] [thi.n...
null
https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/examples/svg/rings.clj
clojure
2d text label w/ projected anchor point
(ns thi.ng.geom.examples.svg.rings (:require [thi.ng.geom.core :as g] [thi.ng.geom.vector :refer [vec3]] [thi.ng.geom.matrix :as mat] [thi.ng.geom.circle :as c] [thi.ng.geom.polygon :as p] [thi.ng.geom.gmesh :as gm] [thi.ng.geom.mesh.subdivision :as sd] [thi.ng.geom.svg.core :as svg] [thi.n...
9e744eba5d341365b4b2071c82ceea6826deaabf66e11d66f08cf328bc1b2bfb
meta-ex/ignite
tanimoto.clj
(ns meta-ex.tanimoto (:use [overtone.live] [overtone.synth.sampled-piano]) (:require [overtone.helpers.ref :as r])) (defn leszek-distribution [x centre width] (Math/pow (Math/E) (/ (* -1 (- x centre) (- x centre)) (* width width)))) (defonce width (atom 1)) (def min-note 20) (d...
null
https://raw.githubusercontent.com/meta-ex/ignite/b9b1ed7ae2fa01d017c23febabb714a6389a98dd/src/meta_ex/tanimoto.clj
clojure
(foo (:note m) (:velocity-f m))
(ns meta-ex.tanimoto (:use [overtone.live] [overtone.synth.sampled-piano]) (:require [overtone.helpers.ref :as r])) (defn leszek-distribution [x centre width] (Math/pow (Math/E) (/ (* -1 (- x centre) (- x centre)) (* width width)))) (defonce width (atom 1)) (def min-note 20) (d...
a1f6e17329bb409a5e71c98a9fb4d336f4baa2a2045dd08592e8c925ee209a3f
DHSProgram/DHS-Indicators-SPSS
RH_DEL.sps
* Encoding: windows-1252. ****************************************************************************************************** Program: RH_DEL.sps Purpose: Code Delivery Care indicators Data inputs: BR dataset Data outputs: coded variables Author: Courtney Allen and translated to SPSS by Ivana Bjelic Date...
null
https://raw.githubusercontent.com/DHSProgram/DHS-Indicators-SPSS/4613e23f530c46b1aa468113db802c5ab9be6b2f/Chap09_RH/RH_DEL.sps
scheme
* Encoding: windows-1252. ****************************************************************************************************** Program: RH_DEL.sps Purpose: Code Delivery Care indicators Data inputs: BR dataset Data outputs: coded variables Author: Courtney Allen and translated to SPSS by Ivana Bjelic Date...
1d5b254ef283596cc977785cfcb595764adc72f486ce2ff32c192303ac3b25b5
Concordium/concordium-client
TransactionStatus.hs
module Concordium.Client.TransactionStatus where import Data.Aeson import Data.Aeson.Types (parseEither, Pair) import Control.Monad.IO.Class import qualified Data.Text as Text import qualified Data.HashMap.Strict as HM import Concordium.Types.Execution import Concordium.Types import Concordium.Client.GRPC import Con...
null
https://raw.githubusercontent.com/Concordium/concordium-client/1ca77dc1c0571475cf06083e9f59fa03b99235d1/src/Concordium/Client/TransactionStatus.hs
haskell
credential deployment
module Concordium.Client.TransactionStatus where import Data.Aeson import Data.Aeson.Types (parseEither, Pair) import Control.Monad.IO.Class import qualified Data.Text as Text import qualified Data.HashMap.Strict as HM import Concordium.Types.Execution import Concordium.Types import Concordium.Client.GRPC import Con...
e133526802846191447f01a71cae9fbb502ced6b6c7e9bd95b5a7559545bc0bd
ocaml-multicore/tezos
RPC.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2022 Nomadic Labs , < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/bin_sc_rollup_client/RPC.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2022 Nomadic Labs , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
942a3aff38bbf150382f7c27983d6537496598d542fa54f70d622d1d41c987a0
tarides/ocaml-platform-installer
sandbox_compiler_package.mli
val with_sandbox_compiler_repo : Opam.GlobalOpts.t -> string -> (string -> ('a, ([> `Msg of string ] as 'e)) result) -> ('a, 'e) result * [ with_sandbox_compiler_repo opam_opts ocaml_version f ] creates a temporary repo containing a patched version of ] working well with the sandbox switch . The...
null
https://raw.githubusercontent.com/tarides/ocaml-platform-installer/92274128d639d8a1e1493e86206c8975f2a805e6/src/lib/sandbox_compiler_package.mli
ocaml
val with_sandbox_compiler_repo : Opam.GlobalOpts.t -> string -> (string -> ('a, ([> `Msg of string ] as 'e)) result) -> ('a, 'e) result * [ with_sandbox_compiler_repo opam_opts ocaml_version f ] creates a temporary repo containing a patched version of ] working well with the sandbox switch . The...
ae3fddbdff3d289fbdae90250d1734caef6c88d80989072ae7e285e2617b2b3d
yallop/ocaml-ctypes
types.ml
* Copyright ( c ) 2014 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2014 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) open Ctypes module Struct_st...
null
https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/tests/test-constants/stubs/types.ml
ocaml
* Copyright ( c ) 2014 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2014 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) open Ctypes module Struct_st...
48f1e0a8cc0da86ee89a7de34d7b80be34b1dab9655bcd2db59c1154b98c34a0
rbkmoney/hellgate
hg_invoice_payment_chargeback.erl
-module(hg_invoice_payment_chargeback). -include_lib("hellgate/include/domain.hrl"). -include_lib("hellgate/include/payment_events.hrl"). -include_lib("damsel/include/dmsl_payment_processing_thrift.hrl"). -export( [ create/2, cancel/2, reject/3, accept/3, reopen/3 ] )....
null
https://raw.githubusercontent.com/rbkmoney/hellgate/ae720132a87d029698c4bd385650c1d9e6e2a1eb/apps/hellgate/src/hg_invoice_payment_chargeback.erl
erlang
---------------------------------------------------------------------------- @doc create/2 creates a chargeback. A chargeback will not be created if another one is already pending, and it will block refunds from being created as well. Key parameters: levy: the amount of cash to be levied from the merchant. ...
-module(hg_invoice_payment_chargeback). -include_lib("hellgate/include/domain.hrl"). -include_lib("hellgate/include/payment_events.hrl"). -include_lib("damsel/include/dmsl_payment_processing_thrift.hrl"). -export( [ create/2, cancel/2, reject/3, accept/3, reopen/3 ] )....
bc38e67c5fffad1738335359c96981b91cf137dafd39a4c20a976d66d6cd98d9
parapluu/Concuerror
concuerror_options.erl
%%% @doc Concuerror 's options module %%% %%% The `_option()' functions listed on this page all correspond to %%% valid configuration options. %%% %%% For general documentation go to the Overview page. %%% %%% == Table of Contents == %%% %%% <ul> %%% <li>{@section Help}</li> %%% <li>{@section Options}</li> %%% <li>{@...
null
https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/src/concuerror_options.erl
erlang
@doc The `_option()' functions listed on this page all correspond to valid configuration options. For general documentation go to the Overview page. == Table of Contents == <ul> <li>{@section Help}</li> <li>{@section Options}</li> <li>{@section Standard Error Printout}</li> <li>{@section Report File}</li>...
Concuerror 's options module If you invoke without an argument , ` --help ' is assumed < li > All options have a long name.</li > boolean ( ) } options in the command line you can omit ` true ' or 1 to pass options to Concuerror : Each option is associated with one or more ( this makes invocation via com...
4f3f489bd5706af675ecb74191661c154f1298ce014afa0b38059632046d72f2
sellout/haskerwaul
Test.hs
import Data.Functor (fmap) import Hedgehog import qualified Hedgehog.Internal.Property as Hedgehog import Hedgehog.Main import Prelude (concat, (.), ($)) import System.IO import Test.Set main :: IO () main = defaultMain . fmap (checkParallel . freelyDiscard) $ concat -- Add category groups here. [ setPro...
null
https://raw.githubusercontent.com/sellout/haskerwaul/b32ecdb141a5f9cca04ed85dc952028242c160a8/test/Test.hs
haskell
Add category groups here. | The only way (I think) to have generators for initial objects (e.g., `Data.Void.Void`) is to have them `Gen.discard`. Since we do a lot of stuff with binary tensors and units, this means we'll fail a lot of properties with the default discard limit. So we bump it here for all of ou...
import Data.Functor (fmap) import Hedgehog import qualified Hedgehog.Internal.Property as Hedgehog import Hedgehog.Main import Prelude (concat, (.), ($)) import System.IO import Test.Set main :: IO () main = defaultMain . fmap (checkParallel . freelyDiscard) $ concat [ setProperties ] freelyDiscard :: ...
c9c479c0813a2d5cc0f3b82d601c04e527117026cc038e1361eb17609e94435a
footprintanalytics/footprint-web
jdbc_protocols.clj
(ns metabase.db.jdbc-protocols "Implementations of `clojure.java.jdbc` protocols for the Metabase application database. These handle type mappings for setting parameters and for reading results from the DB — mainly by automatically converting CLOBs to Strings and using new `java.time` classes." (:require [cloju...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/db/jdbc_protocols.clj
clojure
Regardless of session timezone it seems to be the case that OffsetDateTimes get normalized to UTC inside MySQL Since MySQL TIMESTAMPs aren't timezone-aware this means comparisons are done between timestamps in the report timezone and the local datetime portion of the parameter, in UTC. Bad! Convert it to a LocalD...
(ns metabase.db.jdbc-protocols "Implementations of `clojure.java.jdbc` protocols for the Metabase application database. These handle type mappings for setting parameters and for reading results from the DB — mainly by automatically converting CLOBs to Strings and using new `java.time` classes." (:require [cloju...
3675d5534bfde48869404fa041f980478a49bffd81c98def48966c49214791b8
owickstrom/idris-vimscript
Render.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} module Vimscript.Render where import Prelude hiding (Ordering (..)) import Text.PrettyPrint.Mainland import Vimscript.AST indentWidth :: Int indentWidth = 4 renderName :: Name -> Doc renderName (Name ...
null
https://raw.githubusercontent.com/owickstrom/idris-vimscript/4abf8e8317c2fae942df45985651ab9448f0c23c/codegen/src/Vimscript/Render.hs
haskell
# LANGUAGE OverloadedStrings # Will this hold?!
# LANGUAGE LambdaCase # module Vimscript.Render where import Prelude hiding (Ordering (..)) import Text.PrettyPrint.Mainland import Vimscript.AST indentWidth :: Int indentWidth = 4 renderName :: Name -> Doc renderName (Name n) = strictText n renderScopedName...
84da78c505ea4a1be74992cdcaddb554d8b093e788b9d8f8cc347240a0ca11b4
binsec/binsec
x86decoder.mli
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2022 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/disasm/x86/x86decoder.mli
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2022 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
accf4b50cc7e145eba7fa15d4d7c1927e0634375476c792103e02114532c7390
charlescearl/DeepRacket
cudnn-dropout.rkt
#lang typed/racket (require "cudnn-tensor.rkt") (require "cuda-api.rkt") ; for get-pointer (require "cudnn-api.rkt") (require "mem-utils.rkt") (require "ffi-functional.rkt") ;;;The dropout object (struct cudnn-dropout ([desc : CPointer] [state-size : Integer] [states : CPointer] [dropout-factor : Flonum] ...
null
https://raw.githubusercontent.com/charlescearl/DeepRacket/767560aab5c56c03e951e005b5b983b435afe7eb/cudnn-dropout.rkt
racket
for get-pointer The dropout object
#lang typed/racket (require "cudnn-tensor.rkt") (require "cudnn-api.rkt") (require "mem-utils.rkt") (require "ffi-functional.rkt") (struct cudnn-dropout ([desc : CPointer] [state-size : Integer] [states : CPointer] [dropout-factor : Flonum] )) (define (make-dropout [handle : CPointer] [dropout : Flonum...
3e3f9dbacce794bfab83897647a01a7865de71e2bb6781c33003b1b7371fc421
aaltodsg/instans
json-functions.lisp
;;; -*- Mode: Lisp -*- (in-package #:instans) ( - results - to - json ( instans query - results & key ( stream * standard - output * ) & allow - other - keys ) ( declare ( ignorable ) ) ;; (flet ((sparql-var-json-name (var) ;; (let ((name (string-downcase (string (uniquely-named-object-name var))))) ...
null
https://raw.githubusercontent.com/aaltodsg/instans/5ffc90e733e76ab911165f205ba57a7b3b200945/src/rete/json-functions.lisp
lisp
-*- Mode: Lisp -*- (flet ((sparql-var-json-name (var) (let ((name (string-downcase (string (uniquely-named-object-name var))))) (loop for var in (sparql-query-results-variables query-results) (cond ((slot-boundp query-results 'results) (loop for result in (sparql-query-results-results query-resu...
(in-package #:instans) ( - results - to - json ( instans query - results & key ( stream * standard - output * ) & allow - other - keys ) ( declare ( ignorable ) ) ( if ( or ( char= ( char name 0 ) # \ ? ) ( char= ( char name 0 ) # \$ ) ) ( subseq name 1 ) name ) ) ) ) ( : with - output ( str...
3db0d1c4c2357d6fb5f22cf02660a8d24a3a1e72ac2bd36d3bd633fa92cd3e93
Zilliqa/scilla
util.mli
This file is part of scilla . Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd. scilla 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 ...
null
https://raw.githubusercontent.com/Zilliqa/scilla/35af3814eace7c722ad966f0e2eee07d59d5a8af/src/server/util.mli
ocaml
* Helper function similar to [Exn.protect], except that it re-raises exceptions.
This file is part of scilla . Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd. scilla 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 ...
6861e7f53d70378dd83f0fde2033268de893f846e22beb3c523b2dab23fc9e3a
tek/polysemy-hasql
ColumnOptions.hs
module Polysemy.Hasql.Table.ColumnOptions where import Polysemy.Db.Data.Rep (Rep) import Prelude hiding (Enum) import Polysemy.Db.Data.Rep (Auto, ForeignKey, PrimaryKey, Unique) import Polysemy.Db.Data.ColumnOptions (ColumnOptions(..)) class ExplicitColumnOptions (r :: Type) where explicitColumnOptions :: ColumnOp...
null
https://raw.githubusercontent.com/tek/polysemy-hasql/1ede8aa0442a11450c8f66d3443b1775944494e9/packages/hasql/lib/Polysemy/Hasql/Table/ColumnOptions.hs
haskell
module Polysemy.Hasql.Table.ColumnOptions where import Polysemy.Db.Data.Rep (Rep) import Prelude hiding (Enum) import Polysemy.Db.Data.Rep (Auto, ForeignKey, PrimaryKey, Unique) import Polysemy.Db.Data.ColumnOptions (ColumnOptions(..)) class ExplicitColumnOptions (r :: Type) where explicitColumnOptions :: ColumnOp...
9869a8f02e8f17e1fd40d1379963eda202b4f51f4fb8b2c14aeaab4d7ad6a719
tfausak/exercism-solutions
Robot.hs
module Robot (mkRobot, resetName, robotName) where import Control.Concurrent.STM (TVar, atomically, newTVar, readTVar, writeTVar) import Control.Monad (liftM) import System.Random (randomRIO) newtype Robot = Robot (TVar String) mkName :: IO String mkName = mapM randomRIO pattern where pattern = [letter, letter, nu...
null
https://raw.githubusercontent.com/tfausak/exercism-solutions/5e6f93979cc61ef5e3b48a09ca316dfd7fcd319c/haskell/robot-name/Robot.hs
haskell
module Robot (mkRobot, resetName, robotName) where import Control.Concurrent.STM (TVar, atomically, newTVar, readTVar, writeTVar) import Control.Monad (liftM) import System.Random (randomRIO) newtype Robot = Robot (TVar String) mkName :: IO String mkName = mapM randomRIO pattern where pattern = [letter, letter, nu...
7dc8bb261a505f092230b51a7624432b848557f79db136463b6aea851fe62b59
dyzsr/ocaml-selectml
mtype.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/typing/mtype.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Asttypes open Path open Types let rec scrape_lazy env mty = let open Subst.Lazy in match mty w...
95050260c0ffdd3c5478373a6fdf5301bc58c502f4057e3c287bd28bd6294758
haskoin/haskoin-core
Util.hs
# LANGUAGE ExistentialQuantification # {-# LANGUAGE OverloadedStrings #-} | Module : Haskoin . Test . Util Copyright : No rights reserved License : MIT Maintainer : Stability : experimental Portability : POSIX Module : Haskoin.Test.Util Copyright : No rights reserved License ...
null
https://raw.githubusercontent.com/haskoin/haskoin-core/2a13ee8be20d7cd3646bb73dc5da4beeaf409ee2/src/Haskoin/Util/Arbitrary/Util.hs
haskell
# LANGUAGE OverloadedStrings # | Arbitrary 'ShortByteString'. | Arbitrary non-empty 'ShortByteString' | Arbitrary 'ShortByteString' of a given length | Generate a Maybe from a Gen a | Generate an Network Helpers for creating Serial and JSON Identity tests | Generate binary identity tests | Generate Read/Show id...
# LANGUAGE ExistentialQuantification # | Module : Haskoin . Test . Util Copyright : No rights reserved License : MIT Maintainer : Stability : experimental Portability : POSIX Module : Haskoin.Test.Util Copyright : No rights reserved License : MIT Maintainer : Stability ...
f316d6dbead7670a79ed314cf31cc68df0f4e0c14cb5279bf2a39ae846959ca2
reasonml-old/bs-containers
bchar.mli
(* This file is free software, part of containers. See file "license" for more details. *) (** {1 Utils around char} *) (*-- Start stdlib char, from --*) external code : char -> int = "%identity" (** Return the ASCII code of the argument. *) val chr : int -> char (** Return the character with the given ASCII code....
null
https://raw.githubusercontent.com/reasonml-old/bs-containers/dfd1360dc74ede57c09e9f9d837ce59285af6fd2/src/types/bchar.mli
ocaml
This file is free software, part of containers. See file "license" for more details. * {1 Utils around char} -- Start stdlib char, from -- * Return the ASCII code of the argument. * Return the character with the given ASCII code. Raise [Invalid_argument "Char.chr"] if the argument is outside the range 0--2...
external code : char -> int = "%identity" val chr : int -> char val escaped : char -> string val lowercase : char -> char val uppercase : char -> char type t = char include Comparable.S with type t := t val lowerCaseIfAscii : t -> t val upperCaseIfAscii : t -> t val fromIntOrRaise : int -> t * to { ! Char...
92d2745349386a9bc502627e0c8d943af6a60b306cbe887c27d18efac18cb35d
NetComposer/nkdocker
nkdocker_server.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2016 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the...
null
https://raw.githubusercontent.com/NetComposer/nkdocker/1cdb22beaa4bad5eded3ebddd6256caa062c8a97/src/nkdocker_server.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2016 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(nkdocker_server). -a...
e2a26e4529f9929ed7d439ce7013825a0519b286bc8defe1c554550f459279d3
spartango/CS153
fishyacc_test.ml
open Test_framework open Fishyacc_helpers open Parsing open Str open Eval open Ast (* Assumes all test files in test *) let mk_file_test (file: string) (expected: int) = mk_verbose_expect_test (fun () -> (eval (parse_code ("test/" ^ file)))) expected string_of_int ("Testing program in " ^ file) let mk_par...
null
https://raw.githubusercontent.com/spartango/CS153/16faf133889f1b287cb95c1ea1245d76c1d8db49/ps1/fishyacc_test.ml
ocaml
Assumes all test files in test
open Test_framework open Fishyacc_helpers open Parsing open Str open Eval open Ast let mk_file_test (file: string) (expected: int) = mk_verbose_expect_test (fun () -> (eval (parse_code ("test/" ^ file)))) expected string_of_int ("Testing program in " ^ file) let mk_parse_test (file: string) = let labe...
3a13e027803d645842110b876048a7964b4383cc0a24cfb05a2a0779c1676308
keechma/keechma-toolbox
ui.cljs
(ns keechma.toolbox.forms.ui (:require [keechma.ui-component :as ui] [keechma.toolbox.forms.core :as forms-core] [forms.util :as keechma-forms-util :refer [key-to-path]] [forms.core :as keechma-forms-core])) (def no-immediate-validation :keechma.toolbox.forms.core/no-immediate-val...
null
https://raw.githubusercontent.com/keechma/keechma-toolbox/61bf68cbffc1540b56b7b1925fef5e0aa12d60e7/src/cljs/keechma/toolbox/forms/ui.cljs
clojure
(ns keechma.toolbox.forms.ui (:require [keechma.ui-component :as ui] [keechma.toolbox.forms.core :as forms-core] [forms.util :as keechma-forms-util :refer [key-to-path]] [forms.core :as keechma-forms-core])) (def no-immediate-validation :keechma.toolbox.forms.core/no-immediate-val...
7495005c2509453096c5e3999b7c29c64671d0d8811aab863962c0c3e11b0a0d
Helium4Haskell/helium
EnumFromTo2.hs
module EnumFromTo2 where main :: [Int] main = list where list :: [Int] list = take 20 [8,10..]
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/correct/EnumFromTo2.hs
haskell
module EnumFromTo2 where main :: [Int] main = list where list :: [Int] list = take 20 [8,10..]
8543b893269c8cca6859641bd9cbd2de6c6f092102e8a6e7f957b2c91f252ca7
bmeurer/ocamljit2
predef.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/typing/predef.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ Id$ open Asttypes open Path open ...
a97862acab15df6c553f40772f614a5aee10880eb597851f94a44be336b3ded5
technomancy/leiningen
project.clj
(defproject custom/args "0.0.1-SNAPSHOT" :description "A test project" :dependencies [[org.clojure/clojure "1.8.0"]] :profiles {:no-op {} :ascii {:jvm-opts ["-Dfile.encoding=ASCII"]}})
null
https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/test_projects/jvm-opts/project.clj
clojure
(defproject custom/args "0.0.1-SNAPSHOT" :description "A test project" :dependencies [[org.clojure/clojure "1.8.0"]] :profiles {:no-op {} :ascii {:jvm-opts ["-Dfile.encoding=ASCII"]}})
bc1c4e9fec1d88ae7a3a26edb594879643e5050429e82bfd93fcc43aad952981
jamesmacaulay/shopify-clj
names.clj
(ns shopify.resources.names "A few functions to help with resource type names." (:require [clojure.string :as str] [shopify.util :as util])) (defn collection-name "Converts resource keywords to their plural forms, unless it's a singleton resource (e.g. `:shop`)." [resource] (let [resource (util/d...
null
https://raw.githubusercontent.com/jamesmacaulay/shopify-clj/dcac775d260e4a7f4d54e0fd2aa84f74c864e338/src/shopify/resources/names.clj
clojure
(ns shopify.resources.names "A few functions to help with resource type names." (:require [clojure.string :as str] [shopify.util :as util])) (defn collection-name "Converts resource keywords to their plural forms, unless it's a singleton resource (e.g. `:shop`)." [resource] (let [resource (util/d...
72c352642c48036c05e9dec45525281beeecc8a090d2b012fd0474015f6b1ff9
panglesd/hockmd
utils.mli
module Result_syntax : sig val ( let* ) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result val ( let+ ) : ('a, 'b) result -> ('a -> 'c) -> ('c, 'b) result end module Combined_syntax : sig val ( let++ ) : ('a, 'b) result Lwt.t -> ('a -> 'c) -> ('c, 'b) result Lwt.t val ( let** ) : ('a, 'b) res...
null
https://raw.githubusercontent.com/panglesd/hockmd/b72338deea94b6f623e172063180029c162a0a30/src/utils.mli
ocaml
module Result_syntax : sig val ( let* ) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result val ( let+ ) : ('a, 'b) result -> ('a -> 'c) -> ('c, 'b) result end module Combined_syntax : sig val ( let++ ) : ('a, 'b) result Lwt.t -> ('a -> 'c) -> ('c, 'b) result Lwt.t val ( let** ) : ('a, 'b) res...
d5bdd0a461bc68e8c641c8995a12da0a0d2be672c984833b91ca47e9becdafbe
RefactoringTools/HaRe
PrettyEnv.hs
module PrettyEnv where newtype DocM a = DocM (PPHsMode -> a) instance Functor DocM where fmap f (DocM d) = DocM (f.d) instance Monad DocM where return = DocM . const DocM d1>>=xd2 = DocM $ \ e -> let DocM d2 = xd2 (d1 e) in d2 e runEnv = flip unDocM unDocM (DocM f) = f getPPEnv = DocM id -- Layout environment ...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/base/pretty/PrettyEnv.hs
haskell
Layout environment to pass around classical layout classical layout made explicit: { d ; d ; d } ; d ; d } everything on a single line class, instance indent level do notation indent level else inside do indent level case expression indent level let indent level data and type inde...
module PrettyEnv where newtype DocM a = DocM (PPHsMode -> a) instance Functor DocM where fmap f (DocM d) = DocM (f.d) instance Monad DocM where return = DocM . const DocM d1>>=xd2 = DocM $ \ e -> let DocM d2 = xd2 (d1 e) in d2 e runEnv = flip unDocM unDocM (DocM f) = f getPPEnv = DocM id data PPLayout Utrec...
12d814012bbe6749b4716e58271029855f3ee08c5e27d8ac682c23e158431b39
chef/chef-server
chef_s3_tests.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*- %% ex: ts=4 sw=4 et @author < > @author < > Copyright Chef Software , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file excep...
null
https://raw.githubusercontent.com/chef/chef-server/dbb7594a5cfa3a8868819e239c4145bdcb562279/src/oc_erchef/apps/chef_objects/test/chef_s3_tests.erl
erlang
ex: ts=4 sw=4 et Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. construct u...
-*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*- @author < > @author < > Copyright Chef Software , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under ...
97c0174ffcdb56346cdb30c888b691e7ea68a4c3c8594209b53c3a7615649600
valderman/haste-compiler
BasicEvents.hs
# LANGUAGE OverloadedStrings , TypeFamilies # -- | Basic events: load, unload, focus, submit, etc. module Haste.Events.BasicEvents (BasicEvent (..)) where import Haste.Events.Core data BasicEvent = Load | Unload | Change | Focus | Blur | Submit | Scroll | Input instance Event BasicEvent where type E...
null
https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/libraries/haste-lib/src/Haste/Events/BasicEvents.hs
haskell
| Basic events: load, unload, focus, submit, etc.
# LANGUAGE OverloadedStrings , TypeFamilies # module Haste.Events.BasicEvents (BasicEvent (..)) where import Haste.Events.Core data BasicEvent = Load | Unload | Change | Focus | Blur | Submit | Scroll | Input instance Event BasicEvent where type EventData BasicEvent = () eventName Load = "load" ...
0eb1792b7b10435938639a2661de6c09917130d2441549f42719b1c1a4d23156
r0man/sqlingvo
core_test.cljc
(ns sqlingvo.core-test (:require #?(:clj [sqlingvo.test :refer [db sql=]] :cljs [sqlingvo.test :refer [db] :refer-macros [sql=]]) [clojure.pprint :refer [pprint]] [clojure.string :as str] [clojure.test :refer [are deftest is]] [sqlingvo.core :as sql] ...
null
https://raw.githubusercontent.com/r0man/sqlingvo/1f13624ed60ec0866fe51311d92da73638708172/test/sqlingvo/core_test.cljc
clojure
(ns sqlingvo.core-test (:require #?(:clj [sqlingvo.test :refer [db sql=]] :cljs [sqlingvo.test :refer [db] :refer-macros [sql=]]) [clojure.pprint :refer [pprint]] [clojure.string :as str] [clojure.test :refer [are deftest is]] [sqlingvo.core :as sql] ...
8c4990de30543e073065180ee9089e75a98d286c7a70543768537ab005eccd73
saltlang/saltlang
UnitTest.hs
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 source code must retain the above copyright -- notice, this list of conditions and ...
null
https://raw.githubusercontent.com/saltlang/saltlang/f3478904139f19373f23824f25d28e8be745dc60/test/library/UnitTest.hs
haskell
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer in the documentation and/or other ma...
Copyright ( c ) 2015 . All rights reserved . 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . Neither the name of the author nor the names of any contributors THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTO...
06876a4c61f001ad77dea31438675b7e86d0603d58c0c1b38e36eef737d59a56
tolysz/ghcjs-stack
Solver.hs
module Distribution.Client.Dependency.Modular.Solver ( SolverConfig(..) , solve ) where import Data.Map as M import Distribution.Compiler (CompilerInfo) import Distribution.Client.PkgConfigDb (PkgConfigDb) import Distribution.Client.Dependency.Types import Distribution.Client.Dependency.Modular.Assignm...
null
https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/cabal-install/Distribution/Client/Dependency/Modular/Solver.hs
haskell
| Various options for the modular solver. | Run all solver phases. In principle, we have a valid tree after 'validationPhase', which means that every 'Done' node should correspond to valid solution. has been added relatively recently. Cycles are only removed directly before exploration. Semantically, there is...
module Distribution.Client.Dependency.Modular.Solver ( SolverConfig(..) , solve ) where import Data.Map as M import Distribution.Compiler (CompilerInfo) import Distribution.Client.PkgConfigDb (PkgConfigDb) import Distribution.Client.Dependency.Types import Distribution.Client.Dependency.Modular.Assignm...
ca1f0288db2370255cb964e7d8f766657223363349300203cc92dd9de3b8787d
lehins/Color
HSLSpec.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Graphics.Color.Model.HSLSpec (spec) where import Graphics.Color.Model import Graphics.Color.Model.Common import Graphics.Color.Model.RGBSpec (rgbs) import qualified Data.Colour.RGBSpace a...
null
https://raw.githubusercontent.com/lehins/Color/8f17d4d17dc9b899af702f54b69d49f3a5752e7b/Color/tests/Graphics/Color/Model/HSLSpec.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Graphics.Color.Model.HSLSpec (spec) where import Graphics.Color.Model import Graphics.Color.Model.Common import Graphics.Color.Model.RGBSpec (rgbs) import qualified Data.Colour.RGBSpace a...
1f88d7697374716c0ecbceb2fd489780cf4e9baf073115ee33d8e126e4223d95
yallop/ocaml-ctypes
lDouble.mli
* Copyright ( c ) 2016 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2016 Andy Ray. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) type t (** The type of long double...
null
https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/src/ctypes/lDouble.mli
ocaml
* The type of long doubles. * Convert a long double to a float. The result is unspecified if the argument is either too large or too small to be represented as a [float]. * Create a long double from a float * Create a long double from an int * Create a long double from a string * Addition * Subtraction * Mul...
* Copyright ( c ) 2016 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2016 Andy Ray. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) type t val to_float : t -> float ...
e9efae76e587262e12e878edbc9e40bc0dd549190c3343265989997d88ae26ad
RefactoringTools/HaRe
StatusIndicator.hs
module StatusIndicator where import Fudgets data Status = Unknown | InProgress | InError | Good deriving (Eq,Ord) statusF :: (Eq a,Enum a,Bounded a) => F (a,Status) b statusF = nullF >==< (createDrawStatus $ \ draw -> let u = draw Unknown pm = setBgColor bgColor . setInitDisp u . setBorderWidth...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/pfe/Browser/StatusIndicator.hs
haskell
fg ["blue3","#0000cc","#0000c0","blue","black"] $ \ blue ->
module StatusIndicator where import Fudgets data Status = Unknown | InProgress | InError | Good deriving (Eq,Ord) statusF :: (Eq a,Enum a,Bounded a) => F (a,Status) b statusF = nullF >==< (createDrawStatus $ \ draw -> let u = draw Unknown pm = setBgColor bgColor . setInitDisp u . setBorderWidth...
8421e2e27ad2aa4d49114637d8f8864ba63ce3393843f56f301b49f66baf9cba
ocurrent/ocaml-docs-ci
solver.mli
module Git = Current_git type t type key val keys : t -> key list val failures : t -> (OpamPackage.t * string) list val get : key -> Package.t val incremental : config:Config.t -> blacklist:string list -> opam:Git.Commit.t Current.t -> Track.t list Current.t -> t Current.t
null
https://raw.githubusercontent.com/ocurrent/ocaml-docs-ci/ce31264d0b6188d35ba2b028a505f4b8912ea5ee/src/lib/solver.mli
ocaml
module Git = Current_git type t type key val keys : t -> key list val failures : t -> (OpamPackage.t * string) list val get : key -> Package.t val incremental : config:Config.t -> blacklist:string list -> opam:Git.Commit.t Current.t -> Track.t list Current.t -> t Current.t
35ef41263ad05c9af89b3b484708c11808a5f69a767444b8d9dd218f96969abc
binaryage/clearcut
helpers.clj
(ns clearcut.helpers "Various helpers for our Clojure code." (:refer-clojure :exclude [gensym]) (:require [cuerdas.core :as cuerdas] [clojure.pprint :refer [pprint]] [clearcut.constants :as constants])) (defn indent-text [s count] (let [prefix (cuerdas/repeat " " count)] (->> s ...
null
https://raw.githubusercontent.com/binaryage/clearcut/7f44705cd8743f8679199cb78a215487eb411ed4/src/lib/clearcut/helpers.clj
clojure
(ns clearcut.helpers "Various helpers for our Clojure code." (:refer-clojure :exclude [gensym]) (:require [cuerdas.core :as cuerdas] [clojure.pprint :refer [pprint]] [clearcut.constants :as constants])) (defn indent-text [s count] (let [prefix (cuerdas/repeat " " count)] (->> s ...
dd2e0441b28f49352f427a8e8fd75db16134238f1f5f3d2bc234117f098f0928
LambdaHack/LambdaHack
ItemKindTemporary.hs
-- | Temporary pseudo-organ (condition) definitions. module Content.ItemKindTemporary ( -- * Group name patterns pattern S_IMMOBILE, pattern S_PACIFIED, pattern S_IRREPLACEABLE, pattern S_RETAINING, pattern S_IMPATIENT, pattern S_DISPOSSESSED, pattern S_WITHHOLDING, pattern S_PARSIMONIOUS , pattern S_MORE_MOBIL...
null
https://raw.githubusercontent.com/LambdaHack/LambdaHack/10844343821ced09f493eb2c10492d5efbfbed7a/GameDefinition/Content/ItemKindTemporary.hs
haskell
| Temporary pseudo-organ (condition) definitions. * Group name patterns * Content * Group name patterns * Content The @name@ is be used in item description, so it should be an adjective describing the temporary set of aspects. The messages are needed also under @OnSmash@ to display when item removed via @DropI...
module Content.ItemKindTemporary pattern S_IMMOBILE, pattern S_PACIFIED, pattern S_IRREPLACEABLE, pattern S_RETAINING, pattern S_IMPATIENT, pattern S_DISPOSSESSED, pattern S_WITHHOLDING, pattern S_PARSIMONIOUS , pattern S_MORE_MOBILE, pattern S_MORE_COMBATIVE, pattern S_MORE_DISPLACING, pattern S_MORE_MODIFYING, ...
da246e8c2c64e6f5c6b7d68429702b2771c3ed21b77412e7015760b9b35454fe
goldfirere/singletons
Singletons.hs
# LANGUAGE DataKinds # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans # ----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Sum.Singletons Copyright : ( C ) 2021 -- License ...
null
https://raw.githubusercontent.com/goldfirere/singletons/a169d3f6c0c8e962ea2983f60ed74e507bca9b2b/singletons-base/src/Data/Functor/Sum/Singletons.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Functor.Sum.Singletons License : BSD-style (see LICENSE) Stability : experimental Portability : non-portable Exports the promoted and singled versions of the 'Sum' data type. ------------------------------...
# LANGUAGE DataKinds # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans # Copyright : ( C ) 2021 Maintainer : ( ) module Data.Functor.Sum.Singletons ( Sing, SSum(..), InLSym0, InLSym1, InRSym0, InRSym1, ) where import Dat...
a35a88492c67692cb6ea57d7770e5cae8d1012b32d6e808da81e77bbaaf26040
haskell/haskell-language-server
CommentAtTopMultipleComments.hs
module Test ( SomeData(..) ) where -- | Another comment data SomethingElse = SomethingElse -- | Some comment class Semigroup a => SomeData a instance SomeData All
null
https://raw.githubusercontent.com/haskell/haskell-language-server/fdbc555a9245cb3761c2bf7335f3d18b8cf7673c/plugins/hls-refactor-plugin/test/data/import-placement/CommentAtTopMultipleComments.hs
haskell
| Another comment | Some comment
module Test ( SomeData(..) ) where data SomethingElse = SomethingElse class Semigroup a => SomeData a instance SomeData All
4d54e5f7bf501716561051b346fd21ddede7939b264c0fa2b41962c2b48769e2
serperu/secer
secer_trace.erl
-module(secer_trace). -export([init/0, create_loop/4]). init() -> %tracer([]). tracer({[],[]}). tracer({Stack,Trace}) -> receive exit -> io:format("Dying..."), ok; error -> io:format("---Error Execution---\n"), ok; reset -> tracer({[],[]}); {add_i, POI, Ref, V} -> tracer({[{Ref, V} |...
null
https://raw.githubusercontent.com/serperu/secer/ffe2f9602356c34c9465c44534c82cc758b809b5/src/secer_trace.erl
erlang
tracer([]). printer(ST), DELETE AI = dict:new(), Parent = node(), Module = atom(), FunName = atom(), TO = integer() Enviar resultado a secer_node Esperar input
-module(secer_trace). -export([init/0, create_loop/4]). init() -> tracer({[],[]}). tracer({Stack,Trace}) -> receive exit -> io:format("Dying..."), ok; error -> io:format("---Error Execution---\n"), ok; reset -> tracer({[],[]}); {add_i, POI, Ref, V} -> tracer({[{Ref, V} | Stack], Trace...
139f5f16bcb786e7efa16d4465aa6da1c26d6a7f36fd452f82982c09ab4e5e17
thoughtpolice/claap
ALU.hs
-- | -- Module : AAP.RegFile Copyright : ( c ) 2016 License : BSD3 - style ( see LICENSE.txt ) -- -- Maintainer : -- Stability : experimental Portability : non - portable ( GHC extensions ) -- Arithmetic Logic Unit ( \"ALU\ " ) for the Altruistic Processor . -- module AAP.ALU ( ) where im...
null
https://raw.githubusercontent.com/thoughtpolice/claap/4944b6c4ad6aff4097f8ef66231ce7d7a59f5ee7/src/aap/AAP/ALU.hs
haskell
| Module : AAP.RegFile Maintainer : Stability : experimental
Copyright : ( c ) 2016 License : BSD3 - style ( see LICENSE.txt ) Portability : non - portable ( GHC extensions ) Arithmetic Logic Unit ( \"ALU\ " ) for the Altruistic Processor . module AAP.ALU ( ) where import CLaSH.Prelude
521ace213e24c35a5cc9c06dcadd95e781ac057c8b8197271ad3315a08b2d76e
janestreet/memtrace_viewer
filtered_trace.ml
open! Core open Memtrace_viewer_common open Memtrace_viewer_native.For_testing let memtrace_trace = Memtrace.Trace.Reader.open_ ~filename:"test_trace.ctf" let trace = memtrace_trace |> Raw_trace.of_memtrace_trace let loc_cache = (* Keep the same location cache between tests so that the locations are consistent *) ...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer/46439f8bd16e77c5aa38632c9c4aa53175121d4d/test/server/filtered_trace.ml
ocaml
Keep the same location cache between tests so that the locations are consistent
open! Core open Memtrace_viewer_common open Memtrace_viewer_native.For_testing let memtrace_trace = Memtrace.Trace.Reader.open_ ~filename:"test_trace.ctf" let trace = memtrace_trace |> Raw_trace.of_memtrace_trace let loc_cache = Location.Cache.create () ~trace:memtrace_trace ;; module Location_with_defname = struc...
40644bf1afa2226a48c4a3edff31cfb3b88379f28c98c656cd98195808b21079
chaw/r7rs-libs
kruskal.sps
Example of using disjoint sets in implementing 's algorithm to ;; find the minimum spanning tree of a graph. (import (scheme base) (scheme cxr) (scheme comparator) (scheme list) (scheme hash-table) (scheme sort) (scheme write) (robin disjoint-set)) (define (k...
null
https://raw.githubusercontent.com/chaw/r7rs-libs/b8b625c36b040ff3d4b723e4346629a8a0e8d6c2/robin-examples/kruskal.sps
scheme
find the minimum spanning tree of a graph. <3>
Example of using disjoint sets in implementing 's algorithm to (import (scheme base) (scheme cxr) (scheme comparator) (scheme list) (scheme hash-table) (scheme sort) (scheme write) (robin disjoint-set)) (define (kruskal graph) (let ((result '()) (no...
e2b02c0e4d4cdfaa91a8b9bfad91f2df9c26c695800e27bf0c3bde5970f1a56a
rabbibotton/clos-contact
report-events.lisp
(in-package "CLOS-CONTACT") (defclass report-events (clog:clog-panel) ( (event-table :reader event-table) (contact-list :reader contact-list) (cc-db :reader cc-db) )) (defun create-report-events (clog-obj &key (hidden nil) (class nil) (html-id nil) (auto-place t)) position : static ; left : ; top : 158p...
null
https://raw.githubusercontent.com/rabbibotton/clos-contact/dcd81979519f38b780377148a42cd3999d4c4619/report-events.lisp
lisp
left : ; top : 158px;\ " id=\"CLOGB3866134998\ " data - clog - name=\"cc - db\"></div><select style=\"box - sizing : content - box ; position : static ; left : 0px ; top : 0px ; height : 20px ; right : 0px ; display : inline - block ; width : 100%;\ " id=\"CLOGB3866134999\ " data - clog - name=\"contact - list\"></se...
(in-package "CLOS-CONTACT") (defclass report-events (clog:clog-panel) ( (event-table :reader event-table) (contact-list :reader contact-list) (cc-db :reader cc-db) )) (defun create-report-events (clog-obj &key (hidden nil) (class nil) (html-id nil) (auto-place t)) :hidden hidden :class class :html...
f16598ac9e24138fc0cf2eec3b86db4930a43962068b129c5348bd9dab02307d
wireless-net/erlang-nommu
xmerl_appup_test.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2004 - 2011 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Publi...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/xmerl/test/xmerl_appup_test.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitatio...
Copyright Ericsson AB 2004 - 2011 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " Purpose : Verify the application specific...
7c5ff0448b2dc19f4ddb7b75cb4f76e5cf3f0c256e64c5edfd44314f84cb79dd
MaskRay/OJHaskell
164.hs
f 1 a b = 1 + min a b f n 0 b = g!!(n-1)!!b!!9 f n a b = g!!n!!(a-1)!!b + g!!(n-1)!!(max (b-a) 0)!!(9-a) g = [] : [[[f n a b | b <- [0..9]] | a <- [0..9]] | n <- [1..20]] main = print $ f 20 9 9 - f 20 0 9
null
https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/164.hs
haskell
f 1 a b = 1 + min a b f n 0 b = g!!(n-1)!!b!!9 f n a b = g!!n!!(a-1)!!b + g!!(n-1)!!(max (b-a) 0)!!(9-a) g = [] : [[[f n a b | b <- [0..9]] | a <- [0..9]] | n <- [1..20]] main = print $ f 20 9 9 - f 20 0 9
7f320ec63d057869455bcde7949e72ed2eefa3d9efb0649bc0563da20ce4a7a8
cushon/project-euler
67.rkt
#lang racket (require rackunit "common.rkt") ; Find the maximum top to bottom sum in the given triangle. (define (solve) (define triangle (map (lambda (x) (map string->number (tokenize x))) (file->lines "67.txt"))) (define (max-sum triangle) (define (get-next a b) (if (empty? a) '() ...
null
https://raw.githubusercontent.com/cushon/project-euler/d7fcbfff0cd59b2c3691293ff35bb2043b409f68/67.rkt
racket
Find the maximum top to bottom sum in the given triangle.
#lang racket (require rackunit "common.rkt") (define (solve) (define triangle (map (lambda (x) (map string->number (tokenize x))) (file->lines "67.txt"))) (define (max-sum triangle) (define (get-next a b) (if (empty? a) '() (cons (+ (first a) (max (first b) (second b))) ...
debfa6e073097e4cf8ebbfd16e9f16ce4c0531031e745cfcc80806bdf54efcdb
jeromesimeon/Galax
wsdl_util.mli
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/wsdl/wsdl_util.mli
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : wsdl_util.mli , v 1.15 2007/02/01 22:08:55 simeon Exp $ open Xquery_common_ast open Xquery_ast open Xquery_ast_util open Wsdl_ast open Wsdl_astutil val default_soap_encoding_uris : string list val encodingstyle_default : string val...
85858afb49212225caaab92ed02fc1565d541fce6c16c4536c2916278fd88eeb
GaloisInc/semmc
Misc.hs
# LANGUAGE BinaryLiterals # # LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE ImplicitParams # module SemMC.Architecture.ARM.BaseSemantics.Misc ( miscSemantics ) where import Data.Parameterized.Context import qualified Dismantle.Thumb as T import Prelude hiding ( concat, pred ) ...
null
https://raw.githubusercontent.com/GaloisInc/semmc/4dc4439720b3b0de8812a68f8156dc89da76da57/semmc-arm/src/SemMC/Architecture/ARM/BaseSemantics/Misc.hs
haskell
# LANGUAGE GADTs # as more of these are seen. InterruptPending(); no definition
# LANGUAGE BinaryLiterals # # LANGUAGE DataKinds # # LANGUAGE ImplicitParams # module SemMC.Architecture.ARM.BaseSemantics.Misc ( miscSemantics ) where import Data.Parameterized.Context import qualified Dismantle.Thumb as T import Prelude hiding ( concat, pred ) import SemMC....
bb629ede3a111d18997bbcde08e637eba8c96384c9644a635cfa0077897f5070
mstksg/advent-of-code-2022
Discover.hs
{-# LANGUAGE CPP #-} # LANGUAGE TemplateHaskell # -- | -- Module : AOC.Discover Copyright : ( c ) 2021 -- License : BSD3 -- Maintainer : -- Stability : experimental -- Portability : non-portable -- -- Template Haskell for discovering all named challenges in a given -- directory. -- ...
null
https://raw.githubusercontent.com/mstksg/advent-of-code-2022/51b4b3797273266efb4af440b155cd9548776911/src/AOC/Discover.hs
haskell
# LANGUAGE CPP # | Module : AOC.Discover License : BSD3 Stability : experimental Portability : non-portable Template Haskell for discovering all named challenges in a given directory. | Big quick escape hatch if things explode in the middle of solving. no NFData in every case. checkI...
# LANGUAGE TemplateHaskell # Copyright : ( c ) 2021 Maintainer : module AOC.Discover ( mkChallengeMap , solutionList , ChallengeMap , ChallengeSpec(..) , solSpec , solSpecStr , solSpecStr_ , charPart , challengeName , solverNFData , deepInstance ) where import AOC.Solv...
1b275fe94ca825a50497aac0bdb40e575a68f62bb8897ac5177fc6d5353fa3a7
imteekay/functional-programming-learning-path
hash-map.clj
{:a 1 :b 2 :c 3} {:a 1 :a 2} ; throws a exception: keys need to be unique ; creating a hash with hash-map function { : a 1 : b 2 } ; get value by key 2
null
https://raw.githubusercontent.com/imteekay/functional-programming-learning-path/07dac09c9fabfa54f8b4d80b62f43b092cb87b0d/clojure/data_structures/hash-map.clj
clojure
throws a exception: keys need to be unique creating a hash with hash-map function get value by key
{:a 1 :b 2 :c 3} {:a 1 { : a 1 : b 2 } 2
d2ce78ea5ed981fb4cd631b0c17d7e6871b17380e632b186fcfd001fe88506f9
jaspervdj/blaze-html
Transitional.hs
-- WARNING: The next block of code was automatically generated by -- src/Util/GenerateHtmlCombinators.hs:69 -- {-# LANGUAGE OverloadedStrings #-} -- | This module exports HTML combinators used to create documents. -- module Text.Blaze.Html4.Transitional ( module Text.Blaze.Html , docType , docTypeHtml ,...
null
https://raw.githubusercontent.com/jaspervdj/blaze-html/1c76db3cf02712569fd22b021fb0a367df028eb4/src/Text/Blaze/Html4/Transitional.hs
haskell
WARNING: The next block of code was automatically generated by src/Util/GenerateHtmlCombinators.hs:69 # LANGUAGE OverloadedStrings # | This module exports HTML combinators used to create documents. WARNING: The next block of code was automatically generated by src/Util/GenerateHtmlCombinators.hs:77 WARNING: Th...
module Text.Blaze.Html4.Transitional ( module Text.Blaze.Html , docType , docTypeHtml , a , abbr , acronym , address , applet , area , b , basefont , bdo , big , blockquote , body , br , button , caption , center , cite , code , col...
1f53f3f0e30d6e509fa95d2213cbdc4011b51537c54daefd9df32d72f35bfb2f
Perry961002/SICP
exe3.26-tree-table.scm
构造函数 (define (make-tree key value left right) (list (cons key value) left right)) (define (entry tree) (car tree)) (define (tree-key tree) (car (entry tree))) (define (tree-vale tree) (cadr (entry tree))) (define (left-branch tree) (cadr tree)) (define (right-branch tree) (caddr tree)) ;判空 (define (empty-tre...
null
https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap3/exercise/exe3.26-tree-table.scm
scheme
判空 修改函数 查找函数 插入函数 按照给定的key和比较函数compare插入 测试: 整数序的比较排序
构造函数 (define (make-tree key value left right) (list (cons key value) left right)) (define (entry tree) (car tree)) (define (tree-key tree) (car (entry tree))) (define (tree-vale tree) (cadr (entry tree))) (define (left-branch tree) (cadr tree)) (define (right-branch tree) (caddr tree)) (define (empty-tree? t...
3919f6229e35d69f8b9b3594c231b01efe44b0f5ec94c1f35c976aac7a21ad57
screenshotbot/screenshotbot-oss
test-channels.lisp
;;;; Copyright 2018-Present Modern Interpreters Inc. ;;;; This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (uiop:define-package :screenshotbot/dashboard/test-channels (:use #:cl ...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/f99b13a0d90af64205df5658acf3082d61ffb781/src/screenshotbot/dashboard/test-channels.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc.
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (uiop:define-package :screenshotbot/dashboard/test-channels (:use #:cl #:alexandria #:screenshotbot/user-api ...
e58bc75e3684bd1efa1ba689c9bdddf1a41f7e9e519204253e454924e18e7a5c
tmfg/mmtis-national-access-point
feather_icons.cljs
(ns re-svg-icons.feather-icons "Original from [tatut/re-svg-icons](-svg-icons), copied under MIT license" (:require [re-svg-icons.core :refer [icon*]])) (defn columns ([] (columns {})) ([opts] (icon* opts [:svg {:stroke "currentColor", :fill "none", :stroke-linejoin "round", :width "24", :stroke-linecap "round", :...
null
https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/e36f9898bce005736e36153bdc7cca3386a44daf/ote/src/cljs/re_svg_icons/feather_icons.cljs
clojure
(ns re-svg-icons.feather-icons "Original from [tatut/re-svg-icons](-svg-icons), copied under MIT license" (:require [re-svg-icons.core :refer [icon*]])) (defn columns ([] (columns {})) ([opts] (icon* opts [:svg {:stroke "currentColor", :fill "none", :stroke-linejoin "round", :width "24", :stroke-linecap "round", :...
7cbd12145900e1d9f5e43ee88af42ab712a9a1151a630ab12a99294bd9f9d9e5
fulcrologic/guardrails
registry.cljc
(ns com.fulcrologic.guardrails.registry "for syntactic sugar when creating namespaced keywords")
null
https://raw.githubusercontent.com/fulcrologic/guardrails/17b47a7869314efbffe5dbe0c0daea7c30ed9006/src/main/com/fulcrologic/guardrails/registry.cljc
clojure
(ns com.fulcrologic.guardrails.registry "for syntactic sugar when creating namespaced keywords")
016338d4561fc96ac039695d25adf1cd2be7c971c1101258df4225d24208695f
ideas-edu/ideas
RulesInfo.hs
----------------------------------------------------------------------------- Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are included in the distribution . -------...
null
https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Encoding/RulesInfo.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- | Maintainer : Stability : provisional --------------------------------------------------------------------------- More information to do: rules sho...
Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are included in the distribution . Portability : portable ( depends on ghc ) module Ideas.Encoding.RulesInfo ...
c6f5508243b497f6b0b45bfc52f10170d63e7a8b7f97c0168ce9fb330d9e3077
ekmett/lens
Lens.hs
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE ViewPatterns # # LANGUAGE PatternSynonyms # ----------------------------------------------------------------------------- -- | -- Module : Data.ByteString.Lazy.Lens Copyright : ( C ) 2012 - 2016 -- License : BSD-style (see the file LICENSE) ...
null
https://raw.githubusercontent.com/ekmett/lens/479966809048787402adb0ff4d03525b8a65ada6/src/Data/ByteString/Lazy/Lens.hs
haskell
--------------------------------------------------------------------------- | Module : Data.ByteString.Lazy.Lens License : BSD-style (see the file LICENSE) Stability : experimental Portability : non-portable -------------------------------------------------------------------------- $setup >>> :se...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE ViewPatterns # # LANGUAGE PatternSynonyms # Copyright : ( C ) 2012 - 2016 Maintainer : < > Lazy ' ByteString ' lenses . module Data.ByteString.Lazy.Lens ( packedBytes, unpackedBytes, bytes , packedChars, unpackedChars, chars , pattern ...
201bf1122fba849943bca6fe3b1d85ecb0a35062dd9c5571c225de714a9e9cad
luminus-framework/examples
core.clj
(ns guestbook-datomic.core (:require [guestbook-datomic.handler :as handler] [luminus.repl-server :as repl] [luminus.http-server :as http] [guestbook-datomic.config :refer [env]] [clojure.tools.cli :refer [parse-opts]] [clojure.tools.logging :as log] ...
null
https://raw.githubusercontent.com/luminus-framework/examples/cbeee2fef8f457a6a6bac2cae0b640370ae2499b/guestbook-datomic/src/clj/guestbook_datomic/core.clj
clojure
(ns guestbook-datomic.core (:require [guestbook-datomic.handler :as handler] [luminus.repl-server :as repl] [luminus.http-server :as http] [guestbook-datomic.config :refer [env]] [clojure.tools.cli :refer [parse-opts]] [clojure.tools.logging :as log] ...
f4378c341e165fe8c6144c12cdc5a1d4f997b6ae5098083b5815355e2c34056c
lisp-korea/sicp
basic-eval-likerivers12.scm
;; ======================================================================================= ;; eval ;; ======================================================================================= (define (my-eval exp env) (cond ((self-evaluating? exp) exp) ((variable? exp) (lookup-variable-value exp env)) ((quoted? exp...
null
https://raw.githubusercontent.com/lisp-korea/sicp/4cdc1b1d858c6da7c9f4ec925ff4a724f36041cc/ch04/4.1/basic-eval-likerivers12.scm
scheme
======================================================================================= eval ======================================================================================= eval 에서 평가 수행 평가 결과 함수이면 그 함수를 여기서 적용 ------------------------------------------------------------------------- ====================...
(define (my-eval exp env) (cond ((self-evaluating? exp) exp) ((variable? exp) (lookup-variable-value exp env)) ((quoted? exp) (text-of-quotation exp)) ((assignment? exp) (eval-assignment exp env)) ((definition? exp) (eval-definition exp env)) ((if? exp) (eval-if exp env)) ((lambda? exp) (make-procedure (lambd...
56de9706d14d68201cbb48020fb88baa598cf16517a79904a9887a0d56229d46
silky/quipper
Decompose.hs
This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the -- file COPYRIGHT for a list of authors, copyright holders, licensing, -- and other details. All rights reserved. -- -- ====================================================================== -- | Functions to decompose circuits into various...
null
https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/QuipperLib/Decompose.hs
haskell
file COPYRIGHT for a list of authors, copyright holders, licensing, and other details. All rights reserved. ====================================================================== | Functions to decompose circuits into various gate bases. * Precision * Phase * Gate bases * Generic decomposition
This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the module QuipperLib.Decompose ( Precision, bits, digits, KeepPhase, GateBase (..), gatebase_enum, decompose_generic, ) where import QuipperLib.Decompose.CliffordT import QuipperLib.Decompose.GateBase import QuipperLib.Decompos...
faaded6090a48f9f0cd9e1735b0b559526cfb4ad68b2288c4225396e1327f3d4
uwplse/coq-plugin-lib
apputils.ml
(* * Utilities for applications of terms *) open Constr open Utilities (* --- Constructing applications --- *) (* mkApp with a list *) let mkAppl (f, args) = mkApp (f, Array.of_list args) (* --- Deconstructing applications --- *) (* Get a list of all arguments, fully unfolded at the head *) let unfold_args_app t...
null
https://raw.githubusercontent.com/uwplse/coq-plugin-lib/b249fc1954e2f1bc0b776e2d06e8ec1fc4d48ad9/src/coq/termutils/apputils.ml
ocaml
* Utilities for applications of terms --- Constructing applications --- mkApp with a list --- Deconstructing applications --- Get a list of all arguments, fully unfolded at the head Like unfold_args_app, but return empty if it's not an application Get the last argument of an application * Get the argu...
open Constr open Utilities let mkAppl (f, args) = mkApp (f, Array.of_list args) let unfold_args_app trm = let (f, args) = destApp trm in let rec unfold trm = match kind trm with | App (f, args) -> List.append (unfold f) (Array.to_list args) | _ -> [trm] in List.append (List.tl (unfo...
b9827fef669dbfc186955a1b7277d6e27e3daca564b79a692a37b249af036b1c
LexiFi/menhir
ReferenceGraph.mli
(******************************************************************************) (* *) (* *) ...
null
https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/ReferenceGraph.mli
ocaml
**************************************************************************** file LICEN...
, Paris , PPS , Université Paris Diderot . All rights reserved . This file is distributed under the terms of the GNU General Public License version 2 , as...
a5dc26d81242f51f9942cc1b309f113447a0f6b844a59889a9a074894e605682
inconvergent/weir
chromatic.lisp
#!/usr/bin/sbcl --script (load "../examples/load") ;TODO: integrate this into the test suite (rnd:set-rnd-state 1) (defun main (size fn) (let ((sand (sandpaint:make :size size :fg (pigment:white) :bg (pigment:white)))) (sandpaint:clear-fx sand :fx (lambda (xy) ...
null
https://raw.githubusercontent.com/inconvergent/weir/3c364e3a0e15526f0d6985f08a57b312b5c35f7d/test/chromatic.lisp
lisp
TODO: integrate this into the test suite
#!/usr/bin/sbcl --script (load "../examples/load") (rnd:set-rnd-state 1) (defun main (size fn) (let ((sand (sandpaint:make :size size :fg (pigment:white) :bg (pigment:white)))) (sandpaint:clear-fx sand :fx (lambda (xy) (pigment:hsv 0d0 0d0 (+ 0....
f37e6d1b522231680c87df9f4492da8143b5cb21bdacd626bf219ef5dcf503d4
bschwb/cis194-solutions
AParser.hs
from Cis194 by - /~cis194/spring13/extras/11-applicative2/AParser.hs - /~cis194/spring13/extras/11-applicative2/AParser.hs -} module AParser where import Control.Applicative import Data.Char import Prelude hiding (sequence) newtype Parser a = Parser { runParser :: String -> Maybe (a, String) } inParser f...
null
https://raw.githubusercontent.com/bschwb/cis194-solutions/e79f96083b6edbfed18a2adbc749c41d196d8ff7/12-monads/AParser.hs
haskell
from Cis194 by - /~cis194/spring13/extras/11-applicative2/AParser.hs - /~cis194/spring13/extras/11-applicative2/AParser.hs -} module AParser where import Control.Applicative import Data.Char import Prelude hiding (sequence) newtype Parser a = Parser { runParser :: String -> Maybe (a, String) } inParser f...
7759e2e76aa1f523399b8f89bac9f0950d2f925c647ef6d410bc69711b828899
yitzchak/shasht
install.lisp
(load "quicklisp.lisp") (handler-bind ((simple-error (lambda (err) (declare (ignore err)) (invoke-restart 'quicklisp-quickstart::load-setup)))) (quicklisp-quickstart:install)) (ql-util:without-prompting (ql:add-to-init-file)) (ql:quickload :shasht/test)
null
https://raw.githubusercontent.com/yitzchak/shasht/4055327ef8e2aaa8627892ab256350ff3cb15e3c/scripts/install.lisp
lisp
(load "quicklisp.lisp") (handler-bind ((simple-error (lambda (err) (declare (ignore err)) (invoke-restart 'quicklisp-quickstart::load-setup)))) (quicklisp-quickstart:install)) (ql-util:without-prompting (ql:add-to-init-file)) (ql:quickload :shasht/test)
8581b8a8f70baeba2d420f59494ac476f51c8463e34e65e99a405dfc80a47631
gdevanla/write-you-a-python-lexer
Run.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiWayIf#-} module Run (run) where import Import import RIO import Data.Text.IO import qualified Data.Text as T import Options.Applicative.Simple import Example1.LexerRunner as Ex1 import Example2.LexerRunner as Ex2 import Example3.Lexer...
null
https://raw.githubusercontent.com/gdevanla/write-you-a-python-lexer/b07bd85df1f29e4505d4f52e975ae0d9dc8a3605/src/Run.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE MultiWayIf# | Command line arguments logInfo $ display $ T.pack . show $ result logInfo $ T.pack "nothing" let lexer = getLexer (appExampleName options) input <- liftIO $ getContents let result = lexer (T.unpack input) logInfo $ display $ T.pack . show $ result getLexer...
# LANGUAGE NoImplicitPrelude # module Run (run) where import Import import RIO import Data.Text.IO import qualified Data.Text as T import Options.Applicative.Simple import Example1.LexerRunner as Ex1 import Example2.LexerRunner as Ex2 import Example3.LexerRunner as Ex3 import Example4.LexerRunner as Ex4 import Exampl...