_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
04669cdbe74ffa699c046bce8b202742835a5e1f45d76fe6252bb32e0614e9e1
puppetlabs/pcp-broker
service.clj
(ns puppetlabs.pcp.testutils.service (:require [puppetlabs.trapperkeeper.core :as trapperkeeper] [puppetlabs.trapperkeeper.app :as tka] [puppetlabs.pcp.broker.service :refer [broker-service]] [puppetlabs.trapperkeeper.services.authorization.authorization-service :refer [authorizati...
null
https://raw.githubusercontent.com/puppetlabs/pcp-broker/7806c6a6045c406c256b2c9d6129382923ba3d03/test/utils/puppetlabs/pcp/testutils/service.clj
clojure
we can run a long-running instance and this one for the tests.
(ns puppetlabs.pcp.testutils.service (:require [puppetlabs.trapperkeeper.core :as trapperkeeper] [puppetlabs.trapperkeeper.app :as tka] [puppetlabs.pcp.broker.service :refer [broker-service]] [puppetlabs.trapperkeeper.services.authorization.authorization-service :refer [authorizati...
ae3a6ab2b48b5987e0b756f227633cb74903ce4ae2a5bc35c2e5f72073f88108
appleshan/cl-http
images-lispm.lisp
-*- Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : images ; Mode : lisp -*- based on the command IMAGES : SHOW - IMAGE 0(defun (2 0 (NIL 0) (NIL :BOLD NIL) "CPTFONTCB")show-image 0(image &key source-rectangle destination-position (scale 1) (stream *standard-output*)) (unless source-rectangle (multip...
null
https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/client/images-lispm.lisp
lisp
Base : 10 ; Package : images ; Mode : lisp -*- :Output destination someplace not a window. no file
based on the command IMAGES : SHOW - IMAGE 0(defun (2 0 (NIL 0) (NIL :BOLD NIL) "CPTFONTCB")show-image 0(image &key source-rectangle destination-position (scale 1) (stream *standard-output*)) (unless source-rectangle (multiple-value-bind (width height) (image-size image) (setq source-rectangle (list 0...
c42c8cce4590775ce84721b237447d029fcfe8bc7e24fa7820107c50aad85c56
mjsottile/publicstuff
Vec3.hs
{-# LANGUAGE BangPatterns #-} module Vec3 where import Rmonad data Vec3 = Vec3 !Double !Double !Double deriving Show -- -- for math, see : /~mws/rpos.html -- randVec :: Double -> DLAMonad Vec3 randVec r = do phi ranges from 0.0 to 2.0*pi z <- nextF (2.0 * r) z <- return $ z - r -- z ranges from -r to r ...
null
https://raw.githubusercontent.com/mjsottile/publicstuff/46fccc93cc62eb9de46186f53012381750fbb17b/dla3d/vectest/Vec3.hs
haskell
# LANGUAGE BangPatterns # for math, see : /~mws/rpos.html z ranges from -r to r z ranges from -r to r
module Vec3 where import Rmonad data Vec3 = Vec3 !Double !Double !Double deriving Show randVec :: Double -> DLAMonad Vec3 randVec r = do phi ranges from 0.0 to 2.0*pi z <- nextF (2.0 * r) rct <- return $ r * cos ( asin (z / r) ) return $ Vec3 (rct*(cos phi)) (rct*(sin phi)) z randVecNew :: Double -> DLAMo...
064dd2422adc1338e7454964afdfff14559af79821aa68213fc8f0daf4f36f96
janestreet/core
option.ml
open! Import include Base.Option type 'a t = 'a option [@@deriving bin_io, typerep, stable_witness] include Comparator.Derived (struct type nonrec 'a t = 'a t [@@deriving sexp_of, compare] end) let validate ~none ~some t = let module V = Validate in match t with | None -> V.name "none" (V.protect none ()...
null
https://raw.githubusercontent.com/janestreet/core/f382131ccdcb4a8cd21ebf9a49fa42dcf8183de6/core/src/option.ml
ocaml
[unsafe_value] is only safe to call when [is_none] returns [false]. To avoid repeating the [is_none] check, we declare [Unchecked_some]. [Unchecked_some x] has the same representation as [Some x], but the type has no [None] clause. We make sure all this works with tests of [unsafe_value] in test_...
open! Import include Base.Option type 'a t = 'a option [@@deriving bin_io, typerep, stable_witness] include Comparator.Derived (struct type nonrec 'a t = 'a t [@@deriving sexp_of, compare] end) let validate ~none ~some t = let module V = Validate in match t with | None -> V.name "none" (V.protect none ()...
4d2654880432f8051265ee2fe1d1d8f014b7dc4feaff1411ad41516a7fc4529a
janestreet/merlin-jst
persistent_env.ml
(**************************************************************************) (* *) (* OCaml *) (* *) , proj...
null
https://raw.githubusercontent.com/janestreet/merlin-jst/8e7d137aba91faa7f8c2afac6ffc5c5a05f793c5/src/ocaml/typing/persistent_env.ml
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Rocquencourt , projet , INRIA Saclay Copyright 2019 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Misc open Cmi_format module CU = Compilation...
77d4d0b31ea2e176e4898d68030ad43f9272e96ead657c3970d33e50c924b2b3
ghc/ghc
List.hs
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , ScopedTypeVariables # {-# LANGUAGE BangPatterns #-} # OPTIONS_GHC -Wno - incomplete - uni - patterns # ----------------------------------------------------------------------------- -- | -- Module : GHC.List Copyright : ( c ) The University of G...
null
https://raw.githubusercontent.com/ghc/ghc/a5afc8ab3c5518aebf8823ed418d404853929147/libraries/base/GHC/List.hs
haskell
# LANGUAGE BangPatterns # --------------------------------------------------------------------------- | Module : GHC.List License : see libraries/base/LICENSE Maintainer : Stability : internal The List data type and its operations ---------------------------------------------------------------...
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , ScopedTypeVariables # # OPTIONS_GHC -Wno - incomplete - uni - patterns # Copyright : ( c ) The University of Glasgow 1994 - 2002 Portability : non - portable ( GHC Extensions ) module GHC.List ( List, foldr, foldr', foldr1, foldl, fol...
df7fbad5a2cc9225bbfc1e6679b84930a71e953f0a521329b8d6ec5e0b2db9fb
ocaml-multicore/lockfree
qcheck_spsc_queue.ml
module Spsc_queue = Lockfree.Spsc_queue let keep_some l = List.filter Option.is_some l |> List.map Option.get let keep_n_first n = List.filteri (fun i _ -> i < n) let pop_n_times q n = let rec loop count acc = if count = 0 then acc else let v = Spsc_queue.pop q in Domain.cpu_relax (); loop...
null
https://raw.githubusercontent.com/ocaml-multicore/lockfree/6e686d5dfa9fe8278e9380a6e0e68b2e9d20288b/test/spsc_queue/qcheck_spsc_queue.ml
ocaml
Making sure we do not create a too big queue. Other tests are checking the behaviour of a full queue. Initialization Sequential pushed : not Full exception should be raised. Consumer domain pops Property Making sure we do not create a too big queue. Other tests are che...
module Spsc_queue = Lockfree.Spsc_queue let keep_some l = List.filter Option.is_some l |> List.map Option.get let keep_n_first n = List.filteri (fun i _ -> i < n) let pop_n_times q n = let rec loop count acc = if count = 0 then acc else let v = Spsc_queue.pop q in Domain.cpu_relax (); loop...
65dca67df9f313f46e3f04313af62774b56a345a6c7dc951f9741340a8d4993b
haskell/lsp
Test.hs
{-# LANGUAGE OverloadedStrings #-} import Control.Applicative.Combinators import Control.Monad.IO.Class import Language.LSP.Test import Language.LSP.Types main = runSession "lsp-demo-reactor-server" fullCaps "test/data/" $ do doc <- openDoc "Rename.hs" "haskell" -- Use your favourite favourite combinators. sk...
null
https://raw.githubusercontent.com/haskell/lsp/5422dd13f0362917e5981e07d60617ca6e233833/lsp-test/example/Test.hs
haskell
# LANGUAGE OverloadedStrings # Use your favourite favourite combinators. Send requests and notifications and receive responses Or use one of the helper functions
import Control.Applicative.Combinators import Control.Monad.IO.Class import Language.LSP.Test import Language.LSP.Types main = runSession "lsp-demo-reactor-server" fullCaps "test/data/" $ do doc <- openDoc "Rename.hs" "haskell" skipManyTill loggingNotification (count 1 publishDiagnosticsNotification) rsp <- ...
d2c50c7ce627f0bf80d9c206f663356f99e43f37199f7f950ef0b2a293a53cf5
vnarek/jude
tester.ml
let () = [ Binable.tests; Registry.tests; Actor.tests ] |> List.flatten |> Alcotest.run "Jude"
null
https://raw.githubusercontent.com/vnarek/jude/b1e9387d0242cd83b3b72695bce267c970de1857/lib_test/tester.ml
ocaml
let () = [ Binable.tests; Registry.tests; Actor.tests ] |> List.flatten |> Alcotest.run "Jude"
acbff4fe479f93772768bf1a1b38ec78beb192bec07efa49b9f6785c7bc70cdd
hubski/hubski
arc-utils.rkt
#lang racket (require db) (require "db.rkt") (provide list->arc-list arc-list->list bool->arc-bool arc-bool->bool ) (define (bool->arc-bool b) (if b 't 'nil)) (define (arc-bool->bool b) (if (equal? b 'nil) #f #t)) (define (improper-list->list l) (letrec ([acc (lambda (proper improper) ...
null
https://raw.githubusercontent.com/hubski/hubski/97ddebb02ff404edcf8db6e1a7889cfdf43b367a/arc-utils.rkt
racket
Takes an Arc list, which is nested pairs terminated with 'nil, and returns a proper Racket list, which is a series of pairs terminated with '(). If the given value is not a list, it is simply returned. If the given list is proper, it is simply returned. If the given list is improper, but not terminated with 'nil,...
#lang racket (require db) (require "db.rkt") (provide list->arc-list arc-list->list bool->arc-bool arc-bool->bool ) (define (bool->arc-bool b) (if b 't 'nil)) (define (arc-bool->bool b) (if (equal? b 'nil) #f #t)) (define (improper-list->list l) (letrec ([acc (lambda (proper improper) ...
cf49ccab9d386cb17cbae702ca0febb49627bf08d2ccd44f7653b43e8d635077
lehins/primal
Internal.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MagicHash # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE RoleAnnotations # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilyDependencies # # LANGUAGE Undecidable...
null
https://raw.githubusercontent.com/lehins/primal/c752d8788cb9597224d6f7e6a5163473a74b7b5a/primal-memory/src/Primal/Memory/Internal.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE RankNTypes # # OPTIONS_HADDOCK hide, not-home # | Module : Primal.Memory.Internal License : BSD3 Stability : experimental Portability : non-portable TODO: implement: - thawByteOffCopyMem, freezeByteOffCopyMutMem | Copy contiguous chunk of memory from the read only ...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MagicHash # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RoleAnnotations # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilyDependencies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # Copyr...
9df31c4941c498366eee2cb0e1438a2950c947b8443ceb8658ed0ffa41831244
g000001/tagger
string-resource.lisp
-*- Package : STRING - RESOURCE ; Syntax : Common - Lisp ; Mode : Lisp ; Base : 10 -*- Copyright ( c ) 1990 , 1991 by Xerox Corporation #|(cl:defpackage :string-resource (:use :common-lisp :cl-extensions) (:export +max-string-length+ alloc-string string-copy simple-string-copy free-string))|# (cl:in-packag...
null
https://raw.githubusercontent.com/g000001/tagger/a4e0650c55aba44250871b96e2220e1b4953c6ab/util/string-resource.lisp
lisp
Syntax : Common - Lisp ; Mode : Lisp ; Base : 10 -*- (cl:defpackage :string-resource (:use :common-lisp :cl-extensions) (:export +max-string-length+ alloc-string string-copy simple-string-copy free-string)) string storage management can reuse an old string Lie to the compiler to get word moves. (dotimes (i...
Copyright ( c ) 1990 , 1991 by Xerox Corporation (cl:in-package :string-resource) (defconstant +max-string-length+ (1- (expt 2 8))) (defparameter *string-table* (make-array (1+ +max-string-length+) :initial-element nil)) (defparameter *string-fill-pointers* (make-array (1+ +max-string-length+) :initial-elem...
a78ec399c6c546dd9151ad2ddcaad5f70a0885326f16ac454046eef97faa4f2b
jhund/re-frame-and-reagent-and-slatejs
core.cljs
(ns rrs.core (:require [reagent.core :as reagent] [re-frame.core :as re-frame] [rrs.config] [rrs.db] [rrs.events] [rrs.subs] [rrs.ui.views])) (defn maybe-dev-setup [] (when rrs.config/debug? (enable-console-print!) (println "Loading app in dev mode"))) (defn mount-root [] (re-frame/...
null
https://raw.githubusercontent.com/jhund/re-frame-and-reagent-and-slatejs/75593b626d9a31b8069daf16eef2a23e9aa19ec7/src/cljs/rrs/core.cljs
clojure
(ns rrs.core (:require [reagent.core :as reagent] [re-frame.core :as re-frame] [rrs.config] [rrs.db] [rrs.events] [rrs.subs] [rrs.ui.views])) (defn maybe-dev-setup [] (when rrs.config/debug? (enable-console-print!) (println "Loading app in dev mode"))) (defn mount-root [] (re-frame/...
3cbd383ad90ba2ae563aebe22e500cec5839849392d8e9438b2aab09f6f24a86
e-bigmoon/haskell-blog
Cursor3.hs
#!/usr/bin/env stack -- stack script --resolver lts-16.29 {-# LANGUAGE OverloadedStrings #-} import Prelude hiding (readFile) import Text.XML import Text.XML.Cursor import qualified Data.Text as T main :: IO () main = do doc <- readFile def "test2.xml" let cursor = fromDocument doc print $ T.concat $ ...
null
https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/appendix/ap5/Cursor3.hs
haskell
stack script --resolver lts-16.29 # LANGUAGE OverloadedStrings #
#!/usr/bin/env stack import Prelude hiding (readFile) import Text.XML import Text.XML.Cursor import qualified Data.Text as T main :: IO () main = do doc <- readFile def "test2.xml" let cursor = fromDocument doc print $ T.concat $ cursor $// element "h2" >=> attributeIs "class" "bar" ...
27cd6f2642fd400c96c14616f20c6884090500691fdfb9f83ad33bb927ca477f
jmorag/open-strings
Pieces.hs
module Handler.Pieces where import Data.Aeson.Types (emptyArray) import qualified Data.Text as T import Database.Esqueleto hiding (Value) import qualified Database.Esqueleto as E import Database.Esqueleto.Internal.Internal (unsafeSqlFunction) import Import hiding ((==.)) import Model.UserType getComposersR :: Handler...
null
https://raw.githubusercontent.com/jmorag/open-strings/c196a201001aee022fbb90a4ca32d676aad2fc5d/src/Handler/Pieces.hs
haskell
See -strings-in-postgresql TODO: simplify this query to use formatUsername below
module Handler.Pieces where import Data.Aeson.Types (emptyArray) import qualified Data.Text as T import Database.Esqueleto hiding (Value) import qualified Database.Esqueleto as E import Database.Esqueleto.Internal.Internal (unsafeSqlFunction) import Import hiding ((==.)) import Model.UserType getComposersR :: Handler...
334634759276dd8ae08b8dcecdffc9e6b4509a55ba73a00a8c62e23f569c3d50
philnguyen/soft-contract
issue-125.rkt
#lang racket (contract integer? 4 'me 'them) (define n (+ 1 2 3)) (contract exact-positive-integer? (+ n n) 'me 'them) (define str->sym string->symbol) (define str->sym* (contract (string? . -> . symbol?) str->sym 'me 'them)) (define str->sym** (contract (string? . -> . symbol?) (λ (s) (string->symbol s)) 'me 'th...
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/issues/issue-125.rkt
racket
#lang racket (contract integer? 4 'me 'them) (define n (+ 1 2 3)) (contract exact-positive-integer? (+ n n) 'me 'them) (define str->sym string->symbol) (define str->sym* (contract (string? . -> . symbol?) str->sym 'me 'them)) (define str->sym** (contract (string? . -> . symbol?) (λ (s) (string->symbol s)) 'me 'th...
94744ba33f7324a8777ffcd3dcbd1d5dafb23b0a9567bb25caad62765543a899
metabase/metabase
util_test.clj
(ns metabase.query-processor.util-test "Tests for various functions that provide information about the query." (:require [clojure.test :refer :all] [metabase.query-processor.util :as qp.util])) (set! *warn-on-reflection* true) (deftest ^:parallel query-without-aggregations-or-limits?-test (are [x expected...
null
https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/test/metabase/query_processor/util_test.clj
clojure
(ns metabase.query-processor.util-test "Tests for various functions that provide information about the query." (:require [clojure.test :refer :all] [metabase.query-processor.util :as qp.util])) (set! *warn-on-reflection* true) (deftest ^:parallel query-without-aggregations-or-limits?-test (are [x expected...
b7c7a4a7bd6301a29ec96ec16b034a60563fd52bb693b79457b583a466ecdc0e
Opetushallitus/ataru
subs.cljs
(ns ataru.virkailija.question-search.subs (:require [re-frame.core :as re-frame])) (re-frame/reg-sub :question-search/data (fn [db [_ form-key id]] (get-in db [:question-search form-key id]))) (re-frame/reg-sub :question-search/search-input (fn [[_ form-key id] _] (re-frame/subscribe [:question-sear...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/eba1fb45b52162a8e02b236e8b22a5978701457f/src/cljs/ataru/virkailija/question_search/subs.cljs
clojure
(ns ataru.virkailija.question-search.subs (:require [re-frame.core :as re-frame])) (re-frame/reg-sub :question-search/data (fn [db [_ form-key id]] (get-in db [:question-search form-key id]))) (re-frame/reg-sub :question-search/search-input (fn [[_ form-key id] _] (re-frame/subscribe [:question-sear...
01b79b282d87c3c2dc0080d1248c3e162c44375e023c52d6fd1bca6fa62013be
nitrogen/NitrogenProject.com
nitrogen_website_sup.erl
%% -*- mode: nitrogen -*- -module(nitrogen_website_sup). -behaviour(supervisor). -export([ start_link/0, init/1 ]). %% Helper macro for declaring children of supervisor -define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}). %% ===========================================================...
null
https://raw.githubusercontent.com/nitrogen/NitrogenProject.com/b4b3a0dbe17394608d2ee6eaa089e3ece1285075/src/nitrogen_website_sup.erl
erlang
-*- mode: nitrogen -*- Helper macro for declaring children of supervisor =================================================================== API functions =================================================================== =================================================================== Supervisor callbacks ...
-module(nitrogen_website_sup). -behaviour(supervisor). -export([ start_link/0, init/1 ]). -define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> Start the Process Registry ... application:start(...
1cff921aed204b7fef738023b4621603e29ba3e6fa07ae4b82baf21adb7a511f
input-output-hk/plutus-apps
Main.hs
| Light exe wrapper for SqlUtils -- module Main where import Marconi.DB.SqlUtils (bootstrap, freqShelleyTable, freqUtxoTable) import Options.Applicative (Parser, execParser, help, helper, info, long, metavar, short, showDefault, strOption, value, (<**>)) newtype CliOptions = CliOptions ...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/385228f6b726a06a655d1b2c8c56cfd5389bf276/marconi-sidechain/db-utils/exe/Main.hs
haskell
^ path to utxo sqlite database
| Light exe wrapper for SqlUtils module Main where import Marconi.DB.SqlUtils (bootstrap, freqShelleyTable, freqUtxoTable) import Options.Applicative (Parser, execParser, help, helper, info, long, metavar, short, showDefault, strOption, value, (<**>)) newtype CliOptions = CliOptions }...
656fadbef19a2c40d5d2faa44e8fdc71abc9a402fae98f72d6a1ed9733f57270
haskell-lisp/yale-haskell
ast.scm
;;; ast.scm -- compilation unit definition for ast definitions ;;; author : date : 10 Dec 1991 ;;; (define-compilation-unit ast (source-filename "$Y2/ast/") (unit ast-td (source-filename "ast-td")) (unit modules (source-filename "modules.scm") (require ast-td)) (unit type-structs (...
null
https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/ast/ast.scm
scheme
ast.scm -- compilation unit definition for ast definitions
author : date : 10 Dec 1991 (define-compilation-unit ast (source-filename "$Y2/ast/") (unit ast-td (source-filename "ast-td")) (unit modules (source-filename "modules.scm") (require ast-td)) (unit type-structs (source-filename "type-structs.scm") (require ast-td modules)) (un...
5fd67a62bea345e8bff453e051225d785897440c71ba817756b68797e0f17d04
kostmo/circleci-failure-tracker
Github.hs
{-# LANGUAGE DeriveGeneric #-} # LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # {-# LANGUAGE QuasiQuotes #-} module Github where import Data.Aeson import Data.Hashable import Data.Text.Lazy (Text) import GHC.Generics import Ty...
null
https://raw.githubusercontent.com/kostmo/circleci-failure-tracker/393d10a72080bd527fdb159da6ebfea23fcd52d1/app/fetcher/src/Github.hs
haskell
# LANGUAGE DeriveGeneric # # LANGUAGE QuasiQuotes #
# LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # module Github where import Data.Aeson import Data.Hashable import Data.Text.Lazy (Text) import GHC.Generics import Types import URI.ByteString import URI.ByteString.QQ data ...
35a1e11a8627b6291c2a751add24f512635d453e8f2a2847b2ce574216f8aebb
imdea-software/leap
System.mli
(***********************************************************************) (* *) LEAP (* *) , IMDEA ...
null
https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/system/System.mli
ocaml
********************************************************************* ...
LEAP , IMDEA Software Institute Copyright 2011 IMDEA Software Institute Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compl...
2b6a58b28684611fb877e6340779399c6788710032c3f0054fc64a70b9f5c922
baryluk/ex11
test1.erl
-module(test1). Copyright ( C ) 2004 by ( ) %% All rights reserved. %% The copyright holder hereby grants the rights of usage, distribution %% and modification of this software to everyone and for any purpose, as %% long as this license and the copyright notice above are preserved and %% not modified. There is no...
null
https://raw.githubusercontent.com/baryluk/ex11/be8abc64ab9fb50611f93d6631fc33ffdee08fdb/widgets/test1.erl
erlang
All rights reserved. The copyright holder hereby grants the rights of usage, distribution and modification of this software to everyone and for any purpose, as long as this license and the copyright notice above are preserved and not modified. There is no warranty for this software. test error recovery
-module(test1). Copyright ( C ) 2004 by ( ) -export([start/0]). -include("sw.hrl"). -import(sw, [xStart/1]). -define(bg, 16#ffffcc). start() -> spawn(fun win/0). win() -> process_flag(trap_exit, true), Display = xStart("3.2"), Win = swTopLevel:make(Display, 450, 170, ?bg), io:format(...
49b7fa44351178ecc48573ec9221d745d1ff6bd3e281d7b382580b23443122c6
wdebeaum/step
afflict.lisp
;;;; ;;;; W::afflict ;;;; (define-words :pos W::V :TEMPL AGENT-FORMAL-XP-TEMPL :words ( (W::afflict (SENSES ((meta-data :origin "verbnet-1.5" :entry-date 20051219 :change-date 20090512 :comments nil :vn ("amuse-31.1") :wn ("afflict%2:37:00")) ;(LF-PARENT ONT::evoke-upset) (LF-PARENT ONT::objective-...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/afflict.lisp
lisp
W::afflict (LF-PARENT ONT::evoke-upset)
(define-words :pos W::V :TEMPL AGENT-FORMAL-XP-TEMPL :words ( (W::afflict (SENSES ((meta-data :origin "verbnet-1.5" :entry-date 20051219 :change-date 20090512 :comments nil :vn ("amuse-31.1") :wn ("afflict%2:37:00")) (LF-PARENT ONT::objective-influence-neg) (TEMPL AGENT-AFFECTED-XP-NP-TEMPL) )...
eccaaaeac01048524b809214f331d0ea1c44b9986615f5a88f60f3acf9446d0f
LiteTabs/CL-CAD
cl-cad.layers.lisp
(in-package :cl-cad) (defstruct layer layer-name line-type color-line width printable view) (defun layers-window () (within-main-loop (let* ((window (make-instance 'gtk-window :type :toplevel :title "Layers" :window-position :center :default-width 500 :default-height 300)) ...
null
https://raw.githubusercontent.com/LiteTabs/CL-CAD/539c90e58e668b72a2849e8c0caebf65236866c6/cl-cad.layers.lisp
lisp
(in-package :cl-cad) (defstruct layer layer-name line-type color-line width printable view) (defun layers-window () (within-main-loop (let* ((window (make-instance 'gtk-window :type :toplevel :title "Layers" :window-position :center :default-width 500 :default-height 300)) ...
02ca9fe77cec44f639a9c513375fccaed6d1017aa2a1a6e962145f3e7f5e8cee
gergoerdi/clash-tinybasic
serial-board.hs
{-# LANGUAGE RecordWildCards, NumericUnderscores #-} # LANGUAGE CPP # import Clash.Prelude hiding (rom) import Clash.Annotations.TH import Hardware.TinyBASIC.Intel8080 import RetroClash.Utils import RetroClash.Clock import RetroClash.SerialRx import RetroClash.SerialTx createDomain vSystem{vName="Native", vPeriod =...
null
https://raw.githubusercontent.com/gergoerdi/clash-tinybasic/05df681c0478e5d3c3adfcf70af141bf7a5e6115/src/intel8080/serial-board.hs
haskell
# LANGUAGE RecordWildCards, NumericUnderscores #
# LANGUAGE CPP # import Clash.Prelude hiding (rom) import Clash.Annotations.TH import Hardware.TinyBASIC.Intel8080 import RetroClash.Utils import RetroClash.Clock import RetroClash.SerialRx import RetroClash.SerialTx createDomain vSystem{vName="Native", vPeriod = hzToPeriod __NATIVE_CLOCK__} topEntity :: "CLK"...
1272391204d04d4a87c8833f9e229385fbea0e6050522c3c85a31f8deb241859
leo-project/leo_gateway
leo_gateway_sup.erl
%%====================================================================== %% Leo Gateway %% Copyright ( c ) 2012 - 2015 Rakuten , Inc. %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a...
null
https://raw.githubusercontent.com/leo-project/leo_gateway/7bac8912b762688f0ef237b31fee17e30e3888a3/src/leo_gateway_sup.erl
erlang
====================================================================== Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permis...
Leo Gateway Copyright ( c ) 2012 - 2015 Rakuten , Inc. This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(leo_gate...
5399d8755d262d0bcd17df34301ce74f4dc862b65a892a457c9a23c7cdb55adf
dbuenzli/jsonc
jsonc_jsoo.mli
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/dbuenzli/jsonc/b6adf836a2812f25d934e85ba3b6daa5fe77fd14/src-jsoo/jsonc_jsoo.mli
ocaml
* The type for native strings. * The type for arbitrary undescribed JSON values * The type for decode errors. * The type for decoding sources. * The type for decoder. * [decoder src] is a decoder that reads from [src]. * [decoder_src d] is [d]'s source. * The type for encoding destinations. * The type for encod...
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
d76dc4ac1d8ef7b733e4306c4325da535dfb8f6376296bcab5227a2aaeaa373f
mokus0/gamma
IncGammaTests.hs
# LANGUAGE ImplicitParams # module IncGammaTests where import GammaTests (eps, isSane, (~=)) import Data.Complex import Data.Number.Erf import Math.Gamma import Test.Framework (testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.QuickCheck tests = [ testGroup "incomplete gamma" ...
null
https://raw.githubusercontent.com/mokus0/gamma/8c9bb99b9af1d2f3026bb7ed3899fdf2ff0113e7/test/src/IncGammaTests.hs
haskell
let a = lnUpperGamma 1 (-x) in isSane a ==> a ~= x
# LANGUAGE ImplicitParams # module IncGammaTests where import GammaTests (eps, isSane, (~=)) import Data.Complex import Data.Number.Erf import Math.Gamma import Test.Framework (testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.QuickCheck tests = [ testGroup "incomplete gamma" ...
671bebd7f4846a6330af6d72b26f943d447b6bb1891b51f493944d12f13de571
RedPRL/asai
Test.ml
let () = Alcotest.run "asai Tests" [ "Location Tests", LocTests.tests ]
null
https://raw.githubusercontent.com/RedPRL/asai/7becaaa2d98bf2d58c5e44499f17a39580f8cdd9/test/Test.ml
ocaml
let () = Alcotest.run "asai Tests" [ "Location Tests", LocTests.tests ]
cec5cdf1f9e71c30bd9c725979c95a7efa2be1995f008c9361ee38d10927e453
mathematical-systems/clml
zsymm.lisp
;;; Compiled by f2cl version: ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ " " $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 " " $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ " " $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ " " $ I d : f2cl5.l , v 1.197 2008/09/11 15:0...
null
https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/blas/zsymm.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ " " $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 " " $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ " " $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ " " $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ " " $ I d :...
c0c9a59634efdbae747b2559d390e37a7d35bd6ad72fe8561ca65bf5e066327a
nasa/Common-Metadata-Repository
jobs.clj
(ns cmr.common.jobs "Defines a job scheduler that wraps quartz for defining a job." (:require [clj-time.core :as t] [cmr.common.config :as config :refer [defconfig]] [cmr.common.lifecycle :as l] [cmr.common.log :as log :refer (debug info warn error)] [cmr.common.services.errors :as errors] [clojur...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/32cc82761c71fd9e885eac93cc9d0b7c02fcbeaf/common-lib/src/cmr/common/jobs.clj
clojure
quartzite dependencies Thread pool Job Store Data sources Configure the static properties Set start delay We delete existing jobs and recreate them A var that will point to an atom to use to contain the system. Jobs need access to the system. There can be multiple systems running at once so there needs to be ...
(ns cmr.common.jobs "Defines a job scheduler that wraps quartz for defining a job." (:require [clj-time.core :as t] [cmr.common.config :as config :refer [defconfig]] [cmr.common.lifecycle :as l] [cmr.common.log :as log :refer (debug info warn error)] [cmr.common.services.errors :as errors] [clojur...
8f4e12c0f30eb294f72f02ff5c69e211db384fd292b08bc129bf0b0784dd7d26
pablomarx/Thomas
runtime.scm
* Copyright 1992 Digital Equipment Corporation ;* All Rights Reserved ;* ;* Permission to use, copy, and modify this software and its documentation is ;* hereby granted only under the following terms and conditions. Both the ;* above copyright notice and this permission notice mus...
null
https://raw.githubusercontent.com/pablomarx/Thomas/c8ab3f6fa92a9a39667fe37dfe060b651affb18e/kits/gambit/src/runtime.scm
scheme
* All Rights Reserved * * Permission to use, copy, and modify this software and its documentation is * hereby granted only under the following terms and conditions. Both the * above copyright notice and this permission notice must appear in all copies * of the software, derivative works or modi...
* Copyright 1992 Digital Equipment Corporation * and hereby grant back to Digital a non - exclusive , unrestricted , royalty - free * their best efforts to return to Digital any such changes , enhancements or * extensions that they make and inform Digital of noteworthy uses of this * software . Correspo...
34d8a83cd05ffb462a9e38387f33d617514d7b1653f27e24052fb706fe8f977b
0install/0install
trust_box.ml
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) open Support open Support.Common open Gtk_common module Progress = Zeroinstall.Progress module Trust = Zeroinstall.Trust module G = Support.Gpg module U = Support.Utils let left text = GMis...
null
https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/gui_gtk/trust_box.ml
ocaml
* Check the key-info server's results for these keys. If we don't know any of them, * ask for extra confirmation from the user. * @return true if we should continue and trust the keys. Still waiting => unknown Unknown if we didn't get any Good votes Escaping? Lablgtk uses the wrong response code for HELP, so ...
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) open Support open Support.Common open Gtk_common module Progress = Zeroinstall.Progress module Trust = Zeroinstall.Trust module G = Support.Gpg module U = Support.Utils let left text = GMis...
d30e83c2e9ac74861eae2e5391b743330b2647f3b01e52aed4c85028cdd76b47
acl2/acl2
parse-pe-file.lisp
; A parser for PE executables ; Copyright ( C ) 2016 - 2019 Kestrel Technology , LLC Copyright ( C ) 2020 - 2021 Kestrel Institute ; License : A 3 - clause BSD license . See the file books/3BSD - mod.txt . ; Author : ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-p...
null
https://raw.githubusercontent.com/acl2/acl2/48f6f076b9d1558c37cf6e1392b39bcbb020aa84/books/kestrel/x86/parsers/parse-pe-file.lisp
lisp
A parser for PE executables See also build-book-for-pe-file.lisp. TODO: Collect any warnings / errors and include them in the parsed output somehow? todo: use len-at-least todo: get this by packing *expected-sig* Returns the PE signature offset, or nil if there are not enough bytes. The offset to the PE signa...
Copyright ( C ) 2016 - 2019 Kestrel Technology , LLC Copyright ( C ) 2020 - 2021 Kestrel Institute License : A 3 - clause BSD license . See the file books/3BSD - mod.txt . Author : ( ) (in-package "ACL2") (include-book "parser-utils") (include-book "kestrel/alists-light/lookup" :dir :system) (include-bo...
6c30c9e2b3e09b2f73fb577592163a8769c992616e21dd123969ab9a8e1e7304
jkvor/log_roller
lr_filter.erl
Copyright ( c ) 2009 < > %% %% 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/jkvor/log_roller/1f072ab74532314f94bdc94dd5a8572d5ceb8d4e/src/lr_filter.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell Software is furnished to do so, subject to the following condi...
Copyright ( c ) 2009 < > files ( the " Software " ) , to deal in the Software without copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , -module(lr_filter). -author('...
348675887fd6144cd880a20c9a0131d251273ecac92478b938e4a7e98436c052
igorhvr/bedlam
srfi-45.scm
(module srfi-45 ((lazy make-promise) eager (delay make-promise) force) (import misc) (import record) (include "../../modules/srfi/srfi-45.scm") (add-feature 'srfi-45))
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-cvs/src/sisc/libs/srfi/srfi-45.scm
scheme
(module srfi-45 ((lazy make-promise) eager (delay make-promise) force) (import misc) (import record) (include "../../modules/srfi/srfi-45.scm") (add-feature 'srfi-45))
cf74c69739d2b51d001f5fa290dbf0500f65fc630992957fec929dc81e7f6206
CryptoKami/cryptokami-core
Holder.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} # LANGUAGE UndecidableInstances # | ` ExplorerSockets ` monad . module Pos.Explorer.Socket.Holder ( ExplorerSockets , ExplorerSocket(..) , _ProdSocket , _TestSocket , Cl...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/explorer/src/Pos/Explorer/Socket/Holder.hs
haskell
# LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # | Active sessions | Sessions subscribed to given address. | Sessions subscribed to notifications about new blocks. | Sessions subscribed to notifications about last page of blocks. | Sessions subscribed to notifications about new transactions. | ...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE UndecidableInstances # | ` ExplorerSockets ` monad . module Pos.Explorer.Socket.Holder ( ExplorerSockets , ExplorerSocket(..) , _ProdSocket , _TestSocket , ClientContext , ConnectionsState (..) , ConnectionsVar , ...
1421618153200e48ca8cf942177e0d8ef9b7f75f771380c9895c45174684a04c
VisionsGlobalEmpowerment/webchange
state.cljs
(ns webchange.admin.widgets.access-code.state (:require [re-frame.core :as re-frame] [webchange.state.warehouse :as warehouse])) (re-frame/reg-event-fx ::generate-access-code (fn [{:keys [_]} [_ school-id {:keys [on-success]}]] {:dispatch [::warehouse/generate-school-access-code {:sch...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/c3e0658b3a091d4273a81920dcebe0dc1dda3750/src/cljs/webchange/admin/widgets/access_code/state.cljs
clojure
(ns webchange.admin.widgets.access-code.state (:require [re-frame.core :as re-frame] [webchange.state.warehouse :as warehouse])) (re-frame/reg-event-fx ::generate-access-code (fn [{:keys [_]} [_ school-id {:keys [on-success]}]] {:dispatch [::warehouse/generate-school-access-code {:sch...
928703b8ab02f28267ca676eec2f7bb0a75ae5c676ebdb93bc66ff1c6acb330e
cmr-exchange/cmr-client
dev.clj
(ns cmr.client.dev "The CMR client Clojure REPL development namespace." (:require [clojure.core.async :as async] [clojure.data.json :as json] [clojure.data.xml :as xml] [clojure.java.io :as io] [clojure.pprint :refer [pprint]] [clojure.string :as string] [clojure.tools.namespace.repl :as repl] ...
null
https://raw.githubusercontent.com/cmr-exchange/cmr-client/0b4dd4114e3b5ed28fc5b57db0f8dcd8773c1c14/dev-resources/src/cmr/client/dev.clj
clojure
Aliases
(ns cmr.client.dev "The CMR client Clojure REPL development namespace." (:require [clojure.core.async :as async] [clojure.data.json :as json] [clojure.data.xml :as xml] [clojure.java.io :as io] [clojure.pprint :refer [pprint]] [clojure.string :as string] [clojure.tools.namespace.repl :as repl] ...
e1dc46144516f0798425d93ad50bd1131bd3c7248f840819404aa96acb23128a
kelamg/HtDP2e-workthrough
ex271.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex271) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Abstraction/ex271.rkt
racket
about the language level of this file in a form that our tools can easily process. String [List-of String] -> Boolean produces true if any of the strings on l are equal to or an extension of s String -> Boolean produces true if str begins with s [List-of String] -> Boolean produces true if all strings on l star...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex271) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define LOS1 (list "Archilles" "Helena" "Hector" "Od...
d516e6960dccb5d43e9dd9c7876c45337dd90182ae6d8fff9db33cd24803a36a
IndecisionTree/adventofcode2022
Day01.hs
module Days.Day01 (day01) where import AOC (Solution (..)) import qualified Data.Text as T import qualified Data.Text.Read as T import Data.List (sortBy) day01 :: Solution day01 = Solution parseInput part1 part2 parseInput :: T.Text -> [Int] parseInput = fmap (sum . fmap readInt . T.lines) . T.splitOn "\n\n" where...
null
https://raw.githubusercontent.com/IndecisionTree/adventofcode2022/9065ab916bee0f41ef1f43f16c587b9f3b62a72e/solutions/Days/Day01.hs
haskell
module Days.Day01 (day01) where import AOC (Solution (..)) import qualified Data.Text as T import qualified Data.Text.Read as T import Data.List (sortBy) day01 :: Solution day01 = Solution parseInput part1 part2 parseInput :: T.Text -> [Int] parseInput = fmap (sum . fmap readInt . T.lines) . T.splitOn "\n\n" where...
83392e365b7b2700541d4fef7e8af8202a7e69483d80976d820e2587d69a761e
orthecreedence/cl-rethinkdb
connection.lisp
;;; NOTE: this file contains the base minimum number of functions that it can to ;;; support connecting/sending/receiving. The idea is to eventually allow socket ;;; types other than cl-async (usocket, iolib) if desired. (in-package :cl-rethinkdb) (define-condition connect-error (simple-error) ((msg :reader connect...
null
https://raw.githubusercontent.com/orthecreedence/cl-rethinkdb/f435e72dce7f900f599ade193859a202fd1ac33e/connection.lisp
lisp
NOTE: this file contains the base minimum number of functions that it can to support connecting/sending/receiving. The idea is to eventually allow socket types other than cl-async (usocket, iolib) if desired.
(in-package :cl-rethinkdb) (define-condition connect-error (simple-error) ((msg :reader connect-error-msg :initarg :msg :initform "")) (:report (lambda (c s) (format s "Connection error: ~a" (connect-error-msg c)))) (:documentation "A general connection error condition.")) (defparameter *empty* (make-array 0 :...
4cb6a761a39f5f9ef7fa7b7f4096d21440974334de328ed2ba6cd51c62d473c5
mstone/soutei
Syntax.hs
# LANGUAGE UndecidableInstances # -- $HeadURL: $ $ I d : Syntax.hs 2947 2012 - 09 - 14 08:26:08Z oleg.kiselyov $ -- svn propset svn:keywords "HeadURL Id" filename module Soutei.Syntax ( top, assertionL, headL, term, const ) where import Prelude hiding (head, const) import Control.Monad import Data.Bits import D...
null
https://raw.githubusercontent.com/mstone/soutei/4d00e12180361561dab948f211bbcf9e75bfb1de/Soutei/Syntax.hs
haskell
$HeadURL: $ svn propset svn:keywords "HeadURL Id" filename show if it can be parsed as a symbol, show it as a symbol (cosmetic) parser L suffix means a lexeme parser (eats trailing space); sort of annoying, but I prefer to be explicit, because the distinction sometimes matters. lexemes based on Scheme, except...
# LANGUAGE UndecidableInstances # $ I d : Syntax.hs 2947 2012 - 09 - 14 08:26:08Z oleg.kiselyov $ module Soutei.Syntax ( top, assertionL, headL, term, const ) where import Prelude hiding (head, const) import Control.Monad import Data.Bits import Data.Monoid (mconcat) import Text.ParserCombinators.Parsec hiding (...
d64e61e2db0c1ae79927362400e4e76f4ac886035b32919ab568d5876e551e82
jayunit100/BioClojure
nmrshifts.clj
(ns BioClojure.nmrshifts (:use clojure.contrib.math) (:use clojure.set) (:use clojure.contrib.generic.functor)) (def approx-c-shifts {:CA 58 :THR-CB 68 :CB 32 :SER-CB 63 :GLY-CA 44 :ALA-CB 18 :TYR-CB 39 :ILE-CD 13 :CG 25}) Chemical shifts comparison ;; compares shift values...
null
https://raw.githubusercontent.com/jayunit100/BioClojure/5d0bb271939345362be5ede2bd19b2fb1d235b22/bioclojure2/src/BioClojure/nmrshifts.clj
clojure
compares shift values. computer difference between shift and average shift for each nucleus type return a sorted list (by shift difference) ignoring helix/sheet/coil for now -- would be great to push this data into a DB extract values (of key-value pairs) get absolute values Sort by smallest extract values (of ...
(ns BioClojure.nmrshifts (:use clojure.contrib.math) (:use clojure.set) (:use clojure.contrib.generic.functor)) (def approx-c-shifts {:CA 58 :THR-CB 68 :CB 32 :SER-CB 63 :GLY-CA 44 :ALA-CB 18 :TYR-CB 39 :ILE-CD 13 :CG 25}) Chemical shifts comparison (defn get-shift-differen...
7089d64f2501e5bd865366a0e11e9f43b5be6138b88a7b25a41192126d6a4b1d
dinosaure/carton
h.ml
type bigstring = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t let bigstring_empty = Bigarray.Array1.create Bigarray.char Bigarray.c_layout 0 let bigstring_length x = Bigarray.Array1.dim x [@@inline] let bigstring_sub x off len = Bigarray.Array1.sub x off len [@@inline] let bigstring_blit a b...
null
https://raw.githubusercontent.com/dinosaure/carton/8cb8b3685fab477594b2d83c70b2fc965d1d59b9/lib/h.ml
ocaml
XXX(dinosaure): stupidly slow! get new input in [d.i] and [k]ontinue. XXX(dinosaure): [enough] is called only after a [d.s <- (It _ | Cp _)]. XXX(dinosaure): [flambda] is able to optimize [let rec a .. and b .. and c ..] instead [match .. with A -> .. | B -> .. | C -> ..]. TODO: [malformedf]? XXX(dinosa...
type bigstring = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t let bigstring_empty = Bigarray.Array1.create Bigarray.char Bigarray.c_layout 0 let bigstring_length x = Bigarray.Array1.dim x [@@inline] let bigstring_sub x off len = Bigarray.Array1.sub x off len [@@inline] let bigstring_blit a b...
8a205d56d00bf5b8d54ab31e595dbbd5d8352fe912626ba2c7ad0bd2d888c34d
Gandalf-/coreutils
CutSpec.hs
module CutSpec (spec) where import Coreutils.Cut import Test.Hspec spec :: Spec spec = parallel $ do testFieldParse testParseExpand testExact testRange testMixed testFieldInvert testExactInvert testRangeInvert nums :: [Int] nums = [1..10] testFieldParse :: Spec ...
null
https://raw.githubusercontent.com/Gandalf-/coreutils/f1375861fad530893d2e0c1bb6a4bfac711172b8/test/CutSpec.hs
haskell
^ fields have quite a few variations and constraints happy path exact errors range errors other errors ^ exact fields are simpler than ranges, but there are still a couple edge cases: redundant, inverted, and out of order need to be checked carefully ranges. so we take extra care there overlapping and contiguo...
module CutSpec (spec) where import Coreutils.Cut import Test.Hspec spec :: Spec spec = parallel $ do testFieldParse testParseExpand testExact testRange testMixed testFieldInvert testExactInvert testRangeInvert nums :: [Int] nums = [1..10] testFieldParse :: Spec ...
afaf67c55760914de0c06aaddcce66378cc0e4365dfb951ddd3c436585ee3dfd
modlfo/pla
pla.ml
The MIT License ( MIT ) Copyright ( c ) 2016 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 , ...
null
https://raw.githubusercontent.com/modlfo/pla/088230017ccd151b0e955764d2d79c89a406078e/lib/pla.ml
ocaml
Templates of basic types Functions to wrap templates Functions to append templates
The MIT License ( MIT ) Copyright ( c ) 2016 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 , ...
06c64fe4d8a51d9e97b6ed9da6bb0f6e41512ce451f144d8c90c8e4a948e15e1
nasa/ogma
Main.hs
Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved . -- -- Disclaimers -- No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , IN...
null
https://raw.githubusercontent.com/nasa/ogma/83a934badd194418b69cd7d113f4149881f5df11/ogma-cli/src/Main.hs
haskell
Disclaimers SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF ANY MANNER, CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR GOVERNM...
Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved . No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , INCLUDING , BUT NOT L...
89563859c8af3c5e7f55378c6c2ebbabd87f2c7962d0b2cd61bfd0285d19b5c3
FranklinChen/hugs98-plus-Sep2006
Attributes.hs
-- #hide module Text.XHtml.Transitional.Attributes where import Text.XHtml.Internals -- * Extra attributes in XHTML Transitional # DEPRECATED alink " This attribute is deprecated in XHTML 1.0 " # alink :: String -> HtmlAttr alink = strAttr "alink" # DEPRECATED background " This attrib...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/xhtml/Text/XHtml/Transitional/Attributes.hs
haskell
#hide * Extra attributes in XHTML Transitional * Html colors
module Text.XHtml.Transitional.Attributes where import Text.XHtml.Internals # DEPRECATED alink " This attribute is deprecated in XHTML 1.0 " # alink :: String -> HtmlAttr alink = strAttr "alink" # DEPRECATED background " This attribute is deprecated in XHTML 1.0 " # background ...
95d973d78aab013331782cbaec02f5e0426cca8be60415a90bc0e2eec7b92c63
hyper-systems/ocaml-coap
Coap_message.ml
let (let*) res f = match res with | Ok x -> f x | Error e -> Error e let return x = Ok x (* Message kind *) type kind = | Confirmable | Nonconfirmable | Acknowledgement | Reset let pp_kind f k = let p = Format.fprintf f in match k with | Confirmable -> p "Confirmable" | Nonconfirmable -> p ...
null
https://raw.githubusercontent.com/hyper-systems/ocaml-coap/0bdc50fb871f5b73136f3a4117ca5817f0025e13/coap-core/Coap_message.ml
ocaml
Message kind Message code Message content format Message header Message options #section-5.10.1 #section-7.4 #section-7.4 (Cstruct.to_string value) Message decoding Message encoding
let (let*) res f = match res with | Ok x -> f x | Error e -> Error e let return x = Ok x type kind = | Confirmable | Nonconfirmable | Acknowledgement | Reset let pp_kind f k = let p = Format.fprintf f in match k with | Confirmable -> p "Confirmable" | Nonconfirmable -> p "Nonconfirmable" ...
288edbf5485aa52c097a1b3c6a28087a4be2ff86afcd8d7a37edad4c54880b97
exercism/clojurescript
binary_search_tree.cljs
(ns binary-search-tree) (defn value []) (defn singleton []) (defn insert []) (defn left []) (defn right []) (defn to-list []) (defn from-list [])
null
https://raw.githubusercontent.com/exercism/clojurescript/0135bc589c556557397650fe5e52ac7df3d4ddb5/exercises/practice/binary-search-tree/src/binary_search_tree.cljs
clojure
(ns binary-search-tree) (defn value []) (defn singleton []) (defn insert []) (defn left []) (defn right []) (defn to-list []) (defn from-list [])
4d00588a45ddfc00f453b82c1b4281e5781af915e61e484b68c279f83491fe43
3b/cl-opengl
library-glesv2.lisp
(in-package #:cl-opengl-bindings) ;;; we can't use libGL and libGLES* at the same time, so try to detect ;;; conflicts and complain ;;; either the lisp doesn't support specifying which library to use ;;; (most lisps, indicated by cffi-features:flat-namespace in ;;; *features*) or we specified it should use the one fr...
null
https://raw.githubusercontent.com/3b/cl-opengl/e2d83e0977b7e7ac3f3d348d8ccc7ccd04e74d59/gl/library-glesv2.lisp
lisp
we can't use libGL and libGLES* at the same time, so try to detect conflicts and complain either the lisp doesn't support specifying which library to use (most lisps, indicated by cffi-features:flat-namespace in *features*) or we specified it should use the one from library name (or fix how they are defined, but ...
(in-package #:cl-opengl-bindings) named by OPENGL when defining the function , so we need to use that right on the other lisps , so only supporting using 1 at a time for now ) OPENGL library yet (when (and (ignore-errors (foreign-library-loaded-p 'opengl)) (not (search "glesv2" ...
677314e2f356fe947ab399926a2c3f84714d1844d9d2e92c0fa1fa48d02ebbf5
drlivingston/kabob
record.clj
(ns edu.ucdenver.ccp.kabob.view.record (use compojure.core [hiccup core page] edu.ucdenver.ccp.kabob.view.utils edu.ucdenver.ccp.kabob.ice-util)) (defn fv-table [fvs] ( prn fvs ) (html [:table {:class "data-table"} [:thead [:tr [:th "field"] [:th "value"]]] [:tbody ...
null
https://raw.githubusercontent.com/drlivingston/kabob/7038076849744c959da9c8507e8a8ab7215410aa/kabob-view/src/main/clojure/edu/ucdenver/ccp/kabob/view/record.clj
clojure
fvs)]])) (sort fvs))]])) (prn record) (prn value)
(ns edu.ucdenver.ccp.kabob.view.record (use compojure.core [hiccup core page] edu.ucdenver.ccp.kabob.view.utils edu.ucdenver.ccp.kabob.ice-util)) (defn fv-table [fvs] ( prn fvs ) (html [:table {:class "data-table"} [:thead [:tr [:th "field"] [:th "value"]]] [:tbody ...
f4b57427792c2f76a80bad98afc5a443af4c2293f1e5c4a2e5d8e0c78bf6e18a
lexi-lambda/freer-simple
Main.hs
module Main (main) where import Control.Monad (forever, when) import Data.Maybe (fromMaybe) import Data.List (intercalate) import System.Environment (getArgs) import Control.Monad.Freer (Eff, Member, run, runM) import Capitalize (Capitalize, capitalize, runCapitalize) import Console ( Console , exitSuccess' , ...
null
https://raw.githubusercontent.com/lexi-lambda/freer-simple/e5ef0fec4a79585f99c0df8bc9e2e67cc0c0fb4a/examples/src/Main.hs
haskell
----------------------------------------------------------------------------- Example ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- | | | | IO () -' | ...
module Main (main) where import Control.Monad (forever, when) import Data.Maybe (fromMaybe) import Data.List (intercalate) import System.Environment (getArgs) import Control.Monad.Freer (Eff, Member, run, runM) import Capitalize (Capitalize, capitalize, runCapitalize) import Console ( Console , exitSuccess' , ...
9c540da5ded73cc39bf599154dbdfcd5c73c862b96d685e66e0a58850a2f3cbf
RichiH/git-annex
Activity.hs
git - annex activity log - - Copyright 2015 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2015 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Logs.Activity ( Log, Activity(..), recordActivity, lastActivities, ) where import Annex.Common...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Logs/Activity.hs
haskell
git - annex activity log - - Copyright 2015 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2015 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Logs.Activity ( Log, Activity(..), recordActivity, lastActivities, ) where import Annex.Common...
24e632fb70fee6ac12c4ebbbc0f68679bf08d6117d70cdbc58b50351bfeac29d
SahilKang/cl-avro
float.lisp
Copyright 2021 Google LLC ;;; ;;; This file is part of cl-avro. ;;; ;;; cl-avro is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option) any later version. ;...
null
https://raw.githubusercontent.com/SahilKang/cl-avro/70fcaa32514cfb59b75812b2eab45ed24cce9d27/test/primitive/float.lisp
lisp
This file is part of cl-avro. cl-avro is free software: you can redistribute it and/or modify (at your option) any later version. cl-avro is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See t...
Copyright 2021 Google LLC it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (in-package #:cl-user) (defpackage #:cl-avro/test/float (:use #:cl #:1am) (:lo...
a624f26592ee9e9da0b21f20fbe50fd37be06e8d4dc2d329a3e7fa50f9ed9c6f
surganov/cis194
Golf.hs
module Golf where import Data.List import Data.List.Split Exercise 1 . Hopscotch skips :: [a] -> [[a]] skips xs = zipWith every [1..(length xs)] (repeat xs) where every n xs = extractBy orderedPairs where extractBy = fmap fst . filter ((== n) . snd) orderedPairs = zip xs $ cycle [1.....
null
https://raw.githubusercontent.com/surganov/cis194/e727f29389fb01c6d221940d45b394fd67e068c4/03/Golf.hs
haskell
module Golf where import Data.List import Data.List.Split Exercise 1 . Hopscotch skips :: [a] -> [[a]] skips xs = zipWith every [1..(length xs)] (repeat xs) where every n xs = extractBy orderedPairs where extractBy = fmap fst . filter ((== n) . snd) orderedPairs = zip xs $ cycle [1.....
5bc2c1ede3dfec3b839dabea6a6b9163575f80932b91dc346f79acf743ef3d01
theodormoroianu/SecondYearCourses
LambdaChurch_20210415171053.hs
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415171053.hs
haskell
alpha-equivalence subst u x t defines [u/x]t, i.e., substituting u for x in t This substitution avoids variable captures so it is safe to be used when reducing terms with free variables (e.g., if evaluating inside lambda abstractions) ^ substitution term ^ variable to be substitutes ^ term in which the substit...
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
2e5b7c49845488f7ea4718213672b700d59cc942f7685a64af1881cbd23049dc
andrewMacmurray/haskell-book-solutions
Sum.hs
module Ch16.Sum where import Test.QuickCheck import Test.QuickCheck.Function import Ch16.FunctorLaws data Sum a b = First a | Second b deriving (Eq, Show) instance Functor (Sum a) where fmap _ (First a) = First a fmap f (Second b) = Second (f b) sumGen :: (Arbitrary a, Arbitrary b) => Gen (Sum a b) sumG...
null
https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch16/Sum.hs
haskell
module Ch16.Sum where import Test.QuickCheck import Test.QuickCheck.Function import Ch16.FunctorLaws data Sum a b = First a | Second b deriving (Eq, Show) instance Functor (Sum a) where fmap _ (First a) = First a fmap f (Second b) = Second (f b) sumGen :: (Arbitrary a, Arbitrary b) => Gen (Sum a b) sumG...
99ca69a38ebc390315f7bf6d76529fb0df98f2e339f321b3289718c94f1b4d04
senapk/funcional_arcade
solver.hs
swap :: [a] -> Int -> Int -> [a] swap u q p = if length u < (q+1) || length u < (p+1) || p==q then u else (if q > p then swap u p q else nova) where nova = part1++[(u !! p)]++part2++[(u !! q)]++part3 part1 = fst (splitAt q u) part2 = snd(splitAt (q+1) (fst (splitAt p u))) part3 = snd (...
null
https://raw.githubusercontent.com/senapk/funcional_arcade/70fa04b4799d5a8c7e5add39d9f217f38f418600/base/056/solver.hs
haskell
swap :: [a] -> Int -> Int -> [a] swap u q p = if length u < (q+1) || length u < (p+1) || p==q then u else (if q > p then swap u p q else nova) where nova = part1++[(u !! p)]++part2++[(u !! q)]++part3 part1 = fst (splitAt q u) part2 = snd(splitAt (q+1) (fst (splitAt p u))) part3 = snd (...
532ab048ccc90c976ddf037e27732bcf0ba77fda194806f1330a07aad69d5942
yi-editor/yi
Pango.hs
# LANGUAGE CPP # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # {-# OPTIONS_GHC -funbox-strict-fields #-} this file adds missing instances for GTK stuff {-# OPTIONS_HADDOCK show-extensions #-}...
null
https://raw.githubusercontent.com/yi-editor/yi/58c239e3a77cef8f4f77e94677bd6a295f585f5f/yi-frontend-pango/src/Yi/Frontend/Pango.hs
haskell
# LANGUAGE OverloadedStrings # # OPTIONS_GHC -funbox-strict-fields # # OPTIONS_HADDOCK show-extensions # | Module : Yi.Frontend.Pango License : GPL-2 Maintainer : Stability : experimental Portability : portable pango for direct text rendering. 'WinInfo' will ever go out of date. We don't nee...
# LANGUAGE CPP # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # this file adds missing instances for GTK stuff This module defines a user interface implemented using gtk2hs and module Yi.Frontend.Pango (start, startGtkHook)...
e63fcad730ec07b29e1b7f63cf31f11d4e783a1c46843e37f0b95241f398823f
haskell-jp/makeMistakesToLearnHaskell
incornsistent-indent2.hs
main = do input <- getContents putStr (unlines (reverse (lines input)))
null
https://raw.githubusercontent.com/haskell-jp/makeMistakesToLearnHaskell/1174d5c6bb82e57622be8033607a4d049e30ae7e/test/assets/4/incornsistent-indent2.hs
haskell
main = do input <- getContents putStr (unlines (reverse (lines input)))
6ed5e441cf175cf6feaed515eba425f6dadc34a328b1e91e9faefce28d10ec4b
TrustInSoft/tis-kernel
journal.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_services/plugin_entry_points/journal.mli
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of Frama - C. Copyright ( C ) 2007 - 2015 ...
05aff2e961c499ccde6b6fd63b02178ed18727fb55e83c439dee100ce05c1865
wilbowma/cur
ML-rewrite.rkt
#lang cur/metantac Rewrite , but using equality ;; Significant code duplicate between this and rewrite.rkt; ;; someone should play the abstraction game (and abstract over *any* equivalence...?) (provide (for-syntax reflexivity rewrite by-rewrite by-re...
null
https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-lib/cur/ntac/ML-rewrite.rkt
racket
Significant code duplicate between this and rewrite.rkt; someone should play the abstraction game (and abstract over *any* equivalence...?) rewrite tactics ---------------------------------------------------------- surface rewrite tactics -------------------- internal rewrite tactic -------------------- TODO: Thi...
#lang cur/metantac Rewrite , but using equality (provide (for-syntax reflexivity rewrite by-rewrite by-rewriteL (rename-out [by-rewrite by-rewriteR]))) (require cur/stdlib/equality "standard.rkt") (begin-for-syntax (...
145a7f850306d57115dfaeaf0d3a36f2b246455163ed9c833167f9fc66b11526
fmthoma/vty-workshop
Physics.hs
module Pong.Physics (inertialMovement, collisions, BoundsCheck (..)) where import Lens.Micro import Lens.Micro.Extras import Pong.Motions import Pong.Types -- | Move the ball inertially, i.e. along the velocity vector. inertialMovement :: GameState -> GameState inertialMoveme...
null
https://raw.githubusercontent.com/fmthoma/vty-workshop/7e39ee78e059009a3caa1c4924e4517bda428902/code/src/Pong/Physics.hs
haskell
| Move the ball inertially, i.e. along the velocity vector. | Check for collisions, and bounce the ball from paddles and/or bounds if necessary. ^ Ball left the field on the left side (i.e. right player wins) ^ Ball left the field on the right side (i.e. left player wins) ^ Ball is inside the field (i.e. game con...
module Pong.Physics (inertialMovement, collisions, BoundsCheck (..)) where import Lens.Micro import Lens.Micro.Extras import Pong.Motions import Pong.Types inertialMovement :: GameState -> GameState inertialMovement gameState = mvBall deltaX deltaY gameState where delta...
a9bc3632a084641e98059e97367b9449cae6a6edc9727af05aa95018a7f2353b
BinaryAnalysisPlatform/bap
bap_primus_lisp_attributes.mli
open Core_kernel[@@warning "-D"] open Bap_core_theory open Bap_primus_lisp_types module Attribute = Bap_primus_lisp_attribute module External : sig val t : String.Set.t Attribute.t end module Variables : sig val global : Set.M(Bap_primus_lisp_var).t Attribute.t val static : Set.M(Bap_primus_lisp_var).t Attribu...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_primus/bap_primus_lisp_attributes.mli
ocaml
open Core_kernel[@@warning "-D"] open Bap_core_theory open Bap_primus_lisp_types module Attribute = Bap_primus_lisp_attribute module External : sig val t : String.Set.t Attribute.t end module Variables : sig val global : Set.M(Bap_primus_lisp_var).t Attribute.t val static : Set.M(Bap_primus_lisp_var).t Attribu...
5b75cae9dfc57a4b5c48c4792d4e383d6714006ea9914f39c23934d24c71e1bd
skanev/playground
14-tests.scm
(require rackunit rackunit/text-ui) (load-relative "../../support/eopl.scm") (load-relative "../14.scm") (define (run code) (eval* code (empty-env))) (define (expval->schemeval val) (cases expval val (num-val (num) num) (bool-val (bool) bool) (emptylist-val () '()) (pair-val (car cdr) (cons ...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/03/tests/14-tests.scm
scheme
(require rackunit rackunit/text-ui) (load-relative "../../support/eopl.scm") (load-relative "../14.scm") (define (run code) (eval* code (empty-env))) (define (expval->schemeval val) (cases expval val (num-val (num) num) (bool-val (bool) bool) (emptylist-val () '()) (pair-val (car cdr) (cons ...
4eb9631f1197c82a0f8b262a59e978aa8922fba58b68e540a3539d1bd37a6ca3
egri-nagy/lambdago
self_capture_test.clj
(ns lgo.self-capture-test (:require [clojure.test :refer :all] [lgo.board :refer :all])) (deftest self-capture-test-3x3 (let [position (build-position [".X." "X.X" "..."]) eps (empty-points position)] (is (= 6 (count eps))...
null
https://raw.githubusercontent.com/egri-nagy/lambdago/58e714b5c8ff47743738e32ee2fadf4790e63591/test/lgo/self_capture_test.clj
clojure
(ns lgo.self-capture-test (:require [clojure.test :refer :all] [lgo.board :refer :all])) (deftest self-capture-test-3x3 (let [position (build-position [".X." "X.X" "..."]) eps (empty-points position)] (is (= 6 (count eps))...
a5be6e5688f31c80d03130e5ecc0c315e599229bb7bfd5a5e4f0924bb1aa69f3
jeluard/cljc-ethereum
parity.cljc
(ns ethereum.clients.parity "" (:require [ethereum.core :as ethereum] [ethereum.transports.http :as http] [ethereum.utils.json-rpc :as json-rpc])) (def default-http-port 8545) (def default-websocket-port 8546)
null
https://raw.githubusercontent.com/jeluard/cljc-ethereum/41fb6e1fc5cd870eca7daa690c2a19e4db08db9c/src/ethereum/clients/parity.cljc
clojure
(ns ethereum.clients.parity "" (:require [ethereum.core :as ethereum] [ethereum.transports.http :as http] [ethereum.utils.json-rpc :as json-rpc])) (def default-http-port 8545) (def default-websocket-port 8546)
60b932259b21cf4aa9e4618e1449298ff9035592601a2436d2d375e284a69fa3
LuKC1024/stacker
parse.rkt
#lang racket (provide parse) (require "io.rkt") (require syntax/parse) (require (only-in plait pair some none)) (define-syntax-class constant (pattern x:string) (pattern x:number) (pattern x:boolean) (pattern x:char) (pattern #(c:literal ...)) (pattern ((~datum quote) #(c:literal ...))) (pattern ((~datum...
null
https://raw.githubusercontent.com/LuKC1024/stacker/f768a34e13939464ba2bb02c57a128b982d36248/parse.rkt
racket
#lang racket (provide parse) (require "io.rkt") (require syntax/parse) (require (only-in plait pair some none)) (define-syntax-class constant (pattern x:string) (pattern x:number) (pattern x:boolean) (pattern x:char) (pattern #(c:literal ...)) (pattern ((~datum quote) #(c:literal ...))) (pattern ((~datum...
ad0aac6245eebc5876dbcb3ffd4ff991d9238a137b612c131a65290974f78742
0x0f0f0f/yasih
ParserSpec.hs
module ParserSpec (main, spec) where import Yasih.LispParser import Yasih.LispTypes import Test.Hspec import System.IO.Unsafe main :: IO () main = hspec spec spec :: Spec spec = -- From -you-a-scheme-v2/scheme/blob/master/test-hs/Spec.hs describe "Parsing Correctness" $ do it "Atom" $ ...
null
https://raw.githubusercontent.com/0x0f0f0f/yasih/d7cedc4e5b4ea5c6c59d2799bbd37524969f2467/test/ParserSpec.hs
haskell
From -you-a-scheme-v2/scheme/blob/master/test-hs/Spec.hs
module ParserSpec (main, spec) where import Yasih.LispParser import Yasih.LispTypes import Test.Hspec import System.IO.Unsafe main :: IO () main = hspec spec spec :: Spec spec = describe "Parsing Correctness" $ do it "Atom" $ readExpr "bb-8?" `shouldBe` (Right $ Atom "bb-8?") it "...
5ed1d3ce1a43c534474d95f2e7b816652872d26659160175de21bcc6d3e6c251
metaocaml/ber-metaocaml
t110-divint-3.ml
TEST include tool - ocaml - lib flags = " -w a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) open Lib;; try ignore (3 / 0); raise Not_found; with Division_by_zero -> (...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocaml/t110-divint-3.ml
ocaml
TEST include tool - ocaml - lib flags = " -w a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) open Lib;; try ignore (3 / 0); raise Not_found; with Division_by_zero -> (...
d7b9a8a416a3627d8e7a40948451013e4daffe5b4453428bf736b7bb3aa3da64
apache/dubbo-erlang
dubbo_reference_config.erl
%%------------------------------------------------------------------------------ Licensed to the Apache Software Foundation ( ASF ) under one or more %% contributor license agreements. See the NOTICE file distributed with %% this work for additional information regarding copyright ownership. The ASF licenses this ...
null
https://raw.githubusercontent.com/apache/dubbo-erlang/24e0c1a9028b50d2e9e05e3fe26f4e3335384acc/src/dubbo_reference_config.erl
erlang
------------------------------------------------------------------------------ contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES ...
Licensed to the Apache Software Foundation ( ASF ) under one or more The ASF licenses this file to You under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at distributed under the License is distr...
8c1d4beaa5782d953c9de81e44f351df14e6cc68fce3eed239df9188baf3d664
pink-gorilla/webly
redirect_handler.clj
(ns modular.oauth2.authorize.redirect-handler (:require [taoensso.timbre :as timbre :refer [debug info warn error]] [hiccup.page :as page] [ring.util.response :as response])) (defn page-oauth2-redirect [provider] (page/html5 {:mode :html} [:body [:div [:script {:src "/r/webly/redirect.js" ...
null
https://raw.githubusercontent.com/pink-gorilla/webly/ae37a2b0eb201bade5f909ebecfa63a60c3bd4ca/oauth2/src/modular/oauth2/authorize/redirect_handler.clj
clojure
(ns modular.oauth2.authorize.redirect-handler (:require [taoensso.timbre :as timbre :refer [debug info warn error]] [hiccup.page :as page] [ring.util.response :as response])) (defn page-oauth2-redirect [provider] (page/html5 {:mode :html} [:body [:div [:script {:src "/r/webly/redirect.js" ...
48b8295d9bd10e36bff371ae86c1f5701b57524ec66f53ccf212cd203cabe71e
davisp/couchdb
couch_replicator_worker.erl
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 distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/davisp/couchdb/b0420f9006915149e81607615720f32f21c76725/src/couch_replicator/src/couch_replicator_worker.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(couch_replicator_worker). -behaviour(gen_server). -export([start_link/5]). -export([init/1, terminate/2, code_change/3]). -export([handle_call/3, ...
453f555010cd6edb26f9088708b3d040fc00b973f0f03256bb80a0c12963d5ee
fpco/ide-backend
TestTools.hs
# LANGUAGE ScopedTypeVariables # module TestTools where import qualified Control.Exception as Ex import Data.Typeable (typeOf) import IdeSession.Util.PortableProcess import Test.HUnit (Assertion, assertBool, assertFailure) -- | Check that the given IO action raises the specified exception assertRaises :: (Ex.Exceptio...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/test/TestTools.hs
haskell
| Check that the given IO action raises the specified exception ^ Message displayed if assertion fails ^ Expected exception ^ Action to run | Find the type of an exception (only a few kinds of exceptions are supported) | Like 'raiseSignal', but with a more general type throwSignal :: Signal -> IO a throwSignal ...
# LANGUAGE ScopedTypeVariables # module TestTools where import qualified Control.Exception as Ex import Data.Typeable (typeOf) import IdeSession.Util.PortableProcess import Test.HUnit (Assertion, assertBool, assertFailure) assertRaises :: (Ex.Exception e, Show e) -> Assertion assertRaises msg checkEx p =...
7990bbda128773705eff78d45695bafad86473b252b38f45547c84545c7291ae
Kappa-Dev/KappaTools
priority.ml
* * priority.ml * * * Creation : < 2013 - 07 - 30 feret > * Last modification : Time - stamp : < 2016 - 02 - 19 14:21:19 > * * Causal flow compression : a module for * , projet Abstraction , INRIA Paris - Rocquencourt * , Université Paris - Diderot , CNRS ...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/cflow/priority.ml
ocaml
* * priority.ml * * * Creation : < 2013 - 07 - 30 feret > * Last modification : Time - stamp : < 2016 - 02 - 19 14:21:19 > * * Causal flow compression : a module for * , projet Abstraction , INRIA Paris - Rocquencourt * , Université Paris - Diderot , CNRS ...
fd2823e0f089abf8c0a422815fe2c3af0945c006dbfde76bc215d24fbbc7b08b
lingnand/VIMonad
NoBorders.hs
# LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses , TypeSynonymInstances # # LANGUAGE PatternGuards # ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.NoBorders Copyright : ( c ) < > -- License : BSD3-style (see LICE...
null
https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Layout/NoBorders.hs
haskell
--------------------------------------------------------------------------- | Module : XMonad.Layout.NoBorders License : BSD3-style (see LICENSE) Stability : unstable Portability : unportable Make a given layout display without borders. This is useful for full-screen or tabbed layouts, where yo...
# LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses , TypeSynonymInstances # # LANGUAGE PatternGuards # Copyright : ( c ) < > Maintainer : < > module XMonad.Layout.NoBorders ( noBorders, smartBorders, ...
76c569b33a485c4baf071a05dbdd282ba1ba88a68d0851bae140bb472ecbca73
RokLenarcic/datalevin-pathom
datalevin_pathom_test.clj
(ns org.clojars.roklenarcic.datalevin-pathom-test (:require [clojure.test :refer :all] [org.clojars.roklenarcic.datalevin-pathom.test-attributes :as a] [org.clojars.roklenarcic.test-db :as test-db] [org.clojars.roklenarcic.datalevin-pathom :as p] [org.clojars.roklenarci...
null
https://raw.githubusercontent.com/RokLenarcic/datalevin-pathom/5bd399b89dcb9511753aec7603ec1e4b92ec7f3d/test/org/clojars/roklenarcic/datalevin_pathom_test.clj
clojure
with subselects it works naturally without subselects
(ns org.clojars.roklenarcic.datalevin-pathom-test (:require [clojure.test :refer :all] [org.clojars.roklenarcic.datalevin-pathom.test-attributes :as a] [org.clojars.roklenarcic.test-db :as test-db] [org.clojars.roklenarcic.datalevin-pathom :as p] [org.clojars.roklenarci...
cf1b375f4f79539093968c5daf217bdb64787b34cdadcb39506ee1c0cb36f4ed
qkrgud55/ocamlmulti
scrapelabels.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , Kyoto...
null
https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/tools/scrapelabels.ml
ocaml
********************************************************************* OCaml ...
, Kyoto University RIMS Copyright 2001 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : scrapelabels.ml 11156 2011 - 07 - ...
8620357a070c803865db2a88d1735c2b511284a29d0fc2fb02070de3e8cd4e51
jvranish/TheExperiment
Statement.hs
module Language.TheExperiment.Parser.Statement where import Control.Applicative hiding ((<|>)) import Control.Monad import Text.Parsec import Text.Parsec.Indent import Language.TheExperiment.AST.Statement import Language.TheExperiment.Parser.Type import Language.TheExperiment.Parser.Lexer import Language.TheExperime...
null
https://raw.githubusercontent.com/jvranish/TheExperiment/54ca832d2f62a928a992b4c23dadf9653d13a5a7/src/Language/TheExperiment/Parser/Statement.hs
haskell
, stmtNodeData :: a , assignName :: String } , stmtNodeData :: a , ifThen :: Statement a , ifElse :: Maybe (Statement a) } , stmtNodeData :: a , whileBody :: Statement a } ...
module Language.TheExperiment.Parser.Statement where import Control.Applicative hiding ((<|>)) import Control.Monad import Text.Parsec import Text.Parsec.Indent import Language.TheExperiment.AST.Statement import Language.TheExperiment.Parser.Type import Language.TheExperiment.Parser.Lexer import Language.TheExperime...
264c9a0fb51e1f838b201f2ac531916f9ad2ebd73357338a786083201a6243b5
mbenke/zpf2013
PlusMinus2a.hs
import MyParsec2a import Data.Char(digitToInt) import Criterion.Main gen 0 = "1" gen n = ('1':'+':'1':'-':gen (n-1)) pNum :: Parser Int pNum = fmap digitToInt digit pExp = pNum `chainl1` addop addop = do{ char '+'; return (+) } <|> do{ char '-'; return (-) } test n = parse pExp "gen" (gen n) main = ...
null
https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/Parse1/PlusMinus2a.hs
haskell
import MyParsec2a import Data.Char(digitToInt) import Criterion.Main gen 0 = "1" gen n = ('1':'+':'1':'-':gen (n-1)) pNum :: Parser Int pNum = fmap digitToInt digit pExp = pNum `chainl1` addop addop = do{ char '+'; return (+) } <|> do{ char '-'; return (-) } test n = parse pExp "gen" (gen n) main = ...
aee0c92c8ec26de0924843a575ad3e2b6396262069e5514191c2e44b043fee62
c-cube/poc-modular-io
IO_gzip.mli
open IO val decode : ?buf_size:int -> In.t -> In.t val encode : ?buf_size:int -> Out.t -> Out.t val encode_in : ?buf_size:int -> In.t -> In.t
null
https://raw.githubusercontent.com/c-cube/poc-modular-io/cfc40b78b519cb187d77d2f17c575320dbec1a0a/src/IO_gzip.mli
ocaml
open IO val decode : ?buf_size:int -> In.t -> In.t val encode : ?buf_size:int -> Out.t -> Out.t val encode_in : ?buf_size:int -> In.t -> In.t
cc96276414c01b74087f5b8947f45596cd11c3f5b0c621bd9e0de6c3c0935e4e
aligusnet/mltool
Main.hs
module Main where import qualified Control.Monad.Random as RndM import qualified Numeric.LinearAlgebra as LA import MachineLearning.Clustering import qualified Data.Vector as V main = do putStrLn "\n=== K-Means Sample Application ===\n" Step 1 . Data loading . -- Step 1.1 Training Data loading. x <- LA...
null
https://raw.githubusercontent.com/aligusnet/mltool/92d74c4cc79221bfdcfb76aa058a2e8992ecfe2b/examples/kmeans/Main.hs
haskell
Step 1.1 Training Data loading.
module Main where import qualified Control.Monad.Random as RndM import qualified Numeric.LinearAlgebra as LA import MachineLearning.Clustering import qualified Data.Vector as V main = do putStrLn "\n=== K-Means Sample Application ===\n" Step 1 . Data loading . x <- LA.loadMatrix "linear_regression/data.t...
b2bcd2edc1dfb9233af49bad528245ae723de1d40506efa33ec9b6d68c190e6c
plum-umd/adapton.ocaml
experiments.ml
this is an old makefile example left for p4 reference , availability unknown make experiments OCAMLBUILD_EXTRAFLAGS='-ppflag " camlp4of -DADAPTON_LOG " ' this is an old makefile example left for p4 reference, availability unknown make experiments OCAMLBUILD_EXTRAFLAGS='-ppflag "camlp4of -DADAPTON_LOG "' *...
null
https://raw.githubusercontent.com/plum-umd/adapton.ocaml/a8e642ac1cc113b33e1837da960940c2dfcfa772/src/test/experiments.ml
ocaml
* ---------------------------------------------------------------------- checks for correctness after each change. is slower, as a result. Determine seed. Length of input lists Number of changes to perform on each input list Percent of output to demand to force after each change Number of distinct input lis...
this is an old makefile example left for p4 reference , availability unknown make experiments OCAMLBUILD_EXTRAFLAGS='-ppflag " camlp4of -DADAPTON_LOG " ' this is an old makefile example left for p4 reference, availability unknown make experiments OCAMLBUILD_EXTRAFLAGS='-ppflag "camlp4of -DADAPTON_LOG "' *...
6fd1031e751bc72f671420e5bfb1e9852d9bc27f030b672b9ed31839779d897f
tek/ribosome
PluginConfig.hs
|Global configuration for a Ribosome plugin . module Ribosome.Data.PluginConfig where import Ribosome.Data.PluginName (PluginName) import Ribosome.Host.Data.HostConfig (HostConfig) import Options.Applicative (Parser) import GHC.Show (showParen) import Text.Show (showsPrec) import Exon (exon) |The full configurati...
null
https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/ribosome/lib/Ribosome/Data/PluginConfig.hs
haskell
type for additional config defined by individual plugins. |Construct a simple 'PluginConfig' with the default config for the host, given the plugin's name.
|Global configuration for a Ribosome plugin . module Ribosome.Data.PluginConfig where import Ribosome.Data.PluginName (PluginName) import Ribosome.Host.Data.HostConfig (HostConfig) import Options.Applicative (Parser) import GHC.Show (showParen) import Text.Show (showsPrec) import Exon (exon) |The full configurati...
44f811ac647b265da9d408a7b9d923c88d312da20943b66f4e93ecc246f10b8b
mransan/btree
dbtlk_encoding.ml
The MIT License ( MIT ) Copyright ( c ) 2016 ( ) 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 ,...
null
https://raw.githubusercontent.com/mransan/btree/530cadca4d1569fc0a638d9fdbb1bd962fd8e171/src/dbtlk_encoding.ml
ocaml
MakeFixedLengthString first character is the length of the string
The MIT License ( MIT ) Copyright ( c ) 2016 ( ) 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 ,...
e95031d0e3ed07d7cba4ca2f1fafea0a8f2e59b9a8b5547410c7296c2f9c3df9
backtracking/mlpost
metapath_lib.ml
(**************************************************************************) (* *) Copyright ( C ) Johannes Kanig , , and (* *) (* This software is f...
null
https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/src/metapath_lib.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
Copyright ( C ) Johannes Kanig , , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking module P = Point_lib open Point_lib open Point_lib.Infix module S = Spline_lib let square x = x *. x ...
856dd6cadce3ca3c0b2775374a547f8f11b8a95054d13001cd097399a62c2b15
picrin-scheme/picrin
mkerror.scm
(let ((port (open-input-file "piclib/error.c"))) (let loop () (let ((c (read-u8 port))) (unless (eof-object? c) (write-u8 c) (loop))))) (for-each display `("\n" "#if PIC_USE_ERROR\n" "static ")) (let loop () (let ((c (read-u8))) (unless (eof-object? c) (write-u8 c) ...
null
https://raw.githubusercontent.com/picrin-scheme/picrin/2af16bc88fbfca2efafd27ca9e5006d73c06f6fb/tools/mkerror.scm
scheme
(let ((port (open-input-file "piclib/error.c"))) (let loop () (let ((c (read-u8 port))) (unless (eof-object? c) (write-u8 c) (loop))))) (for-each display `("\n" "#if PIC_USE_ERROR\n" "static ")) (let loop () (let ((c (read-u8))) (unless (eof-object? c) (write-u8 c) ...
e34dd769bfe7b382bc50aa396232cac79052f06b98ea902662cc5d1980e8b722
thelema/ocaml-community
mtype.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/typing/mtype.ml
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 Q Public License version 1.0 . open Asttypes open Path open Types l...
3a4fe36d9f84eb356d6c69394e331e4eb7a25ca619798ed68c5ebcb4f7c6a55f
ptol/oczor
Errors.hs
module Oczor.Syntax.Errors where import Oczor.Syntax.Ast import ClassyPrelude hiding (TVar) type Error = (ErrorType, AstPosition) data ErrorType = ParserError String | UnificationFail TypeExpr TypeExpr | InfiniteType String TypeExpr | TextError String | CircularDependency [ModuleName] | NoInstance TypeExp...
null
https://raw.githubusercontent.com/ptol/oczor/77255e3c1b3decb956d53754cd3f2ac0ae746c67/src/Oczor/Syntax/Errors.hs
haskell
module Oczor.Syntax.Errors where import Oczor.Syntax.Ast import ClassyPrelude hiding (TVar) type Error = (ErrorType, AstPosition) data ErrorType = ParserError String | UnificationFail TypeExpr TypeExpr | InfiniteType String TypeExpr | TextError String | CircularDependency [ModuleName] | NoInstance TypeExp...
0ffcd110d4c416a416148b77745ac962fe43007f99bfb73eccad283793b8dda9
RBornat/jape
minwaste.ml
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either ve...
null
https://raw.githubusercontent.com/RBornat/jape/afe9f207e89e965636b43ef8fad38fd1f69737ae/distrib/camlengine/minwaste.ml
ocaml
just look at waste we have gone past the best point, I believe
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either ve...
1085e7eaf534046e3734547073a02d29dd61412ff3499bb22985102d95bc63a1
IvanMartinez/oauth2_webmachine
oauth2_webmachine.erl
@author author < > YYYY author . %% @doc oauth2_webmachine startup code -module(oauth2_webmachine). -author('author <>'). -export([start/0, start_link/0, stop/0]). ensure_started(App) -> case application:start(App) of ok -> ok; {error, {already_started, App}} -> ok ...
null
https://raw.githubusercontent.com/IvanMartinez/oauth2_webmachine/d4b358167bdb2129989a4bec71753ab75044ad69/src/oauth2_webmachine.erl
erlang
@doc oauth2_webmachine startup code @doc Starts the app for inclusion in a supervisor tree @doc Start the oauth2_webmachine server. @doc Stop the oauth2_webmachine server.
@author author < > YYYY author . -module(oauth2_webmachine). -author('author <>'). -export([start/0, start_link/0, stop/0]). ensure_started(App) -> case application:start(App) of ok -> ok; {error, {already_started, App}} -> ok end. ( ) - > { ok , Pid::pid ( ...
b5e3beb5b9a0a8d468409fd1c1e7da6d89f3661a53d6bf8fa374606b5f5b77a6
yetanalytics/xapipe
xapipe.clj
(ns com.yetanalytics.xapipe (:require [clojure.core.async :as a] [clojure.java.io :as io] [clojure.spec.alpha :as s] [clojure.tools.logging :as log] [com.yetanalytics.xapipe.client :as client] [com.yetanalytics.xapipe.client.multipart-mixed :as mm] ...
null
https://raw.githubusercontent.com/yetanalytics/xapipe/c2c0a41590138a2a8c7bfedc46fd6e02dae4b263/src/lib/com/yetanalytics/xapipe.clj
clojure
Emit NOVEL States add any errors and flush the metrics before continue A stop is called! If we have statements, post them Form a post request Use the conn + client On success, update the cursor and keep listening If the post fails, Send the error to the stop channel emit and stop. If there are no statements t...
(ns com.yetanalytics.xapipe (:require [clojure.core.async :as a] [clojure.java.io :as io] [clojure.spec.alpha :as s] [clojure.tools.logging :as log] [com.yetanalytics.xapipe.client :as client] [com.yetanalytics.xapipe.client.multipart-mixed :as mm] ...
bbe00e347a9aafcceb0f5677fc856595ba18de13d791173404a019a009ee3a0c
Chris00/ocaml-curve-sampling
curve_sampling.ml
open Printf open Gg module Rnd = Random.State let rnd = Rnd.make_self_init() let is_finite (x: float) = x -. x = 0. [@@inline] type point = { t: float; (* parameter, MUST be finite *) x: float; (* valid ⇔ is_finite x (and thus is_finite y) *) y: float; mutable cost: float; (* cache the cost for faste...
null
https://raw.githubusercontent.com/Chris00/ocaml-curve-sampling/4235ae6fdc348832a7dfad54636d7ca0876fe00b/src/curve_sampling.ml
ocaml
parameter, MUST be finite valid ⇔ is_finite x (and thus is_finite y) cache the cost for faster updates of segments. See module {!Cost}. pure float record ⇒ optimized WARNING: Because of mutability, segments may only belong to at most one sampling. Segments are ordered by incre...
open Printf open Gg module Rnd = Random.State let rnd = Rnd.make_self_init() let is_finite (x: float) = x -. x = 0. [@@inline] type point = { y: float; let dummy_point = { t = nan; x = nan; y = nan; cost = nan } let is_valid p = is_finite p.x [@@inline] let point ~t ~x ~y ~cost = { t; x = (if is_finite ...
89ff603057ea3ca1ee15986cb89b85a800612dca27f3c524ffe9e7f2cde5fed2
chetmurthy/typpx
ppx.ml
include Typpx.Make.F(struct let tool_name = "ppx_curried_constr" let args = [] let firstUntypedTransformation = Typpx.Default.untyped_identity module Typemod = My_typemod module TypedTransformation = Typpx.Default.Typed_identity let lastUntypedTransformation = Typpx.Default.untyped_identity end) ;; legacy_m...
null
https://raw.githubusercontent.com/chetmurthy/typpx/a740750b75739e686da49b46ded7db7d6874e108/examples/ppx_curried_constr/ppx.ml
ocaml
include Typpx.Make.F(struct let tool_name = "ppx_curried_constr" let args = [] let firstUntypedTransformation = Typpx.Default.untyped_identity module Typemod = My_typemod module TypedTransformation = Typpx.Default.Typed_identity let lastUntypedTransformation = Typpx.Default.untyped_identity end) ;; legacy_m...
1dbae1409e87518570a751e9169bf56f9745abac94267926f75d7bfeb87add58
monadbobo/ocaml-core
comparable_test.ml
open OUnit;; open Core.Std module F (M : sig type t include Comparable.S with type t := t val one : t val two : t val three : t end) : sig val test : OUnit.test end = struct open M let equal = M.(=) let (=) = Bool.equal let test = let foreach f = f one; f two; f three in "com...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib_test/comparable_test.ml
ocaml
open OUnit;; open Core.Std module F (M : sig type t include Comparable.S with type t := t val one : t val two : t val three : t end) : sig val test : OUnit.test end = struct open M let equal = M.(=) let (=) = Bool.equal let test = let foreach f = f one; f two; f three in "com...
451c7a4939c7e2eb1e22b6e3623cd98f49d47099a09e7f4702fe9336f3d72acd
facebook/infer
symbolic_heap.mli
* 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/symbolic_heap.mli
ocaml
* Symbolic Heap Formulas * Quantifier-Free Symbolic Heap Formulas * Segment of memory * location (address) where segment starts * base address of enclosing allocation-block * length of enclosing allocation-block * size of segment / length of the contents * contents of segment, a sequence / byte array * Quantifi...
* 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 ...