_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
bca95f9d68b4c74f89a350e03bc01f38b18de9fb2bc5533e1ce519905f90ac72
input-output-hk/cardano-sl
Spec.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} module Cardano.Cluster.Environment.Spec ( -- * Environment prop_generatedEnvironmentIsValid -- * Topology , prop_coresAndRelaysTopologyStatic , prop_edgesTopologyBehindNat , prop_ed...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/cluster/test/Cardano/Cluster/Environment/Spec.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # * Environment * Topology * Environment * Topology
# LANGUAGE AllowAmbiguousTypes # module Cardano.Cluster.Environment.Spec ( prop_generatedEnvironmentIsValid , prop_coresAndRelaysTopologyStatic , prop_edgesTopologyBehindNat , prop_edgesConnectedToAllRelays ) where import Universum import Control.Lens (at, (?~)) import ...
8b68ad378cffc42fdb3613d66065a3c4b0b34a8db4ec705095e3a2b05162ef6c
nfrisby/coxswain
T9.hs
-- An inference that requires articulation. # LANGUAGE DataKinds # import Coxswain import Data.Proxy (Proxy(Proxy)) f :: Lacks p 0 => Proxy (p .& 0 .= a) -> () f _ = () g :: Lacks p 1 => Proxy (p .& 1 .= [b]) -> () g _ = () h p = f p `seq` g p main :: IO () main = return $ h (Proxy :: Proxy (Row0 .& 0 .= () .& 1 ...
null
https://raw.githubusercontent.com/nfrisby/coxswain/bfd5777964a5b4ba64e1bcc4cf18df1c9d8fc558/coxswain/test/well-typed/T9.hs
haskell
An inference that requires articulation.
# LANGUAGE DataKinds # import Coxswain import Data.Proxy (Proxy(Proxy)) f :: Lacks p 0 => Proxy (p .& 0 .= a) -> () f _ = () g :: Lacks p 1 => Proxy (p .& 1 .= [b]) -> () g _ = () h p = f p `seq` g p main :: IO () main = return $ h (Proxy :: Proxy (Row0 .& 0 .= () .& 1 .= [()]))
558c346d0caabd0abf631cd60b2fc28ca721df4b3d6219aa9662f2e7a515b0a6
MyDataFlow/ttalk-server
eventsource_app.erl
%% Feel free to use, reuse and abuse the code in this file. @private -module(eventsource_app). -behaviour(application). %% API. -export([start/2]). -export([stop/1]). %% API. start(_Type, _Args) -> Dispatch = cowboy_router:compile([ {'_', [ {"/eventsource", eventsource_handler, []}, {"/", cowboy_static, ...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/examples/eventsource/src/eventsource_app.erl
erlang
Feel free to use, reuse and abuse the code in this file. API. API.
@private -module(eventsource_app). -behaviour(application). -export([start/2]). -export([stop/1]). start(_Type, _Args) -> Dispatch = cowboy_router:compile([ {'_', [ {"/eventsource", eventsource_handler, []}, {"/", cowboy_static, {priv_file, eventsource, "index.html"}} ]} ]), {ok, _} = cowboy:start_ht...
95c020820d5c0c59ded90b89e7b90abae421da378bc04925dfe20195ecb541fe
eriksvedang/unity-lisp
core_test.clj
(ns unity-lisp.core-test (:require [clojure.test :refer :all] [unity-lisp.core :refer :all] [unity-lisp.parser :refer :all] [unity-lisp.macros :refer :all] [unity-lisp.emit :refer :all])) ;;; Parsing (deftest parse-empty (is (= (p "") ()))) (deftest parse-symbol ...
null
https://raw.githubusercontent.com/eriksvedang/unity-lisp/fee8903a48dd436b5d123be42176f808f2414180/test/unity_lisp/core_test.clj
clojure
Parsing :\"") ;;; Code generation ;; Constants Binary operators Function calls Variables, bindings and mutation Defining functions and lambdas If-expressions Vectors / lists Maps Member variables and methods access Keywords Yield
(ns unity-lisp.core-test (:require [clojure.test :refer :all] [unity-lisp.core :refer :all] [unity-lisp.parser :refer :all] [unity-lisp.macros :refer :all] [unity-lisp.emit :refer :all])) (deftest parse-empty (is (= (p "") ()))) (deftest parse-symbol (is (= (p "b...
0bd4d5f3ca197828fb46ff44c8e6e4cd693bf9dfcef5fa4675f6a62acc3f2536
roterski/syncrate-fulcro
new_post_page.cljs
(ns app.posts.ui.new-post-page (:require [app.posts.ui.post-form :refer [ui-post-form PostForm add-post-form]] [app.posts.ui.post :refer [Post]] [com.fulcrologic.fulcro.dom :as dom :refer [div ul li p h1 h3 button]] [com.fulcrologic.fulcro.components :as prim :refer [defsc]] [com.fulcrologic.fulcr...
null
https://raw.githubusercontent.com/roterski/syncrate-fulcro/3fda40b12973e64c7ff976174498ec512b411323/src/main/app/posts/ui/new_post_page.cljs
clojure
(ns app.posts.ui.new-post-page (:require [app.posts.ui.post-form :refer [ui-post-form PostForm add-post-form]] [app.posts.ui.post :refer [Post]] [com.fulcrologic.fulcro.dom :as dom :refer [div ul li p h1 h3 button]] [com.fulcrologic.fulcro.components :as prim :refer [defsc]] [com.fulcrologic.fulcr...
4aa71b0004588d6e3f1337a2a3e92d04c595d0ffd4264fca7562c51faad8e175
acowley/GLUtil
ShaderProgram.hs
# LANGUAGE CPP # |Convenience interface for working with GLSL shader -- programs. Provides an interface for setting attributes and -- uniforms. module Graphics.GLUtil.ShaderProgram * The ShaderProgram type ShaderProgram(..), -- * Simple shader programs utilizing a vertex shader and a fragment shader simp...
null
https://raw.githubusercontent.com/acowley/GLUtil/09faac00072b08c72ab12bcc57d4ab2a02ff1c88/src/Graphics/GLUtil/ShaderProgram.hs
haskell
programs. Provides an interface for setting attributes and uniforms. * Simple shader programs utilizing a vertex shader and a fragment shader * Explicit shader loading linked. uniform names that will be set in this program. If all attributes and uniforms are desired, consider using 'loadShaderProgram'. fragment...
# LANGUAGE CPP # |Convenience interface for working with GLSL shader module Graphics.GLUtil.ShaderProgram * The ShaderProgram type ShaderProgram(..), simpleShaderProgram, simpleShaderProgramWith, simpleShaderExplicit, simpleShaderProgramBS, simpleShaderProgramWithBS, simpleShaderExplicitBS, loadShader...
6e90f36979c83dc894cdfe34a8084e433fb67801cbd24819ba63e39b0925a902
whitequark/ocaml-m17n
Цвет.mli
type цвет = | Красный | Зеленый val show_цвет : цвет -> string
null
https://raw.githubusercontent.com/whitequark/ocaml-m17n/adc9db47f19cf4a0e5b2d7d1e80e832dc1cd8ab7/src_test/ru/%D0%A6%D0%B2%D0%B5%D1%82.mli
ocaml
type цвет = | Красный | Зеленый val show_цвет : цвет -> string
9037bd03254b0eb661c8fe41e9f5ea7f6f2b6d658b2a13ff4c9dd0c796494040
myaosato/clcm
bullet-list-methods.lisp
(defpackage :clcm/nodes/bullet-list-methods (:use :cl :clcm/utils :clcm/line :clcm/node :clcm/nodes/blank-line :clcm/nodes/bullet-list :clcm/nodes/bullet-list-item) (:import-from :cl-ppcre :scan) (:export)) (in-package :clcm/nodes/bullet-list-methods...
null
https://raw.githubusercontent.com/myaosato/clcm/fd0390bedf00c5be3f5c2eb8176ff73bede797b0/src/nodes/bullet-list-methods.lisp
lisp
close add ->html
(defpackage :clcm/nodes/bullet-list-methods (:use :cl :clcm/utils :clcm/line :clcm/node :clcm/nodes/blank-line :clcm/nodes/bullet-list :clcm/nodes/bullet-list-item) (:import-from :cl-ppcre :scan) (:export)) (in-package :clcm/nodes/bullet-list-methods...
e998cb64317848981d6979e7fd36387da27a4e6ebeeb379956362bf55d223948
HaskellForCats/HaskellForCats
ladiesWhoCodeHaskell006.hs
module Lwch006 where -- : retab -- : set +s -- [count]ge -- [count]( -- [count]{ set expandtab ts=4 ruler number spell Haskell 's Type System Haskell 's type system combines the good of Dynamic and Static systems . Oodles of compile time errors are caught , more than C , C++ , Object - C. Because it '...
null
https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/ladiesWhoCodeHaskell/ladiesWhoCodeHaskell006.hs
haskell
: retab : set +s [count]ge [count]( [count]{
module Lwch006 where set expandtab ts=4 ruler number spell Haskell 's Type System Haskell 's type system combines the good of Dynamic and Static systems . Oodles of compile time errors are caught , more than C , C++ , Object - C. Because it 's twice as strict . If you do n't want write out a type you mo...
e7f48c2f93560d5965f6ad6144cc7df8225f14ef10b83b35e88ce05ccca677b3
coalton-lang/coalton
hoister.lisp
(defpackage #:coalton-impl/codegen/hoister (:use #:cl #:coalton-impl/util #:coalton-impl/codegen/ast) (:export #:hoister ; STRUCT CONSTRUCTOR #:push-hoist-point ; FUNCTION #:pop-hoist-point ; FUNCTION #:pop-final-hoist-point ...
null
https://raw.githubusercontent.com/coalton-lang/coalton/a8d779e824bb362c01d3218cfbb3394f9858850f/src/codegen/hoister.lisp
lisp
STRUCT FUNCTION FUNCTION FUNCTION FUNCTION
(defpackage #:coalton-impl/codegen/hoister (:use #:cl #:coalton-impl/util #:coalton-impl/codegen/ast) (:export CONSTRUCTOR )) (in-package #:coalton-impl/codegen/hoister) (eval-when (:compile-toplevel :load-toplevel :execute) (defstruct hoist-point (bound-variables (required 'bound-variables) ...
c5633bdd6c0c26d9609f370558239d36a20cfaa896149f0f21a0ceb243230a27
weavery/clarc
utility.mli
(* This is free and unencumbered software released into the public domain. *) val unreachable : unit -> unit val unimplemented : string -> unit val unsupported : string -> unit val last : 'a list -> 'a option
null
https://raw.githubusercontent.com/weavery/clarc/1fb1c43210f52b4022e7f0ae30b7c7d4a9e7ca01/lib/Clar2EVM/utility.mli
ocaml
This is free and unencumbered software released into the public domain.
val unreachable : unit -> unit val unimplemented : string -> unit val unsupported : string -> unit val last : 'a list -> 'a option
d3748d2934a12aac0bf5af84918e27bfbbb853c2045d5305ce209175a8f0cdf2
ghc/ghc
T20666b.hs
# LANGUAGE UndecidableInstances # # LANGUAGE TypeFamilies # module T20666b where type family F a class Eq (F a) => D a class Eq (F a) => C a instance D [a] => C [a]
null
https://raw.githubusercontent.com/ghc/ghc/3b019a7ac8fc9059cc3213f6f95a2daef97ca442/testsuite/tests/typecheck/should_compile/T20666b.hs
haskell
# LANGUAGE UndecidableInstances # # LANGUAGE TypeFamilies # module T20666b where type family F a class Eq (F a) => D a class Eq (F a) => C a instance D [a] => C [a]
fb45f155b0734ef939f23fb5caf09a701ad959174258e7babeeeb8b80440ad97
icicle-lang/icicle-ambiata
EditDistance.hs
# LANGUAGE NoImplicitPrelude # module Icicle.Internal.EditDistance ( editDistance ) where import P import qualified Data.Vector.Unboxed.Mutable as Vector import Icicle.Internal.Pretty import Control.Monad.ST (runST, ST) import qualified Data.Map as Map import Data.List ...
null
https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-data/src/Icicle/Internal/EditDistance.hs
haskell
This function it from the library language-spelling, but it has dependencies on this file.
# LANGUAGE NoImplicitPrelude # module Icicle.Internal.EditDistance ( editDistance ) where import P import qualified Data.Vector.Unboxed.Mutable as Vector import Icicle.Internal.Pretty import Control.Monad.ST (runST, ST) import qualified Data.Map as Map import Data.List ...
62d9dc55bf7214b353192cd9a0f219f2689e13f51963129de1435ef3883e2e55
orthecreedence/wookie
plugin.lisp
;; wookie-plugin-export provides a shared namespace for plugins to provide ;; their public symbols to. apps can :use this package to gain access to ;; the shared plugin namespace. (defpackage :wookie-plugin-export (:use :cl)) (in-package :wookie) (defvar *plugin-folders* (list "./wookie-plugins/" ...
null
https://raw.githubusercontent.com/orthecreedence/wookie/1f74b6c24b463c1e6fff35377e477934f72bac20/plugin.lisp
lisp
wookie-plugin-export provides a shared namespace for plugins to provide their public symbols to. apps can :use this package to gain access to the shared plugin namespace. if enabled (And not already loaded), load it unload the plugin note that these are macros to fix some dependency issues when building be funct...
(defpackage :wookie-plugin-export (:use :cl)) (in-package :wookie) (defvar *plugin-folders* (list "./wookie-plugins/" (asdf:system-relative-pathname :wookie #P"core-plugins/")) "A list of directories where Wookie plugins can be found.") (defvar *available-plugins* nil "A plist (g...
16a0fbe4a97119e14029472d3cb2f4edb190b8eb51abf0bcd403831b0eb4f2ca
usocket/usocket
mcl.lisp
MCL backend for USOCKET 0.4.1 < > , January 1 , 2009 (in-package :usocket) (defun handle-condition (condition &optional socket (host-or-ip nil)) ; incomplete, needs to handle additional conditions (flet ((raise-error (&optional socket-condition host-or-ip) (if socket-condition (co...
null
https://raw.githubusercontent.com/usocket/usocket/5fa2bbf2be365f93ce8912e18b0cb62d7c9f2b32/backend/mcl.lisp
lisp
incomplete, needs to handle additional conditions BASIC MCL SOCKET IMPLEMENTATION like with-io-buffer-lock-grabbed but returns immediately instead of polling the lock crucial - clears bogus lock.value as in grab-io-buffer-lock-out-of-line: datagram socket methods
MCL backend for USOCKET 0.4.1 < > , January 1 , 2009 (in-package :usocket) (defun handle-condition (condition &optional socket (host-or-ip nil)) (flet ((raise-error (&optional socket-condition host-or-ip) (if socket-condition (cond ((typep socket-condition ns-error) ...
be6baf5f8d12b3f9c8b695fe7b3f23d6dd2c4eda63869325b34c4ab51c185af2
rcherrueau/rastache
rastache-test-case.rkt
#lang racket/base (require rackunit racket/format "../commons.rkt" "../parser.rkt" "../renderer.rkt" "../main.rkt" (for-syntax racket)) (provide (all-defined-out)) Rastache test case (define-syntax (rast-t-case stx) (syntax-case stx () ;; rast-t-case: tes...
null
https://raw.githubusercontent.com/rcherrueau/rastache/059d00c83416f8ba27cc38fa7f8321b075756d14/rastache/tests/rastache-test-case.rkt
racket
rast-t-case: test-name context template expected fail-msg expended to rackunit test case.
#lang racket/base (require rackunit racket/format "../commons.rkt" "../parser.rkt" "../renderer.rkt" "../main.rkt" (for-syntax racket)) (provide (all-defined-out)) Rastache test case (define-syntax (rast-t-case stx) (syntax-case stx () [(_ t-name t-ctx t-...
d33435d6ff55eec4e57c960be3d398b52bf1814e4733e8423573728623a7864d
arttuka/reagent-material-ui
wifi_2_bar.cljs
(ns reagent-mui.icons.wifi-2-bar "Imports @mui/icons-material/Wifi2Bar as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def wifi-2-bar (create-svg-icon (e "path"...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/wifi_2_bar.cljs
clojure
(ns reagent-mui.icons.wifi-2-bar "Imports @mui/icons-material/Wifi2Bar as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def wifi-2-bar (create-svg-icon (e "path"...
963d2a65f557afd63ec3a04642f594ed5a7222dadb954b5346d0563cbaccee9b
lread/test-doc-blocks
doc_update_readme.clj
#!/usr/bin/env bb (ns doc-update-readme "Script to update README.adoc to credit contributors Run manually as needed." (:require [babashka.fs :as fs] [clojure.edn :as edn] [clojure.java.io :as io] [clojure.string :as string] [helper.main :as main] [helpe...
null
https://raw.githubusercontent.com/lread/test-doc-blocks/826e47e90025b72f16c89153fcbfb5c985579bf7/script/doc_update_readme.clj
clojure
} } } } } } }")]]
#!/usr/bin/env bb (ns doc-update-readme "Script to update README.adoc to credit contributors Run manually as needed." (:require [babashka.fs :as fs] [clojure.edn :as edn] [clojure.java.io :as io] [clojure.string :as string] [helper.main :as main] [helpe...
0a1e450586d5b423a57a362f104b45d23ce007fcce417465df772d3e544cb95a
dharmatech/psilab
urman-tutorial-fill.sps
(import (rnrs) (ypsilon cairo) (psilab cairo with-cairo)) (let ((surface (cairo_image_surface_create CAIRO_FORMAT_ARGB32 120 120))) (let ((cr (cairo_create surface))) (with-cairo cr (scale 120 120) (set_source_rgb 0 0 0) (rectangle 0.25 0.25 0.5 0.5) (fill) (de...
null
https://raw.githubusercontent.com/dharmatech/psilab/16b60e4ae63e3405d74117a50cd9ea313c179b33/cairo/examples/urman-tutorial-fill.sps
scheme
(import (rnrs) (ypsilon cairo) (psilab cairo with-cairo)) (let ((surface (cairo_image_surface_create CAIRO_FORMAT_ARGB32 120 120))) (let ((cr (cairo_create surface))) (with-cairo cr (scale 120 120) (set_source_rgb 0 0 0) (rectangle 0.25 0.25 0.5 0.5) (fill) (de...
2e49aa9a79685574137acedf67ac5831d3a6bd1c606c615c1f9cf6a2041f228e
ocsigen/ocaml-eliom
constprop.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/basic/constprop.ml
ocaml
********************************************************************* OCaml ...
, projet Gallium , INRIA Rocquencourt Copyright 2014 Institut National de Recherche en Informatique et under the terms of the Q Public License version 1.0 . let do_test msg res1 res2 = Printf.printf "%s: %s\n" msg (if res1 = res2 then "passed" else "FAILED") let hide ...
77dd5ab4bb1aa0e329dc45dd745d897752554d24f15630e6bb676e14fbec84b6
cloojure/tupelo
core.cljc
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 th...
null
https://raw.githubusercontent.com/cloojure/tupelo/2bdcd31391947bb8a6abc0340a74588f3e7c6a16/test/cljc/tst/tupelo/core.cljc
clojure
(-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. ----------------------------------------------------...
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (ns tst.tupelo.core #?(:cljs (:require-macros [tupelo.core] [tupelo.misc] [tupelo.testy] )) (:require [clojure.stri...
b973efd363e2112a96e85cba53c2dc02ef920d3cca9ada8f29d9416eaba4e1da
ghcjs/ghcjs-dom
HTMLButtonElement.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.HTMLButtonElement (js_checkValidity, checkValidity, checkValidity_, js_reportVa...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLButtonElement.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/HTMLButtonElement.setCustomValidity Mozilla HTMLButtonElement.setCustomValidity documentation> | <-US/docs/Web/API/HTMLButtonElement.form Mozilla HTMLButtonElement.form documentation> | <-US/docs/Web/AP...
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.HTMLButtonElement (js_checkValidity, checkValidity, checkValidity_, js_reportValidity, reportValidity, reportValidity_, js_setCustomValidity, setCustomValidity, js_setAut...
70b9db57509fee63bab63cd7b72fb98eb1f179c890176e7c5b25c3763f041eea
qkrgud55/ocamlmulti
stringLabels.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/stdlib/stringLabels.mli
ocaml
********************************************************************* OCaml ...
, 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 GNU Library General Public License , with $ I d : stringLabels.mli 12241 2012 -...
3eadfedb41c36e5b78f12f48ca3172668040b819e2c268fa974d01a5a6adb143
LightAndLight/sage
Parsers.hs
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} module Parsers (parsersBench) where import Control.Applicative (many, some, (<|>)) import Control.DeepSeq (NFData) import Criterion.Main (Benchmark, bench, bgroup, nf) import qualified Data.Attoparsec.Text as Attoparsec import...
null
https://raw.githubusercontent.com/LightAndLight/sage/f0ff14f5b99fe1bc1189857fc1a339c8398da640/bench/Parsers.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # module Parsers (parsersBench) where import Control.Applicative (many, some, (<|>)) import Control.DeepSeq (NFData) import Criterion.Main (Benchmark, bench, bgroup, nf) import qualified Data.Attoparsec.Text as Attoparsec import Data.Char (isLower) import Data.Te...
528720e5645ab1631670bed1f134268572314e27d0b08a254980a90cbe673e14
ConsenSysMesh/Fae
Lens.hs
| Module : Common . Lens Description : Wrapper library for " Control . Lens " Copyright : ( c ) , 2017 - 2018 License : MIT Maintainer : Stability : experimental This module just re - exports " Control . Lens " , replacing ' makeLenses ' with one that works exactly oppositely to the default one re...
null
https://raw.githubusercontent.com/ConsenSysMesh/Fae/3ff023f70fa403e9cef80045907e415ccd88d7e8/common/Common/Lens.hs
haskell
| Defined as > makeLensesWith myLensRules where 'myLensRules' /adds/ an underscore to names, rather than removes one that exists. Because the default behavior is backwards. The inverse of the default field namer: ignores _-prefixed fields, otherwise prepends a _. | Useful when using 'at', say I'm pretty s...
| Module : Common . Lens Description : Wrapper library for " Control . Lens " Copyright : ( c ) , 2017 - 2018 License : MIT Maintainer : Stability : experimental This module just re - exports " Control . Lens " , replacing ' makeLenses ' with one that works exactly oppositely to the default one re...
3dbb97c3df525c0944874d1af42fc274e1120040747009055aeb119bee4c7f05
cedlemo/OCaml-GI-ctypes-bindings-generator
Popover_menu.mli
open Ctypes type t val t_typ : t typ val create : unit -> Widget.t ptr val open_submenu : t -> string -> unit
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Popover_menu.mli
ocaml
open Ctypes type t val t_typ : t typ val create : unit -> Widget.t ptr val open_submenu : t -> string -> unit
36f2b6c078e1b8350b969d3c066896e43b2f517380077acae9e6f8af235c7691
oklm-wsh/MrMime
iana.ml
module Map = Map.Make(String) module Set = Set.Make(String) last update 2016 - 06 - 01 let iana = Map.add "video" (Set.of_list ["1d-interleaved-parityfec"; "3gpp"; "3gpp-tt"; "3gpp2"; "BMPEG"; "BT656"; "CelB"; "DV"; "H261"; "H263";...
null
https://raw.githubusercontent.com/oklm-wsh/MrMime/4d2a9dc75905927a092c0424cff7462e2b26bb96/lib/iana.ml
ocaml
module Map = Map.Make(String) module Set = Set.Make(String) last update 2016 - 06 - 01 let iana = Map.add "video" (Set.of_list ["1d-interleaved-parityfec"; "3gpp"; "3gpp-tt"; "3gpp2"; "BMPEG"; "BT656"; "CelB"; "DV"; "H261"; "H263";...
57a106bd09a081bec32f6ec3c02881f77f5e7ae9fd78b110485a96ad2ef14a00
databrary/databrary
Citation.hs
{-# LANGUAGE ScopedTypeVariables, DataKinds #-} module Model.Citation ( module Model.Citation.Types , lookupVolumeCitation , lookupVolumesCitations , changeVolumeCitation , lookupVolumeLinks , changeVolumeLinks ) where import Data.ByteString (concat) import Data.String (fromString) import Database.Postgr...
null
https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/Citation.hs
haskell
# LANGUAGE ScopedTypeVariables, DataKinds # (deleteVolumeCitation 'ident 'vol) (updateVolumeCitation 'ident 'vol 'cite) (insertVolumeCitation 'ident 'vol 'cite) (deleteVolumeLink 'ident 'vol) (insertVolumeLink 'ident 'vol 'link)
module Model.Citation ( module Model.Citation.Types , lookupVolumeCitation , lookupVolumesCitations , changeVolumeCitation , lookupVolumeLinks , changeVolumeLinks ) where import Data.ByteString (concat) import Data.String (fromString) import Database.PostgreSQL.Typed.Types import Has (peek, view) import...
6382e2b3285fed04c4d67f7e9705f8714ac7862c018f4bf46a1b61eaf7091d24
BinaryAnalysisPlatform/bap
bir_piqi.ml
open Core_kernel[@@warning "-D"] open Bap.Std open Option.Monad_infix module R = Ir_piqi module Get = struct let tid = Tid.from_string_exn let exp = Bil_piqi.exp_of_piqi let var = Bil_piqi.var_of_piqi let label = function | `direct t -> Direct (tid t) | `indirect e -> Indirect (exp e) let intent...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_piqi/bir_piqi.ml
ocaml
open Core_kernel[@@warning "-D"] open Bap.Std open Option.Monad_infix module R = Ir_piqi module Get = struct let tid = Tid.from_string_exn let exp = Bil_piqi.exp_of_piqi let var = Bil_piqi.var_of_piqi let label = function | `direct t -> Direct (tid t) | `indirect e -> Indirect (exp e) let intent...
7611cd5f0c44a6c503872aea10a8783de1fc2d44a9544f60d4cf2290e93d8e69
flipstone/haskell-for-beginners
6_bytestrings.hs
-- Implement a program to count the number of vowels that appear in text read from stdin . Do this 3 times , once using plain lists , once with strict bytestrings , -- and once with lazy byte strings. Compare how they -- perform on small and large input and thing about when -- each my be appropriate to use. -- -- Y...
null
https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/problems/chapter_09/6_bytestrings.hs
haskell
Implement a program to count the number of vowels and once with lazy byte strings. Compare how they perform on small and large input and thing about when each my be appropriate to use. You can test you program by running a command like: time cat /dev/urandom | tr -dc _A-Z-a-z-0-9 | head -c <bytes> | runhaskell...
that appear in text read from stdin . Do this 3 times , once using plain lists , once with strict bytestrings , Try varying the number of bytes from as low as 1000 to as high as 20000000 and see how each version of your import qualified Data.ByteString.Lazy.Char8 as LBS import qualified Data.ByteString.Char8 a...
2889a70e12138de396c3288774bf4fd0ada7e5e05119bbb9f4c79def415bedc7
bobzhang/ocaml-book
priv.ml
module Int = struct type t = int let of_int x = x let to_int x = x end module Priv : sig type t = private int val of_int : int -> t val to_int : t -> int end = Int module Abstr : sig type t val of_int : int -> t val to_int : t -> int end = Int let _ = print_int (Priv.of_int 3 :> int) let...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/lang/code/priv.ml
ocaml
* non-container type * this is is hard to do when abstract types
module Int = struct type t = int let of_int x = x let to_int x = x end module Priv : sig type t = private int val of_int : int -> t val to_int : t -> int end = Int module Abstr : sig type t val of_int : int -> t val to_int : t -> int end = Int let _ = print_int (Priv.of_int 3 :> int) let...
7c7786d8f21939543c1f7f24a66ffdf62efa5c23e5c0bc749d6361f8e7b8b46e
Swirrl/table2qb
columns_test.clj
(ns table2qb.configuration.columns-test (:require [clojure.test :refer :all] [table2qb.configuration.columns :refer :all] [table2qb.util :refer [exception?]])) (deftest load-column-configuration-test (testing "input validation" (testing "required columns" (is (= #{"title" ...
null
https://raw.githubusercontent.com/Swirrl/table2qb/b01611506b7f90aaa15c1a5227d0faabd922db3e/test/table2qb/configuration/columns_test.clj
clojure
(ns table2qb.configuration.columns-test (:require [clojure.test :refer :all] [table2qb.configuration.columns :refer :all] [table2qb.util :refer [exception?]])) (deftest load-column-configuration-test (testing "input validation" (testing "required columns" (is (= #{"title" ...
ea26fda2862b3973e4a80f15c8ac4e17342ea88de58c4023522f7a2c388969f7
facebook/infer
fol.ml
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/59cf5eab3b881acdd00707b4c15adcc7e97564b9/sledge/src/fol/fol.ml
ocaml
* First-Order Logic
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
f1254888a4898b32501b704811a8cbb657855b6ed1a54e89cb8b454e18334713
reagent-project/reagent-template
middleware.clj
(ns {{project-ns}}.middleware (:require [ring.middleware.defaults :refer [site-defaults wrap-defaults]])) (def middleware [#(wrap-defaults % site-defaults)])
null
https://raw.githubusercontent.com/reagent-project/reagent-template/c769c6806540a9faafec36c27b07a1c86ae5eff7/resources/leiningen/new/reagent/env/prod/clj/reagent/middleware.clj
clojure
(ns {{project-ns}}.middleware (:require [ring.middleware.defaults :refer [site-defaults wrap-defaults]])) (def middleware [#(wrap-defaults % site-defaults)])
e15b686231b4c034c81460b49e0061952685ec9989fd3ac4cbfa642406d30cc5
brownplt/cs173-python
python-interp-helpers.rkt
#lang plai-typed (require "python-core-syntax.rkt" "python-primitives.rkt" "python-objects.rkt") (define (extract-prim (obj : CVal)) : PrimVal (type-case CVal obj [VObject (pval fields) pval])) (define (booleanof (obj : CVal)) : boolean (type-case CVal obj [VObject (primval fields) (typ...
null
https://raw.githubusercontent.com/brownplt/cs173-python/d8ae026172f269282e54366f16ec42e037117cb4/design1/cs173-python/python-interp-helpers.rkt
racket
#lang plai-typed (require "python-core-syntax.rkt" "python-primitives.rkt" "python-objects.rkt") (define (extract-prim (obj : CVal)) : PrimVal (type-case CVal obj [VObject (pval fields) pval])) (define (booleanof (obj : CVal)) : boolean (type-case CVal obj [VObject (primval fields) (typ...
1d8a269715a320bf887debe052621b45667025e90e260647db7f56077624570f
shirok/Gauche
178.scm
;; ;; SRFI-178 Bitvectors ;; gauche.bitvector is a superset of SRFI-178 . we just reexport ;; srfi-defined procedures. ;; (define-module srfi.178 (use gauche.bitvector) (export ;; bit conversion bit->integer bit->boolean ;built-in ;; constructors make-bitvector bitvector ;b...
null
https://raw.githubusercontent.com/shirok/Gauche/e606bfe5a94b100d5807bca9c2bb95df94f60aa6/lib/srfi/178.scm
scheme
SRFI-178 Bitvectors srfi-defined procedures. bit conversion built-in constructors built-in built-in predicates built-in selectors built-in built-in iteration prefixes, suffixes, trimming, padding mutators built-in built-in conversion built-in built-in built-in generators basic operations quasi-integer ...
gauche.bitvector is a superset of SRFI-178 . we just reexport (define-module srfi.178 (use gauche.bitvector) (export bitvector-unfold bitvector-unfold-right bitvector-reverse-copy bitvector-append bitvector-concatenate bitvector-append-subbitvectors bitvector-empty? bitvector=? bitvector-...
c21f746ea7e91cafd591919c351c77dd34cfe4b0c4c411edd8510a89cdef41a5
paf31/dovetail
Regex.hs
# LANGUAGE BlockArguments # # LANGUAGE ImportQualifiedPost # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # module Dovetail.Core.Data.String.Regex where import Data.Foldable (fold) import Data.Text (Text) import Data.Ve...
null
https://raw.githubusercontent.com/paf31/dovetail/60e00e247b643ad9c05e4137396ffddedcd8bcb6/dovetail-core/src/Dovetail/Core/Data/String/Regex.hs
haskell
# LANGUAGE OverloadedStrings # showRegexImpl :: Regex -> String regexImpl :: (String -> Either String Regex) -> (Regex -> Either String Regex) -> String -> String source :: Regex -> String flagsImpl :: Regex -> RegexFlagsRec test :: Regex -> String -> Boolean _match -> (forall r. Maybe r) -> R...
# LANGUAGE BlockArguments # # LANGUAGE ImportQualifiedPost # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # module Dovetail.Core.Data.String.Regex where import Data.Foldable (fold) import Data.Text (Text) import Data.Vector (Vector) import Dovetail import ...
f9d033ecb631fa3ef7b41c34dc482173c8b00f2921240949d335738dd3fd19c5
rowangithub/DOrder
repeat.ml
let succ x = x + 1 let rec repeat (f:int->int) n s = if n = 0 then s else f (repeat f (n-1) s) let main n = assert (repeat succ n 0 >= n) let _ = main 2
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/mochi/repeat.ml
ocaml
let succ x = x + 1 let rec repeat (f:int->int) n s = if n = 0 then s else f (repeat f (n-1) s) let main n = assert (repeat succ n 0 >= n) let _ = main 2
5f1869d930615ab7e72c49d1aae37b6fb189babcd186f0f24e97409ba1ed0cf3
ddmcdonald/sparser
articles.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- copyright ( c ) 1991 - 1996,2013,2016 - 2022 -- all rights reserved extensions copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved ;;; ;;; File: "articles" ;;; Module: "drivers;inits:" Version : January 2022 1.1 ( 3/28/91...
null
https://raw.githubusercontent.com/ddmcdonald/sparser/9968e7af632d4c66a5037317942df28642a8df09/Sparser/code/s/drivers/inits/articles.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- File: "articles" Module: "drivers;inits:" conditionalization according to the load-time switches when's on *model* into one if. grammar has been loaded ///needs some flags as well. being loaded at this point with the new categ...
copyright ( c ) 1991 - 1996,2013,2016 - 2022 -- all rights reserved extensions copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved Version : January 2022 1.1 ( 3/28/91 v1.8.1 ) Added Clear - individuals , and improved the 1.2 ( 7/11 v1.8.5 ) Added Clear - traversal - state and mer...
1832eb4e450f2fe44fe21c7145c429c105c744d6327ad8866c82bcc6a88907db
gravicappa/gambit-sdl
sdl-pango.scm
(namespace ("sdl-pango#")) (##include "~~lib/gambit#.scm") (declare (standard-bindings) (extended-bindings) (not safe)) (c-declare #<<eof #include <pango/pango.h> #include <SDL_Pango.h> eof ) (include "ffi.scm") (c-define-type SDL_Surface* (pointer "SDL_Surface")) (c-define-type PangoLayout* (pointer "PangoLay...
null
https://raw.githubusercontent.com/gravicappa/gambit-sdl/bde15600d7911e8c629e32f715bfa030000a3b09/sdl-pango.scm
scheme
"))) "))) "))) + + i ) + + j ) + + i ) {
(namespace ("sdl-pango#")) (##include "~~lib/gambit#.scm") (declare (standard-bindings) (extended-bindings) (not safe)) (c-declare #<<eof #include <pango/pango.h> #include <SDL_Pango.h> eof ) (include "ffi.scm") (c-define-type SDL_Surface* (pointer "SDL_Surface")) (c-define-type PangoLayout* (pointer "PangoLay...
a1439ea130a9818595203d3366a250beefbb8d45947eb9e76983da3dd5b3c747
nklein/cl-reactive
count.lisp
;;;; count.lisp (in-package #:cl-reactive) (defun signal-count (sig &key documentation) "Create a signal function that returns the number of times the signal SIG has been updated. Note: This count actually reflects the number of times that a signal function dependent on SIG is updated so if SIG is updated multipl...
null
https://raw.githubusercontent.com/nklein/cl-reactive/095af14792cbf33eca6f1db38a0c0456d9042ace/src/count.lisp
lisp
count.lisp
(in-package #:cl-reactive) (defun signal-count (sig &key documentation) "Create a signal function that returns the number of times the signal SIG has been updated. Note: This count actually reflects the number of times that a signal function dependent on SIG is updated so if SIG is updated multiple times within a...
f7599fa19679a1f1e73497cf037ad8a8ad9484910c73367542688e672abf0fd0
marick/suchwow
f_use_favorites.clj
(ns such.f-use-favorites (:use such.f-immigration) (:use midje.sweet)) (fact (count-permutations [1 2 3]) => 6 (permutations [1 2]) => [ [1 2] [2 1] ] (write-str [1 2]) => "[1,2]") (fact (subset? #{1} #{1 2}) => true) (fact (str-trim " f ") => "f")
null
https://raw.githubusercontent.com/marick/suchwow/111cd4aa21ee23552742701bfe52e593b65fb0f8/test/such/f_use_favorites.clj
clojure
(ns such.f-use-favorites (:use such.f-immigration) (:use midje.sweet)) (fact (count-permutations [1 2 3]) => 6 (permutations [1 2]) => [ [1 2] [2 1] ] (write-str [1 2]) => "[1,2]") (fact (subset? #{1} #{1 2}) => true) (fact (str-trim " f ") => "f")
c6c739883bd5ab2fe6df790ea7c27c775b4b66a139c0980a3f75000042f309c7
avillega/generative-art
project.clj
(defproject generative-art "0.1.0-SNAPSHOT" :description "Repo displaying my learning in generative art" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [quil "2.7.1"]] :main generative-artistry.tiled-lines)
null
https://raw.githubusercontent.com/avillega/generative-art/cd3be0a40ff9a7972b875df0e9e8f6981e45ee40/project.clj
clojure
(defproject generative-art "0.1.0-SNAPSHOT" :description "Repo displaying my learning in generative art" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [quil "2.7.1"]] :main generative-artistry.tiled-lines)
903908e323022dddba4aa8e73445f0ed164ff23d4aff9dedd4d2a5fb164dd9b9
MercuryTechnologies/ghc-specter
WaiHandler.hs
# LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # -- NOTE: This disables the unwanted warning due to the use of forkPingThread. -- TODO: use withPingThread as suggested after an investigation. # OPTIONS_GHC -fno - warn - deprecations ...
null
https://raw.githubusercontent.com/MercuryTechnologies/ghc-specter/599a8f99353da6313f56bc239b583ef11ae3fe4f/daemon/src/GHCSpecter/UI/ConcurReplica/WaiHandler.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # NOTE: This disables the unwanted warning due to the use of forkPingThread. TODO: use withPingThread as suggested after an investigation. When IHTML can be marked with the non-update (the Left case) directive, | Events are sent from the client to the server. | ...
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ScopedTypeVariables # # OPTIONS_GHC -fno - warn - deprecations # | This module is originated from Network . Wai . Handler . Replica . the DOM diff updating is bypassed . module GHCSpecter.UI.ConcurReplica.WaiHandler ( Event (..), Callback (..), Context (..),...
ac482523582aae49a6418cb558494b6919377be44145a3d44671d46a29d6195a
bagucode/clj-native
c_lib.clj
;; IMPORTANT! ( System / setProperty " jna.library.path " " your / lib / path / here " ) ;; Must be done before calling loadlib, preferrably on command line (ns examples.c-lib (:use [clj-native.direct :only [defclib loadlib typeof]] [clj-native.structs :only [byref byval]] [clj-native.callbacks :o...
null
https://raw.githubusercontent.com/bagucode/clj-native/31f3862c00cb5160360195c5c679553bcaf99e13/src/examples/c_lib.clj
clojure
IMPORTANT! Must be done before calling loadlib, preferrably on command line c_lib can't really name it list (loadlib c_lib) set alignment to match the C code (packed) force read. Should this really be necessary? ; I wish this forced a read force read
( System / setProperty " jna.library.path " " your / lib / path / here " ) (ns examples.c-lib (:use [clj-native.direct :only [defclib loadlib typeof]] [clj-native.structs :only [byref byval]] [clj-native.callbacks :only [callback]])) (defclib (:libname "c_lib") (:structs (struct1 :x int :y...
7a722ac4879a9379e11c1a0b63029f9bcd0eea444f43610d79d41072253eb44f
input-output-hk/ouroboros-network
Block.hs
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCard...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/17889be3e1b6d9b5ee86022b91729837051e6fbb/ouroboros-consensus-byron/src/Ouroboros/Consensus/Byron/Ledger/Block.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # * Hash * Block * Header * Dealing with EBBs * Low-level API ------------------------------------------------------------------------------ Header hash ------------------------------------------...
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Ouroboros.Consensus.Byron....
194efc6817a3ad525677f180c8a80b1e78008cd8340c7cbecd0110d2bba0ed41
g-andrade/backwater
backwater_header_params.erl
Copyright ( c ) 2017 - 2022 < > %% %% 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, publis...
null
https://raw.githubusercontent.com/g-andrade/backwater/dd0cfa249e96df6f238be4c1f8af721ebfb7028e/src/backwater_header_params.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, publish, distribute, sublicense, Software is furnished to do so, subject to the following conditions: The above copyright not...
Copyright ( c ) 2017 - 2022 < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS ...
95382ea1db02b9e0faa401f3d3879ac6b64c5d13d38f657a1f2365f074b42bc7
haroldcarr/learn-haskell-coq-ml-etc
hw04.hs
Created : 2014 Oct 26 ( Sun ) 09:22:44 by . Last Modified : 2014 Nov 02 ( Sun ) 21:50:27 by . Created : 2014 Oct 26 (Sun) 09:22:44 by Harold Carr. Last Modified : 2014 Nov 02 (Sun) 21:50:27 by Harold Carr. -} import Data.Char import Test.HUnit as T import Test...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2014-10-edx-delft-fp101x-intro-to-fp-erik-meijer/hw04.hs
haskell
HOMEWORK 4 ---------------------------------------------------------------------------- EXERCISE 0 ---------------------------------------------------------------------------- r1 n a = [True | _ <- [1 .. n]] -- doesn't type check r2 n a = [ n | _ <- [1 .. n]] -- ditto r3 n a = [ a | _ <- [1 .. a]] -- ditto ---...
Created : 2014 Oct 26 ( Sun ) 09:22:44 by . Last Modified : 2014 Nov 02 ( Sun ) 21:50:27 by . Created : 2014 Oct 26 (Sun) 09:22:44 by Harold Carr. Last Modified : 2014 Nov 02 (Sun) 21:50:27 by Harold Carr. -} import Data.Char import Test.HUnit as T import Test...
3a73f7df4cba98ee1613a9a16ad0a95dd2cf35a3f8d419d555cc9f4ebb657129
walkable-server/walkable
core_test.cljc
(ns walkable.core-test (:require [walkable.core :as sut] [walkable.sql-query-builder.floor-plan :as floor-plan] [clojure.test :as t :refer [deftest is]] [com.wsscode.pathom.core :as p] [com.wsscode.pathom.connect :as pc])) #_(deftest process-children-test (is (= (sut...
null
https://raw.githubusercontent.com/walkable-server/walkable/dcae702f52d630c3ca435d846f4991c93212e434/test/walkable/core_test.cljc
clojure
(ns walkable.core-test (:require [walkable.core :as sut] [walkable.sql-query-builder.floor-plan :as floor-plan] [clojure.test :as t :refer [deftest is]] [com.wsscode.pathom.core :as p] [com.wsscode.pathom.connect :as pc])) #_(deftest process-children-test (is (= (sut...
f15da75375243b3d42b57797ca29c298a5f71252019efaf46d98dfeacd819131
eareese/htdp-exercises
077-definitions-clock.rkt
Provide a structure type definition and a data definition for representing points in time since midnight . A point in time consists of three numbers : hours , minutes , and seconds . Timepoint is ( make - timepoint Number Number Number ) (define-struct timepoint [hours minutes seconds]) Timepoint represents a po...
null
https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part01-fixed-size-data/077-definitions-clock.rkt
racket
Provide a structure type definition and a data definition for representing points in time since midnight . A point in time consists of three numbers : hours , minutes , and seconds . Timepoint is ( make - timepoint Number Number Number ) (define-struct timepoint [hours minutes seconds]) Timepoint represents a po...
435eb2e674478e991285732dd0934e6b12c1e125613647e0695a51135064c74b
clojure-emacs/haystack
java.cljc
(ns haystack.parser.java "Parser for stacktraces in the Java format." {:added "0.1.0" :author "r0man"} (:require [clojure.edn :as edn] [haystack.parser.util :as util] [instaparse.core #?(:clj :refer :cljs :refer-macros) [defparser]])) (def ^:private stacktrace-start-regex "The regula...
null
https://raw.githubusercontent.com/clojure-emacs/haystack/4e1f835e2255e44d6df091918df3ddbc5b63486d/src/haystack/parser/java.cljc
clojure
(ns haystack.parser.java "Parser for stacktraces in the Java format." {:added "0.1.0" :author "r0man"} (:require [clojure.edn :as edn] [haystack.parser.util :as util] [instaparse.core #?(:clj :refer :cljs :refer-macros) [defparser]])) (def ^:private stacktrace-start-regex "The regula...
9eb40af21ab83f0eca7e19452859320b405969dc8dd8d30b76aa88a6f3a48266
0x0f0f0f/yasih
Yasih.hs
module Yasih where import Yasih.LispTypes import Yasih.Evaluator import Yasih.Environment import Yasih.LispParser import Control.Monad.Except import Data.Char (isSpace) import Data.List (isPrefixOf) Hiding try because of Parsec try usage -- |Prints out a string and immediately flush the stream. flushStr :: String ...
null
https://raw.githubusercontent.com/0x0f0f0f/yasih/d7cedc4e5b4ea5c6c59d2799bbd37524969f2467/src/Yasih.hs
haskell
|Prints out a string and immediately flush the stream. |Prints a prompt and read a line of input |Pull the code to parse, evaluate a string and trap the errors out of main Reads a list of expressions from a string, maps eval over it, checks if the result list is empty and return an empty list (nil) |Evaluate a st...
module Yasih where import Yasih.LispTypes import Yasih.Evaluator import Yasih.Environment import Yasih.LispParser import Control.Monad.Except import Data.Char (isSpace) import Data.List (isPrefixOf) Hiding try because of Parsec try usage flushStr :: String -> IO () flushStr str = putStr str >> hFlush stdout readP...
c1ef3e84328740b77a3b614155d1396535150b11cbb3618d495aa4877ec8f06c
xapi-project/xen-api
link_test_main.ml
* Copyright ( c ) Citrix Systems Inc. * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AN...
null
https://raw.githubusercontent.com/xapi-project/xen-api/47fae74032aa6ade0fc12e867c530eaf2a96bf75/ocaml/message-switch/core_test/lwt/link_test_main.ml
ocaml
* Copyright ( c ) Citrix Systems Inc. * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AN...
66e4c5130e9bd6a51ba7046c747da8244b0975e93b539b63bb3b92ad933e9e34
nuprl/gradual-typing-performance
lang.rkt
#lang scheme/base (require scribble/doclang scribble/core scribble/base scribble/sigplan scribble/latex-prefix racket/list "../private/defaults.rkt" (for-syntax scheme/base)) (provide (except-out (all-from-out scribble/doclang) #%module-begin) (all...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/scribble-lib/scribble/sigplan/lang.rkt
racket
Skip intraline whitespace to find options: The docs for the times.sty package suggests that it should not be used so maybe we want to disable it permanently (or replace it with something else). Read here for more: -archive/macros/latex/required/psnfss/psnfss2e.pdf re-defines commands.
#lang scheme/base (require scribble/doclang scribble/core scribble/base scribble/sigplan scribble/latex-prefix racket/list "../private/defaults.rkt" (for-syntax scheme/base)) (provide (except-out (all-from-out scribble/doclang) #%module-begin) (all...
7099603b77ca1231da589df1e3d6b83b9abd1c44613139303a834d8dd09fafec
grwlf/htvm
IR.hs
module HTVM.IR ( module HTVM.IR.Types , module HTVM.IR ) where import HTVM.IR.Types
null
https://raw.githubusercontent.com/grwlf/htvm/90cff0ebde0bdff3e8048a82a5b1b0d46fc7d66e/src/HTVM/IR.hs
haskell
module HTVM.IR ( module HTVM.IR.Types , module HTVM.IR ) where import HTVM.IR.Types
04aeb47c6f2cbad21b547bb815353b4a3f33d093d87684bcf57009a0f0a94c9f
abevoelker/haskellbook-solutions
exercises.hs
7.4 -- Exercises: Grab Bag 1 . they are all equivalent thanks to 's automatic currying ! 2 . -- d) 3.a ) addOneIfOdd' n = case odd n of True -> f n False -> n where f = \n -> n + 1 3.b ) addFive' = \x -> \y -> (if x > y then y else x) + 5 3.c ) mflip' f x y = f y x 7.4 -- Exercises: Vari...
null
https://raw.githubusercontent.com/abevoelker/haskellbook-solutions/9e2804940b3b45bdc1b04cfa5d536097629c9498/ch7/exercises.hs
haskell
Exercises: Grab Bag d) Exercises: Variety Pack k1 and k3 Exercises: Case Practice Exercises: Artful Dodgy Exercises: Guard Duty it still typechecks, but returns incorrect result since the 'C' clause matches earlier than it should, and now 'A' and 'B' will never match. b) Eq a => [a] c) Multiple choice d) ...
7.4 1 . they are all equivalent thanks to 's automatic currying ! 2 . 3.a ) addOneIfOdd' n = case odd n of True -> f n False -> n where f = \n -> n + 1 3.b ) addFive' = \x -> \y -> (if x > y then y else x) + 5 3.c ) mflip' f x y = f y x 7.4 1.a ) k :: (a, b) -> a 1.b ) k2 :: [Char]...
ed75cb8bdbd94238273553f75261298350fb12c2a2f059630a9a494cd0551a78
thierry-martinez/stdcompat
int32.mli
val zero : int32 val one : int32 val minus_one : int32 external neg : int32 -> int32 = "%int32_neg" external add : int32 -> int32 -> int32 = "%int32_add" external sub : int32 -> int32 -> int32 = "%int32_sub" external mul : int32 -> int32 -> int32 = "%int32_mul" external div : int32 -> int32 -> int32 = "%int32_div" exte...
null
https://raw.githubusercontent.com/thierry-martinez/stdcompat/83d786cdb17fae0caadf5c342e283c3dcfee2279/interfaces/3.07/int32.mli
ocaml
val zero : int32 val one : int32 val minus_one : int32 external neg : int32 -> int32 = "%int32_neg" external add : int32 -> int32 -> int32 = "%int32_add" external sub : int32 -> int32 -> int32 = "%int32_sub" external mul : int32 -> int32 -> int32 = "%int32_mul" external div : int32 -> int32 -> int32 = "%int32_div" exte...
af8f6bc8525209d0ad0521afe7e1c1588a3cb240b446fd7884b3bb4adbbb3433
bmeurer/ocamljit2
test_ratios.ml
open Test;; open Nat;; open Big_int;; open Ratio;; open Arith_status;; set_error_when_null_denominator false ;; let infinite_failure = "infinite or undefined rational number";; testing_function "create_ratio" ;; let r = create_ratio (big_int_of_int 1) (big_int_of_int (-2)) in test 1 eq_big_int (numerator_ratio r, b...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testsuite/tests/lib-num/test_ratios.ml
ocaml
PR#4566
open Test;; open Nat;; open Big_int;; open Ratio;; open Arith_status;; set_error_when_null_denominator false ;; let infinite_failure = "infinite or undefined rational number";; testing_function "create_ratio" ;; let r = create_ratio (big_int_of_int 1) (big_int_of_int (-2)) in test 1 eq_big_int (numerator_ratio r, b...
ea62c3e956b8bb6a028aeffe3e63befe4bd4e8103dc978662e0775d6979a125d
jyh/metaprl
itt_mpoly2.mli
extends Itt_list2 extends Itt_ring_uce open Basic_tactics type var_set val empty : unit -> var_set val add : var_set -> term -> var_set val find_index : var_set -> term -> int option val vars_of_term : var_set -> term -> term -> var_set val var_list : var_set -> term list (* * RESOURCES USED BY standardizeT *) r...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/applications/algebra/itt_mpoly2.mli
ocaml
* RESOURCES USED BY standardizeT
extends Itt_list2 extends Itt_ring_uce open Basic_tactics type var_set val empty : unit -> var_set val add : var_set -> term -> var_set val find_index : var_set -> term -> int option val vars_of_term : var_set -> term -> term -> var_set val var_list : var_set -> term list resource (term * conv, conv) mpoly_eval va...
c9de80af7fafffc4a02b7fda640cf6393b1b576eaee59e1684d1061d6214f9d7
jgrodziski/keycloak-clojure
meta.clj
;; This code was automatically generated by the 'metav' library. (ns keycloak.meta) (def module-name "keycloak-clojure") (def path ".") (def version "1.29.1") (def tag "v1.29.1") (def generated-at "2023-02-09T18:23:53Z")
null
https://raw.githubusercontent.com/jgrodziski/keycloak-clojure/fb632d3a5a41e11835eddd124af9a7b0feaa30bb/src/keycloak/meta.clj
clojure
This code was automatically generated by the 'metav' library.
(ns keycloak.meta) (def module-name "keycloak-clojure") (def path ".") (def version "1.29.1") (def tag "v1.29.1") (def generated-at "2023-02-09T18:23:53Z")
a6a4c777765660604ca4ed300845abd2bedc83bbd3803807d2b1d270c3d6cb71
Ptival/chick
JSON.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE NoMonomorphismRestriction # module Snap.Extras.JSON ( -- * Sending JSON Data writeJSON, ) where import Data.Aeson as A (ToJSON, encode) import Snap.Core (MonadSnap, modifyResponse, setHeader, writeLBS) -- | Mark response as 'application/json' jsonResponse :: Mon...
null
https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/Snap/Extras/JSON.hs
haskell
# LANGUAGE OverloadedStrings # * Sending JSON Data | Mark response as 'application/json' | Set MIME to 'application/json' and write given object into 'Response' body.
# LANGUAGE NoMonomorphismRestriction # module Snap.Extras.JSON writeJSON, ) where import Data.Aeson as A (ToJSON, encode) import Snap.Core (MonadSnap, modifyResponse, setHeader, writeLBS) jsonResponse :: MonadSnap m => m () jsonResponse = modifyResponse $ setHeader "Content-Type" "application/json" writeJSO...
af047ab6406bd4d9e2623a900f87a6d869b886d428142da2f40d987c525490df
CodyReichert/qi
corman.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL ; Base : 10 -*- $ Header : /usr / local / cvsrep / cl - fad / corman.lisp , v 1.5 2009/09/30 14:23:09 edi Exp $ Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved . ;;; Redistribution and use in source and binary forms, with or without ;;; modific...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cl-fad-master/corman.lisp
lisp
Syntax : COMMON - LISP ; Package : CL ; Base : 10 -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the follow...
$ Header : /usr / local / cvsrep / cl - fad / corman.lisp , v 1.5 2009/09/30 14:23:09 edi Exp $ Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package :...
b8f6b428580e938abf20a49e8722c17965e46b7c23c34de4d94c350eac5e5386
2600hz/kazoo
teletype_password_recovery.erl
%%%----------------------------------------------------------------------------- ( C ) 2015 - 2020 , 2600Hz %%% @doc @author %%% 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 /. %%% %%% ...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/applications/teletype/src/templates/teletype_password_recovery.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- Gather data for template Populate templates
( C ) 2015 - 2020 , 2600Hz @author 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 /. -module(teletype_password_recovery). -export([init/0 ,handle_req/1 ]). -include("tel...
55fa4444aaea664ff0b2dd4d1e479405e484ff541430b141e8e19c0be3659f5a
mishun/tangles
CableAlgebra.hs
# LANGUAGE DataKinds , GADTs , KindSignatures , ScopedTypeVariables # module Math.Topology.KnotTh.Algebra.PlanarAlgebra.CableAlgebra ( CableAlgebra , packCable , unpackCable ) where import GHC.TypeLits import Data.Proxy import Text.Printf import Math.Topology.KnotTh.Algebra import Math.Topology.KnotTh....
null
https://raw.githubusercontent.com/mishun/tangles/9af39dd48e3dcc5e3944f8d060c8769ff3d81d02/src/Math/Topology/KnotTh/Algebra/PlanarAlgebra/CableAlgebra.hs
haskell
# LANGUAGE DataKinds , GADTs , KindSignatures , ScopedTypeVariables # module Math.Topology.KnotTh.Algebra.PlanarAlgebra.CableAlgebra ( CableAlgebra , packCable , unpackCable ) where import GHC.TypeLits import Data.Proxy import Text.Printf import Math.Topology.KnotTh.Algebra import Math.Topology.KnotTh....
9e432db9669b65c44139b4bc38b459491bb3077a38e51c4548da8e2e48fecd45
diskuv/dkml-c-probe
test_c_conf.ml
(******************************************************************************) Copyright 2022 Diskuv , Inc. (* *) Licensed under the Apache License , Version 2.0 ( the " License " ) ; ...
null
https://raw.githubusercontent.com/diskuv/dkml-c-probe/c852632a1c091ed212c8af13b4544294cfe03e4b/src/tests/test_c_conf.ml
ocaml
**************************************************************************** you may not use this file except in compliance with the License. You may obtain a copy of the License at ...
Copyright 2022 Diskuv , Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , open OUnit2 open Dkml_c_probe.C_conf let getenv = function | "CP_GMP_LIN...
12872ee779fd909d09aca35327e45e6ba86ff6e74cb1a04fb29db2a1249a52b0
valderman/haste-compiler
BitOps.hs
module Tests.BitOps where import Data.Word import Data.Bits # NOINLINE num # num :: Word num = 0xffffffff # NOINLINE int # int :: Int int = -1 runTest :: IO [String] runTest = return [ show (num .&. num), show (num .|. num), show (num `xor` num), show ((num .&. 0xffff) `shiftL` 2), show (num `shiftR` 3), ...
null
https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/Tests/BitOps.hs
haskell
module Tests.BitOps where import Data.Word import Data.Bits # NOINLINE num # num :: Word num = 0xffffffff # NOINLINE int # int :: Int int = -1 runTest :: IO [String] runTest = return [ show (num .&. num), show (num .|. num), show (num `xor` num), show ((num .&. 0xffff) `shiftL` 2), show (num `shiftR` 3), ...
2bbfe7d5e8c4bd50f919e0397930bc52f555cb2f91b1cbecb878f72ce36183bc
wireless-net/erlang-nommu
zip.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2006 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Publi...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/stdlib/src/zip.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitatio...
Copyright Ericsson AB 2006 - 2013 . 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(zip). -export([unzip/1, unzip/2, e...
5f367c63cf8da1f1e743479f4ed8bfe0cee162241c97ee9895d419bf3fba4601
agrostis/diff-match-patch
package.lisp
Google Diff , Match and Patch library by Ported into Common Lisp by , with modifications ;;;; Original project: see -diff-match-patch/ Copyright 2006 Google Inc. Copyright 2016 ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance wit...
null
https://raw.githubusercontent.com/agrostis/diff-match-patch/c15ffab4356ccfaf9869be5c757b2e432eba74f0/package.lisp
lisp
Original project: see -diff-match-patch/ 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...
Google Diff , Match and Patch library by Ported into Common Lisp by , with modifications Copyright 2006 Google Inc. Copyright 2016 distributed under the License is distributed on an " AS IS " BASIS , (cl:defpackage #:diff-match-patch (:nicknames #:dmp) (:use #:cl #:iterate) (:export #:*diff-time...
b5890b5fba873e51384c41f1444e8f25ba6f3ef9ef05a45172eb1992cae38e9b
2600hz/kazoo
cb_limits.erl
%%%----------------------------------------------------------------------------- ( C ) 2011 - 2020 , 2600Hz %%% @doc @author %%% 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 /. %%% %%% ...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/applications/crossbar/src/modules/cb_limits.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- ============================================================================= API ===================================================================...
( C ) 2011 - 2020 , 2600Hz @author 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 /. -module(cb_limits). -export([init/0 ,allowed_methods/0 ,resource_exists/0 ,va...
8bc4f171e498a63f8e6524e187f266a261e23b46907feabd256318b9096dff2b
thi-ng/geom
utils.cljc
(ns thi.ng.geom.utils #?(:cljs (:require-macros [thi.ng.math.macros :as mm])) (:require [thi.ng.geom.core :as g] [thi.ng.geom.vector :as v :refer [vec2 vec3 V2 V3]] #?(:clj [thi.ng.geom.types] :cljs [thi.ng.geom.types :refer [AABB Circle2 Rect2 Sphere]]) [thi.ng.dstruct.core :as d] [thi.ng...
null
https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/src/thi/ng/geom/utils.cljc
clojure
Bounds Sampling Interpolation d +----+ c | | | | a +----+ b e +----+ h |f+----+ g | | : | a +-|--+d| \| \| b +----+ c Tessellation Normals Triangles Bounds (w/ types) Meshes TODO how to use this w/ IndexedMesh? Faces only store vertex IDs
(ns thi.ng.geom.utils #?(:cljs (:require-macros [thi.ng.math.macros :as mm])) (:require [thi.ng.geom.core :as g] [thi.ng.geom.vector :as v :refer [vec2 vec3 V2 V3]] #?(:clj [thi.ng.geom.types] :cljs [thi.ng.geom.types :refer [AABB Circle2 Rect2 Sphere]]) [thi.ng.dstruct.core :as d] [thi.ng...
a6dd5af06e388a4696d68cf190f635dfcdb14e9d5a7e6b2e93e2d798a3bbd07a
evdubs/renegade-way
bull-pullback.rkt
#lang racket/base (require racket/stream racket/vector "../structs.rkt" "../technical-indicators.rkt") (provide bull-pullback-entry) (struct bull-pullback-in (dohlc sma-20 sma-20-slope sma-50 sma-50-slope satr-50 dc-20-high dc-20-low) #:transparent) (define (bull-...
null
https://raw.githubusercontent.com/evdubs/renegade-way/003dcf4afa04799d027e376f425b13b6dfcd1f9e/pattern/bull-pullback.rkt
racket
history market data inputs found satisfactory conditions for entry no satisfactory conditions
#lang racket/base (require racket/stream racket/vector "../structs.rkt" "../technical-indicators.rkt") (provide bull-pullback-entry) (struct bull-pullback-in (dohlc sma-20 sma-20-slope sma-50 sma-50-slope satr-50 dc-20-high dc-20-low) #:transparent) (define (bull-...
ed0842985981f839495383b521bc6836215bfe90d44eb7e702b077e54d98cd69
mbillingr/lisp-in-small-pieces
exercise1-09.scm
(import (builtin core) (libs utils)) (define (evaluate e env) (if (atom? e) (cond ((symbol? e) (lookup e env)) ((or (number? e) (string? e) (char? e) (boolean? e)) e) (else (wrong "Cannot evaluate" e))) (case (car e) ((quote) (cadr e)) ((if) (if (not ...
null
https://raw.githubusercontent.com/mbillingr/lisp-in-small-pieces/b2b158dfa91dc95d75af4bd7d93f8df22219047e/01-basics/exercise1-09.scm
scheme
(set! fib (lambda (n) (if (< n 2) 1 (+ (fib (- n 1)) (fib (- n 2))))))
(import (builtin core) (libs utils)) (define (evaluate e env) (if (atom? e) (cond ((symbol? e) (lookup e env)) ((or (number? e) (string? e) (char? e) (boolean? e)) e) (else (wrong "Cannot evaluate" e))) (case (car e) ((quote) (cadr e)) ((if) (if (not ...
b85bd2d0ec33008f0694d964cb9d3576e5afa4b889d13911ab04a16b0ab8c71b
serokell/qtah
QMetaObject.hs
This file is part of Qtah . -- Copyright 2015 - 2018 The Qtah Authors . -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your option) ...
null
https://raw.githubusercontent.com/serokell/qtah/abb4932248c82dc5c662a20d8f177acbc7cfa722/qtah-generator/src/Graphics/UI/Qtah/Generator/Interface/Core/QMetaObject.hs
haskell
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by (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 MER...
This file is part of Qtah . Copyright 2015 - 2018 The Qtah Authors . the Free Software Foundation , either version 3 of the License , or GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License module Graphics.UI.Qtah.Generator.Interface.Co...
b357bb41a34f9609196a768e86429d2aca67b13fcf517cf385c398e13c575eae
edersoncorbari/small-bank
utility.clj
;; Author: Ederson Corbari <ecorbari at protonmail.com> Created : 05.11.2018 (ns duck.utility "Namespace containing utility and validations of date, numbers, etc..." {:doc/format :markdown} (:require [clj-time.core :as time] [clj-time.format :as format])) (defn date? "Check the date patter...
null
https://raw.githubusercontent.com/edersoncorbari/small-bank/4203b5915ce5b044afc500479e6bcc0c7f413303/src/duck/utility.clj
clojure
Author: Ederson Corbari <ecorbari at protonmail.com>
Created : 05.11.2018 (ns duck.utility "Namespace containing utility and validations of date, numbers, etc..." {:doc/format :markdown} (:require [clj-time.core :as time] [clj-time.format :as format])) (defn date? "Check the date pattern by applying the regular expression. Default: DD/MM/YYYY....
d3413170dd241bedce869fe3a7d70eedf3565bf49185e0356ade47974a695912
bobzhang/ocaml-book
myocamlbuild.ml
open Ocamlbuild_plugin open Command let run_and_read = Ocamlbuild_pack.My_unix.run_and_read let blank_sep_strings = Ocamlbuild_pack.Lexers.blank_sep_strings let find_packages () = blank_sep_strings & Lexing.from_string & run_and_read "ocamlfind list | cut -d' ' -f1" * ocamlfind can only handle these tw...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/camlp4/code/edsl/myocamlbuild.ml
ocaml
* list extensions, but not used here * for pa_ulex, you must create the symbol link by yourself (fun _ -> dep ["ocamldep"; "file:test/test_string.ml"] ["test/test_data/string.txt"; "test/test_data/char.txt"]) +> after_rules; (fun _ -> dep ["file:test/test_string.byte"] ["test/test_data/string.t...
open Ocamlbuild_plugin open Command let run_and_read = Ocamlbuild_pack.My_unix.run_and_read let blank_sep_strings = Ocamlbuild_pack.Lexers.blank_sep_strings let find_packages () = blank_sep_strings & Lexing.from_string & run_and_read "ocamlfind list | cut -d' ' -f1" * ocamlfind can only handle these tw...
8335c229696c9b7f32321d8653a61b932172c4ef9613344788a5133a3554ce58
dongweiming/lisp-koans-answer
unused-test-ideas.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/unused-test-ideas.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 , '(define-test test-nconc "nconc like append attaches one list to the end of the other, but it does so in a more efficient, but potentially destructive way. Lisp lists are nil terminated. A symbol re...
a37cf98a5a1ad7fdb1ab1e5c30d0e0aed6086b02ec3503508761d43922c46ae7
ndmitchell/supero
Example3.hs
module Example3 where main f x = map f (map head x)
null
https://raw.githubusercontent.com/ndmitchell/supero/a8b16ea90862e2c021bb139d7a7e9a83700b43b2/example/Example3.hs
haskell
module Example3 where main f x = map f (map head x)
eb983c8c830eb6c27d40fc3a4a6c1b75a65c33bd7e3ef17799fddbddc57f1a6c
spechub/Hets
Analysis_DFOL.hs
| Module : ./DFOL / Analysis_DFOL.hs Description : Static analysis for first - order logic with dependent types ( DFOL ) Copyright : ( c ) , DFKI Bremen 2009 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable Mo...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/DFOL/Analysis_DFOL.hs
haskell
static analysis of basic specifications static analysis for symbols lists static analysis for symbol map lists BASIC SPEC ANALYSIS SIGNATURES make a new signature out of a basic spec and an input signature adds a list of annotated basic items to an input signature adds a declaration to an existing signature ma...
| Module : ./DFOL / Analysis_DFOL.hs Description : Static analysis for first - order logic with dependent types ( DFOL ) Copyright : ( c ) , DFKI Bremen 2009 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable Mo...
98bd0ca286845dfe88ab6200cf4427d46dcde5166a5fecff0bbf76e0edf2daa3
runtimeverification/haskell-backend
RewritingVariable.hs
module Test.Kore.Rewrite.RewritingVariable ( test_FreshPartialOrd_RewritingVariableName, test_FreshPartialOrd_SomeVariableName_RewritingVariableName, ) where import Hedgehog import Hedgehog.Gen qualified as Gen import Kore.Rewrite.RewritingVariable import Kore.Syntax.Variable import Pair import Prelude.Kore im...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/b06757e252ee01fdd5ab8f07de2910711997d845/kore/test/Test/Kore/Rewrite/RewritingVariable.hs
haskell
module Test.Kore.Rewrite.RewritingVariable ( test_FreshPartialOrd_RewritingVariableName, test_FreshPartialOrd_SomeVariableName_RewritingVariableName, ) where import Hedgehog import Hedgehog.Gen qualified as Gen import Kore.Rewrite.RewritingVariable import Kore.Syntax.Variable import Pair import Prelude.Kore im...
b48a87bc38943238ac00b4c5fa1d612ff7d06d7c4d9864a0f57093917b9656f9
msakai/toysolver
Util.hs
# OPTIONS_GHC -Wall # ----------------------------------------------------------------------------- -- | Module : ToySolver . Combinatorial . HittingSet . Util Copyright : ( c ) 2012 - 2014 -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -...
null
https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/src/ToySolver/Combinatorial/HittingSet/Util.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style Maintainer : Stability : provisional Portability : portable ---------------------------------------------------------------------------
# OPTIONS_GHC -Wall # Module : ToySolver . Combinatorial . HittingSet . Util Copyright : ( c ) 2012 - 2014 module ToySolver.Combinatorial.HittingSet.Util ( maintainNoSupersets ) where import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet maintainNoSupersets :: [IntSet] -> [IntSet] ...
3d8c79994fd203e41a5b7a6f4330403889275109150b93785726351612ceca2d
oasis-open/openc2-lycan-beam
hahax1_app.erl
%%%------------------------------------------------------------------- Copyright ( c ) 2018 , , sFractal Consulting MIT License %%% 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...
null
https://raw.githubusercontent.com/oasis-open/openc2-lycan-beam/c8a580eb79a46cb3fa7db0d6576bfa23eb78c943/haha/erlang/hahax1/apps/hahax1/src/hahax1_app.erl
erlang
------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or Software ...
Copyright ( c ) 2018 , , sFractal Consulting MIT License ( the " Software " ) , to deal in the Software without restriction , sell copies of the Software , and to permit persons to whom the shall be included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WI...
f1b0e7e7a9705d264b3a564662c68d3de1bb17d9d61363ef897b1e40ac3539a8
folivetti/ITEA
Regression.hs
# LANGUAGE TypeFamilies # | Module : Example . Regression Description : Example of usage for Symbolic Regression Copyright : ( c ) , 2020 License : GPL-3 Maintainer : Stability : experimental Portability : POSIX Function to execute ITEA Module : Example.Regression Descrip...
null
https://raw.githubusercontent.com/folivetti/ITEA/0195f3ada1bcf0eb5a435b0d9bb8f69476e63a39/src/ITEA/Regression.hs
haskell
| Support function for running ITEA random seed training and test datasets configuration of mutation operators population size generations Create the fitness function for the training and test set create the mutation function create the report evaluate a lazy stream of infinity generations
# LANGUAGE TypeFamilies # | Module : Example . Regression Description : Example of usage for Symbolic Regression Copyright : ( c ) , 2020 License : GPL-3 Maintainer : Stability : experimental Portability : POSIX Function to execute ITEA Module : Example.Regression Descrip...
cd5c627ffb96cf8eb7c1c3b42fec35b023992a7d1a99aeefa07c601162fac762
tonatona-project/tonatona
Renames.hs
module Tonalude.Prelude.Renames ( sappend , LByteString , LText , UVector , SVector , GVector , toStrictBytes , fromStrictBytes ) where import RIO
null
https://raw.githubusercontent.com/tonatona-project/tonatona/b6b67bf0f14d345c01dcf9ea7870b657891f032c/tonalude/src/Tonalude/Prelude/Renames.hs
haskell
module Tonalude.Prelude.Renames ( sappend , LByteString , LText , UVector , SVector , GVector , toStrictBytes , fromStrictBytes ) where import RIO
0551fe2e359ded2e8ff5152c954791789da304361c14a180e993dba6f0d47876
camlp5/camlp5
parsetree.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_stuff/4.03.1/parsing/parsetree.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Asttypes type constant = Pconst_integer of string * char option 3 3l 3L 3n Suffixes ...
7dcd44c7893d5bd6e59247e5ef21138f5c75c288982131927076e65425d59585
hyperledger-archives/fabric-chaintool-original
write.clj
Copyright London Stock Exchange Group 2016 All Rights 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...
null
https://raw.githubusercontent.com/hyperledger-archives/fabric-chaintool-original/fb214f89d0d6eb36e997f1c352c3320f55e2e55f/src/chaintool/car/write.clj
clojure
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 ...
Copyright London Stock Exchange Group 2016 All Rights Reserved . distributed under the License is distributed on an " AS IS " BASIS , (ns chaintool.car.write (:require [chaintool.car.types :refer :all] [chaintool.codecs :as codecs] [chaintool.util :as util] [clojure.java.io :a...
53465f69673c2fc5021ffb8ea723327dfc0100df222d0772cd5ec399d8f42ea1
hanshuebner/bos
poi-handlers.lisp
(in-package :bos.web) (enable-interpol-syntax) ;;; make-poi-handler (defclass make-poi-handler (page-handler) ()) (defmethod handle ((handler make-poi-handler)) (with-query-params (name) (cond ((find-store-object name :class 'poi) (with-bos-cms-page (:title "Duplicate POI name") (html (...
null
https://raw.githubusercontent.com/hanshuebner/bos/ab5944cc46f4a5ff5a08fd8aa4d228c0f9cfc771/web/poi-handlers.lisp
lisp
make-poi-handler edit-poi-handler only if this exchange has not already happened published-web=on~]&~:[~;published-earth=on~]" edit-poi-medium-handler poi-javascript-handler poi-xml-handler poi-kml-handler images titles poi-kml-all-handler (sax:processing-instruction cxml::*sink* "xml-stylesheet" "href=\"/st...
(in-package :bos.web) (enable-interpol-syntax) (defclass make-poi-handler (page-handler) ()) (defmethod handle ((handler make-poi-handler)) (with-query-params (name) (cond ((find-store-object name :class 'poi) (with-bos-cms-page (:title "Duplicate POI name") (html (:h2 "Duplicate POI na...
8320d6c6261bf0e37aa1de98ea64b173316cf53238f6157a72334d5dcb18ec23
mbudde/jana
Ast.hs
module Jana.Ast where import Text.Parsec.Pos -- Data types data Type = Int SourcePos | Stack SourcePos | BoolT SourcePos instance Eq Type where (Int _) == (Int _) = True (Stack _) == (Stack _) = True (BoolT _) == (BoolT _) = True _ == _ = False -- Identifier data Ident = Id...
null
https://raw.githubusercontent.com/mbudde/jana/5b51b57e0b6f13ec1e1c61d719a18bf58696f84b/src/Jana/Ast.hs
haskell
Data types Identifier Left-value Modification operators used in assignment += -= ^= Binary operators Arithmetic (+ - * / %) Binary (& | ^) Logical (&& ||) Relational (> < = != >= <=) Statement Declaration Main procedure Procedure definition
module Jana.Ast where import Text.Parsec.Pos data Type = Int SourcePos | Stack SourcePos | BoolT SourcePos instance Eq Type where (Int _) == (Int _) = True (Stack _) == (Stack _) = True (BoolT _) == (BoolT _) = True _ == _ = False data Ident = Ident String SourcePos instan...
54f5df29ab69954f21698388af2aa2ec8b281f75f1cce26d505af60d0426e1b4
racket/typed-racket
optional-shallow-id-1.rkt
#; (exn-pred exn:fail:contract? #rx"sym") #lang typed/racket/base/shallow (module uuu racket/base (provide bad-sym) (define bad-sym #f)) (module opt typed/racket/base/optional (require/typed (submod ".." uuu) ((bad-sym -bad-sym) Symbol)) (define bad-sym -bad-sym) (provide bad-sym)) (require 'opt) bad-s...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/fail/optional/optional-shallow-id-1.rkt
racket
(exn-pred exn:fail:contract? #rx"sym") #lang typed/racket/base/shallow (module uuu racket/base (provide bad-sym) (define bad-sym #f)) (module opt typed/racket/base/optional (require/typed (submod ".." uuu) ((bad-sym -bad-sym) Symbol)) (define bad-sym -bad-sym) (provide bad-sym)) (require 'opt) bad-sym
37c76fea1f7c2a89dab377b9de2b2db69c60c9a5633a0f2faf37d9cba6a0a87d
fakedata-haskell/fakedata
GamesSpec.hs
# LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} module GamesSpec where import Control.Monad.Catch import Control.Monad.IO.Class import qualified Data.Map as M import Data.Text hiding (all, map) import qualified Data.Text as T import qualified Data.Text.IO as TIO import Data.Vector (Vector) import ...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/ea938c38845b274e28abe7f4e8e342f491e83c89/test/GamesSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables # module GamesSpec where import Control.Monad.Catch import Control.Monad.IO.Class import qualified Data.Map as M import Data.Text hiding (all, map) import qualified Data.Text as T import qualified Data.Text.IO as TIO import Data.Vector (Vector) import qualified Data.Vector as V import F...
0366cb54b5020fc9f8b734c4b5b1abe5055cf238aa751f38a65f3f46cb379701
openvstorage/alba
alba_client.ml
Copyright ( C ) iNuron - This file is part of Open vStorage . For license information , see < LICENSE.txt > Copyright (C) iNuron - This file is part of Open vStorage. For license information, see <LICENSE.txt> *) open! Prelude open Fragment_cache open Alba_statistics open Alba_client_errors open Lwt.In...
null
https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/alba_client.ml
ocaml
Download probably failed because of stale manifest Fragment cache needs no invalidation as keys are globally unique
Copyright ( C ) iNuron - This file is part of Open vStorage . For license information , see < LICENSE.txt > Copyright (C) iNuron - This file is part of Open vStorage. For license information, see <LICENSE.txt> *) open! Prelude open Fragment_cache open Alba_statistics open Alba_client_errors open Lwt.In...
741e1e11ed856ed56c3173ed357a2180d31e6d76e70e87c76c32ce2639b796e6
serokell/ariadne
Bip32.hs
-- | Helpers to work with BIP-32 implementation in Cardano. module Ariadne.Wallet.Cardano.Kernel.Bip32 ( DerivationPath (..) , deriveHDSecretKeyByPath , makePubKeyHdwAddressUsingPath ) where import Named ((:!), pattern Arg) import Cardano.Crypto.Wallet.Types (DerivationIndex) import Pos.C...
null
https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ariadne/cardano/src/Ariadne/Wallet/Cardano/Kernel/Bip32.hs
haskell
| Helpers to work with BIP-32 implementation in Cardano. direct descendant. check passphrase at most once internally using derivation path and root public key.
module Ariadne.Wallet.Cardano.Kernel.Bip32 ( DerivationPath (..) , deriveHDSecretKeyByPath , makePubKeyHdwAddressUsingPath ) where import Named ((:!), pattern Arg) import Cardano.Crypto.Wallet.Types (DerivationIndex) import Pos.Core.Common (Address, IsBootstrapEraAddr(..), makePubKeyHdwAd...
f4720ff73854591ceeeb7e4a4a68e1740e887e46c121c73ac8fdb00abc5119f1
bburdette/chordster
DeleteOscDest.hs
module Handler.DeleteOscDest where import Import getDeleteOscDestR :: OSCDestId -> Handler Html getDeleteOscDestR odid= do _ <- runDB $ delete odid redirect OscDestsR
null
https://raw.githubusercontent.com/bburdette/chordster/70d235f1ca379e5ecd4a8f39dc1e734e2d50978b/Handler/DeleteOscDest.hs
haskell
module Handler.DeleteOscDest where import Import getDeleteOscDestR :: OSCDestId -> Handler Html getDeleteOscDestR odid= do _ <- runDB $ delete odid redirect OscDestsR
39e130b2267154adceeb089e2efa7f8b11ffb5103bb83afdce3fd5a23e684002
rabbitmq/rmq-0mq
r0mq_service.erl
-module(r0mq_service). A gen_server that manages a 0MQ socket and an AMQP connection , %% and responds to incoming messages on each. -behaviour(gen_server). -include_lib("amqp_client/include/amqp_client.hrl"). -record(state, {connection, channel, service_module, ser...
null
https://raw.githubusercontent.com/rabbitmq/rmq-0mq/63456e25d30015da7b4e1f3ea74f1039e0c4af31/src/r0mq_service.erl
erlang
and responds to incoming messages on each. interface gen_server callbacks Procedures for controlling a listener -- Interface -- TODO: options? connect(Listener, Address) -> Bind the listener to an interface bind(Listener, Address) -> -- Callbacks -- -- Callbacks -- TODO termination protocol for service module...
-module(r0mq_service). A gen_server that manages a 0MQ socket and an AMQP connection , -behaviour(gen_server). -include_lib("amqp_client/include/amqp_client.hrl"). -record(state, {connection, channel, service_module, service_params, sock}). -export(...
3ae7019cb22e3bd07191fd6b4c6609f63e0b29cafbe6ea818344385aedae4ca4
aliaksandr-s/prototyping-with-clojure
navbar.cljs
(ns visitera.components.navbar (:require [reagent.core :as r])) (defn navbar [] (r/with-let [expanded? (r/atom false)] [:nav.navbar.is-primary>div.container [:div.navbar-brand [:a.navbar-item {:href "/" :style {:font-weight :bold}} "visitera"] [:span.navbar-burger.burger {:data-targe...
null
https://raw.githubusercontent.com/aliaksandr-s/prototyping-with-clojure/e1f90bf66c315de1dfa72624895637f1c609c42e/app/chapter-07/start/visitera/src/cljs/visitera/components/navbar.cljs
clojure
(ns visitera.components.navbar (:require [reagent.core :as r])) (defn navbar [] (r/with-let [expanded? (r/atom false)] [:nav.navbar.is-primary>div.container [:div.navbar-brand [:a.navbar-item {:href "/" :style {:font-weight :bold}} "visitera"] [:span.navbar-burger.burger {:data-targe...
a201b1fbf95bddfeedeb377681045349c5b22dc049c79369c59e0dedd1e2ff13
lispnik/cl-http
rdf.lisp
;;; -*- Package: ("XML-PARSER"); -*- "<DOCUMENTATION> <DESCRIPTION> the least one has to do in order to handle RDF is to create the symbols in order that the reader (which is still central to the xml processor) permits single-colon package qualification. </DESCRIPTION> </DOCUMENTATION> " (in-package "XML-P...
null
https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/contrib/janderson/xml-1999-05-03/rdf.lisp
lisp
-*- Package: ("XML-PARSER"); -*- not the best, but the xml spec doesn't allow this anyway
"<DOCUMENTATION> <DESCRIPTION> the least one has to do in order to handle RDF is to create the symbols in order that the reader (which is still central to the xml processor) permits single-colon package qualification. </DESCRIPTION> </DOCUMENTATION> " (in-package "XML-PARSER") (defPackage "-rdf-syntax/" ...
af7eb507f65ce0d5e84844cf2939abea12e15bcfb7ff60f02e9f514105120f40
processone/ejabberd
mod_privacy_sql.erl
%%%------------------------------------------------------------------- %%% File : mod_privacy_sql.erl Author : < > Created : 14 Apr 2016 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne %%% %%% This program is free software; you can redistribute it and/or modify it under the terms ...
null
https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/mod_privacy_sql.erl
erlang
------------------------------------------------------------------- File : mod_privacy_sql.erl 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 will be useful, but WITHOUT ANY WARRANTY; without even ...
Author : < > Created : 14 Apr 2016 by < > ejabberd , Copyright ( C ) 2002 - 2023 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 ...
0445ad98cfdea85b4ebc3168e7b10dfb50ef57a3ed378b9e3779fea374e294bf
s3team/Amoeba
bb_opaque_diversify.ml
open Visit open Type open Pp_print open Ail_utils type instr_update = SUB | INSERT class bb_opaque_diversify = (* A basic block opaque predicate diversity implementation. * Opaque Predicate Insertion: A single-predeceossor block /b/ can be substituted with a conditional branch to /b/ and its clone /b...
null
https://raw.githubusercontent.com/s3team/Amoeba/50ab9027afc2ca90fed21ecafa309a75b3e89ea2/src/plugins/diversification/bb_opaque_diversify.ml
ocaml
A basic block opaque predicate diversity implementation. * Opaque Predicate Insertion: A single-predeceossor block /b/ can be substituted with a conditional branch to /b/ and its clone /b/' using arbitrary predicate. these predicates can also guard blocks of garbage code so they never exe...
open Visit open Type open Pp_print open Ail_utils type instr_update = SUB | INSERT class bb_opaque_diversify = let dec_hex (s:int) : string = "0x"^(Printf.sprintf "%X" s) in object(self) val mutable fb_tbl = Hashtbl.create 40 val mutable instrs_update = [] val mutable locs_update = [] inhe...
eda1fe13d5928369cc388cea7115071ffb35210a3f9f23c89b7572c1edbf4f78
sionescu/static-vectors
impl-lispworks.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; --- implementation ;;; (in-package :static-vectors) (declaim (inline fill-foreign-memory)) (defun fill-foreign-memory (pointer length value) "Fill LENGTH octets in foreign memory area POINTER with VALUE." (fli:fill-foreign-object pointer :nelems length :byte ...
null
https://raw.githubusercontent.com/sionescu/static-vectors/e4bc993da01e486acc56b472468c48b5a8204240/src/impl-lispworks.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*-
--- implementation (in-package :static-vectors) (declaim (inline fill-foreign-memory)) (defun fill-foreign-memory (pointer length value) "Fill LENGTH octets in foreign memory area POINTER with VALUE." (fli:fill-foreign-object pointer :nelems length :byte value) pointer) (declaim (inline replace-foreign-mem...
9ee29bbbb5442b1e31aebe0b2ee625e4358b749661ac175cb29c5e11b22e9290
facebook/duckling
Corpus.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.AmountOfMoney.EN.NZ.Corpus ( allExamples , negativeEx...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/AmountOfMoney/EN/NZ/Corpus.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.AmountOfMoney.EN.NZ.Corpus ( allExamples , negativeExamples ) where import Data.String import Data.Text (Text) import Prelude import Duckling.AmountOfMoney.Types import Duckling.Testing.Types allExamples :: [Example] allExamples = concat [ ...
2ef99b4485747eda9611755560369cac3bcc93f19bb2ccb9c86962e2458e23a5
zcaudate-me/lein-repack
rewrite.clj
(ns leiningen.repack.split.rewrite (:require [rewrite-clj.zip :as z] [vinyasa.maven.file :refer [*sep*]])) (defn project-zip [project] (-> (z/of-file (str (:root project) *sep* "project.clj")) (z/find-value z/next 'defproject))) (defn replace-project-value [zipper key value] (if-let [pos (-> z...
null
https://raw.githubusercontent.com/zcaudate-me/lein-repack/1eb542d66a77f55c4b5625783027c31fd2dddfe5/src/leiningen/repack/split/rewrite.clj
clojure
(ns leiningen.repack.split.rewrite (:require [rewrite-clj.zip :as z] [vinyasa.maven.file :refer [*sep*]])) (defn project-zip [project] (-> (z/of-file (str (:root project) *sep* "project.clj")) (z/find-value z/next 'defproject))) (defn replace-project-value [zipper key value] (if-let [pos (-> z...