_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
b77b8ab377a7ebcf299ef9c64ed6fa7bb06dfdcc45ddc63a24e30433cdd9d617
jacekschae/learn-reitit-course-files
recipes_tests.clj
(ns cheffy.recipes-tests (:require [clojure.test :refer :all] [cheffy.server :refer :all] [cheffy.test-system :as ts])) (use-fixtures :once ts/token-fixture) (def recipe-id (atom nil)) (def step-id (atom nil)) (def recipe {:img "-1547516508-4c1f9c7c4ec3?ixlib=rb-1.2.1&ixid=eyJhcHBf...
null
https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/39-ingredient-tests/test/cheffy/recipes_tests.clj
clojure
(ns cheffy.recipes-tests (:require [clojure.test :refer :all] [cheffy.server :refer :all] [cheffy.test-system :as ts])) (use-fixtures :once ts/token-fixture) (def recipe-id (atom nil)) (def step-id (atom nil)) (def recipe {:img "-1547516508-4c1f9c7c4ec3?ixlib=rb-1.2.1&ixid=eyJhcHBf...
fe569930e93c59bf07e2319d8ba6f7cd57d80fd7d9d885829ea161a7268a8173
HunterYIboHu/htdp2-solution
ex113-checked-make-vec.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex113-checked-make-vec) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section6/ex113-checked-make-vec.rkt
racket
about the language level of this file in a form that our tools can easily process. A vec is (make-vec PositiveNumber PositiveNumber) interpretation represents a velocity vector Any Any -> Number checks that a is x and y are proper inputs for function make-vec examples:
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex113-checked-make-vec) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t write repeating-decimal ...
60b3b8a9ba70957070bdb1cbe5719fa3cd3f49cb5a3bcece8ba972749d2fdff5
leo-project/leofs
leo_storage_api_tests.erl
%%==================================================================== %% LeoStorage %% Copyright ( c ) 2012 - 2018 Rakuten , Inc. %% 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 co...
null
https://raw.githubusercontent.com/leo-project/leofs/4ff701e0f4a4cf39a968dbe078b9c2412a22f995/apps/leo_storage/test/leo_storage_api_tests.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 permissi...
LeoStorage Copyright ( c ) 2012 - 2018 Rakuten , Inc. 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(leo_storage_api...
1a00f5e3c3132bf899005924a17f4ddcb60fe01a5048b4bb97a27f77af42bd51
gregcman/sucle
menu.lisp
(defpackage #:menu (:use :cl) (:export #:*data* #:*w* #:*h* #:tick #:use #:start)) (in-package #:menu) ;;Ripped from sucle-test essentially. (defparameter *view* ;;dimensions insignificant: overwritten later (ncurses-clone:ncurses-newwin 5 50 0 0)) (defun menu-app () (app:push-mode 'tick) ...
null
https://raw.githubusercontent.com/gregcman/sucle/258be4ac4daaceea06a55f893227584d3772bb47/src/sucle/menu.lisp
lisp
Ripped from sucle-test essentially. dimensions insignificant: overwritten later -> inspired by html dom? do buttons FIXME:move run-buttons somewhere? do items ************************************************************************;;;;
(defpackage #:menu (:use :cl) (:export #:*data* #:*w* #:*h* #:tick #:use #:start)) (in-package #:menu) (defparameter *view* (ncurses-clone:ncurses-newwin 5 50 0 0)) (defun menu-app () (app:push-mode 'tick) (ncurses-clone-for-lem:init) (app:default-loop)) (defun start () (app:enter 'menu...
d9a67d340731154b251257bf39ae4d12bad15bfc2155349c411a1a185ad81a43
racket/math
array-broadcast.rkt
#lang typed/racket (require racket/fixnum "array-struct.rkt" "../unsafe.rkt" "utils.rkt") (provide array-broadcasting array-broadcast array-shape-broadcast) (: array-broadcasting (Parameterof (U #f #t 'permissive))) (define array-broadcasting (make-parameter #t)) (: shif...
null
https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-lib/math/private/array/array-broadcast.rkt
racket
#lang typed/racket (require racket/fixnum "array-struct.rkt" "../unsafe.rkt" "utils.rkt") (provide array-broadcasting array-broadcast array-shape-broadcast) (: array-broadcasting (Parameterof (U #f #t 'permissive))) (define array-broadcasting (make-parameter #t)) (: shif...
09c5be882d845783e92ec346071ba65840cad9fdfa8df73d02b02363cee90278
darkleaf/publicator
explain_data.clj
(ns publicator.web.presenters.explain-data (:require [clojure.spec.alpha :as s] [phrase.alpha :as phrase])) todo : , например : (phrase/defphraser :default [ctx {:keys [in]}] [in "Неизвестная ошибка"]) (phrase/defphraser #(contains? % k) [ctx {:keys [in]} k] [(conj in k) "Обязательное"]) (phras...
null
https://raw.githubusercontent.com/darkleaf/publicator/e07eee93d8f3d9c07a15d574619d5ea59c00f87d/web/src/publicator/web/presenters/explain_data.clj
clojure
(ns publicator.web.presenters.explain-data (:require [clojure.spec.alpha :as s] [phrase.alpha :as phrase])) todo : , например : (phrase/defphraser :default [ctx {:keys [in]}] [in "Неизвестная ошибка"]) (phrase/defphraser #(contains? % k) [ctx {:keys [in]} k] [(conj in k) "Обязательное"]) (phras...
4a99d3bb6e5a6495d9ec3e93531e305a5be4ba968301f9e4cc955c2b9c1113ff
libguestfs/virt-v2v
networks.mli
virt - v2v * Copyright ( C ) 2009 - 2020 Red Hat Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at your option ) any later ...
null
https://raw.githubusercontent.com/libguestfs/virt-v2v/4de22686fe74e1711efd9bfed3f663b67e7ad69e/lib/networks.mli
ocaml
* The map. * Create an empty mapping. * Add a network mapping from C<in> to C<out>. Equivalent to the [--network in:out] option. * Add a default network mapping. Equivalent to the [--network out] option. * Add a bridge mapping from C<in> to C<out>. Equivalent to the [--bridge in:out] option.
virt - v2v * Copyright ( C ) 2009 - 2020 Red Hat Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at your option ) any later ...
0f62cf2f785aac07aa328ee79fd1feaa40a9351b49928d92f8149bf2e4ee72a7
screenshotbot/screenshotbot-oss
test-lists.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 /. (defpackage :util/tests/test-lists (:use #:cl #:util/lists #:fiveam) ...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/0db6e62ba5d6484aa5b803b757885435ad651985/src/util/tests/test-lists.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 /. (defpackage :util/tests/test-lists (:use #:cl #:util/lists #:fiveam) (:local-nicknames (#:a #:alexandria))) (in-package :ut...
b5ae21b78b497ec531f6ddbc34e1dd35d94545b9e316612ada7a2f6ab7bc0489
nedap/speced.def
analysis.cljc
(ns nedap.speced.def.impl.analysis (:require #?(:clj [clojure.core.specs.alpha :as specs] :cljs [cljs.core.specs.alpha :as specs]) [clojure.spec.alpha :as spec] [clojure.walk :as walk] [nedap.speced.def.impl.parsing :refer [extract-specs-from-metadata fntails]] [nedap.speced.def.impl.type-hinting :refe...
null
https://raw.githubusercontent.com/nedap/speced.def/55053e53e749f77753294f3ee8d4639470840f8c/src/nedap/speced/def/impl/analysis.cljc
clojure
plain args will be analyzed separately Avoid "Can't type hint a primitive local" error: maybe there was no :pre. Ensure it's a vector: maybe there was no :post. Ensure it's a vector: because that's not their expected position. Avoid that:
(ns nedap.speced.def.impl.analysis (:require #?(:clj [clojure.core.specs.alpha :as specs] :cljs [cljs.core.specs.alpha :as specs]) [clojure.spec.alpha :as spec] [clojure.walk :as walk] [nedap.speced.def.impl.parsing :refer [extract-specs-from-metadata fntails]] [nedap.speced.def.impl.type-hinting :refe...
49398623b2df1b4f6b812de645af79adf0033d6aa3439c6f0ccc9270c219d60e
borodust/claw-legacy
packages.lisp
(cl:defpackage :claw (:use :claw.util :claw.wrapper :claw.cffi.c) (:export #:defwrapper #:build-adapter #:initialize-adapter))
null
https://raw.githubusercontent.com/borodust/claw-legacy/3cd4a96fca95eb9e8d5d069426694669f81b2250/src/packages.lisp
lisp
(cl:defpackage :claw (:use :claw.util :claw.wrapper :claw.cffi.c) (:export #:defwrapper #:build-adapter #:initialize-adapter))
ff732274448c4e00295f56a2d8da91b82725fc4dc6b0dfbf9d75956cc385aae7
kappelmann/eidi2_repetitorium_tum
exceptions.ml
exception MyException;; exception ParException of string let f a = if a=0 then raise MyException else if a=1 then raise (ParException "failed") else a throws let e = try f 0 with MyException -> 10 | ParException _ -> 11 e is now 10 let e = try f 1 with MyException -> 10 | ParException _ -> 11 e is now 11 let e = try f...
null
https://raw.githubusercontent.com/kappelmann/eidi2_repetitorium_tum/1d16bbc498487a85960e0d83152249eb13944611/2016/introduction/exceptions.ml
ocaml
exception MyException;; exception ParException of string let f a = if a=0 then raise MyException else if a=1 then raise (ParException "failed") else a throws let e = try f 0 with MyException -> 10 | ParException _ -> 11 e is now 10 let e = try f 1 with MyException -> 10 | ParException _ -> 11 e is now 11 let e = try f...
16518bbdcd6c48f8d955f455347b848d0c6e948d6c4be959a207ce95cdd78ae1
brendanhay/gogol
TextToSpeech.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-texttospeech/gen/Gogol/TextToSpeech.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Synthesizes natural-sounding speech by applying powerful neural network models. /See:/ <-to-speech/ Cloud Text-to-Speech API Reference> * Configuration * Resources ** texttospeech.text.synthesize ** texttospeech.voices.list ...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
beb6318595e41876d57e91f03c64e229908610038fe5ef1b80de80888f3b0d7c
ucsd-progsys/liquidhaskell
Properties.hs
{-# OPTIONS -fglasgow-exts -w #-} module Properties where import XMonad.StackSet hiding (filter) import XMonad.Layout import XMonad.Core hiding (workspaces,trace) import XMonad.Operations ( applyResizeIncHint, applyMaxSizeHint ) import qualified XMonad.StackSet as S (filter) import Debug.Trace import Data.Word impor...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/benchmarks/xmonad-0.10/tests/Properties.hs
haskell
# OPTIONS -fglasgow-exts -w # --------------------------------------------------------------------- idempotent, or both. number of workspaces pick one to be in focus a number of physical screens pick any layout a vector of sz workspaces pick a random item in each stack to focus keeping track of the curre...
module Properties where import XMonad.StackSet hiding (filter) import XMonad.Layout import XMonad.Core hiding (workspaces,trace) import XMonad.Operations ( applyResizeIncHint, applyMaxSizeHint ) import qualified XMonad.StackSet as S (filter) import Debug.Trace import Data.Word import Graphics.X11.Xlib.Types (Rectang...
49a94b99adb2121c3f3fddbcdfa948e8e3d9582afc7ad5574efabd0865f0ce64
codedownio/sandwich
Binaries.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE CPP , QuasiQuotes , ScopedTypeVariables , NamedFieldPuns , Rank2Types # module Test.Sandwich.WebDriver.Internal.Binaries ( obtainSelenium , obtainChromeDriver , obtainGeckoDriver , downloadSeleniumIfNecessary , downloadChromeDriverIfNecessary ) where import Cont...
null
https://raw.githubusercontent.com/codedownio/sandwich/03ccba2bf415fe4ebe3a1b3f3e3e854e17a8f383/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Binaries.hs
haskell
# LANGUAGE ConstraintKinds # * Obtaining binaries TODO: remove curl dependencies here storing it under the provided 'FilePath' if necessary and returning the exact path. | Manually obtain a chromedriver binary, according to the 'ChromeDriverToUse' policy, storing it under the provided 'FilePath' if necessary and r...
# LANGUAGE CPP , QuasiQuotes , ScopedTypeVariables , NamedFieldPuns , Rank2Types # module Test.Sandwich.WebDriver.Internal.Binaries ( obtainSelenium , obtainChromeDriver , obtainGeckoDriver , downloadSeleniumIfNecessary , downloadChromeDriverIfNecessary ) where import Control.Monad import Control.Monad.IO...
30570e5c0a6d055a8b2b5503e5aa24670bbc7a1c024921a84b91f70b9a84283e
jonasrichard/ejson
ejson_map_test.erl
-module(ejson_map_test). -export([to_jsx/2, from_jsx/1]). -include_lib("eunit/include/eunit.hrl"). -import(ejson_test_util, [json_path/2]). map_test_() -> Rules = [{address, {map, data, [{pre_encode, {?MODULE, to_jsx}}, {post_decode, {?MODULE, from_jsx}}]}}], Address = {a...
null
https://raw.githubusercontent.com/jonasrichard/ejson/5838272523e7acb9012c7c5334bad98c69b481af/test/ejson_map_test.erl
erlang
-module(ejson_map_test). -export([to_jsx/2, from_jsx/1]). -include_lib("eunit/include/eunit.hrl"). -import(ejson_test_util, [json_path/2]). map_test_() -> Rules = [{address, {map, data, [{pre_encode, {?MODULE, to_jsx}}, {post_decode, {?MODULE, from_jsx}}]}}], Address = {a...
31af9455a96833fb93e85f545ee77da9d705c0abd2328071501f0d7bec70042f
ktakashi/sagittarius-scheme
websocket.scm
#!read-macro=sagittarius/bv-string (import (rnrs) (rfc websocket) (rfc websocket connection) ;; for websocket-connection-port (rfc websocket messages) (sagittarius control) (sagittarius socket) (sagittarius io) (clos user) (net server) (binary io) (srfi :18) (srfi :39 parameters) (srfi :64) (rfc :5322) (r...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/623d7893cab2e373cf4cd5ff8f6386eeda27b362/test/tests/rfc/websocket.scm
scheme
for websocket-connection-port for testing, we need this it won't connect until handshake (depending on the engine of course but default is http) high level APIs test condition tests don't mask for my sake for some reason closing this wouldn't remove from buffered port lists. i don't know why. (define in/out (b...
#!read-macro=sagittarius/bv-string (import (rnrs) (rfc websocket) (rfc websocket messages) (sagittarius control) (sagittarius socket) (sagittarius io) (clos user) (net server) (binary io) (srfi :18) (srfi :39 parameters) (srfi :64) (rfc :5322) (rfc base64) (sagittarius crypto digests) (util concurrent sh...
dfbe8388fcb7bb4b0afe72e2ac60913773e7aaf9b55e8f394c436668aa5ea41a
pixlsus/registry.gimp.org_static
guides-every-x-pixel.scm
; -*-scheme-*- 2009 . No copyright . Public Domain . Script based on rule-of-thirds.scm by (define (script-fu-guide-rot image drawable direction size) (let* ( (width (car (gimp-image-width image))) (height (car (gimp-image-height image))) (position 0) (imgsize width) ...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/guides-every-x-pixel.scm
scheme
-*-scheme-*-
2009 . No copyright . Public Domain . Script based on rule-of-thirds.scm by (define (script-fu-guide-rot image drawable direction size) (let* ( (width (car (gimp-image-width image))) (height (car (gimp-image-height image))) (position 0) (imgsize width) ) (i...
90a98f5738309ce24abfc2890597e37e2e473a5c0d872814228c749f65227da3
grayswandyr/electrod
Relation.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * electrod - a model finder for relational first - order linear temporal logic * * Copyright ( C ) 2016 - 2020 ONERA * Authors : ( ONERA ) , ( ONERA...
null
https://raw.githubusercontent.com/grayswandyr/electrod/eb0b02eafb34b6c921f99716cb5e90c946aae51b/src/Relation.ml
ocaml
shadows const
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * electrod - a model finder for relational first - order linear temporal logic * * Copyright ( C ) 2016 - 2020 ONERA * Authors : ( ONERA ) , ( ONERA...
f6eecd6b0c5dc9fa944a1917f3063f8c13d91e7d3a0a4b7f0b0318cdca837b2d
sbcl/sbcl
arith.pure.lisp
;;;; arithmetic tests with no side effects This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch after the fork from CMU CL . ;;;; ;;;; This software is in...
null
https://raw.githubusercontent.com/sbcl/sbcl/95513aefc379bcab2d7dd67b3fb71c08ba109f4c/tests/arith.pure.lisp
lisp
arithmetic tests with no side effects more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. unlikely that anything with such fundamental arithmet...
This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . (enable-test-parallelism) Once upon a time , in the process of porting CMUCL 's SPARC backend to SBCL , multiplications were excitingly broken . While it 's (wi...
2e742a4ceea263c8b2d16cd6e0025e441508673f1c964c1742424dc2c65654c5
lambdaisland/harvest
kernel.cljc
(ns lambdaisland.harvest.kernel "Heart of the Harvest factory logic This is strictly a Mechanism namespace: generic, unopinionated, verbose. See [[lambdaisland.harvest]] for an interface meant for human consumption." (:refer-clojure :exclude [ref]) (:require [lambdaisland.data-printers :as data-printers])) ...
null
https://raw.githubusercontent.com/lambdaisland/harvest/17e601ee9718ef2c915e469ed62ea963c43db17e/src/lambdaisland/harvest/kernel.cljc
clojure
for hooks, like input, but guaranteed to be unwrapped hook passed-in as option
(ns lambdaisland.harvest.kernel "Heart of the Harvest factory logic This is strictly a Mechanism namespace: generic, unopinionated, verbose. See [[lambdaisland.harvest]] for an interface meant for human consumption." (:refer-clojure :exclude [ref]) (:require [lambdaisland.data-printers :as data-printers])) ...
6f712bca0f85f022b71f2c2fcde133595e7f13e1309b4c4c25e8717605a1fe90
chrisdone/duet
lists.hs
data List a = Nil | Cons a (List a) map = \f xs -> case xs of Nil -> Nil Cons x xs -> Cons (f x) (map f xs) list = (Cons 1 (Cons 2 Nil)) multiply = \x y -> x * y doubleAll = \xs -> map (multiply 2) xs main = doubleAll list
null
https://raw.githubusercontent.com/chrisdone/duet/959d40db68f4c2df04cabb7677724900d4f71db4/examples/lists.hs
haskell
data List a = Nil | Cons a (List a) map = \f xs -> case xs of Nil -> Nil Cons x xs -> Cons (f x) (map f xs) list = (Cons 1 (Cons 2 Nil)) multiply = \x y -> x * y doubleAll = \xs -> map (multiply 2) xs main = doubleAll list
09805fa3730ef4a159b65476f2a269368f1b67e852c4347de89ec3589cb0d802
PLTools/GT
test091eval.ml
module M = Map.Make (String) class enumerator = object val i = 0 val m = M.empty method add name = {< i = i + 1; m = M.add name i m >}, i method lookup name = M.find name m end let lookup env name = (env, env#lookup name) let unused _ _ = failwith "*** Using the unused ***" let rec fix f x = f...
null
https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/regression/test091eval.ml
ocaml
module M = Map.Make (String) class enumerator = object val i = 0 val m = M.empty method add name = {< i = i + 1; m = M.add name i m >}, i method lookup name = M.find name m end let lookup env name = (env, env#lookup name) let unused _ _ = failwith "*** Using the unused ***" let rec fix f x = f...
23f25b22831ad4e7d898aab8ed9a402a3274658405ba1ba49b09be6bd126a704
haskell/network
Internal.hs
# LANGUAGE CPP # -- | Module : Network . Socket . ByteString . Internal Copyright : ( c ) 2007 - 2010 -- License : BSD-style -- -- Maintainer : -- Stability : stable -- Portability : portable -- module Network.Socket.ByteString.Internal ( mkInvalidRecvArgError #if !defined(mingw32_HOST...
null
https://raw.githubusercontent.com/haskell/network/87bd969bb39e91292f0c1e1a1b2f29333145eb80/Network/Socket/ByteString/Internal.hs
haskell
| License : BSD-style Maintainer : Stability : stable Portability : portable
# LANGUAGE CPP # Module : Network . Socket . ByteString . Internal Copyright : ( c ) 2007 - 2010 module Network.Socket.ByteString.Internal ( mkInvalidRecvArgError #if !defined(mingw32_HOST_OS) , c_writev #else , c_wsasend #endif , c_sendmsg , c_recvmsg ) where #include "Hs...
995b74b4d333b83a1b8055bf3701707a3b64f37c83b89c73abc08696a343ccf2
psholtz/MIT-SICP
exercise1-08d.scm
;; Exercise 1.8 ;; ;; Although not required, I thought it would be useful ;; to have all the sqrt code bundled together in the scope ;; of a single block, as demonstrated in the text. ;; ;; define the "square" form (define (square x) (* x x)) ;; ;; Block defining the square root procedure. ;; (define (sqrt x) (de...
null
https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-1.1/mit-scheme/exercise1-08d.scm
scheme
Although not required, I thought it would be useful to have all the sqrt code bundled together in the scope of a single block, as demonstrated in the text. define the "square" form Block defining the square root procedure. Run some unit tests:
Exercise 1.8 (define (square x) (* x x)) (define (sqrt x) (define tolerance 0.001) (define (good-enough? guess) (< (abs (- (/ (square guess) x) 1.0)) tolerance)) (define (improve guess) (average guess (/ x guess))) (define (average a b) (/ (+ a b) 2)) (define (sqrt-iter guess) (if (good-en...
00f9a46cf7cb9d0ec30f4bb9ebce76c6aaaf94864c1883423e8f2027aa35e091
rtrusso/scp
syntax1.scm
(let ((a 1)) (letrec-syntax ((foo (syntax-rules () ((_ b) (bar a b)))) (bar (syntax-rules () ((_ c d) (cons c (let ((c 3)) (list d c c))))))) (let ((a 2)) (foo a))))
null
https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/tests/syntax1.scm
scheme
(let ((a 1)) (letrec-syntax ((foo (syntax-rules () ((_ b) (bar a b)))) (bar (syntax-rules () ((_ c d) (cons c (let ((c 3)) (list d c c))))))) (let ((a 2)) (foo a))))
1e474d27e6404eeea426796636ee9e7f1a35e593f4e9f28d432efae216de34f5
cfelde/cljs4excel
project.clj
(defproject cljs4excel "0.2.1-SNAPSHOT" :description "ClojureScript REPL within Microsoft Excel" :url "" :license {:name "Eclipse Public License - v 1.0" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.145"] [cljsjs/...
null
https://raw.githubusercontent.com/cfelde/cljs4excel/4b96fb9ee0dc2167badcd3df62438b4cd36582a7/project.clj
clojure
default: target/cljsbuild-main.js
(defproject cljs4excel "0.2.1-SNAPSHOT" :description "ClojureScript REPL within Microsoft Excel" :url "" :license {:name "Eclipse Public License - v 1.0" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.145"] [cljsjs/...
d26fcd92b8d2ab40100c98a14a73f82d1ff1456420d55a16596e4140971349cd
pupeno/prerenderer
core.cljs
Copyright © 2015 Carousel Apps , Ltd. All rights reserved . (ns prerenderer.core (:require [cljs.nodejs :as nodejs] [cljs.tools.cli :refer [parse-opts]] [clojure.string :as string])) (nodejs/enable-util-print!) (def http (nodejs/require "http")) (def express (nodejs/require "express")) ...
null
https://raw.githubusercontent.com/pupeno/prerenderer/be25597ce2eb96f450af1086fa999ddaafd3e068/src/cljs/prerenderer/core.cljs
clojure
Copyright © 2015 Carousel Apps , Ltd. All rights reserved . (ns prerenderer.core (:require [cljs.nodejs :as nodejs] [cljs.tools.cli :refer [parse-opts]] [clojure.string :as string])) (nodejs/enable-util-print!) (def http (nodejs/require "http")) (def express (nodejs/require "express")) ...
ee6404ec8b24d799bdb653ef5b0b0df01a25a27c42ce778e986b434811585a72
fortytools/holumbus
DCount.hs
module Holumbus.MapReduce.Examples.Count.DCount ( countMap , countReduce , K1 , V1 ) where import Holumbus.MapReduce.Examples.Count.SimpleDMapReduceIO import Control.DeepSeq import Holumbus.MapReduce.Types import Data.Maybe (mapMaybe) type Options = String type K1 = Int type V1 = [String] type K2 = Int type V2 ...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/mapreduce/Examples2/Count/Count_2/source/Holumbus/MapReduce/Examples/Count/DCount.hs
haskell
so mod will give the key as answer type ReduceFunction a k2 v2 v3 = ActionEnvironment -> a -> k2 -> [v2] -> IO (Maybe v3)
module Holumbus.MapReduce.Examples.Count.DCount ( countMap , countReduce , K1 , V1 ) where import Holumbus.MapReduce.Examples.Count.SimpleDMapReduceIO import Control.DeepSeq import Holumbus.MapReduce.Types import Data.Maybe (mapMaybe) type Options = String type K1 = Int type V1 = [String] type K2 = Int type V2 ...
8ab78c56eaa19b357555855fe98348a19f6ccdda7b467a2de171d28df04807f3
nikita-volkov/deque
Defs.hs
# LANGUAGE CPP # -- | Definitions of strict . -- -- The typical `toList` and `fromList` conversions are provided by means of the ` Foldable ` and ` IsList ` instances . module Deque.Strict.Defs where import Control.Monad (fail) import Deque.Prelude hiding (dropWhile, filter, head, init, last, null, reverse, tail...
null
https://raw.githubusercontent.com/nikita-volkov/deque/d502228de73bd6e68b0ead258a27be4d0db3812c/library/Deque/Strict/Defs.hs
haskell
| The typical `toList` and `fromList` conversions are provided by means of | | \(\mathcal{O}(n)\). | \(\mathcal{O}(1)\). Add element in the beginning. | \(\mathcal{O}(1)\). Add element in the ending. | \(\mathcal{O}(1)\). Reverse the deque. | \(\mathcal{O}(1)\), occasionally \(\mathcal{O}(n)\). @ λ ...
# LANGUAGE CPP # Definitions of strict . the ` Foldable ` and ` IsList ` instances . module Deque.Strict.Defs where import Control.Monad (fail) import Deque.Prelude hiding (dropWhile, filter, head, init, last, null, reverse, tail, take, takeWhile) import qualified Deque.Prelude as Prelude import qualified Strict...
3efc9cdffe174c922674a3c8009aeac9d8e1b913ca08de033a915abc98beb2dd
grin-compiler/ghc-wpc-sample-programs
Termination.hs
# LANGUAGE ImplicitParams # -- | Termination checker, based on -- \"A Predicative Analysis of Structural Recursion\" by and ( JFP'01 ) , -- and \"The Size - Change Principle for Program Termination\ " by , , and ( POPL'01 ) . module Agda.Termination.Termination ( terminates , ...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/Termination/Termination.hs
haskell
| Termination checker, based on \"A Predicative Analysis of Structural Recursion\" by and | TODO: This comment seems to be partly out of date. recursive function application. @'Right' perms@ is returned if the functions are size-change terminating. If termination can not be established, then @'Left' pro...
# LANGUAGE ImplicitParams # and ( JFP'01 ) , \"The Size - Change Principle for Program Termination\ " by , , and ( POPL'01 ) . module Agda.Termination.Termination ( terminates , terminatesFilter , endos , idempotent ) where import Agda.Termination.CutOff import Agda.Terminati...
6e4d23f01b83ae00c006ca5b667de70118fa9fe9df83499793750e0cc985c6ae
r0man/sqlingvo
update_test.cljc
(ns sqlingvo.update-test (:require #?(:clj [sqlingvo.test :refer [db sql=]] :cljs [sqlingvo.test :refer [db] :refer-macros [sql=]]) [clojure.test :refer [deftest is]] [sqlingvo.core :as sql])) (deftest test-update-keyword-db (sql= (sql/update :postgresql :films {:ki...
null
https://raw.githubusercontent.com/r0man/sqlingvo/1f13624ed60ec0866fe51311d92da73638708172/test/sqlingvo/update_test.cljc
clojure
(ns sqlingvo.update-test (:require #?(:clj [sqlingvo.test :refer [db sql=]] :cljs [sqlingvo.test :refer [db] :refer-macros [sql=]]) [clojure.test :refer [deftest is]] [sqlingvo.core :as sql])) (deftest test-update-keyword-db (sql= (sql/update :postgresql :films {:ki...
369c638d80f36bababf7afa1fad0bea3fc80275727c8838aaa5f016a1e4ae329
emqx/emqx
emqx_ee_bridge_influxdb.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %%-------------------------------------------------------------------- -module(emqx_ee_bridge_influxdb). -include_lib("emqx_bridge/include/emqx_bridge.hrl"). -include_l...
null
https://raw.githubusercontent.com/emqx/emqx/291755f81f2a3ac939990fe127b4a2b4ee6b5563/lib-ee/emqx_ee_bridge/src/emqx_ee_bridge_influxdb.erl
erlang
-------------------------------------------------------------------- -------------------------------------------------------------------- ------------------------------------------------------------------------------------------------- api -----------------------------------------------------------------------------...
Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . -module(emqx_ee_bridge_influxdb). -include_lib("emqx_bridge/include/emqx_bridge.hrl"). -include_lib("emqx_connector/include/emqx_connector.hrl"). -include_lib("typerefl/include/types.hrl"). -include_lib("hocon/include/hoconsc.hrl"). -impo...
464715d67c5ef5f62f80059b82e749b6cf1c0ae14d25eaeef8c923489a86e96c
txyyss/Project-Euler
Euler117.hs
-- Using a combination of black square tiles and oblong tiles chosen from : red tiles measuring two units , green tiles measuring three units , and blue tiles measuring four units , it is possible to tile a row measuring five units in length in exactly fifteen different -- ways. How many ways can a row measur...
null
https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler117.hs
haskell
Using a combination of black square tiles and oblong tiles chosen ways.
from : red tiles measuring two units , green tiles measuring three units , and blue tiles measuring four units , it is possible to tile a row measuring five units in length in exactly fifteen different How many ways can a row measuring fifty units in length be tiled ? NOTE : This is related to problem 116 ...
a8001c39674fcf80c8ded5ee9fbf5a3a227055b02da41ec650aa7187da1a4214
8c6794b6/haskell-sc-scratch
Cookbook07.hs
------------------------------------------------------------------------------ -- | -- Module : SCHelp.PG.Cookbook07 Copyright : 8c6794b6 < > -- License : BSD3 Maintainer : 8c6794b6 -- Stability : experimental -- Portability : portable -- -- Exercise for implementing pattern sequences shown in -- /...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/SCHelp/PG/Cookbook07.hs
haskell
---------------------------------------------------------------------------- | Module : SCHelp.PG.Cookbook07 License : BSD3 Stability : experimental Portability : portable Exercise for implementing pattern sequences shown in /PG_Cookbook06_Phrase_Network/. Current problem for this implementation is...
Copyright : 8c6794b6 < > Maintainer : 8c6794b6 module SCHelp.PG.Cookbook07 where import Control.Applicative import Control.Monad import Control.Monad.State import Data.IntMap (IntMap) import Data.Map (Map) import Data.Monoid (mappend, mconcat) import System.Random import qualified Data.IntMap as IM import q...
ba147f9da2b4613f425dc4698cf1fc54a6953bcad8571c3384501128de15b6f6
jeannekamikaze/Spear
Program.hs
module Spear.Render.Program ( StaticProgram(..) , AnimatedProgram(..) , Program(..) , ProgramUniforms(..) , StaticProgramChannels(..) , StaticProgramUniforms(..) , AnimatedProgramChannels(..) , AnimatedProgramUniforms(..) ) where import Spear.GL data StaticProgram = StaticProgram ...
null
https://raw.githubusercontent.com/jeannekamikaze/Spear/4ce19dca3441d1e079a66e2f3dc55b77a7f0898f/Spear/Render/Program.hs
haskell
^ Normal channel. ^ Texture channel. ^ Texture channel. ^ Material ambient uniform location. ^ Material diffuse uniform location. ^ Material specular uniform location. ^ Material shininess uniform location. ^ Texture sampler location. ^ Modelview matrix location. ^ Normal matrix location. ^ Project...
module Spear.Render.Program ( StaticProgram(..) , AnimatedProgram(..) , Program(..) , ProgramUniforms(..) , StaticProgramChannels(..) , StaticProgramUniforms(..) , AnimatedProgramChannels(..) , AnimatedProgramUniforms(..) ) where import Spear.GL data StaticProgram = StaticProgram ...
642e9d31929e7bbb3e65073864a1c2777a92d2bb1de7693fff402a5ae7ad349a
footprintanalytics/footprint-web
honeysql_extensions.clj
(ns metabase.util.honeysql-extensions (:refer-clojure :exclude [+ - / * abs mod inc dec cast concat format second]) (:require [clojure.pprint :as pprint] [clojure.string :as str] [honeysql.core :as hsql] [honeysql.format :as hformat] honeysql.types [metaba...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/util/honeysql_extensions.clj
clojure
Add an `:h2` quote style that uppercases the identifier with calculated columns with numeric literals -- some SQL databases can't recognize that a calculated field in a SELECT clause and a GROUP BY clause is the same thing if the calculation involves parameters. Go ahead an use the queries. The easiest way around t...
(ns metabase.util.honeysql-extensions (:refer-clojure :exclude [+ - / * abs mod inc dec cast concat format second]) (:require [clojure.pprint :as pprint] [clojure.string :as str] [honeysql.core :as hsql] [honeysql.format :as hformat] honeysql.types [metaba...
a90bc6c72efc1c788cc43144586dd09a807c209e3d0f5fea5544d39c25cfbf2c
nuvla/api-server
data_object_template_public.clj
(ns sixsq.nuvla.server.resources.data-object-template-public " This template creates a resource representing an object in S3 that can be accessed by anyone via a fixed URL. " (:require [sixsq.nuvla.server.resources.common.utils :as u] [sixsq.nuvla.server.resources.data-object :as do] [sixsq.nuvla.server...
null
https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/src/sixsq/nuvla/server/resources/data_object_template_public.clj
clojure
resource initialization: register this data object generic template multimethods for validation
(ns sixsq.nuvla.server.resources.data-object-template-public " This template creates a resource representing an object in S3 that can be accessed by anyone via a fixed URL. " (:require [sixsq.nuvla.server.resources.common.utils :as u] [sixsq.nuvla.server.resources.data-object :as do] [sixsq.nuvla.server...
122aadc2075153f718e198de6b24091e6d91c916104bbb468a1aa01056aa8d18
mput/sicp-solutions
3_51.rkt
#lang sicp (#%require sicp) (#%provide stream-car stream-cdr stream-enumerate-interval stream-ref stream-filter stream-map display-stream) (define (stream-car x) (car x)) (define (stream-cdr x) (force (cdr x))) (define (stream-enumerate-interval min max) (if (> min max) the-empty-stream (cons-stream m...
null
https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/3_51.rkt
racket
0123455 677
#lang sicp (#%require sicp) (#%provide stream-car stream-cdr stream-enumerate-interval stream-ref stream-filter stream-map display-stream) (define (stream-car x) (car x)) (define (stream-cdr x) (force (cdr x))) (define (stream-enumerate-interval min max) (if (> min max) the-empty-stream (cons-stream m...
b9d37cea24f47c9076d29c3b9f5f5e591f401ad27d0dee933db08b9c1e184e11
aleator/CV
colourUtils.hs
module Main where import CV.Image import CV.ColourUtils import CV.Edges import Data.Maybe main = do x <- loadImage "smallLena.jpg" >>= return . sobel (2,0) s5 . fromJust saveImage "colourUtils.png" $ montage (3,2) 5 $ [x ,balance (0.5,0.2) x ,logarithmicCompression x ,stretchHi...
null
https://raw.githubusercontent.com/aleator/CV/1e2c9116bcaacdf305044c861a1b36d0d8fb71b7/examples/colourUtils.hs
haskell
module Main where import CV.Image import CV.ColourUtils import CV.Edges import Data.Maybe main = do x <- loadImage "smallLena.jpg" >>= return . sobel (2,0) s5 . fromJust saveImage "colourUtils.png" $ montage (3,2) 5 $ [x ,balance (0.5,0.2) x ,logarithmicCompression x ,stretchHi...
d2518b77460937f0d168c734c0b2b2467592af174d5267fe4551630f48fdee46
helium/blockchain-core
blockchain_txn_vars_v1.erl
%%%------------------------------------------------------------------- %% @doc %% == Blockchain Transaction Chain Vars == %% @end %%%------------------------------------------------------------------- -module(blockchain_txn_vars_v1). -behavior(blockchain_txn). -behavior(blockchain_json). -include("blockchain.hrl"). -...
null
https://raw.githubusercontent.com/helium/blockchain-core/e3abf5a5eb459836d0aad7b047a1d175a4096581/src/transactions/v1/blockchain_txn_vars_v1.erl
erlang
------------------------------------------------------------------- @doc == Blockchain Transaction Chain Vars == @end ------------------------------------------------------------------- helper API message var_v1 { } message txn_vars_v1 { } note that string inputs are normalized on creation, which has an effec...
-module(blockchain_txn_vars_v1). -behavior(blockchain_txn). -behavior(blockchain_json). -include("blockchain.hrl"). -include("blockchain_json.hrl"). -include("blockchain_txn_fees.hrl"). -include("blockchain_vars.hrl"). -include_lib("helium_proto/include/blockchain_txn_vars_v1_pb.hrl"). -export([ new/2, new...
b872f694c194c723ca7eeda601a27eedcfa883e4baff599b33bf926185a16741
metabase/metabase
expression_aggregations_test.clj
(ns metabase.query-processor-test.expression-aggregations-test "Tests for expression aggregations and for named aggregations." (:require [clojure.test :refer :all] [metabase.models.metric :refer [Metric]] [metabase.query-processor-test :as qp.test] [metabase.test :as mt] [metabase.util :as u])) (def...
null
https://raw.githubusercontent.com/metabase/metabase/dad3d414e5bec482c15d826dcc97772412c98652/test/metabase/query_processor_test/expression_aggregations_test.clj
clojure
(ns metabase.query-processor-test.expression-aggregations-test "Tests for expression aggregations and for named aggregations." (:require [clojure.test :refer :all] [metabase.models.metric :refer [Metric]] [metabase.query-processor-test :as qp.test] [metabase.test :as mt] [metabase.util :as u])) (def...
a329100c9a25680141f0280b41e59a69843cebfcb1ab76f23190f7115fb55f2d
barrucadu/dejafu
ParMonad.hs
module Examples.ParMonad where import Control.Monad.Conc.Class (MonadConc) import Control.Monad.IO.Class (MonadIO) import System.Random (mkStdGen) import Test.DejaFu (deadlocksSometimes) import qualified Examples.ParMonad.Direct as Par import ...
null
https://raw.githubusercontent.com/barrucadu/dejafu/a032cf0f7c0484a2063c684eb0e881e9fad11ff3/dejafu-tests/lib/Examples/ParMonad.hs
haskell
module Examples.ParMonad where import Control.Monad.Conc.Class (MonadConc) import Control.Monad.IO.Class (MonadIO) import System.Random (mkStdGen) import Test.DejaFu (deadlocksSometimes) import qualified Examples.ParMonad.Direct as Par import ...
163a4e6e5e8e8b6ba8d59c4339d6b1fc79dc64463ce87a77bdbd379e07fdec90
ekmett/profunctors
Traversing.hs
{-# LANGUAGE DeriveTraversable #-} # LANGUAGE DerivingStrategies # {-# LANGUAGE GADTs #-} # LANGUAGE QuantifiedConstraints # {-# LANGUAGE RankNTypes #-} # LANGUAGE UndecidableInstances # {-# LANGUAGE Safe #-} module Data.Profunctor.Traversing ( Traversing(..) , CofreeTraversing(..) , FreeTraversing(..) * Profun...
null
https://raw.githubusercontent.com/ekmett/profunctors/5031ed76a0037743024bb119abbc59af91e475ff/src/Data/Profunctor/Traversing.hs
haskell
# LANGUAGE DeriveTraversable # # LANGUAGE GADTs # # LANGUAGE RankNTypes # # LANGUAGE Safe # | A definition of 'dimap' for 'Traversing' instances that define an explicit 'wander'. of 'lmap' than the default produced from 'dimapWandering'. | 'rmapWandering' is the same as the default produced from 'dimapWandering'. ...
# LANGUAGE DerivingStrategies # # LANGUAGE QuantifiedConstraints # # LANGUAGE UndecidableInstances # module Data.Profunctor.Traversing ( Traversing(..) , CofreeTraversing(..) , FreeTraversing(..) * Profunctor in terms of Traversing , dimapWandering , lmapWandering , rmapWandering * Strong in terms of Tr...
b39e78ee4f331901c6941ec8e4ea0fd400cae8aa9dbf6d5aa435cbe9cb565bb1
racket/racket7
cross-phase.rkt
#lang racket/base (require "../syntax/syntax.rkt" "../syntax/scope.rkt" "../syntax/match.rkt" "../syntax/binding.rkt" "../syntax/error.rkt" "../namespace/core.rkt" "../common/module-path.rkt" "../boot/runtime-primitive.rkt" "parsed.rkt" "e...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/expand/cross-phase.rkt
racket
Check whether a module fits the restricted grammar of a cross-phase persistent module
#lang racket/base (require "../syntax/syntax.rkt" "../syntax/scope.rkt" "../syntax/match.rkt" "../syntax/binding.rkt" "../syntax/error.rkt" "../namespace/core.rkt" "../common/module-path.rkt" "../boot/runtime-primitive.rkt" "parsed.rkt" "e...
59ab260fd89f46b797e86db2e1583b2a880f1009953b8623e1603dde5bf2a7df
lambdabot/lambdabot
Command.hs
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Lambdabot.Command ( Command(..) , cmdNames , command , runCommand , Cmd , execCmd , getCmdN...
null
https://raw.githubusercontent.com/lambdabot/lambdabot/de01f362c7a8fc6f85c37e604168dcccb1283a0e/lambdabot-core/src/Lambdabot/Command.hs
haskell
# LANGUAGE RankNTypes #
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Lambdabot.Command ( Command(..) , cmdNames , command , runCommand , Cmd , execCmd , getCmdName , withMsg , read...
18bcae765158cd099843ee924e549eb77b25b59158d5a50b111097b9120f734c
galdor/tungsten
package.lisp
(defpackage :openssl-test (:use :cl :test) (:export))
null
https://raw.githubusercontent.com/galdor/tungsten/5d6e71fb89af32ab3994c5b2daf8b902a5447447/tungsten-openssl/t/package.lisp
lisp
(defpackage :openssl-test (:use :cl :test) (:export))
ce2a9df798ba4903b5e4808786d7b9a88c6a6a125a38d999042cf5d0eed1bf6e
fission-codes/fission
Error.hs
module Fission.Web.Serialization.Error (Error (..)) where import Fission.Prelude newtype Error = DeserializationError Text deriving anyclass (Exception) deriving newtype (Eq, Show, Display)
null
https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-core/library/Fission/Web/Serialization/Error.hs
haskell
module Fission.Web.Serialization.Error (Error (..)) where import Fission.Prelude newtype Error = DeserializationError Text deriving anyclass (Exception) deriving newtype (Eq, Show, Display)
405b8eb36627422253b63fc948ff83224fa4594ff3451e264e69a57a5acc8a18
mainej/re-stated
utils.cljs
(ns examples.utils (:require [headlessui-reagent.core :as ui] [re-frame.core :as re-frame])) (defn <sub [subscription-v] @(re-frame/subscribe subscription-v)) (defn toggle [{:keys [checked] :as props} label] [ui/switch-group [:div.flex [ui/switch (assoc props :class [(if checked :bg-blue-600 :bg-gr...
null
https://raw.githubusercontent.com/mainej/re-stated/a2334088ba8dd9e114f32ce55dcd000fd5d234d1/examples/src/examples/utils.cljs
clojure
(ns examples.utils (:require [headlessui-reagent.core :as ui] [re-frame.core :as re-frame])) (defn <sub [subscription-v] @(re-frame/subscribe subscription-v)) (defn toggle [{:keys [checked] :as props} label] [ui/switch-group [:div.flex [ui/switch (assoc props :class [(if checked :bg-blue-600 :bg-gr...
62a0dcd76de31b5574610850449449d76986321b2c00dd0cf974fcaf2d1b0615
sgbj/MaximaSharp
sbblok.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 1.221 2010/05/26 19:25:52 " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.204 2010/02/23 05:21:30 " " f2cl6.l , v 1.48 2008/08/...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/colnew/lisp/sbblok.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 1.221 2010/05/26 19:25:52 " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.204 2010/02/23 05:21:30 " " f2cl6.l , v 1.48 2008/08/24 00:56:27 rtoy Exp $ " " ...
f2e5a5e45904c60c665efd4c48ee773951f929cd1c2ef4374040c36b8a63f1cb
cornell-netlab/yates
Yates_Frt.ml
open Core open Yates_types.Types let () = match !Globals.rand_seed with | Some x -> Random.init x | None -> Random.self_init ~allow_in_tests:true () module type FRT_TYPE = sig type frt_tree type routing_tree type routing_edge = Topology.vertex * Topology.vertex type routing_path = routing_edge list ...
null
https://raw.githubusercontent.com/cornell-netlab/yates/fc30922933fae3184923f7b138d24454a9537536/lib/routing/Yates_Frt.ml
ocaml
Makes a routing tree from the given tree decomposition, topology, and list of hosts. Typically this is called using the output from make_frt_tree and the same topology. Estimate the usage on every edge of a routing tree. Given a routing tree, returns the upward and downward segments of the path from...
open Core open Yates_types.Types let () = match !Globals.rand_seed with | Some x -> Random.init x | None -> Random.self_init ~allow_in_tests:true () module type FRT_TYPE = sig type frt_tree type routing_tree type routing_edge = Topology.vertex * Topology.vertex type routing_path = routing_edge list ...
0d65d35923e3ce9f749d50ce90140d6d47fe1f8de5992b48377229d45eea5767
stuartsierra/altlaw-backend
download_log.clj
(ns org.altlaw.db.download-log (:require [org.altlaw.db.data :as data]) (:import (java.util Date Calendar) (org.altlaw.util DateUtils))) (defn get-download-log [] (data/get-data "download-log")) (defn create-download-log [] (data/create-data "download-log" {})) (defn save-download-log [] (data/s...
null
https://raw.githubusercontent.com/stuartsierra/altlaw-backend/c2ceeb0be2d622ca921339be06de5485733451bc/src/org/altlaw/db/download_log.clj
clojure
(ns org.altlaw.db.download-log (:require [org.altlaw.db.data :as data]) (:import (java.util Date Calendar) (org.altlaw.util DateUtils))) (defn get-download-log [] (data/get-data "download-log")) (defn create-download-log [] (data/create-data "download-log" {})) (defn save-download-log [] (data/s...
78f8bc79f59cbfa8d880ff12fac92167e15cc0c27ec1be7fe2fe10dfc99b4283
frasertweedale/hs-jose
Perf.hs
# OPTIONS_GHC -fno - warn - incomplete - uni - patterns # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # Test program for ensuring that verification of a large JWT happens in reasonable time . This program is based on a test program published by at : -fido2/tree/a25308a07551ccd86af47...
null
https://raw.githubusercontent.com/frasertweedale/hs-jose/ea33a544bb8af526aae28a0e866f49e20cf7b06b/test/Perf.hs
haskell
# OPTIONS_GHC -fno - warn - incomplete - uni - patterns # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # Test program for ensuring that verification of a large JWT happens in reasonable time . This program is based on a test program published by at : -fido2/tree/a25308a07551ccd86af47...
1603ab640bc687601500b5c80173f8bb5a5ede28439a7fa33eac05866c39a8f7
jrm-code-project/LISP-Machine
meter-page1.lisp
-*- Mode : LISP ; Package : ; Base:8 ; : CL -*- ;;; Easy use of this file: read into buffer and compile , or load an up to data qfasl ;;; then, call (write-page-trace-to-file [file-name]) ;;; After a while, do (setq *stop-page-tracer* t) and ;;; the output file will automatically be closed. ;;; The file should p...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/pace/meter-page1.lisp
lisp
Package : ; Base:8 ; : CL -*- Easy use of this file: then, call (write-page-trace-to-file [file-name]) After a while, do (setq *stop-page-tracer* t) and the output file will automatically be closed. The file should probably be on the local file system, and certainly has to be a lisp machine file system. Forma...
read into buffer and compile , or load an up to data qfasl 16bits area number of the pointer at the time of the fault or 0 if it was ambiguous due to GC Almost all regions have swaping quantum 3 . You can find the (defun region-number->area-name (region-number) (let ((bits (%p-ldb %%q-...
54ce1037e8baf6a9ee053eb3c02ee6a67922cf9c86215f1f988892c19d0beece
ThoughtWorksInc/stonecutter
mongo.clj
(ns stonecutter.db.mongo (:require [clauth.store :as cl-s] [monger.collection :as mc] [monger.core :as mongo] [clojure.tools.logging :as log] [monger.ring.session-store :as mongo-session] [monger.core :as monger])) (def user-collection "users") (def token-c...
null
https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/src/stonecutter/db/mongo.clj
clojure
(ns stonecutter.db.mongo (:require [clauth.store :as cl-s] [monger.collection :as mc] [monger.core :as mongo] [clojure.tools.logging :as log] [monger.ring.session-store :as mongo-session] [monger.core :as monger])) (def user-collection "users") (def token-c...
b9596397bb9fb7571952ed4575c2b8190085e80f30a08a607b652baaaebebffc
qkrgud55/ocamlmulti
stream.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Cri...
null
https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/stdlib/stream.mli
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1997 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 $ I d : stream.mli 12241 2012 - 03 - 14 14:3...
3dd8d982490165e8d7d39c12bff54266eb05addbb41723516cfdd546baf3713b
haskell/attoparsec
Char8.hs
-- | Module : Data . Attoparsec . Char8 Copyright : 2007 - 2015 -- License : BSD3 -- -- Maintainer : -- Stability : experimental -- Portability : unknown -- -- Simple, efficient, character-oriented combinator parsing for ' Data . ByteString . ByteString ' strings , loosely based on the ...
null
https://raw.githubusercontent.com/haskell/attoparsec/85510bdf2c0a42daaf2ab5ef126d5d94a648993a/Data/Attoparsec/Char8.hs
haskell
| License : BSD3 Maintainer : Stability : experimental Portability : unknown Simple, efficient, character-oriented combinator parsing for library. instead. # DEPRECATED "This module will be removed in the next major release." #
Module : Data . Attoparsec . Char8 Copyright : 2007 - 2015 ' Data . ByteString . ByteString ' strings , loosely based on the Parsec This module is deprecated . Use " Data . Attoparsec . ByteString . Char8 " module Data.Attoparsec.Char8 ( module Data.Attoparsec.ByteString.Char8 ) wh...
b38346fec50f54899ac5b940f1bc81b92e946899756586d3dbd73db06323b8d3
TyOverby/mono
graph_info.mli
open! Core open! Import module Node_info : sig type t = { node_type : string ; here : Source_code_position.t option } [@@deriving sexp, bin_io] val of_computation : (_, _, _, _) Computation.t -> t val of_value : _ Value.t -> t end * There are a few models for understanding a [ Computation.t ] . ...
null
https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-bonsai/src/graph_info.mli
ocaml
* Iterate through a computation to build up a [t] with information about the graph. The [Lazy] portions of the graph are traversed lazily; thus, rather than putting the resulting [t] in the return value of this function, we require a callback for receiving all the updates, including the immediately trav...
open! Core open! Import module Node_info : sig type t = { node_type : string ; here : Source_code_position.t option } [@@deriving sexp, bin_io] val of_computation : (_, _, _, _) Computation.t -> t val of_value : _ Value.t -> t end * There are a few models for understanding a [ Computation.t ] . ...
e804db5ce785f9286f02822016542703d62570feb23122efb91685a82d807ffc
xapi-project/message-switch
common.ml
(* Common definitions used between the different interfaces *) open Idl open Rpc type exnt = | Unimplemented of string [@@deriving rpcty] exception DataExn of exnt let error = Error.{ def = exnt; raiser = (function e -> DataExn e); matcher = (function | DataExn e -> Some e | _ -> None) } let dbg = Pa...
null
https://raw.githubusercontent.com/xapi-project/message-switch/bd10e096c56f149d6cb0831a520a84843ebca300/xapi-storage/generator/lib/common.ml
ocaml
Common definitions used between the different interfaces * List of blocks for copying. * Size of the individual blocks. * List of block ranges, where a range is a (start,length) pair, measured in units of [blocksize]
open Idl open Rpc type exnt = | Unimplemented of string [@@deriving rpcty] exception DataExn of exnt let error = Error.{ def = exnt; raiser = (function e -> DataExn e); matcher = (function | DataExn e -> Some e | _ -> None) } let dbg = Param.mk ~name:"dbg" ~description:["Debug context from the caller...
4db6868ad3f014ab599d95a56dcf6de63616e91b4d288924f8418fc6f5c2c3d1
narimiran/AdventOfCode2017
day10.ml
let input = CCIO.(with_in "inputs/10.txt" read_all) let part_1 = let int_sizes = input |> String.split_on_char ',' |> List.map int_of_string in let hash = KnotHash.knot_logic int_sizes 1 in hash.(0) * hash.(1) |> Printf.printf "%d\n" let part_2 = input |> KnotHash.knot_hashing |> Printf.printf "...
null
https://raw.githubusercontent.com/narimiran/AdventOfCode2017/41d7bb5d8b6373aa309c1b300ad317a8f9a5c71b/ocaml/day10.ml
ocaml
let input = CCIO.(with_in "inputs/10.txt" read_all) let part_1 = let int_sizes = input |> String.split_on_char ',' |> List.map int_of_string in let hash = KnotHash.knot_logic int_sizes 1 in hash.(0) * hash.(1) |> Printf.printf "%d\n" let part_2 = input |> KnotHash.knot_hashing |> Printf.printf "...
a7f304f57184e4ea7863ddbf651bb19ff9f2e076e431ee890bb73490c29117ba
rtoy/ansi-cl-tests
format-logical-block.lsp
;-*- Mode: Lisp -*- Author : ;;;; Created: Sun Aug 8 12:17:31 2004 ;;;; Contains: Tests of the ~< ~:> format directives (in-package :cl-test) (compile-and-load "printer-aux.lsp") ;;; Error cases ;;; Prefix and suffix cannot contain format directives (deftest format.logical-block.error.1 (signals-err...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/format-logical-block.lsp
lisp
-*- Mode: Lisp -*- Created: Sun Aug 8 12:17:31 2004 Contains: Tests of the ~< ~:> format directives Error cases Prefix and suffix cannot contain format directives "an error is also signaled if the ~<...~:;...~> form of ~<...~> is used in the same format string with ~W, ~_, ~<...~:>, ~I, or ~:T." Non-error ...
Author : (in-package :cl-test) (compile-and-load "printer-aux.lsp") (deftest format.logical-block.error.1 (signals-error-always (format nil "~<foo~A~;~A~;bar~:>" '(X) '(Y)) error) t t) (deftest format.logical-block.error.2 (signals-error-always (format nil "~<foo~A~@;~A~;bar~:>" '(X) '(Y)) error) t...
f434992df112cb1adec50cd4fa78f0666c575ab1c1288a8059a3941f46c557b2
8c6794b6/guile-tjit
srfi-28.scm
;;; srfi-28.scm --- Basic Format Strings Copyright ( C ) 2014 Free Software Foundation , Inc. ;; ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 3 of the License , ...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/srfi/srfi-28.scm
scheme
srfi-28.scm --- Basic Format Strings This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ...
Copyright ( C ) 2014 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA (define-module (srfi srfi-28) #:replace (forma...
b5dfee0cf310a6728937c15ff6d19c44a2b35ef4a4fb848266aba79ea3ab9cfd
phaazon/luminance
Texture3D.hs
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # ----------------------------------------------------------------------------- -- | Copyright : ( C ) 2015 , 2016 -- License : BSD3 -- Maintainer : < > -- Stability : experimental -- Portability : portable ------------------...
null
https://raw.githubusercontent.com/phaazon/luminance/88b8f40b8d1ceec1f8fd1a111ccaffec5d9283a8/src/Graphics/Luminance/Core/Texture3D.hs
haskell
--------------------------------------------------------------------------- | License : BSD3 Stability : experimental Portability : portable --------------------------------------------------------------------------- |A 3D texture.
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # Copyright : ( C ) 2015 , 2016 Maintainer : < > module Graphics.Luminance.Core.Texture3D where import Data.Foldable ( for_ ) import Data.Proxy ( Proxy(..) ) import Data.Vector.Storable ( unsafeWith ) import Foreign.Ptr ( castPtr...
23be64f0d9e758d1b7e21493f0a404324349e0cbc85fd644f973174df37cc8b4
rixed/ramen
RamenAuthn.ml
open Batteries open Sodium open Stdint open RamenLog open RamenHelpersNoLog module Slice = DessserOCamlBackEndHelpers.Slice Idea : keep using ZMQ as a low level socket API replacement , but encrypt ( and * compress ) messages ourselves using NaCl directly . First version could do * without forward secrecy ,...
null
https://raw.githubusercontent.com/rixed/ramen/5ecb0d109a9f97afa013d6ea6f3f63cf39a6edfa/src/RamenAuthn.ml
ocaml
Last nonce used by peer: $< Z85 Some pretend big endian is more "natural"... $> Return public/private keys Build a message than must be sent back immediately We must be a server then: This message has been encoded using the server long * term key: FIXME: we should have both long term and ...
open Batteries open Sodium open Stdint open RamenLog open RamenHelpersNoLog module Slice = DessserOCamlBackEndHelpers.Slice Idea : keep using ZMQ as a low level socket API replacement , but encrypt ( and * compress ) messages ourselves using NaCl directly . First version could do * without forward secrecy ,...
9aa8d3a8a1d66486d83d758cfbc35c306bd03d584a6fd544b2002e2026603526
pixlsus/registry.gimp.org_static
drawguides.scm
; Draw guides v1.0 ; Tested on Gimp v2.6.8 (define (script-fu-draw-guides image drawable) ; Start an undo group (gimp-image-undo-group-start image) (let* ((guide 0) (width (car (gimp-image-width image))) (height (car (gimp-image-height image))) ) (while (<> 0 (set! guide (car (gi...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/drawguides.scm
scheme
Draw guides v1.0 Tested on Gimp v2.6.8 Start an undo group End the undo group Flush displays
(define (script-fu-draw-guides image drawable) (gimp-image-undo-group-start image) (let* ((guide 0) (width (car (gimp-image-width image))) (height (car (gimp-image-height image))) ) (while (<> 0 (set! guide (car (gimp-image-find-next-guide image guide)))) (let* ((orientation ...
be6d9943362c5cd3d2f5a964b5981df7a7609e36b0101aa4e086a25f782a46e3
DavidAlphaFox/aiutp
aiutp_rx.erl
-module(aiutp_rx). -include("aiutp.hrl"). -export([in/2]). in(#aiutp_packet{seq_nr = PktSeqNR} = Packet, #aiutp_pcb{ack_nr = AckNR} = PCB)-> NextAckNR = aiutp_util:bit16(AckNR + 1), PCB1 = if PktSeqNR == NextAckNR -> recv(Packet,PCB#aiutp_pcb{ack_nr = PktSeqNR}); true-> recv_reorder(aiutp_util:bit...
null
https://raw.githubusercontent.com/DavidAlphaFox/aiutp/d01f7b0875b6bbf05dc05a0be336ebe44345b5af/src/aiutp_rx.erl
erlang
-module(aiutp_rx). -include("aiutp.hrl"). -export([in/2]). in(#aiutp_packet{seq_nr = PktSeqNR} = Packet, #aiutp_pcb{ack_nr = AckNR} = PCB)-> NextAckNR = aiutp_util:bit16(AckNR + 1), PCB1 = if PktSeqNR == NextAckNR -> recv(Packet,PCB#aiutp_pcb{ack_nr = PktSeqNR}); true-> recv_reorder(aiutp_util:bit...
1ebf845393f1716f77e6be07dd92dd1c60a4bb772c8aaad4e176c80402b2cfd8
codahale/u2f-clj
core.clj
(ns u2f-clj.core "A set of utility functions for FIDO U2F support. To register a U2F device, we perform the following: 1. The server looks up existing devices for the user, and generates a registration challenge. It stores a copy of the challenge, and passes it to the browser. 2. In the browser, the...
null
https://raw.githubusercontent.com/codahale/u2f-clj/65aa3c16a7f920009e2c9997ef21d4684e22d155/src/u2f_clj/core.clj
clojure
(ns u2f-clj.core "A set of utility functions for FIDO U2F support. To register a U2F device, we perform the following: 1. The server looks up existing devices for the user, and generates a registration challenge. It stores a copy of the challenge, and passes it to the browser. 2. In the browser, the...
50aec6394492d47879eadcfe664edda4fab9c62772bf439102efd667efd3ca3e
knupfer/haskell-emacs
HaskellEmacsTest.hs
{-# LANGUAGE OverloadedStrings #-} module HaskellEmacsTest where import Control.Monad import Data.Char import qualified Data.Text as T import External.NBody import Foreign.Emacs import System.IO.Unsafe -- String nothing :: String -> String nothing = const "" ...
null
https://raw.githubusercontent.com/knupfer/haskell-emacs/a2c6a079175904689eed7c6c200754bfa85d1ed9/test/HaskellEmacsTest.hs
haskell
# LANGUAGE OverloadedStrings # String Bool Char Lisp Num Multiple arguments Tuple benchmarks
module HaskellEmacsTest where import Control.Monad import Data.Char import qualified Data.Text as T import External.NBody import Foreign.Emacs import System.IO.Unsafe nothing :: String -> String nothing = const "" unicode :: String unicode = "ˈiːmæks\ ...
46811ddf039559fb148cfbc1cab6c24bb9401566915034ba544ad2a987e7610b
hipsleek/hipsleek
lp.ml
#include "xdebug.cppo" open VarGen open Globals open Gen open Cpure module CP = Cpure type lp_solver = | Clp | LPSolve | Glpk type lp_res = | Sat of (string * int) list | Unsat | Unknown | Aborted let string_of_lp_res = function | Sat m -> "sat" ^ (pr_list (pr_pair idf string_of_int) m) | Unsat ...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/lp.ml
ocaml
Print i with sign UNHANDLED UNHANDLED Move const to rhs e1 {<, <=, >, >=, =} e2 --> f(vars) = const Sat sol
#include "xdebug.cppo" open VarGen open Globals open Gen open Cpure module CP = Cpure type lp_solver = | Clp | LPSolve | Glpk type lp_res = | Sat of (string * int) list | Unsat | Unknown | Aborted let string_of_lp_res = function | Sat m -> "sat" ^ (pr_list (pr_pair idf string_of_int) m) | Unsat ...
101ca7c105d083038158df9e7d835550ebf78e9f82e1652014b59e658dc0c5f1
aaronallen8455/inventory
T5.hs
{-# LANGUAGE RankNTypes #-} module HieSource.T5 where t5A :: Monad m => a -> m a t5A = undefined t5B :: forall b m. Monad m => b -> m b t5B = undefined
null
https://raw.githubusercontent.com/aaronallen8455/inventory/e16244f2c3b920ec0caffc4b81d236219b78bd91/test/HieSource/T5.hs
haskell
# LANGUAGE RankNTypes #
module HieSource.T5 where t5A :: Monad m => a -> m a t5A = undefined t5B :: forall b m. Monad m => b -> m b t5B = undefined
ba6ce0b113758e1db02fa3eb7d6c9ad2752dc2dbf8a323fdac475da057fb7848
dkataskin/erlazure
erlazure_sup.erl
Copyright ( c ) 2013 - 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: %% %% * Redistributions of source code must retain the above copyright notice, %% this list of conditions and ...
null
https://raw.githubusercontent.com/dkataskin/erlazure/066510454597b72f283748b2e5be3d5eb8d328b6/src/erlazure_sup.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. * Redistributions in ...
Copyright ( c ) 2013 - 2015 , 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 OWNER OR LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLA...
d650fa20b54c549e24c66c897911708898cc2706e052c0d59866f0ef7aa076d1
8c6794b6/haskell-sc-scratch
tasting.hs
| Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : unstable Portability : portable Command line wrapper for ' lambda - calculus cooked four ways ' . Module : $Header$ CopyRight : (c) 8c6794b6 License : BSD3 Maintainer : Stability : unstable Port...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/FP/LC4W/tasting.hs
haskell
| Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : unstable Portability : portable Command line wrapper for ' lambda - calculus cooked four ways ' . Module : $Header$ CopyRight : (c) 8c6794b6 License : BSD3 Maintainer : Stability : unstable Port...
45cb72d3b8fe49dbd925ba221be7c81993ec8e449beda5085980aad120778752
achirkin/qua-view
EventMap.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FlexibleContexts # -- | Keep all global events to be registered in qua-view module Commons.NoReflexDom.EventMap ( -- * Global event map QuaViewEvents (..), lookupEvent -- * Not yet assembled event map...
null
https://raw.githubusercontent.com/achirkin/qua-view/62626ead828889a1c7ef1fdba4d84324eb5420b3/src/Commons/NoReflexDom/EventMap.hs
haskell
# LANGUAGE GADTs # | Keep all global events to be registered in qua-view * Global event map * Not yet assembled event map | A map of qua-view events with suitable monoid instances. `lefmost`. Since there is not symantic way to represent which event occurrence is preferred when an event you declare coincide...
# LANGUAGE TemplateHaskell # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FlexibleContexts # module Commons.NoReflexDom.EventMap QuaViewEvents (..), lookupEvent , QuaViewEventList (..), emptyEvList, singletonEvList , assembleQuaViewEvents , DynQuaViewEventList (..), singDynEvList ) where i...
2f10074b664bb65a4be4bf64a3de31e5744cd8d89a67d1951b32ac421ce04d39
uhc/uhc
Shuffle.hs
------------------------------------------------------------------------- -- Main ------------------------------------------------------------------------- module Main where import qualified Data.Set as Set import qualified Data.Map as Map import Data.Map(Map) import Data.Set(Set) import System.Exit import System.Env...
null
https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/shuffle/Shuffle.hs
haskell
----------------------------------------------------------------------- Main ----------------------------------------------------------------------- ----------------------------------------------------------------------- main ----------------------------------------------------------------------- from options share...
module Main where import qualified Data.Set as Set import qualified Data.Map as Map import Data.Map(Map) import Data.Set(Set) import System.Exit import System.Environment import System.IO import System.Console.GetOpt import EH.Util.ParseUtils import EH.Util.DependencyGraph import EH.Util.FPath import EH.Util.Pretty i...
e045c9879e89064664358bf9418e46828b45379f71677a1f53ee19a390029e56
project-fifo/ensq_rpc
ensq_rpc_app.erl
-module(ensq_rpc_app). -behaviour(application). %% Application callbacks -export([start/2, stop/1]). %% =================================================================== %% Application callbacks %% =================================================================== start(_StartType, _StartArgs) -> ensq_rpc_su...
null
https://raw.githubusercontent.com/project-fifo/ensq_rpc/c25bb4147e4182a5d2db19953857a9ee7d57adfb/src/ensq_rpc_app.erl
erlang
Application callbacks =================================================================== Application callbacks ===================================================================
-module(ensq_rpc_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> ensq_rpc_sup:start_link(). stop(_State) -> ok.
902f676fc38865305e7afd6d87cf889cf66db6fb1043bf5e737fd0b443371cfd
serokell/blockchain-util
ValueOp.hs
{-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} | primitive . module Snowdrop.Core.ChangeSet.ValueOp ( ValueOp (..) , ValueOpEx (..) , (<->) ) where import Universum hiding (head, init, last) import ...
null
https://raw.githubusercontent.com/serokell/blockchain-util/a6428c6841e7002605a115002f58eff78ff9f128/snowdrop-core/src/Snowdrop/Core/ChangeSet/ValueOp.hs
haskell
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveTraversable # | ValueOp datatype is an action which should be performed over an entry stored in a key-value storage. Intended to be used in @ChangeSet@, in Map Id (ValueOp Value). ^ @New@ operation requires the following invariants (both...
| primitive . module Snowdrop.Core.ChangeSet.ValueOp ( ValueOp (..) , ValueOpEx (..) , (<->) ) where import Universum hiding (head, init, last) import Snowdrop.Util (HasPrism (..), HasReview (..)) data ValueOp v = New v 1 . key which holds this d...
a4396a6ef938f024cbcd8588927a2650725f7e9d7d94860434b70412bc596041
Zilliqa/scilla
StateIPCTestServer.ml
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 you...
null
https://raw.githubusercontent.com/Zilliqa/scilla/011323ac5da48ee16890b71424e057ffbc4216da/tests/ipc/StateIPCTestServer.ml
ocaml
This file implements a state server that mimics the behaviour of the * actual blockchain state server. It begins with an empty state and hence * must be "updated" to have the required state by calling update_state_value * before the contract is executed. Global state of the server thread. Index does not exist. ...
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 you...
2b0b18e8cdffbb035b998211c6f4a73764076641d05963157e2ab89e44ee5a67
nstack/nstack
Archive.hs
module NStack.Utils.Archive ( pack, expandCheckPack, unpack ) where import Control.Monad (filterM, forM) import qualified Codec.Archive.Tar as Tar -- from: tar from : bytestring import Data.List (nub) import System.FilePath ((</>), joinPath, splitDirectories) import System.Directory (doesFileExist) import System.Fi...
null
https://raw.githubusercontent.com/nstack/nstack/c987557511134ed61db152a0bccbb80216b07a4b/nstack/src/NStack/Utils/Archive.hs
haskell
from: tar | Create a tar archive from a list of files ^ base directory ^ list of files to archive | Expand globs, check that files exist, and pack them See <-server/issues/432> for the context. ^ base directory ^ List of optional files to archive. If any of these don't exist, they are silently skipped. ^ Li...
module NStack.Utils.Archive ( pack, expandCheckPack, unpack ) where import Control.Monad (filterM, forM) from : bytestring import Data.List (nub) import System.FilePath ((</>), joinPath, splitDirectories) import System.Directory (doesFileExist) import System.FilePath.Glob (namesMatching) import NStack.Prelude.Except...
38d7413693a95445b614a865407087594820b4680fa09d8a0f05c0388c80288f
jwiegley/notes
Interview.hs
# LANGUAGE KindSignatures # module Interview where import Control.Monad.Trans.Class import Control.Monad.Trans.Except import Data.ByteString data HeistConfig (n :: * -> *) data HeistState (n :: * -> *) data Builder type TemplateName = String type MIMEType = String type Errors = [String] initHeist :: Monad n =>...
null
https://raw.githubusercontent.com/jwiegley/notes/e3d088ce96bdf226a308d4c001bd8133c5dc7f2c/haskell/Interview.hs
haskell
Complete this function using the above API
# LANGUAGE KindSignatures # module Interview where import Control.Monad.Trans.Class import Control.Monad.Trans.Except import Data.ByteString data HeistConfig (n :: * -> *) data HeistState (n :: * -> *) data Builder type TemplateName = String type MIMEType = String type Errors = [String] initHeist :: Monad n =>...
ccfa95634fa171f686c39b33d618280df07e5a39e21264390f1acbad31db497d
quintype/ringo
Generator.hs
module Ringo.Generator ( dimensionTableDefnSQL , factTableDefnSQL , dimensionTablePopulateSQL , factTablePopulateSQL ) where import Ringo.Generator.Create import Ringo.Generator.Populate.Dimension import Ringo.Generator.Populate.Fact
null
https://raw.githubusercontent.com/quintype/ringo/3faf4ff82e1f3a53175ad813849c2e9047930d7f/src/Ringo/Generator.hs
haskell
module Ringo.Generator ( dimensionTableDefnSQL , factTableDefnSQL , dimensionTablePopulateSQL , factTablePopulateSQL ) where import Ringo.Generator.Create import Ringo.Generator.Populate.Dimension import Ringo.Generator.Populate.Fact
877d4f6b08b42cc0d37ddf55274f0d6d452486f19bc64dc33c6dae4686a54bc9
gethop-dev/payments.stripe
ephemeral_key.clj
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 dev.gethop.payments.stripe.ephemeral-key (:require [dev.gethop.payments.core :as core] [dev.gethop.payments.stripe.core :refer...
null
https://raw.githubusercontent.com/gethop-dev/payments.stripe/2379ba790123d7380ffc397cf4920cbe2936f840/src/dev/gethop/payments/stripe/ephemeral_key.clj
clojure
file, You can obtain one at /
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 (ns dev.gethop.payments.stripe.ephemeral-key (:require [dev.gethop.payments.core :as core] [dev.gethop.payments.stripe.core :refer [execute]]) (:import [dev.geth...
adb87f5de587acf2e8594b42c17f7fb15adfb29c53fbb5effdf9f7289ffd3e52
scalaris-team/scalaris
merkle_tree.erl
2011 - 2014 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software di...
null
https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/rrepair/merkle_tree.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2011 - 2014 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > @doc tree implementation -module(merkle_tree). -author(''). -vsn('$Id$'). -include("record_helpers.hrl"). -in...
4fd22de726aa8aa8706d63f7a3726239f12b33e3a6f7d3e7f6ab2dd962023da1
byorgey/haskell-course
Risk.hs
# LANGUAGE GeneralizedNewtypeDeriving # module Risk where import Control.Monad.Random ------------------------------------------------------------ -- Die values newtype DieValue = DV { unDV :: Int } deriving (Eq, Ord, Show, Num) first :: (a -> b) -> (a, c) -> (b, c) first f (a, c) = (f a, c) instance Random Di...
null
https://raw.githubusercontent.com/byorgey/haskell-course/f928cc8031aec2147f037949826134a484414ed6/weeks/12-monads/hw/skel/Risk.hs
haskell
---------------------------------------------------------- Die values ---------------------------------------------------------- Risk
# LANGUAGE GeneralizedNewtypeDeriving # module Risk where import Control.Monad.Random newtype DieValue = DV { unDV :: Int } deriving (Eq, Ord, Show, Num) first :: (a -> b) -> (a, c) -> (b, c) first f (a, c) = (f a, c) instance Random DieValue where random = first DV . randomR (1,6) randomR (low,h...
fca90f73d11ea55f6dfa46927d9f584a4080161f68e63b4091fdc2a58d6dcdb2
samply/blaze
scheduler_test.clj
(ns blaze.scheduler-test (:require [blaze.executors :as ex] [blaze.scheduler :as sched] [blaze.scheduler-spec] [blaze.test-util :as tu :refer [with-system]] [clojure.spec.test.alpha :as st] [clojure.test :as test :refer [deftest is testing]] [integrant.core :as ig] [java-time.api :as t...
null
https://raw.githubusercontent.com/samply/blaze/6441a0a2f988b8784ed555c1d20f634ef2df7e4a/modules/scheduler/test/blaze/scheduler_test.clj
clojure
ensure that the function is called before the scheduler is halted the scheduler is shut down but it isn't terminated yet
(ns blaze.scheduler-test (:require [blaze.executors :as ex] [blaze.scheduler :as sched] [blaze.scheduler-spec] [blaze.test-util :as tu :refer [with-system]] [clojure.spec.test.alpha :as st] [clojure.test :as test :refer [deftest is testing]] [integrant.core :as ig] [java-time.api :as t...
50696e9994bb2cb4111b988f441b41a6f3aafe18b0b27c8404acc5c822f469b4
ocsigen/ocaml-eliom
eliom_types.mli
[@@@ocaml.warning "+a-4-9-40-42"] val cmi_magic_number : string val translate : Eliom_base.loc -> Types.signature -> unit val is_mixed : Types.signature -> bool module Specialize : sig type 'a t = ?idside:Eliom_base.side -> 'a -> 'a val modtype : Types.module_type t val modtype_declaration : Types.modtype_d...
null
https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/typing/eliom_types.mli
ocaml
[@@@ocaml.warning "+a-4-9-40-42"] val cmi_magic_number : string val translate : Eliom_base.loc -> Types.signature -> unit val is_mixed : Types.signature -> bool module Specialize : sig type 'a t = ?idside:Eliom_base.side -> 'a -> 'a val modtype : Types.module_type t val modtype_declaration : Types.modtype_d...
a09f19dcb07c261e9e29df4f3382134b350385c9120b0ff6f1337f69dba39baa
eashanhatti/peridot
Term.hs
module Elaboration.Term where import Control.Effect.Reader import Control.Effect.State import Control.Effect.Throw import Control.Carrier.Throw.Either(runThrow) import Syntax.Surface import Syntax.Core qualified as C import Syntax.Semantic qualified as N import Syntax.Common hiding(unId, RigidTerm(..)) import Data.Set...
null
https://raw.githubusercontent.com/eashanhatti/peridot/5e91c95101637a830d42e7cca20ddfce09a44522/src/Elaboration/Term.hs
haskell
TODO: Infer implicit arguments FIXME: `Elaboration.Effect` version of `appClosureN` FIXME? Wrap `vTy` and `vDef` in singleton forms checkArgs Empty outTy@(N.viewImFunType -> Nothing) = pure (Empty, outTy)
module Elaboration.Term where import Control.Effect.Reader import Control.Effect.State import Control.Effect.Throw import Control.Carrier.Throw.Either(runThrow) import Syntax.Surface import Syntax.Core qualified as C import Syntax.Semantic qualified as N import Syntax.Common hiding(unId, RigidTerm(..)) import Data.Set...
d6ed45be33f21a57e3bcd338df5dd0311d2e2937d0445f20565f4f8fc0039c0a
pdonadeo/ocaml-lua
lua_api_lib.mli
(**************************************************************) * { 1 The Lua Application Program Interface ( OCaml binding ) } (**************************************************************) (*********************************************) * { 2 Difference with the original Lua API } (*******************************...
null
https://raw.githubusercontent.com/pdonadeo/ocaml-lua/d8530b49a904f9c78e2a3a26c2aff904cc43c8b2/src/lua_api_lib.mli
ocaml
************************************************************ ************************************************************ ******************************************* ******************************************* ************************ ************************ * See {{:#lua_State}lua_State} documentation. * This ty...
* { 1 The Lua Application Program Interface ( OCaml binding ) } * { 2 Difference with the original Lua API } * Here is a list of functions of which you should read documentation : - { b Missing functions } : [ lua_close ] , [ lua_getallocf ] , [ lua_newstate ] ( see below { { : # VALload}here } ) , [ lua_pushcclo...
409832aa85cc331c8bb3c278ee3962d3f9eb5b193d18ee72ce4c2e48224b94cf
fpco/ide-backend
API.hs
# LANGUAGE MultiParamTypeClasses , GADTs , FlexibleInstances # module GhcShim.API ( -- * Traversing the AST IsBinder(..) , AstAlg(..) , Fold(..) , FoldPhase(..) ) where import Type (Type) import SrcLoc (SrcSpan, Located) import Name (Name) import Var (Var) | Is this a binding occurrence of @f...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend-server/GhcShim/API.hs
haskell
* Traversing the AST ^ @f = ..@ ^ @g = f ..@ ^ @f :: ..@ or fixity declaration | The "algebra" that we use while traversing the AST. This is not a general purpose fold; we look for identifiers and types. | Mark a branch point in the AST | Throw a runtime error | Found a subexpression type | Found a 'Name' (i...
# LANGUAGE MultiParamTypeClasses , GADTs , FlexibleInstances # module GhcShim.API ( IsBinder(..) , AstAlg(..) , Fold(..) , FoldPhase(..) ) where import Type (Type) import SrcLoc (SrcSpan, Located) import Name (Name) import Var (Var) | Is this a binding occurrence of @f@ ? data IsBinder = data As...
e5e22e7b0505069d4b4f255d54d357a7e02ae1e9fcf41e2f2dc79311563ac8b2
zenspider/schemers
exercise.2.76.scm
#lang racket/base Exercise 2.76 ;; As a large system with generic operations ;; evolves, new types of data objects or new operations may be needed. For each of the three strategies -- generic operations with explicit ;; dispatch, data-directed style, and message-passing-style--describe ;; the changes that must be...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.76.scm
scheme
As a large system with generic operations evolves, new types of data objects or new operations may be needed. dispatch, data-directed style, and message-passing-style--describe the changes that must be made to a system in order to add new types or new operations. Which organization would be most appropriate for ...
#lang racket/base Exercise 2.76 For each of the three strategies -- generic operations with explicit
7d700d7b8dbbd66d11f52d2178f192b923df4b786e5b626d3ff4cacba17f6c6c
sebsheep/elm2node
Source.hs
# OPTIONS_GHC -Wall # module AST.Source ( Expr, Expr_(..), VarType(..) , Def(..) , Pattern, Pattern_(..) , Type, Type_(..) , Module(..) , getName , getImportName , Import(..) , Value(..) , Union(..) , Alias(..) , Infix(..) , Port(..) , Effects(..) , Manager(..) , Docs(..) , Comment(..)...
null
https://raw.githubusercontent.com/sebsheep/elm2node/602a64f48e39edcdfa6d99793cc2827b677d650d/compiler/src/AST/Source.hs
haskell
EXPRESSIONS DEFINITIONS PATTERN TYPE EXPOSING
# OPTIONS_GHC -Wall # module AST.Source ( Expr, Expr_(..), VarType(..) , Def(..) , Pattern, Pattern_(..) , Type, Type_(..) , Module(..) , getName , getImportName , Import(..) , Value(..) , Union(..) , Alias(..) , Infix(..) , Port(..) , Effects(..) , Manager(..) , Docs(..) , Comment(..)...
cbbea63028794fa9b8d9b588b3ccafbde5d28dbc00b28cf7f5cbcbf633cb742f
mhkoji/Senn
prefix-dictionary.lisp
(defpackage :senn.prefix-dictionary (:use :cl) (:export :lookup :dictionary :save-dictionary :load-dictionary :make-dictionary :build-dictionary :add-unit :lookup)) (in-package :senn.prefix-dictionary) (defstruct dictionary (trie (make-...
null
https://raw.githubusercontent.com/mhkoji/Senn/74bed747ba66ac8b5569d58c78bbaf0a8d682c35/senn/src/prefix-dictionary.lisp
lisp
(defpackage :senn.prefix-dictionary (:use :cl) (:export :lookup :dictionary :save-dictionary :load-dictionary :make-dictionary :build-dictionary :add-unit :lookup)) (in-package :senn.prefix-dictionary) (defstruct dictionary (trie (make-...
1f3838621a217dd01065a7deb2fbe4b2eef96cdbd5f122af75fd135c37f1a6df
iu-parfunc/HSBencher
Main.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # # LANGUAGE NamedFieldPuns # {-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # module Main where import Control.Exception import Control . Lens import Control.Monad (unless,when,forM_) import Data.Char (isNumber) import Da...
null
https://raw.githubusercontent.com/iu-parfunc/HSBencher/76782b75b3a4b276c45a2c159e0b4cb6bd8a2360/hsbencher-graph/Main.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE BangPatterns # import Data.Colour.Names import Data.Default.Class import Debug.Trace Generated by cabal: getDataDir Charting library ------------------------------------------------------------------------- bindir=/home / joels / Current / ObsidianWriting / Winter2014 /...
# LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # # LANGUAGE NamedFieldPuns # # LANGUAGE CPP # module Main where import Control.Exception import Control . Lens import Control.Monad (unless,when,forM_) import Data.Char (isNumber) import Data . Colour import Control.DeepSeq (force) import Data.List (elem...
72c3776562f030dfc3da52469fafc0448ed9c9ddf24e922a44600a78f3347f90
racket/racket7
doc-db.rkt
#lang racket/base (require db/private/pre racket/format racket/serialize "main-doc.rkt") (provide doc-db-available? doc-db-clear-provides doc-db-add-provides doc-db-set-provides-timestamp doc-db-get-provides-timestamp doc-db-clear-dependencies ...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/setup/doc-db.rkt
racket
we don't need to survive a catastrophic failure: duplicates across tables: Items with no `searches' entries: Items with `searches' entries, but no documentation: "placeholder" If we can't write, then this result is bogus, but it should lead to empty query results in a transaction: The `SQLITE_READONLY_ROLLBACK`...
#lang racket/base (require db/private/pre racket/format racket/serialize "main-doc.rkt") (provide doc-db-available? doc-db-clear-provides doc-db-add-provides doc-db-set-provides-timestamp doc-db-get-provides-timestamp doc-db-clear-dependencies ...
03d174009a8056f12f5597c5ef1611d02cdbe07b8820751c6c64d964fb0798b9
futurice/haskell-aws-lambda-kleisli
Orphans.hs
{-# LANGUAGE DeriveLift #-} # LANGUAGE StandaloneDeriving # # OPTIONS_GHC -Wno - orphans # module Orphans () where import Instances.TH.Lift () import qualified Language.Haskell.TH.Syntax as TH import qualified Text.Microstache as Mu deriving instance TH.Lift Mu.Key deriving insta...
null
https://raw.githubusercontent.com/futurice/haskell-aws-lambda-kleisli/ffa861e6bcf782aa4981a821df79204949bbfee8/package-aws-lambda/src/Orphans.hs
haskell
# LANGUAGE DeriveLift #
# LANGUAGE StandaloneDeriving # # OPTIONS_GHC -Wno - orphans # module Orphans () where import Instances.TH.Lift () import qualified Language.Haskell.TH.Syntax as TH import qualified Text.Microstache as Mu deriving instance TH.Lift Mu.Key deriving instance TH.Lift Mu.Node deriving instanc...
014c46ed5059894a7a5c2287133b9e7026b906e4284a6933c2fd8065609e356a
logseq/logseq
shell.cljs
(ns frontend.components.shell (:require [rum.core :as rum] [frontend.ui :as ui] [frontend.util :as util] [frontend.handler.shell :as shell-handler] [clojure.string :as string] [frontend.mixins :as mixins] [promesa.core :as p])) (defonce *command...
null
https://raw.githubusercontent.com/logseq/logseq/020317911f7bbc9aabc187b522121031ef6352b1/src/main/frontend/components/shell.cljs
clojure
(ns frontend.components.shell (:require [rum.core :as rum] [frontend.ui :as ui] [frontend.util :as util] [frontend.handler.shell :as shell-handler] [clojure.string :as string] [frontend.mixins :as mixins] [promesa.core :as p])) (defonce *command...
920a2829e0c6dfdd42a7b97a3cff1a517a80d3831a2337a3f17d5bf3e6fba497
erlangonrails/devdb
luke_phases.erl
Copyright ( c ) 2010 Basho Technologies , 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 except in compliance with the License . You may obtain %% a copy of the License at %% -2.0 %% Unless required by applicabl...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/riak-0.11.0/apps/luke/src/luke_phases.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 permissions and limitations under the License. Some of these functions oper...
Copyright ( c ) 2010 Basho Technologies , 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 the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY @d...
6ab9693e142cff43bf01a4012c6bf97e787a8ad09fd4be02ad5f0154b03f2b7e
takikawa/racket-ppa
info.rkt
(module info setup/infotab (#%module-begin (define collection "profile") (define deps (quote ("base" "errortrace-lib"))) (define build-deps (quote ("at-exp-lib" "rackunit-lib"))) (define pkg-desc "implementation (no documentation) part of \"profile\"") (define pkg-authors (quote (eli stamourv))) (define raco-commands (...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/profile-lib/info.rkt
racket
(module info setup/infotab (#%module-begin (define collection "profile") (define deps (quote ("base" "errortrace-lib"))) (define build-deps (quote ("at-exp-lib" "rackunit-lib"))) (define pkg-desc "implementation (no documentation) part of \"profile\"") (define pkg-authors (quote (eli stamourv))) (define raco-commands (...
7d5489d9b7eb65d193e83e4747c59f0eef6209093e89a7688ccdce2a46b20299
sacerdot/MiniErlangBlockchain
gp_handler.erl
-module(gp_handler). -export([gp_actor/1]). % attore get_previous_handler: gestore dei a cui non si riesce a dare immediatamente % risposta perché non è conosciuto il blocco richiesto. mailbox = lista di tuple { Mittente , , Id_blocco_richiesto } gp_actor(Mailbox) -> io : format("gp_handler ~p start with mail...
null
https://raw.githubusercontent.com/sacerdot/MiniErlangBlockchain/46713c579204994a528d2e642c8f7c0670c2a832/CappelliRossi-Node/gp_handler.erl
erlang
attore get_previous_handler: risposta perché non è conosciuto il blocco richiesto. io:format("nessuno aspettava il blocco~n"), io:format("blocco inviato a chi lo attendeva~n"), funzione con eccezioni
-module(gp_handler). -export([gp_actor/1]). gestore dei a cui non si riesce a dare immediatamente mailbox = lista di tuple { Mittente , , Id_blocco_richiesto } gp_actor(Mailbox) -> io : format("gp_handler ~p start with mailbox ~p ~ n",[self ( ) , Mailbox ] ) , receive ricezione di : il blocco ri...
8a7c415e9070ef4939bb7a6c49ee78a2a2287d9de0d76f907aa3437715541f37
glv2/cl-monero-tools
german.lisp
;;;; This file is part of monero-tools Copyright 2016 - 2017 Distributed under the GNU GPL v3 or later . ;;;; See the file LICENSE for terms of use and distribution. (in-package :monero-tools) (add-word-list :german 4 #("Abakus" "Abart" "abbilde...
null
https://raw.githubusercontent.com/glv2/cl-monero-tools/ab972ac3a7c5489cf23e3bdaa5d390d5cff1732b/monero-tools/mnemonic/german.lisp
lisp
This file is part of monero-tools See the file LICENSE for terms of use and distribution.
Copyright 2016 - 2017 Distributed under the GNU GPL v3 or later . (in-package :monero-tools) (add-word-list :german 4 #("Abakus" "Abart" "abbilden" "Abbruch" "Abdrift" "Abendrot" ...
a827a50a289d1e3b0306a23bdce5bfa9acfaa73023dff76d62304714c495402a
startalkIM/ejabberd
kafka_consumer.erl
-module(kafka_consumer). -behaviour(gen_server). -include("ejabberd.hrl"). -include("logger.hrl"). -include_lib("brod/include/brod.hrl"). %% ------------------------------------------------------------------ %% API Function Exports %% ------------------------------------------------------------------ -export([start_l...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/kafka_consumer.erl
erlang
------------------------------------------------------------------ API Function Exports ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ -------------------------...
-module(kafka_consumer). -behaviour(gen_server). -include("ejabberd.hrl"). -include("logger.hrl"). -include_lib("brod/include/brod.hrl"). -export([start_link/1]). -export([handle_message/4, init/2]). gen_server Function Exports -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, co...
7785d0e4853b17937359bdff834919a8d6ab54daf8163f68f14364e4e4108d12
exercism/erlang
book_store_tests.erl
Generated with ' v0.2.0 ' %% Revision 1 of the exercises generator was used %% -specifications/raw/7a8722ac4546baae28b4b2c1bdae14e04fdba88c/exercises/book-store/canonical-data.json %% This file is automatically generated from the exercises canonical data. -module(book_store_tests). -include_lib("erl_exercism/inclu...
null
https://raw.githubusercontent.com/exercism/erlang/9b3d3c14ef826e7efbc4fcd024fd20ed09332562/exercises/practice/book-store/test/book_store_tests.erl
erlang
Revision 1 of the exercises generator was used -specifications/raw/7a8722ac4546baae28b4b2c1bdae14e04fdba88c/exercises/book-store/canonical-data.json This file is automatically generated from the exercises canonical data.
Generated with ' v0.2.0 ' -module(book_store_tests). -include_lib("erl_exercism/include/exercism.hrl"). -include_lib("eunit/include/eunit.hrl"). '1_only_a_single_book_test_'() -> {"Only a single book", ?_assertEqual(800, book_store:total([1]))}. '2_two_of_the_same_book_test_'() -> {"Two of the sa...