_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
3b6ad9a4da7d9d485a6605b4499b221412e8d279bd8c5f4296c2cb44a5e6b677
screenshotbot/screenshotbot-oss
new.lisp
;;;; Copyright 2018-Present Modern Interpreters Inc. ;;;; This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (uiop:define-package :screenshotbot/company/new (:use #:cl #:alexandria ...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/ec1994459127148ca1583b8c0ec806f1f972e071/src/screenshotbot/company/new.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc. (not (professionalp user))
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (uiop:define-package :screenshotbot/company/new (:use #:cl #:alexandria #:markup #:screenshotbot/user-api #:s...
17407992423317642bdb90baa2b0ff739d0cd3a1b2dad753c9a12da460f090fd
quil-lang/magicl
specialized-vector.lisp
;;;; specialized-vector.lisp ;;;; Author : (in-package #:magicl) ;;;; Here we have some functions that specialize on many types (defmacro define-common-real-vector-methods (vector-class elt-type) `(progn (defmethod dot-lisp ((vec1 ,vector-class) (vec2 ,vector-class)) (let ((size1 (size vec1)) ...
null
https://raw.githubusercontent.com/quil-lang/magicl/00518574613100654ef962d4b5a5c8480744557f/src/high-level/types/specialized-vector.lisp
lisp
specialized-vector.lisp Here we have some functions that specialize on many types
Author : (in-package #:magicl) (defmacro define-common-real-vector-methods (vector-class elt-type) `(progn (defmethod dot-lisp ((vec1 ,vector-class) (vec2 ,vector-class)) (let ((size1 (size vec1)) (size2 (size vec2))) (assert (cl:= size1 size2)) (let ((s1 (storage vec...
160f712531ae88bda4aed623905adbaa84a7eb04579bed2ce77cb2dc34169db1
stil4m/project-typo
handlers.cljs
(ns ui.routing.handlers (:require [ui.routing.transitions :as transitions] [ui.core.typo-re-frame :refer [default-middleware]] [re-frame.core :refer [register-handler path]])) (defn flat-apply-fn [f] (fn [db argv] (apply f db argv))) (register-handl...
null
https://raw.githubusercontent.com/stil4m/project-typo/4e343934175f429c8b7870814d569f776203d461/client/ui_src/ui/routing/handlers.cljs
clojure
(ns ui.routing.handlers (:require [ui.routing.transitions :as transitions] [ui.core.typo-re-frame :refer [default-middleware]] [re-frame.core :refer [register-handler path]])) (defn flat-apply-fn [f] (fn [db argv] (apply f db argv))) (register-handl...
a269e90f1e1474f1bf3bdca1c39a7baab53a7a7df24e447028c858a023663196
synduce/Synduce
largest_diff_poslist.ml
let g0 a = (0, a, a) let join b c = (max b 0, min b c, max c ((- (min b c)) + (max b 0))) let rec ldiff2 = function Elt(x) -> g0 x | Cons(hd, tl) -> join hd (last tl) and last = function Elt(x) -> x | Cons(hd, tl) -> last tl
null
https://raw.githubusercontent.com/synduce/Synduce/289888afb1c312adfd631ce8d90df2134de827b8/extras/solutions/constraints/sortedlist/largest_diff_poslist.ml
ocaml
let g0 a = (0, a, a) let join b c = (max b 0, min b c, max c ((- (min b c)) + (max b 0))) let rec ldiff2 = function Elt(x) -> g0 x | Cons(hd, tl) -> join hd (last tl) and last = function Elt(x) -> x | Cons(hd, tl) -> last tl
4e2b1717aaaa41587ce3212001d30aa89340678ca4cd9a468814b01c3e6c9ecf
gelisam/hyzzy
G7.hs
{-# LANGUAGE OverloadedStrings #-} module Rooms.G7 where import Hyzzy.Command look :: Command look = "More foliage walls. This place is a maze..." north :: Command north = Command $ goToRoom "F7" west :: Command west = Command $ goToRoom "G6" -- 1 2 3 4 5 6 7 -- +-+-+ +-+-+-+-+ -- A| | | --...
null
https://raw.githubusercontent.com/gelisam/hyzzy/c5c861d5556ed3ca82fbb583d6928fac40d0d8df/games/maze/Rooms/G7.hs
haskell
# LANGUAGE OverloadedStrings # 1 2 3 4 5 6 7 +-+-+ +-+-+-+-+ A| | | + +-+-+-+-+-+ + B| | | | + + +-+-+ + +-+ + + +-+ +-+ + + D| | | | | + + + + + + + + E| | | | | | + + +-+ + +-+ + F| | | | + +-+-+ +-+-+ + G| *| +-+-+-+-+-+-+-+
module Rooms.G7 where import Hyzzy.Command look :: Command look = "More foliage walls. This place is a maze..." north :: Command north = Command $ goToRoom "F7" west :: Command west = Command $ goToRoom "G6" C| | | | |
755b2c6b8108f9970c27618c3744f881453c0d638ac9b78a0ad45e31f9bd7187
ulricha/dsh
PruneEmpty.hs
# LANGUAGE TemplateHaskell # module Database.DSH.SL.Opt.Rewrite.PruneEmpty(pruneEmpty) where -- import Control.Monad import Database.DSH.Common.Opt import Database.DSH.Common.VectorLang import Database.DSH.SL.Opt.Properties.Types import Database.DSH.SL.Opt.Rewrite.Co...
null
https://raw.githubusercontent.com/ulricha/dsh/e6cd5c6bea575e62a381e89bfc4cc7cb97485106/src/Database/DSH/SL/Opt/Rewrite/PruneEmpty.hs
haskell
import Control.Monad import Database.Algebra.Dag.Common emptyAppendLeftR1 , emptyAppendLeftR2 , emptyAppendRightR1 , emptyAppendRightR2 , emptyAppendRightR3 well, because otherwise inner vectors will be re-keyed and no longer be aligned with the outer vector. isEmpty :: AlgNode -> SLMatch ...
# LANGUAGE TemplateHaskell # module Database.DSH.SL.Opt.Rewrite.PruneEmpty(pruneEmpty) where import Database.DSH.Common.Opt import Database.DSH.Common.VectorLang import Database.DSH.SL.Opt.Properties.Types import Database.DSH.SL.Opt.Rewrite.Common import Database...
58f6c40143dd7b005270d3582d91187d8b26ba18b4f2dffb43c7c7b287b9957b
phoityne/ghci-dap
GHCMain.hs
# LANGUAGE CPP # # LANGUAGE LambdaCase # # LANGUAGE NondecreasingIndentation # # LANGUAGE TupleSections # {-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-} ----------------------------------------------------------------------------- -- GHC Driver program -- ( c ) The University of Glasgow 2005...
null
https://raw.githubusercontent.com/phoityne/ghci-dap/206b47a22775a6c14b2cadf409d0b669563a45ec/app-ghc-9.4/GHCMain.hs
haskell
# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE # --------------------------------------------------------------------------- --------------------------------------------------------------------------- --------------------------------------------------------------------------- time commands when run...
# LANGUAGE CPP # # LANGUAGE LambdaCase # # LANGUAGE NondecreasingIndentation # # LANGUAGE TupleSections # GHC Driver program ( c ) The University of Glasgow 2005 DAP Modified The official GHC API import qualified GHC import GHC (parseTargetFiles, Ghc, GhcMonad(..), Backend (..), ...
505598fa87d73892e572470bcaeb0ecdabf3a3e06759993f6d17ee1ff72a6c4b
gelisam/giggles-is-you
Motion.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # {-# OPTIONS_HADDOCK hide #-} module Graphics.Gloss.Internals.Interface.ViewState.Motion (callback_viewState_motion) where import Graphics.Gloss.Data.ViewState import Graphics.Gloss.Internals.Interface.Callback import Graphics.Gloss.Internals...
null
https://raw.githubusercontent.com/gelisam/giggles-is-you/6487120b219bad80ff87a43f1d7d9fb97d17dfb5/gloss/Graphics/Gloss/Internals/Interface/ViewState/Motion.hs
haskell
# LANGUAGE RankNTypes # # OPTIONS_HADDOCK hide # | Callback to handle keyboard and mouse button events for controlling the viewport.
# LANGUAGE ScopedTypeVariables # module Graphics.Gloss.Internals.Interface.ViewState.Motion (callback_viewState_motion) where import Graphics.Gloss.Data.ViewState import Graphics.Gloss.Internals.Interface.Callback import Graphics.Gloss.Internals.Interface.Backend import Graphics.Gloss.Internals.Interface.Event...
f20de1387ed07dc6c7d50ab4fa430e3cc557c666d7c15a3e122fc3498d0c1389
bhaskara/programmable-reinforcement-learning
rl-observer.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; rl/rl-observer.lisp ;; Defines the <rl-observer> abstract class and some generic functions. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package rl) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/rl/rl-observer.lisp
lisp
rl/rl-observer.lisp Defines the <rl-observer> abstract class and some generic functions. class def definition macro kinds of messages that can be sent to an observer
(in-package rl) (defclass <rl-observer> () () (:documentation "Class <rl-observer>. An rl-observer is any object that observes execution during reinforcement learning. This can include learning algorithms (see subdirectory learn/), and also objects that maintain logs or statistics of execution (see sub...
5908d15e49f6c14452f6f0d867789995ae4effcaadc07de11e1e91887cdeee82
richmit/mjrcalc
use-optm.lisp
;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; @file use-optm.lisp @author < > ;; @brief Multiva...
null
https://raw.githubusercontent.com/richmit/mjrcalc/96f66d030034754e7d3421688ff201f4f1db4833/use-optm.lisp
lisp
-*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- @file use-optm.lisp @brief Multivariate function OPTimization.@EOL @std Common Lisp @see tst-optm.lisp Redistribution and use in source and binary forms, with or without modification, are permitted provided ...
@author < > @parblock Copyright ( c ) 1997,1998,2004,2015 , < > All rights reserved . 1 . Redistributions of source code must retain the above copyright notice , this list of conditions , and the following disclaimer . 2 . Redistributions in binary form must reproduce the above copyright not...
fd9547398f889dc3ee150ecff81cdda3070498c3fa938427aa7557011440b4cd
facebook/flow
dumpTypesCommand.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/52e59c7a9dea8556e7caf0be2b2c5c2e310b5b65/src/commands/dumpTypesCommand.ml
ocaml
********************************************************************* flow dump-types command ********************************************************************* Outputs list of all types in the file also output an empty array on stdout, for JSON parsers
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
c31a736bc3a213c4a5f13da54b7bc9ee7f1844e37537698560a6b76ec20f9f7b
htm-community/sanity
letters.cljs
(ns org.numenta.sanity.demos.letters (:require [org.nfrac.comportex.demos.letters :as demo] [org.numenta.sanity.demos.comportex-common :refer [all-features]] [org.nfrac.comportex.util :as util] [org.numenta.sanity.main :as main] [org.numenta.sanity.helpers :as helpers] ...
null
https://raw.githubusercontent.com/htm-community/sanity/0eae8a9a1fe732d761f6dd0cff3dba8b24ac5231/examples/demos/org/numenta/sanity/demos/letters.cljs
clojure
(ns org.numenta.sanity.demos.letters (:require [org.nfrac.comportex.demos.letters :as demo] [org.numenta.sanity.demos.comportex-common :refer [all-features]] [org.nfrac.comportex.util :as util] [org.numenta.sanity.main :as main] [org.numenta.sanity.helpers :as helpers] ...
abae10043c774d356ac1011bae3d3a4bfaad606a42594fbdaae305396e81df1f
carl-eastlund/dracula
test-hash.rkt
#lang scheme (require "checks.ss" "../hash.ss") (provide hash-suite) (define hash-suite (test-suite "hash.ss" (test-suite "hash" (test (check-equal? (hash [1 'a] [2 'b]) #hash([1 . a] [2 . b]))) (test (check-equal? (hash #:eq [1 'a] [2 'b]) ...
null
https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/private/scheme/test/test-hash.rkt
racket
#lang scheme (require "checks.ss" "../hash.ss") (provide hash-suite) (define hash-suite (test-suite "hash.ss" (test-suite "hash" (test (check-equal? (hash [1 'a] [2 'b]) #hash([1 . a] [2 . b]))) (test (check-equal? (hash #:eq [1 'a] [2 'b]) ...
9eee24490e402ba4aefb7aa2eb6fcb849f6384c492f27945fb3f145c19fe0d50
wlitwin/graphv
glyphBitmap.mli
include Flags.S val optional : t[@@immediate] val required : t[@@immediate] type pattern = private Optional | Required val to_pattern : t -> pattern
null
https://raw.githubusercontent.com/wlitwin/graphv/d0a09575c5ff5ee3727c222dd6130d22e4cf62d9/gles3/font/glyphBitmap.mli
ocaml
include Flags.S val optional : t[@@immediate] val required : t[@@immediate] type pattern = private Optional | Required val to_pattern : t -> pattern
1e942603ff31cfc7a57334a3ee8f2eb9919d525d0cc48360e4554be48b1761ff
clojure/tools.build
test_javac.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/clojure/tools.build/fd1b19ea6bf50367ec32a8d38c46c58f35455141/src/test/clojure/clojure/tools/build/tasks/test_javac.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns clojure.tools.build.tasks.test-javac (:require [clojure.string :as str] [clojure.test :refer :all :as test] [clojure.java.io :as jio] [clojure.tools.build.api :as api] [clojure.tools.build.test-util :refer :all])) (deftest test-javac (with-test...
ec50d471c2ee3c7fb7f59481bf4946c082c6d28f74f75d84f8463bc2e96a2ac1
geostarling/guix-packages
linux.scm
Copyright © 2019 , 2020 < > Copyright © 2019 < > Copyright © 2019 < > Copyright © 2019 Copyright © 2020 , 2021 < > Copyright © 2020 , 2021 < > ;;; ;;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published ...
null
https://raw.githubusercontent.com/geostarling/guix-packages/143f24feb28b70bbf8b517b406fa73a3623de787/personal/packages/linux.scm
scheme
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public...
Copyright © 2019 , 2020 < > Copyright © 2019 < > Copyright © 2019 < > Copyright © 2019 Copyright © 2020 , 2021 < > Copyright © 2020 , 2021 < > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or Yo...
9bde3ad33e0baa2e87119da9df74fd23440932a80bcc4db82e73be2dba169f5c
jimmyhmiller/fsm-maker
dev.cljs
(ns ^:figwheel-no-load fsm-maker.dev (:require [fsm-maker.core :as core] [devtools.core :as devtools])) (enable-console-print!) (devtools/install!) (core/init!)
null
https://raw.githubusercontent.com/jimmyhmiller/fsm-maker/eb0ba768a4d3ba1a8ebd8ef601eb682c6a43465c/env/dev/cljs/fsm_maker/dev.cljs
clojure
(ns ^:figwheel-no-load fsm-maker.dev (:require [fsm-maker.core :as core] [devtools.core :as devtools])) (enable-console-print!) (devtools/install!) (core/init!)
2e9f72c883c1d358cb7d0ede6a770771988bab8e19d332d1af7ac81fec38dd13
brendanhay/gogol
Patch.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-sqladmin/gen/Gogol/SQLAdmin/Sql/Instances/Patch.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Updates settings of a Cloud SQL instance. This method supports patch semantics. * Resource ** Constructing a Request | A resource alias for @sql.instances.patch@ method which the 'SqlInstancesPatch' request conforms to. | Up...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
0203a49bb6e330a8efc57ecfd1a441774ce662d3b688803e6d90ffd5ff2e3b68
fgalassi/cs61a-sp11
play-n.scm
(load "twenty-one") (define (play-n strategy n) (if (= n 0) 0 (+ (twenty-one strategy) (play-n strategy (- n 1)))))
null
https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/projects/blackjack/joker/play-n.scm
scheme
(load "twenty-one") (define (play-n strategy n) (if (= n 0) 0 (+ (twenty-one strategy) (play-n strategy (- n 1)))))
21816c192ebcd54842b8547e2989ff3f8b49f7d40ebc2b61145d6f196148181f
brendanhay/gogol
Product.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/8cbceeaaba36a3c08712b2e272606161500fbe91/lib/services/gogol-adsense-host/gen/Gogol/AdSenseHost/Internal/Product.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated * Account * Accounts * AdClient * AdClients * AdStyle * AdStyle_Colors * AdStyle_Font * AdUnit * AdUnit_ContentAdsSettings * AdUnit_ContentAdsSettings_BackupOption * AdUnit_MobileContentAdsSettings * AssociationSession ...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
0e7c1bffe764e6f2210144b57c1667246d9a8136a4abba6870a50cde7c489391
inaka/canillita
canillita_newsitems_SUITE.erl
-module(canillita_newsitems_SUITE). -include_lib("mixer/include/mixer.hrl"). -mixin([{ canillita_test_utils , [ init_per_suite/1 , end_per_suite/1 ] }]). -export([ all/0 , init_per_testcase/2 , end_per_testcase/2 ]). -export([ success_scenario/1 , i...
null
https://raw.githubusercontent.com/inaka/canillita/56e7fa6b7441a591dbf2396dc85a43cdca6878c6/test/canillita_newsitems_SUITE.erl
erlang
common tests API tests Every newsitem needs to be attached to an existing newspaper internal
-module(canillita_newsitems_SUITE). -include_lib("mixer/include/mixer.hrl"). -mixin([{ canillita_test_utils , [ init_per_suite/1 , end_per_suite/1 ] }]). -export([ all/0 , init_per_testcase/2 , end_per_testcase/2 ]). -export([ success_scenario/1 , i...
fc2d22bfcab6e081f6fe2cade83bff26f369135a9a6271fdbcec666d1934d3e1
NetComposer/nkmedia
nkmedia_fs_verto_proxy_client.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2016 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the...
null
https://raw.githubusercontent.com/NetComposer/nkmedia/24480866a523bfd6490abfe90ea46c6130ffe51f/src/fs_backend/nkmedia_fs_verto_proxy_client.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2016 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(nkmedia_fs_verto_pro...
0ad7e88f6c3299392a687f6ac31965626d975db962c0118e8203ba2fc7c80b28
mstksg/advent-of-code-2022
Challenge.hs
{-# LANGUAGE TemplateHaskell #-} # OPTIONS_GHC -Wno - dodgy - exports # {-# OPTIONS_GHC -Wno-unused-imports #-} -- | -- Module : AOC.Challenge Copyright : ( c ) 2021 -- License : BSD3 -- Maintainer : -- Stability : experimental -- Portability : non-portable -- -- Gather together all cha...
null
https://raw.githubusercontent.com/mstksg/advent-of-code-2022/51b4b3797273266efb4af440b155cd9548776911/src/AOC/Challenge.hs
haskell
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -Wno-unused-imports # | Module : AOC.Challenge License : BSD3 Stability : experimental Portability : non-portable Gather together all challenges and collect them into a single map. | A map of all challenges.
# OPTIONS_GHC -Wno - dodgy - exports # Copyright : ( c ) 2021 Maintainer : module AOC.Challenge ( module AOC , ChallengeMap , ChallengeSpec(..), Part(..) , challengeMap , lookupSolution , Day(..), dayInt, mkDay, mkDay_ , solSpec , charPart ) where import AOC.Challenge.Day0...
e17cbebb6b2567e6548f0a4f1e4ca141d92f2ef4b11d9759998cff5f2e643729
riverford/durable-ref
nippy_test.clj
(ns riverford.durable-ref.format.fressian-test (:require [clojure.test :refer :all] [riverford.durable-ref.format.nippy] [riverford.durable-ref.core :as dref])) (deftest test-nippy-serialization-round-trips (are [x] (= (dref/deserialize (dref/serialize x "nippy" {}) "nippy" {}) x) 4...
null
https://raw.githubusercontent.com/riverford/durable-ref/f18402c07549079fd3a1c8d2595f893a055851de/test/riverford/durable_ref/format/nippy_test.clj
clojure
(ns riverford.durable-ref.format.fressian-test (:require [clojure.test :refer :all] [riverford.durable-ref.format.nippy] [riverford.durable-ref.core :as dref])) (deftest test-nippy-serialization-round-trips (are [x] (= (dref/deserialize (dref/serialize x "nippy" {}) "nippy" {}) x) 4...
a889c94393fcdb2d393d6268ca522fbb064380d3ef84da370fa88f609364144d
well-typed/full-text-search
Main.hs
module Main where import Data.SearchEngine import PackageSearch import PackageIndexUtils import Data.List import qualified Data.Map as Map import qualified Data.Text as T import qualified Data.Text.IO as T import Data.Time import Control.Monad import Control.Exception import System.IO import System.Directory import...
null
https://raw.githubusercontent.com/well-typed/full-text-search/a87317c94f326fc7fb83ef998d84d1ccaac1f4ea/demo/Main.hs
haskell
----------------- Main experiment
module Main where import Data.SearchEngine import PackageSearch import PackageIndexUtils import Data.List import qualified Data.Map as Map import qualified Data.Text as T import qualified Data.Text.IO as T import Data.Time import Control.Monad import Control.Exception import System.IO import System.Directory import...
d081dc437b2f77baa3876fefd83569c96ff9ea6b3f0f1bac5840d8cdec035ee4
avsm/platform
write.mli
* { 2 JSON writers } val to_string : ?buf:Bi_outbuf.t -> ?len:int -> ?std:bool -> t -> string * Write a compact JSON value to a string . @param buf allows to reuse an existing buffer created with [ Bi_outbuf.create ] . The buffer is cleared of all contents before starting and right befo...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/yojson.1.7.0/lib/write.mli
ocaml
* Write a compact JSON value to a file. See [to_string] for the role of the optional arguments. * Write a compact JSON value to an existing buffer. See [to_string] for the role of the optional argument. * Sort object fields (stable sort, comparing field names and treating them as byte sequences) */...
* { 2 JSON writers } val to_string : ?buf:Bi_outbuf.t -> ?len:int -> ?std:bool -> t -> string * Write a compact JSON value to a string . @param buf allows to reuse an existing buffer created with [ Bi_outbuf.create ] . The buffer is cleared of all contents before starting and right befo...
b5d59e479b93c356d301fa0c63e39efaa084b93722160a03c15c3683a8c32c4a
S8A/htdp-exercises
ex173.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex173) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex173.rkt
racket
about the language level of this file in a form that our tools can easily process. - '() - (cons String LS) - '() String -> String removes all articles from a text file named n removes articles from the list of lines LLS -> String converts a list of lines into a string, words separated by blank spaces and lin...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex173) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ...
da7fdc7e7f2b89bf8a50b4efef1c0c88e7a95cb7066a386b449a72e22aea2a35
malcolmreynolds/GSLL
control.lisp
Adaptive step - size control 2008 - 02 - 17 17:30:04EST control.lisp Time - stamp : < 2009 - 05 - 25 14:52:26EDT control.lisp > $ Id$ (in-package :gsl) (defclass ode-control (mobject) () (:documentation "Objects used for control of ordinary differential equation integration.")) (defmobject standard-...
null
https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/ordinary-differential-equations/control.lisp
lisp
Adaptive step - size control 2008 - 02 - 17 17:30:04EST control.lisp Time - stamp : < 2009 - 05 - 25 14:52:26EDT control.lisp > $ Id$ (in-package :gsl) (defclass ode-control (mobject) () (:documentation "Objects used for control of ordinary differential equation integration.")) (defmobject standard-...
c2960c8383d702a312272c6ff094014b08d053a66ea3db367a26a6f96dbe427e
senapk/funcional
solver.hs
splitAtFn xs pos = (take pos xs, xs !! pos, drop (pos + 1) xs) swap [ 1 .. 10 ] 2 4 = [ 1,2,5,4,3,6,7,8,9,10 ] [ 1,2 ] 5 [ 4,3,6,7,8,9,10 ] a ep1 resto [ 1,2 ] 5 [ 4 ] 3 [ 6,7,8,9,10 ] a ep1 b ep2 c [ 1,2 ] 3 [ 4 ] 5 [ 6,7,8,9,10 ] swap xs p1 p2 = inicio ++ [ep2] ++ meio ++ [ep1] ++ fim where (inici...
null
https://raw.githubusercontent.com/senapk/funcional/83568d2797028efff5933f9d2ef9b215be001368/06_prova/solver.hs
haskell
splitAtFn xs pos = (take pos xs, xs !! pos, drop (pos + 1) xs) swap [ 1 .. 10 ] 2 4 = [ 1,2,5,4,3,6,7,8,9,10 ] [ 1,2 ] 5 [ 4,3,6,7,8,9,10 ] a ep1 resto [ 1,2 ] 5 [ 4 ] 3 [ 6,7,8,9,10 ] a ep1 b ep2 c [ 1,2 ] 3 [ 4 ] 5 [ 6,7,8,9,10 ] swap xs p1 p2 = inicio ++ [ep2] ++ meio ++ [ep1] ++ fim where (inici...
93a9c6419326ff873664778ee645d6ceba11325b3bf1c3482905d6c288a47171
helpshift/ekaf
ekaf_protocol.erl
-module(ekaf_protocol). -export([encode_metadata_request/3]). -export([decode_metadata_response/1]). -export([encode_sync/3, encode_async/3, encode_produce_request/3]). -export([decode_produce_response/1]). -export([encode_request/4, encode_bytes/1, encode_string/1, encode_array/1]). -include("eka...
null
https://raw.githubusercontent.com/helpshift/ekaf/8967b8a0cf650c80656d48fcdcd1e1b3c8d8d6a7/src/ekaf_protocol.erl
erlang
0,0,0,0,0,100,0,0,0,1,0,6, --------------------------------- Decode metadata response ---------------------------------
-module(ekaf_protocol). -export([encode_metadata_request/3]). -export([decode_metadata_response/1]). -export([encode_sync/3, encode_async/3, encode_produce_request/3]). -export([decode_produce_response/1]). -export([encode_request/4, encode_bytes/1, encode_string/1, encode_array/1]). -include("eka...
718981518e23c0ae1bb74e605271c6be9b231cc371bbd40f91afdd55898ad259
jbclements/sxml
sxpath-ext.rkt
#lang racket/base (require (only-in racket/port call-with-input-string) "ssax/sxpathlib.rkt" "ssax/errors-and-warnings.rkt" "sxml-tools.rkt") (provide (all-defined-out)) W3C compliant extensions to SXPathlib $ I d : sxpath - ext.scm , v 1.911 2002/12/06 22:10:53 kl Exp kl $ : ; ; This so...
null
https://raw.githubusercontent.com/jbclements/sxml/d3b8570cf7287c4e06636e17634f0f5c39203d52/sxml/sxpath-ext.rkt
racket
This software is in Public Domain. Please send bug reports and comments to: Dmitry Lizorkin ========================================================================= Converts a given object to a string NOTE: Unknown type -> empty string. Option: write its value to string port? Converts its argument to ...
#lang racket/base (require (only-in racket/port call-with-input-string) "ssax/sxpathlib.rkt" "ssax/errors-and-warnings.rkt" "sxml-tools.rkt") (provide (all-defined-out)) W3C compliant extensions to SXPathlib $ I d : sxpath - ext.scm , v 1.911 2002/12/06 22:10:53 kl Exp kl $ : IT IS PRO...
ee92c8b9d33cad5c6f816f67de27e6a0e65ebfc4ea51dfe0b6c55be4236bd8ab
simplegeo/erlang
timer_simple_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/stdlib/test/timer_simple_SUITE.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 1997 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(timer_simple_SUITE). -export([all...
6315eb993bdaacd0ba437c6f66a6b178a7099921bb34f118f4ffadc9e85f603a
rukor/cljs-ssr-node
transit.cljs
(ns com.firstlinq.ssr.state.transit)
null
https://raw.githubusercontent.com/rukor/cljs-ssr-node/6115f18ca66b9595a87c0e880ebdfce25042c612/src/com/firstlinq/ssr/state/transit.cljs
clojure
(ns com.firstlinq.ssr.state.transit)
af115d4f33237cad7fdb5139eb036cb8efd80a91bf9925232630e8bb5a13ab60
dbuenzli/jsonc
test.ml
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/dbuenzli/jsonc/b6adf836a2812f25d934e85ba3b6daa5fe77fd14/test/test.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
e071a8591b07994712aeb5bc089744936be8a183e6a4b099d574159ca226cf1f
philipcmonk/phlisped
disp.rkt
#lang racket (require (except-in racket/gui yield ->)) (require (only-in racket/gui (yield yield-gui) (-> ->-gui))) (require sgl sgl/gl) (require "common.rkt") (provide (all-defined-out) my-canvas% box-width box-height box-maj-dim node-width node-height node-maj-dim VERTICAL display-on-screen add-to-screen Thecanvas...
null
https://raw.githubusercontent.com/philipcmonk/phlisped/ded1be5d9e7206cd3c71db49ccd250fa4381cf99/core/disp.rkt
racket
(define INSERTMODE #f) (define (enter-insert-mode) (set! INSERTMODE #t) (set! Search-tree (add-to-screen (list 0 'list '() '() '() '() '() '()) (whole-tree-childfunc Selected-tree)))) (define (exit-insert-mode) (set! INSERTMODE #f)) (define SCOPEMODE #f) (gl-translate 0 -20 0) XXX reimplement in terms of addre...
#lang racket (require (except-in racket/gui yield ->)) (require (only-in racket/gui (yield yield-gui) (-> ->-gui))) (require sgl sgl/gl) (require "common.rkt") (provide (all-defined-out) my-canvas% box-width box-height box-maj-dim node-width node-height node-maj-dim VERTICAL display-on-screen add-to-screen Thecanvas...
d0d821d85bfafdc10fb080441058cf74b55dcd926c1e2ae1f0c0df281aa47e35
biocaml/biocaml
bed.ml
open CFStream module Bed = Biocaml_unix.Bed module Tfxm = Biocaml_unix.Tfxm open OUnit let make_stream ?more_columns file : (Bed.item, Bed.Error.parsing) Result.t Stream.t = let filename = Utils.test_file file in let bed_parser = Bed.Transform.string_to_item ?more_columns () in let inp = In_channel.create fi...
null
https://raw.githubusercontent.com/biocaml/biocaml/ac619539fed348747d686b8f628e80c1bb8bfc59/lib/test/bed.ml
ocaml
open CFStream module Bed = Biocaml_unix.Bed module Tfxm = Biocaml_unix.Tfxm open OUnit let make_stream ?more_columns file : (Bed.item, Bed.Error.parsing) Result.t Stream.t = let filename = Utils.test_file file in let bed_parser = Bed.Transform.string_to_item ?more_columns () in let inp = In_channel.create fi...
4d27a9b2f80b156b7292321db13fc88b5b97b09181cf0e9f97f2d429afaf59ec
ghc/testsuite
T5776.hs
module T5776 where -- The point about this test is that we should get a rule like this: -- "foo" [ALWAYS] -- forall (@ a) ( $ dEq : : GHC.Classes . Eq a ) ( $ dEq1 : : GHC.Classes . Eq a ) -- (x :: a) -- (y :: a) -- (z :: a). -- T5776.f (GHC.Classes.== @ a ...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/simplCore/should_compile/T5776.hs
haskell
The point about this test is that we should get a rule like this: "foo" [ALWAYS] forall (@ a) (x :: a) (y :: a) (z :: a). T5776.f (GHC.Classes.== @ a $dEq1 x y) = GHC.Types.True See Note [Simplifying RULE lhs constraints] in TcSimplify
module T5776 where ( $ dEq : : GHC.Classes . Eq a ) ( $ dEq1 : : GHC.Classes . Eq a ) ( GHC.Classes.== @ a $ dEq y z ) Note the * two * forall'd dEq parameters . This is important . # RULES " foo " forall x y ( x = = y ) ( y = = z ) = True # f (x == y) (y == z) = T...
81648debe7522d3c16b7dcae2862b2cf00b4663435567de96bab6ac0b2f3f7ba
UnkindPartition/tasty
Resources.hs
# LANGUAGE ViewPatterns , OverloadedLists # module Resources where import Data.IORef import Test.Tasty import Test.Tasty.Options import Test.Tasty.Runners import Test.Tasty.HUnit import Control.Concurrent import Control.Monad (void) import qualified Data.IntMap as IntMap import Data.Maybe import Data.Foldable import C...
null
https://raw.githubusercontent.com/UnkindPartition/tasty/164cdc88a7c341e10719385f046ddadb8feac826/core-tests/Resources.hs
haskell
---------------------------- Normal operation this is a dummy tree we use for testing this is the actual test ---------------------------- Exceptions
# LANGUAGE ViewPatterns , OverloadedLists # module Resources where import Data.IORef import Test.Tasty import Test.Tasty.Options import Test.Tasty.Runners import Test.Tasty.HUnit import Control.Concurrent import Control.Monad (void) import qualified Data.IntMap as IntMap import Data.Maybe import Data.Foldable import C...
9c7e7f0970450809885baecb074ac8b80fde4ecbe6b2fc6559c4d2fc8fad2cf0
m0ar/safe-streaming
LApplicative.hs
# LANGUAGE NoImplicitPrelude # module Control.Applicative.LApplicative ( LApplicative(..), (<**>), liftA, liftA2, liftA3, forever ) where import Data.Functor.LFunctor (LFunctor(), (<$>), (<$)) import Data.Linear (($), id, liftUnit, flip) import Data.Functor.Identity class LFunctor f => LApplicative f whe...
null
https://raw.githubusercontent.com/m0ar/safe-streaming/126689e657c627c174521743676c771a78cd1a48/src/Control/Applicative/LApplicative.hs
haskell
# INLINEABLE liftA3 #
# LANGUAGE NoImplicitPrelude # module Control.Applicative.LApplicative ( LApplicative(..), (<**>), liftA, liftA2, liftA3, forever ) where import Data.Functor.LFunctor (LFunctor(), (<$>), (<$)) import Data.Linear (($), id, liftUnit, flip) import Data.Functor.Identity class LFunctor f => LApplicative f whe...
2cb8960f79ed1feb9dcf613457123861080b164ffc8153868923cd22b5f2a78b
gfngfn/Sesterl
kindStore.mli
open Syntax open Env val register_free_row : FreeRowID.t -> LabelSet.t -> unit val get_free_row : FreeRowID.t -> LabelSet.t val register_bound_row : BoundRowID.t -> LabelSet.t -> unit val get_bound_row : BoundRowID.t -> LabelSet.t
null
https://raw.githubusercontent.com/gfngfn/Sesterl/d0fe5d94dc0fd43cb0d6f7f778cae2daf793e6b1/src/kindStore.mli
ocaml
open Syntax open Env val register_free_row : FreeRowID.t -> LabelSet.t -> unit val get_free_row : FreeRowID.t -> LabelSet.t val register_bound_row : BoundRowID.t -> LabelSet.t -> unit val get_bound_row : BoundRowID.t -> LabelSet.t
baf7ae38e7af897d292eca2fc0167e501206a3cb1a99e43ff2e1a6fd69396921
mdedwards/slippery-chicken
videos-example-20-a.lsp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; File: videos-example-20-a.lsp ;;; Class Hierarchy : None ;;; Version : 1.0 ;;; ;;; Project: slippery chicken (algorithmic composition) ;;; Purpose : Lisp example code to accompany video t...
null
https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/doc/examples/videos-example-20-a.lsp
lisp
File: videos-example-20-a.lsp Project: slippery chicken (algorithmic composition) **** This file is part of slippery-chicken slippery-chicken is free software; you can redistribute it and/or modify it under the terms of the GNU G...
Class Hierarchy : None Version : 1.0 Purpose : Lisp example code to accompany video tutorial 20 Author : Creation date : 22nd December 2012 Licence : Copyright ( c ) 2012 Public License as published by the Free Software ...
0e80714111c7eb5c7320eed1ed876f8087e45e559cc251322b3c73bb30912710
imandra-ai/minisat-ml
Minisat_vec.ml
Minisat - ml , adapted from Minisat by < > Copyright ( c ) 2019 - 2019 , Aesthetic Integration ( ) Copyright (c) 2019-2019, Aesthetic Integration () *) Copyright ( c ) 2003 - 2006 , , ( c ) 2007 - 2010 , is hereby granted , free of charge , to any person obtaining a copy of this software an...
null
https://raw.githubusercontent.com/imandra-ai/minisat-ml/7e942e95e88a2443bd449f8e470aa7d68cead2be/src/lib/Minisat_vec.ml
ocaml
$inject module V = Minisat_vec
Minisat - ml , adapted from Minisat by < > Copyright ( c ) 2019 - 2019 , Aesthetic Integration ( ) Copyright (c) 2019-2019, Aesthetic Integration () *) Copyright ( c ) 2003 - 2006 , , ( c ) 2007 - 2010 , is hereby granted , free of charge , to any person obtaining a copy of this software an...
78ef16a8f44ab5703c66bc23b88957d4e1deecfccf2e74788341717c527196b6
andelf/dns_proxy
dns_proxy_resolver_sup.erl
%%%------------------------------------------------------------------- @author Feather.et . ELF < > ( C ) 2013 , Feather.et . ELF %%% @doc %%% %%% @end Created : 27 Apr 2013 by Feather.et . ELF < > %%%------------------------------------------------------------------- -module(dns_proxy_resolver_sup). -behavio...
null
https://raw.githubusercontent.com/andelf/dns_proxy/a95e09941db3c0012370a3435b970561de8da19f/src/dns_proxy_resolver_sup.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API Supervisor callbacks Dnsadvantage, returns bad =================================================================== API functions ==================================...
@author Feather.et . ELF < > ( C ) 2013 , Feather.et . ELF Created : 27 Apr 2013 by Feather.et . ELF < > -module(dns_proxy_resolver_sup). -behaviour(supervisor). -export([start_link/0, query_raw/2, query_packet/2, query_domain/1, query_domain/2, query_domain/3, query_domain/4]). -export([init/1]). -defin...
211d44a2bb64a5662a5ff1d69d244dd3239ad27255a6e58176f393b787f7fb03
dbuenzli/hyperbib
subject_html.ml
--------------------------------------------------------------------------- Copyright ( c ) 2021 University of Bern . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/dbuenzli/hyperbib/b17d1ef8cc3a215d04c31c0e56c2de414911c55c/src/html/subject_html.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2021 University of Bern . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
bfed3a55cab4629f6e9d126ff91b67b0a49a2cce4c5cb9a3e44ec1789d710ec1
Beluga-lang/Beluga
replay.ml
* Replay is the test harness for the interactive mode . Replay processes _ interaction transcripts _ , which are files defined by the following informal grammar : * A valid Beluga program , ( followed by a line break , ) hereafter referred to as the _ input program _ . * One or more _ interactions...
null
https://raw.githubusercontent.com/Beluga-lang/Beluga/4d1c1bd917daac43c304c527b155c12dba76391a/src/replay/replay.ml
ocaml
* An interaction consists of a _request_, which is sent to the subprocess, and a response, which is compared with the output generated by the subprocess in response to the request. * A parser for the interactive mode command sigil `%:` * A parser for an interactive mode command, which is a line beginning with a si...
* Replay is the test harness for the interactive mode . Replay processes _ interaction transcripts _ , which are files defined by the following informal grammar : * A valid Beluga program , ( followed by a line break , ) hereafter referred to as the _ input program _ . * One or more _ interactions...
dd0c915ccf5d567f948f42d07ecc8c83c1e193098fb241d7b5eadb2bf1531b18
haslab/HAAP
Capture.hs
HAAP : Haskell Automated Assessment Platform This module provides the @Gloss@ plugin for the animation of _ gloss _ ( < > ) code as a video . HAAP: Haskell Automated Assessment Platform This module provides the @Gloss@ plugin for the animation of _gloss_ (<>) code as a video. -} # LANGUAGE OverloadedStrings...
null
https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/src/HAAP/Graphics/Gloss/Capture.hs
haskell
as gl * in pixels game's frame rate total animation time initOpenGL :: Int -> Int -> IO () Just w <- GLFW.createWindow "gloss-to-file demo" Nothing Nothing GLFW.makeContextCurrent (Just w) finalize :: IO () finalize = GLFW.terminate save the result records a video and retur...
HAAP : Haskell Automated Assessment Platform This module provides the @Gloss@ plugin for the animation of _ gloss _ ( < > ) code as a video . HAAP: Haskell Automated Assessment Platform This module provides the @Gloss@ plugin for the animation of _gloss_ (<>) code as a video. -} # LANGUAGE OverloadedStrings...
bf53df237e1b37f627400c1a818ae962ba2df80e53603e8dace3e4f5d4261651
bsless/contextual
path.clj
(ns contextual.impl.path (:require [contextual.impl.protocols :as p] [contextual.impl.box :as b])) (defrecord Path [ks] p/IContext (-invoke [this ctx] (reduce get ctx ks))) (defmacro ^:private def-paths [] (let [invoke '-invoke ctx 'ctx name "Path" defs (for [n (range...
null
https://raw.githubusercontent.com/bsless/contextual/c5e5a602c851a9f7cb53fe92a66e9a7e552e53f5/src/contextual/impl/path.clj
clojure
(ns contextual.impl.path (:require [contextual.impl.protocols :as p] [contextual.impl.box :as b])) (defrecord Path [ks] p/IContext (-invoke [this ctx] (reduce get ctx ks))) (defmacro ^:private def-paths [] (let [invoke '-invoke ctx 'ctx name "Path" defs (for [n (range...
3d95dd77ea243a09afa992d43b2e1aa3ce2d14f5b17a78e273a5d771cba326cb
lambdabot/lambdabot
RuleLib.hs
# LANGUAGE FlexibleInstances , PatternGuards , ScopedTypeVariables # | This marvellous module contributed by module Lambdabot.Plugin.Haskell.Pl.RuleLib ( -- Using rules RewriteRule(..), fire , -- Defining rules rr,rr0,rr1,rr2,up,down ) where import Lambdabot.Plugin.Haske...
null
https://raw.githubusercontent.com/lambdabot/lambdabot/de01f362c7a8fc6f85c37e604168dcccb1283a0e/lambdabot-haskell-plugins/src/Lambdabot/Plugin/Haskell/Pl/RuleLib.hs
haskell
Using rules Defining rules Next time I do something like this, I'll actually think about the combinator language before, instead of producing something ad-hoc like this: 'Rewrite's can contain 'Hole's ^ Like Up, but applied to subexpressions ^ Use all rules ^ Optionally apply the rewrite rule, Opt x == Or [id...
# LANGUAGE FlexibleInstances , PatternGuards , ScopedTypeVariables # | This marvellous module contributed by module Lambdabot.Plugin.Haskell.Pl.RuleLib RewriteRule(..), fire rr,rr0,rr1,rr2,up,down ) where import Lambdabot.Plugin.Haskell.Pl.Common import Lambdabot.Plugin.Haskell.Pl.Names...
88f86c262947d08aaa8b5e7a80e6b37c8bd4f6cecbcc0d86755b18133156227d
fterrier/pylos
play.clj
(ns game.play (:require [clojure.core.async :refer [<! >! alt! chan close! go-loop]] [clojure.tools.logging :as log] [game [game :refer [initial-game-position make-move move-allowed?]] [strategy :refer [choose-next-move get-input-channel]]] [game.strategy ...
null
https://raw.githubusercontent.com/fterrier/pylos/f9283cf58a32000ed271e768ab6151ac081ed37d/src/clj/game/play.clj
clojure
TODO if choose-next-move throws an exception we are screwed after trying to put
(ns game.play (:require [clojure.core.async :refer [<! >! alt! chan close! go-loop]] [clojure.tools.logging :as log] [game [game :refer [initial-game-position make-move move-allowed?]] [strategy :refer [choose-next-move get-input-channel]]] [game.strategy ...
8d96e5cf4fee545eafdcb2547c380e1e00e576e5018cd40c9fc64be0ff8a6d34
OlivierSohn/hamazed
Concurrent.hs
# LANGUAGE NoImplicitPrelude # module Imj.Control.Concurrent ( useOneCapabilityPerPhysicalCore ) where import Imj.Prelude import Prelude(putStrLn) import GHC.Conc(getNumProcessors) import Control.Concurrent(setNumCapabilities) | Benchmarks on random world creation show...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-base/src/Imj/Control/Concurrent.hs
haskell
NOTE getNumProcessors resturns the same info as the c function getNumberOfProcessors
# LANGUAGE NoImplicitPrelude # module Imj.Control.Concurrent ( useOneCapabilityPerPhysicalCore ) where import Imj.Prelude import Prelude(putStrLn) import GHC.Conc(getNumProcessors) import Control.Concurrent(setNumCapabilities) | Benchmarks on random world creation show...
d80edd4ad5bb8764bde540848eb4142548bb32f838fec4dc19fd7a649cfa7b2d
GillianPlatform/Gillian
changeTracker.ml
type proc_changes = { changed_procs : string list; new_procs : string list; deleted_procs : string list; dependent_procs : string list; } type lemma_changes = { changed_lemmas : string list; new_lemmas : string list; deleted_lemmas : string list; dependent_lemmas : string list; } let pp_proc_changes f...
null
https://raw.githubusercontent.com/GillianPlatform/Gillian/1c8d65120c04ef87cda689a9d41268e25b5ffa7e/GillianCore/incrementalAnalysis/changeTracker.ml
ocaml
Check if file contents have changed Perform a breadth-first traversal of the reverse call graph Perform a breadth-first traversal of the reverse call graph Determine all transitive callers of changed procedures Determine closest callers with specs of changed procedures Determine transitive dependents of chan...
type proc_changes = { changed_procs : string list; new_procs : string list; deleted_procs : string list; dependent_procs : string list; } type lemma_changes = { changed_lemmas : string list; new_lemmas : string list; deleted_lemmas : string list; dependent_lemmas : string list; } let pp_proc_changes f...
51e10ad06b5713d75159314f0a1046549f41427641c20668c15385e0fdad1804
part-cw/lambdanative
ex-rc.scm
;; graph example (define g (graph-new 430 320)) ;; set the origin (graph-aorigin g 1.2 0.9) ;; select the font (graph-font g "Helvetica" 12) ;; set the style of the log axis (graph-linearstyle g 4 0 5 1 5) ;; set the style of the log axis ( graph - logstyle g # xb # x7ff 4 3 4 8 0 ) (graph-logstyle g 2 1022 4 1 7 8...
null
https://raw.githubusercontent.com/part-cw/lambdanative/74ec19dddf2f2ff787ee70ad677bc13b9dfafc29/modules/graph/examples/ex-rc.scm
scheme
graph example set the origin select the font set the style of the log axis set the style of the log axis initialize the log axis initialize the linear axis draw a domain mesh draw the x and y axis draw the axis labels draw labels to identify real and imaginary curves draw a title
(define g (graph-new 430 320)) (graph-aorigin g 1.2 0.9) (graph-font g "Helvetica" 12) (graph-linearstyle g 4 0 5 1 5) ( graph - logstyle g # xb # x7ff 4 3 4 8 0 ) (graph-logstyle g 2 1022 4 1 7 8) 4 inches wide , from 100 to 10000 Hz , offset -0.1 inch (graph-xlog g 4.0 100. 10000. -0.1) 3 inches high , from...
c7d6d30a2d5680065b2890d3ded60378a916ff892ecf495328e6c70175e4b852
mythical-linux/rktfetch
grep.rkt
#!/usr/bin/env racket #lang racket/base (require (only-in racket/file file->lines) (only-in racket/string string-contains?) (only-in racket/contract define/contract -> ->*) (only-in racket/list empty? first ) ) (provide (all-defined-out)) ;; TODO: add keywords to control behavio...
null
https://raw.githubusercontent.com/mythical-linux/rktfetch/865bbe42d00ccf48abdbd45e77480d1bfa8ee2c8/rktfetch/private/get/helpers/grep.rkt
racket
TODO: add keywords to control behavior TODO: add regexp?
#!/usr/bin/env racket #lang racket/base (require (only-in racket/file file->lines) (only-in racket/string string-contains?) (only-in racket/contract define/contract -> ->*) (only-in racket/list empty? first ) ) (provide (all-defined-out)) (define/contract (grep str file-name #:...
1b3e93da1d2c55abda4c813ec285cd4cbc19c3aeae5742811f7f00551dd28a37
baryluk/ex11
unixdom2.erl
%%% -------------------------------------------------------------------- %%% unixdom2.erl : An Erlang - process - descriptor - less version of unixdom.erl %%% %%% -------------------------------------------------------------------- -module(unixdom2). -include("unixdom.hrl"). -include_lib("kernel/include/file.hrl")....
null
https://raw.githubusercontent.com/baryluk/ex11/be8abc64ab9fb50611f93d6631fc33ffdee08fdb/unixdom-0.1/src/unixdom2.erl
erlang
-------------------------------------------------------------------- -------------------------------------------------------------------- Default listen backlog infinity! Borrowed from inet_int.hrl External exports For internal use only, use at your peril! Port for our dll driver -----------------------------...
unixdom2.erl : An Erlang - process - descriptor - less version of unixdom.erl -module(unixdom2). -include("unixdom.hrl"). -include_lib("kernel/include/file.hrl"). -define(SERVER_NAME, ?MODULE). -define(DRV_NAME, "unixdom_drv"). -define(u32(X3,X2,X1,X0), (((X3) bsl 24) bor ((X2) bsl 16) bor ((X1) bsl...
a478382560d77364fe40732cd03b2ec8af9a12db508151c58bc69457c8018ce7
seckcoder/course-compiler
s6_4.rkt
(if (boolean? (inject #t Boolean)) 42 777)
null
https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s6_4.rkt
racket
(if (boolean? (inject #t Boolean)) 42 777)
0b128da0ef5dbc88bd0f0b829dc798e964c26cadb836b8aa70232ef1599aee07
lambdamikel/DLMAPS
xml-trafo.lisp
-*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*- (in-package :THEMATIC-SUBSTRATE) (defun lisp-to-xml (expr &optional (stream t) &key (use-attributes-p t) top-level-attributes ...
null
https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/query/xml-trafo.lisp
lisp
Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*- (defun xml-to-lisp (stream) )
(in-package :THEMATIC-SUBSTRATE) (defun lisp-to-xml (expr &optional (stream t) &key (use-attributes-p t) top-level-attributes indentation-p newlines-p ascii-p) ...
8cccef900b3b5dd12ccfb285e80c99ce837cf72df0fe8adfd3b2399fd2b8338b
lspitzner/brittany
Test232.hs
# LANGUAGE LambdaCase # func = \case FooBar -> x Baz -> y
null
https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test232.hs
haskell
# LANGUAGE LambdaCase # func = \case FooBar -> x Baz -> y
17caab1ba528affa53155dea7d9965cf12021f4e3fc65ec342a78e224f9f5752
craigfe/progress
download.ml
open Progress let pick_colour = Utils.colour_picker () let bar ~total = let open Line in let spinner = spinner ~color:(Color.ansi `green) () in let bar = bar ~color:(pick_colour ()) ~style:`ASCII total in list [ spinner ; brackets (elapsed ()) ; bar ; bytes ; parens (const "eta: " ++ eta t...
null
https://raw.githubusercontent.com/craigfe/progress/d7129b772d05c5589b8807630031155a6aeb27f0/examples/download.ml
ocaml
Simple mock for a worker performing a download action. Give everyone something to do Keep going until all files are downloaded Not done yet; keep going.
open Progress let pick_colour = Utils.colour_picker () let bar ~total = let open Line in let spinner = spinner ~color:(Color.ansi `green) () in let bar = bar ~color:(pick_colour ()) ~style:`ASCII total in list [ spinner ; brackets (elapsed ()) ; bar ; bytes ; parens (const "eta: " ++ eta t...
9e01f8b15e90712e6f3b63048aef77c1da39ad52138bff93576b2110c6e43795
portkey-cloud/aws-clj-sdk
_2014-03-28.clj
(ns portkey.aws.logs.-2014-03-28 (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "logs", :region "ap-northeast-1"}, :ssl-common-name "logs.ap-northeast-1.amazonaws.com", :endpoint "-northeast-1.amazonaws.com", :signature-version :v4}, "eu-west-1" {:creden...
null
https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/logs/_2014-03-28.clj
clojure
(ns portkey.aws.logs.-2014-03-28 (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "logs", :region "ap-northeast-1"}, :ssl-common-name "logs.ap-northeast-1.amazonaws.com", :endpoint "-northeast-1.amazonaws.com", :signature-version :v4}, "eu-west-1" {:creden...
9307429d42e94d13f6eeb516d845317b80415795e3a20c35504253ced6f95a47
nsg-ethz/O4
info.rkt
#lang info (define collection "halstead") (define version "1.0") (define deps '("base" "beautiful-racket-macro" "brag-lib" "o4"))
null
https://raw.githubusercontent.com/nsg-ethz/O4/870f6f78a6f7bb1e9e1502e29ff0048e5e1723c5/metrics/halstead/info.rkt
racket
#lang info (define collection "halstead") (define version "1.0") (define deps '("base" "beautiful-racket-macro" "brag-lib" "o4"))
8ea46c0f0bbf103f3e90601526ffda04270dbdba49b14c056707eb561c82867c
robert-strandh/Acclimation
language-vietnamese.lisp
(cl:in-package #:acclimation) (defclass vietnamese (language) ()) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Methods on LONG-DAY-NAME. (defmethod long-day-name ((day (eql 1)) (language vietnamese)) "ngày thứ hai") (defmethod long-day-name ((day (eql 2)) (language vietnamese))...
null
https://raw.githubusercontent.com/robert-strandh/Acclimation/8b4418c5760a377b5e82d821658b7fd7ac494fb1/language-vietnamese.lisp
lisp
Methods on LONG-DAY-NAME. Methods on SHORT-DAY-NAME.
(cl:in-package #:acclimation) (defclass vietnamese (language) ()) (defmethod long-day-name ((day (eql 1)) (language vietnamese)) "ngày thứ hai") (defmethod long-day-name ((day (eql 2)) (language vietnamese)) "ngày thứ ba") (defmethod long-day-name ((day (eql 3)) (language vietnamese)) "ngày thứ tư") (defm...
362dd4b3dfdee8cd7ac3885b80eb804cce9e5910ac2a856d43f4bf082a93f902
airbus-seclab/bincat
c2newspeak.ml
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language well - suited for static analysis . Copyright ( C ) 2007 , , This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by th...
null
https://raw.githubusercontent.com/airbus-seclab/bincat/493a03890b3b472fd198ce58c7e9280abd0f9f93/ocaml/src/npk/c2newspeak/c2newspeak.ml
ocaml
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language well - suited for static analysis . Copyright ( C ) 2007 , , This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by th...
460aa6cf26ed31091bd183d8baf92c52abca2ceaddc1b29fb2ff527dbe18fd5c
ocaml-ppx/ppx
escape.ml
module String = StringLabels type quote = | Needs_quoting_with_length of int | No_quoting let quote_length s = let n = ref 0 in let len = String.length s in let needs_quoting = ref false in for i = 0 to len - 1 do n := !n + (match String.unsafe_get s i with | '\"' | '\\' | '\n' | '\t' | '\r' | '...
null
https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/stdppx/escape.ml
ocaml
Surround [s] with quotes, escaping it if necessary.
module String = StringLabels type quote = | Needs_quoting_with_length of int | No_quoting let quote_length s = let n = ref 0 in let len = String.length s in let needs_quoting = ref false in for i = 0 to len - 1 do n := !n + (match String.unsafe_get s i with | '\"' | '\\' | '\n' | '\t' | '\r' | '...
b7e5f6306501a54c2af17d574c50d00cdc1733358bfddd1da71486eec32dbeb9
yuanqing/code-problems
test.ml
open Balanced_brackets open OUnit2 let () = run_test_tt_main ("balanced_brackets str" >::: [ "balanced" >:: (fun _ -> assert_equal true (balanced_brackets "[()]{}") ); "unbalanced" >:: (fun _ -> assert_equal false (balanced_brackets "[(]{)}") ); "unbalanced, unclosed" >:: (fun _ -> assert_equ...
null
https://raw.githubusercontent.com/yuanqing/code-problems/30eb34ad616146306cddc50594a47deff111f341/src/balanced_brackets/test.ml
ocaml
open Balanced_brackets open OUnit2 let () = run_test_tt_main ("balanced_brackets str" >::: [ "balanced" >:: (fun _ -> assert_equal true (balanced_brackets "[()]{}") ); "unbalanced" >:: (fun _ -> assert_equal false (balanced_brackets "[(]{)}") ); "unbalanced, unclosed" >:: (fun _ -> assert_equ...
33978ce27aabf6a4b6d1fc4d198af29f0bbfac37a5bcd2a38b2b9374d1cb0e5b
TheClimateCorporation/mandoline
schema.clj
(ns io.mandoline.test.protocol.schema "Test helpers for testing implementations of the Mandoline Schema protocol." (:require [clojure.test :refer :all] [clojure.test.check.generators :as gen] [io.mandoline.impl.protocol :as proto])) (defn- generate-strings "Create a finite seq of distinct non-empty...
null
https://raw.githubusercontent.com/TheClimateCorporation/mandoline/fa26162ef0349ecb71be9d27a46652206f5c1b99/src/io/mandoline/test/protocol/schema.clj
clojure
(a b c ...) (c x b ...) ((c c c) (x x x) (b b b) ...) (c c c x x x b b b ...) Send action to agents Wait for all actions to be completed Get results Send action to agents Wait for all actions to be completed (any exceptions will be propagated) Get results (a b c ...) (c x b ...) ((c c c) (x x x) (b b b) ....
(ns io.mandoline.test.protocol.schema "Test helpers for testing implementations of the Mandoline Schema protocol." (:require [clojure.test :refer :all] [clojure.test.check.generators :as gen] [io.mandoline.impl.protocol :as proto])) (defn- generate-strings "Create a finite seq of distinct non-empty...
ddd9b57c0a953b012e2ae994268aeaea63ab65eceee709308dd948c2fc471fbb
metaocaml/ber-metaocaml
allocation.ml
(* TEST *) (** Test that matching multiple values doesn't allocate a block. *) let f x y = match x, y with | Some x, None | None, Some x -> x + 1 | None, None -> 0 | Some x, Some y -> x + y | exception _ -> -1 let test_multiple_match_does_not_allocate = let allocated_bytes = Gc.allocated_bytes () in ...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/match-exception/allocation.ml
ocaml
TEST * Test that matching multiple values doesn't allocate a block.
let f x y = match x, y with | Some x, None | None, Some x -> x + 1 | None, None -> 0 | Some x, Some y -> x + y | exception _ -> -1 let test_multiple_match_does_not_allocate = let allocated_bytes = Gc.allocated_bytes () in let allocated_bytes' = Gc.allocated_bytes () in let a = Some 3 and b = None i...
bb3c29fb58ec0310ea160f77febda669d3d646efcff195d19f83bddeed1262e3
cram2/cram
swap-columns.lisp
Regression test SWAP - COLUMNS for GSLL , automatically generated ;; Copyright 2009 , 2010 , 2011 , 2014 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published b...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/swap-columns.lisp
lisp
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publi...
Regression test SWAP - COLUMNS for GSLL , automatically generated Copyright 2009 , 2010 , 2011 , 2014 Distributed under the terms of the GNU General Public License 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 ...
69f0229645f046a439fb134c7753ef6936fdf56acfadcee3ed82d1178bf67dab
vagarenko/static-tensor
ColView.hs
# LANGUAGE TypeApplications # {-# LANGUAGE TypeInType #-} module CoreDump.Matrix.ColView where import Control.Lens import Data.Matrix.Static import Data.Vector.Static import TensorInstances () colView_ :: Matrix 4 4 Float -> Vector 4 Float colView_ = view (col @0)
null
https://raw.githubusercontent.com/vagarenko/static-tensor/8409d281707c23f3fe2028e926f1d4e8f7a9bc2d/tests/CoreDump/Matrix/ColView.hs
haskell
# LANGUAGE TypeInType #
# LANGUAGE TypeApplications # module CoreDump.Matrix.ColView where import Control.Lens import Data.Matrix.Static import Data.Vector.Static import TensorInstances () colView_ :: Matrix 4 4 Float -> Vector 4 Float colView_ = view (col @0)
0cf28d16ce81e51f05753fcd587d37db69f280e764f59d62ea32128666d1adbc
zotonic/zotonic
z_module_manager.erl
@author < > 2009 - 2023 %% @doc Module manager, starts/restarts a site's modules. %% @end Copyright 2009 - 2023 %% 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 %% %% ...
null
https://raw.githubusercontent.com/zotonic/zotonic/58453dbd4355252dda3c2d5bd8c88f5866710573/apps/zotonic_core/src/support/z_module_manager.erl
erlang
@doc Module manager, starts/restarts a site's modules. @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, either express or impl...
@author < > 2009 - 2023 Copyright 2009 - 2023 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(z_module_manager). -author('Marc Worrell <>'). -behaviour(gen_server). -export([init/1, handle_call/3, han...
bb10e88391caf35537ab358f07c3cc9f31b2051fe000debdfeb386f8644ff0a3
sanjoy/Snippets
Heisenberg.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE DeriveFunctor # # LANGUAGE StandaloneDeriving # module Heisenberg where -- Only single qubits! import Control.Monad.Trans.Class import Control.Monad import Control.Monad...
null
https://raw.githubusercontent.com/sanjoy/Snippets/76dcbff1da333b010662d42d0d235f614a882b87/Heisenberg.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeSynonymInstances # Only single qubits! (result, prob)
# LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE DeriveFunctor # # LANGUAGE StandaloneDeriving # module Heisenberg where import Control.Monad.Trans.Class import Control.Monad import Control.Monad.Random import Data.Complex import Data.List import Data.Maybe import System.Random type Cmpl...
af1ce91c260792d78c3fbaf058c7824c2abd984c206f027001781b82fdceb534
fulcro-legacy/semantic-ui-wrapper
ui_item_header.cljs
(ns fulcrologic.semantic-ui.views.item.ui-item-header (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/views/Item/ItemHeader" :default ItemHeader])) (def ui-item-header "An item can contain a header. Props: - as (custom): An element type to render as (str...
null
https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/views/item/ui_item_header.cljs
clojure
(ns fulcrologic.semantic-ui.views.item.ui-item-header (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/views/Item/ItemHeader" :default ItemHeader])) (def ui-item-header "An item can contain a header. Props: - as (custom): An element type to render as (str...
8817df41df9389774158cc4727b1736c1b61882402b7be359bcc80e811a39574
BitGameEN/bitgamex
kernel.erl
` ` The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved via the world wide...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/gproc/patches/kernel/kernel.erl
erlang
compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved via the world wide web at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations ...
` ` The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Initial Developer of the Original Code is Ericsson Utvecklings AB . Portions created by Eri...
e6aa56f81fdc1d0dbae83c71db7d5b97ddfb81b124e0550c1b1b19eeabbf2740
samsara/samsara-mqtt
scratch.clj
(ns scratch (:require [cheshire.core :refer :all] [samsara-mqtt.mqtt-server :as mqtt] [clojurewerkz.machine-head.client :as mh] [clojure.pprint :refer [pprint]])) (comment (def server (mqtt/start 10010 pprint)) (def event {:sourceId "5340-dfd0350" :eventName ...
null
https://raw.githubusercontent.com/samsara/samsara-mqtt/2866818775526072f94db65e9d16a7777286a292/dev/scratch.clj
clojure
(ns scratch (:require [cheshire.core :refer :all] [samsara-mqtt.mqtt-server :as mqtt] [clojurewerkz.machine-head.client :as mh] [clojure.pprint :refer [pprint]])) (comment (def server (mqtt/start 10010 pprint)) (def event {:sourceId "5340-dfd0350" :eventName ...
f99ec8c08e5e0e9988c02f8e8fed10a3f2cfd7ed7cf62837c40ace1e9d2d8b00
guicho271828/alien
4-invariant.lisp
;;; Invariant synthesys (in-package :strips) (named-readtables:in-readtable :fare-quasiquote) ;; Usage: #+(or) (strips:with-parsed-information (strips:parse (strips:%rel "axiom-domains/opttel-adl-derived/p01.pddl")) strips:*types*) #+(or) (strips:with-parsed-information (strips:parse (strips:%rel "ipc2014-agl/tra...
null
https://raw.githubusercontent.com/guicho271828/alien/6987d034426b8928adf67f498dc6cb06fd7f923e/preprocess/old/4-invariant.lisp
lisp
Invariant synthesys Usage: modifiable-fluent-predicates
(in-package :strips) (named-readtables:in-readtable :fare-quasiquote) #+(or) (strips:with-parsed-information (strips:parse (strips:%rel "axiom-domains/opttel-adl-derived/p01.pddl")) strips:*types*) #+(or) (strips:with-parsed-information (strips:parse (strips:%rel "ipc2014-agl/transport-agl14/p01.pddl")) strips:...
664b5a470aefbf886fcfe50a742cf5d60b36c0d328aaa00679a461ab6254552f
gvolpe/shopping-cart-haskell
Order.hs
# LANGUAGE DeriveAnyClass , DeriveGeneric , DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving , OverloadedStrings # module Domain.Order where import Control.Monad.Catch import Data.Aeson import Data.Map import Data.UUID ( UUID ) import Da...
null
https://raw.githubusercontent.com/gvolpe/shopping-cart-haskell/41050034613705e5368b6ad0c5f19b3c6092a31f/src/Domain/Order.hs
haskell
# LANGUAGE DeriveAnyClass , DeriveGeneric , DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving , OverloadedStrings # module Domain.Order where import Control.Monad.Catch import Data.Aeson import Data.Map import Data.UUID ( UUID ) import Da...
fec8bdf40d7538ae41fb97e86540f53e59c637c0beec9dacc88d76103a72de23
OCamlPro/optal
webMain.ml
open Optal (**** error printing *****) type error = | No_provided_input | Parse_error of Loc.t exception Error of error let print_loc_error ppf loc f e = Loc.print_loc ppf loc; Format.fprintf ppf ":@.Error: %a@." f e let report_error_main ppf = function | No_provided_input -> Format.fprintf ppf "Erro...
null
https://raw.githubusercontent.com/OCamlPro/optal/852d269ad2698760e5130fb869bb8473f2dfd26c/site/webMain.ml
ocaml
*** error printing **** *** main ***
open Optal type error = | No_provided_input | Parse_error of Loc.t exception Error of error let print_loc_error ppf loc f e = Loc.print_loc ppf loc; Format.fprintf ppf ":@.Error: %a@." f e let report_error_main ppf = function | No_provided_input -> Format.fprintf ppf "Error: No input file provided@."...
52fb616395f2e76537993dafdc75b49ebf586c244eecf34963b489a2013f58e8
ocaml/ocaml
staticalloc.ml
(* TEST include config * native flags = "config.cmx" *) Check the effectiveness of structured constant propagation and static allocation . : static allocation. Ref: *) let () = let x0 = Gc.allocated_bytes () in let x1 = Gc.allocated_bytes () in let pair x y = (x, y) in let a = ...
null
https://raw.githubusercontent.com/ocaml/ocaml/9453a903c818dfef161e0534cbef441b1950625c/testsuite/tests/asmcomp/staticalloc.ml
ocaml
TEST include config * native flags = "config.cmx" check that we did not allocated anything between x1 and x2
Check the effectiveness of structured constant propagation and static allocation . : static allocation. Ref: *) let () = let x0 = Gc.allocated_bytes () in let x1 = Gc.allocated_bytes () in let pair x y = (x, y) in let a = pair 1 2 in let b = pair a ["x";"y"] in let[@local never] g ...
4938aae0ca2003dad20cde7a64c952b940797513723d4d6e3ba5f4b877aca411
dongweiming/lisp-koans-answer
dice-project.lsp
Copyright 2013 Google Inc. ;; 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 ...
null
https://raw.githubusercontent.com/dongweiming/lisp-koans-answer/33eb6e38c7179c677db0df0a31cadd49617ae8db/koans/dice-project.lsp
lisp
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 g...
Copyright 2013 Google Inc. distributed under the License is distributed on an " AS IS " BASIS , In this project we are going to build a CLOS class representing a simple set of dice . There are only two operations on the dice , (defclass dice-set () ((value :reader get-value :writer set-value)) ) ...
6190dfb4d4e6312efe2ee2cef95cd1fd44f8db11d821a49677f6b01e637e7a95
acl2/acl2
post-light-logic.lisp
; HTCLIENT -- HTTP/HTTPS Client Library ; Copyright ( C ) 2022 - 2023 Kestrel Institute ( ) ; License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . ; Author : ( ) Supporting Author : ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-pac...
null
https://raw.githubusercontent.com/acl2/acl2/65d6c126d30e543b7c14669dfa62e4539c611e12/books/kestrel/htclient/post-light-logic.lisp
lisp
HTCLIENT -- HTTP/HTTPS Client Library This book is just a lighter-weight variant of post-logic.lisp. (include-book "std/util/define" :dir :system) (include-book "std/basic/defs" :dir :system) (include-book "xdoc/constructors" :dir :system) This will be replaced by an include-book later.
Copyright ( C ) 2022 - 2023 Kestrel Institute ( ) License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . Author : ( ) Supporting Author : ( ) (in-package "HTCLIENT") (local (defthm state-p1-of-read-acl2-oracle (implies (state-p1 state) (state-p1 (mv-nth 2 ...
1ea570f7e11bab6e56f6293315f1068464a3fd994963f31958dd9fd51bb45711
zliu41/multi-containers
Set.hs
----------------------------------------------------------------------------- -- | -- Module : Data.Multimap.Set Maintainer : < > -- -- Multimaps, where values behave like (non empty) sets. -- Multimaps whose values behave like lists are in " Data . Multimap " . Multimaps whose values behave like map...
null
https://raw.githubusercontent.com/zliu41/multi-containers/3711e7c8640282d26e948e9074ed576a31138ed7/src/Data/Multimap/Set.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Multimap.Set Multimaps, where values behave like (non empty) sets. The implementation is backed by a @'Map' k ('Set' a)@. The differences between @'Multimap' k a@ and @'Map' k ('Set' a)@ include: * A key is onl...
Maintainer : < > Multimaps whose values behave like lists are in " Data . Multimap " . Multimaps whose values behave like maps ( i.e. , two - dimensional tables ) are in " Data . Multimap . Table " . at least one values , i.e. , a key is never associated with an empty individual values ( e.g....
6040ef94e1774c582636b2c41f7cdd7918c75e19b22693809f5847593b5d7f7c
metaocaml/ber-metaocaml
includeclass.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/typing/includeclass.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1997 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Types open Ctype open Format val class_types: Env.t -> class_type -> class_type -> class_matc...
013f0f1d418b1601ffb849d370a882161cccb0ec399d901768de30669c758e76
dmjio/miso
Event.hs
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE DataKinds # {-# LANGUAGE KindSignatures #-} # LANGUAGE ExistentialQuantific...
null
https://raw.githubusercontent.com/dmjio/miso/339505587fd8576c7f89484d3a4244732a9f00e6/src/Miso/Html/Event.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE OverloadedStrings # # LANGUAGE KindSignatures # # LANGUAGE CPP # # LANGUAGE TypeFamilies # --------------------------------------------------------------------------- | Module : Miso.Html.Event License :...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE DataKinds # # LANGUAGE ExistentialQuantification # Copyright : ( C ) 2016 - 2018 Maintainer : < > module Miso.Html.Event on , onWithOptions , Op...
cc4b1fea351295c8df0e13acb5740b06c8045d7d9bc96892f904c47229cb2621
nextjournal/clerk
boom.clj
;; Boom 💥 ;; This will blow up shortly. (throw (ex-info "boom!" {:rand-int (rand-int 1000) :range-100 (range 100)}))
null
https://raw.githubusercontent.com/nextjournal/clerk/f46b5763cb41f78d86d62718cb20a01c1079d5c7/notebooks/boom.clj
clojure
Boom 💥 This will blow up shortly.
(throw (ex-info "boom!" {:rand-int (rand-int 1000) :range-100 (range 100)}))
c672f62ba28613aa98e04780e2f674eeaad2700bc690ebbb17c34152c15397f1
BranchTaken/Hemlock
test_bit_and_bit_or_bit_xor.ml
open! Basis.Rudiments open! Basis open U256 let test () = let rec test_pairs = function | [] -> () | (x, y) :: pairs' -> begin File.Fmt.stdout |> Fmt.fmt "bit_{and,or,xor} " |> fmt ~alt:true ~zpad:true ~width:64L ~radix:Radix.Hex ~pretty:true x |> Fmt.fmt " " |> fmt ~a...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/u256/test_bit_and_bit_or_bit_xor.ml
ocaml
open! Basis.Rudiments open! Basis open U256 let test () = let rec test_pairs = function | [] -> () | (x, y) :: pairs' -> begin File.Fmt.stdout |> Fmt.fmt "bit_{and,or,xor} " |> fmt ~alt:true ~zpad:true ~width:64L ~radix:Radix.Hex ~pretty:true x |> Fmt.fmt " " |> fmt ~a...
e5c38e4bf2a6aa02b6462e35b123b9a8c9ff1c32876df2a0fbdb98529f65dfe5
joewilliams/erl_geo_dns
lhttpc_lib.erl
%%% ---------------------------------------------------------------------------- Copyright ( c ) 2009 , Erlang Training and Consulting Ltd. %%% All rights reserved. %%% %%% Redistribution and use in source and binary forms, with or without %%% modification, are permitted provided that the following conditions are me...
null
https://raw.githubusercontent.com/joewilliams/erl_geo_dns/682c3925959db61ead99f13160ef8bd77486a871/apps/lhttpc/src/lhttpc_lib.erl
erlang
---------------------------------------------------------------------------- All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright ...
Copyright ( c ) 2009 , Erlang Training and Consulting Ltd. * Neither the name of Erlang Training and Consulting Ltd. nor the IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL Erlang Training and Consulting Ltd. BE @private @author < > -modul...
e03bc5fdccea12c7ec700a15529dfa278ae7da0252dc67d2b4d704c609fa9e33
jgm/gitit
PigLatin.hs
module PigLatin (plugin) where This plugin converts a page to pig latin if the ' language ' metadata -- field is set to 'pig latin'. This demonstrates how to get access to -- metadata in a plugin. import Network.Gitit.Interface import Data.Char (toLower, toUpper, isLower, isUpper, isLetter) plugin :: Plugin plugin...
null
https://raw.githubusercontent.com/jgm/gitit/e8c9d94be332e2f73de9b0eee222a2a09f191faf/plugins/PigLatin.hs
haskell
field is set to 'pig latin'. This demonstrates how to get access to metadata in a plugin.
module PigLatin (plugin) where This plugin converts a page to pig latin if the ' language ' metadata import Network.Gitit.Interface import Data.Char (toLower, toUpper, isLower, isUpper, isLetter) plugin :: Plugin plugin = PageTransform $ \doc -> do meta <- askMeta case lookup "language" meta of Just s |...
cbaede5ade31de8a0fbd353743ab83b415b5fc73183ab71ab48de503ecc10ed0
haskell-numerics/hmatrix
monadic.hs
-- monadic computations ( contributed by ) # LANGUAGE FlexibleContexts # import Numeric.LinearAlgebra import Numeric.LinearAlgebra.Devel import Control.Monad.State.Strict import Control.Monad.Trans.Maybe import Foreign.Storable(Storable) import System.Random(randomIO) ------------------------------------------- ...
null
https://raw.githubusercontent.com/haskell-numerics/hmatrix/2694f776c7b5034d239acb5d984c489417739225/examples/monadic.hs
haskell
monadic computations ----------------------------------------- an instance of MonadIO, a monad transformer we can have an arbitrary monad AND do IO sum the values of the even indiced elements sum and print running total of evens indexPlusSum :: Vector I -> VectorMonadT () ----------------------------------------- ...
( contributed by ) # LANGUAGE FlexibleContexts # import Numeric.LinearAlgebra import Numeric.LinearAlgebra.Devel import Control.Monad.State.Strict import Control.Monad.Trans.Maybe import Foreign.Storable(Storable) import System.Random(randomIO) type VectorMonadT = StateT I IO test1 :: Vector I -> IO (Vector I)...
7085fe5dd1c082c5eb9ac4dc1180ed1205d7490b077a5f97fd4dcd4dbd0b74a6
jmglov/blambda
hello.clj
(ns hello) (defn handler [{:keys [name] :or {name "Blambda"} :as event} context] (prn {:msg "Invoked with event", :data {:event event}}) {:greeting (str "Hello " name "!")})
null
https://raw.githubusercontent.com/jmglov/blambda/574d25961bfaf153570e4cd762a729b587d2715f/examples/hello-world/src/hello.clj
clojure
(ns hello) (defn handler [{:keys [name] :or {name "Blambda"} :as event} context] (prn {:msg "Invoked with event", :data {:event event}}) {:greeting (str "Hello " name "!")})
a17c187397e8257cc52e32375a62f25070d14aa1a263355677586815300c7881
ocsigen/js_of_ocaml
test_css_color.ml
Js_of_ocaml tests * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of th...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/lib/tests/test_css_color.ml
ocaml
Js_of_ocaml tests * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of th...
202643b3848bbcbe1aa30bdcf82eda5985a2f4db12f4e2cd0d186bdf304fc9c1
clojure/core.typed
bad_dep.clj
(ns clojure.core.typed.test.typed-load.bad-dep {:lang :core.typed}) this will only throw a type error on the first load (inc 'a)
null
https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/resources/clojure/core/typed/test/typed_load/bad_dep.clj
clojure
(ns clojure.core.typed.test.typed-load.bad-dep {:lang :core.typed}) this will only throw a type error on the first load (inc 'a)
0b9295165980a2d5a00de30de8a35f16d528c69b77bfbd15f2b8e3c01fffcf8f
mentat-collective/sicm-scheme-exercises
ex1-44.scm
Exercise 1.44 : Double pendulum behavior ;; :PROPERTIES: ;; :header-args+: :tangle ch1/ex1-44.scm :comments org ;; :END: (load "ch1/utils.scm")
null
https://raw.githubusercontent.com/mentat-collective/sicm-scheme-exercises/323300c252641add067f266e23427afd0bb34d8a/ch1/ex1-44.scm
scheme
:PROPERTIES: :header-args+: :tangle ch1/ex1-44.scm :comments org :END:
Exercise 1.44 : Double pendulum behavior (load "ch1/utils.scm")
00a1cc47d1bdfffbc24cb9485559d4301cb547c3f08972264f1a2280bcf5ed75
jeapostrophe/automata
nfa-ep-test.rkt
#lang racket/base (require automata/nfa-ep automata/machine tests/eli-tester) (define M (nfa/ep (s0) (s1 s3) [s0 ([epsilon (s1)] [epsilon (s3)])] [s1 ([0 (s2)] [1 (s1)])] [s2 ([0 (s1)] [1 (s2)])] [s3 ([0 (s3)] [1 (s4)])] ...
null
https://raw.githubusercontent.com/jeapostrophe/automata/6abe851b83b18fcdcb8f2b19ab87cdabc90c71ce/automata-test/tests/nfa-ep-test.rkt
racket
#lang racket/base (require automata/nfa-ep automata/machine tests/eli-tester) (define M (nfa/ep (s0) (s1 s3) [s0 ([epsilon (s1)] [epsilon (s3)])] [s1 ([0 (s2)] [1 (s1)])] [s2 ([0 (s1)] [1 (s2)])] [s3 ([0 (s3)] [1 (s4)])] ...
4ed525cba6b4c46259629afcb826d943f58232383b3b9754a7c9044f7fcb5e68
futurice/haskell-mega-repo
Periocron.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE TupleSections # | Pediodic execution on actions . module Futurice.Periocron ( spawnPeriocron, -- * Job Job, mkJob, -- * Intervals Intervals,...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/periocron/src/Futurice/Periocron.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # * Job * Intervals * Options ----------------------------------------------------------------------------- Internals ----------------------------------------------------------------------------- -----------------------------...
# LANGUAGE FlexibleContexts # # LANGUAGE TupleSections # | Pediodic execution on actions . module Futurice.Periocron ( spawnPeriocron, Job, mkJob, Intervals, every, shifted, Options, defaultOptions, optionsInterval, ) where import Control.Concurrent (ThreadId,...
9c4ec0f02935cfe1e81f852adbde4a6f6788b215a749ed154a305d5efe04080d
geoffder/olm-ml
utility.ml
open! Core open Helpers open Helpers.ResultInfix type t = { buf : char Ctypes.ptr ; util : C.Types.Utility.t Ctypes_static.ptr } let size = C.Funcs.utility_size () |> size_to_int let clear util = C.Funcs.clear_utility util |> size_to_result let check_error t ret = size_to_result ret |> Result...
null
https://raw.githubusercontent.com/geoffder/olm-ml/6ab791c5f4cacb54cf8939d78bd2a6820ec136b3/olm/lib/utility.ml
ocaml
open! Core open Helpers open Helpers.ResultInfix type t = { buf : char Ctypes.ptr ; util : C.Types.Utility.t Ctypes_static.ptr } let size = C.Funcs.utility_size () |> size_to_int let clear util = C.Funcs.clear_utility util |> size_to_result let check_error t ret = size_to_result ret |> Result...
877b5b8c173e583603de158706313f81fc16176b03e082970d9936c0cca69d73
alpheccar/HPDF
StandardFont.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE DeriveFunctor # --------------------------------------------------------- -- | Copyright : ( c ) 2006 - 2016 , alpheccar.org -- License : BSD-style -- -- Maintainer : -- Stability : experimental -- Portability : portable -- -- PDF Font --------------------...
null
https://raw.githubusercontent.com/alpheccar/HPDF/5a901376470b549b2354cdd8013e655f7ac19e0b/Graphics/PDF/Fonts/StandardFont.hs
haskell
------------------------------------------------------- | License : BSD-style Maintainer : Stability : experimental Portability : portable PDF Font -------------------------------------------------------
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE DeriveFunctor # Copyright : ( c ) 2006 - 2016 , alpheccar.org # LANGUAGE FlexibleContexts # module Graphics.PDF.Fonts.StandardFont( IsFont , GlyphSize , FontName(..) , StdFont , mkStdFont ) where import Graphics.PDF.LowLevel.Types import G...
88c0f10f615d4d76f3a6998a8f664a87dcca6d4b51c43c6465219e6cfaa01459
HaskellForCats/HaskellForCats
dataSeq.hs
module DataSeq where import Data.Sequence {- # LANGUAGE ViewPatterns #-} -- (<|) :: a -> Seq a -> Seq a mySeq = empty my2Seq = 2 <| mySeq my3Seq = empty * DataSeq > 1 < | ( my2Seq > < ( my3Seq | > 3 ) ) fromList [ 1,2,3 ] -- my2Seq > < my3Seq -- my2Seq > < ( my3Seq < | 2 ) : set -XViewPatterns ...
null
https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/dataSeq.hs
haskell
# LANGUAGE ViewPatterns # (<|) :: a -> Seq a -> Seq a my2Seq > < my3Seq my2Seq > < ( my3Seq < | 2 ) my2Seq >< my3Seq my2Seq >< (my3Seq <| 2)
module DataSeq where import Data.Sequence mySeq = empty my2Seq = 2 <| mySeq my3Seq = empty * DataSeq > 1 < | ( my2Seq > < ( my3Seq | > 3 ) ) fromList [ 1,2,3 ] : set -XViewPatterns *DataSeq> 1 <| (my2Seq >< (my3Seq |> 3)) fromList [1,2,3] :set -XViewPatterns -}
d587fb7ae6896d3debe4cfe8bdaf5d974aefa49da7971e0cd1f6b0caa2cd1644
geremih/xcljb
xevie.clj
This file is automatically generated . DO NOT MODIFY . (clojure.core/ns xcljb.gen.xevie (:require xcljb.conn-ext xcljb.gen.xevie-types)) (def -XCLJB {:minor-version 0, :major-version 1, :header "xevie", :extension-multiword false, :extension-name "Xevie", :extension-xname "XEVIE"}) (def DATATYPE {:mo...
null
https://raw.githubusercontent.com/geremih/xcljb/59e9ff795bf00595a3d46231a7bb4ec976852396/src/xcljb/gen/xevie.clj
clojure
Manually written.
This file is automatically generated . DO NOT MODIFY . (clojure.core/ns xcljb.gen.xevie (:require xcljb.conn-ext xcljb.gen.xevie-types)) (def -XCLJB {:minor-version 0, :major-version 1, :header "xevie", :extension-multiword false, :extension-name "Xevie", :extension-xname "XEVIE"}) (def DATATYPE {:mo...
cc79d6265ee70b9cb220485f0f56c53a6f028a64cda2600a34bbacc26d5aed5d
danfran/hcoord
LatLng.hs
# LANGUAGE CPP # -- | To represent a latitude/longitude pair based on a particular datum. module LatLng where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative #endif import Control.Monad.Except import Datum import Ellipsoid import MathExtensions data LatLng = LatLng { latitude :: Double ...
null
https://raw.githubusercontent.com/danfran/hcoord/e308934570874a6ce7f7ebdbf51a3c34e4acd745/src/LatLng.hs
haskell
| To represent a latitude/longitude pair based on a particular datum. ty : Incorrect value in v1.0 (-124.157). Corrected in v1.1. -125.157 -0.0000204894 toRadians(0.00004172222) toRadians(0.00023391666) ty : Incorrect value in v1.0 (-124.157). Corrected in v1.1. | Calculate the surface distance in kilometres fr...
# LANGUAGE CPP # module LatLng where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative #endif import Control.Monad.Except import Datum import Ellipsoid import MathExtensions data LatLng = LatLng { latitude :: Double , longitude :: Double , height :: Double ...
2246aa50cfeca7cfceef0df16fc73ff1612efc8d4dea656ee2684662cc9a99fd
RyanMcG/chic-text
core_test.clj
(ns chic-text.core-test (:require (clojure [string :as s] [test :refer :all]) (fixturex [context :refer [deftest-ctx testing-ctx]]) [chic-text.core :refer :all])) (deftest test-pad (is (= (pad 5 "hey") "hey ")) (testing "shorter...
null
https://raw.githubusercontent.com/RyanMcG/chic-text/2d901b6ddfb6f2703bedef7230160c1c782fc326/test/chic_text/core_test.clj
clojure
(ns chic-text.core-test (:require (clojure [string :as s] [test :refer :all]) (fixturex [context :refer [deftest-ctx testing-ctx]]) [chic-text.core :refer :all])) (deftest test-pad (is (= (pad 5 "hey") "hey ")) (testing "shorter...
1433febf5b75f4bd8c44eed6a89328328671141ec90e634f127e04a4a8efa3bf
2600hz-archive/whistle
rabbit_auth_mechanism_cr_demo.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/rabbitmq_server-2.4.1/src/rabbit_auth_mechanism_cr_demo.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. START-OK: Usern...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is VMware , Inc. Copyright ( c ) 2007 - 2011 VMware , Inc. All rights reserved . -module(rabbi...