_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
46a36df38918d46a6e2dcbc4f3a71038caa8f4cca43fdf85264394039933c2e8
xach/zpb-ttf
font-loader.lisp
Copyright ( c ) 2006 , All Rights Reserved ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; * Redistributions of source code must retain the above copyright ;;; notice, this list of conditions...
null
https://raw.githubusercontent.com/xach/zpb-ttf/d1cb862af9fe27559ef18a3f0e91511e837a72f3/font-loader.lisp
lisp
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form ...
Copyright ( c ) 2006 , All Rights Reserved DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , $ I d : font - loader.lisp , v 1.26 2006/03/23 22:21:40 xach Exp $ (in-package #:zpb-ttf) (defclass font-loader () ((tables :ini...
b763c6265acb8b7d6271b822055ff91b183291220c433f89db38aaa4b029b580
godfat/sandbox
exercise2.hs
module Exercise where data Expr = Num Int | Plus Expr Expr | Mul Expr Expr -- deriving Show instance Show Expr where show ( a ) = show a show ( Plus lhs rhs ) = " ( " + + ( show lhs ) + + " + " + + ( show rhs ) + + " ) " show ( rhs ) = " ( " + + ( show lhs ) + + " * " + + ( show...
null
https://raw.githubusercontent.com/godfat/sandbox/eb6294238f92543339adfdfb4ba88586ba0e82b8/haskell/exercise/exercise2.hs
haskell
deriving Show let in deriving Show
module Exercise where data Expr = Num Int | Plus Expr Expr | Mul Expr Expr instance Show Expr where show ( a ) = show a show ( Plus lhs rhs ) = " ( " + + ( show lhs ) + + " + " + + ( show rhs ) + + " ) " show ( rhs ) = " ( " + + ( show lhs ) + + " * " + + ( show rhs ) + + " ) " p_plus =...
5b23140b3c37e38b8d4d32f9eeedd0f18aab85b05d17b9341c278949086a985f
kayceesrk/river
http.ml
* Copyright ( c ) 2014 , OCaml.org project * Copyright ( c ) 2015 < > * * 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 . * *...
null
https://raw.githubusercontent.com/kayceesrk/river/a43623c461ce4282900e1692f97d23b892497d9d/lib/http.ml
ocaml
Download urls and cache them — especially during development, it slows down the rendering to download over and over again the same URL.
* Copyright ( c ) 2014 , OCaml.org project * Copyright ( c ) 2015 < > * * 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 . * *...
d5160f5dc4de36cfa11c34b305646d39064c7677ccbc91bf8bf2f8f88342cfbd
KIZI/sparqlab
api.clj
(ns sparqlab.routes.api (:require [sparqlab.config :refer [env]] [sparqlab.sparql :as sparql] [sparqlab.prefixes :as prefix] [sparqlab.store :as store] [sparqlab.cookies :as cookie] [clojure.tools.logging :as log] [compojure.core :refer [context ...
null
https://raw.githubusercontent.com/KIZI/sparqlab/33a80b13c0fa0eb9aa0edb294ad0510d2cf52abc/src/clj/sparqlab/routes/api.clj
clojure
(ns sparqlab.routes.api (:require [sparqlab.config :refer [env]] [sparqlab.sparql :as sparql] [sparqlab.prefixes :as prefix] [sparqlab.store :as store] [sparqlab.cookies :as cookie] [clojure.tools.logging :as log] [compojure.core :refer [context ...
e68e5dc75e1787f5c68b735c5b3df9b701cba6c68cddd6630a1051e69feeb711
defunkydrummer/ninglex
util.lisp
;; No utils needed so far.. (defpackage ninglex.util (:use :cl)) (in-package :ninglex.util)
null
https://raw.githubusercontent.com/defunkydrummer/ninglex/22a6593a9770f92689ded4566f83159fae8aec1f/ninglex-example/example/util.lisp
lisp
No utils needed so far..
(defpackage ninglex.util (:use :cl)) (in-package :ninglex.util)
d703fdcaab5bb9b724dbafbc20c1f57425be6d138798cedf60f402e4e112941c
softlab-ntua/bencherl
city_simulation.erl
-module(city_simulation). -export([bench_args/2, run/3]). bench_args(Version, _Conf) -> case Version of short -> [[tiny, brief]]; intermediate -> [[small, short]]; long -> [[medium, medium]] end. run([S,D|_], _, _) -> city_benchmarking_loading_test:run(S, D), ok.
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/bench/city_simulation/src/city_simulation.erl
erlang
-module(city_simulation). -export([bench_args/2, run/3]). bench_args(Version, _Conf) -> case Version of short -> [[tiny, brief]]; intermediate -> [[small, short]]; long -> [[medium, medium]] end. run([S,D|_], _, _) -> city_benchmarking_loading_test:run(S, D), ok.
52c72b5961213a9ee08279066e8433207ec37a06d3f628fa3f5da4ae88e91f7f
brick-lang/kiln
fqident.ml
(* This file represents "fully qualified" identifiers *) (* e.g. "Mortar.Collections.BTree.insert" *) open Core type t = | FQident of string | FQdot of t * string let flatten lid = let rec flat accu = function | FQident s -> s :: accu | FQdot(lid, s) -> flat (s :: accu) lid in flat [] lid let...
null
https://raw.githubusercontent.com/brick-lang/kiln/21ec6fe8dfd2a807e514c9a794abbf48a7836ab3/frontend/parseTree/fqident.ml
ocaml
This file represents "fully qualified" identifiers e.g. "Mortar.Collections.BTree.insert"
open Core type t = | FQident of string | FQdot of t * string let flatten lid = let rec flat accu = function | FQident s -> s :: accu | FQdot(lid, s) -> flat (s :: accu) lid in flat [] lid let last = function | FQident s -> s | FQdot(_, s) -> s let rec split_at_dots s pos = match Stri...
e2ebe59dbdab28929e3f8afaa25169a3c2ac4dbb9f7f4771587316d82f16ca83
auser/hermes
mapreduce_test.erl
-module (mapreduce_test). -include ("hermes.hrl"). -include_lib("eunit/include/eunit.hrl"). -export ([test_athens_response_function/1]). setup() -> test_helper:start_n_nodes(30). teardown(_Servers) -> test_helper:teardown_all_nodes(), ok. all_test_() -> {setup, fun setup/0, fun teardown/1, {timeout, 3...
null
https://raw.githubusercontent.com/auser/hermes/32741eb75398ebbcbf640e2c73dfd2a54f0d1241/test/src/athens/ballots/mapreduce_test.erl
erlang
==================================================================== PRIVATE ====================================================================
-module (mapreduce_test). -include ("hermes.hrl"). -include_lib("eunit/include/eunit.hrl"). -export ([test_athens_response_function/1]). setup() -> test_helper:start_n_nodes(30). teardown(_Servers) -> test_helper:teardown_all_nodes(), ok. all_test_() -> {setup, fun setup/0, fun teardown/1, {timeout, 3...
e346d9294f5a9a76f2e7105dcc8b7f5e0694374b7694f30d9688e7bc3a87674f
paurkedal/ocaml-mediawiki-api
mwapi_query_prop.mli
Copyright ( C ) 2013 - -2017 Petter A. Urkedal < > * * 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 * option ) any la...
null
https://raw.githubusercontent.com/paurkedal/ocaml-mediawiki-api/6a1c1043a8ad578ea321a314fbe0a12a8d0933cf/lib/mwapi_query_prop.mli
ocaml
* A property which can be used as a generator. * A property which cannot be used as a generator. val for_list : ('b, 'bm, [< `G]) list_query -> ('a, 'am, 'k) prop -> ('a, 'am, [`N]) page_query val for_prop : ('b, 'bm, [< `G]) page_query -> ('a, 'am, 'k) prop -> ('a, 'am, [`N]) page_quer...
Copyright ( C ) 2013 - -2017 Petter A. Urkedal < > * * 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 * option ) any la...
4f3dfaa99625fcedd207b542b0374568e4913c92dbcd4aa2eaf3d32778f43db6
instedd/planwise
views.cljs
(ns planwise.client.providers-set.views (:require [re-frame.core :as rf] [reagent.core :as r] [planwise.client.asdf :as asdf] [planwise.client.utils :as utils] [planwise.client.providers-set.db :as db] [planwise.client.providers-set.components.new-provider-s...
null
https://raw.githubusercontent.com/instedd/planwise/c4d1912a3d3e4e1099075438c686da28134eba3b/client/src/planwise/client/providers_set/views.cljs
clojure
---------------------------------------------------------------------------- providers-set list
(ns planwise.client.providers-set.views (:require [re-frame.core :as rf] [reagent.core :as r] [planwise.client.asdf :as asdf] [planwise.client.utils :as utils] [planwise.client.providers-set.db :as db] [planwise.client.providers-set.components.new-provider-s...
c219a9668eb17999d4568700ea82ed8bb506438e6861db80f4878cbae3e33153
tvraman/aster-math
complex-objects.lisp
;;; -*- Mode: LISP -*- ;;; Copyright ( C ) 1990 , 1991 , 1992 , 1993 , 1994by T. V. Raman ;;; All Rights Reserved ;;; (in-package :aster) (in-package :aster) Thu Dec 3 19:27:31 EST 1992 ;;; Contains code to recognize complex objects. ;;; Complex objects in math: ;;; Shape of an object ;;; Weight of ...
null
https://raw.githubusercontent.com/tvraman/aster-math/e1eab09e18fea32493b19b85f9d2e0a7c746297f/lisp/read-aloud/complex-objects.lisp
lisp
-*- Mode: LISP -*- ;;; All Rights Reserved Contains code to recognize complex objects. Complex objects in math: Shape of an object Weight of an object Deciding complexity: Deciding when to use variable substitution: Method: WEIGHT Author: raman Method: WEIGHT ...
Copyright ( C ) 1990 , 1991 , 1992 , 1993 , 1994by T. V. Raman (in-package :aster) (in-package :aster) Thu Dec 3 19:27:31 EST 1992 Created : Sat Dec 12 11:22:50 1992 (defmethod weight :around ((document document)) "Around method for memoizing weight" (cond ...
07347b994b8759b0fe49e618ae4df9ee63903bbcc659c4c5e732b87af6b94e3d
jessealama/laramie
todo.rkt
#lang racket/base (provide todo/log/compile-time todo/log/run-time todo/error/compile-time todo/error/run-time) (require (for-syntax syntax/parse racket/base)) Log execution of TODO code . (define-syntax (todo/log/run-time stx) (syntax-parse stx [(_ e) (wi...
null
https://raw.githubusercontent.com/jessealama/laramie/89dee24f6977d668ee1e1ae958c5644d1d15be2c/laramie-lib/laramie/private/todo.rkt
racket
Disallow TODOs (compile-time check errors out).
#lang racket/base (provide todo/log/compile-time todo/log/run-time todo/error/compile-time todo/error/run-time) (require (for-syntax syntax/parse racket/base)) Log execution of TODO code . (define-syntax (todo/log/run-time stx) (syntax-parse stx [(_ e) (wi...
78bbf7e6a4e9db5665cc68a352d5694df6d0c0f06c21322b102b67c65a2fbb65
uber/NEAL
main.ml
Copyright ( c ) 2017 Uber Technologies , Inc. (* *) (* Permission is hereby granted, free of charge, to any person obtaining a copy *) (* of this software and associated documentation files (the "Software"), to deal *) in the Software without restriction , including without limitation the rights (* to use, copy, mo...
null
https://raw.githubusercontent.com/uber/NEAL/6a382a3f957c3bb4abe3f9aba9761ffef13fa5fe/src/core/rule/main.ml
ocaml
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above copyright n...
Copyright ( c ) 2017 Uber Technologies , Inc. in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K...
63b0b87859fc3a390a4a6235b2fa754779a0dd5079cfa7826c9bd6d66e0ea1ea
airbus-seclab/bincat
forward.ml
This file is part of BinCAT . Copyright 2014 - 2021 - Airbus BinCAT is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your opti...
null
https://raw.githubusercontent.com/airbus-seclab/bincat/b0e8108e39d55977d24f14671e6629afa78bdbc1/ocaml/src/fixpoint/forward.ml
ocaml
* opposite the given comparison operator TODO: could be more precise here but taint_sources should be inlined in span_taint_to_register TODO/ same remark on precision TODO: optimize to avoid type switching function stack * returns the result of the transfert function corresponding to the statement on the giv...
This file is part of BinCAT . Copyright 2014 - 2021 - Airbus BinCAT is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your opti...
d6b914240764a8379f8227191329ba6303ca6a2c41d819437d887b950abdff9e
int28h/HaskellTasks
0011.hs
Реализуйте функцию seqA , находящую элементы следующей рекуррентной последовательности a[0 ] = 1 a[1 ] = 2 a[2 ] = 3 a[k+3 ] = a[k+2 ] + a[k+1 ] − 2a[k ] . Реализуйте функцию seqA, находящую элементы следующей рекуррентной последовательности a[0] = 1 a[1] = 2 a[2] = 3 a[k+3] = a[k+2] + a[k+1] − 2a[k]. -} se...
null
https://raw.githubusercontent.com/int28h/HaskellTasks/38aa6c1d461ca5774350c68fa7dd631932f10f84/src/0011.hs
haskell
Реализуйте функцию seqA , находящую элементы следующей рекуррентной последовательности a[0 ] = 1 a[1 ] = 2 a[2 ] = 3 a[k+3 ] = a[k+2 ] + a[k+1 ] − 2a[k ] . Реализуйте функцию seqA, находящую элементы следующей рекуррентной последовательности a[0] = 1 a[1] = 2 a[2] = 3 a[k+3] = a[k+2] + a[k+1] − 2a[k]. -} se...
917747fbb4150e74281dae58b97c3bc71aa8e70b2bccd8aa2deab562c0aef1fc
kudu-dynamics/blaze
Graph.hs
module Blaze.Util.Graph where import Blaze.Prelude import qualified Algebra.Graph.AdjacencyMap as G import qualified Data.Set as Set type Graph a = G.AdjacencyMap a demoGraph :: Graph Int demoGraph = 1 * 2 + 2 * (3 + 4) + 3 * (6 + 8 + 5) + 4 * (2 + 5 + 9) + 6 * 7 + ...
null
https://raw.githubusercontent.com/kudu-dynamics/blaze/a385bb3b37a0a0e061217ebdd70dd0eecbb20332/src/Blaze/Util/Graph.hs
haskell
- simple paths (non-repeating) from start to end
module Blaze.Util.Graph where import Blaze.Prelude import qualified Algebra.Graph.AdjacencyMap as G import qualified Data.Set as Set type Graph a = G.AdjacencyMap a demoGraph :: Graph Int demoGraph = 1 * 2 + 2 * (3 + 4) + 3 * (6 + 8 + 5) + 4 * (2 + 5 + 9) + 6 * 7 + ...
5a5a53a4c25a710ee304117933aa4a40dfec8b6d10425c1a53e7a06e00843f86
dmitryvk/sbcl-win32-threads
static-fn.lisp
;;;; VOPs and macro magic for calling static functions This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the ...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/ppc/static-fn.lisp
lisp
VOPs and macro magic for calling static functions more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. (inst mr code-tn func)
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!VM") (define-vop (static-fun-template) (:save-p t) (:policy :safe) (:variant-vars symbol) (:vop-var ...
004219e24eb81a8abb1eb3fc2de62d899bf9725ab4dd6bf90be08cefebfe4d40
nathell/skyscraper
traverse.clj
(ns skyscraper.traverse "Parallelized context tree traversal. First, some definitions (sketchy – some details omitted): 1. A _handler_ is a function taking a map and returning a seq of maps (or a symbol naming such a function). 2. A _context_ is a map that may contain a special key, `::handler`, des...
null
https://raw.githubusercontent.com/nathell/skyscraper/be774577607e4a4d0d97482ac71130c6a22e590c/src/skyscraper/traverse.clj
clojure
rather, its nodes are computed individually.
(ns skyscraper.traverse "Parallelized context tree traversal. First, some definitions (sketchy – some details omitted): 1. A _handler_ is a function taking a map and returning a seq of maps (or a symbol naming such a function). 2. A _context_ is a map that may contain a special key, `::handler`, des...
dd208de2abd8ce055a26148bb2eff9a4bc4f018b260a4f15a8f128664b7f8f0f
epiccastle/spire
compare_test.clj
(ns spire.compare-test (:require [clojure.test :refer :all] [spire.module.upload :as upload] [spire.module.attrs :as attrs] [spire.compare :as compare] [spire.utils :as utils] [spire.nio :as nio] [clojure.java.io :as io] [spire.test-u...
null
https://raw.githubusercontent.com/epiccastle/spire/7439a0a17c25fd54e3d86712d2a44b38fd71877a/test/clojure/spire/compare_test.clj
clojure
extracting files to copy and their sizes
(ns spire.compare-test (:require [clojure.test :refer :all] [spire.module.upload :as upload] [spire.module.attrs :as attrs] [spire.compare :as compare] [spire.utils :as utils] [spire.nio :as nio] [clojure.java.io :as io] [spire.test-u...
3e65f7febc60eab6c3e3d3ada7357f95d1e077c895183fcb9b44ad80c776cdaf
fakedata-haskell/fakedata
Overwatch.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Faker.Provider.Overwatch where import Config import Control.Monad.Catch import Control.Monad.IO.Class import Data.Map.Strict (Map) import Data.Monoid ((<>)) import Data.Text (Text) import Data.Vector (Vector) import Data.Yaml import Faker import F...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/Overwatch.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.Provider.Overwatch where import Config import Control.Monad.Catch import Control.Monad.IO.Class import Data.Map.Strict (Map) import Data.Monoid ((<>)) import Data.Text (Text) import Data.Vector (Vector) import Data.Yaml import Faker import Faker.Internal import Faker.Provider...
d7d795bb050d4989f8c1eea96a76687d7b30d2411b3a2a818a069aef987ef028
dm3/sicp
e1_43_44_45_46.clj
# # Exercises 1.43 - 1.46 (ns e1-43-44-45-46 (:use [util.util :only (repfun avg dx fixed-point average-damp pow close-enough? tolerance square abs avg)]) (:use [clojure.contrib.test-is :only (deftest is run-tests)]) (:use [clojure.contrib.generic.math-functions :only (cos)])) # # 1.43 ;; `repfun` is defined in ...
null
https://raw.githubusercontent.com/dm3/sicp/14f0361cbd0cce817d93e38dcc895f3e845515b1/src/main/clojure/e1_43_44_45_46.clj
clojure
`repfun` is defined in util/util.clj The repeated `smooth` is trivial. For `y = sqrt(x)` the damping is needed only once: y^2 = x => y = x / y now we have a divergence `y0 = y2 = ...`: `y1 = x / y0`, `y2 = x / (x / y0) = y1` which is remedied by an average-damp: in the general case of `y = sqrtn(x)` ...
# # Exercises 1.43 - 1.46 (ns e1-43-44-45-46 (:use [util.util :only (repfun avg dx fixed-point average-damp pow close-enough? tolerance square abs avg)]) (:use [clojure.contrib.test-is :only (deftest is run-tests)]) (:use [clojure.contrib.generic.math-functions :only (cos)])) # # 1.43 (deftest repfun-test (is...
276bf1c42b175d111172d9eb63487a86ce0925ba849556ac884f66ce00238625
ml4tp/tcoq
indtypes.mli
(************************************************************************) 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/checker/indtypes.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i i s The different kinds of errors ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Cic open Envi...
650e1b84458f2774ff7add0bf2827b7ee11a97fefd48c347423e570d9846cb16
chaw/r7rs-libs
json-parser-test.sps
(import (scheme base) (rebottled json-parser) (srfi 64)) (test-begin "JSON-parser") ;; simple expressions from /#tryit (define-syntax test-parser (syntax-rules () ((_ str expect) (test-equal str expect (json:parse-selector (open-input-string str)))))) (test-parser ".languagesSpoken .lang"...
null
https://raw.githubusercontent.com/chaw/r7rs-libs/b8b625c36b040ff3d4b723e4346629a8a0e8d6c2/rebottled-tests/json-parser-test.sps
scheme
simple expressions from /#tryit
(import (scheme base) (rebottled json-parser) (srfi 64)) (test-begin "JSON-parser") (define-syntax test-parser (syntax-rules () ((_ str expect) (test-equal str expect (json:parse-selector (open-input-string str)))))) (test-parser ".languagesSpoken .lang" '("languagesSpoken" >> "lang")) (t...
c8fa2f305e47b339963c06a18dfe26b5b15edeb6b1bda63f64e30b8f1400e830
Octachron/codept
b.ml
module C = struct end module D = struct end
null
https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/tests/complex/collision/b.ml
ocaml
module C = struct end module D = struct end
a5852544b614c5b9615440bcecb7b6af5d096ccae12de845e76268b266f66102
penpot/penpot
state_helpers.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.data.workspace.state-helpers (:require [app.common.data :as d] [app.common.data.macros :a...
null
https://raw.githubusercontent.com/penpot/penpot/31661d5484760e158ef02e8237ab7a56bc8e4a06/frontend/src/app/main/data/workspace/state_helpers.cljs
clojure
Copyright (c) KALEIDOS INC
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.data.workspace.state-helpers (:require [app.common.data :as d] [app.common.data.macros :as dm] [app.common.geom.point :...
c26f92d0e6d8678e744681d470530559c8d96a5e3b5e485f062c402ec8f12426
jmtd/liquorice
shawn.hs
- Shawn.hs - spell words using splices of the - texture ' ' - inspired by " uacletters " - - Shawn.hs - spell words using splices of the - texture 'SHAWN1' - inspired by Simon Howard's "uacletters" - -} module Shawn where import System.IO import Data.List import Data.Char import Data.Maybe ...
null
https://raw.githubusercontent.com/jmtd/liquorice/907af53036c57f55909bc32c634c2a876b48c899/examples/shawn.hs
haskell
generate.py
- Shawn.hs - spell words using splices of the - texture ' ' - inspired by " uacletters " - - Shawn.hs - spell words using splices of the - texture 'SHAWN1' - inspired by Simon Howard's "uacletters" - -} module Shawn where import System.IO import Data.List import Data.Char import Data.Maybe ...
91fa29b79bdefdd12228b317b00c8baa14ea94c372823d82515491cc229ceb7c
slepher/astranaut
macro_example.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2019 , %%% @doc %%% %%% @end Created : 29 Jan 2019 by < > %%%------------------------------------------------------------------- -module(macro_example). -macro_options(debug_module). -include("quote.hrl"). -include...
null
https://raw.githubusercontent.com/slepher/astranaut/c402f0b7d2a0372940c19674b8a72d145b7eb44e/test/astranaut_macro_SUITE_data/macro_example.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API =================================================================== API =================================================================== -------------------------...
@author < > ( C ) 2019 , Created : 29 Jan 2019 by < > -module(macro_example). -macro_options(debug_module). -include("quote.hrl"). -include("macro.hrl"). -export_macro({[macro_group_args/1], [group_args]}). -export_macro({[macro_with_attributes/1], [inject_attrs]}). -export_macro([macro_exported_funct...
128f8cfcf9b7f1a6c816be70d2935c4a3180087a17da1f06d370a97b8f086beb
ploeh/advent-of-code-2017
Solution.hs
module Day04 where import Data.List (nub, permutations) solve1 :: String -> Int solve1 = length . filter (\ws -> length (nub ws) == length ws) . fmap words . lines areAnagrams :: Eq a => [a] -> [a] -> Bool areAnagrams x y = x `elem` permutations y containsAnagrams :: Eq a => [[a]] -> Bool containsAnagrams [] = Fa...
null
https://raw.githubusercontent.com/ploeh/advent-of-code-2017/e0f66bf2735cf1e37fbcf001296fdda8df3ece8c/Day04/Solution.hs
haskell
module Day04 where import Data.List (nub, permutations) solve1 :: String -> Int solve1 = length . filter (\ws -> length (nub ws) == length ws) . fmap words . lines areAnagrams :: Eq a => [a] -> [a] -> Bool areAnagrams x y = x `elem` permutations y containsAnagrams :: Eq a => [[a]] -> Bool containsAnagrams [] = Fa...
91bd16a244442660d0bb21e723560d7f57595bd63597c8c1f7f032e4cfac4e2b
thephoeron/quipper-language
Reverse.hs
This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the -- file COPYRIGHT for a list of authors, copyright holders, licensing, -- and other details. All rights reserved. -- -- ====================================================================== import Quipper my_circuit :: (Qubit, Qubit) -> C...
null
https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/tests/Reverse.hs
haskell
file COPYRIGHT for a list of authors, copyright holders, licensing, and other details. All rights reserved. ======================================================================
This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the import Quipper my_circuit :: (Qubit, Qubit) -> Circ (Qubit, Qubit) my_circuit (a,b) = do qnot_at a `controlled` b hadamard b `controlled` a return (a,b) rev_circuit :: (Qubit, Qubit) -> Circ (Qubit, Qubit) rev_circuit = reverse_si...
0b04a3dbf38b1df22167ce0778b3f1a785d1f444a0b35ca2b303a4ab236ce853
ujihisa/haskell-workshop-project-eular
problem3.hs
transribed as primeFactor :: Integer -> Integer -> [Integer] primeFactor n i | n `div` 2 < i = [n] | n `mod` i == 0 = i : primeFactor (div n i) 2 | otherwise = primeFactor n $ i + 1 main = print $ primeFactor 600851475143 2
null
https://raw.githubusercontent.com/ujihisa/haskell-workshop-project-eular/96d98133ad42cbacfb83c3a9229410760d7745aa/sixeight/problem3.hs
haskell
transribed as primeFactor :: Integer -> Integer -> [Integer] primeFactor n i | n `div` 2 < i = [n] | n `mod` i == 0 = i : primeFactor (div n i) 2 | otherwise = primeFactor n $ i + 1 main = print $ primeFactor 600851475143 2
4b71db83b717ee4c4311ca9a5adb24870ea53a257471ea1a11d5545d87c41611
DerekCuevas/interview-cake-clj
core_test.clj
(ns reverse-linked-list.core-test (:require [clojure.test :refer :all] [reverse-linked-list.core :refer :all] [reverse-linked-list.list :as list])) (def list-a (list/coll->list [4 2])) (def list-b (list/coll->list [6 7 8])) (def list-c (list/coll->list [5 8 3 4])) (def reversed-a (list/coll-...
null
https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/reverse-linked-list/test/reverse_linked_list/core_test.clj
clojure
(ns reverse-linked-list.core-test (:require [clojure.test :refer :all] [reverse-linked-list.core :refer :all] [reverse-linked-list.list :as list])) (def list-a (list/coll->list [4 2])) (def list-b (list/coll->list [6 7 8])) (def list-c (list/coll->list [5 8 3 4])) (def reversed-a (list/coll-...
e8197874101062a677513b8a48491af3734f240ff9ffb7b56e6006f4ebcc3863
liqd/thentos
State.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE OverloadedStrings # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} module Thentos.Frontend.State ( serveFActionStack , serveFAction , enterFAct...
null
https://raw.githubusercontent.com/liqd/thentos/f7d53d8e9d11956d2cc83efb5f5149876109b098/thentos-core/src/Thentos/Frontend/State.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # * errors * middleware We set the path to "/" to keep the browser from setting the current path for the cookie and hence * frontend action mo...
# LANGUAGE OverloadedStrings # module Thentos.Frontend.State ( serveFActionStack , serveFAction , enterFAction , getFrontendCfg , fActionServantErr ) where import Control.Monad.Trans.Except (ExceptT(ExceptT)) import Data.Configifier (Tagged(Tagged)) import LIO.TCB (ioTCB) import Network.W...
2553fe9de17e05d75597e24d7a3aadde7dbc17631ae5ecea5c71501ff5734477
lexi-lambda/racket-r7rs
info.rkt
#lang info (define collection 'multi) (define deps '("base" ["r7rs-lib" #:version "1.1"] "rackunit-lib")) (define build-deps '())
null
https://raw.githubusercontent.com/lexi-lambda/racket-r7rs/a66868651dfee41e0c66887efa8201f7dcb23fb1/r7rs-test/info.rkt
racket
#lang info (define collection 'multi) (define deps '("base" ["r7rs-lib" #:version "1.1"] "rackunit-lib")) (define build-deps '())
0c301768caa3b5438e82f7af62dbe4070e5bc8bccb1adc880aae2282ad4504f3
mirage/capnp-rpc
capnp_rpc.mli
* The abstract and untyped Cap'n Proto RPC protocol . Users will normally want to use the { ! module : Capnp_rpc_lwt } API instead , which provides a typed interface using the Cap'n Proto serialisation . Users will normally want to use the {!module:Capnp_rpc_lwt} API instead, which provides a typed ...
null
https://raw.githubusercontent.com/mirage/capnp-rpc/f04fa96a583994b71731bc1288833f8304c9ce81/capnp-rpc/capnp_rpc.mli
ocaml
* The abstract and untyped Cap'n Proto RPC protocol . Users will normally want to use the { ! module : Capnp_rpc_lwt } API instead , which provides a typed interface using the Cap'n Proto serialisation . Users will normally want to use the {!module:Capnp_rpc_lwt} API instead, which provides a typed ...
721219616917a988b3d8b809ea1a10295a78b34384fbb0a3111179025fc29b37
willtim/Expresso
Type.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternGuard...
null
https://raw.githubusercontent.com/willtim/Expresso/add7480c867b98819a482adb6bcd2da730928f1a/src/Expresso/Type.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings # | Module : Expresso.Type License : BSD3 Maintainer : Stability : experimental Portability : portable | Source position | Row label | A string representing a unique name. | Type syntax annotated with s...
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternGuards # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # # LANGUAGE TypeFa...
0794175c46c089c759b0e6e2a01abdba607cd176af216ce55959dca8280c4e00
fetburner/Coq2SML
rtree.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/lib/rtree.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Building trees * build a node giv...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Type of regular tree with n...
4c4622ef36266abf97344148f5ed7cc69c70f11c52d77c724ae41656d78ac430
nathell/clj-tagsoup
tagsoup_test.clj
(ns pl.danieljanus.tagsoup-test (:use pl.danieljanus.tagsoup clojure.test)) (deftest parse-string-test (is (= [:html {} [:body {} [:p {} "foo"]]] (parse-string "<p>foo</p>"))))
null
https://raw.githubusercontent.com/nathell/clj-tagsoup/358358493f8c96b41e8fd30ad70becf146a310aa/test/pl/danieljanus/tagsoup_test.clj
clojure
(ns pl.danieljanus.tagsoup-test (:use pl.danieljanus.tagsoup clojure.test)) (deftest parse-string-test (is (= [:html {} [:body {} [:p {} "foo"]]] (parse-string "<p>foo</p>"))))
5d74f4849c895a18bcd52bbad9033fe870f5e4496a965a15238d173a7f05e6e9
fossas/fossa-cli
DockerArchive.hs
# LANGUAGE RecordWildCards # module App.Fossa.Container.Sources.DockerArchive ( analyzeFromDockerArchive, listTargetsFromDockerArchive, revisionFromDockerArchive, ) where import App.Fossa.Analyze (applyFiltersToProject, toProjectResult, updateProgress) import App.Fossa.Analyze.Debug (diagToDebug) import App.Fos...
null
https://raw.githubusercontent.com/fossas/fossa-cli/4b23759c43c207bb524f8e5376e663c1d1dd8daf/src/App/Fossa/Container/Sources/DockerArchive.hs
haskell
Analyze Base Layer | Extracts Repository Name. >> extractRepoName ["redis:alpine"] = "redis" >> extractRepoName ["redis@someDigest"] = "redis" -
# LANGUAGE RecordWildCards # module App.Fossa.Container.Sources.DockerArchive ( analyzeFromDockerArchive, listTargetsFromDockerArchive, revisionFromDockerArchive, ) where import App.Fossa.Analyze (applyFiltersToProject, toProjectResult, updateProgress) import App.Fossa.Analyze.Debug (diagToDebug) import App.Fos...
1fd9ae46d22aec1effb8a5ce58910ac280bcbe736e8d30c43f0a794f419de03c
K2InformaticsGmbH/egambo
egambo_tictac_win_9_9_6.erl
-module(egambo_tictac_win_9_9_6). -export([win/2]). generated in egambo_tictac_win win(<<P:8, P:8, P:8, P:8, P:8, P:8, _/binary>>, P) -> true; win(<<P:8, _:64, P:8, _:64, P:8, _:64, P:8, _:64, P:8, _:64, P:8, _/binary>>, P) -> true; win(<<P:8, _:72, P:8, _:72, P:8, _:72, P:8, _:72, P:8, _:72, P:8, _/binary>>, P) -...
null
https://raw.githubusercontent.com/K2InformaticsGmbH/egambo/e8bdf971f188a2139db52712ab5b9d87b2f11520/src/egambo_tictac_win_9_9_6.erl
erlang
-module(egambo_tictac_win_9_9_6). -export([win/2]). generated in egambo_tictac_win win(<<P:8, P:8, P:8, P:8, P:8, P:8, _/binary>>, P) -> true; win(<<P:8, _:64, P:8, _:64, P:8, _:64, P:8, _:64, P:8, _:64, P:8, _/binary>>, P) -> true; win(<<P:8, _:72, P:8, _:72, P:8, _:72, P:8, _:72, P:8, _:72, P:8, _/binary>>, P) -...
0c313acbcf4c97e86bcf2265f8251c70e27358f4033d82a093391fde5fbd2cac
callum-oakley/advent-of-code
15.clj
(ns aoc.2021.15 (:require [aoc.grid :as grid] [aoc.search :as search] [clojure.string :as str] [clojure.test :refer [deftest is]])) (defn parse [s] (grid/parse s #(- (int %) (int \0)))) (defn tile [cavern] (let [[height width] (->> cavern keys sort last (map inc)) wrap-1-9 #(inc (mod (dec %)...
null
https://raw.githubusercontent.com/callum-oakley/advent-of-code/3cf44bcb8c57693639630f95f29d4abf49a6f0e4/src/aoc/2021/15.clj
clojure
(ns aoc.2021.15 (:require [aoc.grid :as grid] [aoc.search :as search] [clojure.string :as str] [clojure.test :refer [deftest is]])) (defn parse [s] (grid/parse s #(- (int %) (int \0)))) (defn tile [cavern] (let [[height width] (->> cavern keys sort last (map inc)) wrap-1-9 #(inc (mod (dec %)...
003efc33a458d44839a11c4d9e973e2999b686f3e87c9a74d70b6f3746cd9e55
nuvla/ui
views.cljs
(ns sixsq.nuvla.ui.deployment-sets-detail.views (:require [clojure.string :as str] [re-frame.core :refer [dispatch subscribe]] [reagent.core :as r] [sixsq.nuvla.ui.acl.views :as acl] [sixsq.nuvla.ui.apps.utils :as apps-utils] [sixsq.nuvla.ui.cimi-detail.view...
null
https://raw.githubusercontent.com/nuvla/ui/da6860cac1f4a5ec84f04aa722a222d21cd610df/code/src/cljs/sixsq/nuvla/ui/deployment_sets_detail/views.cljs
clojure
(ns sixsq.nuvla.ui.deployment-sets-detail.views (:require [clojure.string :as str] [re-frame.core :refer [dispatch subscribe]] [reagent.core :as r] [sixsq.nuvla.ui.acl.views :as acl] [sixsq.nuvla.ui.apps.utils :as apps-utils] [sixsq.nuvla.ui.cimi-detail.view...
eda04264532609711b3125ff87d126f9e5e47f1df85d65b0fb1aa0c369cdfbf4
brennonyork/clj-template
html.clj
(ns clj-template.html (:refer-clojure :rename {map clj-map meta clj-meta time clj-time}) (:require [clj-template.core :as core]) (:gen-class)) # # HTML4 Tags ;; This set contains all HTML4 tags as [ specified by the W3C]( / TR / html4 / index / elements.html ) (def html4-tag-list ["a" "abbr" "acronym" "add...
null
https://raw.githubusercontent.com/brennonyork/clj-template/d255a1c7d50936da5e73ce89d2dff1fb1600672f/src/clj_template/html.clj
clojure
(ns clj-template.html (:refer-clojure :rename {map clj-map meta clj-meta time clj-time}) (:require [clj-template.core :as core]) (:gen-class)) # # HTML4 Tags This set contains all HTML4 tags as [ specified by the W3C]( / TR / html4 / index / elements.html ) (def html4-tag-list ["a" "abbr" "acronym" "addres...
28e0268912213b1d4c62d820585d88e2b119f260d88d08d5695700ed475b09e3
anthonygalea/riemann-console
config.clj
(ns riemann-console.config (:require [duratom.core :as duratom]) (:refer-clojure :exclude [get get-in])) (def config-path (or (System/getenv "RIEMANN_CONSOLE_CONFIG") "./riemann-console.edn")) (def config (duratom/duratom :local-file :file-path config-path :init {:port 5557 ...
null
https://raw.githubusercontent.com/anthonygalea/riemann-console/d4eb21bbde8b191f6a4d853a3b14d370b9fc0761/src/clj/riemann_console/config.clj
clojure
dashboard config
(ns riemann-console.config (:require [duratom.core :as duratom]) (:refer-clojure :exclude [get get-in])) (def config-path (or (System/getenv "RIEMANN_CONSOLE_CONFIG") "./riemann-console.edn")) (def config (duratom/duratom :local-file :file-path config-path :init {:port 5557 ...
f08b949b63219cddb77da007a4a33541e648d2d00b742b76e6d4567c3b5f0845
manuel-serrano/bigloo
compiler.scm
;*=====================================================================*/ * ... /prgm / project / bigloo / / comptime / Engine / compiler.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation : F...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/d8c3ed7437ce3597c6a99bb2868c549c8c407e57/comptime/Engine/compiler.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The compiler driver */ *===========================...
* ... /prgm / project / bigloo / / comptime / Engine / compiler.scm * / * Author : * / * Creation : Fri May 31 08:22:54 1996 * / * Last change : Thu Nov 3 11:05:14 2022 ( serrano ) * / * Copyrigh...
d5f4d1e7aab0d838fc46cc5966130db87818b37dcd79db861c2b017c1b715a46
ocaml-sf/learn-ocaml-corpus
const_reversed.ml
let var x = FVar x let falsity = FConst false let truth = FConst true let const sense = if not sense then truth else falsity (* wrong *) let neg f = match f with | FConst sense -> const (not sense) | FNeg f -> f | _ -> FNeg f let conn sense f1 f2 = match f1, f2 with | FConst s...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/sat/wrong/const_reversed.ml
ocaml
wrong
let var x = FVar x let falsity = FConst false let truth = FConst true let const sense = let neg f = match f with | FConst sense -> const (not sense) | FNeg f -> f | _ -> FNeg f let conn sense f1 f2 = match f1, f2 with | FConst sense', f | f, FConst sense' -> if sense = s...
5ebe881c6f7e8a03c02a65818205b5a8fbce01f52fac8fe05ea4cd55d6a9540f
hemmi/coq2scala
fake_ide.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2/tools/fake_ide.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Fake_ide : Simulate a [coqide] tal...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * exception Comment let coqto...
df55a9e9cd44906c9a38b980d4db40f12c19a564f6501c2fd67601f308068422
PagingMatt/osilo
Cryptography.mli
(** Encapsulates cryptography operations for the platform. *) open Nocrypto module Serialisation : sig exception Deserialisation_failed of string (** [Deserialisation_failed msg] is raised when the input to a deserialisation function is invalid. *) val serialise_cstruct : Cstruct.t -> string (** [seriali...
null
https://raw.githubusercontent.com/PagingMatt/osilo/3ef63a3c0970444c19bd5abf52ad9db154829904/src/Cryptography.mli
ocaml
* Encapsulates cryptography operations for the platform. * [Deserialisation_failed msg] is raised when the input to a deserialisation function is invalid. * [serialise_cstruct cstruct] gives back the [string] representation of [cstruct]. * [deserialise_cstruct msg] attempts to deserialise [msg] into a ...
open Nocrypto module Serialisation : sig exception Deserialisation_failed of string val serialise_cstruct : Cstruct.t -> string val deserialise_cstruct : string -> Cstruct.t val serialise_encrypted : ciphertext:Cstruct.t -> nonce:Cstruct.t -> string val deserialise_encrypted : message:string -> Cstruct....
5982b7d3558b28f92806e297e679f721ad7cea02d13546ef53df60ad7eecaba2
incoherentsoftware/defect-process
Types.hs
module Level.Room.Trigger.Types ( RoomTriggerThink , RoomTrigger(..) ) where import AppEnv import {-# SOURCE #-} Level.Room.Types import {-# SOURCE #-} Msg.Types type RoomTriggerThink m = Room -> RoomTrigger -> m [Msg ThinkLevelMsgsPhase] data RoomTrigger = RoomTrigger { _msgId :: MsgId , _think ...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Level/Room/Trigger/Types.hs
haskell
# SOURCE # # SOURCE #
module Level.Room.Trigger.Types ( RoomTriggerThink , RoomTrigger(..) ) where import AppEnv type RoomTriggerThink m = Room -> RoomTrigger -> m [Msg ThinkLevelMsgsPhase] data RoomTrigger = RoomTrigger { _msgId :: MsgId , _think :: RoomTriggerThink (AppEnv ThinkLevelMsgsPhase) }
9cf9b79789ee7b7fdbccb6b193d0879c36f1803798db7444e97f8bd77fe76187
inaka/elvis
elvis_webhook.erl
-module(elvis_webhook). -behaviour(egithub_webhook). -export([event/1, event/2]). -export([handle_pull_request/3]). -export([handle_error/3]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% External Functions -spec event(egithub_webhook:request()) -> ok | {error, term()}. event...
null
https://raw.githubusercontent.com/inaka/elvis/8b81ef98f7337a936d899061160a35bc292a5cf5/src/elvis_webhook.erl
erlang
External Functions Callbacks Helper functions Comments with `position = 0' cannot be added as a review comment, so they are added to the review's body. @doc Gets a raw_url for a file and extracts the commit id from it.
-module(elvis_webhook). -behaviour(egithub_webhook). -export([event/1, event/2]). -export([handle_pull_request/3]). -export([handle_error/3]). -spec event(egithub_webhook:request()) -> ok | {error, term()}. event(Request) -> event(github_credentials(), Request). -spec event(egithub:credentials(), egithub_webhook:r...
df3f008bfc66c035b7bb36df74bce1b6f90ee6d4c9de233e8ddf3f37a7cbf4be
purescript/purescript
Monad.hs
module Language.PureScript.Make.Monad ( -- * Implementation of Make API using files on disk Make(..) , runMake , makeIO , getTimestamp , getTimestampMaybe , readTextFile , readJSONFile , readJSONFileIO , readCborFile , readCborFileIO , readExternsFile , hashFile , writeTextFile , writeJS...
null
https://raw.githubusercontent.com/purescript/purescript/f9f75f43bd1bdbc1e866fdba876582385e3f4c65/src/Language/PureScript/Make/Monad.hs
haskell
* Implementation of Make API using files on disk | A monad for running make actions | Execute a 'Make' monad, returning either errors, or the result of the compile plus any warnings. | Run an 'IO' action in the 'Make' monad. The 'String' argument should describe what we were trying to do; it is used for rendering ...
module Language.PureScript.Make.Monad Make(..) , runMake , makeIO , getTimestamp , getTimestampMaybe , readTextFile , readJSONFile , readJSONFileIO , readCborFile , readCborFileIO , readExternsFile , hashFile , writeTextFile , writeJSONFile , writeCborFile , writeCborFileIO , copyFil...
456be69d67812a933011f04bd3d132ee16a38aa3bc9e5bb21735250d49ce1468
fugue/fregot
Position.hs
| Copyright : ( c ) 2020 Fugue , Inc. License : Apache License , version 2.0 Maintainer : Stability : experimental Portability : POSIX Copyright : (c) 2020 Fugue, Inc. License : Apache License, version 2.0 Maintainer : Stability : experimental Portability : POSIX -} {-# LANGUAGE Deri...
null
https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Fregot/Lexer/Position.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # # UNPACK # # UNPACK #
| Copyright : ( c ) 2020 Fugue , Inc. License : Apache License , version 2.0 Maintainer : Stability : experimental Portability : POSIX Copyright : (c) 2020 Fugue, Inc. License : Apache License, version 2.0 Maintainer : Stability : experimental Portability : POSIX -} # LANGUAGE Genera...
53f3bfdaae874387dc31b5d00e5fe7f05322dda0061cded37935686b1998894e
iu-parfunc/lvars
BitList.hs
# LANGUAGE CPP # -- | A simple module that provides a more memory-efficient representation of `[Bool]`. module Data.BitList ( BitList , cons, head, tail, empty, null , pack, unpack, length, drop, reverse , fromString, popCount -- * Debugging only: , showRep ) where import Data.Bits hiding (...
null
https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/lvish/Data/BitList.hs
haskell
| A simple module that provides a more memory-efficient representation of `[Bool]`. * Debugging only: | An immutable list of bits. # UNPACK # # UNPACK # # UNPACK # # UNPACK # ^ The Word8 stores how many bits are used within the current chunk. show bl = "pack " ++ show (unpack bl) | Show the internal representatio...
# LANGUAGE CPP # module Data.BitList ( BitList , cons, head, tail, empty, null , pack, unpack, length, drop, reverse , fromString, popCount , showRep ) where import Data.Bits hiding (popCount) import qualified Data.Bits as B import Data.Int import qualified Data.List as L import ...
4d4b65847a664e8cb961620c487823d605b839eb1aff7143d99bfb88c85912f8
Deep-Symmetry/beat-link-trigger
xone-online-gui.clj
;; Try to open the MIDI input with which we receive data from the mixer. Edit the MIDI device name in the first line if needed to match your Xone 's MIDI input device name . (let [mixer-device-name "XONE"] (try ;; Open a MIDI input with the specified name, which should be the mixer. (let [device (midi/mid...
null
https://raw.githubusercontent.com/Deep-Symmetry/beat-link-trigger/dbfbb2fa7e7bffe0d65befb2feaf0a331354f56c/doc/modules/ROOT/examples/xone-online-gui.clj
clojure
Try to open the MIDI input with which we receive data from the mixer. Open a MIDI input with the specified name, which should be the mixer. Arrange for xone-midi-received to be called for each mixer message. Start the UI animation thread that draws the MIDI activity.
Edit the MIDI device name in the first line if needed to match your Xone 's MIDI input device name . (let [mixer-device-name "XONE"] (try (let [device (midi/midi-in mixer-device-name)] (swap! globals assoc :mixer-midi device) (midi/midi-handle-events device (fn [msg...
9a756c5788c3a6e379930570dfab3b3782cf097cfbe671c0502ec1991725788f
TrustInSoft/tis-kernel
rangemap.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/libraries/utils/rangemap.mli
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 was originally part of , projet Cristal , INRIA Rocquencourt Co...
d08caadebd669110204a4cd97c93b7b220148486b994514e6fc668b76f8f52d5
jackfirth/rebellion
info.rkt
#lang info (define collection "rebellion") (define scribblings (list (list "main.scrbl" (list 'multi-page) (list "Rebellion") "rebellion"))) (define deps (list "base")) (define build-deps (list "net-doc" "racket-doc" "rackunit-lib" "scribble-li...
null
https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/info.rkt
racket
#lang info (define collection "rebellion") (define scribblings (list (list "main.scrbl" (list 'multi-page) (list "Rebellion") "rebellion"))) (define deps (list "base")) (define build-deps (list "net-doc" "racket-doc" "rackunit-lib" "scribble-li...
079d89372720ab3880064b667dfb2a01a8bf961f2725fe537a5707abfdd8002c
nuprl/gradual-typing-performance
xml-box.rkt
(module xml-box scheme/base (require mzlib/contract "shared.rkt" "syntax-property.rkt" (prefix-in kernel: syntax/kerncase)) stx to rewrite (syntax? . -> . syntax?) ; rewriter for non-xml-box subcomponents ...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/stepper/private/xml-box.rkt
racket
rewriter for non-xml-box subcomponents rewritten
(module xml-box scheme/base (require mzlib/contract "shared.rkt" "syntax-property.rkt" (prefix-in kernel: syntax/kerncase)) stx to rewrite . -> . (define (rewrite-xml-box stx rewrite-other) (define (recur stx) (rewri...
54483eda072e69278f1541ba6846c237b77d295337dab84afa3712d224ba0d9f
racket/typed-racket
subst-poly-dots.rkt
#lang typed/racket/optional (: f (All (A B ...) (A ... B -> (List (Boxof A) ... B)))) (define (f . args) (map (inst box A) args)) (: h (-> Nothing)) (define (h) (h)) (: g (All (A B ...) (A ... B -> (Values (Boxof A) ... B)))) (define (g . args) (h)) (ann ((inst f String Symbol Symbol) "c" "d") (List (Boxof ...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/optional/subst-poly-dots.rkt
racket
#lang typed/racket/optional (: f (All (A B ...) (A ... B -> (List (Boxof A) ... B)))) (define (f . args) (map (inst box A) args)) (: h (-> Nothing)) (define (h) (h)) (: g (All (A B ...) (A ... B -> (Values (Boxof A) ... B)))) (define (g . args) (h)) (ann ((inst f String Symbol Symbol) "c" "d") (List (Boxof ...
cfa051f50f7b82a9cf5db8953a9866c9433103f025c169d7a53bd0c9906e596f
f-me/carma-public
MSqlQQ.hs
An QuasiQuoter for postresql - simple that helps extracts data from model that kinda more safe and robust than deal with plain text SQL and only values interpolation . There 's three types of interpolation blocks : 1 . $ ( … )$ - table name from model where ' … ' is module name of a model ...
null
https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/srv/src/Utils/Model/MSqlQQ.hs
haskell
Table name Value Interpolation block is opened, parsing it… Create new plain sql block when Fetching interpolation block until it closes with ")$" and parses its innards. Parsing innards between "$(" and ")$" This example: $( V | 100 + 500 )$ will be interpreted `V "100 + 500"` Builds fina...
An QuasiQuoter for postresql - simple that helps extracts data from model that kinda more safe and robust than deal with plain text SQL and only values interpolation . There 's three types of interpolation blocks : 1 . $ ( … )$ - table name from model where ' … ' is module name of a model ...
ee8779542510f003db0688586d4a9fadc65f3f5948f131c4ac15d66c256da976
DaMSL/K3
Engine.hs
# LANGUAGE CPP # {-# LANGUAGE DoAndIfThenElse #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # {-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE ViewPatterns # | A message processing runtime for...
null
https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Runtime/Engine.hs
haskell
# LANGUAGE DoAndIfThenElse # # LANGUAGE RankNTypes # # LANGUAGE TypeSynonymInstances # TODO: i. parallelism and non-interleaved I/O. ii. implement message framing as wrapping wire descriptors These can't be in Instances because of cyclical import | The engine data type, storing all engine components. | Engine Err...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # | A message processing runtime for the K3 interpreter iii . remove bidirectional IOHandles for type - safe one - way handles ( i.e....
0b3dd1656b4e2da094e343146e24f4962b9e295ea9a1073234f4316819e298bb
Ninjapouet/clim
test.ml
(** Coucou *) type t = { foo : int; [@default 42] (** prout *) bar : bool; goo : string list; [@sep ':'] } [@@deriving cmdliner] [@@xrefs [`Main]] [@@envs ["PLOP", Some "It rules!", None]] [@@version "4.2"] let f t = t.foo + 1 let _ = cmdliner f
null
https://raw.githubusercontent.com/Ninjapouet/clim/dbba4bc86ac407b15af35c4c27aa6b911a09328d/test/dev/test.ml
ocaml
* Coucou * prout
type t = { bar : bool; goo : string list; [@sep ':'] } [@@deriving cmdliner] [@@xrefs [`Main]] [@@envs ["PLOP", Some "It rules!", None]] [@@version "4.2"] let f t = t.foo + 1 let _ = cmdliner f
be9552f00c1e673576e868f13cb9ea502d71dc24d5ff4f08df4161639dfe44c8
ocaml/ocamlbuild
glob.mli
(***********************************************************************) (* *) (* ocamlbuild *) (* *) , , projet Galliu...
null
https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/glob.mli
ocaml
********************************************************************* ocamlbuild ...
, , projet Gallium , INRIA Rocquencourt Copyright 2007 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with Original author : type fast_pattern include Sig...
f2913fc8df61d811a0b2a94e82b3546f82bb97d4a9f28ad8bc9b80f04c98ef39
grin-compiler/ghc-wpc-sample-programs
Main.hs
{-| Agda main module. -} module Agda.Main where import Control.Monad.State import Data.Maybe import System.Environment import System.Exit import System.Console.GetOpt import Agda.Interaction.CommandLine import Agda.Interaction.Options import Agda.Interaction.Options.Help (Help (..)) import Agda.Interaction.Monad i...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/Main.hs
haskell
| Agda main module. | The main function | Run Agda with parsed command line options and with a custom HTML generator ^ Backends only for printing usage and version information ^ HTML generating action ^ Backend interaction ^ program name ^ parsed command line options Main function. Turn benchmarking on provis...
module Agda.Main where import Control.Monad.State import Data.Maybe import System.Environment import System.Exit import System.Console.GetOpt import Agda.Interaction.CommandLine import Agda.Interaction.Options import Agda.Interaction.Options.Help (Help (..)) import Agda.Interaction.Monad import Agda.Interaction.Em...
7395c12d78fbbb263f91637620ab62ccc35070bf5dea976e5a7b2fa021870968
Clojure2D/clojure2d-examples
interval.clj
(ns rt4.in-one-weekend.ch12b.interval (:refer-clojure :exclude [empty]) (:require [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol IntervalProto (contains [interval x]) ;; a <= x <= b ;; introduced due to the bug in the bo...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/in_one_weekend/ch12b/interval.clj
clojure
a <= x <= b introduced due to the bug in the book (in the time of writing this code), a < x <= b
(ns rt4.in-one-weekend.ch12b.interval (:refer-clojure :exclude [empty]) (:require [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol IntervalProto (contains- [interval x]) (clamp [interval x])) (defrecord Interval [^double...
c7fbaca3bd2d349d40eddda6fd8aa80095113db935fc2871e0c94cdd4398ce99
Leberwurscht/Diaspora-User-Directory
add_mail.ml
(************************************************************************) This file is part of SKS . SKS is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or (...
null
https://raw.githubusercontent.com/Leberwurscht/Diaspora-User-Directory/1ca4a06a67d591760516edffddb0308b86b6314c/trie_manager/add_mail.ml
ocaml
********************************************************************** ********************************************************************* * Argument parsing
This file is part of SKS . SKS is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . This program is distributed in ...
df715ae0184b2225313cb5155b126a94149a1dc7dd18efaa4f568179b5e5a61b
8c6794b6/haskell-sc-scratch
hello.hs
| Module : $ Header$ Maintainer : Stability : unstable Portability : portable Example from : < > Module : $Header$ Maintainer : Stability : unstable Portability : portable Example from: <> -} module Main where import Happstack.Server main :: IO () main = simpleHTTP nullConf ...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Happstack/CrashCourses/01_HelloWorld/hello.hs
haskell
| Module : $ Header$ Maintainer : Stability : unstable Portability : portable Example from : < > Module : $Header$ Maintainer : Stability : unstable Portability : portable Example from: <> -} module Main where import Happstack.Server main :: IO () main = simpleHTTP nullConf ...
cac647ffa36889cbe3faaa43f92303766e1ff63112b9d4db81656fbc259ca03b
maurer/symfuzz
syscall.ml
(* SymFuzz *) * system calls @author < sangkil.cha\@gmail.com > @since 2014 - 03 - 19 @author Sang Kil Cha <sangkil.cha\@gmail.com> @since 2014-03-19 *) Copyright ( c ) 2014 , All rights reserved . Redistribution and use in source and binary forms , with or without modifi...
null
https://raw.githubusercontent.com/maurer/symfuzz/ea6298746a23b6d266d28d27c6ff952a7bd14885/src/analyzer/syscall.ml
ocaml
SymFuzz
* system calls @author < sangkil.cha\@gmail.com > @since 2014 - 03 - 19 @author Sang Kil Cha <sangkil.cha\@gmail.com> @since 2014-03-19 *) Copyright ( c ) 2014 , All rights reserved . Redistribution and use in source and binary forms , with or without modification , are p...
123fd6dae1f268a5f7187e5d04f32aec9bc75a49fa8047ae1a60fbdd9be18464
GaloisInc/ivory-rtverification
ParseVars.hs
-- | Parses C files (after pre-proccesing them) for use in generating setters / getters in Template Haskell . The user should give on the command -- line arguments of the form -- compiler incls srcs -- -- where compiler is the pre-processor (expected to end in "gcc"), includes -- (expected to begin with "-I'), an...
null
https://raw.githubusercontent.com/GaloisInc/ivory-rtverification/b4c50f85aea48be2fe26fb3310e01b68b3d163af/rtv-lib/src/Ivory/RTVerification/ParseVars.hs
haskell
| Parses C files (after pre-proccesing them) for use in generating line arguments of the form where compiler is the pre-processor (expected to end in "gcc"), includes (expected to begin with "-I'), and sources (expected to end with ".c"). They can be given in any order. -----------------------------------------...
setters / getters in Template Haskell . The user should give on the command compiler incls srcs module Ivory.RTVerification.ParseVars ( getVarList , getVarListV ) where import Data.List import System.Directory import System.Environment (lookupEnv) import System.FilePath import Ivory.RTVerification.Types ...
dac42099584a1beaa29e89cca9d4cf0590db6a074866f29e18d7e0c276dd3363
marick/Midje
t_repl_helper.clj
(ns midje.t-repl-helper (:require [midje.sweet :refer :all] [midje.test-util :refer :all])) (fact "a simple test" (+ 1 2) => 3) (fact "a non-featherian test" :non-featherian (cons 1 nil) => [1])
null
https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/midje/t_repl_helper.clj
clojure
(ns midje.t-repl-helper (:require [midje.sweet :refer :all] [midje.test-util :refer :all])) (fact "a simple test" (+ 1 2) => 3) (fact "a non-featherian test" :non-featherian (cons 1 nil) => [1])
5e0f02da4f1cf3a390a9e940a621f69f4bc42714dab0fee7d6944c791c61436d
adamgundry/uom-plugin
Show.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE RoleAnnotations # # LANGUAGE TypeFamilies # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LAN...
null
https://raw.githubusercontent.com/adamgundry/uom-plugin/dc3cf408430ff9d0554cd90330b77098cd673d94/uom-plugin/src/Data/UnitsOfMeasure/Show.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # # LANGUAGE ConstraintKinds # | Experimental support for showing units of measure in a pretty syntax. This requires the units to be fully determined. Apart from the definitions below, this module also exports a 'Show' instance for @'Quantity' a u@, which is re-exported by...
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE RoleAnnotations # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # module Data.Uni...
adebbe9543d93112ae5e8a68f2f0fab6457a60d12a02dc8d41ea1268fd4fdb29
scrintal/heroicons-reagent
check_badge.cljs
(ns com.scrintal.heroicons.solid.check-badge) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M8.603 3.799A4.49 4.49 0 0112 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 013...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/check_badge.cljs
clojure
(ns com.scrintal.heroicons.solid.check-badge) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M8.603 3.799A4.49 4.49 0 0112 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 013...
ba50bd5c3e4686f8af6d5795250dbd23cc43f3edd413a6f06cd8392bc9d1651f
LeventErkok/sbv
ExtensionField.hs
----------------------------------------------------------------------------- -- | -- Module : TestSuite.Optimization.ExtensionField Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- Test suite for optimization routines, extension field --------------------------------------...
null
https://raw.githubusercontent.com/LeventErkok/sbv/99fd3f3d2ff0e312518bd9d23cb751d178fdbbc8/SBVTestSuite/TestSuite/Optimization/ExtensionField.hs
haskell
--------------------------------------------------------------------------- | Module : TestSuite.Optimization.ExtensionField License : BSD3 Maintainer: Stability : experimental Test suite for optimization routines, extension field --------------------------------------------------------------------------- ...
Copyright : ( c ) module TestSuite.Optimization.ExtensionField(tests) where import Utils.SBVTestFramework tests :: TestTree tests = testGroup "Optimization.ExtensionField" [ goldenVsStringShow "optExtField1" (optimize Lexicographic optExtField1) , goldenVsStringShow "optExtField2" (optimize Lexicograp...
c3300d1c359aead2fc48dfb397706c78a4e020b4115328449955f4ed69d7405c
xsc/version-clj
compare.cljc
(ns ^:no-doc version-clj.compare (:require [version-clj.qualifiers :refer [default-qualifiers]] [version-clj.split :refer [version->seq]])) # # Concept ;; ;; Version vectors can be recursively compared element by element adding zeros at the end if vectors have different lengths . ;; ;; Identical: ;; ...
null
https://raw.githubusercontent.com/xsc/version-clj/f5ccd13cef363e9933bc453a6c7048fa800968d9/src/version_clj/compare.cljc
clojure
Version vectors can be recursively compared element by element adding Identical: Lower: So what we need are comparators for integers, strings and well-known qualifiers.
(ns ^:no-doc version-clj.compare (:require [version-clj.qualifiers :refer [default-qualifiers]] [version-clj.split :refer [version->seq]])) # # Concept zeros at the end if vectors have different lengths . - ` [ ( 1 0 ) ( " SNAPSHOT " ) ] ` - ` [ ( 1 0 0 ) ( " SNAPSHOT " ) ] ` - ` [ ( 1 ) ] ` vs...
2689dada9b99bff68b0caa68a3d18b5c41915d4fef0d882f56b95c7b30057d5f
monadfix/tagged-aeson
AesonSpec.hs
# LANGUAGE QuasiQuotes # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE NoImplicitPrelude # module Data.Aeson.Tagged.AesonSpec (spec) where import BasePrelude import Data.Aeson.Tagged import Data.Text (Text) import qualified Data.Aeson as A import Data.Aeson.Types (Result(..)) import Test.Hspec import Utils import Ty...
null
https://raw.githubusercontent.com/monadfix/tagged-aeson/230f0a813d7caa48b70762c091657cc67fbdde67/test/Data/Aeson/Tagged/AesonSpec.hs
haskell
# LANGUAGE OverloadedStrings # -------------------------------------------------------------------------- Tags -------------------------------------------------------------------------- -------------------------------------------------------------------------- parseJSON @Aeson and toJSON @Aeson ----------------------...
# LANGUAGE QuasiQuotes # # LANGUAGE NoImplicitPrelude # module Data.Aeson.Tagged.AesonSpec (spec) where import BasePrelude import Data.Aeson.Tagged import Data.Text (Text) import qualified Data.Aeson as A import Data.Aeson.Types (Result(..)) import Test.Hspec import Utils import Types spec :: Spec spec = do aes...
853f4f33a0ad235f1ac51f72baa7b9bec56e05b871ed4c3b5524dee55dc26616
softwarelanguageslab/maf
R5RS_scp1_polynome-5.scm
; Changes: * removed : 0 * added : 2 * swaps : 0 * negated predicates : 1 * swapped branches : 1 * calls to i d fun : 2 (letrec ((make-point (lambda (x y) (letrec ((dispatch (lambda (msg) (if (eq? msg 'x-value) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_polynome-5.scm
scheme
Changes:
* removed : 0 * added : 2 * swaps : 0 * negated predicates : 1 * swapped branches : 1 * calls to i d fun : 2 (letrec ((make-point (lambda (x y) (letrec ((dispatch (lambda (msg) (if (eq? msg 'x-value) ...
cb8c1a6dfe6b1c62b325cdbbe6b5c4104f43c8f06434f8508cee732a4e9283ac
zwizwa/staapl
stdout.rkt
#lang staapl/pic18 \ -*- forth -*- provide-all staapl pic18/vector 2variable stdout : >o stdout invoke ; 2variable stdout-flush : o-flush stdout-flush invoke ; \ These are small and often used. : o=a stdout -> !a+ ; : o=f stdout -> !f+ ; : o=d stdout -> ; \ data stack
null
https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/pic18/stdout.rkt
racket
\ data stack
#lang staapl/pic18 \ -*- forth -*- provide-all staapl pic18/vector \ These are small and often used.
e2e6e732ef09fc8438c47530fc1843dd5763cfc3f6b427072f1009eb77ad07ef
screenshotbot/screenshotbot-oss
conditions.lisp
Copyright ( c ) 2015 ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;; restriction, including without limitation the rights to use, copy, ;; modify, merge, publish, dis...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/41a91937318f92ee6d5625def97b03aeb46eb92e/third-party/json-mop/src/conditions.lisp
lisp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do so, subject to the following conditions: ...
Copyright ( c ) 2015 files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , BE LIABLE FOR ANY CLAIM , D...
3b79cf2c2b5bc1ebd88819270b3c0dde223c915f6c556a245c284348eb54dc49
tek/ribosome
ApiType.hs
module Ribosome.Host.Data.ApiType where import Data.Char (isSpace) import Exon (exon) import qualified FlatParse.Basic as FlatParse import FlatParse.Basic ( Result (Err, Fail, OK), branch, char, inSpan, isLatinLetter, many_, optional, readInt, runParser, satisfy, satisfyASCII, string, switch,...
null
https://raw.githubusercontent.com/tek/ribosome/4eb38f599b72450c93cac4a7b474247e478be1a8/packages/host/lib/Ribosome/Host/Data/ApiType.hs
haskell
module Ribosome.Host.Data.ApiType where import Data.Char (isSpace) import Exon (exon) import qualified FlatParse.Basic as FlatParse import FlatParse.Basic ( Result (Err, Fail, OK), branch, char, inSpan, isLatinLetter, many_, optional, readInt, runParser, satisfy, satisfyASCII, string, switch,...
7a12c86b5aeee06efb09a3c65f516826b28caa5f090133b30602011d722152da
mmontone/cl-forms
client-validation.lisp
(in-package :forms.test) (forms:defform client-validated-form (:action "/client-validation-post" :client-validation t) ((name :string :value "" :constraints (list (clavier:is-a-string) (clavier:not-blank) ...
null
https://raw.githubusercontent.com/mmontone/cl-forms/b2701defe2867a529d2d3a237f7ba0c4d08ffb23/test/demo/client-validation.lisp
lisp
The form is valid The form is not valid
(in-package :forms.test) (forms:defform client-validated-form (:action "/client-validation-post" :client-validation t) ((name :string :value "" :constraints (list (clavier:is-a-string) (clavier:not-blank) ...
3cda4ba41c70f0d6d613cbc90c3bbfc04b35096ee11423c8517fff93e7acc1fc
abooij/haskell-wayland
SpliceClientTypes.hs
# LANGUAGE TemplateHaskell , ForeignFunctionInterface # module Graphics.Wayland.Internal.SpliceClientTypes where import Data.Functor import Language.Haskell.TH import Foreign.C.Types import Graphics.Wayland.Scanner.Protocol import Graphics.Wayland.Scanner $(runIO readProtocol >>= generateClientTypes)
null
https://raw.githubusercontent.com/abooij/haskell-wayland/4afbc5a5c05bc436ca74dabe3c02dd1247a91304/Graphics/Wayland/Internal/SpliceClientTypes.hs
haskell
# LANGUAGE TemplateHaskell , ForeignFunctionInterface # module Graphics.Wayland.Internal.SpliceClientTypes where import Data.Functor import Language.Haskell.TH import Foreign.C.Types import Graphics.Wayland.Scanner.Protocol import Graphics.Wayland.Scanner $(runIO readProtocol >>= generateClientTypes)
1d27bf018f312eaa5901be5b4cdb243389b018cf092588f81bbb9609c89cd8f3
ssor/erlangDemos
toppage_handler.erl
%% Feel free to use, reuse and abuse the code in this file. %% @doc GET echo handler. -module(toppage_handler). -export([init/3]). -export([handle/2]). -export([terminate/2]). init(_Transport, Req, []) -> {ok, Req, undefined}. handle(Req, State) -> {Method, Req2} = cowboy_http_req:method(Req), {Echo, Req3} = cow...
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/cowboy_examples/echo_get/src/toppage_handler.erl
erlang
Feel free to use, reuse and abuse the code in this file. @doc GET echo handler. Method not allowed.
-module(toppage_handler). -export([init/3]). -export([handle/2]). -export([terminate/2]). init(_Transport, Req, []) -> {ok, Req, undefined}. handle(Req, State) -> {Method, Req2} = cowboy_http_req:method(Req), {Echo, Req3} = cowboy_http_req:qs_val(<<"echo">>, Req2), {ok, Req4} = echo(Method, Echo, Req3), {ok, R...
458dc943dd88290f0d04a23498ff97cc4aee9e733bcb1a28f74e2b3e8f23d2b4
re-path/studio
views.cljs
(ns repath.studio.localization.views (:require [repath.studio.localization.db]))
null
https://raw.githubusercontent.com/re-path/studio/0841056ef12689cffb226a99a9dfe58d7f2c4778/src/repath/studio/localization/views.cljs
clojure
(ns repath.studio.localization.views (:require [repath.studio.localization.db]))
fdb8eb8f3731daaafaffbc28eb72b7280efcc1fae6b8ba0eec0de18c56b0a04c
coq/coq
assumptions.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/f9d51e99a68c9ccb8c08ad35d104cbd0a98750d8/vernac/assumptions.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
f1a4f43592c80df9dd8a7e1d789dcf86fc39e119a164ece5d77d7433c2996a2e
igrishaev/mockery
core.clj
(ns mockery.core "A library to mock Clojure functions.") (def ^:private +mock-defaults+ "Mock default fields." {:called? false :call-count 0 :call-args nil :call-args-list [] :return-list []}) (defn- keyword-to-symbol "Turns a keyword into a symbold." [kwd] (apply symbol ((juxt namespace nam...
null
https://raw.githubusercontent.com/igrishaev/mockery/356360fe43890cda6abfc4ec744779f4e85e93e7/src/mockery/core.clj
clojure
update mock fields trigger side effect trigger exception eval the value, save it and return
(ns mockery.core "A library to mock Clojure functions.") (def ^:private +mock-defaults+ "Mock default fields." {:called? false :call-count 0 :call-args nil :call-args-list [] :return-list []}) (defn- keyword-to-symbol "Turns a keyword into a symbold." [kwd] (apply symbol ((juxt namespace nam...
abd65fdff50e63c8ef4a6af12d6296e335457014e454d9703c76de49e17bd853
Beluga-lang/Beluga
id.ml
open Support type module_id = int type cid_typ = module_id * int type cid_term = module_id * int type cid_schema = module_id * int type cid_comp_typ = module_id * int type cid_comp_cotyp = module_id * int type cid_comp_const = module_id * int type cid_comp_dest = module_id * int type cid_comp_typdef = module_i...
null
https://raw.githubusercontent.com/Beluga-lang/Beluga/2f16a1b026f4decd7ace1981065bcb6e5fd8915b/src/core/id.ml
ocaml
* Used to identify a group of mutually proven theorems.
open Support type module_id = int type cid_typ = module_id * int type cid_term = module_id * int type cid_schema = module_id * int type cid_comp_typ = module_id * int type cid_comp_cotyp = module_id * int type cid_comp_const = module_id * int type cid_comp_dest = module_id * int type cid_comp_typdef = module_i...
8795ccebca22e4c7d48263f3c21c28c81547464d1dc71c5a5e467e1b8f2ec713
Butanium/monte-carlo-tree-search-TSP
Base_tsp.ml
let get_adj_matrix cities = let dist (c1x, c1y) (c2x, c2y) = int_of_float (0.5 +. sqrt (((c1x -. c2x) *. (c1x -. c2x)) +. ((c1y -. c2y) *. (c1y -. c2y))) ) in let city_count = Array.length cities in Array.init city_count (fun i -> Array.init city_count (fun j -> dist cities.(i) citie...
null
https://raw.githubusercontent.com/Butanium/monte-carlo-tree-search-TSP/6d3c1d8f36518438633fa5ec86c7d8e323dafb88/tsp_modules/Base_tsp.ml
ocaml
let check_tour_validity
let get_adj_matrix cities = let dist (c1x, c1y) (c2x, c2y) = int_of_float (0.5 +. sqrt (((c1x -. c2x) *. (c1x -. c2x)) +. ((c1y -. c2y) *. (c1y -. c2y))) ) in let city_count = Array.length cities in Array.init city_count (fun i -> Array.init city_count (fun j -> dist cities.(i) citie...
7e5b2a082f2257ab4407abca4155e348c4fa6b803a5c8eaa7c971eb643f0422e
runexec/chp
password.clj
(ns chp.password) (defn password [salt s] (let [password (str salt s)] (->> (doto (java.security.MessageDigest/getInstance "SHA-512") .reset (.update (.getBytes password))) .digest (map #(format "%02x" %)) (apply str)))) (defn salt ([] (salt ...
null
https://raw.githubusercontent.com/runexec/chp/9059399c46fb4106a73631c741f1e557af541a8b/src/chp/password.clj
clojure
(ns chp.password) (defn password [salt s] (let [password (str salt s)] (->> (doto (java.security.MessageDigest/getInstance "SHA-512") .reset (.update (.getBytes password))) .digest (map #(format "%02x" %)) (apply str)))) (defn salt ([] (salt ...
8cf9b54b9b287d87d587c4d6f95f17054173dc683425ebf4080adbc888f16d7d
zotonic/zotonic
z_gettext.erl
Copyright ( c ) 2006 , , %% 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 condition...
null
https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_core/src/i18n/z_gettext.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redis...
Copyright ( c ) 2006 , , * Neither the name of " Torbjorn Tornkvist " nor the names of any other THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNE...
2ed3d5c52b4d94b7299d20c4caff935dfeac1f964db6c7f86ee9142a6711ceea
aria42/flare
sentence_classification.clj
(ns flare.examples.sentence-classification "Main class for training/testing a bi-lstm sentence or cnn 1D classification model for sentences. Running this class as CLI will require an embedding file, as well as train/test files. Format described below: * embedding file: text format, each line formatted as: 'word di...
null
https://raw.githubusercontent.com/aria42/flare/9c7d90bf7bd876a154e705dd78645eb5c69ae590/src/flare/examples/sentence_classification.clj
clojure
An option with a required argument let-scope so the parameters get smart-nesting build logits take last output as hidden let-scope so the parameters get smart-nesting build logits classifier can use a cache to avoid re-allocating tensors across prediction report train/test accuracy each iter Train Accuracy T...
(ns flare.examples.sentence-classification "Main class for training/testing a bi-lstm sentence or cnn 1D classification model for sentences. Running this class as CLI will require an embedding file, as well as train/test files. Format described below: * embedding file: text format, each line formatted as: 'word di...
db8db34ed2614df312932f51519621e58f4f63efc2d3b6bcc9dda8683929da42
cvogt/2020-07-01-haskell-game-demo
GameState.hs
module Platformer.GameState where import Data.Aeson (FromJSON (parseJSON), ToJSON (toJSON)) import Data.List (zip) import "GLFW-b" Graphics.UI.GLFW import My.Prelude import Playtime data TextureId = FloorPlate | MainCharacter deriving (Eq, Ord, Show, Data, Bounded, Enum, Generic, NFData, ToJSON, FromJSON) textures...
null
https://raw.githubusercontent.com/cvogt/2020-07-01-haskell-game-demo/f90fcd19ea79802774dcfafe8505415d6f8c8a8b/platformer/Platformer/GameState.hs
haskell
module Platformer.GameState where import Data.Aeson (FromJSON (parseJSON), ToJSON (toJSON)) import Data.List (zip) import "GLFW-b" Graphics.UI.GLFW import My.Prelude import Playtime data TextureId = FloorPlate | MainCharacter deriving (Eq, Ord, Show, Data, Bounded, Enum, Generic, NFData, ToJSON, FromJSON) textures...
a4e45537504e509bc035ae6a3d2e3fb087096755d6dc2d49b1b7caae3954cb3b
bootstrapworld/curr
function-teachpack.rkt
#lang scheme/gui (require 2htdp/universe (lib "prim.ss" "lang") lang/prim 2htdp/image (except-in htdp/testing test) (for-syntax scheme/base)) (provide circle triangle rectangle ellipse star line text place-image empty-scene EXAMPLE) (provide-higher-order-primitive start (r...
null
https://raw.githubusercontent.com/bootstrapworld/curr/443015255eacc1c902a29978df0e3e8e8f3b9430/courses/algebra/resources/teachers/teachers-guide/teachpacks/function-teachpack.rkt
racket
dimensions: ----------------------------------------------------------------------------- draw-world: Number -> Image create an image that represents the world text-add : Number Image -> Image add the height of the rocket and the time elapsed to the image rocket-add : Number Image -> Image (Number (Number -...
#lang scheme/gui (require 2htdp/universe (lib "prim.ss" "lang") lang/prim 2htdp/image (except-in htdp/testing test) (for-syntax scheme/base)) (provide circle triangle rectangle ellipse star line text place-image empty-scene EXAMPLE) (provide-higher-order-primitive start (r...
773609fdd41824b594cf17b54aacd669655fa58418079232ee4bc0d181eb9b14
gelisam/typelevel-rewrite-rules
Laws.hs
# LANGUAGE ConstraintKinds , TypeFamilies # module InstanceConstraints.Laws where type family F a b type family G a b type FLaw a b = F a (F a b) ~ F a b
null
https://raw.githubusercontent.com/gelisam/typelevel-rewrite-rules/9a693dacfedd7cccec753b687020fa40364756f9/test/should-compile/InstanceConstraints/Laws.hs
haskell
# LANGUAGE ConstraintKinds , TypeFamilies # module InstanceConstraints.Laws where type family F a b type family G a b type FLaw a b = F a (F a b) ~ F a b
99b37ee5eaba7550d7af33c35e6a4e7d933cf27c044577a13b92780096d0d72c
hipsleek/hipsleek
optutil.ml
* * Copyright ( c ) 2001 - 2002 , * < > * < > * < > * 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...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/cil/src/ext/optutil.ml
ocaml
Define some utilities for optimization * A normal form for expression that generalizes constant folding: E = n0 * E0 + n A scaled expression plus a constant * A normal form for addresses that exposes the base, address and the index A = Base + scale * Index + offset ...
* * Copyright ( c ) 2001 - 2002 , * < > * < > * < > * 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...
48543f9310ef8bc52c3de82cc10ec8b6e6e98c54819240d745b0a41950d9cee6
lilactown/plum
update.clj
(ns plum.update (:gen-class) (:require [rewrite-clj.zip :as z] [rewrite-clj.node :as node] [plum.util :as util])) (def aliases `{:plum/inject {:extra-deps {lilactown/plum {:local/root ~(util/plum-location)}} :main-opts ["-m" "plum.inject"]} :plum/update {:extra-deps ...
null
https://raw.githubusercontent.com/lilactown/plum/c6d0c4db6d13fc55cb9bb5777bcef8e0928573f0/clj/src/plum/update.clj
clojure
(ns plum.update (:gen-class) (:require [rewrite-clj.zip :as z] [rewrite-clj.node :as node] [plum.util :as util])) (def aliases `{:plum/inject {:extra-deps {lilactown/plum {:local/root ~(util/plum-location)}} :main-opts ["-m" "plum.inject"]} :plum/update {:extra-deps ...
fc300de6ce8742cc93b1a4fd49926f6ad5f3b5e7296ce9097e19a885aa876b42
ejgallego/coq-serapi
ser_cSet.mli
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * INRIA , CNRS and contributors - Copyright 1999 - 2018 (* <O___,, * (see CREDITS file for the list of authors) *) \VV/ * * * *...
null
https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/serlib/ser_cSet.mli
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team <O___,, * (see CREDITS file for the list of authors) // * This file is distributed under the terms of the * (see LICENSE file for...
v * INRIA , CNRS and contributors - Copyright 1999 - 2018 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser General Public License Version 2.1 Copyright 2016 - 2019 MINES ParisT...
6b0d34332cd7af57046a3894e2fc1b8a403cd318ef08b58ec957384fff617dce
janestreet/base
option_array.ml
open! Import * [ ' a Cheap_option.t ] is like [ ' a option ] , but it does n't box [ some _ ] values . There are several things that are unsafe about it : - [ float t array ] ( or any array - backed container ) is not memory - safe because float array optimization is incompatible with unboxed opt...
null
https://raw.githubusercontent.com/janestreet/base/1462b7d5458e96569275a1c673df968ecbf3342f/src/option_array.ml
ocaml
This is taken from core. Rather than expose it in the public interface of base, just keep a copy around here.
open! Import * [ ' a Cheap_option.t ] is like [ ' a option ] , but it does n't box [ some _ ] values . There are several things that are unsafe about it : - [ float t array ] ( or any array - backed container ) is not memory - safe because float array optimization is incompatible with unboxed opt...
884e8292d5cf284f90ccd630397452bdcc05950ff60a7a2f82edfd87a3f719d0
fimad/prometheus-haskell
Observer.hs
module Prometheus.Metric.Observer ( Observer(..) , observeDuration , timeAction ) where import Data.Ratio ((%)) import Prometheus.MonadMonitor import Control.Monad.IO.Class import System.Clock (Clock(..), diffTimeSpec, getTime, toNanoSecs) -- | Interface shared by 'Summary' and 'Histogram'. class Observer me...
null
https://raw.githubusercontent.com/fimad/prometheus-haskell/4e2c2f1da1f891e9de3ce5a5260ae92882a9f35e/prometheus-client/src/Prometheus/Metric/Observer.hs
haskell
| Interface shared by 'Summary' and 'Histogram'. | Observe that a particular floating point value has occurred. observer metric. | Evaluate @io@ and return its result as well as how long it took to evaluate,
module Prometheus.Metric.Observer ( Observer(..) , observeDuration , timeAction ) where import Data.Ratio ((%)) import Prometheus.MonadMonitor import Control.Monad.IO.Class import System.Clock (Clock(..), diffTimeSpec, getTime, toNanoSecs) class Observer metric where For example , observe that this request...
c68cd334ddfe974ad802d7dc944b8526bb4d423686dcca25e58dcfe6302d1fae
haskellari/integer-logarithms
Natural.hs
-- | Module : Math . . Powers . Natural Copyright : ( c ) 2011 - 2014 Licence : MIT Maintainer : < > -- Stability: Provisional Portability : Non - portable ( GHC extensions ) -- -- Potentially faster power function for 'Natural' base and 'Int' -- or 'Word' exponent. -- # LANGUAGE CPP ...
null
https://raw.githubusercontent.com/haskellari/integer-logarithms/938a25f244930ee6e3079bbe3bc51618fa50ea68/src/Math/NumberTheory/Powers/Natural.hs
haskell
| Stability: Provisional Potentially faster power function for 'Natural' base and 'Int' or 'Word' exponent. # LANGUAGE Safe # # DEPRECATED "It is no faster than (^)" # | Power of an 'Natural' by the left-to-right repeated squaring algorithm. gains a bit when the result is large. For small results, it is...
Module : Math . . Powers . Natural Copyright : ( c ) 2011 - 2014 Licence : MIT Maintainer : < > Portability : Non - portable ( GHC extensions ) # LANGUAGE CPP # #if __GLASGOW_HASKELL__ >= 702 #if __GLASGOW_HASKELL__ >= 704 #else # LANGUAGE Trustworthy # #endif #endif module Mat...
7804b0486a04f7a9c20cfcdb03b7bc8a5d2a7391f52bc37738cc2af2c3fd21b8
PJK/haskell-pattern-matching
ReportExample.hs
f :: Bool -> Bool -> Int f _ True = 1 f True True = 2 f _ False = 3
null
https://raw.githubusercontent.com/PJK/haskell-pattern-matching/7ef4a45731beba92ee01614ae563df65be36e8ba/data/exact/ReportExample.hs
haskell
f :: Bool -> Bool -> Int f _ True = 1 f True True = 2 f _ False = 3
e641c7e2266272352daa39695fddd408d0b652c9e23f720ab57460a4fa708954
samcoy3/advent-of-code-template
Day04.hs
module Days.Day04 (runDay) where {- ORMOLU_DISABLE -} import Data.List import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Maybe import Data.Set (Set) import qualified Data.Set as Set import Data.Vector (Vector) import qualified Data.Vector as Vec import qualified Util.Util as U import qu...
null
https://raw.githubusercontent.com/samcoy3/advent-of-code-template/ddc27cfd7ca36d6ebf0df2a2297347d02ee0f1a6/src/Days/Day04.hs
haskell
ORMOLU_DISABLE ---------- PARSER ------------ -------- TYPES ------------ ---------- PART A ------------ ---------- PART B ------------
module Days.Day04 (runDay) where import Data.List import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Maybe import Data.Set (Set) import qualified Data.Set as Set import Data.Vector (Vector) import qualified Data.Vector as Vec import qualified Util.Util as U import qualified Program.RunDa...
b563bc6c775fa87b8565cda5d524ddec8995d556cba141001d9d6824e95fa41a
mtgred/netrunner
log.cljs
(ns nr.gameboard.log (:require [clojure.string :as string] [nr.angel-arena.log :as angel-arena-log] [nr.appstate :refer [app-state current-gameid]] [nr.avatar :refer [avatar]] [nr.gameboard.actions :refer [send-command]] [nr.gameboard.card-preview :refer [card-preview-mouse-out ...
null
https://raw.githubusercontent.com/mtgred/netrunner/b3e1a5574dd73063116a11d50d740a79b5717d00/src/cljs/nr/gameboard/log.cljs
clojure
ArrowUp auto send when no args needed else
(ns nr.gameboard.log (:require [clojure.string :as string] [nr.angel-arena.log :as angel-arena-log] [nr.appstate :refer [app-state current-gameid]] [nr.avatar :refer [avatar]] [nr.gameboard.actions :refer [send-command]] [nr.gameboard.card-preview :refer [card-preview-mouse-out ...