_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
c61e746c477a9619455b5995f39fff7db6982eb4f926d301999777bf89fc92f3
dwayne/eopl3
store.test.rkt
#lang racket (require "./store.rkt") (require rackunit) (let ([store (empty-store)]) (match-let* ([(list s1 r1) (newref store 5)] [(list s2 r2) (newref s1 10)]) (check-equal? (deref s2 r1) 5) (check-equal? (deref s2 r2) 10) (let ([s3 (setref! s2 r1 (deref s2 r2))]) (let ([s4 (setr...
null
https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/EXPLICIT-REFS-4.12/store.test.rkt
racket
#lang racket (require "./store.rkt") (require rackunit) (let ([store (empty-store)]) (match-let* ([(list s1 r1) (newref store 5)] [(list s2 r2) (newref s1 10)]) (check-equal? (deref s2 r1) 5) (check-equal? (deref s2 r2) 10) (let ([s3 (setref! s2 r1 (deref s2 r2))]) (let ([s4 (setr...
2059b7d27ddb72d094dfe369b54598444286374a0a829b56f0c8050a17b42fdc
remyoudompheng/hs-language-go
Parser.hs
-- | Module : Language . Go . . Copyright : ( c ) 2011 License : ( see COPYING ) -- -- This module provides parsers for the various Go language elements. LANGUAGE CPP module Language.Go.Parser.Parser ( -- * All-in-one parsers goParse, goParseFileWith, goParseTestWith, -- * Tokeniz...
null
https://raw.githubusercontent.com/remyoudompheng/hs-language-go/5440485f6404356892eab4832cff4f1378c11670/Language/Go/Parser/Parser.hs
haskell
| This module provides parsers for the various Go language elements. * All-in-one parsers * Tokenizing and parsing a token stream * Parsers for main language elements | Tokenize Go language source code This is where semicolons are inserted into the token stream. We also filter out comments here, so any commen...
Module : Language . Go . . Copyright : ( c ) 2011 License : ( see COPYING ) LANGUAGE CPP module Language.Go.Parser.Parser ( goParse, goParseFileWith, goParseTestWith, goTokenize, goParseTokens, goSource, goImportDecl, goTopLevelDecl, goType, goBlock, goExpression, g...
2cebb94248c7ec0705dff15115e535773ba9256cba935a97cf7ff88c7be459bf
Frama-C/Frama-C-snapshot
global_decl_loc.ml
open Cil_types let run () = Globals.Vars.iter (fun vi _ -> Kernel.result "global variable %a declared at %a" Printer.pp_varinfo vi Printer.pp_location vi.vdecl ) let () = Db.Main.extend run
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/misc/global_decl_loc.ml
ocaml
open Cil_types let run () = Globals.Vars.iter (fun vi _ -> Kernel.result "global variable %a declared at %a" Printer.pp_varinfo vi Printer.pp_location vi.vdecl ) let () = Db.Main.extend run
795c2723bf84878dbe32193dd9c376c432b0e658aef1d42c7e90dfa8ab3321dc
nasa/Common-Metadata-Repository
util.clj
(ns cmr.common.util "Utility functions that might be useful throughout the CMR." (:require [camel-snake-kebab.core :as csk] [cheshire.core :as json] [clojure.data.codec.base64 :as b64] [clojure.java.io :as io] [clojure.pprint :refer [pprint print-table]] [clojure.reflect :refer [reflect]] [cloj...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/45b4ddb76da7690ca9b8ce2bbd02dbf93d0f296f/common-lib/src/cmr/common/util.clj
clojure
(are2 [] true) is meaningless but ok Catch wrong number of args Catch wrong number of args Extract the doc string from the function if present Wrap single arity functions in a list extract other arities defined in the function which will not be timed. extract the last arity definitions bindings and body if the...
(ns cmr.common.util "Utility functions that might be useful throughout the CMR." (:require [camel-snake-kebab.core :as csk] [cheshire.core :as json] [clojure.data.codec.base64 :as b64] [clojure.java.io :as io] [clojure.pprint :refer [pprint print-table]] [clojure.reflect :refer [reflect]] [cloj...
d1471c313093e2b696b75cf796a1cd3a134f95ef5897d632c968e6130fa216ea
reddit-archive/reddit1.0
user-panel.lisp
;;;; Copyright 2018 Reddit, Inc. ;;;; ;;;; Permission is hereby granted, free of charge, to any person obtaining a copy of ;;;; this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights to ;;;; use, copy, modify, merge, pu...
null
https://raw.githubusercontent.com/reddit-archive/reddit1.0/bb4fbdb5871a32709df30540685cf44c637bf203/user-panel.lisp
lisp
Copyright 2018 Reddit, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies so, subject to the following conditions: The a...
the Software without restriction , including without limitation the rights to of the Software , and to permit persons to whom the Software is furnished to do copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
9a0aeb755f389ddbdf25dcf866097b1fbe89053bffe0f324264afeec13486241
fakedata-haskell/fakedata
TheExpanse.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} module Faker.TvShow.TheExpanse where import Data.Text import Faker import Faker.Internal import Faker.Provider.TheExpanse import Faker.TH $(generateFakeField "theExpanse" "characters") $(generateFakeField "theExpanse" "locations") $(generateFakeField ...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/src/Faker/TvShow/TheExpanse.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.TvShow.TheExpanse where import Data.Text import Faker import Faker.Internal import Faker.Provider.TheExpanse import Faker.TH $(generateFakeField "theExpanse" "characters") $(generateFakeField "theExpanse" "locations") $(generateFakeField "theExpanse" "ships") $(generateFa...
920f3171cb5be26a4935c4b80e8f22a338764a5b3d8d20aece2e2608c8fe7de3
qoocku/erleos
erleos_utils.erl
%%% ========================================================================== @author < > @since 25 - 11 - 2010 @doc ErlLEOS Utilities . %%% %%% == Generic Server Utils == %%% %%% The defined utilities includes: %%% <ul> %%% <li>starting a server (see {@link start/1}, {@link start...
null
https://raw.githubusercontent.com/qoocku/erleos/ce14d2cfeea81053307b1fab815e0fbe3b9d1133/src/erleos_utils.erl
erlang
========================================================================== == Generic Server Utils == The defined utilities includes: <ul> <li>starting a server (see {@link start/1}, {@link start/2}, <li>stopping a server in synced way ({@link sync_stop/1}) and asy...
@author < > @since 25 - 11 - 2010 @doc ErlLEOS Utilities . { @link start_link/1 } , { @link start_link/2})</li > and ` terminate/2 ' ) ` handle_call(shutdown , _ , State ) ' and ` handle_cast(shutdown , State ) ' functions . -module (erleos_utils). -author ("Damian T. Dobroczy\\'nsk...
c918b742d2f9fea30f1bc3e8f2278655acac5e9d9957da5ce54ea5ec222cc522
let-def/lrgrep
mcop.ml
(******************************************************************************) (* *) Menhir (* *)...
null
https://raw.githubusercontent.com/let-def/lrgrep/29e64174dc9617bcd1871fd2e4fd712269568324/src/lrijkstra/mcop.ml
ocaml
**************************************************************************** the file LICENSE. ...
Menhir Copyright . All rights reserved . This file is distributed under the terms of the GNU General Public License version 2 , as described in type problem = int array type 'a solution = | Matrix of 'a | Product of 'a solutio...
d6e71b52a15c685e0fc4dec7761da6366cdd1e35ca8883d7a31810c81af71652
brendanhay/terrafomo
Settings.hs
-- This module is auto-generated. # LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # -- | Module : . Lailgun . Settings Copyright : ( c ) 2017 - 2018 License :...
null
https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-mailgun/gen/Terrafomo/Lailgun/Settings.hs
haskell
This module is auto-generated. | Stability : auto-generated * DomainReceivingRecords * DomainSendingRecords | The @sending_records@ nested settings definition.
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # Module : . Lailgun . Settings Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . Ma...
b23a0e808801d27307e3377b18cc6a0334da149fefd3ec1279bc57a18254d98e
hipsleek/hipsleek
util.ml
* Utility functions for Coolaid module E = Errormsg module H = Hashtbl module IH = Inthash open Pretty exception GotSignal of int let withTimeout (secs: float) (* Seconds for timeout *) (handler: int -> 'b) (* What to do if we have a timeout. The * argument pa...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/cil/ocamlutil/util.ml
ocaml
Seconds for timeout What to do if we have a timeout. The * argument passed is the signal number * received. The function to run And its argument ignore (Unix.alarm 2); * Print a hash table tail-recursive append: reverses xs tw...
* Utility functions for Coolaid module E = Errormsg module H = Hashtbl module IH = Inthash open Pretty exception GotSignal of int : 'b = let oldHandler = Sys.signal Sys.sigalrm (Sys.Signal_handle (fun i -> ignore (E.log "Got signal %d\n" i); raise (GotSignal i))) ...
9ec6c65bd2224a3a7652111cf6575bfbe986ac66d879c42b4fc817368a22b153
anurudhp/CPHaskell
c.hs
-- AC import Control.Arrow ((>>>)) main :: IO () main = interact $ lines >>> drop 1 >>> map (read >>> solve >>> show) >>> unlines solve :: Integer -> Integer solve 1 = 0 solve n = let r = round $ sqrt $ fromIntegral n in case compare (r * r) n of EQ -> 2 * r - 2 LT -> 2 * r - ...
null
https://raw.githubusercontent.com/anurudhp/CPHaskell/01ae8dde6aab4f6ddfebd122ded0b42779dd16f1/contests/codeforces/1426/c.hs
haskell
AC
import Control.Arrow ((>>>)) main :: IO () main = interact $ lines >>> drop 1 >>> map (read >>> solve >>> show) >>> unlines solve :: Integer -> Integer solve 1 = 0 solve n = let r = round $ sqrt $ fromIntegral n in case compare (r * r) n of EQ -> 2 * r - 2 LT -> 2 * r - 1 ...
819ad1953c8f5aa80427602ba0b2ffe5776ce6b54c0d869b89bf24c2025a6e78
mkremins/starfreighter
variant.cljs
(ns schema.spec.variant (:require [schema.utils :as utils] [schema.spec.core :as spec]) (:require-macros [schema.macros :as macros])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Variant Specs (defn- option-st...
null
https://raw.githubusercontent.com/mkremins/starfreighter/2be40b4aa5f288bb9829a2e1362a7bfc1e7f12dc/docs/js/app/schema/spec/variant.cljs
clojure
Variant Specs - spec/Precondition - [{:schema (s/protocol Schema) (s/optional-key :guard) (s/pred fn?) (s/optional-key :error-wrap) (s/pred fn?)}] - (s/pred fn?)
(ns schema.spec.variant (:require [schema.utils :as utils] [schema.spec.core :as spec]) (:require-macros [schema.macros :as macros])) (defn- option-step [o params else] (let [g (:guard o) c (spec/sub-checker o params) step (if g (f...
e927975c3af0e94088f66198ced4403aed757e0605476cb994a0f3595514ffb1
slipstream/SlipStreamServer
binding.clj
(ns com.sixsq.slipstream.db.binding) (defprotocol Binding "This protocol defines the core interface to the underlying database. All of the functions accept and return native clojure data structures. The functions must handle all necessary conversions for the database. For those functions that have a data a...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/db-binding/src/com/sixsq/slipstream/db/binding.clj
clojure
(ns com.sixsq.slipstream.db.binding) (defprotocol Binding "This protocol defines the core interface to the underlying database. All of the functions accept and return native clojure data structures. The functions must handle all necessary conversions for the database. For those functions that have a data a...
2be82819725a3babaa2d9eb72abc3ea5542176e09b92dc1ca4bce3b373d8c2e8
logseq/mldoc
type_parser.ml
open! Prelude module rec Lists : sig val parse : Conf.t -> (Type.t * Pos.pos_meta) list Angstrom.t -> Type.t Angstrom.t end = Lists0.MakeLists (Heading) and Heading : sig val parse : Conf.t -> Type.t Angstrom.t val anchor_link : string -> string end = Heading0.MakeHeading (Block) and Block : sig val...
null
https://raw.githubusercontent.com/logseq/mldoc/c0b5a837798d7e757b3f4eba162ba33999066fa2/lib/syntax/type_parser.ml
ocaml
open! Prelude module rec Lists : sig val parse : Conf.t -> (Type.t * Pos.pos_meta) list Angstrom.t -> Type.t Angstrom.t end = Lists0.MakeLists (Heading) and Heading : sig val parse : Conf.t -> Type.t Angstrom.t val anchor_link : string -> string end = Heading0.MakeHeading (Block) and Block : sig val...
40f0b1b4234ba697ed6c5dcd131fabf99c24ac3ec7eda369ec659559e3b13226
fisxoj/sanity-clause
field.lisp
(defpackage sanity-clause/test.field (:use #:cl #:rove #:sanity-clause.field #:alexandria #:arrows)) (in-package #:sanity-clause/test.field) (eval-when (:load-toplevel :compile-toplevel) (defvar +manual-only-fields+ '(map-field list-field nested-field one-field-of-field one-schema-of-field membe...
null
https://raw.githubusercontent.com/fisxoj/sanity-clause/04ca76048ebe9f177a1c78922952afe457bf3549/t/field.lisp
lisp
"signals an error on a non-uri value.")
(defpackage sanity-clause/test.field (:use #:cl #:rove #:sanity-clause.field #:alexandria #:arrows)) (in-package #:sanity-clause/test.field) (eval-when (:load-toplevel :compile-toplevel) (defvar +manual-only-fields+ '(map-field list-field nested-field one-field-of-field one-schema-of-field membe...
5b6ebce2b0c646d80a4574b22af38de7dd47355b15f1cf61f23cc244faa3f667
fredlund/McErlang
mce_quickcheck_commands.erl
-module(mce_quickcheck_commands). -export([run/1]). run([]) -> run([],orddict:new()). run([],Store) -> Store; run([Command|Rest],Store) -> run(Rest,run_command(Command,Store)). run_command({set,Var,Call},Store) -> {call,ModuleName,FunName,Args} = Call, bind(Var,do_call(ModuleName,FunName,Args,Store),Store)...
null
https://raw.githubusercontent.com/fredlund/McErlang/25b38a38a729fdb3c3d2afb9be016bbb14237792/src/mce_quickcheck_commands.erl
erlang
-module(mce_quickcheck_commands). -export([run/1]). run([]) -> run([],orddict:new()). run([],Store) -> Store; run([Command|Rest],Store) -> run(Rest,run_command(Command,Store)). run_command({set,Var,Call},Store) -> {call,ModuleName,FunName,Args} = Call, bind(Var,do_call(ModuleName,FunName,Args,Store),Store)...
44af4dc6dfd48d1090b9a6d78d6baea2904fc2aa6302e89942e4496d7a807c4f
achirkin/vulkan
VK_EXT_post_depth_coverage.hs
# OPTIONS_HADDOCK not - home # {-# LANGUAGE DataKinds #-} {-# LANGUAGE MagicHash #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE Strict #-} {-# LANGUAGE ViewPatterns #-} module Graphics.Vulkan.Ext.VK_EXT_post_depth_coverage * Vulkan extension : @VK_EXT_post_depth_coverage@ -- | -...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_EXT_post_depth_coverage.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE MagicHash # # LANGUAGE Strict # # LANGUAGE ViewPatterns # | supported: @vulkan@ contact: @Daniel Koch @dgkoch@ type: @device@ Extension number: @156@ # INLINE _VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME #
# OPTIONS_HADDOCK not - home # # LANGUAGE PatternSynonyms # module Graphics.Vulkan.Ext.VK_EXT_post_depth_coverage * Vulkan extension : @VK_EXT_post_depth_coverage@ author : VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION, pattern VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION, VK_EXT_POST_DEPTH_COVERAGE_E...
59dc1b8d4623c8e79ad466097ca759a86e62017c6449624d48ab4bef1e3d59cf
bmeurer/ocaml-arm
odoc_todo.ml
(***********************************************************************) (* OCamldoc *) (* *) , projet Cristal , INRIA Rocquencourt (* ...
null
https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/ocamldoc/generators/odoc_todo.ml
ocaml
********************************************************************* OCamldoc ...
, projet Cristal , INRIA Rocquencourt Copyright 2010 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ Id$ open Odoc_info module Naming = O...
a76f7c493c64dbc7b727d87fcb4b87e2713f009f1e777a3fc92aca2f17980ae1
aistrate/Okasaki
Ex03_06_0.hs
# LANGUAGE FlexibleInstances , MultiParamTypeClasses # module Ex03_06 (module Heap, BinomialHeap(..), Tree(..), rank, root) where import Heap data Tree a = Node a [Tree a] newtype BinomialHeap a = BH [(Int, Tree a)] rank (r, Node x c) = r root (r, Node x c) = x link (r, n1@(Node x1 c1)) (_, n2@(Node x2 c2)) =...
null
https://raw.githubusercontent.com/aistrate/Okasaki/cc1473c81d053483bb5e327409346da7fda10fb4/MyCode/Ch03/Ex03_06_0.hs
haskell
Helpers
# LANGUAGE FlexibleInstances , MultiParamTypeClasses # module Ex03_06 (module Heap, BinomialHeap(..), Tree(..), rank, root) where import Heap data Tree a = Node a [Tree a] newtype BinomialHeap a = BH [(Int, Tree a)] rank (r, Node x c) = r root (r, Node x c) = x link (r, n1@(Node x1 c1)) (_, n2@(Node x2 c2)) =...
543491944c902ad94583a7f80d741eecc6de7b4dcb298d19c4efa202c72f9926
graninas/Hydra
IO.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE FlexibleContexts #-} # LANGUAGE ScopedTypeVariables # module IO where import Control.Monad import Hydra.Prelude import System.Random hiding (next) flow :: IORef Int -> IO () flow ref = do val' <- readIORef ref val <- randomRIO ...
null
https://raw.githubusercontent.com/graninas/Hydra/60d591b1300528f5ffd93efa205012eebdd0286c/app/PerfTestApp2/src/IO.hs
haskell
# LANGUAGE FlexibleContexts #
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # module IO where import Control.Monad import Hydra.Prelude import System.Random hiding (next) flow :: IORef Int -> IO () flow ref = do val' <- readIORef ref val <- randomRIO (1, 100) writeIORef ref $ val' + va...
54fe899bae9704c99064e215018f30c4d19048b6edcda2a73839ac009dbc4c43
Frama-C/Frama-C-snapshot
operational_inputs.ml
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/inout/operational_inputs.ml
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
78dd1229072dbf978bd1d9cd6827a0435b68669f781ccb3150f3d05e7c803674
tolitius/mount
logging.clj
(ns app.utils.logging ;; << change to your namespace/path (:require [mount.core] [robert.hooke :refer [add-hook clear-hooks]] [clojure.string :refer [split]] [clojure.tools.logging :refer [info]])) (alter-meta! *ns* assoc ::load false) (defn- f-to-action [f {:keys [statu...
null
https://raw.githubusercontent.com/tolitius/mount/c85da6149ceab96c903c1574106ec56f78338b5f/dev/clj/app/utils/logging.clj
clojure
<< change to your namespace/path this is the one to use:
(:require [mount.core] [robert.hooke :refer [add-hook clear-hooks]] [clojure.string :refer [split]] [clojure.tools.logging :refer [info]])) (alter-meta! *ns* assoc ::load false) (defn- f-to-action [f {:keys [status]}] (let [fname (-> (str f) (split #"@") ...
79a29556f9ef1637a1f7b6df8944ee9fdc01dc759016134288f4c57d8ab1bc54
racket/gui
sound.rkt
#lang racket/base (require ffi/unsafe ffi/unsafe/objc "utils.rkt" "types.rkt") (provide (protect-out play-sound)) (import-class NSSound) (define-objc-class RacketSound NSSound [result sema] [-a _void (sound: [_id sound] didFinishPlaying: [_BOOL ok?]) (set! result ok?) ...
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/cocoa/sound.rkt
racket
use the `retain' method instead of the `retain' function, because we don't want a finalization-triggered release:
#lang racket/base (require ffi/unsafe ffi/unsafe/objc "utils.rkt" "types.rkt") (provide (protect-out play-sound)) (import-class NSSound) (define-objc-class RacketSound NSSound [result sema] [-a _void (sound: [_id sound] didFinishPlaying: [_BOOL ok?]) (set! result ok?) ...
be848b0ed98a97e06ab449c33598670f6b722fd62581f519f08f1808e9470f7f
radian628/lispsmos
linear-algebra.lisp
(folder ((title "Linear Algebra")) ; Matrix multiplication (evalMacro ct " return [['concatTokens'].concat(args.slice(1))]; ") (defineFindAndReplace inlineDot x1 y1 z1 x2 y2 z2 ((+ (* x1 x2) (* y1 y2) (* z1 z2))) ) (defineFindAndReplace mat3WithoutLists varName a b c d e f g h i ( (= (ct ...
null
https://raw.githubusercontent.com/radian628/lispsmos/d876f7e81129c1990ea1007dadb04cf5d1641d9d/test/desmos-plane/linear-algebra.lisp
lisp
Matrix multiplication
(folder ((title "Linear Algebra")) (evalMacro ct " ") (defineFindAndReplace inlineDot x1 y1 z1 x2 y2 z2 ((+ (* x1 x2) (* y1 y2) (* z1 z2))) ) (defineFindAndReplace mat3WithoutLists varName a b c d e f g h i ( (= (ct varName 1) a) (= (ct varName 2) b) (= (ct varName 3) c) (= (c...
8d9dd5eea907e3f47abf38e9507dc49aa9496eb5cb3cd217bfdf2d904f361b6e
rmculpepper/gamble
context.rkt
Copyright ( c ) 2014 Released under the terms of the 2 - clause BSD license . ;; See the file COPYRIGHT for details. #lang racket/base (require (for-syntax racket/base) racket/performance-hint racket/match racket/stxparam markparam) (provide (all-defined-out)) ;; This module ...
null
https://raw.githubusercontent.com/rmculpepper/gamble/a5231e2eb3dc0721eedc63a77ee6d9333846323e/gamble/private/context.rkt
racket
See the file COPYRIGHT for details. This module defines parameters and functions used for address-tracking (a la Bher) and conditioning. See instrument.rkt for the implementation (through rewriting of expanded modules) of the approaches described here. ------------------------------------------------------------ ...
Copyright ( c ) 2014 Released under the terms of the 2 - clause BSD license . #lang racket/base (require (for-syntax racket/base) racket/performance-hint racket/match racket/stxparam markparam) (provide (all-defined-out)) Static communication (define-syntax-parameter ADD...
a7931b62f6c235bd1a76ae569440bf02ae6c3afbf88531089a1d736629b16375
sosy-lab/tbf
machdepenv.inferred.mli
module R = Str module L = List module H = Hashtbl val preparse : string -> (string, string list) H.t val errorWrap : string -> (string -> 'a) -> 'a val getNthString : int -> ('a, 'b list) H.t -> 'a -> 'b val getNthInt : int -> (string, string list) H.t -> string -> int val getNthBool : int -> (string, string list) H.t ...
null
https://raw.githubusercontent.com/sosy-lab/tbf/18d08d6cee6fbfbad4d4ebfa7aed235521edec2b/tbf/tools/crest/cil/_build/src/machdepenv.inferred.mli
ocaml
module R = Str module L = List module H = Hashtbl val preparse : string -> (string, string list) H.t val errorWrap : string -> (string -> 'a) -> 'a val getNthString : int -> ('a, 'b list) H.t -> 'a -> 'b val getNthInt : int -> (string, string list) H.t -> string -> int val getNthBool : int -> (string, string list) H.t ...
f1e47da9e64d0188461a63127b226915380ac9d0edbffd27e0456b0014af17d7
jacekschae/learn-re-frame-course-files
authenticated.cljs
(ns app.nav.views.authenticated (:require [re-frame.core :as rf] [app.router :as router] [app.nav.views.nav-item :refer [nav-item]] ["@smooth-ui/core-sc" :refer [Box]])) (defn authenticated [] (let [active-nav @(rf/subscribe [:active-nav]) nav-items [{:id :saved ...
null
https://raw.githubusercontent.com/jacekschae/learn-re-frame-course-files/a86e6f14b89c595b4389b03459539a9544af4e1d/increments/23-active-page/src/app/nav/views/authenticated.cljs
clojure
(ns app.nav.views.authenticated (:require [re-frame.core :as rf] [app.router :as router] [app.nav.views.nav-item :refer [nav-item]] ["@smooth-ui/core-sc" :refer [Box]])) (defn authenticated [] (let [active-nav @(rf/subscribe [:active-nav]) nav-items [{:id :saved ...
8dc0a02fcb64497650f2dbff0d4631b1aee6045083a089d874d98eff5484b3ee
fission-codes/fission
Main.hs
# OPTIONS_GHC -fno - warn - type - defaults # module Main (main) where import RIO import qualified RIO.Partial as Part import RIO.Process import Data.List (genericLength) import Data.Maybe (catMaybes) import System.Exit (exitFailure, exitSuccess) import Text.Regex (matchRegex, mkRegex) main ...
null
https://raw.githubusercontent.com/fission-codes/fission/fb76d255f06ea73187c9b787bd207c3778e1b559/ipfs/test/coverage-code/Main.hs
haskell
# OPTIONS_GHC -fno - warn - type - defaults # module Main (main) where import RIO import qualified RIO.Partial as Part import RIO.Process import Data.List (genericLength) import Data.Maybe (catMaybes) import System.Exit (exitFailure, exitSuccess) import Text.Regex (matchRegex, mkRegex) main ...
ac7b0ec7e2ac05811a769163770f4a54a69d6748204ae21452c3b97b11996267
soren-n/bidi-higher-rank-poly
Order.ml
type total = | EQ | LT | GT let total_order left right = if left = right then EQ else if left < right then LT else GT let int_compare a b = if a = b then EQ else if a < b then LT else GT
null
https://raw.githubusercontent.com/soren-n/bidi-higher-rank-poly/c0957759657b30a52235560d1d5f40e9bd2569b3/util/lib/Order.ml
ocaml
type total = | EQ | LT | GT let total_order left right = if left = right then EQ else if left < right then LT else GT let int_compare a b = if a = b then EQ else if a < b then LT else GT
3f3e86e477546bbe4f8aaaed7e844b6223612cfdcde4283c87eed95e5cfef1b4
bcc32/advent-of-code
robot.mli
open! Core open! Import module Dir = Dir module Point = Point type _ t [@@deriving sexp_of] val create_without_dir : initial_loc:Point.t -> [ `dummy ] t val create_with_dir : initial_loc:Point.t -> initial_dir:Dir.t -> [ `dir ] t val loc : _ t -> Point.t val step_forward : [> `dir ] t -> unit val step_backward : [> `...
null
https://raw.githubusercontent.com/bcc32/advent-of-code/653c0f130e2fb2f599d4e76804e02af54c9bb19f/2019/robot/robot.mli
ocaml
open! Core open! Import module Dir = Dir module Point = Point type _ t [@@deriving sexp_of] val create_without_dir : initial_loc:Point.t -> [ `dummy ] t val create_with_dir : initial_loc:Point.t -> initial_dir:Dir.t -> [ `dir ] t val loc : _ t -> Point.t val step_forward : [> `dir ] t -> unit val step_backward : [> `...
bc8221e3f78ac56dca9b42e88eb1475c1b5a2294af7f1e7eb06fe034e76356eb
input-output-hk/casino
Product.hs
{-# LANGUAGE GADTs #-} # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeInType #-} # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ScopedTypeVariables # # LANGUAGE Exist...
null
https://raw.githubusercontent.com/input-output-hk/casino/3434448e657aa9bfdfc9216f8fb9d7984460b95b/shuffle-proof/src/Crypto/Casino/ZKSH/Product.hs
haskell
# LANGUAGE GADTs # # LANGUAGE ConstraintKinds # # LANGUAGE TypeInType # # LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # import qualified Crypto.Casino.Matrix as Matrix import Debug.Trace initial message after challenge 'x', 'y' after challenge 'x' after challenge 'x' entry wise multipli...
# LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ScopedTypeVariables # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # # LAN...
0644958bd1dd91d6f1bc1ef8bcacebbefecc0504f83dc5a8fb4c1e927b8bd0b0
vernemq/vernemq
vmq_metrics_sup.erl
Copyright 2018 Erlio GmbH Basel Switzerland ( ) %% 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, sof...
null
https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_server/src/vmq_metrics_sup.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 governing perm...
Copyright 2018 Erlio GmbH Basel Switzerland ( ) Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(vmq_metrics_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(CHILD(I, Type, Args...
173ae8ff1e4140a2977e3fe9144da31525dfc62e8700b9dbb800b9871d21f322
bmeurer/ocamljit2
opttopmain.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/toplevel/opttopmain.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ Id$ open Clflags let usage = "Usa...
7a6826314e03362a4b6f9c15d75012dfa73d6dd1877d8c43efb8ac7a8580c0e6
int28h/HaskellTasks
0009.hs
Последовательность чисел Фибоначчи 0,1,1,2,3,5,8,13,21 , … легко определить рекурсивно , задав два первых терминирующих значения и определив любое последующее как сумму двух непосредственно предыдущих : F[0 ] = 0 F[1 ] = 1 F[n ] = F[n−1 ] + F[n−2 ] данное определение задаётся : fibonacci 0 = 0 fi...
null
https://raw.githubusercontent.com/int28h/HaskellTasks/38aa6c1d461ca5774350c68fa7dd631932f10f84/src/0009.hs
haskell
Последовательность чисел Фибоначчи 0,1,1,2,3,5,8,13,21 , … легко определить рекурсивно , задав два первых терминирующих значения и определив любое последующее как сумму двух непосредственно предыдущих : F[0 ] = 0 F[1 ] = 1 F[n ] = F[n−1 ] + F[n−2 ] данное определение задаётся : fibonacci 0 = 0 fi...
a44de59fe7627be768b0b2992bcc02e0cd6e9be5255b68402f12367f9f3a4b37
noprompt/meander
cek.clj
(ns cek (:require [meander.epsilon :as m])) ;; C ::= x ;; | (lambda x t) ;; | (t1 t2) ;; E ::= {x ((lambda x t) E)} ;; K ::= Done | ( EArg t , E , K ) ;; | (Call t, E, K) (defn step [state] (m/rewrite state {:C (m/pred symbol? ?x) :E {?x (?lambda ?E*)} :K ?K} ;; => {:C ?lam...
null
https://raw.githubusercontent.com/noprompt/meander/8c0e9457befea5eee71a94a6d8726ed5916875dc/examples/cek.clj
clojure
C ::= x | (lambda x t) | (t1 t2) E ::= {x ((lambda x t) E)} K ::= Done | (Call t, E, K) => => => => => =>
(ns cek (:require [meander.epsilon :as m])) | ( EArg t , E , K ) (defn step [state] (m/rewrite state {:C (m/pred symbol? ?x) :E {?x (?lambda ?E*)} :K ?K} {:C ?lambda :E ?E* :K ?K} {:C (?t1 ?t2) :E ?E :K ?K} {:C ?t1 :E ?E :K (EArg ?t2 ?E ?K)} {:C ...
3d347018efe7d88c1064d790da4240049e8aba044e1ea6393951e1f12fe0247f
ryzhyk/cocoon
NetKAT.hs
Copyrights ( c ) 2016 . Samsung Electronics Ltd. All right reserved . 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 ...
null
https://raw.githubusercontent.com/ryzhyk/cocoon/409d10b848a4512e7cf653d5b6cf6ecf247eb794/cocoon/NetKAT/NetKAT.hs
haskell
Convert Cocoon spec to NetKAT Generate all switches in the topology Generate NetKAT switch
Copyrights ( c ) 2016 . Samsung Electronics Ltd. All right reserved . 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 ...
049c348ed1d3dfe4e7475619da0381d5d97bc93c6b82e6e18b0d9a75ebce7ba5
darkling/lagra
serializer_ntriples_SUITE.erl
The following module is generated by the script . %%% Do not edit by hand. -module(serializer_ntriples_SUITE). -include_lib("common_test/include/ct.hrl"). -export([all/0]). %% The test suite is generated from the test manifest file ct/serializer_ntriples_SUITE_data/manifest.ttl -export([nt_syntax_file_01/1]). -ex...
null
https://raw.githubusercontent.com/darkling/lagra/6827ea20db86aeb4c139db45bd3133ffccfddb7d/ct/serializer_ntriples_SUITE.erl
erlang
Do not edit by hand. The test suite is generated from the test manifest file ct/serializer_ntriples_SUITE_data/manifest.ttl Load the file Write it out Load it again Test that they're isomorphic Load the file Write it out Load it again Test that they're isomorphic Load the file Write it out Load it again T...
The following module is generated by the script . -module(serializer_ntriples_SUITE). -include_lib("common_test/include/ct.hrl"). -export([all/0]). -export([nt_syntax_file_01/1]). -export([nt_syntax_file_02/1]). -export([nt_syntax_file_03/1]). -export([nt_syntax_uri_01/1]). -export([nt_syntax_uri_02/1]). -export(...
69ecc086fc3310aab32860493eb57483081effa6b208b7032ef381a27721a77f
hbr/fmlib
http_request.mli
(** Http requests made in the browser. This module uses the javascript object [XMLHttpRequest] to make http requests. *) type t * Type of a http request object All properties of an http request object { { : } see } . All properties of an http request object {{:-US/docs/Web/API/XMLHttpRequ...
null
https://raw.githubusercontent.com/hbr/fmlib/169a1b8e53c828d24329398b6ee0a6deab41a662/src/js/http_request.mli
ocaml
* Http requests made in the browser. This module uses the javascript object [XMLHttpRequest] to make http requests. * [make method url headers body]
type t * Type of a http request object All properties of an http request object { { : } see } . All properties of an http request object {{:-US/docs/Web/API/XMLHttpRequest} see}. *) val event_target: t -> Event_target.t * View the request as an event target . It is recommended to add a li...
e7ae957b389fcc61fa7090eab01a1db6fedbee1b842ff151600cb65371326ac5
techascent/tech.datatype
binary_impl_helper.clj
(ns tech.v2.datatype.binary-impl-helper (:require [tech.v2.datatype.protocols :refer [default-endianness] :as dtype-proto])) (defmacro reify-binary-reader-header [endianness buffer lsize options constructor-fn & body] `(let [buffer# ~buffer options# ~options] (reify ...
null
https://raw.githubusercontent.com/techascent/tech.datatype/8cc83d771d9621d580fd5d4d0625005bd7ab0e0c/src/tech/v2/datatype/binary_impl_helper.clj
clojure
(ns tech.v2.datatype.binary-impl-helper (:require [tech.v2.datatype.protocols :refer [default-endianness] :as dtype-proto])) (defmacro reify-binary-reader-header [endianness buffer lsize options constructor-fn & body] `(let [buffer# ~buffer options# ~options] (reify ...
9a12be52449001d75317b735b2bdf0e64081801cf1034fb0b3571e646afa0b8c
mbenelli/klio
kliows.scm
kliows.scm - Klio web server launcher ;; Copyright ( c ) 2010 , 2011 by < > All Rights Reserved . (define (main . args) (sessions#start-sessions-manager) (kws#kws port-number: 8000 server-root: "." multithread: #t)) (main)
null
https://raw.githubusercontent.com/mbenelli/klio/33c11700d6080de44a22a27a5147f97899583f6e/klio/kliows.scm
scheme
kliows.scm - Klio web server launcher Copyright ( c ) 2010 , 2011 by < > All Rights Reserved . (define (main . args) (sessions#start-sessions-manager) (kws#kws port-number: 8000 server-root: "." multithread: #t)) (main)
9f0959a4158215cee1e0e75819aca91885d75c51a214e69711fd4ba17d374bf6
mlabs-haskell/ply
Main.hs
module Main (main) where import System.FilePath ((</>)) import Plutarch (Config (Config, tracingMode), TracingMode (DoTracing)) import Ply.Plutarch import Example.NftM (nftMp) main :: IO () main = writeTypedScript (Config {tracingMode = DoTracing}) "NFT Minting Policy (DoTracing)" ("compiled" </> "nft...
null
https://raw.githubusercontent.com/mlabs-haskell/ply/f474dcfeaf7f7a102f136b8bb71c5b684993eea4/example/compiler-app/Main.hs
haskell
module Main (main) where import System.FilePath ((</>)) import Plutarch (Config (Config, tracingMode), TracingMode (DoTracing)) import Ply.Plutarch import Example.NftM (nftMp) main :: IO () main = writeTypedScript (Config {tracingMode = DoTracing}) "NFT Minting Policy (DoTracing)" ("compiled" </> "nft...
2a8dd7f0244f932db98d60407dc7a2871c74fc74a170f358f59051b279fac0b4
wireapp/wire-server
V73_MemberClientTable.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/abe85c6ac52d76e5290a945579c40fb3f98437f1/services/galley/schema/src/V73_MemberClientTable.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module V73_MemberClientTable whe...
107358ee6d95673241ce4008b6ab5f6ce24d866c06bdc25f04e769eb40e1b246
haskell-gi/haskell-gi
hello-world.hs
{-# LANGUAGE OverloadedStrings, OverloadedLabels #-} # OPTIONS_GHC -fno - warn - unused - do - bind # {- Hello World example of GTK+ documentation. For information please refer to README -} module Main where -- import qualified Data.Text as T import Data.Text () import qualified GI.Gio as Gio import qualified GI.G...
null
https://raw.githubusercontent.com/haskell-gi/haskell-gi/bff8f3b92bf2594ea3d6745c346a8de594fc3709/examples/introductory/src/hello-world.hs
haskell
# LANGUAGE OverloadedStrings, OverloadedLabels # Hello World example of GTK+ documentation. For information please refer to README import qualified Data.Text as T
# OPTIONS_GHC -fno - warn - unused - do - bind # module Main where import Data.Text () import qualified GI.Gio as Gio import qualified GI.Gtk as Gtk import Data.GI.Base printHello :: IO () printHello = putStrLn "Hello, World!" activateApp :: Gtk.Application -> IO () activateApp app = do w <- new Gtk.Applicatio...
f863548ebb129b2c590a172608d85512a5ed731fdcb28aeb4a8fa83e470d73fa
janestreet/memtrace_viewer_with_deps
test_bigstring_safe_accessors.ml
open Core_kernel let generic_mk_set_and_print_for_test ~to_string ~set ~get buf = Staged.stage (fun ~test_name ~pos n -> try set buf ~pos n; printf "%s: %s\n" test_name (to_string (get buf ~pos)) with | e -> printf !"%s: %{Exn}\n" test_name e) ;; let mk_set_and_print_for_test = generic_mk_se...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/core_kernel/test/src/test_bigstring_safe_accessors.ml
ocaml
open Core_kernel let generic_mk_set_and_print_for_test ~to_string ~set ~get buf = Staged.stage (fun ~test_name ~pos n -> try set buf ~pos n; printf "%s: %s\n" test_name (to_string (get buf ~pos)) with | e -> printf !"%s: %{Exn}\n" test_name e) ;; let mk_set_and_print_for_test = generic_mk_se...
3ae385b6daa9181b6969229478246823330611b99c94ef7414da99e58a02b730
samply/blaze
search_param_registry_test_perf.clj
(ns blaze.db.search-param-registry-test-perf (:require [blaze.db.search-param-registry :as sr] [blaze.fhir.structure-definition-repo] [blaze.test-util :refer [with-system]] [clojure.test :refer [deftest testing]] [criterium.core :as criterium] [integrant.core :as ig] [taoensso.timbre :as l...
null
https://raw.githubusercontent.com/samply/blaze/f7d26bf3db0bc74b9195c59891261b1eb2c5accb/modules/db/test-perf/blaze/db/search_param_registry_test_perf.clj
clojure
(ns blaze.db.search-param-registry-test-perf (:require [blaze.db.search-param-registry :as sr] [blaze.fhir.structure-definition-repo] [blaze.test-util :refer [with-system]] [clojure.test :refer [deftest testing]] [criterium.core :as criterium] [integrant.core :as ig] [taoensso.timbre :as l...
1eb7ee07fbb7b7c7d256d2107c402e80059c9f023a17e47cd3746fd491835392
rudymatela/tankode
Trigonometry.hs
-- | Module : Copyright : ( c ) 2016 , 2017 License : LGPL 2.1 ( see the file LICENSE ) -- -- Trigonometry functions for rational numbers. -- I think this module is now unused in Tankode . -- Check and remove soon. module Trigonometry where import Test.LeanCheck.Error (errorToNothing) import...
null
https://raw.githubusercontent.com/rudymatela/tankode/299ec6f78a9a18a8fc902be911a556d0497c30e1/runner/src/Trigonometry.hs
haskell
| Trigonometry functions for rational numbers. Check and remove soon. asin range: -1%4 .. +1%4 add this approximation ?
Module : Copyright : ( c ) 2016 , 2017 License : LGPL 2.1 ( see the file LICENSE ) I think this module is now unused in Tankode . module Trigonometry where import Test.LeanCheck.Error (errorToNothing) import Prelude hiding (pi, sin, cos, asin, acos, tan) import qualified Prelude (atan, pi) i...
e66f72cc7e769ea7732f586fdf24452aefcf6de0b29e3efc2beb37fc26a554a9
fare/xcvb
list-files.lisp
#+xcvb (module (:depends-on ("dependencies-interpreter" "commands"))) (in-package :xcvb) ;;; LIST-GRAINS (defparameter *grains-list* ()) (defparameter *grains-table* (make-hash-table :test 'equal)) (defclass grain-listing-traversal (simplifying-traversal) ()) (defmethod graph-for :around ((env grain-listing-trave...
null
https://raw.githubusercontent.com/fare/xcvb/460e27bd4cbd4db5e7ddf5b22c2ee455df445258/list-files.lisp
lisp
LIST-GRAINS TODO: some magic to break circularities that are due to flattening conditionals. Remove XCVB ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TODO: Put handle-case here to trap the error for a noncanonical fullname strips XCVB modules from them. for some reason, the builds are different objects(!). HOW???
#+xcvb (module (:depends-on ("dependencies-interpreter" "commands"))) (in-package :xcvb) (defparameter *grains-list* ()) (defparameter *grains-table* (make-hash-table :test 'equal)) (defclass grain-listing-traversal (simplifying-traversal) ()) (defmethod graph-for :around ((env grain-listing-traversal) spec) (m...
2c4d2816303aaf9bf6645df69ad317f03b0aecab4708c32c4a1a6f6ee4add853
aantron/luv
semaphore.ml
This file is part of Luv , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) type t = C.Types.Semaphore.t Ctypes.ptr let init count = let semaphore = Ctypes.addr (Ctypes.make C.Types.Semaphore.t) in C.Functions.Semaphore.init semaphore (Unsigned.UInt.of_i...
null
https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/src/semaphore.ml
ocaml
This file is part of Luv , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) type t = C.Types.Semaphore.t Ctypes.ptr let init count = let semaphore = Ctypes.addr (Ctypes.make C.Types.Semaphore.t) in C.Functions.Semaphore.init semaphore (Unsigned.UInt.of_i...
657ca63ae6198cb7cb5b0f4ea01997468a8f4a55f5da912a09a56be040e011e5
processone/xmpp
xmpp_uri.erl
%%%------------------------------------------------------------------- @author < > %%% @doc XMPP URI processing library ( see ) %%% @end Created : 27 Nov 2017 by < > %%% %%% Copyright ( C ) 2002 - 2023 ProcessOne , SARL . All Rights Reserved . %%% Licensed under the Apache License , Version 2.0 ( the...
null
https://raw.githubusercontent.com/processone/xmpp/3e0f4b07af708718cf891ca409c0819e60606cf9/src/xmpp_uri.erl
erlang
------------------------------------------------------------------- @doc @end 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, ei...
@author < > XMPP URI processing library ( see ) Created : 27 Nov 2017 by < > Copyright ( C ) 2002 - 2023 ProcessOne , SARL . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(xmpp_...
11d55c05db7f7b1a057840be10aca1d1846b56c0528072323662f81207c52dcb
michiakig/sicp
ex-5.14-stack-depth.scm
;;;; Structure and Interpretation of Computer Programs Chapter 5 Section 2 Exercise 5.14 ;; a sort of mini driver to run the factorial machine, print stats, and reset it (define (fact n) recursive factorial machine from fig . 5.11 (define recur-fact-machine (make-machine '(continue n val) (lis...
null
https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch5/ex-5.14-stack-depth.scm
scheme
Structure and Interpretation of Computer Programs a sort of mini driver to run the factorial machine, print stats, and reset it (perform (op display) (const "\nallocate n:")) (assign n (op read)) From this it's obvious that the stack depth for computing (fact n) Value: done
Chapter 5 Section 2 Exercise 5.14 (define (fact n) recursive factorial machine from fig . 5.11 (define recur-fact-machine (make-machine '(continue n val) (list (list '* *) (list '- -) (list '= =) (list 'display display) (list 'read read)) '((ass...
45bd4c616bb7835d7c6de1ff3786596948b902aadc074e5fc717b0fd5f86da15
FranklinChen/learn-you-some-erlang
tree_tests.erl
-module(tree_tests). -include_lib("eunit/include/eunit.hrl"). empty_test() -> ?assert({node, 'nil'} =:= tree:empty()). %% oh god this gets ugly insert_test_() -> T1 = tree:insert(a, "a", tree:empty()), T2 = tree:insert(c, "c", T1), T3 = tree:insert(n, "n", tree:insert(z, "z", tree:in...
null
https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/tests/tree_tests.erl
erlang
oh god this gets ugly not as bad! done with both insert and lookup
-module(tree_tests). -include_lib("eunit/include/eunit.hrl"). empty_test() -> ?assert({node, 'nil'} =:= tree:empty()). insert_test_() -> T1 = tree:insert(a, "a", tree:empty()), T2 = tree:insert(c, "c", T1), T3 = tree:insert(n, "n", tree:insert(z, "z", tree:insert(t, "t", tre...
a7399586fd9f7b9045bab6aa2cf9091bfafd12b5636e0726ec74af24edf9c376
jamiltron/Thieflike
Main.hs
module Main where import Data.Lens.Common ((^.), (^=)) import Prelude hiding (Either(..)) import System.Console.ANSI import System.IO import Console import Level import Types operator to add 2 coordinates together (|+|) :: Coord -> Coord -> Coord (|+|) (x1, y1) (x2, y2) = (x1 + x2, y1 + y2) -- receive a charact...
null
https://raw.githubusercontent.com/jamiltron/Thieflike/da830aeb5efbd2e62fc778f90555cc36cc1f8c94/src/Main.hs
haskell
receive a character and return our Input data structure, recursing on invalid input translate a direction to a coordinate so it can be added to the hero's coordinate to move the hero around add the supplied direction to the hero's position, and set that to be the hero's new position, making when the user wants...
module Main where import Data.Lens.Common ((^.), (^=)) import Prelude hiding (Either(..)) import System.Console.ANSI import System.IO import Console import Level import Types operator to add 2 coordinates together (|+|) :: Coord -> Coord -> Coord (|+|) (x1, y1) (x2, y2) = (x1 + x2, y1 + y2) getInput :: IO Input...
40f2ece3df01fa94bab9bf49ff428d866865c611031706595a7314869c92da57
Leystryku/mpbomberman_racket
sv_helper.rkt
#lang racket ;; import (require 2htdp/universe) (require "sh_config.rkt") (require "sh_structs.rkt") ;; export (provide (all-defined-out)) ;; [saveWorldState] Saves the current world state (define (saveWorldState currentWorld) (make-bundle currentWorld '() '() ) ) ;; [makeClientsMail] Sends a messa...
null
https://raw.githubusercontent.com/Leystryku/mpbomberman_racket/059d95040cfad2e27237f8dd41fc32a4fc698afe/game/sv_helper.rkt
racket
import export [saveWorldState] Saves the current world state [makeClientsMail] Sends a message to all connections given [getClientConnection] Gets the connection of a client [getClientConnection] Gets the connection of all clients [getClientData] Gets the client data/player data of a client [getClientDatas] Get...
#lang racket (require 2htdp/universe) (require "sh_config.rkt") (require "sh_structs.rkt") (provide (all-defined-out)) (define (saveWorldState currentWorld) (make-bundle currentWorld '() '() ) ) (define (makeClientsMail connections msg) (for/list ([connection connections]) (make-mail connecti...
cb65edaa0bc2ba961ba86cc2c8e5cb340797ef1634bfce4003802d45483d122d
startalkIM/ejabberd
extauth.erl
%%%---------------------------------------------------------------------- %%% File : extauth.erl Author : < > %%% Purpose : External authentication using a simple port-driver Created : 30 Jul 2004 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne %%% %%% This program is free software;...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/extauth.erl
erlang
---------------------------------------------------------------------- File : extauth.erl Purpose : External authentication using a simple port-driver This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it...
Author : < > Created : 30 Jul 2004 by < > ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License along ...
547ec9b15285c1d834a4295a59dcb6322fee201e1adb1c50d126199fbb62df80
ivanperez-keera/SpaceInvaders
Animate.hs
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * I N V A D E R S * * ...
null
https://raw.githubusercontent.com/ivanperez-keera/SpaceInvaders/355a170c63a5f866c9c67fc42c58f9b7e9b18b58/src/Animate.hs
haskell
Approach: The signal function is sampled as frequently as possible. It's the OS's task to allocate resources, so we can just as well use up all the CPU cycles we get. But since drawing is very time consuming, we draw at a fixed, user-defineable, presumably lower rate, thus allowing the user to control the ratio be...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * I N V A D E R S * * ...
38cf471e023e1da428aa2b25972968e1d09d97123c5a1030b78e649df4616400
ocaml-multicore/domainslib
spectralnorm2.ml
The Computer Language Benchmarks Game * -team/benchmarksgame/ * * Contributed by * Cleanup by Troestler Modified by * -team/benchmarksgame/ * * Contributed by Sebastien Loisel * Cleanup by Troestler Christophe * Modified by Mauricio Fernandez *) let n = try int_of_string Sys.argv.(1) with...
null
https://raw.githubusercontent.com/ocaml-multicore/domainslib/8aa79bbc0ceeeb373fc5a1bc946705bd8235a20d/test/spectralnorm2.ml
ocaml
The Computer Language Benchmarks Game * -team/benchmarksgame/ * * Contributed by * Cleanup by Troestler Modified by * -team/benchmarksgame/ * * Contributed by Sebastien Loisel * Cleanup by Troestler Christophe * Modified by Mauricio Fernandez *) let n = try int_of_string Sys.argv.(1) with...
9a7707a4607d76950f039fe119d9e7f60ae7b17af2938faf35d9a9aa7d48b0eb
billstclair/trubanc-lisp
grovel.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; grovel.lisp --- The CFFI Groveller . ;;; Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2007 , < > Copyright ( C ) 2007 , ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a co...
null
https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/cffi_0.10.4/grovel/grovel.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to...
grovel.lisp --- The CFFI Groveller . Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2007 , < > Copyright ( C ) 2007 , files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included i...
7d2c43d75b7a34ae5b422335909bd4ee7995e26c6536e904c89336bad9edc7c7
sjl/advent
day-12.lisp
(advent:defpackage* :advent/2021/12) (in-package :advent/2021/12) (defun edge (graph from to) (push to (gethash from graph)) (push from (gethash to graph))) (defun parse (stream) (iterate (with-result graph = (make-hash-table)) (for line :in-stream stream :using #'read-line) (for (from to) = (str:sp...
null
https://raw.githubusercontent.com/sjl/advent/c6f3e11eeace1c7d50f19d64260ee8879785cce0/src/2021/days/day-12.lisp
lisp
todo do something faster than this Scratch --------------------------------------------------------------------
(advent:defpackage* :advent/2021/12) (in-package :advent/2021/12) (defun edge (graph from to) (push to (gethash from graph)) (push from (gethash to graph))) (defun parse (stream) (iterate (with-result graph = (make-hash-table)) (for line :in-stream stream :using #'read-line) (for (from to) = (str:sp...
061fe47338ba2ef7e11298fed7151b25ae91055e52b0027ffdd16a80dec0b742
melisgl/mgl-gpr
differential-evolution.lisp
(defpackage differential-evolution-example (:use :common-lisp :mgl-gpr)) (in-package :differential-evolution-example) General dimension , given by : ;;; f(x ) = sum_{i=1 : D-1 } 100*(x(i+1 ) - x(i)^2)^2 + ( 1 - x(i))^2 ;;; where D is the dimension of x. The true minimum is 0 at x = ( 1 1 ;;; ... 1). (defu...
null
https://raw.githubusercontent.com/melisgl/mgl-gpr/c606f860a5993d4ec15b753fc0e238df1e133e3f/example/differential-evolution.lisp
lisp
... 1). (test-differential-evolution)
(defpackage differential-evolution-example (:use :common-lisp :mgl-gpr)) (in-package :differential-evolution-example) General dimension , given by : f(x ) = sum_{i=1 : D-1 } 100*(x(i+1 ) - x(i)^2)^2 + ( 1 - x(i))^2 where D is the dimension of x. The true minimum is 0 at x = ( 1 1 (defun rosenbrock (x) (...
bb57604d8a27ef9a8f6a3cd0370a457b26c58f87f9635837bf426c3dfaaee2ec
mikpe/pdp10-tools
nm.erl
-*- erlang - indent - level : 2 -*- %%% ' nm ' clone for pdp10 - elf Copyright ( C ) 2013 - 2021 %%% This file is part of pdp10 - tools . %%% pdp10 - tools 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 Fo...
null
https://raw.githubusercontent.com/mikpe/pdp10-tools/bd664c841d267f9f5a4e1be2a08d35231057b056/erlang/apps/nm/src/nm.erl
erlang
(at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -A, -o, --print-file-name -D, --dynamic -B, -P, --portability, -f [bsd|sysv|posix], --format=[bsd|sysv...
-*- erlang - indent - level : 2 -*- ' nm ' clone for pdp10 - elf Copyright ( C ) 2013 - 2021 This file is part of pdp10 - tools . pdp10 - tools 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 , e...
3a459461720c70ce44141684c530353b06e1172eb20f7dc8fbf2909f4fc7e597
Eonblast/Scalaxis
comm.erl
2007 - 2011 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 d...
null
https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/src/comm.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...
2007 - 2011 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 < > This module allows to configure Scalaris for using Distributed Erlang Messages consist of a tuple of which the...
5af19c6a5b262f299c6963e9b399144c6673bfaad2062ca49ac1f9d0c9c26fdf
argp/bap
test_suite.ml
open OUnit Collect the tests of different modules into one test suite let suite = "OUnit Example" >::: [Test_list.suite; Test_list2.suite; Test_stack.suite] let _ = run_test_tt_main suite
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ounit/examples/test_suite.ml
ocaml
open OUnit Collect the tests of different modules into one test suite let suite = "OUnit Example" >::: [Test_list.suite; Test_list2.suite; Test_stack.suite] let _ = run_test_tt_main suite
e54dfb352257d2725fe0230b39af6ff4a194f7543da791f08d44e5b20488fc34
qfpl/reflex-realworld-example
Update.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE StandaloneDeriving # module Common.Conduit.Api.User.Update where import Data.Aeson (ToJSON) import Data.Aeson (FromJSON) import Data.Text (Text) import GHC.Generics (Generic) data UpdateUser ...
null
https://raw.githubusercontent.com/qfpl/reflex-realworld-example/aca3125e036fbb5edd3a20d0e5a13ec73eaa6fcb/common/src/Common/Conduit/Api/User/Update.hs
haskell
# LANGUAGE DeriveAnyClass # Danger: This means that we can't unset this thing
# LANGUAGE DeriveGeneric # # LANGUAGE StandaloneDeriving # module Common.Conduit.Api.User.Update where import Data.Aeson (ToJSON) import Data.Aeson (FromJSON) import Data.Text (Text) import GHC.Generics (Generic) data UpdateUser = UpdateUser { password :: Maybe T...
d0115a13d0d9c9320c4f455cdfde21a8b40b43f8c3ba53182880ce96633bb26e
onaio/hatti
chart.cljs
(ns hatti.views.chart (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [cljs.core.async :refer [<! chan put!]] [om.core :as om :include-macros true] [sablono.core :as html :refer-macros [html]] [hatti.ona.forms :as forms] [hatti.charting :refer...
null
https://raw.githubusercontent.com/onaio/hatti/7dc23c1c60b9fc46e1ff5b023eb6c794ebd04773/src/hatti/views/chart.cljs
clojure
EVENT HANDLERS DOM BUILDING HELPERS OM COMPONENTS
(ns hatti.views.chart (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [cljs.core.async :refer [<! chan put!]] [om.core :as om :include-macros true] [sablono.core :as html :refer-macros [html]] [hatti.ona.forms :as forms] [hatti.charting :refer...
54d86fee8d9d0d381ed19fadb92e032584303c75ff660b4037ebef5c2f39b646
dongcarl/guix
guix.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2019 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the Lice...
null
https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/services/guix.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify (at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR ...
Copyright © 2019 < > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu services guix) #:us...
89ef090ffc0b5015cf8f963069d114909d6c0ea13865cb2459d2892760571320
mathiasbourgoin/SPOC
Kirc_Ast.mli
type kernel and kvect = IntVect of int | Floatvect of int type intrinsics = string * string type elttype = | EInt32 | EInt64 | EFloat32 | EFloat64 type memspace = | LocalSpace | Global | Shared type k_ext = Kern of k_ext * k_ext | Block of k_ext | Params of k_ext | Plus of k_ext * k_ext | P...
null
https://raw.githubusercontent.com/mathiasbourgoin/SPOC/db8ac84fce7077caba1b2c33e9b2a01c1989620b/SpocLibs/Sarek/Kirc_Ast.mli
ocaml
type kernel and kvect = IntVect of int | Floatvect of int type intrinsics = string * string type elttype = | EInt32 | EInt64 | EFloat32 | EFloat64 type memspace = | LocalSpace | Global | Shared type k_ext = Kern of k_ext * k_ext | Block of k_ext | Params of k_ext | Plus of k_ext * k_ext | P...
cd27eb032c8166a3cf3285c5f104e6eb0dddda037cb08931a8d9b484dfe73eff
nisbus/erlang-dates
date_range.erl
%%%------------------------------------------------------------------- @author nisbus < nisbus@gmail > ( C ) 2011 , %%% @doc %%% Dates module for handling ranges of dates and other useful date functions. %%% Supports the following frequencies %%% years, %%% months, %%% quarters, %%% weeks, %%% days, %%...
null
https://raw.githubusercontent.com/nisbus/erlang-dates/fdf7ff85f6972f25a6aa1e4d192ed0dc78788962/src/date_range.erl
erlang
------------------------------------------------------------------- @doc Dates module for handling ranges of dates and other useful date functions. Supports the following frequencies years, months, quarters, weeks, days, hours, minutes, seconds (use with care) @end --------------------------...
@author nisbus < nisbus@gmail > ( C ) 2011 , Created : 2 Jul 2011 by nisbus < > -module(date_range). -export([create_range/3,create_range/4]). -spec create_range(From :: calendar:t_datetime1970(), To :: calendar:t_datetime1970(), Frequency :: atom(), IncludeWeekends :: true | false) -> [calen...
ed466b62e4f50e39dfbbb292430aebb70b6877a239268edec916f8dfd35eb9dc
soren-n/bidi-higher-rank-poly
Copy.mli
open Syntax val copy_mono : mono -> (mono -> 'a) -> 'a val copy_poly : poly -> (poly -> 'a) -> 'a val copy_expr : expr -> (expr -> 'a) -> 'a val copy_stmt : stmt -> (stmt -> 'a) -> 'a
null
https://raw.githubusercontent.com/soren-n/bidi-higher-rank-poly/c0957759657b30a52235560d1d5f40e9bd2569b3/back/lib/Copy.mli
ocaml
open Syntax val copy_mono : mono -> (mono -> 'a) -> 'a val copy_poly : poly -> (poly -> 'a) -> 'a val copy_expr : expr -> (expr -> 'a) -> 'a val copy_stmt : stmt -> (stmt -> 'a) -> 'a
1037cd12cb229310b1652ceaff133bd4b5260d6549768b879705370d5c96afb6
clojuredus/clojure-coding-dojo
project.clj
(defproject rover "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.1"] [myguidingstar/clansi "1.3.0"]] :plugins [[com.jakemccrary/lein-test-refresh "0.24.1"] ...
null
https://raw.githubusercontent.com/clojuredus/clojure-coding-dojo/21a60a3a4be825544b9a07eb7cd9c9c83a112b01/rover/project.clj
clojure
(defproject rover "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.1"] [myguidingstar/clansi "1.3.0"]] :plugins [[com.jakemccrary/lein-test-refresh "0.24.1"] ...
a1b823325fe123ab98857a47b3e5a61f5db6f06f74fed7d40eeea4cd54c7ef08
EligiusSantori/L2Apf
player_character.scm
(module system racket/base (provide game-server-packet/player-character) (require "../../../library/geometry.scm" "../../packet.scm" "../race.scm" "../clothing.scm" ) (define (game-server-packet/player-character buffer) (let ((s (open-input-bytes buffer))) (list (cons 'id (read-byte s)...
null
https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/game/server/player_character.scm
scheme
must be object-id, but trash
(module system racket/base (provide game-server-packet/player-character) (require "../../../library/geometry.scm" "../../packet.scm" "../race.scm" "../clothing.scm" ) (define (game-server-packet/player-character buffer) (let ((s (open-input-bytes buffer))) (list (cons 'id (read-byte s)...
8ff769a1bcb29c778e2780a4c447434bd3b1d05faeb2ecfbd79ccdd753df7edd
fishcakez/sbroker
sbroker_SUITE.erl
%%------------------------------------------------------------------- %% Copyright ( c ) 2015 , < > %% 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 ...
null
https://raw.githubusercontent.com/fishcakez/sbroker/10f7e3970d0a296fbf08b1d1a94c88979a7deb5e/test/sbroker_SUITE.erl
erlang
------------------------------------------------------------------- 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, KIND, either express or implied. See the Lic...
Copyright ( c ) 2015 , < > This file is provided to you under the Apache License , software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(sbroker_SUITE). -include_lib("common_test/include/ct.hrl"). -define(TIMEOUT, 5000). -export([all/...
c3e8294d79b70cca1efde90fb02a593be99b1e96a19e9885a233749106ebac98
ghcjs/ghcjs
conc017.hs
import Control.Concurrent import Control.Exception -- check that async exceptions are restored to their previous -- state after an exception is raised and handled. main = do main_thread <- myThreadId m1 <- newEmptyMVar m2 <- newEmptyMVar m3 <- newEmptyMVar forkIO (do takeMVar m1 throwTo main_th...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/concurrent/conc017.hs
haskell
check that async exceptions are restored to their previous state after an exception is raised and handled. blocked here, "bar" can't be delivered compensate for the fact that threadDelay is non-interruptible
import Control.Concurrent import Control.Exception main = do main_thread <- myThreadId m1 <- newEmptyMVar m2 <- newEmptyMVar m3 <- newEmptyMVar forkIO (do takeMVar m1 throwTo main_thread (ErrorCall "foo") takeMVar m2 throwTo main_thread (ErrorCall "bar") putMVar m3 () ) (d...
9702b5edaf12142ed1b062005479c14186751911d4ecc84f125bd9c48c8809f6
ChrisPenner/proton
NonLinear.hs
# LANGUAGE UndecidableInstances # module Data.Profunctor.NonLinear where import Data.Profunctor -- A Class for providing explicit duplication support for arrow-likes that do n't support Dimap using ( - > ) class NonLinear p where dup :: p a b -> p a (b, b) -- An overlappable instance for all profunctors. -- Thi...
null
https://raw.githubusercontent.com/ChrisPenner/proton/5e73abb67c8abe29e13b9b4a984ba75e5749e4f1/src/Data/Profunctor/NonLinear.hs
haskell
A Class for providing explicit duplication support for arrow-likes An overlappable instance for all profunctors. This should be overridden if nonlinearity has special meaning in your domain # OVERLAPPABLE #
# LANGUAGE UndecidableInstances # module Data.Profunctor.NonLinear where import Data.Profunctor that do n't support Dimap using ( - > ) class NonLinear p where dup :: p a b -> p a (b, b) dup = rmap (\a -> (a, a))
420f4a71ecc5d14fa288a88a8a5c3e515423dc302f1251ded25ba5748a9f87ed
tezos/tezos-mirror
chain_validator_events.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2020 - 2022 Nomadic Labs . < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/9f813eee88df2f13012ba57049385c8de672bef6/src/lib_shell/chain_validator_events.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2020 - 2022 Nomadic Labs . < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN...
d0f2b8a2ecda620928fc08d2d56ae955f4131b6f3bd7091328ec8b2ceaa07bf2
AccelerateHS/accelerate-llvm
Cache.hs
# LANGUAGE CPP # -- | -- Module : Data.Array.Accelerate.LLVM.Native.Link.Cache Copyright : [ 2017 .. 2020 ] The Accelerate Team -- License : BSD3 -- Maintainer : < > -- Stability : experimental Portability : non - portable ( GHC extensions ) -- module Data.Array.Accelerate.LLVM.Native.Link.Ca...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/4fd0d9a91977da7382468857d08d8fafae3a341b/accelerate-llvm-native/src/Data/Array/Accelerate/LLVM/Native/Link/Cache.hs
haskell
| Module : Data.Array.Accelerate.LLVM.Native.Link.Cache License : BSD3 Stability : experimental For whatever reason ghci isn't adding library dependencies to the dynamic link state, which means that dynamic linking will fail in debugging mode because we depend on tracy symbols exported by the accel...
# LANGUAGE CPP # Copyright : [ 2017 .. 2020 ] The Accelerate Team Maintainer : < > Portability : non - portable ( GHC extensions ) module Data.Array.Accelerate.LLVM.Native.Link.Cache ( LinkCache, new, LC.dlsym, ) where import Data.Array.Accelerate.Debug.Internal ( debuggin...
a6fcceb24bbfa774d336be75507e44814beb7eaf377deae7c037affe06d2146a
AdaCore/why3
main.ml
open Format let usage () = eprintf "Euler001: sum of all the multiples of 3 or 5 below a given number@."; eprintf "Usage: %s <decimal number>@." Sys.argv.(0); exit 2 let input = if Array.length Sys.argv <> 2 then usage (); Sys.argv.(1) (* let () = if input = "go" then begin Euler001.go (); exit ...
null
https://raw.githubusercontent.com/AdaCore/why3/e0dc747dcbdbf58ddad668a234c7d05defc65cee/examples/euler001/main.ml
ocaml
let () = if input = "go" then begin Euler001.go (); exit 0 end
open Format let usage () = eprintf "Euler001: sum of all the multiples of 3 or 5 below a given number@."; eprintf "Usage: %s <decimal number>@." Sys.argv.(0); exit 2 let input = if Array.length Sys.argv <> 2 then usage (); Sys.argv.(1) let input_num = try Z.of_string input with _ -> usage () let...
b888c01e5388f403bb1886d07e0464fc0545a6d36371ac2b82824d2d8abe2a6a
rleonid/oml
oml_regression_interfaces.ml
Copyright 2015,2016 : < > 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 , softwa...
null
https://raw.githubusercontent.com/rleonid/oml/a857d67708827ed00df3f175a942044601ca50cf/src/rgr/oml_regression_interfaces.ml
ocaml
* The interface of the model constructed by a Regression procedure. * [describe t] returns a string describing the regressed linear model. * [residuals t] returns the residuals, the difference between the observed value and the estimated value for the independent, response, values. * [coefficients t] returns th...
Copyright 2015,2016 : < > 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 , softwa...
8c7e4cfd5f5ee7c6b5d2e715d49e950f69d6e6b8c4045c01816c06819fec7df9
GNOME/aisleriot
doublets.scm
; AisleRiot - doublets.scm Copyright ( C ) 1998 , 2003 < > ; ; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ; (at your option) any later version. ; ; ...
null
https://raw.githubusercontent.com/GNOME/aisleriot/5b04e58ba5f8df8223a3830d2c61325527d52237/games/doublets.scm
scheme
AisleRiot - doublets.scm This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. S...
Copyright ( C ) 1998 , 2003 < > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (use-modules (aisleriot interface) (aisleriot api)) (define (new-game) ...
9954bde915f67b10a9705a15bc587fdfc7d3563bd9999746340f7afd9d98d955
matterhorn-chat/matterhorn
Autocomplete.hs
{-# LANGUAGE RankNTypes #-} module Matterhorn.State.Autocomplete ( AutocompleteContext(..) , checkForAutocompletion ) where import Prelude () import Matterhorn.Prelude import Brick ( getName ) import Brick.Main ( viewportScroll, vScrollToBeginning ) import Brick...
null
https://raw.githubusercontent.com/matterhorn-chat/matterhorn/19a73ce833a8a8de3616cf884c03e9f08a4db0a7/src/Matterhorn/State/Autocomplete.hs
haskell
# LANGUAGE RankNTypes # # SOURCE # # SOURCE # ^ Whether the autocompletion was manual (True) or automatic (False). The automatic case is the case where the autocomplete lookups and UI are triggered merely by entering some initial text (such as "@"). The manual case is the case where the autocomplete lookups and ...
module Matterhorn.State.Autocomplete ( AutocompleteContext(..) , checkForAutocompletion ) where import Prelude () import Matterhorn.Prelude import Brick ( getName ) import Brick.Main ( viewportScroll, vScrollToBeginning ) import Brick.Widgets.Edit ( editContents...
c4dcf3cf933277c4e618edc9901a8597327ccbae23bf147af594ad548976f0e2
yakaz/yamerl
ex_8.2_block_indentation_indicator.erl
-module('ex_8.2_block_indentation_indicator'). -include_lib("eunit/include/eunit.hrl"). -define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml"). single_test_() -> ?_assertMatch( {yamerl_parser, {file,?FILENAME}, [], <<>>, 69, true, [], 0, 70...
null
https://raw.githubusercontent.com/yakaz/yamerl/0032607a7b27fa2b548fc9a02d7ae6b53469c0c5/test/parsing/ex_8.2_block_indentation_indicator.erl
erlang
-module('ex_8.2_block_indentation_indicator'). -include_lib("eunit/include/eunit.hrl"). -define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml"). single_test_() -> ?_assertMatch( {yamerl_parser, {file,?FILENAME}, [], <<>>, 69, true, [], 0, 70...
9094af48c35673e9cbd9e30735a21b76296756aade7499f952c0ab3415770cf7
racket/redex
bitmap-test-util.rkt
#lang racket/base (require framework pict racket/runtime-path racket/gui/base (for-syntax racket/base) racket/class racket/promise redex/pict redex/reduction-semantics) (provide btest done show-bitmap-test-gui? bitmaps-same?) (define show-bitmap-...
null
https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-test/redex/tests/private/bitmap-test-util.rkt
racket
#lang racket/base (require framework pict racket/runtime-path racket/gui/base (for-syntax racket/base) racket/class racket/promise redex/pict redex/reduction-semantics) (provide btest done show-bitmap-test-gui? bitmaps-same?) (define show-bitmap-...
7e5811b0fa28a8be7561bc95b1026ed532dc2b650c55d847bf6c67a9d83ce276
Kyorai/cuttlefish
cuttlefish_nested_schema_test.erl
-module(cuttlefish_nested_schema_test). -include_lib("eunit/include/eunit.hrl"). nested_schema_test() -> Conf = [ {["thing", "a"], foo}, {["nested", "thing1", "type"], "thing"}, {["nested", "thing1", "thing", "a"], 0}, {["nested", "thing2", "type"], "thing"} ], Config = cut...
null
https://raw.githubusercontent.com/Kyorai/cuttlefish/c4b56cb9ca6fa753aa6116a0c8c6b99c889b9048/test/cuttlefish_nested_schema_test.erl
erlang
-module(cuttlefish_nested_schema_test). -include_lib("eunit/include/eunit.hrl"). nested_schema_test() -> Conf = [ {["thing", "a"], foo}, {["nested", "thing1", "type"], "thing"}, {["nested", "thing1", "thing", "a"], 0}, {["nested", "thing2", "type"], "thing"} ], Config = cut...
50a5955ee8457da71965c856913a42d27f23766100e67f640cd5cab1d3c388d6
haskell-tools/haskell-tools
Use.hs
# LANGUAGE TemplateHaskell # module Use where import Define a :: $typ a = ()
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/RenameDefinition/SpliceType/Use.hs
haskell
# LANGUAGE TemplateHaskell # module Use where import Define a :: $typ a = ()
d95c19a80cf97a525eb3a44eb8e4e847c7cbfdc9f2560e70c91ec59c4a97212c
racket/racket7
protect.rkt
#lang racket/base (require "windows.rkt") (provide protect-path-element) (define (protect-path-element bstr convention) (cond [(eq? convention 'windows) (if (needs-protect? bstr) (bytes-append #"\\\\?\\REL\\\\" bstr) bstr)] [else bstr])) (define (needs-protect? bstr) (define l...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/path/protect.rkt
racket
would also be covered by loop below would also be covered by loop below
#lang racket/base (require "windows.rkt") (provide protect-path-element) (define (protect-path-element bstr convention) (cond [(eq? convention 'windows) (if (needs-protect? bstr) (bytes-append #"\\\\?\\REL\\\\" bstr) bstr)] [else bstr])) (define (needs-protect? bstr) (define l...
3ffb50c33b735b666c5eb8efb6dd443bdb52862f95e46ba1d0eb437509a5d581
serioga/clojure-benhcmarks
cljs_3141.clj
(ns clojure-benchmarks.cljs-3141 "" (:require [criterium.core :as criterium])) (set! *warn-on-reflection* true) (def chars64 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/") (def char->int (zipmap chars64 (range 0 64))) (def int->char (zipmap (range 0 64) chars64)) (defn encode-map-orig [...
null
https://raw.githubusercontent.com/serioga/clojure-benhcmarks/266caad3f5d4f9082d650a8dc1be1d6adb968fb8/src/clojure_benchmarks/cljs_3141.clj
clojure
(ns clojure-benchmarks.cljs-3141 "" (:require [criterium.core :as criterium])) (set! *warn-on-reflection* true) (def chars64 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/") (def char->int (zipmap chars64 (range 0 64))) (def int->char (zipmap (range 0 64) chars64)) (defn encode-map-orig [...
d671c0ee78486a28db11957b02c223395c65fe505c24b01f7170456bd5537a04
puppetlabs/puppetdb
default_reports_test.clj
(ns puppetlabs.puppetdb.query-eng.default-reports-test (:require [clojure.test :refer :all] [puppetlabs.puppetdb.query-eng.engine :refer [inventory-query reports-query report-logs-query]] [puppetlabs.puppetdb.query-eng.default-reports :as t])) ;; Q: no page-order-opts -- needed? (deftest test-mentions-...
null
https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/test/puppetlabs/puppetdb/query_eng/default_reports_test.clj
clojure
Q: no page-order-opts -- needed? the subquery will have a filter added if necessary by a different function subqueries - dead end end for this check
(ns puppetlabs.puppetdb.query-eng.default-reports-test (:require [clojure.test :refer :all] [puppetlabs.puppetdb.query-eng.engine :refer [inventory-query reports-query report-logs-query]] [puppetlabs.puppetdb.query-eng.default-reports :as t])) (deftest test-mentions-report-type? (is (= false (t/menti...
b4f35f3bc01063b5651429164f0531caf879ea75e95c653259dac3902cb7a9f3
backtracking/bag
test.ml
module I = struct type t = int let compare = Stdlib.compare end module B = Bag.Make(I) let print = B.print Format.pp_print_int let () = let a = B.add 1 ~mult:1 (B.add 2 ~mult:2 (B.add 3 ~mult:3 B.empty)) in let b = B.add 1 ~mult:4 (B.add 2 ~mult:5 (B.add 3 ~mult:6 B.empty)) in assert (B.cardinal a = 6); ass...
null
https://raw.githubusercontent.com/backtracking/bag/e620a2816c5c540840068ebbfddaec33b98abafe/test.ml
ocaml
division
module I = struct type t = int let compare = Stdlib.compare end module B = Bag.Make(I) let print = B.print Format.pp_print_int let () = let a = B.add 1 ~mult:1 (B.add 2 ~mult:2 (B.add 3 ~mult:3 B.empty)) in let b = B.add 1 ~mult:4 (B.add 2 ~mult:5 (B.add 3 ~mult:6 B.empty)) in assert (B.cardinal a = 6); ass...
c63440b4b8a7cc5ccb067eb3b7e6d8cd0b1348026c145150ed5ff40bc1cc7e01
aaronc/ClojureClrEx
pinvoke.clj
(ns clojure.clr.pinvoke (:use [clojure.clr.emit])) (def ^:private _save-id (atom 0)) ( * [ dll - name fn - name ret - type param - types ] ;; (defclrtype* (clojure.lang.Compiler/munge ( - name " / " fn - name ( swap ! _ save - id inc ) ) ) ;; {:extends clojure.lang.AFn} ;; ...
null
https://raw.githubusercontent.com/aaronc/ClojureClrEx/465e05b5872816056544c89b47c1997f6067ae89/src/clojure/clr/pinvoke.clj
clojure
(defclrtype* (clojure.lang.Compiler/munge {:extends clojure.lang.AFn} (fn dll-import-def-fn [] (method invoke)))) Test code (def beep (GetProcAddress k32 "Beep")) (let [pbeep (Marshal/GetDelegateForFunctionPointer beep beep-dg)] See -us/library/0sfb502t(v=vs.80).aspx
(ns clojure.clr.pinvoke (:use [clojure.clr.emit])) (def ^:private _save-id (atom 0)) ( * [ dll - name fn - name ret - type param - types ] ( - name " / " fn - name ( swap ! _ save - id inc ) ) ) (defn dllimport* [dll-name fn-name ret-type param-types] (let [gen-ctxt (cur-gen-co...
0045a90a309f057b1dad5f31a39a73efc596dde0101b24a1c4d4c10ec50b2e69
dsorokin/aivika
Random.hs
-- | -- Module : Simulation.Aivika.Signal.Random Copyright : Copyright ( c ) 2009 - 2017 , < > -- License : BSD3 Maintainer : < > -- Stability : experimental Tested with : GHC 8.0.1 -- -- This module defines random signals of events, which are useful -- for describing the input of the model. -- ...
null
https://raw.githubusercontent.com/dsorokin/aivika/7a14f460ab114b0f8cdfcd05d5cc889fdc2db0a4/Simulation/Aivika/Signal/Random.hs
haskell
| Module : Simulation.Aivika.Signal.Random License : BSD3 Stability : experimental This module defines random signals of events, which are useful for describing the input of the model. * Signal of Random Events | Return a signal of random events that arrive with the specified delay. ^ compute a pair ...
Copyright : Copyright ( c ) 2009 - 2017 , < > Maintainer : < > Tested with : GHC 8.0.1 module Simulation.Aivika.Signal.Random newRandomSignal, newRandomUniformSignal, newRandomUniformIntSignal, newRandomTriangularSignal, newRandomNormalSignal, newRandomLog...
2699816e4a729712907c35c2136c7b3094b0d176e57ada3861991b863146f8ab
fetburner/Coq2SML
termops.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/pretyping/termops.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Universes * printers * debug pri...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Util open Pp open Names ...
449701df70a12afa8274123ae1b0269cb48bf2e6f64a14865a50013439a6c6ba
vim-scripts/slimv.vim
swank-presentations.lisp
swank-presentations.lisp --- imitate 's presentations ;; Authors : < > < > < > < > ;; ;; License: This code has been placed in the Public Domain. All warranties ;; are disclaimed. ;; (in-package :swank) ;;;; Recording and accessing results of computat...
null
https://raw.githubusercontent.com/vim-scripts/slimv.vim/61ce81ff6b1a05314a6d750a32a1c7379f35a5dc/slime/contrib/swank-presentations.lisp
lisp
License: This code has been placed in the Public Domain. All warranties are disclaimed. Recording and accessing results of computations rest of slime isn't thread safe either), do we really care? We store *nil-surrogate* instead of nil, to distinguish it from an object that was garbage collected. ...
swank-presentations.lisp --- imitate 's presentations Authors : < > < > < > < > (in-package :swank) (defvar *record-repl-results* t "Non-nil means that REPL results are saved for later lookup.") (defvar *object-to-presentation-id* (make-weak-key-hash-tab...
e94bf9f088db215dc4f5433f9dec40b945da5c533d5a0d575f117fc762b43893
racket/typed-racket
predicate.rkt
#lang typed/racket/base/shallow ;; List? should expand to a check for `(and/c list? len=2)` ;; ;; search for `List?`, looking for a define-values (define-type Big-T (List (Listof Integer) (List Symbol Integer Integer))) (define-predicate List? Big-T) (: g (-> Any (U #f Big-T))) (define (g y) (if (List? y) y ...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/unit-tests/shallow-rewrite-expansion/predicate.rkt
racket
List? should expand to a check for `(and/c list? len=2)` search for `List?`, looking for a define-values
#lang typed/racket/base/shallow (define-type Big-T (List (Listof Integer) (List Symbol Integer Integer))) (define-predicate List? Big-T) (: g (-> Any (U #f Big-T))) (define (g y) (if (List? y) y #f))
1414d27758e4cfdacf9f6779e40a6cd1b86a8c8a4e5768d3e3d71580c732a3dc
uwplse/PUMPKIN-PATCH
evaluation.mli
--- Evaluation , which is lazy ( takes one step ) --- open Constr open Environ open Proofcat open Declarations open Stateutils open Evd * Evaluate a term one step in an environment * Then bind the single anonymous arrow to the extension * Evaluate a term one step in an environment * Then bind the single ...
null
https://raw.githubusercontent.com/uwplse/PUMPKIN-PATCH/73fd77ba49388fdc72702a252a8fa8f071a8e1ea/plugin/src/compilation/evaluation.mli
ocaml
Evaluate an arrow as a proof
--- Evaluation , which is lazy ( takes one step ) --- open Constr open Environ open Proofcat open Declarations open Stateutils open Evd * Evaluate a term one step in an environment * Then bind the single anonymous arrow to the extension * Evaluate a term one step in an environment * Then bind the single ...
15103e53f45741d29db409f740a9e1f7da4c2180ef9108964c4fe58c2932485a
spurious/sagittarius-scheme-mirror
conditions.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; rfc/oauth/conditions.scm - OAuth1 conditions ;;; Copyright ( c ) 2017 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/rfc/oauth/conditions.scm
scheme
coding : utf-8 ; -*- rfc/oauth/conditions.scm - OAuth1 conditions Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
Copyright ( c ) 2017 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library (rfc oauth conditions) (export &oauth-...
5be7236b6d99375bcf91a1900559e4109e004f80586c57c17a9005b5e0cd685c
qmuli/qmuli
Logger.hs
module Qi.AWS.Logger where import Data.Aeson (FromJSON, ToJSON, Value (..), decode, encode, object, (.=)) import qualified Data.ByteString.Lazy.Builder as Build import Protolude import Qi.AWS.Types (MkAwsLogg...
null
https://raw.githubusercontent.com/qmuli/qmuli/6ca147f94642b81ab3978d502397efb60a50215b/library/Qi/AWS/Logger.hs
haskell
module Qi.AWS.Logger where import Data.Aeson (FromJSON, ToJSON, Value (..), decode, encode, object, (.=)) import qualified Data.ByteString.Lazy.Builder as Build import Protolude import Qi.AWS.Types (MkAwsLogg...
43ecd99ad12bba28fc1d6fc0e866948c86dd737ca33466b9dca35dfc1b65be08
ChrisPenner/lens-regex-pcre
Text.hs
| Module : Control . Lens . Regex . Text Description : Text PCRE Regex library with a lensy interface . Copyright : ( c ) , 2019 License : Module : Control.Lens.Regex.Text Description : Text PCRE Regex library with a lensy interface. Copyright : (c) Chris Penner, 2019 License : BSD3...
null
https://raw.githubusercontent.com/ChrisPenner/lens-regex-pcre/c7587b825f8ab788720d88cbafab72cc72690802/src/Control/Lens/Regex/Text.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # * Basics * Types $setup >>> :set -XQuasiQuotes >>> :set -XOverloadedStrings >>> :set -XTypeApplications >>> import Data.Text.Lens (unpacked) >>> import qualified Data.Text as T >>> import Data.List (sort) The "real" type is: to get the relevant parts...
| Module : Control . Lens . Regex . Text Description : Text PCRE Regex library with a lensy interface . Copyright : ( c ) , 2019 License : Module : Control.Lens.Regex.Text Description : Text PCRE Regex library with a lensy interface. Copyright : (c) Chris Penner, 2019 License : BSD3...
09f0ac74fecda9437438e408e58e11c1b2e6f9d2fe7761e6d6489b498dab05dc
evansb/ppx_shell
test_ppx_shell.ml
open OUnit open Shell let env_to_string _ = let env = Environment.from_assoc_list [("foo", "2"); ("bar", "3")] in let s = Environment.to_string env in assert_equal (s = "foo=2\nbar=3\n" || s = "bar=3\nfoo=2\n") true let backend_execute_env _ = let env = Environment.from_assoc_list [("foo", "2")] in let c ...
null
https://raw.githubusercontent.com/evansb/ppx_shell/d99c43856e1464d8f06a913219a62d42839f9e85/test/test_ppx_shell.ml
ocaml
open OUnit open Shell let env_to_string _ = let env = Environment.from_assoc_list [("foo", "2"); ("bar", "3")] in let s = Environment.to_string env in assert_equal (s = "foo=2\nbar=3\n" || s = "bar=3\nfoo=2\n") true let backend_execute_env _ = let env = Environment.from_assoc_list [("foo", "2")] in let c ...
2c7373eadadf0aab7c5177d898b4dd35fa00aaacb5bb7311f505e37fc10dd912
chetant/LibClang
Remapping.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # -- | Functions for manipulating remappings. -- -- This module is intended to be imported qualified. module Clang.Remapping ( getRemappings , getRemappingsFromFileList , getRemappedFiles ) where import Control.Monad.IO.Class import qualified Clang.Interna...
null
https://raw.githubusercontent.com/chetant/LibClang/5e6d245024f7005e1a1dd1076031954b7cd8702f/src/Clang/Remapping.hs
haskell
# LANGUAGE ConstraintKinds # | Functions for manipulating remappings. This module is intended to be imported qualified. | Given a 'FilePath' for a file, returns information about the remappings that apply to that file. If an error occurs, returns 'Nothing'. remappings that apply to the corresponding files. If an ...
# LANGUAGE FlexibleContexts # module Clang.Remapping ( getRemappings , getRemappingsFromFileList , getRemappedFiles ) where import Control.Monad.IO.Class import qualified Clang.Internal.FFI as FFI import Clang.Internal.Monad getRemappings :: ClangBase m => FilePath -> ClangT s m (Maybe (FFI.Remapping s)) getRemappi...
760fb27ab8379199b3540ddabab74742503ab6cec0a3fbd0f7e2cd41aaad658e
karlhof26/gimp-scheme
salonen-vivid-saturation.scm
; ; The GIMP -- an image manipulation program Copyright ( C ) 1995 and ; Vivid saturation script for GIMP 2.4 Original author : < > ; ; Tags: photo, color, saturation ; ; Author statement: ; ; script-fu-vivid-saturation - A script that will saturate the image with ; vivid saturated colors. Other impleme...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/65d1002e85a5de40d8835bef17dde8b9e7624bc6/salonen-vivid-saturation.scm
scheme
The GIMP -- an image manipulation program Tags: photo, color, saturation Author statement: script-fu-vivid-saturation - A script that will saturate the image with vivid saturated colors. Other implementations of this script are called -------------------------------------------------------------------- --...
Copyright ( C ) 1995 and Vivid saturation script for GIMP 2.4 Original author : < > " Digital Velvia " . Distributed by Gimp FX Foundry project 1.00 Jan 15 , 2004- initial release 1.10 - Fixed for 2.4 by 1.11 - Updated for Gimp 2.10.18 by karlhof26 it under the terms of the GNU General Publ...
2861a2c673307764b14923afac09e38eaf1eb5152b65e59d2fca464af6018e23
BillHallahan/G2
M14.hs
{-@ LIQUID "--no-termination" @-} module M14 (main) where data List a = Cons a (List a) | Nil @ main : : List Bool - > Int - > { b : | b } @ main :: List Bool -> Int -> Bool main xs m | m <= 0 = True | otherwise = case while xs m (0, 1) of (a', j') -> a' >= -m ...
null
https://raw.githubusercontent.com/BillHallahan/G2/f2584eb2ec211aed73b3ccd88c6e232c3cf4386d/tests/LiquidInf/Paper/Eval/CompareVerified/M14.hs
haskell
@ LIQUID "--no-termination" @
module M14 (main) where data List a = Cons a (List a) | Nil @ main : : List Bool - > Int - > { b : | b } @ main :: List Bool -> Int -> Bool main xs m | m <= 0 = True | otherwise = case while xs m (0, 1) of (a', j') -> a' >= -m && a' <= m @ while : : List > ...