_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 |
|---|---|---|---|---|---|---|---|---|
2af32d5902bf7b9b1a226399b4e67d2127c4b9f6f1026ad9bfe06665ea62892c | poscat0x04/telegram-types | Game.hs | module Web.Telegram.Types.Game
( Game (..),
GameHighScore (..),
)
where
import Web.Telegram.Types.Internal.Game
import Web.Telegram.Types.Internal.GameHighScore
| null | https://raw.githubusercontent.com/poscat0x04/telegram-types/c09ccc81cff10399538894cf2d1273022c797e18/src/Web/Telegram/Types/Game.hs | haskell | module Web.Telegram.Types.Game
( Game (..),
GameHighScore (..),
)
where
import Web.Telegram.Types.Internal.Game
import Web.Telegram.Types.Internal.GameHighScore
| |
31d76ba4fe8bf66500e9c400ad46085227f7edc8c5bb2b3b9c6bc43013001c59 | ates/bb | bb_trade.erl | -module(bb_trade).
-behaviour(gen_server).
-export([start_link/0]).
-export([stop/0]).
-export([init/1]).
-export([handle_call/3]).
-export([handle_cast/2]).
-export([handle_info/2]).
-export([code_change/3]).
-export([terminate/2]).
-include("bb.hrl").
-record(state, {
symbol :: string(),
rea... | null | https://raw.githubusercontent.com/ates/bb/a189335a2912e589b61d43e589f53edce6fa8421/src/bb_trade.erl | erlang | Sell quantity | -module(bb_trade).
-behaviour(gen_server).
-export([start_link/0]).
-export([stop/0]).
-export([init/1]).
-export([handle_call/3]).
-export([handle_cast/2]).
-export([handle_info/2]).
-export([code_change/3]).
-export([terminate/2]).
-include("bb.hrl").
-record(state, {
symbol :: string(),
rea... |
b58d169f942971a7bf18b5f03c97e0f2992d690cf2c53360b6c88ffa2ff16fa4 | BinRoot/Haskell-Data-Analysis-Cookbook | Main2.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DeriveGeneric #
import Data.Aeson
import qualified Data.ByteString.Lazy as B
import GHC.Generics
data Mathematician = Mathematician { name :: String
, nationality :: String
, born :: Int
... | null | https://raw.githubusercontent.com/BinRoot/Haskell-Data-Analysis-Cookbook/f8c46987d78f4a6c1828b353c5f906b9314c2ef9/Ch01/Code04_json/Main2.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
import Data.Aeson
import qualified Data.ByteString.Lazy as B
import GHC.Generics
data Mathematician = Mathematician { name :: String
, nationality :: String
, born :: Int
, died :: Maybe ... |
8e513375c386969a233f880128659f98bf9b270e42e4b6161f5c2064f5f5950a | weavejester/build | write_pom.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/weavejester/build/61b75ad6302c38c42b0e355b068e464fe69e6319/src/weavejester/build/write_pom.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns weavejester.build.write-pom
(:require [clojure.java.io :as jio]
[clojure.string :as str]
[clojure.data.xml :as xml]
[clojure.tools.deps.alpha.util.maven :as maven]
[clojure.tools.deps.alpha.util.io :refer [printerrln]]
... |
a53908d057bf0dd9c5de5b67415f5ccf34e45c21f1506445f5093e61951b988f | tweag/asterius | dsrun001.hs | Check that list comprehensions can be written
in do - notation . This actually broke 2.02 , with
a pattern match failure in dsListComp !
in do-notation. This actually broke 2.02, with
a pattern match failure in dsListComp!
-}
module Main where
main = putStrLn (show theList... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/deSugar/dsrun001.hs | haskell | Check that list comprehensions can be written
in do - notation . This actually broke 2.02 , with
a pattern match failure in dsListComp !
in do-notation. This actually broke 2.02, with
a pattern match failure in dsListComp!
-}
module Main where
main = putStrLn (show theList... | |
fa876b05a0e10117549996e16306071bea241e4492508a9876ae361c54ca4d16 | kelamg/HtDP2e-workthrough | ex32&33.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex32&33) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex32%2633.rkt | racket | about the language level of this file in a form that our tools can easily process. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex32&33) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/universe)
(require 2htdp/image)
(define (number-... |
4fa44024fe1ca2cdb6bdc91de3b36123a4f611b24d33c20da0a894eecf2d126c | cerner/clara-rules | other_ruleset.clj | (ns clara.other-ruleset
(:use clara.rules
clara.rules.testfacts)
(:refer-clojure :exclude [==])
(:import [clara.rules.testfacts
Temperature
WindSpeed
Cold
ColdAndWindy
LousyWeather]))
(defrule is-lousy
(ColdAndWindy (= temperature 15))
=>
... | null | https://raw.githubusercontent.com/cerner/clara-rules/8107a5ab7fdb475e323c0bcb39084a83454deb1c/src/test/clojure/clara/other_ruleset.clj | clojure | These rules are used for unit testing loading from a namespace. | (ns clara.other-ruleset
(:use clara.rules
clara.rules.testfacts)
(:refer-clojure :exclude [==])
(:import [clara.rules.testfacts
Temperature
WindSpeed
Cold
ColdAndWindy
LousyWeather]))
(defrule is-lousy
(ColdAndWindy (= temperature 15))
=>
... |
7760340a715702eb94ab1aafef1137b607ef9ac2b2217761848ff27339ce0940 | joneshf/open-source | Package.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE PackageImports #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Shake.Package
( Package(..)
, haskell
, go
, inputs
, javaScript
, packageType
, rules
, writeDha... | null | https://raw.githubusercontent.com/joneshf/open-source/e3412fc68c654d89a8d3af4e12ac19c70e3055ec/Shake/Package.hs | haskell | # LANGUAGE PackageImports # | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Shake.Package
( Package(..)
, haskell
, go
, inputs
, javaScript
, packageType
, rules
, writeDhall
) where
import "base" Cont... |
57cbf6fb4d6b2b714e276805d5c79ffb77f95dba9ea29b3125981ea8164e9d09 | henryw374/cljc.java-time | zone_id.cljs | (ns cljc.java-time.zone-id (:refer-clojure :exclude [abs get range format min max next name resolve short]) (:require [cljc.java-time.extn.calendar-awareness] [goog.object] [java.time :refer [ZoneId]]))
(def short-ids (goog.object/get java.time.ZoneId "SHORT_IDS"))
(clojure.core/defn get-available-zone-ids {:arglists (... | null | https://raw.githubusercontent.com/henryw374/cljc.java-time/2e47e8104bc2ec7f68a01bf751a7b9a2dee391b4/src/cljc/java_time/zone_id.cljs | clojure | (ns cljc.java-time.zone-id (:refer-clojure :exclude [abs get range format min max next name resolve short]) (:require [cljc.java-time.extn.calendar-awareness] [goog.object] [java.time :refer [ZoneId]]))
(def short-ids (goog.object/get java.time.ZoneId "SHORT_IDS"))
(clojure.core/defn get-available-zone-ids {:arglists (... | |
d0daa62e3264d071551ef2465c0617149790af7667223b6cd52c121c601aa1d8 | pixlsus/registry.gimp.org_static | animation-rotation.scm | ;;; animation-rotation.scm
Date : < 2012 - 06 - 18 14:50 >
Author : < >
Version 1.11
Version 1.11 for Gimp 2.4 and later
;;; This helps create simple rotating animations.
;;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as pub... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/animation-rotation.scm | scheme | animation-rotation.scm
This helps create simple rotating animations.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABIL... | Date : < 2012 - 06 - 18 14:50 >
Author : < >
Version 1.11
Version 1.11 for Gimp 2.4 and later
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
... |
2f3923ef80a3c3e406a7acf18c692381019c9e7022d4f528de24d171433960d9 | bsansouci/bsb-native | oprint.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
Proje... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/typing/oprint.mli | ocaml | *********************************************************************
OCaml
... | Projet Cristal , INRIA Rocquencourt
Copyright 2002 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 Format
open Outcometree
... |
d95344272eb0e6bc2d48cddd94e36c2cd4d16086461283e6dc32a632752a817a | pesterhazy/boot-fmt | core_test.clj | (ns boot-fmt.core-test
(:require [boot-fmt.core :refer :all]
[clojure.test :refer :all]))
(deftest exercise [] (process-many ["test/files/response.clj"]) (is (= 1 1)))
| null | https://raw.githubusercontent.com/pesterhazy/boot-fmt/7a4bc5faac183b8793a8157b51b1b61eeff2e43b/src/boot_fmt/core_test.clj | clojure | (ns boot-fmt.core-test
(:require [boot-fmt.core :refer :all]
[clojure.test :refer :all]))
(deftest exercise [] (process-many ["test/files/response.clj"]) (is (= 1 1)))
| |
65507494ba2340b4ce0e94346995b9e563fe85fb26c5cd07c350900ef120a7bd | kowainik/treap | Common.hs | module Test.Common
( TestTreap
, smallTreap
, extractSum
, with
, describedAs
) where
import Data.Monoid (Sum (..))
import GHC.Exts (IsList (..))
import Test.Hspec.Expectations (Expectation, shouldBe)
import Treap (RTreap, measure)
-- | Specialized version of 'RTreap' for t... | null | https://raw.githubusercontent.com/kowainik/treap/bd59f0ff0a938d7b67ebf5266427e100fce8e487/test/Test/Common.hs | haskell | | Specialized version of 'RTreap' for testing. | module Test.Common
( TestTreap
, smallTreap
, extractSum
, with
, describedAs
) where
import Data.Monoid (Sum (..))
import GHC.Exts (IsList (..))
import Test.Hspec.Expectations (Expectation, shouldBe)
import Treap (RTreap, measure)
type TestTreap = RTreap (Sum Int) Int
|... |
02775f4d8ce54a0002e0523cd5c4a118eeb72ac65d947fd5cf779097bbd3c810 | Lovesan/doors | package.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
Copyright ( C ) 2010 - 2011 , < >
;;; 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 lim... | null | https://raw.githubusercontent.com/Lovesan/doors/12a2fe2fd8d6c42ae314bd6d02a1d2332f12499e/com/package.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do... |
Copyright ( C ) 2010 - 2011 , < >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-packag... |
a89963b0d2b557f6fe82d84bd6c2ebb9739736d90f19ff1b59123b0ced551e50 | DSiSc/why3 | intro_vc_vars_counterexmp.mli | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/transform/intro_vc_vars_counterexmp.mli | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
val intro_vc_vars_counterexmp : Task.task Trans.trans
* Finds the position of the term t_vc that trigger V... |
317706b7776787ed1bb4f010a03f8669a3d4ebf38fef5ed7bc1b7b09366aed3e | acieroid/scala-am | test.scm | (define (f x) x)
(define x 1)
(set! x "hello")
(f x) | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/test.scm | scheme | (define (f x) x)
(define x 1)
(set! x "hello")
(f x) | |
0b6b048cd89a7a79b4c21ae2080558f804edb8ecd841ffb72cb80c7f9d5c9039 | ErlyORM/boss_db | boss_news_sup.erl | -module(boss_news_sup).
-behaviour(supervisor).
-export([start_link/0, start_link/1]).
-export([init/1]).
start_link() ->
start_link([]).
start_link(StartArgs) ->
supervisor:start_link({global, ?MODULE}, ?MODULE, StartArgs).
init(StartArgs) ->
{ok, {{one_for_one, 10, 10}, [
{news_contr... | null | https://raw.githubusercontent.com/ErlyORM/boss_db/20060a061d3c4120929e4a4fedae1bb5e5830426/src/boss_news_sup.erl | erlang | -module(boss_news_sup).
-behaviour(supervisor).
-export([start_link/0, start_link/1]).
-export([init/1]).
start_link() ->
start_link([]).
start_link(StartArgs) ->
supervisor:start_link({global, ?MODULE}, ?MODULE, StartArgs).
init(StartArgs) ->
{ok, {{one_for_one, 10, 10}, [
{news_contr... | |
a32a7816d1376881e80842a0342c3ce0a9bd262d056c8afbd6906f6c5f714c65 | Raynes/fs | project.clj | (defproject me.raynes/fs "1.4.6"
:description "File system utilities for clojure"
:license {:name "Eclipse Public License - v 1.0"
:url "-v10.html"}
:url ""
:dependencies [[org.clojure/clojure "1.4.0"]
[org.apache.commons/commons-compress "1.8"]]
:plugins [[lein-midje "3.1.3"]
... | null | https://raw.githubusercontent.com/Raynes/fs/147f7b30d2c3c7e773a3650bf16a7b5720acfde8/project.clj | clojure | (defproject me.raynes/fs "1.4.6"
:description "File system utilities for clojure"
:license {:name "Eclipse Public License - v 1.0"
:url "-v10.html"}
:url ""
:dependencies [[org.clojure/clojure "1.4.0"]
[org.apache.commons/commons-compress "1.8"]]
:plugins [[lein-midje "3.1.3"]
... | |
804c9e5ab9aa633cd054881383338de5f74cb456893ee0a5a018a83f8e3c8877 | dinosaure/bob | bob_clear.ml | include Bob_unix.Make (Clear)
| null | https://raw.githubusercontent.com/dinosaure/bob/bd71a9f053c4e8f92dfd02009c6f8e92775f12ed/bin/bob_clear.ml | ocaml | include Bob_unix.Make (Clear)
| |
4ae3a2e77610dd6a5b2c7248d717e9d2afea80079f7cb59c25ec56995439a3e0 | hammerlab/coclobas | local_docker_job.mli |
open Internal_pervasives
module Specification : sig
type t = {
image: string;
command: string list [@main];
volume_mounts: [ `Local of string * string ] list;
memory: [ `GB of int | `MB of int ] option;
cpus: float option;
} [@@deriving yojson, show, make]
end
val start :
log:Log.t ->
id:... | null | https://raw.githubusercontent.com/hammerlab/coclobas/5341ea53fdb5bcea0dfac3e4bd94213b34a48bb9/src/lib/local_docker_job.mli | ocaml |
open Internal_pervasives
module Specification : sig
type t = {
image: string;
command: string list [@main];
volume_mounts: [ `Local of string * string ] list;
memory: [ `GB of int | `MB of int ] option;
cpus: float option;
} [@@deriving yojson, show, make]
end
val start :
log:Log.t ->
id:... | |
44a416a448c1e9cf65a014b7959f48ddfe492e7461cff994f16b51f981988831 | runtimeverification/haskell-backend | Rewrite.hs | # LANGUAGE TemplateHaskell #
|
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Strategy - based interface to rule application ( step - wise execution ) .
Copyright : (c) Runtime Verification, 2018-2021
License : BSD-3-Clause
Strategy-based interface to rule appli... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/efeb976108a0baa202844386193695564a257540/kore/src/Kore/Rewrite.hs | haskell | * Re-exports
| The program's state during symbolic execution.
| The beginning of an execution step.
| The configuration was rewritten after applying
the rewrite rules.
| The configuration is a remainder resulting
from rewrite rule application.
| The execution step yields no children
| The sequence of transitio... | # LANGUAGE TemplateHaskell #
|
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Strategy - based interface to rule application ( step - wise execution ) .
Copyright : (c) Runtime Verification, 2018-2021
License : BSD-3-Clause
Strategy-based interface to rule appli... |
cd35f75b24191c36407bd7afab53a2895942e95477af64b8077d6f60ee78daea | FreeProving/free-compiler | RenamerTests.hs | | This module contains tests for " FreeC.Environment . " .
module FreeC.Environment.RenamerTests where
import Data.Maybe ( mapMaybe )
import Test.Hspec
import Test.QuickCheck
import qualified FreeC.Backend.Coq.Base as Coq.Base
import FreeC.Backend.Coq.Key... | null | https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/test/FreeC/Environment/RenamerTests.hs | haskell | | Test group for all @FreeC.Environment.Renamer@ tests.
-----------------------------------------------------------------------------
Test Identifiers --
-----------------------------------------------------------------------------
| Generator for arbitrary id... | | This module contains tests for " FreeC.Environment . " .
module FreeC.Environment.RenamerTests where
import Data.Maybe ( mapMaybe )
import Test.Hspec
import Test.QuickCheck
import qualified FreeC.Backend.Coq.Base as Coq.Base
import FreeC.Backend.Coq.Key... |
dcf32a94bef7ff19c0d2f3b14485862873b96c14fcd1951c0473cdb80c638e86 | apache/couchdb-rebar | neotoma.erl | -module(neotoma).
-author("Sean Cribbs <>").
-export([file/1, file/2, bootstrap/0]).
-export([main/1]).
-define(ALL_COMBINATORS, [p_eof, p_optional, p_not, p_assert, p_seq,
p_choose, p_zero_or_more, p_one_or_more, p_label, p_scan,
p_string, p_anything, p_charclass, p_regexp, line, column]).
-type opti... | null | https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/inttest/neotoma1/mock/neotoma/src/neotoma.erl | erlang | escript:script_name does what we want.
@doc Generates a parser from the specified file.
@equiv file(Filename, [])
@doc Generates a parser from the specified file with the given options.
@doc Bootstraps the neotoma metagrammar. Intended only for internal development!
@equiv file("src/neotoma_parse.peg") | -module(neotoma).
-author("Sean Cribbs <>").
-export([file/1, file/2, bootstrap/0]).
-export([main/1]).
-define(ALL_COMBINATORS, [p_eof, p_optional, p_not, p_assert, p_seq,
p_choose, p_zero_or_more, p_one_or_more, p_label, p_scan,
p_string, p_anything, p_charclass, p_regexp, line, column]).
-type opti... |
dfa804d9041fbc16a801f9f436b8ca8f73cde5a6383b0c3578b47f38d9983a7c | jellelicht/guix | gettext.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public Licens... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/gettext.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages gettex... |
a6ddbee8c72af8aa5688fab7c9fe46361f9f91793786b73b190fcfbe340b9ad9 | plewto/Cadejo | controller_editor.clj | (println " --> xolotl.ui.controller-editor")
(ns xolotl.ui.controller-editor
(:require [xolotl.util :as util])
(:require [xolotl.ui.factory :as factory])
(:import javax.swing.event.ChangeListener))
(def ^:private msg00 "Controller parse error: %s")
(def ^:private msg01 "Empty controller pattern")
;; Converts... | null | https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/xolotl/ui/controller_editor.clj | clojure | Converts list of MIDI controller values to string
RETURNS: list (s err)
Where s is the converted string and err is an error message.
If no error has occurred err is an empty string.
Convert string into list of MIDI controller values.
Test for valid controller pattern
If pattern is valid return false.
If p... | (println " --> xolotl.ui.controller-editor")
(ns xolotl.ui.controller-editor
(:require [xolotl.util :as util])
(:require [xolotl.ui.factory :as factory])
(:import javax.swing.event.ChangeListener))
(def ^:private msg00 "Controller parse error: %s")
(def ^:private msg01 "Empty controller pattern")
(defn- cont... |
6e40c5aed812784807a50816b30077f71d9d91f1b56199d4a6d7ee7eda314c10 | zack-bitcoin/amoveo | contract_simplify_tx.erl | -module(contract_simplify_tx).
-export([go/4, make_dict/7,
apply_matrix2vector/2,
apply_matrix2matrix/2]).
-include("../../records.hrl").
make_dict(Pubkey, CID, CID2, CID3, Matrix, PayoutVector, Fee) ->
A = trees:get(accounts, Pubkey),
Nonce = A#acc.nonce + 1,
#contract_simplify_tx{from... | null | https://raw.githubusercontent.com/zack-bitcoin/amoveo/2d5755abd80f0852ab2faf3f1fda83c76de07f93/apps/amoveo_core/src/consensus/txs/contract_simplify_tx.erl | erlang | true -> none
end,
Row = hd(Matrix),
this way you are forced to simplify starting at the more efficient end. | -module(contract_simplify_tx).
-export([go/4, make_dict/7,
apply_matrix2vector/2,
apply_matrix2matrix/2]).
-include("../../records.hrl").
make_dict(Pubkey, CID, CID2, CID3, Matrix, PayoutVector, Fee) ->
A = trees:get(accounts, Pubkey),
Nonce = A#acc.nonce + 1,
#contract_simplify_tx{from... |
c5e87bfae8d65c2ffcd5e698b3f32d0357c8a3fe8c7fe0f1fa1f39e1b7156340 | funcool/buddy-core | keys_tests.clj | Copyright 2014 - 2015 < >
;;
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 un... | null | https://raw.githubusercontent.com/funcool/buddy-core/bd31ff9b802e689b046afae0f8c29ed70bb15ab5/test/buddy/core/keys_tests.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2014 - 2015 < >
Licensed under the Apache License , Version 2.0 ( the " License " )
distributed under the License is distributed on an " AS IS " BASIS ,
(ns buddy.core.keys-tests
(:require [clojure.test :refer :all]
[buddy.core.codecs :refer :all]
[buddy.core.nonce :as nonc... |
327f0ab65e3bcda794ff047a77cfcb714f8aee0c06365b6356b1a42d7519ff67 | ocaml-sf/learn-ocaml-corpus | template.ml | (* Addition of requirements. *)
let (++) (req1 : req) (req2 : req) : req =
(* TO DO: Define this function. *)
raise TODO
(* Comparison of requirements. *)
let (<==) (req1 : req) (req2 : req) : bool =
(* TO DO: Define this function. *)
raise TODO
(* Determining the space requirement of a document. *)
(* Thi... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/pprint/template.ml | ocaml | Addition of requirements.
TO DO: Define this function.
Comparison of requirements.
TO DO: Define this function.
Determining the space requirement of a document.
This function is expected to run in constant time.
TO DO: Define this function.
Smart constructors.
TO DO: Define this function.
TO DO: Defi... |
let (++) (req1 : req) (req2 : req) : req =
raise TODO
let (<==) (req1 : req) (req2 : req) : bool =
raise TODO
let rec requirement (doc : doc) : req =
raise TODO
let empty : doc =
Empty
let hardline : doc =
HardLine
let char (c : char) : doc =
raise TODO
let (^^) (doc1 : doc) (doc2 : doc) : doc =
... |
d3ac01888890fa94a4a1e15c9ea87b8b2408f02222e29aaae8b033c245b47527 | richhickey/clojure-contrib | examples_finite_distributions.clj | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Probability distribution application examples
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/examples/clojure/clojure/contrib/probabilities/examples_finite_distributions.clj | clojure |
Probability distribution application examples
Simple examples using dice
A single die is represented by a uniform distribution over the
The probability that the result is odd...
The sum of n dice
Using an ordinary counter:
Or, more efficiently, using a counter that already keeps track of its total:
(see ... |
(ns
#^{:author "Konrad Hinsen"
:skip-wiki true
:doc "Examples for finite probability distribution"}
clojure.contrib.probabilities.examples-finite-distributions
(:use [clojure.contrib.probabilities.finite-distributions
:only (uniform prob cond-prob join-with dist-m choose
normalize certainly ... |
7811ab8296f6cc189725957206f2f37702cb7039dd8117683718db84c9252e29 | hiroshi-unno/coar | mem.ml | (*
USED: PEPM2013 as mem
*)
let rec mem (x:int) xs =
match xs with
[] -> false
| x'::xs -> x = x' || mem x xs
let rec make_list n (x:int) =
if n < 0
then []
else x :: make_list (n-1) x
let is_nil (xs:int list) =
match xs with
[] -> true
| _ -> false
let main n m =
let xs = make_list ... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/benchmarks/OCaml/safety/tacas2015/mem.ml | ocaml |
USED: PEPM2013 as mem
|
let rec mem (x:int) xs =
match xs with
[] -> false
| x'::xs -> x = x' || mem x xs
let rec make_list n (x:int) =
if n < 0
then []
else x :: make_list (n-1) x
let is_nil (xs:int list) =
match xs with
[] -> true
| _ -> false
let main n m =
let xs = make_list n m in
assert (is_nil xs... |
5eeb10ab24d3783409be04b8cb81b99edb11321f7c747e84140ca62dcb2cd8cc | ocaml-gospel/ortac | ortac_default.mli | val generate : string -> out_channel -> unit
(** [generate path out] generate the code of the tests corresponding to the
specifications present in [path] in the default configuration and print it
on the [out] channel *)
| null | https://raw.githubusercontent.com/ocaml-gospel/ortac/3635d29f2d709bd7384098ceb6a8d7415b339656/src/default/ortac_default.mli | ocaml | * [generate path out] generate the code of the tests corresponding to the
specifications present in [path] in the default configuration and print it
on the [out] channel | val generate : string -> out_channel -> unit
|
0cbea0d3fd85e7a094e5c10e76d572eb0499bc831848d81fec5850cb8adcad15 | illiichi/orenolisp | window_position.clj | (ns orenolisp.view.controller.window-position
(:require [orenolisp.util :as u]))
(def window-margin 10)
(defn- corners [{:keys [position size]} margin]
(let [x1 (:x position)
y1 (:y position)]
[(- x1 margin) (- y1 margin) (+ x1 (:w size) margin) (+ y1 (:h size) margin)]))
(defn- calcurate-overwrapped... | null | https://raw.githubusercontent.com/illiichi/orenolisp/7b085fb687dbe16b5cbe8c739238bbaf79156814/src/orenolisp/view/controller/window_position.clj | clojure | (ns orenolisp.view.controller.window-position
(:require [orenolisp.util :as u]))
(def window-margin 10)
(defn- corners [{:keys [position size]} margin]
(let [x1 (:x position)
y1 (:y position)]
[(- x1 margin) (- y1 margin) (+ x1 (:w size) margin) (+ y1 (:h size) margin)]))
(defn- calcurate-overwrapped... | |
5503f9c67b0308d18251290a55e3d8959e4ff2d510a043aef765df52110ba2f4 | mediocregopher/chdl | contracts.clj | (ns chdl.beta.contracts
"A collection of helpful checks to aid in error reporting")
(defn hashmap-has? [hashmap keys]
(every? (partial contains? hashmap) keys))
| null | https://raw.githubusercontent.com/mediocregopher/chdl/b48b33e9215a84fbcdfa3f15446efc092c86d079/src/chdl/beta/contracts.clj | clojure | (ns chdl.beta.contracts
"A collection of helpful checks to aid in error reporting")
(defn hashmap-has? [hashmap keys]
(every? (partial contains? hashmap) keys))
| |
548a4c9c222fa5db6d0b60d0a83bf98aa0bdc4c1155449d2ac2ffe1caf26da59 | marick/fp-oo | ts_arrows.clj | (ns solutions.ts-arrows
(:use midje.sweet))
;;; It's enough just to run the code.
(load-file "solutions/arrows.clj")
| null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/test/solutions/ts_arrows.clj | clojure | It's enough just to run the code. | (ns solutions.ts-arrows
(:use midje.sweet))
(load-file "solutions/arrows.clj")
|
5434dfcfae430c651839b50a9775be7000cbb3b18125e4793c1c8be288c5d741 | squirrel-prover/squirrel-prover | type.ml | open Utils
(*------------------------------------------------------------------*)
(** Type variables *)
type tvar = Ident.t
type tvars = tvar list
let pp_tvar fmt id = Fmt.pf fmt "'%a" Ident.pp id
let mk_tvar s = Ident.create s
let ident_of_tvar id = id
(*---------------------------------------------------------... | null | https://raw.githubusercontent.com/squirrel-prover/squirrel-prover/d25b6dab570ea0e99915059a67599fd3a38caa8b/src/type.ml | ocaml | ------------------------------------------------------------------
* Type variables
------------------------------------------------------------------
* Variable for type inference
------------------------------------------------------------------
* Types of terms
Built-in types
* User-defined types
* Type variab... | open Utils
type tvar = Ident.t
type tvars = tvar list
let pp_tvar fmt id = Fmt.pf fmt "'%a" Ident.pp id
let mk_tvar s = Ident.create s
let ident_of_tvar id = id
type univar = Ident.t
type univars = univar list
let pp_univar fmt u = Fmt.pf fmt "'_%a" Ident.pp u
type ty =
| Message
| Boolean
| Index
... |
3a2946dec651bea760e93810555ff90de875a188b7c9c957d5600f9b402f6416 | frenetic-lang/netcore-1.0 | TestCompiler.hs | # LANGUAGE
TemplateHaskell ,
FlexibleContexts
#
TemplateHaskell,
FlexibleContexts
#-}
module Tests.Frenetic.NetCore.TestCompiler where
import Nettle.IPv4.IPAddress
import Nettle.OpenFlow.Packet
import Frenetic.NetCore.Semantics
import qualified Data.Set as Set
import Data.Word
import Test.Fram... | null | https://raw.githubusercontent.com/frenetic-lang/netcore-1.0/976b08b740027e8ed19f2d55b1e77f663bee6f02/testsuite/Tests/Frenetic/NetCore/TestCompiler.hs | haskell | TODO(arjun): this really is a test for nettle
Invariant : given an arbitrary classifier c , minimze c yields an
equivalent classifier .
Test with OpenFlow patterns and actions .
Invariant : a policy and the classifier resulting from its compilation
should yield an equivalent action for... | # LANGUAGE
TemplateHaskell ,
FlexibleContexts
#
TemplateHaskell,
FlexibleContexts
#-}
module Tests.Frenetic.NetCore.TestCompiler where
import Nettle.IPv4.IPAddress
import Nettle.OpenFlow.Packet
import Frenetic.NetCore.Semantics
import qualified Data.Set as Set
import Data.Word
import Test.Fram... |
77bb3ba29f96e681b155b83320034fa6dff12f6621f0371f22d5073ca37a9fad | HaskellZhangSong/Introduction_to_Haskell_2ed_source | Catalan.hs | data Tree = Leaf | Node Tree Tree deriving Show
trees :: Int -> [Tree]
trees 0 = [Leaf]
trees n = [Node lt rt | l <-[0..(n-1)], lt <- trees l , rt <- trees (n-1-l)]
brace :: Tree -> String
brace Leaf = ""
brace (Node l r) = '(':brace l ++")" ++ brace r
| null | https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell_2ed_source/140c50fdccfe608fe499ecf2d8a3732f531173f5/C08/Catalan.hs | haskell | data Tree = Leaf | Node Tree Tree deriving Show
trees :: Int -> [Tree]
trees 0 = [Leaf]
trees n = [Node lt rt | l <-[0..(n-1)], lt <- trees l , rt <- trees (n-1-l)]
brace :: Tree -> String
brace Leaf = ""
brace (Node l r) = '(':brace l ++")" ++ brace r
| |
7e7a198fedc83db25c904a80b1b0e95f9a6f41cf0303d0c09e410db140ff4468 | tonyrog/canopen | canopen_sup.erl | %%%---- BEGIN COPYRIGHT -------------------------------------------------------
%%%
Copyright ( C ) 2007 - 2012 , Rogvall Invest AB , < >
%%%
%%% This software is licensed as described in the file COPYRIGHT, which
%%% you should have received as part of this distribution. The terms
%%% are also available at .
%%%
%%... | null | https://raw.githubusercontent.com/tonyrog/canopen/b76c0c3503e3087cc7511fe5795e6053702d449e/src/canopen_sup.erl | erlang | ---- BEGIN COPYRIGHT -------------------------------------------------------
This software is licensed as described in the file COPYRIGHT, which
you should have received as part of this distribution. The terms
are also available at .
You may opt to use, copy, modify, merge, publish, distribute and/or sell
furni... | Copyright ( C ) 2007 - 2012 , Rogvall Invest AB , < >
copies of the Software , and permit persons to whom the Software is
This software is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY
@author < >
@author < >
( C ) 2012 ,
Created : 5 November 2011 by
-module(canopen_sup).
-beh... |
a41d7736b1a59968b5b76a06c6018d24138dd911ffbae8e01000610891dfc5e2 | tengstrand/lein-polylith | delete.clj | (ns leiningen.polylith.cmd.help.delete)
(defn help []
(println " Deletes a component and its interface if no other components use it:")
(println)
(println " lein polylith delete c[omponent] NAME")
(println " NAME = Component name")
(println " --------------------------------------------------------")
... | null | https://raw.githubusercontent.com/tengstrand/lein-polylith/27bf508a7b4806e4d2dfac01787e99edf2c1c306/src/leiningen/polylith/cmd/help/delete.clj | clojure | (ns leiningen.polylith.cmd.help.delete)
(defn help []
(println " Deletes a component and its interface if no other components use it:")
(println)
(println " lein polylith delete c[omponent] NAME")
(println " NAME = Component name")
(println " --------------------------------------------------------")
... | |
4e0f495df77244acf4d201aef11258583b39ca5e8d112116a8025a799ec94acf | shnarazk/mios | MinisatReader.hs | {-# LANGUAGE Safe #-}
-- | Read an output file of minisat
module SAT.Mios.Util.DIMACS.MinisatReader
(
-- * Interface
fromMinisatOutput
, clauseListFromMinisatOutput
)
where
import Control . Applicative ( ( < $ > ) , ( < * > ) , ( < * ) , ( * > ) )
import Data.Char
import... | null | https://raw.githubusercontent.com/shnarazk/mios/d032d761d73224f981a07ec2ea90936db6f495e8/src/SAT/Mios/Util/DIMACS/MinisatReader.hs | haskell | # LANGUAGE Safe #
| Read an output file of minisat
* Interface
parser
|parse a non-signed integer
|parse a (signed) integer
|top level interface for parsing CNF
|read a minisat output:
((numbefOfVariables, 0), [Literal])
>>> fromFile "result"
| return clauses as [[Int]] from 'file'
>>> clauseListFromMini... |
module SAT.Mios.Util.DIMACS.MinisatReader
(
fromMinisatOutput
, clauseListFromMinisatOutput
)
where
import Control . Applicative ( ( < $ > ) , ( < * > ) , ( < * ) , ( * > ) )
import Data.Char
import Text.ParserCombinators.ReadP
# INLINE pint #
pint :: ReadP Int
pint = do
n <- ... |
6724e3337c26289793957069adcefd46a7fc89d0a639ba7f5dbdd7fdd342c270 | racket/htdp | test-engine.rkt | ; Manage the running and recording of tests and their failures
#lang racket/base
(require racket/contract
(only-in simple-tree-text-markup/data markup?))
(provide (contract-out
(struct test-object
((tests (listof (-> any)))
(failed-checks (listof failed-check?))
... | null | https://raw.githubusercontent.com/racket/htdp/bcaf327796c6e8729c99283dade3b7ea06a4c33d/htdp-lib/test-engine/test-engine.rkt | racket | Manage the running and recording of tests and their failures
the srcloc? is from a possible exception
srcloc the source location of the actual check
an error happened instead of an expected value
wanted to satisfy a predicate, but error happend
some result came out, but not the one we expected
some result came o... | #lang racket/base
(require racket/contract
(only-in simple-tree-text-markup/data markup?))
(provide (contract-out
(struct test-object
((tests (listof (-> any)))
(failed-checks (listof failed-check?))
(signature-violations (listof signature-violation?)))
... |
6c2de767b0852e75e6825a383aea6d4906f96b1b4d96403f4fa778e61dc31917 | huangjs/cl | browser-window-mcl.lisp | ;;; browser-window.lisp
;;; --------------------
;;;
Author : ( )
Date : 10/19/99
Platform : Macintosh Common Lisp , v. 4.1
;;;
;;; This started out as a port of mop-browser.lisp
by ( ) from
MACL v. 1.0 . It 's changed quite a bit , though .
;;;
;;; This is now a generic utility for br... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/other-code/cs325/www.cs.northwestern.edu/academics/courses/325/programs/browser-window-mcl.lisp | lisp | browser-window.lisp
--------------------
This started out as a port of mop-browser.lisp
This is now a generic utility for browsing nested
structures. Browser means the same thing as inspecting.
The main function it defines is GET-BROWSER-WINDOW.
(GET-BROWSER-WINDOW item items :reuse)
Return... | Author : ( )
Date : 10/19/99
Platform : Macintosh Common Lisp , v. 4.1
by ( ) from
MACL v. 1.0 . It 's changed quite a bit , though .
else becomes a list of one clickable item .
BROWSE is called to generate the next browsing window .
object or list of objects for which BROWSE i... |
d30015a4d6ef90726a9c3e76f7a2909ef0a35e88beee0a479294aac2a62ac676 | huangz1990/SICP-answers | 27-tree-reverse.scm | 27-tree-reverse.scm
(define (tree-reverse lst)
(define (iter remained-items result)
(if (null? remained-items)
result
(iter (cdr remained-items)
(cons (if (pair? (car remained-items))
(tree-reverse (car remained-items))
... | null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/27-tree-reverse.scm | scheme | 27-tree-reverse.scm
(define (tree-reverse lst)
(define (iter remained-items result)
(if (null? remained-items)
result
(iter (cdr remained-items)
(cons (if (pair? (car remained-items))
(tree-reverse (car remained-items))
... | |
8246e235dd4b68f6c5d60c9d1581cb6de646cc9a5b590d831ee3590d65bdd6c2 | racket/gui | utils.rkt | #lang racket/base
(require ffi/unsafe
ffi/unsafe/define
ffi/unsafe/alloc
"../common/utils.rkt"
"../../lock.rkt"
"types.rkt"
"const.rkt")
(provide
define-mz
(protect-out define-gdi32
define-user32
define-kernel32
define-comctl32
define-... | null | https://raw.githubusercontent.com/racket/gui/7935e16932196913c40f71a0bc6f87e5fc7a47d7/gui-lib/mred/private/wx/win32/utils.rkt | racket | There's a race condition between this use of GetLastError()
and other Racket threads that may have run since
the call in this thread that we're reporting as failed.
In the rare case that we lose a race, though, it just
means a bad report for an error that shouldn't have happened
anyway.
---------------------... | #lang racket/base
(require ffi/unsafe
ffi/unsafe/define
ffi/unsafe/alloc
"../common/utils.rkt"
"../../lock.rkt"
"types.rkt"
"const.rkt")
(provide
define-mz
(protect-out define-gdi32
define-user32
define-kernel32
define-comctl32
define-... |
5b50919a1b4d3a38d399d169b385f5586b5dbbc4c30671e7ccd5b295b9e0f50d | mejgun/haskell-tdlib | Proxies.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.Proxies where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.Proxy as Proxy
import qualified Utils as U
-- |
| Represents a list of proxy servers @proxies List of proxy servers
Proxies
{ -- |
proxies ::... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/beb6635177d7626b70fd909b1d89f2156a992cd2/src/TD/Data/Proxies.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| |
module TD.Data.Proxies where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.Proxy as Proxy
import qualified Utils as U
| Represents a list of proxy servers @proxies List of proxy servers
Proxies
proxies :: Maybe [Proxy.Proxy]
}
deriving (Eq)
instance Sho... |
9942c2efe78d3c24da1ed56a5616375c232aaa56b6df6e0f47d1da18bd1afa37 | karamellpelle/grid | Helpers.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid 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 optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/Helpers.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
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
module Game.Helpers
(
tickClockRunGet,
ti... |
5b137436f8dd07d141b4ad99c8d9d35d05108822d3cc834d123836144123f44f | marcoheisig/cl-mpi | packages.lisp | (defpackage :cl-mpi-test-suite
(:nicknames :mpi-test-suite)
(:use :cl :cl-mpi :5am :uiop :cffi :static-vectors)
(:export
#:run-cl-mpi-test-suite
#:run-cl-mpi-stress-tests))
(in-package :cl-mpi-test-suite)
(def-suite mpi-test-suite
:description "All MPI related tests.")
(def-suite mpi-serial-tests
:in... | null | https://raw.githubusercontent.com/marcoheisig/cl-mpi/ba92be06ec1dca74d0ca5256aa387d8a28c8ad86/test-suite/packages.lisp | lisp | (defpackage :cl-mpi-test-suite
(:nicknames :mpi-test-suite)
(:use :cl :cl-mpi :5am :uiop :cffi :static-vectors)
(:export
#:run-cl-mpi-test-suite
#:run-cl-mpi-stress-tests))
(in-package :cl-mpi-test-suite)
(def-suite mpi-test-suite
:description "All MPI related tests.")
(def-suite mpi-serial-tests
:in... | |
89acd8b7d227ecb3c0343ef27d61ab9d9d98a9f158a11ea7ccb274a6f1eaf5af | martijnbastiaan/doctest-parallel | Fib.hs | module TestFailOnMultiline.Fib where
-- | The following interaction cause `doctest' to fail with an error:
--
-- >>> :{
foo :: Int
foo = 23
-- | The following interaction cause `doctest' to fail with an error:
--
-- >>> :{
bar :: Int
bar = 23
| null | https://raw.githubusercontent.com/martijnbastiaan/doctest-parallel/f70d6a1c946cc0ada88571b90a39a7cd4d065452/test/integration/TestFailOnMultiline/Fib.hs | haskell | | The following interaction cause `doctest' to fail with an error:
>>> :{
| The following interaction cause `doctest' to fail with an error:
>>> :{ | module TestFailOnMultiline.Fib where
foo :: Int
foo = 23
bar :: Int
bar = 23
|
64022143c0364b48ae8fc5b49eef58271f8fa8b23dd31111f96482e64a74aaf5 | Butanium/monte-carlo-tree-search-TSP | MCTS_main.ml | (* run command :
dune exec ./tests/MCTS_main.exe
*)
let city_config = "TSPLIB/att48"
let city_count, cities = Reader_tsp.open_tsp city_config
let adj_matrix = Base_tsp.get_adj_matrix cities
let max_time = 10.
let max_playout = 100000000
let playout_selection_policy = MCTS.Random
let exploration_policy = MCTS.M... | null | https://raw.githubusercontent.com/Butanium/monte-carlo-tree-search-TSP/293bcbf8fc70fe9b5f27a58c9b729826f5feee6e/tests/MCTS_main.ml | ocaml | run command :
dune exec ./tests/MCTS_main.exe
let optimization_policy = MCTS.No_opt
Show the computed solution | let city_config = "TSPLIB/att48"
let city_count, cities = Reader_tsp.open_tsp city_config
let adj_matrix = Base_tsp.get_adj_matrix cities
let max_time = 10.
let max_playout = 100000000
let playout_selection_policy = MCTS.Random
let exploration_policy = MCTS.Min_spanning_tree 1.
let expected_length_policy = MCTS.... |
152912d21e5eefe2b682f9d55d8ad8348b7a057810828a24656a9acca787eb81 | Frama-C/Frama-C-snapshot | pdgIndex.ml | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/pdg_types/pdgIndex.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
7ebd6ff6fea24ae0350e15b2aa3e5f6bb7428acd6638224f42cb1ddf872cb199 | nd/bird | 2.6.2.hs | data Jane = MkJane Int
newtype Dick = MkDick Int
diff :: (Either Jane Dick) -> Bool
diff (Left (MkJane a)) = True
diff (Right (MkDick b)) = True
--diff (Left undefined) will return undefined, because undefined /=
MkJane undefined , and diff(Right undefined ) returns True , sinse
( undefined ) = = undefined
| null | https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch02/2.6.2.hs | haskell | diff (Left undefined) will return undefined, because undefined /= | data Jane = MkJane Int
newtype Dick = MkDick Int
diff :: (Either Jane Dick) -> Bool
diff (Left (MkJane a)) = True
diff (Right (MkDick b)) = True
MkJane undefined , and diff(Right undefined ) returns True , sinse
( undefined ) = = undefined
|
734ba94bff6c0ce4024fdcf17f0299ace170e11e491933c523d498e118211c9c | tsloughter/kuberl | kuberl_example_watch.erl | -module(kuberl_example_watch).
-behaviour(kuberl_watch).
-export([example/0,
init/1,
handle_event/3,
terminate/2]).
example() ->
kuberl_watch:start_link(?MODULE, kuberl_core_v1_api, list_pod_for_all_namespaces, [ctx:background()], #{}, []).
init([]) ->
{ok, []}.
handle_event(adde... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/src/kuberl_example_watch.erl | erlang | -module(kuberl_example_watch).
-behaviour(kuberl_watch).
-export([example/0,
init/1,
handle_event/3,
terminate/2]).
example() ->
kuberl_watch:start_link(?MODULE, kuberl_core_v1_api, list_pod_for_all_namespaces, [ctx:background()], #{}, []).
init([]) ->
{ok, []}.
handle_event(adde... | |
dc597fe2afce7a3cbf88ec493ade4fbe98bd981f33e92ac658964f0a418c8024 | Profpatsch/yarn2nix | Parse.hs | # LANGUAGE GeneralizedNewtypeDeriving , OverloadedStrings #
|
Module : Yarn . Lock .
Description : for yarn.lock files
Maintainer : Profpatsch
Stability : experimental
This module provides a parser for the AST of @yarn.lock@ files .
Module : Yarn.Lock.Parse
Description : Parser for yarn.lock files
Mainta... | null | https://raw.githubusercontent.com/Profpatsch/yarn2nix/d42656e8d3855d4d15b68cfd626e6f6bb9475c64/yarn-lock/src/Yarn/Lock/Parse.hs | haskell | * Parsing
** Re-export
** Parsers
* Internal Parsers
| We use a simple (pure) @Megaparsec@ parser.
| The @yarn.lock@ format doesn’t specifically include a fixed scheme,
it’s just an unnecessary custom version of a list of fields.
An field can either be a string or more fields w/ deeper indentation.
The actua... | # LANGUAGE GeneralizedNewtypeDeriving , OverloadedStrings #
|
Module : Yarn . Lock .
Description : for yarn.lock files
Maintainer : Profpatsch
Stability : experimental
This module provides a parser for the AST of @yarn.lock@ files .
Module : Yarn.Lock.Parse
Description : Parser for yarn.lock files
Mainta... |
4f71f46cb57005d5786d5f79834e771cd9d4b703f004ded62df6dbcc1c6bcbfc | slagyr/gaeshi | types.clj | (ns gaeshi.datastore.types
(:use
[gaeshi.users :only (user->map)])
(:import
[com.google.appengine.api.datastore
Key KeyFactory ShortBlob Blob Category Email GeoPt Link
IMHandle IMHandle$Scheme PostalAddress Rating PhoneNumber Text]
[com.google.appengine.api.users User]
[com.google.appengin... | null | https://raw.githubusercontent.com/slagyr/gaeshi/a5677ed1c8d9269d412f07a7ab33bbc40aa7011a/gaeshi/src/gaeshi/datastore/types.clj | clojure | (ns gaeshi.datastore.types
(:use
[gaeshi.users :only (user->map)])
(:import
[com.google.appengine.api.datastore
Key KeyFactory ShortBlob Blob Category Email GeoPt Link
IMHandle IMHandle$Scheme PostalAddress Rating PhoneNumber Text]
[com.google.appengine.api.users User]
[com.google.appengin... | |
20034e594aa623b4c957f1b6bc8a6e4e80677a0dfa3c74fdfcd20e2eab598908 | gheber/kenzo | Test.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 - *
;;; TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
;;; TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
;;; TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
(kenzo-version)
(time (... | null | https://raw.githubusercontent.com/gheber/kenzo/48e2ea398b80f39d3b5954157a7df57e07a362d7/test/kenzo-7/Test.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 - *
TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST |
(kenzo-version)
(time (progn
(cat-init)
(setf s3 (sphere 3))
(homology s3 3)
(setf os3 (loop-space s3))
(homology os3 4)
(setf o2s3 (loop-space os3))
(homology o2s3 5)
(homology (loop-space (moore 2 4) 2) 7)
(homology (k-z2 2) 3 8)
(h... |
c407e134e794fd2cebd136ca2ae08850b90467a4ee32320e924dfe864aec7cf9 | 1rre/compiler | run_all_test.erl | -module(run_all_test).
-export([run/0]).
%% @doc Simple script to run all tests in the "compiler tests" folder.
%% Currently this means just building the IR for each but we can add to it later as needed.
%% I hope to convert this to use "eunit" in the future.
c_test([],_,_) -> 0;
c_test([File|Tests],Gcc,Qem... | null | https://raw.githubusercontent.com/1rre/compiler/40c3357ba46e1e388c6674ffb66122b9117e1b18/src/run_all_test.erl | erlang | @doc Simple script to run all tests in the "compiler tests" folder.
Currently this means just building the IR for each but we can add to it later as needed.
I hope to convert this to use "eunit" in the future.
Ideally use the musl version as that's faster to compile | -module(run_all_test).
-export([run/0]).
c_test([],_,_) -> 0;
c_test([File|Tests],Gcc,Qemu) ->
process_flag(trap_exit, true),
io:fwrite(standard_error,"~n~s: ",[File]),
try c_compiler:main(["-S", "-o", ".test/"++filename:basename(File,".c")++".s", File]) of
_Result ->
open_port({spawn_executable, Gcc}... |
eca461071a84e92e9a761485ff73dff265e876622a013a5eb5f47d804296357d | haskell/haskell-language-server | DestructPunSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module CodeAction.DestructPunSpec where
import Wingman.Types
import Test.Hspec
import Utils
spec :: Spec
spec = do
let destructTest = goldenTest DestructPun
describe "golden" $ do
destructTest "x" 4 9 "PunSimple"
destructTest "x" 6 10 "PunMany"
destructTest "x"... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/CodeAction/DestructPunSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module CodeAction.DestructPunSpec where
import Wingman.Types
import Test.Hspec
import Utils
spec :: Spec
spec = do
let destructTest = goldenTest DestructPun
describe "golden" $ do
destructTest "x" 4 9 "PunSimple"
destructTest "x" 6 10 "PunMany"
destructTest "x" 11 11 "PunGADT"
destructTest "... |
c7e927ffb59fb8aedb6fa29dfcf91146f0ce9114139a0cc3d43e89c9a82a7d8f | 5outh/rapcandy | Markov.hs | # LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE OverloadedStrings #-}
module Markov where
import Control.Applicative
import Control.Monad
import Control.Monad.Random
import Data.List (foldl')
import qualified Data.Map as M
imp... | null | https://raw.githubusercontent.com/5outh/rapcandy/7547c295cdb0f435e99e3505008876bae51abd88/src/Markov.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoMonomorphismRestriction #
module Markov where
import Control.Applicative
import Control.Monad
import Control.Monad.Random
import Data.List (foldl')
import qualified Data.Map as M
import Data.Maybe
import D... |
bb3d0fa367cc792490adfe1bfb7b52eb45911dff3a805ddc4523823e725899c3 | aredington/kibit-mode | bogus.clj | (ns bogus-src.bogus)
(defn naive-adder
"Who'd implement this this way?"
[foo]
(+ foo 1))
| null | https://raw.githubusercontent.com/aredington/kibit-mode/e19463c8e3cc6398367c19b3899c1a4bf61463ce/bogus_src/bogus.clj | clojure | (ns bogus-src.bogus)
(defn naive-adder
"Who'd implement this this way?"
[foo]
(+ foo 1))
| |
65de12ec8155f12cd806436f48011a0397f77614e099b45119de083cd3484608 | pflanze/chj-schemelib | cj-struct-tag.scm | Copyright 2010 - 2019 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require defi... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/cj-struct-tag.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
in macro expansion
(predicates-1 list-of-length)
cj-inline would give cycle
^ XX inconsistent: struct-type etc. are all talking about
'type'; and yeah it should be that right?
stupid naming? (oo again, th... | Copyright 2010 - 2019 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require define-macro-star
test
(cj-gambit-sys-0 @vector-ref @vector-length @vector-set!))
(export struct-tag?
maybe-struct... |
0e9f11667e1a885d5a25aeb809b1ed46cfa6e5aba1d2e2cbef490e39940e5be1 | RedPRL/redtt | Bwd.ml | type 'a bwd =
| Emp
| Snoc of 'a bwd * 'a
module BwdNotation =
struct
let (#<) xs x =
Snoc (xs, x)
let rec (<.>) xs ys =
match ys with
| Emp -> xs
| Snoc (ys, y) ->
Snoc (xs <.> ys, y)
let rec (<><) xs ys =
match ys with
| [] -> xs
| y :: ys -> (xs #< y) <>< ys
let rec... | null | https://raw.githubusercontent.com/RedPRL/redtt/50689559ff970e33013b8cf8a3bbc8be18ec4e09/src/basis/Bwd.ml | ocaml | type 'a bwd =
| Emp
| Snoc of 'a bwd * 'a
module BwdNotation =
struct
let (#<) xs x =
Snoc (xs, x)
let rec (<.>) xs ys =
match ys with
| Emp -> xs
| Snoc (ys, y) ->
Snoc (xs <.> ys, y)
let rec (<><) xs ys =
match ys with
| [] -> xs
| y :: ys -> (xs #< y) <>< ys
let rec... | |
4f1308675dded1888ebed996acfa223968ce0020072f134330bf59aa773df6cd | ocaml/oasis-db | ODBREST.ml |
open ODBGettext
open OASISVersion
open Lwt
type t =
{
rst_stor: ODBVFS.read_only ODBStorage.read_only;
}
(** Current version of the API *)
let current_version =
chop (version_of_string ODBConf.version)
(** Former version of the API *)
let past_versions =
List.rev_map
version_of_string
0.1 ... | null | https://raw.githubusercontent.com/ocaml/oasis-db/f8b19d431102b5c5b7dced00a5242a5366ad263f/src/lib/ODBREST.ml | ocaml | * Current version of the API
* Former version of the API |
open ODBGettext
open OASISVersion
open Lwt
type t =
{
rst_stor: ODBVFS.read_only ODBStorage.read_only;
}
let current_version =
chop (version_of_string ODBConf.version)
let past_versions =
List.rev_map
version_of_string
0.1 , 0.2 , 0.3 ...
module ODBAPI =
REST.Make
(struct
... |
1aa8439c0d3064cfc4fd5c171b9693e80e0576b7c065dbed876a6a18178ee4d3 | lsevero/abclj | core.clj | (ns abclj.core
(:refer-clojure :exclude [remove-ns])
(:require [clojure.java.io :as io]
[clojure.test :refer [is]]
[clojure.string :as str]
[clojure.walk :refer [postwalk]])
(:import [org.armedbear.lisp EndOfFile Stream StringInputStream LispThread Environment Interpreter Load ... | null | https://raw.githubusercontent.com/lsevero/abclj/6e04f1a92b07dbd7ec0abfd95c1843bac9969264/src/abclj/core.clj | clojure | We will need reflection here | (ns abclj.core
(:refer-clojure :exclude [remove-ns])
(:require [clojure.java.io :as io]
[clojure.test :refer [is]]
[clojure.string :as str]
[clojure.walk :refer [postwalk]])
(:import [org.armedbear.lisp EndOfFile Stream StringInputStream LispThread Environment Interpreter Load ... |
31b444c64fdbc6a17768728f2d31aa88b950ecc1166569f9fc83cc65d1c83731 | soulomoon/SICP | Exercise 2.69.scm | Exercise 2.69 : The following procedure takes as its argument a list of symbol - frequency pairs ( where no symbol appears in more than one pair ) and generates a Huffman encoding tree according to the Huffman algorithm .
; (define (generate-huffman-tree pairs)
; (successive-merge
; (make-leaf-set pairs)))
... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter2/Exercise%202.69.scm | scheme | (define (generate-huffman-tree pairs)
(successive-merge
(make-leaf-set pairs)))
symbol
frequency | Exercise 2.69 : The following procedure takes as its argument a list of symbol - frequency pairs ( where no symbol appears in more than one pair ) and generates a Huffman encoding tree according to the Huffman algorithm .
Make - leaf - set is the procedure given above that transforms the list of pairs into an ord... |
dbcfbabc1ff050c1627897be7fcbadd8f520e7bbfddfe22690b14a37f58318af | lynaghk/jetty7-websockets-async | core.clj | (ns com.keminglabs.jetty7-websockets-async.example.core
(:require [com.keminglabs.jetty7-websockets-async.core :as ws]
[clojure.core.async :refer [go <! >!]]
[clojure.core.match :refer [match]]
[compojure.core :refer [routes]]
[compojure.route :as route]))
(def app
(... | null | https://raw.githubusercontent.com/lynaghk/jetty7-websockets-async/ddfb01fb836e9403491afd45667efd86753f5e6e/example/src/clj/com/keminglabs/jetty7_websockets_async/example/core.clj | clojure | (ns com.keminglabs.jetty7-websockets-async.example.core
(:require [com.keminglabs.jetty7-websockets-async.core :as ws]
[clojure.core.async :refer [go <! >!]]
[clojure.core.match :refer [match]]
[compojure.core :refer [routes]]
[compojure.route :as route]))
(def app
(... | |
964a435d35df252dc475865530ca8f6ab79f6b8fcba977647efa7d125adf11e7 | DavidAlphaFox/aiwiki | db_topic.erl | -module(db_topic).
-export([new/2]).
-export([
select/0,
save/1,
to_json/1
]).
-include("include/model.hrl").
new(Title,Intro)->
#topic{
id = aiwiki_db:id(),
title = Title,
intro = Intro
}.
select()->
MatchHead = #topic{ _='_'},
Query = fun () -> mnesia:sele... | null | https://raw.githubusercontent.com/DavidAlphaFox/aiwiki/3a2a78668d4a708fda4af35430f25a69c4b91a7e/src/db/db_topic.erl | erlang | -module(db_topic).
-export([new/2]).
-export([
select/0,
save/1,
to_json/1
]).
-include("include/model.hrl").
new(Title,Intro)->
#topic{
id = aiwiki_db:id(),
title = Title,
intro = Intro
}.
select()->
MatchHead = #topic{ _='_'},
Query = fun () -> mnesia:sele... | |
962f1fd4d8ab54767595829e477243c02cdb9286ebdd0528700cbcc828869de2 | untangled-web/untangled-ui | visual_regression_spec.clj | (ns visual-regression-spec)
(comment
(ns visual-regression-spec
(:require
[clojure.java.io :as io]
[clj-webdriver.taxi :as taxi]
[untangled-spec.core :refer [specification assertions]]
[taoensso.timbre :as timbre])
(:import [ru.yandex.qatools.ashot Screenshot]
[javax.image... | null | https://raw.githubusercontent.com/untangled-web/untangled-ui/ae101f90cd9b7bf5d0c80e9453595fdfe784923c/src/test/visual_regression_spec.clj | clojure | (ns visual-regression-spec)
(comment
(ns visual-regression-spec
(:require
[clojure.java.io :as io]
[clj-webdriver.taxi :as taxi]
[untangled-spec.core :refer [specification assertions]]
[taoensso.timbre :as timbre])
(:import [ru.yandex.qatools.ashot Screenshot]
[javax.image... | |
d9b276d2342472819169fab9f02bcba5ae39adc6d6d96b20d624bdbd28da2fcd | radicle-dev/radicle-alpha | Crypto.hs | {-# LANGUAGE PackageImports #-}
# OPTIONS_GHC -fno - warn - orphans #
module Radicle.Lang.Crypto
( PublicKey
, PrivateKey
, Signature
, hasher
, defaultCurve
, verifySignature
, signText
, generateKeyPair
, MonadRandom(..)
) where
import Protolude
import Crypto.Hash.Algorithms... | null | https://raw.githubusercontent.com/radicle-dev/radicle-alpha/b38a360d9830a938fa83fc066c1d131ec903b5e1/radicle-lang/src/Radicle/Lang/Crypto.hs | haskell | # LANGUAGE PackageImports #
| Verify a signed message with the public key. | # OPTIONS_GHC -fno - warn - orphans #
module Radicle.Lang.Crypto
( PublicKey
, PrivateKey
, Signature
, hasher
, defaultCurve
, verifySignature
, signText
, generateKeyPair
, MonadRandom(..)
) where
import Protolude
import Crypto.Hash.Algorithms
import Crypto.PubKey.... |
bf5a14fd4db8320ea9da54ae91db466133006c012a3bd29d81ccc8270e4b1981 | erlang/otp | my_callbacks_wrong.erl | -module(my_callbacks_wrong).
-export([
callback_init/1
, callback_call/3
, callback_cast/3
, callback_exit/1
]).
-behaviour(my_behaviour).
-record(state, {
parent :: pid(),
status = init :: 'init' | 'open' | 'closed',
subscribe = [] :: list({pid(), integer()}),
counter = 1 ::... | null | https://raw.githubusercontent.com/erlang/otp/de2a455b752258236eb764cb4c8368c6d9f20114/lib/dialyzer/test/behaviour_SUITE_data/src/callbacks_and_specs/my_callbacks_wrong.erl | erlang | Wrong return spec
Wrong return
Non-overlapping spec
Wrong arg spec | -module(my_callbacks_wrong).
-export([
callback_init/1
, callback_call/3
, callback_cast/3
, callback_exit/1
]).
-behaviour(my_behaviour).
-record(state, {
parent :: pid(),
status = init :: 'init' | 'open' | 'closed',
subscribe = [] :: list({pid(), integer()}),
counter = 1 ::... |
003469a7a0b72391ce1925334eb37b4195d9bcd486f8516bf87cfd7717e0217a | yesodweb/persistent | SharedPrimaryKeySpec.hs | # LANGUAGE TypeApplications , DeriveGeneric #
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE DataKinds, FlexibleInstances #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #... | null | https://raw.githubusercontent.com/yesodweb/persistent/eaf9d561a66a7b7a8fcbdf6bd0e9800fa525cc13/persistent/test/Database/Persist/TH/SharedPrimaryKeySpec.hs | haskell | # LANGUAGE DataKinds, FlexibleInstances #
# LANGUAGE OverloadedStrings # | # LANGUAGE TypeApplications , DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE DerivingStrategies #
# LANGUAGE Sta... |
eb1d72658f3eab1b8fdc4857a33ef07aaaccf056c02b759c6e7b3764b05e76f4 | draperlaboratory/cbat_tools | test_utils.ml | (***************************************************************************)
(* *)
Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc.
(* *)
(* This... | null | https://raw.githubusercontent.com/draperlaboratory/cbat_tools/78c665c96b343991cb44bebb8658df6750fb59bd/wp/lib/bap_wp/tests/unit/test_utils.ml | ocaml | *************************************************************************
This file is provided under the license found in the LICENSE file in
the top-level director... | Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc.
This work is funded in part by ONR / NAWC Contract N6833518C0107 . Its
content does not necessarily reflect the position or policy of the US
open !Core
open Bap.Std
open OUnit2
open OUnitTest
module Pre = Bap_wp.Precondition
mo... |
b6c26d192055472baf19d6a1d41ab18fd3cadb8704ec024b4b036dec53fe750d | chetmurthy/ensemble | unique.ml | (**************************************************************)
UNIQUE.ML
Author : , 8/96
(**************************************************************)
open Util
open Trans
(**************************************************************)
let name = Trace.file "UNIQUE"
(****************************************... | null | https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/type/unique.ml | ocaml | ************************************************************
************************************************************
************************************************************
************************************************************
This is a generator for ids. It keeps a skeleton id
* that it uses to gen... | UNIQUE.ML
Author : , 8/96
open Util
open Trans
let name = Trace.file "UNIQUE"
An i d consists of an IP address , UDP port number , randomized
* incarnation number , and a multiplexing number ( mux ) .
* incarnation number, and a multiplexing number (mux).
*)
type id = {
mux : mux ;
host : Hsys.... |
edc09c81609ddc4bfabad719332ed2d80646c95084b7e3633b6766dc14f3a413 | softlab-ntua/bencherl | class_Mammal_test.erl | Copyright ( C ) 2003 - 2014
%
This file is part of the WOOPER examples .
%
% It has been placed in the public domain.
%
Author : ( )
% Unit tests for the Mammal class implementation.
%
% See the class_Mammal.erl tested module.
%
-module(class_Mammal_test).
-include("test_facilities.hrl").
-export([ run... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/wooper/examples/class_Mammal_test.erl | erlang |
It has been placed in the public domain.
Unit tests for the Mammal class implementation.
See the class_Mammal.erl tested module.
Not too late in the test to have enough time to execute fully:
Inherited from Creature: | Copyright ( C ) 2003 - 2014
This file is part of the WOOPER examples .
Author : ( )
-module(class_Mammal_test).
-include("test_facilities.hrl").
-export([ run/1 ]).
-spec run() -> no_return().
run() ->
run( class_Mammal:is_wooper_debug() ).
-spec run( boolean() ) -> no_return().
run( IsDebug ) ->
... |
3ebcbd3cbd952934ef0ac153ab0db3423c7fe2dab03271db7125dde289f47db3 | ktakashi/sagittarius-scheme | conditions.scm | -*- mode : scheme ; coding : utf-8 -*-
;;;
;;; sagittarius/document/conditions.scm - Document framework conditions
;;;
Copyright ( c ) 2021 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; ar... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/13ca71aa1b803a983e414eaa3fabe15a4d4a04f7/sitelib/sagittarius/document/conditions.scm | scheme | coding : utf-8 -*-
sagittarius/document/conditions.scm - Document framework conditions
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyrigh... | Copyright ( c ) 2021 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
#!nounbound
(library (sagittarius document conditio... |
250ecc5c92eaae496d3993238821e89d35ae79546f1fc8dc02f52c54f3b6173e | Dexterminator/clj-templates | template.clj | (ns clj-templates.util.template)
(defn abbreviate-raw [{:keys [group-id artifact-id]}]
(str "\"" group-id " (" artifact-id ")\""))
(defn abbreviate [{:keys [template-name build-system]}]
(str "\"" template-name " (" build-system ")\""))
| null | https://raw.githubusercontent.com/Dexterminator/clj-templates/705e652fece2455257e5008c12c712bb9f7802d1/src/clj/clj_templates/util/template.clj | clojure | (ns clj-templates.util.template)
(defn abbreviate-raw [{:keys [group-id artifact-id]}]
(str "\"" group-id " (" artifact-id ")\""))
(defn abbreviate [{:keys [template-name build-system]}]
(str "\"" template-name " (" build-system ")\""))
| |
3aa0835e0177b72787ac1d12b57bfdbb8b24f2b6b785b9195588cea269dc4938 | cbaggers/daft | names.lisp | (in-package :daft)
(defvar *freed-names* nil)
(defvar *names*
'(james
john
robert
michael
william
david
richard
charles
joseph
thomas
christopher
daniel
paul
mark
donald
george
kenneth
steven
edward
brian
ronald
anthony
kevin
... | null | https://raw.githubusercontent.com/cbaggers/daft/62c4b8b883469eb121b55403b6afabad5052b204/src/names.lisp | lisp | (in-package :daft)
(defvar *freed-names* nil)
(defvar *names*
'(james
john
robert
michael
william
david
richard
charles
joseph
thomas
christopher
daniel
paul
mark
donald
george
kenneth
steven
edward
brian
ronald
anthony
kevin
... | |
5db9a4878fb6742389bb5e6c3ef18baa5ec861f84c0cbbed1490a94386ad1afd | xandkar/tiger.ml | tiger_env.ml | module Map = Tiger_map
module Sym = Tiger_symbol
module Translate = Tiger_translate
module Type = Tiger_env_type
module Value = Tiger_env_value
type t =
{ typs : Type.env
; vals : Value.env
; loop : Sym.t option
; level : Translate.Level.t
}
let base =
{ typs = Type.built_in
; vals = Value.built_in... | null | https://raw.githubusercontent.com/xandkar/tiger.ml/cc540a7e2dfcee4411953075210a64de874b91e5/compiler/src/lib/tiger/tiger_env.ml | ocaml | module Map = Tiger_map
module Sym = Tiger_symbol
module Translate = Tiger_translate
module Type = Tiger_env_type
module Value = Tiger_env_value
type t =
{ typs : Type.env
; vals : Value.env
; loop : Sym.t option
; level : Translate.Level.t
}
let base =
{ typs = Type.built_in
; vals = Value.built_in... | |
b5cae748c7b227c1adae6666c60cbc51a7026138fd20a3749edd9e9c0eef99a7 | bitc/hs-term-emulator | TermLines.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE RankNTypes #-}
module System.Terminal.Emulator.TermLines
( TermLine,
TermLines,
empty,
length,
singleton,
replicate,
vIndex,
head,
last,
take,
takeLast,
drop,
dropLast,
traverseWithIndex,
toSeq,
)
where
im... | null | https://raw.githubusercontent.com/bitc/hs-term-emulator/184356db032930c9ea6fa5b954bbafdf0c2ce516/hs-term-emulator/src/System/Terminal/Emulator/TermLines.hs | haskell | # LANGUAGE RankNTypes #
| The empty sequence.
# INLINE empty #
| The number of elements in the sequence.
| A lens to the specified index of the sequence. Must be in range.
# INLINE vIndex #
| Last element. Must be nonempty
elements, the whole sequence is returned.
# INLINE take #
elements, the whole sequence is r... | # LANGUAGE GeneralizedNewtypeDeriving #
module System.Terminal.Emulator.TermLines
( TermLine,
TermLines,
empty,
length,
singleton,
replicate,
vIndex,
head,
last,
take,
takeLast,
drop,
dropLast,
traverseWithIndex,
toSeq,
)
where
import Control.Exception (asse... |
48b58e8daf387ddb508e8680f77ad153e9248b4ca3e77e19d4ea125bcb8c9cf5 | thattommyhall/offline-4clojure | p29.clj | ;; Get the Caps - Easy
;; Write a function which takes a string and returns a new string containing only the capital letters.
;; tags - strings
;; restricted -
(ns offline-4clojure.p29
(:use clojure.test))
(def __
;; your solution here
)
(defn -main []
(are [soln] soln
(= (__ "HeLlO, WoRlD!") "HLOWRD")
(empty? (... | null | https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p29.clj | clojure | Get the Caps - Easy
Write a function which takes a string and returns a new string containing only the capital letters.
tags - strings
restricted -
your solution here | (ns offline-4clojure.p29
(:use clojure.test))
(def __
)
(defn -main []
(are [soln] soln
(= (__ "HeLlO, WoRlD!") "HLOWRD")
(empty? (__ "nothing"))
(= (__ "$#A(*&987Zf") "AZ")
))
|
b1e566532f1b12d10f1a35f02108f266e8fa086391994f18acd1efebd6feadcd | lingnand/VIMonad | Pass.hs | -----------------------------------------------------------------------------
-- |
-- Module : XMonad.Prompt.Pass
Copyright : ( c ) 2014 ,
-- License : BSD3-style (see LICENSE)
--
Maintainer : < >
-- Stability : unstable
-- Portability : unportable
--
This module provides 3 < XMon... | null | https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Prompt/Pass.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Prompt.Pass
License : BSD3-style (see LICENSE)
Stability : unstable
Portability : unportable
- one to lookup passwords in the password-storage.
- one to generate a password for a given password label ... | Copyright : ( c ) 2014 ,
Maintainer : < >
This module provides 3 < XMonad . Prompt > to ease passwords manipulation ( generate , read , remove ):
Otherwise , the password store is located on user 's home @$HOME\/.password - store@.
module XMonad.Prompt.Pass (
pas... |
8c0f8b5fbe0d0b5af92fd2aa15749ff16582ffe849ebebe925c047aa8b6d208f | input-output-hk/cardano-sl | Policy.hs | -- | Chain policies represent validation properties plus generators to construct
-- both validating and non-validating chains.
module Chain.Policy where
import Chain.Abstract
import qualified Data.Text as T
import Universum
newtype PolicyName = PolicyName T.Text deriving (Show)
-- | Record the ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/node/test/Chain/Policy.hs | haskell | | Chain policies represent validation properties plus generators to construct
both validating and non-validating chains.
| Record the violation of a policy. Generators may choose to create invalid
blocks, and if they do so then they should tag them with a relevant
'PolicyViolation' value.
| A block modifier.
|... | module Chain.Policy where
import Chain.Abstract
import qualified Data.Text as T
import Universum
newtype PolicyName = PolicyName T.Text deriving (Show)
data PolicyViolation = PolicyViolation
{ pvPolName :: PolicyName
, pvDescription :: T.Text
} deriving (Show)
newtype BlockModifier gen... |
4271885929934e9c8ab573779d9b14dd6d1ef4027dc59a40c2ac03c99f6625bb | 2600hz/kazoo | kz_call_response.erl | %%%-----------------------------------------------------------------------------
( C ) 2013 - 2020 , 2600Hz
%%% @doc
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_call/src/kz_call_response.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
------------------------------------------------------------------------------
@doc Create a call response, as a queue of events when media should be
... | ( C ) 2013 - 2020 , 2600Hz
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kz_call_response).
-export([send/3, send/4, send/5]).
-export([send_default/2]).
-export([get... |
932432845329725c441fc138d6949ebd95967757cbf0bf4f9112e854793ab6e2 | kupl/FixML | sub2.ml |
type ae = CONST of int
| VAR of string
| POWER of string * int
| TIMES of ae list
| SUM of ae list
let rec diff(ae, x) =
match ae with
| CONST n -> CONST 0
| VAR v ->
if v = x then CONST 1
else CONST 0
| POWER(v, n) ->
if v = x then TIMES [CONST n;POWER(v, n-1)]
else CONST 0
| SUM l ->
let rec l... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/differentiate/diff/submissions/sub2.ml | ocaml |
type ae = CONST of int
| VAR of string
| POWER of string * int
| TIMES of ae list
| SUM of ae list
let rec diff(ae, x) =
match ae with
| CONST n -> CONST 0
| VAR v ->
if v = x then CONST 1
else CONST 0
| POWER(v, n) ->
if v = x then TIMES [CONST n;POWER(v, n-1)]
else CONST 0
| SUM l ->
let rec l... | |
24879e2a7b98e0fcffc19dc71ede38a2a1d8e6ee16f77a6c31d644e0ad3821ce | DougHamil/threeagent | threejs.cljs | (ns threeagent.impl.threejs
(:refer-clojure :exclude [get-in])
(:require ["three" :as three]))
(defn mesh-phong-material [c]
(new three/MeshPhongMaterial (clj->js c)))
(defn euler [x y z]
(new three/Euler x y z "XYZ"))
(defn set-position! [^js obj [x y z]]
(.set (.-position obj) x y z)
obj)
(defn set-r... | null | https://raw.githubusercontent.com/DougHamil/threeagent/8f8b158bcbbf484b41d6f4a87436ce6f81ca7c04/src/main/threeagent/impl/threejs.cljs | clojure | (ns threeagent.impl.threejs
(:refer-clojure :exclude [get-in])
(:require ["three" :as three]))
(defn mesh-phong-material [c]
(new three/MeshPhongMaterial (clj->js c)))
(defn euler [x y z]
(new three/Euler x y z "XYZ"))
(defn set-position! [^js obj [x y z]]
(.set (.-position obj) x y z)
obj)
(defn set-r... | |
8866cd7bf3ddb994c3579eca8ea55a5dbfb223e627fffebc67be8a6d57b10498 | qitab/cl-protobufs | case-preservation-test.lisp | Copyright 2013 Google LLC
;;;
Use of this source code is governed by an MIT - style
;;; license that can be found in the LICENSE file or at
;;; .
(defpackage #:cl-protobufs.test.case-preservation
(:use #:cl
#:clunit)
(:local-nicknames (#:pb #:cl-protobufs.protobuf-case-preservation-unittest)
... | null | https://raw.githubusercontent.com/qitab/cl-protobufs/54957124255cca93d508e66d1136393398eff6a6/tests/case-preservation-test.lisp | lisp |
license that can be found in the LICENSE file or at
.
We're reaching into the implementation to verify the objects have
been properly constructed. | Copyright 2013 Google LLC
Use of this source code is governed by an MIT - style
(defpackage #:cl-protobufs.test.case-preservation
(:use #:cl
#:clunit)
(:local-nicknames (#:pb #:cl-protobufs.protobuf-case-preservation-unittest)
(#:pi #:cl-protobufs.implementation)
... |
049a871bb43428fe1a262872cd4c38cb28f11d573c535271de0a132af3bb56f0 | xh4/web-toolkit | comment.lisp | (in-package :dom)
(defclass comment (character-data)
())
(defmethod node-type ((comment comment))
comment-node)
(defmethod node-name ((comment comment))
"#comment")
(defmethod node-value ((comment comment))
(data comment))
(defmethod text-content ((comment comment))
(data comment))
(defun create-comment... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/dom/comment.lisp | lisp | (in-package :dom)
(defclass comment (character-data)
())
(defmethod node-type ((comment comment))
comment-node)
(defmethod node-name ((comment comment))
"#comment")
(defmethod node-value ((comment comment))
(data comment))
(defmethod text-content ((comment comment))
(data comment))
(defun create-comment... | |
d77323afb279908ce1751999d36aaac3c2dc250209dbc25ea4c5485c2f18ad16 | chuchao333/6.945 | interp.scm | Core of extended Scheme interpreter
;;;
;;; See also structure and predicate definitions in rtdata.scm and
;;; syntax.scm
(declare (usual-integrations eval apply))
(define (default-eval expression environment)
(cond ((application? expression)
(apply (eval (operator expression) environment)
(operands expressio... | null | https://raw.githubusercontent.com/chuchao333/6.945/c50bb28aadf0c3fcda3c8e56b4a61b9a2d582552/ps3/code/interp.scm | scheme |
See also structure and predicate definitions in rtdata.scm and
syntax.scm
recursively check for symbols in expression
lookup symbol the given procedure is bound to
lookup symbol the given procedure is bound to, in the underlying scheme env
default behavior | Core of extended Scheme interpreter
(declare (usual-integrations eval apply))
(define (default-eval expression environment)
(cond ((application? expression)
(apply (eval (operator expression) environment)
(operands expression)
environment))
(else
(error "Unknown expression type" expression))))
(define (... |
c3d354929037370be79148a2d1c0934b53a5acf7ee0de6b4bf5110d3027fb0f7 | juspay/atlas | Flow.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
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
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/parking-bap/src/ExternalAPI/Flow.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
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
dis... | |
9b09215e1743abebee8c4733d0231c6b35a81fd3310c8d6dfc6dc83dd3ddf926 | whamtet/dogfort | routes_macros.clj | Not so much code from and Snout here
(ns dogfort.middleware.routes-macros)
(defn- make-matcher [route]
(cond
(= route "/") [""]
(.contains route "/")
(vec (rest (.split route "/")))
:default route))
(defn- assoc-&-binding [binds req sym]
(assoc binds sym `(dissoc (:params ~req)
... | null | https://raw.githubusercontent.com/whamtet/dogfort/75c2908355cc18bf350a5b761d2906e013ee9f94/src/dogfort/middleware/routes_macros.clj | clojure | Not so much code from and Snout here
(ns dogfort.middleware.routes-macros)
(defn- make-matcher [route]
(cond
(= route "/") [""]
(.contains route "/")
(vec (rest (.split route "/")))
:default route))
(defn- assoc-&-binding [binds req sym]
(assoc binds sym `(dissoc (:params ~req)
... | |
f4cd705e6509dc1aabae08c33c6409b1a09b26ba54c7e8e508ab40222d417cca | mput/sicp-solutions | 3_25.rkt | #lang sicp
#| Solution for exercise 3_25. |#
(#%provide make-table)
(define (make-empty-table) (list '*table*))
(define (table? items) (and (pair? items) (eq? (car items) '*table*)))
(define (make-table same-key?)
(define table (make-empty-table))
(define (assoc key items)
(cond ((null? items) false)
... | null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/3_25.rkt | racket | Solution for exercise 3_25.
last key?
when adding value to the last key.
when we need to add new key in middle or change existing key.
add next key to existing table.
value will be replaced with subtable.
create new empty subtable, and add to it. | #lang sicp
(#%provide make-table)
(define (make-empty-table) (list '*table*))
(define (table? items) (and (pair? items) (eq? (car items) '*table*)))
(define (make-table same-key?)
(define table (make-empty-table))
(define (assoc key items)
(cond ((null? items) false)
((same-key? key (caar items)) ... |
2744b310d6d96bfaae04eaf73e3d3d153bd35cb179113e9fcde9eef6522a85fc | NetworkVerification/nv | Dependency.mli | open Batteries
open Nv_lang
open Nv_datastructures
open Syntax
open Collections
Very simple dependency analysis for heavily - simplified NV programs . It
assumes the following have been done : , Record Unrolling , Map Unrolling ,
Option Unboxing , . In particular , we should encounter
no records ... | null | https://raw.githubusercontent.com/NetworkVerification/nv/aa48abcd1bf9d4b7167cfe83a94b44e446a636e8/src/lib/transformations/Dependency.mli | ocaml | Argument number
Variable name
Expects to be given a function definition, presumably that of trans/merge/init.
But it should work for any built-in functions.
Like compute_dependencies_func, but accepts initial dependencies, and won't
work on function expressions
Given a function definition, get the argume... | open Batteries
open Nv_lang
open Nv_datastructures
open Syntax
open Collections
Very simple dependency analysis for heavily - simplified NV programs . It
assumes the following have been done : , Record Unrolling , Map Unrolling ,
Option Unboxing , . In particular , we should encounter
no records ... |
23bf60d8ae75db9d0fd4c731ab65127d4a5b6548e5e6c69c7e908ab43a9fcefa | reactiveml/rml | phisimpl.mli | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/compiler/phisimpl.mli | ocaml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | |
b0e9f2ca8e50fd2e4ceae174331a7d404b923cf97454070d98edacbce7981027 | achikin/game2048-clj | utils.clj | (ns game2048.utils)
(defn count-digits [n]
(if (zero? n) 1
(-> n Math/log10 Math/floor long inc)))
(defn repeat-str
[n st]
(apply str (repeat n st)))
(defn pad-number
[length number]
(let [n (count-digits number)
pads (/ (- length n) 2)]
(apply str (repeat-str pads " ") (str number) (r... | null | https://raw.githubusercontent.com/achikin/game2048-clj/3c9912f2765126f9c476a6fdfc22d135e6732407/src/game2048/utils.clj | clojure | (ns game2048.utils)
(defn count-digits [n]
(if (zero? n) 1
(-> n Math/log10 Math/floor long inc)))
(defn repeat-str
[n st]
(apply str (repeat n st)))
(defn pad-number
[length number]
(let [n (count-digits number)
pads (/ (- length n) 2)]
(apply str (repeat-str pads " ") (str number) (r... | |
a3d6cffd18aa4cf39ea332778b219256cec5207e4ed33de9cefc00f39b64d8db | chef/chef-server | depsolver_tests.erl | -*- erlang - indent - level : 4 ; indent - tabs - mode : nil ; fill - column : 80 -*-
%% ex: ts=4 sw=4 et
%%
%%-------------------------------------------------------------------
Copyright Chef Software , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "Li... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/depsolver/test/depsolver_tests.erl | erlang | ex: ts=4 sw=4 et
-------------------------------------------------------------------
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 go... | -*- erlang - indent - level : 4 ; indent - tabs - mode : nil ; fill - column : 80 -*-
Copyright Chef Software , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on a... |
40c38f2f1b844737bf211267cc7c01712b12a679cdb8ad2475c923bded681ab6 | exercism/scheme | test.scm | (load "test-util.ss")
(define test-cases
`((test-success "encode yes" equal? encode '((5 . 7) "yes")
"xbt")
(test-success "encode no" equal? encode '((15 . 18) "no")
"fu")
(test-success "encode OMG" equal? encode '((21 . 3) "OMG")
"lvz")
(test-success "encode O M G" equal? encode
... | null | https://raw.githubusercontent.com/exercism/scheme/2064dd5e5d5a03a06417d28c33c5349bec97dad7/exercises/practice/affine-cipher/test.scm | scheme | (load "test-util.ss")
(define test-cases
`((test-success "encode yes" equal? encode '((5 . 7) "yes")
"xbt")
(test-success "encode no" equal? encode '((15 . 18) "no")
"fu")
(test-success "encode OMG" equal? encode '((21 . 3) "OMG")
"lvz")
(test-success "encode O M G" equal? encode
... | |
eebd3272eb037b957af9f85c87c3c516297652fbd1b1a3c87608e67469f4b049 | cognitory/turtle | subs.cljs | (ns turtle.subs
(:require
[re-frame.core :refer [reg-sub]]))
(reg-sub
:code
(fn [state]
(state :code)))
(reg-sub
:log
(fn [state]
(state :log)))
| null | https://raw.githubusercontent.com/cognitory/turtle/61933ccb23206104399bee44d5c59c714e47af83/src/turtle/subs.cljs | clojure | (ns turtle.subs
(:require
[re-frame.core :refer [reg-sub]]))
(reg-sub
:code
(fn [state]
(state :code)))
(reg-sub
:log
(fn [state]
(state :log)))
| |
6b6693fce28ae5cb8066333f6ae85002cc56d8ec7411aa373a51f18b14d55b7e | nonguix/nonguix | clojure.scm | SPDX - License - Identifier : GPL-3.0 - or - later
Copyright © 2019 < >
Copyright © 2020 < >
Copyright © 2020 < >
(define-module (nongnu packages clojure)
#:use-module (gnu packages compression)
#:use-module (gnu packages gcc)
#:use-module (gnu packages readline)
#:use-module (guix build-syste... | null | https://raw.githubusercontent.com/nonguix/nonguix/5a54541e238ed2665c5c3cac99798efe437c5956/nongnu/packages/clojure.scm | scheme | This is a hidden package, as it does not really serve a purpose on its own. | SPDX - License - Identifier : GPL-3.0 - or - later
Copyright © 2019 < >
Copyright © 2020 < >
Copyright © 2020 < >
(define-module (nongnu packages clojure)
#:use-module (gnu packages compression)
#:use-module (gnu packages gcc)
#:use-module (gnu packages readline)
#:use-module (guix build-syste... |
9afea17b6329fe8e2a22653ffa70554a4f6ba0e0e73c2f5813900c02736fd6f2 | goblint/analyzer | myCFG.ml | (** Our Control-flow graph implementation. *)
open GoblintCil
(** Re-exported [Node.t] with constructors. See [Node.t] for documentation. *)
type node = Node.t =
| Statement of CilType.Stmt.t
| FunctionEntry of CilType.Fundec.t
| Function of CilType.Fundec.t
(** Re-exported [Edge.t] with constructors. See [Edg... | null | https://raw.githubusercontent.com/goblint/analyzer/4828e7b40860c84ce5b9fe072cf484202805dff4/src/framework/myCFG.ml | ocaml | * Our Control-flow graph implementation.
* Re-exported [Node.t] with constructors. See [Node.t] for documentation.
* Re-exported [Edge.t] with constructors. See [Edge.t] for documentation. |
open GoblintCil
type node = Node.t =
| Statement of CilType.Stmt.t
| FunctionEntry of CilType.Fundec.t
| Function of CilType.Fundec.t
type edge = Edge.t =
| Assign of CilType.Lval.t * CilType.Exp.t
| Proc of CilType.Lval.t option * CilType.Exp.t * CilType.Exp.t list
| Entry of CilType.Fundec.t
| Ret of... |
9a4cd10dad99d1c73958122268276ef4ad093517d6f94cae1fc8a0e04ea089ff | helium/blockchain-core | blockchain_ledger_state_channel_v2.erl | %%%-------------------------------------------------------------------
%% @doc
%% == Blockchain Ledger State Channel v2 ==
%% @end
%%%-------------------------------------------------------------------
-module(blockchain_ledger_state_channel_v2).
-include("blockchain_vars.hrl").
-export([
new/6,
id/1, id/2,
... | null | https://raw.githubusercontent.com/helium/blockchain-core/053c08b9354d455656cc7f6d7668ab2bf6813ac6/src/ledger/v1/blockchain_ledger_state_channel_v2.erl | erlang | -------------------------------------------------------------------
@doc
== Blockchain Ledger State Channel v2 ==
@end
-------------------------------------------------------------------
--------------------------------------------------------------------
@doc
@end
-------------------------------------------------... | -module(blockchain_ledger_state_channel_v2).
-include("blockchain_vars.hrl").
-export([
new/6,
id/1, id/2,
owner/1, owner/2,
nonce/1, nonce/2,
amount/1, amount/2,
original/1, original/2,
expire_at_block/1, expire_at_block/2,
serialize/1, deserialize/1,
close_proposal/6,
closer/... |
34a6f860fe2823696357576023f6d6b3dccc8e4f75e26ef7da9d8f405d4492eb | marigold-dev/deku | effects.ml | open Deku_ledger
open Deku_stdlib
type _ Effect.t +=
| Deposit_tickets : Address.t * (Ticket_id.t * N.t) list -> unit Effect.t
| Take_tickets : Address.t -> (Ticket_id.t * N.t) list Effect.t
| Self_addr : Contract_address.t Effect.t
| Sender_address : Address.t Effect.t
| Source_address : Address.t Effect.t
... | null | https://raw.githubusercontent.com/marigold-dev/deku/152d5bbe3c30912aa28b5ab810e03216e8c22710/deku-c/wasm-vm-ocaml/effects.ml | ocaml | open Deku_ledger
open Deku_stdlib
type _ Effect.t +=
| Deposit_tickets : Address.t * (Ticket_id.t * N.t) list -> unit Effect.t
| Take_tickets : Address.t -> (Ticket_id.t * N.t) list Effect.t
| Self_addr : Contract_address.t Effect.t
| Sender_address : Address.t Effect.t
| Source_address : Address.t Effect.t
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.