_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 |
|---|---|---|---|---|---|---|---|---|
d7e901e0979a883f7966e8250949c37829c36c2459be7201480c0ff2791029be | jarohen/yoyo | flow.cljs | (ns {{name}}.ui.app
(:require [flow.core :as f :include-macros true]
[clojure.string :as s]
[nrepl.embed :refer [connect-brepl!]]))
(enable-console-print!)
(connect-brepl!)
(set! (.-onload js/window)
(fn []
(f/root js/document.body
(f/el
[:p "Hello world!... | null | https://raw.githubusercontent.com/jarohen/yoyo/b579d21becd06b5330dee9f5963708db03ce1e25/templates/yoyo-webapp/src/leiningen/new/yoyo_webapp/cljs/flow.cljs | clojure | ------------------------------------------------------------
Below this line is only required for the Yo-yo welcome page, feel
free to just delete all of it when you want to get cracking on your
own project! | (ns {{name}}.ui.app
(:require [flow.core :as f :include-macros true]
[clojure.string :as s]
[nrepl.embed :refer [connect-brepl!]]))
(enable-console-print!)
(connect-brepl!)
(set! (.-onload js/window)
(fn []
(f/root js/document.body
(f/el
[:p "Hello world!... |
4a3e30c9f54651e0bf338d92a6c57596b2f08158159ef9489da8e917e8654375 | yahoojapan/big3store | mj_query_node.erl | %%
%% Main-memory Join Query Node processes
%%
2014 - 2016 UP FAMNIT and Yahoo Japan Corporation
%% @version 0.3
@since February , 2016
@author < >
@author < >
%%
%% @doc Main-memory join query node is implemented as independent gen_process. Main-memory
%% join query node is a state-machine realizing m... | null | https://raw.githubusercontent.com/yahoojapan/big3store/c4142395695a836fec60b7c202f9f12d46a8ed01/src/mj_query_node.erl | erlang |
Main-memory Join Query Node processes
@version 0.3
@doc Main-memory join query node is implemented as independent gen_process. Main-memory
join query node is a state-machine realizing main-memory join algorithm as protocol among
join query node and the outer and inner query nodes. It is expected that there i... | 2014 - 2016 UP FAMNIT and Yahoo Japan Corporation
@since February , 2016
@author < >
@author < >
State - machine has the following states : inactive , active , wait_next_outer , wait_next_inner ,
and eos . Message start set state of protocol to active . Message eval starts the evaluation
to wait_ne... |
608871cffbd55df551c67f9c11bb4ae97723cef890eb1adf0fd88590e953dda1 | athos/syntactic-closure | close.clj | (ns close
(:use [syntactic-closure :only [defsyntax qq]]))
(defn foo [x]
x)
(defsyntax bar [x]
(qq (foo ~^:? x)))
(comment
(ns baz
(:use [close :only [bar]]))
(defn foo [x]
(* x x))
= > ( close / foo ( baz / foo 4 ) )
)
| null | https://raw.githubusercontent.com/athos/syntactic-closure/e251b03a199507df4bbc35788230d434d6506634/examples/close.clj | clojure | (ns close
(:use [syntactic-closure :only [defsyntax qq]]))
(defn foo [x]
x)
(defsyntax bar [x]
(qq (foo ~^:? x)))
(comment
(ns baz
(:use [close :only [bar]]))
(defn foo [x]
(* x x))
= > ( close / foo ( baz / foo 4 ) )
)
| |
42ef9094a4ff493274f065e4dd56462fc166511164ea5f1c75139e1a89c020e2 | wireapp/wire-server | Env.hs | # LANGUAGE TemplateHaskell #
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , e... | null | https://raw.githubusercontent.com/wireapp/wire-server/e03f7219210019ae5be50739f594dc667e669168/services/gundeck/src/Gundeck/Env.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | # LANGUAGE TemplateHaskell #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
mo... |
5120feb3a241dce84bfd41f3d8377699a90056feecb6668b4654acfa5161ba3f | Ekdohibs/camlboot | let_open.ml | let () = print_endline "Let open:"
module M = struct
let x = 42
let f x = x + x
end
let () =
show_int M.x;
M.(show_int x);
let open M in
show_int (f 21)
module N = struct
let f ~x ?(y=2) p = p (x * y)
end
let () =
let open N in
f ~x:21 show_int
module R = struct
type r = { a : int; b : int }
... | null | https://raw.githubusercontent.com/Ekdohibs/camlboot/506280c6e0813e0e794988151a8e46be55373ebc/miniml/compiler/test/let_open.ml | ocaml | let () = print_endline "Let open:"
module M = struct
let x = 42
let f x = x + x
end
let () =
show_int M.x;
M.(show_int x);
let open M in
show_int (f 21)
module N = struct
let f ~x ?(y=2) p = p (x * y)
end
let () =
let open N in
f ~x:21 show_int
module R = struct
type r = { a : int; b : int }
... | |
efec9192b439beabb1f96b2a556f5abbc7a751b537454ebc9997fef40acb4042 | ocaml-ppx/ppx | main.ml | open Migrate_parsetree
open Ast_403
let mapper =
let super = Ast_mapper.default_mapper in
let expr self (e : Parsetree.expression) =
match e.pexp_desc with
| Pexp_extension ({ txt = "omp_test"; _ }, _) ->
{ e with pexp_desc = Pexp_constant (Pconst_integer ("42", None)) }
| _ ->
super.expr s... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/test/driver/omp-integration/omp-ppx/main.ml | ocaml | open Migrate_parsetree
open Ast_403
let mapper =
let super = Ast_mapper.default_mapper in
let expr self (e : Parsetree.expression) =
match e.pexp_desc with
| Pexp_extension ({ txt = "omp_test"; _ }, _) ->
{ e with pexp_desc = Pexp_constant (Pconst_integer ("42", None)) }
| _ ->
super.expr s... | |
c271f2e8d901e7c4340a7bfc3ab5b0bf2bf2db6ba1ebea1841b54801f497d83a | ZHaskell/z-data | Base64.hs | |
Module : Z.Data . Vector . Base64
Description : Base64 codec for bytes .
Copyright : ( c ) , 2017 - 2018
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
This module provides base64 encoding & decoding tools , as well as ' Base64Bytes ' newtype wi... | null | https://raw.githubusercontent.com/ZHaskell/z-data/82e31fea77ab9384000a21cb3fedcfd3eee6cc4a/Z/Data/Vector/Base64.hs | haskell | * Encoding & Decoding functions
* Internal C FFIs
| Encode 'V.Bytes' using base64 encoding.
| 'B.Builder' version of 'base64Encode'.
| Text version of 'base64Encode'.
| Decode a base64 encoding string, return Nothing on illegal bytes or incomplete input.
| Exception during base64 decoding.
| Decode a base64 enc... | |
Module : Z.Data . Vector . Base64
Description : Base64 codec for bytes .
Copyright : ( c ) , 2017 - 2018
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
This module provides base64 encoding & decoding tools , as well as ' Base64Bytes ' newtype wi... |
c6cf9f1b22927adf3d8b7ebdeddd4dc9b5574c32e97bb35b99ce52577e99fe82 | rain-1/single_cream | 3.scm | #t #f
| null | https://raw.githubusercontent.com/rain-1/single_cream/f8989fde4bfcffe0af7f6ed5916885446bf40124/t/trivial/3.scm | scheme | #t #f
| |
e66d571c63e48ad11569798e467628836467f5527a2ca705dc1a8902cfdf9aa5 | shortishly/pgmp | pgmp_rep_sup.erl | Copyright ( c ) 2022 < >
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed under... | null | https://raw.githubusercontent.com/shortishly/pgmp/99eef1e6c6c9f8dcd85450348fa2042a61b8a240/src/pgmp_rep_sup.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissi... | Copyright ( c ) 2022 < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(pgmp_rep_sup).
-behaviour(supervisor).
-export([init/1]).
-export([start_child/1]).
-export([start_link/1]).
-export([terminate_child/1... |
83526c255c992867220149431bd7917aa69d0329fbd66b24fb7e1782a2049015 | phadej/vec | Internal.hs | {-# LANGUAGE CPP #-}
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE InstanceSigs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE Safe ... | null | https://raw.githubusercontent.com/phadej/vec/a895ab79e054987938295d5a149758eb79d85683/ral/src/Data/RAList/Internal.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DeriveTraversable #
# LANGUAGE FlexibleContexts #
# LANGUAGE Safe #
# LANGUAGE ScopedTypeVariables #
* Showing
* Construction
* Indexing
* Conversions
* Folding
* Mapping
$setup
-------------------------------------------------------------... | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE InstanceSigs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
module Data.RAList.Internal (
RAList (..),
explicitShow,
explicitShowsPrec,
empty,
singleton,
cons,
(!),
(!?)... |
b0348476f6d32619df134ed8b53bb718a4195a654240b474853239423ef9c67f | nasa/ogma | Main.hs | Copyright 2020 United States Government as represented by the Administrator
of the National Aeronautics and Space Administration . All Rights Reserved .
--
-- Disclaimers
--
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY
OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , IN... | null | https://raw.githubusercontent.com/nasa/ogma/825129e4133ac6c2c506676a3f197a14a35dc3e2/ogma-language-cocospec/tests/Main.hs | haskell |
Disclaimers
SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT THE
SUBJECT SOFTWARE WILL BE ERROR FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF
ANY MANNER, CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR
GOVERNM... | Copyright 2020 United States Government as represented by the Administrator
of the National Aeronautics and Space Administration . All Rights Reserved .
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY
OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , INCLUDING , BUT NOT
L... |
408e31304a5dd259f7ddd075801e565410144af9f657f0c6594e9423d6a43362 | fluree/ledger | sparql.clj | (ns fluree.db.ledger.docs.query.sparql
(:require [clojure.test :refer :all]
[fluree.db.test-helpers :as test]
[fluree.db.ledger.docs.getting-started.basic-schema :as basic]
[fluree.db.api :as fdb]
[clojure.core.async :as async]))
(use-fixtures :once test/test-system-de... | null | https://raw.githubusercontent.com/fluree/ledger/26a0745e4edc3c00ff46533b62276fb7a3ea9da4/test/fluree/db/ledger/docs/query/sparql.clj | clojure | (ns fluree.db.ledger.docs.query.sparql
(:require [clojure.test :refer :all]
[fluree.db.test-helpers :as test]
[fluree.db.ledger.docs.getting-started.basic-schema :as basic]
[fluree.db.api :as fdb]
[clojure.core.async :as async]))
(use-fixtures :once test/test-system-de... | |
8230f769c90a12f3fa84930cf6e7ea673a7894691354f64a2377b22a665ed337 | uim/uim | dict-socket.scm | ;;; dict.scm: rfc2229 (a dictionary server protocol) for uim.
;;;
Copyright ( c ) 2010 - 2013 uim Project
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
1 . Redistributions o... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/dict-socket.scm | scheme | dict.scm: rfc2229 (a dictionary server protocol) for uim.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of... | Copyright ( c ) 2010 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR... |
8d889ae83c007b4e6eeb068ab88a349a596c2947643fc4133f1eee6d2e66d60b | emc2/clash-riscv | FP.hs | Copyright ( c ) 2017 . All rights reserved .
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
1 . Redistributions of source code must retain the above copyright
-- notice, this list of conditions and the... | null | https://raw.githubusercontent.com/emc2/clash-riscv/e7404e5f9ff6b1eb22274bf7daa34bbd2768f2a3/src/RISCV/ISA/Registers/FP.hs | haskell |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documentation and/or other mate... | Copyright ( c ) 2017 . All rights reserved .
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of the author nor the names of any contributors
THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTO... |
eb2a9116dd20bae809b72a15021b9c3554398ef12f62320c55663d2a198a8f63 | mauricioszabo/repl-tooling | connection.cljs | (ns repl-tooling.editor-integration.connection
(:require [reagent.core :as r]
[promesa.core :as p]
[clojure.string :as str]
[repl-tooling.editor-helpers :as helpers]
[repl-tooling.eval :as eval]
[repl-tooling.repl-client.clojure :as clj-repl]
[re... | null | https://raw.githubusercontent.com/mauricioszabo/repl-tooling/1cea9b411cc118d71266cb8e035e146325baf410/src/repl_tooling/editor_integration/connection.cljs | clojure | FIXME: This only here because of tests
TODO: Deprecate this
TODO: Check this last parameter
Config Options:
{:project-paths [...]
:eval-mode (enum :clj :cljs :prefer-clj :prefer-cljs)}
FIXME: Re-add pathom without REPL
(partial pathom/eql {:callbacks options})} | (ns repl-tooling.editor-integration.connection
(:require [reagent.core :as r]
[promesa.core :as p]
[clojure.string :as str]
[repl-tooling.editor-helpers :as helpers]
[repl-tooling.eval :as eval]
[repl-tooling.repl-client.clojure :as clj-repl]
[re... |
206c5e5f76366f84431b80d7526325fbe57b916d3f7825b2b4fba5b91c9e8cab | camlspotter/ocaml-zippy-tutorial-in-japanese | w8.ml | < = Warning 8
| Some v -> v
(* Warning 8: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
None
*)
| null | https://raw.githubusercontent.com/camlspotter/ocaml-zippy-tutorial-in-japanese/c6aeabc08b6e2289a0e66c5b94a89c6723d88a6a/t/warnings/w8.ml | ocaml | Warning 8: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
None
| < = Warning 8
| Some v -> v
|
023f895a240d61e1ae1267d7b35ca7888487bdab5bd6364ea25de1a8aaf4583d | Cipherwraith/hblog | CSS.hs | module CSS where
import Data.List
import System.Directory
import System.FilePath
import Config
writeCSS :: IO ()
writeCSS = do
cssFiles <- getCSSFiles
let c = length cssFiles
mapM_ writeCSS' cssFiles
writeCSS' (path, content) = writeFile outPath content
where
outPath = replaceDirectory path htmlDirectory
... | null | https://raw.githubusercontent.com/Cipherwraith/hblog/f92d96a60e301302c8a0e46fd68ee1e1810eb031/CSS.hs | haskell | module CSS where
import Data.List
import System.Directory
import System.FilePath
import Config
writeCSS :: IO ()
writeCSS = do
cssFiles <- getCSSFiles
let c = length cssFiles
mapM_ writeCSS' cssFiles
writeCSS' (path, content) = writeFile outPath content
where
outPath = replaceDirectory path htmlDirectory
... | |
5888df92ada85b50819ac2b359dd62adcffda364bafcd5326274576ca1186909 | vyorkin/tiger | type.ml | module U = Unique
module S = Symbol
type t =
| Int
| String
| Record of (S.t * t) list * U.t
| Array of t * U.t
| Nil
| Unit
| Name of S.t * t option ref
[@@deriving show]
(* we cannot use [@@deriving eq] here, so
let's just implement the comparsion ourselves *)
let compare x y =
match x, y with
... | null | https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter6/lib/type.ml | ocaml | we cannot use [@@deriving eq] here, so
let's just implement the comparsion ourselves
* Recursively lookups the underlying type
"nil" is legal value for records | module U = Unique
module S = Symbol
type t =
| Int
| String
| Record of (S.t * t) list * U.t
| Array of t * U.t
| Nil
| Unit
| Name of S.t * t option ref
[@@deriving show]
let compare x y =
match x, y with
| Record (_, u1), Record (_, u2) ->
compare u1 u2
| Record _, Nil -> 0
| Nil, Record ... |
228119e86acd19d8468741ea24a748c9728d2781f95c34a8397f020c4ffa36d0 | binghe/fm-plugin-tools | prepare.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : PREPARE - FM - PLUGIN - TOOLS ; Base : 10 -*-
Copyright ( c ) 2006 - 2010 , Dr. . All rights reserved .
Copyright ( c ) 2021 - 2022 , ( binghe ) . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; modific... | null | https://raw.githubusercontent.com/binghe/fm-plugin-tools/7234ca4a0d6a5ab0f5fd22a69b4ecdd798f8a283/prepare-fm-plugin-tools/prepare.lisp | lisp | Syntax : COMMON - LISP ; Package : PREPARE - FM - PLUGIN - TOOLS ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list o... |
Copyright ( c ) 2006 - 2010 , Dr. . All rights reserved .
Copyright ( c ) 2021 - 2022 , ( binghe ) . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :prepare-fm-plugin-tools)
(... |
985985a276ecda33d19ea0db55bcff65765d8f96317227ee87cf7d229e56fb72 | lixiangqi/medic | fact-iter.rkt | #lang racket
(define (fact x a)
(if (zero? x)
a
(fact (sub1 x) (* x a))))
(fact 3 1)
| null | https://raw.githubusercontent.com/lixiangqi/medic/0920090d3c77d6873b8481841622a5f2d13a732c/demos/aggregate/fact-iter.rkt | racket | #lang racket
(define (fact x a)
(if (zero? x)
a
(fact (sub1 x) (* x a))))
(fact 3 1)
| |
8af6c9b536fb5d22f783b5bff01ea84268eca8b57ff4e25d3a9ee7c3f1b53ffc | technion/erlvulnscan | erlvulnscan_SUITE.erl | -module(erlvulnscan_SUITE).
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
-define(TESTPORT, 8085).
-define(R, "{\"network\":\"127.0.0.0\",\"recaptcha\":\"03AO\"}").
all() -> [invalid_request, valid_request, valid_json].
init_per_suite(Config) ->
% Run tests on a non-default port, so they can... | null | https://raw.githubusercontent.com/technion/erlvulnscan/8d109c49c8ecf331a4a859296e9fafd57aa458cd/test/erlvulnscan_SUITE.erl | erlang | Run tests on a non-default port, so they can coexist with a
running environment.
Although we are testing a "failure", the fact it connects at all
shows most of the app is running and handles GET with the right
error
Same test as valid_request, but tests the JSON | -module(erlvulnscan_SUITE).
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
-define(TESTPORT, 8085).
-define(R, "{\"network\":\"127.0.0.0\",\"recaptcha\":\"03AO\"}").
all() -> [invalid_request, valid_request, valid_json].
init_per_suite(Config) ->
ok = application:load(erlvulnscan),
ok = a... |
aaac646558e52832e3f472063a0b56fc9ced34b6b585b978e4028fdfdc810909 | huangz1990/real-world-haskell-cn | LineChunks.hs | -- file: ch24/LineChunks.hs
module LineChunks
(
chunkedReadWith
) where
import Control.Exception (bracket, finally)
import Control.Monad (forM, liftM)
import Control.Parallel.Strategies (NFData, rnf)
import Data.Int (Int64)
import qualified Data.ByteString.Lazy.Char8 as LB
import GHC.Conc (numCapabilitie... | null | https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch24/LineChunks.hs | haskell | file: ch24/LineChunks.hs | module LineChunks
(
chunkedReadWith
) where
import Control.Exception (bracket, finally)
import Control.Monad (forM, liftM)
import Control.Parallel.Strategies (NFData, rnf)
import Data.Int (Int64)
import qualified Data.ByteString.Lazy.Char8 as LB
import GHC.Conc (numCapabilities)
import System.IO
data Ch... |
8a7e72fd60e47d226440e972b2c2424b2cd2c3c9c813503047bf9ff72267322e | brabster/dynamodb-expressions | integration_test.clj | (ns dynamodb-expression.integration-test
(:require [dynamodb-expression.core :as dx]
[clojure.test :refer :all]
[docker.fixture :as docker]
[amazonica.aws.dynamodbv2 :as ddb]
[amazonica.core :refer [defcredential]]))
(def port (docker/rand-port))
(def host (docker... | null | https://raw.githubusercontent.com/brabster/dynamodb-expressions/8ca5ca758485fa272cec6e836e71279cd08b0104/test/dynamodb_expression/integration_test.clj | clojure | (ns dynamodb-expression.integration-test
(:require [dynamodb-expression.core :as dx]
[clojure.test :refer :all]
[docker.fixture :as docker]
[amazonica.aws.dynamodbv2 :as ddb]
[amazonica.core :refer [defcredential]]))
(def port (docker/rand-port))
(def host (docker... | |
cc7368e08be7eb462e6b33b1965d28eabd106ec46da1afca8008233a10f9049a | osener/markup.rocks | Main.hs | {-# LANGUAGE CPP #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE JavaScriptFFI #-}
# LANGUAGE TemplateHaskell #
{-# LANGUAGE RecursiveDo #-}
module Main where
import ... | null | https://raw.githubusercontent.com/osener/markup.rocks/02bb050df6b1e4c3a84f9a6aeaad8217215a2b64/src/Main.hs | haskell | # LANGUAGE CPP #
# LANGUAGE GADTs #
# LANGUAGE JavaScriptFFI #
# LANGUAGE RecursiveDo # | # LANGUAGE FlexibleContexts #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE TemplateHaskell #
module Main where
import Control.Concurrent
import Control.Concurrent.MVar
import Control.DeepSeq
import Control.Monad
import Control.Monad.IO.Class
imp... |
a812e12089f86be46d037db2ae2df079620e25c17f524f2e0365854397e70387 | fluree/db | cljs_shim.clj | (ns fluree.db.util.cljs-shim
(:require [clojure.java.io :as io]))
(set! *warn-on-reflection* true)
(defmacro inline-resource
"Macro allowing ClojureScript to inline a SMALL bundle of resource file(s) (< 1mb)
at compile time. If inline content grows, need to consider publishing to
and downloading from a cdn."... | null | https://raw.githubusercontent.com/fluree/db/354dbd02de3dec6013f2a7fe992ac1d2674be1aa/src/fluree/db/util/cljs_shim.clj | clojure | (ns fluree.db.util.cljs-shim
(:require [clojure.java.io :as io]))
(set! *warn-on-reflection* true)
(defmacro inline-resource
"Macro allowing ClojureScript to inline a SMALL bundle of resource file(s) (< 1mb)
at compile time. If inline content grows, need to consider publishing to
and downloading from a cdn."... | |
ff02b3e0690e90fdfc2ef79f8aeccab1cb9821beae59a0ea4ca328c7d0df1234 | heechul/crest-z3 | dataslicing.mli |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* All rights reserved .
*
* 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 mu... | null | https://raw.githubusercontent.com/heechul/crest-z3/cfcebadddb5e9d69e9956644fc37b46f6c2a21a0/cil/src/ext/dataslicing.mli | ocaml | This feature implements data slicing. The user annotates base types
* and function types with region(i) annotations, and this transformation
* will separate the fields into parallel data structures accordingly. |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* All rights reserved .
*
* 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 mu... |
0b7dca3e5cb342adf9be3908d580d0e3e54e650fe0adaff0d5f3d1e9d243b7da | chrovis/cljam | writer.clj | (ns cljam.io.bam-index.writer
(:require [com.climate.claypoole :as cp]
[cljam.common :refer [get-exec-n-threads]]
[cljam.io.util.bgzf :as bgzf]
[cljam.io.util.lsb :as lsb]
[cljam.io.util.bin :as util-bin]
[cljam.io.bam-index.common :refer [linear-index-shift... | null | https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/src/cljam/io/bam_index/writer.clj | clojure | ---------
Use record for performance.
Record is faster than map for retrieving elements.
last-offset
aligned-alns
unaligned-alns
Merging indices
-------------
Finalizing index
----------------
Writing index
-----------
chunks
Public
------
Merging indices
-------------
Making index
-----------
Writ... | (ns cljam.io.bam-index.writer
(:require [com.climate.claypoole :as cp]
[cljam.common :refer [get-exec-n-threads]]
[cljam.io.util.bgzf :as bgzf]
[cljam.io.util.lsb :as lsb]
[cljam.io.util.bin :as util-bin]
[cljam.io.bam-index.common :refer [linear-index-shift... |
2fc96e8276bc7c2641adbe1bb6827c6e46e5bf1cf03054880bf137fcfd140710 | glondu/belenios | tool_events.mli | (**************************************************************************)
(* BELENIOS *)
(* *)
Copyright © 2012 - 2022
(* ... | null | https://raw.githubusercontent.com/glondu/belenios/64e71651d245ac58a0e909ae0f3c290356f780ee/src/tool/tool_events.mli | ocaml | ************************************************************************
BELENIOS
This program is free softw... | Copyright © 2012 - 2022
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
exemption that compiling , linking , and/or using OpenSSL is allowed .
You should have rece... |
e8611092aeec847d7628ff93b24d846e2f17d7d7712de5d4900d388c44e0d329 | camllight/camllight | hashtblc.mli | (* Hash tables and hash functions *)
(* Hash tables are hashed association tables, with in-place modification. *)
type ('a, 'b) t;;
(* The type of hash tables from type ['a] to type ['b]. *)
value new : int -> ('a,'b) t
(* [new n] creates a new, empty hash table, with initial size [n].
The... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camltk4/libsupport/hashtblc.mli | ocaml | Hash tables and hash functions
Hash tables are hashed association tables, with in-place modification.
The type of hash tables from type ['a] to type ['b].
[new n] creates a new, empty hash table, with initial size [n].
The table grows as needed, so [n] is just an initial guess.
Better resul... |
type ('a, 'b) t;;
value new : int -> ('a,'b) t
and clear : ('a, 'b) t -> unit
and add : ('a, 'b) t -> 'a -> 'b -> unit
[ add tbl x y ] adds a binding of [ x ] to [ y ] in table [ tbl ] .
Previous bindings for [ x ] are not removed , but simply
hidden . That is , after performing [ r... |
383eb814fe75e7689385898382fbdec16cf0a0a39b8a81ff36d9cab273de8f2c | rjray/advent-2020-clojure | day12_test.clj | (ns advent-of-code.day12-test
(:require [clojure.test :refer [deftest testing is]]
[advent-of-code.day12 :refer [part-1 part-2]]
[clojure.java.io :refer [resource]]))
(deftest part1
(let [expected 25]
(is (= expected (part-1 (slurp (resource "day12-example.txt")))))))
(deftest part2
... | null | https://raw.githubusercontent.com/rjray/advent-2020-clojure/631b36545ae1efdebd11ca3dd4dca032346e8601/test/advent_of_code/day12_test.clj | clojure | (ns advent-of-code.day12-test
(:require [clojure.test :refer [deftest testing is]]
[advent-of-code.day12 :refer [part-1 part-2]]
[clojure.java.io :refer [resource]]))
(deftest part1
(let [expected 25]
(is (= expected (part-1 (slurp (resource "day12-example.txt")))))))
(deftest part2
... | |
99faabd8580bcdee8a35fd86d5dc082a61bdab27bd233be63d5abcf1e36145e0 | jkarni/ZipperFS | ZFS.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
Zipper - based File / Operating system
with threading and exceptions all realized via delimited continuations .
There are no unsafe operations , no GHC ( let alone ) Unix threads ,
no ... | null | https://raw.githubusercontent.com/jkarni/ZipperFS/9f714165d5085c52fab1006fa867909d18d019bd/src/ZFS.hs | haskell | # LANGUAGE RankNTypes #
and the type system sees to it .
$ I d : ZFS.hs , v 1.8 2005/10/14 23:00:41 oleg Exp $
and the type system sees to it.
$Id: ZFS.hs,v 1.8 2005/10/14 23:00:41 oleg Exp $
needed for select hacks:
Unix select is not available in
have to import runCC manually , even though the import of
Zip... | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
Zipper - based File / Operating system
with threading and exceptions all realized via delimited continuations .
There are no unsafe operations , no GHC ( let alone ) Unix threads ,
no concurrency problems . Our t... |
986d80b2dcdd228b4efa70692e214b6dabb67c60a1d22bd7353769020d1130bf | mokus0/dependent-sum-template | Internal.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708
# LANGUAGE PolyKinds #
#endif
-- | Shared functions for dependent-sum-template
module Data.Dependent.Sum.TH.Internal where
import... | null | https://raw.githubusercontent.com/mokus0/dependent-sum-template/4b85b8fc6fd016ef03f4ea97e31a2a573d30f2ae/src/Data/Dependent/Sum/TH/Internal.hs | haskell | # LANGUAGE GADTs #
| Shared functions for dependent-sum-template
Invoke the deriver for the given class instance. We assume that the type
multiple.
TODO: figure out proper number of family parameters vs instance parameters | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708
# LANGUAGE PolyKinds #
#endif
module Data.Dependent.Sum.TH.Internal where
import Control.Monad
import Language.Haskell.TH
import Language.Haskell.TH.Ext... |
8953307434de2b826def8e0f4e95dbb8ae3ef9354388688aae38ff8130220c20 | aviaviavi/toodles | Config.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeOperators #-}
module Config
( toodlesArgs
, ToodlesArgs(..)
, SearchFilter(..)
, AssigneeFilterRegex(..)
)
where
import Paths_too... | null | https://raw.githubusercontent.com/aviaviavi/toodles/cc614616aef18e335f8d920d62371ba2a882d383/src/Config.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators # | # LANGUAGE ScopedTypeVariables #
module Config
( toodlesArgs
, ToodlesArgs(..)
, SearchFilter(..)
, AssigneeFilterRegex(..)
)
where
import Paths_toodles
import Types
import Data.Text (Text)
import Data.Version (showVersion)
import S... |
90e8734ab947a140d75159232a513054214345ad72a16a4610c4cee4233844c7 | zadean/basexerl | binary_example.erl | -module(binary_example).
-export([run/0]).
run() ->
{ok, Db} = basexerl:connect("localhost", 6001, "admin", "admin"),
Bin = list_to_binary([<<X>> || X <- lists:seq(1,256)]),
{ok, Info1} = basexerl:create(Db, "database2"),
io:format("~s~n", [Info1]),
{ok, Info2} = basexerl:store(Db, "test.bin", Bi... | null | https://raw.githubusercontent.com/zadean/basexerl/15ce1990eb334268eb0f615be0d55136d537c087/examples/binary_example.erl | erlang | -module(binary_example).
-export([run/0]).
run() ->
{ok, Db} = basexerl:connect("localhost", 6001, "admin", "admin"),
Bin = list_to_binary([<<X>> || X <- lists:seq(1,256)]),
{ok, Info1} = basexerl:create(Db, "database2"),
io:format("~s~n", [Info1]),
{ok, Info2} = basexerl:store(Db, "test.bin", Bi... | |
7f26eee42d0f7f19809596f4d79d906832a836291408afbf3eceab3aeeda2ac2 | ghc/packages-Cabal | setup.test.hs | import Test.Cabal.Prelude
main = setupAndCabalTest $ do
r <- fails $ setup' "configure" []
assertOutputContains "cycl" r -- match cyclic or cycle
assertOutputContains "bar" r
assertOutputContains "foo" r
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/BuildDeps/DepCycle/setup.test.hs | haskell | match cyclic or cycle | import Test.Cabal.Prelude
main = setupAndCabalTest $ do
r <- fails $ setup' "configure" []
assertOutputContains "bar" r
assertOutputContains "foo" r
|
c01506c264c9818e4e1fdb1378ce6c179f2e16d61a8c39e74a91df19fdcf4ee5 | opentelemetry-beam/opentelemetry_zipkin | opentelemetry_zipkin_SUITE.erl | -module(opentelemetry_zipkin_SUITE).
-compile(export_all).
-include_lib("stdlib/include/assert.hrl").
-include_lib("opentelemetry_api/include/opentelemetry.hrl").
-include_lib("opentelemetry/include/otel_span.hrl").
all() ->
[verify_export].
%% insert a couple spans and export to locally running zipkin
verify_e... | null | https://raw.githubusercontent.com/opentelemetry-beam/opentelemetry_zipkin/ee785d294e7f4b324b333a94fcbde5ef285004ad/test/opentelemetry_zipkin_SUITE.erl | erlang | insert a couple spans and export to locally running zipkin | -module(opentelemetry_zipkin_SUITE).
-compile(export_all).
-include_lib("stdlib/include/assert.hrl").
-include_lib("opentelemetry_api/include/opentelemetry.hrl").
-include_lib("opentelemetry/include/otel_span.hrl").
all() ->
[verify_export].
verify_export(_Config) ->
Address = case os:getenv("GITHUB_ACTION"... |
6e057a4c605d3603b23ba29792fa935511d0e0eae1cd18f7072048f2e048b000 | leksah/leksah | SourceBuffer.hs | # LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE RecordWildCards #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE... | null | https://raw.githubusercontent.com/leksah/leksah/ec95f33af27fea09cba140d7cddd010935a2cf52/src-gtk/IDE/Pane/SourceBuffer.hs | haskell | # LANGUAGE TypeSynonymInstances #
# LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
# LANGUAGE MultiWayIf #
---------------------------------------------------------------------------
Module : IDE.Pane.SourceBuffer
License : GNU-GPL
Maintainer : <maintainer at leksah.org>
Stability : provisio... | # LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE RecordWildCards #
# LANGUAGE LambdaCase #
# OPTIONS_GHC -fno - warn - orphans #
Copyright : ( c ) ,
| The source editor part of Leksah
module... |
6df8db3e8dc29728158bc50984b26dc15ac18a41f9ff1c58b9ee56fd6db4b537 | polyfy/polylith | test.clj | (ns polylith.clj.core.workspace.settings.test)
(def default-test-runner
'polylith.clj.core.clojure-test-test-runner.interface/create)
(def default-test-runner-aliases
#{nil :default})
(defn add-default-test-runner-if-missing [project-settings]
(cond-> project-settings
(empty? (-> project-settings :test :c... | null | https://raw.githubusercontent.com/polyfy/polylith/ca7c38eb2df7a489202742ac28c0cfe9ef9ae9d2/components/workspace/src/polylith/clj/core/workspace/settings/test.clj | clojure | (ns polylith.clj.core.workspace.settings.test)
(def default-test-runner
'polylith.clj.core.clojure-test-test-runner.interface/create)
(def default-test-runner-aliases
#{nil :default})
(defn add-default-test-runner-if-missing [project-settings]
(cond-> project-settings
(empty? (-> project-settings :test :c... | |
a8dfae0374b12ba5b9014417c7e761e043f1f47eab0746c33bd10347f3352e81 | KMahoney/squee | QueryBuilder.hs | module Squee.QueryBuilder
( Expression(..)
, Source(..)
, Query(..)
, Settings(..)
, buildSqlNoPlaceholder
, buildSqlWithPlaceholder
, buildSqlExpressionNoPlaceholder
, buildSqlExpressionWithPlaceholder
, collectPlaceholders
, columnNames
, applyFilter
, applyOrder
, applyMap
, applyNatJoin
... | null | https://raw.githubusercontent.com/KMahoney/squee/b2ebad2ec6f3c866398600793d0a231edc8c23e4/src/Squee/QueryBuilder.hs | haskell | module Squee.QueryBuilder
( Expression(..)
, Source(..)
, Query(..)
, Settings(..)
, buildSqlNoPlaceholder
, buildSqlWithPlaceholder
, buildSqlExpressionNoPlaceholder
, buildSqlExpressionWithPlaceholder
, collectPlaceholders
, columnNames
, applyFilter
, applyOrder
, applyMap
, applyNatJoin
... | |
fedb279e310da2fecf68bafdd794ce2278b3d5ae757e01218d28abe1c5c55721 | mariari/Misc-Lisp-Scripts | HW7.lisp |
(/ (random 100000000000) 100000000000)
(defun v ()
(case (random 4)
(0 1/5)
(1 2/5)
(2 3/5)
(3 4/5)))
(let ((acc 0))
(dotimes (i 1000)
(incf acc (/ (reduce #'+ (mapcar (lambda (x) (max (v) (/ (random 100000000000) 100000000000))) (range 1e4 1))) 1e4)))
(/ acc 1000))
| null | https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/Class/probability/HW7.lisp | lisp |
(/ (random 100000000000) 100000000000)
(defun v ()
(case (random 4)
(0 1/5)
(1 2/5)
(2 3/5)
(3 4/5)))
(let ((acc 0))
(dotimes (i 1000)
(incf acc (/ (reduce #'+ (mapcar (lambda (x) (max (v) (/ (random 100000000000) 100000000000))) (range 1e4 1))) 1e4)))
(/ acc 1000))
| |
1965c1ab5643e7a3c091797a63336ff50798ffec79c852564e5fd517cdeb2df0 | rainoftime/PFAD | ch5.erl |
@doc Chapter 5 : Sorting pairwize sums
-module(ch5).
-export([
sortsums/2,
lambert_sortsums/2
]).
@doc O(N^2 * log(N ) ): N = ) = length(Ys )
-spec sortsums([term()], [term()]) -> [term()].
sortsums(Xs, Ys) ->
lists:sort([sum(X, Y) || X <- Xs, Y <- Ys]).
-spec lambert_sortsums([ter... | null | https://raw.githubusercontent.com/rainoftime/PFAD/e594c027fc49da6f546701f6a550271b99442e0a/ch5/ch5.erl | erlang |
@doc Chapter 5 : Sorting pairwize sums
-module(ch5).
-export([
sortsums/2,
lambert_sortsums/2
]).
@doc O(N^2 * log(N ) ): N = ) = length(Ys )
-spec sortsums([term()], [term()]) -> [term()].
sortsums(Xs, Ys) ->
lists:sort([sum(X, Y) || X <- Xs, Y <- Ys]).
-spec lambert_sortsums([ter... | |
f0a614e49e819a49d38e5cde8251385db42e2fdaa46b1d990d7806296ec9d866 | hgoes/smtlib2 | Container.hs | # LANGUAGE PolyKinds #
module Language.SMTLib2.Composite.Container (
-- * Container class
Container(..),
-- * Paths
Path(..),
pathGet,
pathSet,
withPath,
-- * Accessors
Acc(..),
Accessor(..),
AccessorFork(..),
withAccessor,
access,
accessorPaths,
-- ** Construction
Access,(|*>),idAcc,fie... | null | https://raw.githubusercontent.com/hgoes/smtlib2/c35747f2a5a9ec88dc7b1db41a5aab6e98c0458d/extras/composite/Language/SMTLib2/Composite/Container.hs | haskell | * Container class
* Paths
* Accessors
** Construction
** Construction
* Helper functions | # LANGUAGE PolyKinds #
module Language.SMTLib2.Composite.Container (
Container(..),
Path(..),
pathGet,
pathSet,
withPath,
Acc(..),
Accessor(..),
AccessorFork(..),
withAccessor,
access,
accessorPaths,
Access,(|*>),idAcc,field,
at,
*
Muxer(..),
Paths(..),
Muxed(..),
withMuxer,
mux,
... |
9b91f31fd739b4b48b7dbee50725fc9be42d194d7e42c86355e0ea63ddfacf8f | eponai/sulolive | aleph.clj | (ns eponai.server.external.aleph
(:require [com.stuartsierra.component :as component]
[suspendable.core :as suspendable]
[aleph.http :as aleph]
[aleph.netty]
[taoensso.timbre :refer [debug error]])
(:import (io.netty.channel ChannelPipeline)
(io.netty.handl... | null | https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/server/external/aleph.clj | clojure | (aleph.netty/wait-for-close server) | (ns eponai.server.external.aleph
(:require [com.stuartsierra.component :as component]
[suspendable.core :as suspendable]
[aleph.http :as aleph]
[aleph.netty]
[taoensso.timbre :refer [debug error]])
(:import (io.netty.channel ChannelPipeline)
(io.netty.handl... |
ce9b048eb8f4738a38e5ee12cfffdb4a3d8c399d4c3c9ff0690a0167999f0a0d | input-output-hk/cardano-wallet | Metadata.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE NumericUnderscores #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
-- |
Copyright : © 2018 - 2020 IOHK
-- License: Apache-2.0
--
-- HTTP-clien... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/c4af01b952268b57d3fcd1a0cb476d77dba4f166/lib/wallet/src/Cardano/Pool/Metadata.hs | haskell | # LANGUAGE Rank2Types #
|
License: Apache-2.0
HTTP-client(s) for fetching stake pool metadata from remote servers (directly
from pool operators, or from smash).
* Fetch
* Construct URLs
* re-exports
* Types
| Build the SMASH metadata fetch endpoint for a single pool. Does not
contain leading '/'.
TODO: use ... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE NumericUnderscores #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
Copyright : © 2018 - 2020 IOHK
module Cardano.Pool.Metadata
(
fetchFromRemote
, StakePoo... |
06292a6e566cd85a901115387fd4b3c52c2a8c63ab1d538b425b7f9d51fcf858 | well-typed/cborg | Issue67.hs | Avoid some warnings in case the backend is n't being used
# OPTIONS_GHC -fno - warn - unused - binds -fno - warn - unused - imports #
# LANGUAGE CPP #
Issue # 67 : Invalid compilation with backend .
--
Reported in the wild , and cribbed from -bench
module Tests.Regress.Issue67
( testTree -- :: TestTree
) w... | null | https://raw.githubusercontent.com/well-typed/cborg/9be3fd5437f9d2ec1df784d5d939efb9a85fd1fb/serialise/tests/Tests/Regress/Issue67.hs | haskell |
:: TestTree
------------------------------------------------------------------------------
Tests and properties
------------------------------------------------------------------------------
TestTree API | Avoid some warnings in case the backend is n't being used
# OPTIONS_GHC -fno - warn - unused - binds -fno - warn - unused - imports #
# LANGUAGE CPP #
Issue # 67 : Invalid compilation with backend .
Reported in the wild , and cribbed from -bench
module Tests.Regress.Issue67
) where
import Data.Int... |
7206fce5b7db65c7a78abe2a78e91adcadb679b536b407af1994f4c0b5b6a440 | uw-unsat/serval | objdump.rkt | #lang rosette
(require
"base.rkt"
"interp.rkt"
"decode.rkt"
(prefix-in core: "../lib/core.rkt")
racket/list
racket/match
racket/port
racket/string
syntax/strip-context)
(provide
(rename-out [literal-read read]
[literal-read-syntax read-syntax])
compile-objdump-program
interpret-o... | null | https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/serval/riscv/objdump.rkt | racket | only use "core" branch instrs
jalr is not relative: can be handled like every other instr
double check that this isn't a branch instr.
Anything else we don't recognize is a register.
Have to be careful here otherwise registers like "a5" | #lang rosette
(require
"base.rkt"
"interp.rkt"
"decode.rkt"
(prefix-in core: "../lib/core.rkt")
racket/list
racket/match
racket/port
racket/string
syntax/strip-context)
(provide
(rename-out [literal-read read]
[literal-read-syntax read-syntax])
compile-objdump-program
interpret-o... |
486f8eba15f5afe6d2b5c74563d638ddec2d7b956f3c8a48045a48fc8ccebbba | windorg/app-old | Show.hs | module Web.View.Inbox.Show where
import Web.Helper.View
import Web.View.Prelude
import Web.ViewTypes
data InboxView = InboxView {unreadReplies :: [ReplyV]}
instance View InboxView where
html InboxView{..} =
[hsx|
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item... | null | https://raw.githubusercontent.com/windorg/app-old/ed9c5322c8ab8a0275bdcd479be12a3f230da8c9/Web/View/Inbox/Show.hs | haskell | We won't render the "delete" button to not confuse people into thinking delete = mark as read --> | module Web.View.Inbox.Show where
import Web.Helper.View
import Web.View.Prelude
import Web.ViewTypes
data InboxView = InboxView {unreadReplies :: [ReplyV]}
instance View InboxView where
html InboxView{..} =
[hsx|
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item... |
cc7e02784698a69440738fdfdac35d1341be70ffd2c9d4f4e59c805a99bd4f3d | Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator | Test6.hs | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiWayIf #-}
| Contains the types generated from the schema Test6
module OpenAPI.Types.Test6 where
import qualified Prelude as GHC.Int... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator/5d8f5da48273d006dd0e2cdb6d2425fb6b52f0c5/testing/golden-output/src/OpenAPI/Types/Test6.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE MultiWayIf #
^ This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
^ This constructor can be used to send values to the server which are not present in the specification yet.
^ Represents the JSON valu... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
| Contains the types generated from the schema Test6
module OpenAPI.Types.Test6 where
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
import qualifie... |
c5d2d4aaf84ecacd711b4d29cb93f3ddac68dcc7d77e837da366dc4ac15447f3 | mwunsch/overscan | factories.rkt | #lang racket/base
(require ffi/unsafe/introspection
racket/class
racket/contract
(only-in racket/list first last)
"private/core.rkt"
gstreamer/clock
gstreamer/element
gstreamer/bin
gstreamer/pipeline
gstreamer/device)
(provide (contract-... | null | https://raw.githubusercontent.com/mwunsch/overscan/f198e6b4c1f64cf5720e66ab5ad27fdc4b9e67e9/gstreamer/factories.rkt | racket | #lang racket/base
(require ffi/unsafe/introspection
racket/class
racket/contract
(only-in racket/list first last)
"private/core.rkt"
gstreamer/clock
gstreamer/element
gstreamer/bin
gstreamer/pipeline
gstreamer/device)
(provide (contract-... | |
fccac076b1bc649eb7d2e9448e233e4792fb4be555162c604cdb0ea72dd22841 | bobzhang/ocaml-book | mlastback.ml | -*- Mode : Tuareg ; -*-
Version : $ I d : template.ml , v 0.0 2012/02/19 01:23:57
Version: $Id: template.ml,v 0.0 2012/02/19 01:23:57 bobzhang1988 Exp $ *)
open Camlp4.PreCast
open Printf
module Mlast = struct
type int' = int
type ml_unop = Ml_f... | null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/unify/mlastback.ml | ocaml | * meta filter special treatment
*FIX camlp4 int bug | -*- Mode : Tuareg ; -*-
Version : $ I d : template.ml , v 0.0 2012/02/19 01:23:57
Version: $Id: template.ml,v 0.0 2012/02/19 01:23:57 bobzhang1988 Exp $ *)
open Camlp4.PreCast
open Printf
module Mlast = struct
type int' = int
type ml_unop = Ml_f... |
7764d4327fef42270e98cfce078f0ca3bd226dde687a06466091935d4cf71eb6 | WorksHub/client | db.cljc | (ns wh.blogs.blog.db
(:require [#?(:cljs cljs.spec.alpha :clj clojure.spec.alpha) :as s]))
(defn id
[db]
(get-in db [:wh.db/page-params :id]))
(s/def ::share-links-shown? boolean?)
(s/def ::author-info-visible? boolean?)
(s/def ::upvotes (s/map-of string? nat-int?))
(s/def ::sub-db (s/keys :req [::share-links-... | null | https://raw.githubusercontent.com/WorksHub/client/a7293627d80b96ba2451542242ba263e179f82d8/common-pages/src/wh/blogs/blog/db.cljc | clojure | (ns wh.blogs.blog.db
(:require [#?(:cljs cljs.spec.alpha :clj clojure.spec.alpha) :as s]))
(defn id
[db]
(get-in db [:wh.db/page-params :id]))
(s/def ::share-links-shown? boolean?)
(s/def ::author-info-visible? boolean?)
(s/def ::upvotes (s/map-of string? nat-int?))
(s/def ::sub-db (s/keys :req [::share-links-... | |
250652ab60acbf1dec8ef3cceb6c66074e0de4b9fa78fec1d1a8eef058d53771 | dpiponi/Moodler | seqq.hs | do
plane <- currentPlane
(x, y) <- fmap (quantise2 quantum) mouse
panel <- container' "panel_4x1.png" (x, y) (Inside plane)
lab <- label' "seqq" (x-25.0, y+75.0) (Inside plane)
parent panel lab
name <- new' "seqq"
inp <- plugin' (name ++ ".gate") (x-21, y+675) (Inside plane)
setColour in... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/seqq.hs | haskell | do
plane <- currentPlane
(x, y) <- fmap (quantise2 quantum) mouse
panel <- container' "panel_4x1.png" (x, y) (Inside plane)
lab <- label' "seqq" (x-25.0, y+75.0) (Inside plane)
parent panel lab
name <- new' "seqq"
inp <- plugin' (name ++ ".gate") (x-21, y+675) (Inside plane)
setColour in... | |
8764f8e023eff13731e5c386dd109f2f350b868ed3bde44f002c6733b52a63b3 | facebook/pyre-check | sanitizeTransform.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/36dcce30c623068f0efece29c53abb6abfd729d9/source/interprocedural_analyses/taint/sanitizeTransform.mli | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
ea54c3917602d3641eff1e39811294e126dd97eacc8ac7c0ec31821fbb99fb2d | silky/myth | bool_impl.ml | (* CONTAINS CONTEXT FUNCTION *)
type bool =
| True
| False
(* NO BOOL OPERATIONS *)
type nat =
| O
| S of nat
let rec plus (n1:nat) (n2:nat) : nat =
match n1 with
| O -> n2
| S (n1) -> S (plus n1 n2)
;;
let rec div2 (n:nat) : nat =
match n with
| O -> O
| S (n1) -> match n1 with
| O -> O
... | null | https://raw.githubusercontent.com/silky/myth/b631edefb2a27a1d731daa6654517d91ca660b95/tests/pldi-2015-contexts/bool_impl.ml | ocaml | CONTAINS CONTEXT FUNCTION
NO BOOL OPERATIONS |
type bool =
| True
| False
type nat =
| O
| S of nat
let rec plus (n1:nat) (n2:nat) : nat =
match n1 with
| O -> n2
| S (n1) -> S (plus n1 n2)
;;
let rec div2 (n:nat) : nat =
match n with
| O -> O
| S (n1) -> match n1 with
| O -> O
| S (n2) -> S (div2 n2)
;;
type list =
| Nil
| Con... |
e6bd3dceb9d9b86e614c151a09e4c81deac12a8a59f9a002bfea7805c9e2f49f | hipsleek/hipsleek | cilint.ml | cilint : infinite - precision , 2 's complement arithmetic .
An infinite - precision 2 's complement number is a good way of
understanding the meaning of bitwise operations on infinite
precision numbers : positive numbers have the normal base-2
representation , while negative numbers are represented... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/cil/src/cilint.ml | ocaml | Precompute useful big_ints
True if 'b' is all 0's or all 1's
And the corresponding remainder | cilint : infinite - precision , 2 's complement arithmetic .
An infinite - precision 2 's complement number is a good way of
understanding the meaning of bitwise operations on infinite
precision numbers : positive numbers have the normal base-2
representation , while negative numbers are represented... |
86dccc3f00116f262f3f8db0d04833ce2b7f6019fe694039feeef276786319dc | qfpl/reflex-dom-canvas | CanvasTest3D.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
--
module CanvasTest3D where
import Control.Lens ((^.))
impor... | null | https://raw.githubusercontent.com/qfpl/reflex-dom-canvas/b9131dffd521e4534eb2240e3fe0b7bfb70136a8/examples/src/CanvasTest3D.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
Begin initialisation
Buffer Setup and Loading
Populate our buffer with some data
Clear canvas
don't normalize the data
0 for tightly packed array or move forward size * sizeof(type) each iteration to get the ... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
module CanvasTest3D where
import Control.Lens ((^.))
import qualified Reflex.Dom.Canvas.WebGL as Gl
import GHCJS.DOM.Types (JSString, M... |
0a690a1ae105a6600110a7984ea16749acaf75d59f6aa4c5e479c22960f174e0 | clojure-interop/aws-api | AmazonRoute53ClientBuilder.clj | (ns com.amazonaws.services.route53.AmazonRoute53ClientBuilder
"Fluent builder for AmazonRoute53. Use of the builder is preferred over using
constructors of the client class."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.route53 AmazonRoute53ClientBuilder]))
(defn *standard
... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.route53/src/com/amazonaws/services/route53/AmazonRoute53ClientBuilder.clj | clojure | (ns com.amazonaws.services.route53.AmazonRoute53ClientBuilder
"Fluent builder for AmazonRoute53. Use of the builder is preferred over using
constructors of the client class."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.route53 AmazonRoute53ClientBuilder]))
(defn *standard
... | |
b08fbeed58df2028232fb0f58691bd3019d90abe265889c424d175d9e0813b8e | ahrefs/atd | ob_mapping.mli | * decorated ATD AST .
type ob_mapping =
(Ocaml.Repr.t, Biniou.biniou_repr) Mapping.mapping
val defs_of_atd_modules
: ('a * Atd.Ast.module_body) list
-> ('a * (Ocaml.Repr.t, Biniou.biniou_repr) Mapping.def list) list
| null | https://raw.githubusercontent.com/ahrefs/atd/9a3cb984a695563c04b41cdd7a1ce9454eb40e1c/atdgen/src/ob_mapping.mli | ocaml | * decorated ATD AST .
type ob_mapping =
(Ocaml.Repr.t, Biniou.biniou_repr) Mapping.mapping
val defs_of_atd_modules
: ('a * Atd.Ast.module_body) list
-> ('a * (Ocaml.Repr.t, Biniou.biniou_repr) Mapping.def list) list
| |
80cba4533797194c32ed3c71f77a419edf899664458aef5a3b1906a9f9324954 | screenshotbot/screenshotbot-oss | test-user.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(defpackage :screenshotbot/model/test-user
(:use #:cl
#:fiveam)
(:import-... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/5c96657315b3ddb009358e821549e653817ff1e9/src/screenshotbot/model/test-user.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
check that our store is still valid though | 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 /.
(defpackage :screenshotbot/model/test-user
(:use #:cl
#:fiveam)
(:import-from #:bknr.datastore
#:delete-object)
(... |
1218de45b053decf95844dd74068b00fb4d32ed0f416760b1386fcd41c38482f | flyingmachine/datomic-booties | tasks_test.clj | (ns com.flyingmachine.datomic-booties.tasks-test
(:require [com.flyingmachine.datomic-booties.tasks :as tasks]
[com.flyingmachine.datomic-booties.core :as core]
[boot.core :refer [boot deftask]]
[datomic.api :as d]
[clojure.test :refer [deftest is use-fixtures]]))
(def... | null | https://raw.githubusercontent.com/flyingmachine/datomic-booties/f2d04f21a3599a3a41db5cc00d30ffd4d9abbee0/test/com/flyingmachine/datomic_booties/tasks_test.clj | clojure | (ns com.flyingmachine.datomic-booties.tasks-test
(:require [com.flyingmachine.datomic-booties.tasks :as tasks]
[com.flyingmachine.datomic-booties.core :as core]
[boot.core :refer [boot deftask]]
[datomic.api :as d]
[clojure.test :refer [deftest is use-fixtures]]))
(def... | |
f7d368cd0e45b33f09375427807a464322848f1f086a5320c2a569cf1a963dd3 | kadena-io/pact | Persistence.hs | # LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module Pact.Server.History.Persistence
( createDB
, insertCompletedCommand
, queryForExisting
, selectCompletedCommands
, selectAllCommands
, closeDB
) where
import Con... | null | https://raw.githubusercontent.com/kadena-io/pact/4971ab6078b75eb612d83d56f1e7cd139a5a2ba8/src-ghc/Pact/Server/History/Persistence.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - orphans #
module Pact.Server.History.Persistence
( createDB
, insertCompletedCommand
, queryForExisting
, selectCompletedCommands
, selectAllCommands
, closeDB
) where
import Control.Monad
import qualified Data.T... |
4a79cb6e3bb9df5145bc759963f8641e83d7d6dfa22659ee4e21fb931db78b79 | Cipherwraith/Rokka | Errors.hs | module Errors where
import qualified Data.ByteString.Lazy as BL hiding (pack, unpack)
import qualified Data.ByteString.Lazy.Char8 as BL
- -- Alternative error messages
inputError = BL.pack " 404 Not Found - Please check input and try again "
authenticationError = BL.pack " 401 Unauthorized - Authentication Error "... | null | https://raw.githubusercontent.com/Cipherwraith/Rokka/46f55dcc5f0c00f2c806670330234b0e7afea5ee/Errors.hs | haskell | Alternative error messages
}
Errors.
This is a full output of an error code, header, and message | module Errors where
import qualified Data.ByteString.Lazy as BL hiding (pack, unpack)
import qualified Data.ByteString.Lazy.Char8 as BL
inputError = BL.pack " 404 Not Found - Please check input and try again "
authenticationError = BL.pack " 401 Unauthorized - Authentication Error "
urlError = BL.pack " 400 Bad R... |
48fc367151eee15d300158d5a3903a080f8775844c7897fc825712526c21e994 | nick8325/jukebox | Options.hs | -- Command-line option parsing using applicative functors.
Parsers are represented as values of type OptionParser a ,
-- and run using the function
parseCommandLine : : String - > OptionParser a - > IO a.
OptionParsers are built from ArgParsers , which parse a single
option ( e.g. --verbosity 3 ) .
# LANGUAG... | null | https://raw.githubusercontent.com/nick8325/jukebox/52c3206d7def50c8ebcc0128c442fa6c2bd4e074/src/Jukebox/Options.hs | haskell | Command-line option parsing using applicative functors.
and run using the function
verbosity 3 ) .
--------------------------------------------------------------------
A parser of some kind annotated with a help text of some kind
--------------------------------------------------------------------
annotated with a ... | Parsers are represented as values of type OptionParser a ,
parseCommandLine : : String - > OptionParser a - > IO a.
OptionParsers are built from ArgParsers , which parse a single
# LANGUAGE FlexibleContexts , CPP #
module Jukebox.Options where
import Data.Char
import Data.List
import System.Environment
import... |
85a6465c15ccf38e10c807754fff6f0601b06c0f392d6db2eca269c00cebc549 | onyx-platform/learn-onyx | challenge_6_3_test.clj | (ns workshop.jobs.challenge-6-3-test
(:require [clojure.test :refer [deftest is]]
[onyx.test-helper :refer [with-test-env feedback-exception!]]
[workshop.challenge-6-3 :as c]
[workshop.workshop-utils :as u]
[onyx.api]))
;; In practice, you'll frequently need to respond... | null | https://raw.githubusercontent.com/onyx-platform/learn-onyx/6bf1936f35d26e3c8cf171b5971e1bc95e82b3c8/test/workshop/jobs/challenge_6_3_test.clj | clojure | In practice, you'll frequently need to respond to events
other than N number of segments processed. Let's explore
memory.
Try it with:
This trigger fires exactly once (for this data set)
when we exceed the watermark with the last
Triggers also fire on task completion, so technically
the last segment we send... | (ns workshop.jobs.challenge-6-3-test
(:require [clojure.test :refer [deftest is]]
[onyx.test-helper :refer [with-test-env feedback-exception!]]
[workshop.challenge-6-3 :as c]
[workshop.workshop-utils :as u]
[onyx.api]))
the watermark trigger . Watermark 's represent ... |
8c6d60ef59d152ac01c9a0bbe36a6b55f463d0328ee81b8cf0218ad1ea33b5fb | rescript-lang/rescript-compiler | js_of_lam_array.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
* Copyright ( C ) 2017 - , Authors of
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the Licens... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/e60482c6f6a69994907b9bd56e58ce87052e3659/jscomp/core/js_of_lam_array.ml | ocaml |
construct array,
set array,
ref array,
Also make sure, don't call any primitive array method, i.e [E.array_index_by_int]
We also need check primitive [caml_make_vect], i.e,
[Caml_primitive['caml_make_vect']] see if it's correct
[caml_make_vect]
[caml_array_sub]
[caml_array_append]
[... | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
* Copyright ( C ) 2017 - , Authors of
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the Licens... |
86027de10fb71e1b71bdfb72c520c14335fdc9f58d171443fe8f1a895c811f06 | ocaml-flambda/flambda-backend | lambda.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/9c5d6eecfc6fc1cf067e53e530700c85a0a7b1dd/ocaml/lambda/lambda.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Asttypes
type mutable_flag = Immutable | Immutable_unique | Mutable
type compile_time_constant =
... |
8d4e599a86d2273c5cadf9b64da2958a2421b176d9ecf427149314be3d3c41a3 | gergoerdi/tandoori | let-poly-mutual.hs | test x = let tick y = (x,y):tock y
tock y = (x,y):tick y
in (tick,tock)
test' x = let tick y = (x,y):tock y
tock y = (y,x):tick y
in (tick,tock)
| null | https://raw.githubusercontent.com/gergoerdi/tandoori/515142ce76b96efa75d7044c9077d85394585556/input/let-poly-mutual.hs | haskell | test x = let tick y = (x,y):tock y
tock y = (x,y):tick y
in (tick,tock)
test' x = let tick y = (x,y):tock y
tock y = (y,x):tick y
in (tick,tock)
| |
2d2b9a5369f3e5393db6b3f73e4e734f241416d7cd4ddf8a11e10f84ece25fba | let-def/lrgrep | dfa.ml | open Utils
open Misc
open Fix.Indexing
module Make(Regexp : Mid.Sigs.REGEXP)()
: Sigs.DFA with module Regexp = Regexp
=
struct
module Regexp = Regexp
open Regexp
open Info
module Redgraph = Mid.Redgraph.Make(Info)()
module Reduction = Mid.Reduction.Make(Redgraph)
module CachedKRESet = Reduction.Cache(s... | null | https://raw.githubusercontent.com/let-def/lrgrep/0b692a8c6aba8c1fe5d467e89d1bb14602fee9f2/src/back/dfa.ml | ocaml | open Utils
open Misc
open Fix.Indexing
module Make(Regexp : Mid.Sigs.REGEXP)()
: Sigs.DFA with module Regexp = Regexp
=
struct
module Regexp = Regexp
open Regexp
open Info
module Redgraph = Mid.Redgraph.Make(Info)()
module Reduction = Mid.Reduction.Make(Redgraph)
module CachedKRESet = Reduction.Cache(s... | |
f365954341617e260649b2ecd95cfbbe316f1f3420fc502d7e105fc31f1297f9 | alphaHeavy/llvm-general-typed | ValueJoin.hs | {-# LANGUAGE GADTs #-}
module LLVM.General.Typed.ValueJoin where
import LLVM.General.Typed.BasicBlock
import LLVM.General.Typed.Value
-- Place a 'Value' into a 'BasicBlock'
vjoin :: Value const a -> BasicBlock (Value const a)
vjoin (ValueOperand a) = ValuePure <$> a
vjoin a = return a
| null | https://raw.githubusercontent.com/alphaHeavy/llvm-general-typed/75c39111f7fc685aacb3eaf1b2948451e7222e0b/llvm-general-typed-pure/src/LLVM/General/Typed/ValueJoin.hs | haskell | # LANGUAGE GADTs #
Place a 'Value' into a 'BasicBlock' |
module LLVM.General.Typed.ValueJoin where
import LLVM.General.Typed.BasicBlock
import LLVM.General.Typed.Value
vjoin :: Value const a -> BasicBlock (Value const a)
vjoin (ValueOperand a) = ValuePure <$> a
vjoin a = return a
|
0b467825abf4566bc44c770543dd45da39a177931d3dc051796dc71a8583175a | qnighy/ipc_solver | main.ml | open Term
open Format
let verbose = ref false
let latex_output = ref None
let haskell_in_latex = ref false
let usage_msg =
"ipc_solver is a solver for intuitionistic propositional formulas.\n" ^
"\n" ^
"usage:"
let speclist = [
("--latex", Arg.String (fun path -> latex_output := Some path),
"Sets a path ... | null | https://raw.githubusercontent.com/qnighy/ipc_solver/41ef5367150f515580ba98aaf7ea3d8152d84b04/main.ml | ocaml | open Term
open Format
let verbose = ref false
let latex_output = ref None
let haskell_in_latex = ref false
let usage_msg =
"ipc_solver is a solver for intuitionistic propositional formulas.\n" ^
"\n" ^
"usage:"
let speclist = [
("--latex", Arg.String (fun path -> latex_output := Some path),
"Sets a path ... | |
1ceeabb328efc3f4fb1a4ebbf222a21415ff2583f11fffab689e89903a4a7658 | poscat0x04/telegram-types | StopMessageLiveLocation.hs | module Web.Telegram.Types.Internal.API.StopMessageLiveLocation where
import Common
import Web.Telegram.Types.Internal.API.ChatId
import Web.Telegram.Types.Internal.ReplyMarkup
data StopMessageLiveLocation = StopMessageLiveLocation
{ chatId :: Maybe ChatId,
messageId :: Maybe Int,
inlineMessageId :: Maybe Te... | null | https://raw.githubusercontent.com/poscat0x04/telegram-types/3de0710640f5303638a83e409001b0342299aeb8/src/Web/Telegram/Types/Internal/API/StopMessageLiveLocation.hs | haskell | module Web.Telegram.Types.Internal.API.StopMessageLiveLocation where
import Common
import Web.Telegram.Types.Internal.API.ChatId
import Web.Telegram.Types.Internal.ReplyMarkup
data StopMessageLiveLocation = StopMessageLiveLocation
{ chatId :: Maybe ChatId,
messageId :: Maybe Int,
inlineMessageId :: Maybe Te... | |
cfe023d712b6a339d41a1461c8b4c3eb786973f4bb56d7cd10192490be18cb55 | oakes/play-cljc | play_cljc.clj | (ns leiningen.new.play-cljc
(:require [leiningen.new.templates :as t]
[clojure.string :as str]
[clojure.java.io :as io]))
(defn sanitize-name [s]
(as-> s $
(str/trim $)
(str/lower-case $)
(str/replace $ "'" "")
(str/replace $ #"[^a-z0-9]" " ")
(str/sp... | null | https://raw.githubusercontent.com/oakes/play-cljc/ccf9571c1dbc96c044e1d03057cb3b1533100ace/template/src/leiningen/new/play_cljc.clj | clojure | (ns leiningen.new.play-cljc
(:require [leiningen.new.templates :as t]
[clojure.string :as str]
[clojure.java.io :as io]))
(defn sanitize-name [s]
(as-> s $
(str/trim $)
(str/lower-case $)
(str/replace $ "'" "")
(str/replace $ #"[^a-z0-9]" " ")
(str/sp... | |
a08047b7d1fe4cb4ecc4463c59b7777c4e0d9186deb347738870b3326092f9bd | NorfairKing/sydtest | RedisSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Test.Syd.RedisSpec (spec) where
import Database.Redis as Redis
import Test.Syd
import Test.Syd.Redis
spec :: Spec
spec = do
describe "redisServerSpec" $
redisServerSpec $
it "sets up and tears down the redis server nicely" $ do
pure () :: IO ()
describe... | null | https://raw.githubusercontent.com/NorfairKing/sydtest/0fad471cee677a4018acbe1983385dfc9a1b49d2/sydtest-hedis/test/Test/Syd/RedisSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module Test.Syd.RedisSpec (spec) where
import Database.Redis as Redis
import Test.Syd
import Test.Syd.Redis
spec :: Spec
spec = do
describe "redisServerSpec" $
redisServerSpec $
it "sets up and tears down the redis server nicely" $ do
pure () :: IO ()
describe "redisSpec" $
redisSpec $ do
... |
003007ff0319ed6d0a2d66701dc79930b628716faa2d598c768c0269a515dad2 | IBM/wcs-ocaml | cnl_samples.ml |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... | null | https://raw.githubusercontent.com/IBM/wcs-ocaml/b237b7057f44caa09d36e466be015e2bc3173dd5/examples/rulebot/src/cnl_samples.ml | ocaml | * Empty rule
* Partial ASTs
*
when a transaction occurs, called 'the transaction'
if
the balance of 'the account' is less than 'Average Risky Account Balance'
then
print "aggregate " + 'Average Risky Account Balance' ;
print "balance" + the balance of 'the account';
define 'the exception' as a n... |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... |
1489732457fcb2052433f64ffc438646950e8e1e5deaad3b775225b273821ee4 | namin/blond | mit.scm | (define add1 (lambda (n) (+ n 1)))
(define sub1 (lambda (n) (- n 1)))
(define atom? (lambda (x) (not (pair? x))))
(define (flush-output-port) (flush-output))
| null | https://raw.githubusercontent.com/namin/blond/7a92a1b005958b17b3436530ac90acb4726bdd79/mit.scm | scheme | (define add1 (lambda (n) (+ n 1)))
(define sub1 (lambda (n) (- n 1)))
(define atom? (lambda (x) (not (pair? x))))
(define (flush-output-port) (flush-output))
| |
37664296671caee0f45c9d7751802622069005f98d2eafefc8bcead389be75a1 | Palmik/wai-sockjs | Session.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
module Network.Sock.Types.Session
( Session(..)
, SessionStatus(..)
, SessionID
) where
------------------------------------------------------------------------------
import Control.Concurrent.Lifted (ThreadId)
import Control.Co... | null | https://raw.githubusercontent.com/Palmik/wai-sockjs/d1037cb00450a362b7e593a76d6257d06ecb2405/src/Network/Sock/Types/Session.hs | haskell | # LANGUAGE GADTs #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------------... | # LANGUAGE FlexibleContexts #
module Network.Sock.Types.Session
( Session(..)
, SessionStatus(..)
, SessionID
) where
import Control.Concurrent.Lifted (ThreadId)
import Control.Concurrent.MVar.Lifted (MVar)
import Control.Concurrent.STM.TMChan (TMChan)
import Control.C... |
bb9188df504da36b21799f7fb3135ad9817078b1928452d115ffcb3af533ddd7 | sweirich/trellys | SCC.hs |
module SCC where
import DepthFirstSearch
import Data.List(findIndex,union,(\\),nub,partition)
topSort :: (Show a,Eq a) => (d -> [a]) -> [(a,d)] -> [[(a,d)]]
topSort depends pairs = topSortP (==) depends pairs
topSortP :: Show a => (a -> p -> Bool) -> (d -> [a]) -> [(p,d)] -> [[(p,d)]]
topSortP export... | null | https://raw.githubusercontent.com/sweirich/trellys/63ea89d8fa09929c23504665c55a3d909fe047c5/nax/src/SCC.hs | haskell | [(("even",0,d1),(("odd"),1,d2),...]
- > 1
f 1 ---> (("odd"),d2)
[(("even",0,d1),(("odd"),1,d2),...]
- > [ 1 ]
f n = pairs !! n -- f 1 ---> (("odd"),d2)
- > 1
f 1 ---> (("odd"),d2)
|
module SCC where
import DepthFirstSearch
import Data.List(findIndex,union,(\\),nub,partition)
topSort :: (Show a,Eq a) => (d -> [a]) -> [(a,d)] -> [[(a,d)]]
topSort depends pairs = topSortP (==) depends pairs
topSortP :: Show a => (a -> p -> Bool) -> (d -> [a]) -> [(p,d)] -> [[(p,d)]]
topSortP export... |
e3dea34ee9ceba31674c89c278891368b644469096da17cd9694bc9701f7aaab | ocaml-multicore/eio | linux_backend.enabled.ml | let run ~fallback fn = Eio_linux.run ~fallback (fun env -> fn (env :> Eio.Stdenv.t))
| null | https://raw.githubusercontent.com/ocaml-multicore/eio/554179071b7bd239f8ff8ba38bcfb8286c792bc8/lib_main/linux_backend.enabled.ml | ocaml | let run ~fallback fn = Eio_linux.run ~fallback (fun env -> fn (env :> Eio.Stdenv.t))
| |
e1aa79c03dfb830e7a0ebef3cc1bdaa6d24cf2257ef5170c14624ee236fecc1b | mbenke/zpf2013 | Mon.hs | module Mon where
infixl 5 <>
class Mon m where
m1 :: m
(<>) :: m -> m -> m
-- ** Properties:
-- * leftUnit x = m1 <> x == x
-- * rightUnit x = x <> m1 == x
-- * assoc x y z = (x<>y)<>z == x<>(y<>z)
| null | https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Labs/01/Reg/Mon.hs | haskell | ** Properties:
* leftUnit x = m1 <> x == x
* rightUnit x = x <> m1 == x
* assoc x y z = (x<>y)<>z == x<>(y<>z) | module Mon where
infixl 5 <>
class Mon m where
m1 :: m
(<>) :: m -> m -> m
|
b5cb8b3322bb9e0ee3868f261c6ad4e6ec78215f8a59b2e68ee54d2ac8952c7d | bhauman/advent-of-clojure | day20.clj | (ns advent-2015.day20)
;; happy to say that I did this without looking at the forums
;; spent a decent amount of time understanding this page:
;;
(defn value* [p n]
(/ (dec (java.lang.Math/pow p (inc n)))
(dec p)))
(defn sum-of-divisors [prime-factors]
(apply * (map #(apply value* %) (frequencies prime-fac... | null | https://raw.githubusercontent.com/bhauman/advent-of-clojure/856763baf45bf7bf452ffd304dc1b89f9bc879a6/src/advent-2015/day20.clj | clojure | happy to say that I did this without looking at the forums
spent a decent amount of time understanding this page:
I searched prime combinations by hand maximizing the (/ sum-of-divisors house-number)
and getting a feel for the search space
900900 is the last minimum I found
brute force: I know the bounds now a... | (ns advent-2015.day20)
(defn value* [p n]
(/ (dec (java.lang.Math/pow p (inc n)))
(dec p)))
(defn sum-of-divisors [prime-factors]
(apply * (map #(apply value* %) (frequencies prime-factors))))
(let [d [2 2 2 2 3 3 3 5 5 7 11]
house-number (apply * d)
sum-of-presents (sum-of-divisors d)]
[hous... |
c75a3763743ded0094613841ae0798b51a709a1f5d0eddecec8932929f17abbb | amnh/poy5 | utl.mli | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
(* *)
(* This program is free softwa... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/utl.mli | ocaml |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This progra... | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; ... |
a905258aaf31798028eb41d3ac4b5e180ee1bc1520e448a34e4245db324b6366 | incoherentsoftware/defect-process | Behavior.hs | module Enemy.All.Wall.Behavior
( WallEnemyBehaviorInstr(..)
, HurtType(..)
, WallEnemyBehavior(..)
, isIdleBehavior
, isWalkBehavior
, isBackWalkBehavior
, isHurtBehavior
, isFallenBehavior
, isFallenHurtBehavior
, isWallSplatBehavior
, isWallHurtBehavior
, isLaunchedBeha... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Enemy/All/Wall/Behavior.hs | haskell | module Enemy.All.Wall.Behavior
( WallEnemyBehaviorInstr(..)
, HurtType(..)
, WallEnemyBehavior(..)
, isIdleBehavior
, isWalkBehavior
, isBackWalkBehavior
, isHurtBehavior
, isFallenBehavior
, isFallenHurtBehavior
, isWallSplatBehavior
, isWallHurtBehavior
, isLaunchedBeha... | |
4cd3719d0ed3bea450578739ab200b57d9fb16caa2b5a3a1884e16dec7434168 | basho/riak_core | riak_core_cinfo_core.erl | %% -------------------------------------------------------------------
%%
%% Riak: A lightweight, decentralized key-value store.
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use... | null | https://raw.githubusercontent.com/basho/riak_core/762ec81ae9af9a278e853f1feca418b9dcf748a3/src/riak_core_cinfo_core.erl | erlang | -------------------------------------------------------------------
Riak: A lightweight, decentralized key-value store.
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 ... | Copyright ( c ) 2007 - 2010 Basho Technologies , 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 an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-... |
2fb00929f799d9b3119529187c7de43dae9e0d07055ea696fe7b3e3e76b407b7 | lingnand/VIMonad | LayoutScreens.hs | # LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses #
-----------------------------------------------------------------------------
-- |
Module : XMonad . Layout . LayoutScreens
Copyright : ( c ) < >
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : none
-- Stabili... | null | https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Layout/LayoutScreens.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3-style (see LICENSE)
Maintainer : none
Stability : unstable
Portability : unportable
Divide a single screen into multiple screens.
---------------------------------------------------------------------------
*... | # LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses #
Module : XMonad . Layout . LayoutScreens
Copyright : ( c ) < >
module XMonad.Layout.LayoutScreens (
layoutScreens, layoutSplitScreen, fixedLayout,
Fixed... |
fc6de8ff5623bdbc5ae47cd84bd25de231497fcc7b36543d35ccddb49a54a0dd | davexunit/guile-2d | scene.scm | ;;; guile-2d
Copyright ( C ) 2013 >
;;;
;;; Guile-2d is free software: you can redistribute it and/or modify it
;;; under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation , either version 3 of the
;;; License, or (at your option) any later version.
;;;
;;; Guile-2d... | null | https://raw.githubusercontent.com/davexunit/guile-2d/83d9dfab5b04a337565cb2798847b15e4fbd7786/2d/scene.scm | scheme | guile-2d
Guile-2d is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
License, or (at your option) any later version.
Guile-2d is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | Copyright ( C ) 2013 >
published by the Free Software Foundation , either version 3 of the
You should have received a copy of the GNU Lesser General Public
(define-module (2d scene)
#:use-module (srfi srfi-9)
#:use-module (2d observer)
#:export (<scene>
make-scene
scene?
... |
6b5124c462135462b299f9a9abe776b3510999ca00561b6c351cddd60e732961 | AnthonySuper/jordan | Example.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedLabels #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module Jordan.Servant.Ex... | null | https://raw.githubusercontent.com/AnthonySuper/jordan/ec4e0f771fd54b38f53891e6ae996eb6bb0f1f51/servant-example/lib/Jordan/Servant/Example.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedLabels #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module Jordan.Servant.Example where
import Control.Monad
import Control.Monad.IO.Class
imp... |
cf06c9d2148c7c5d1b26baf866cc2bbd7bfb289a11cf9beda7f4065c3da85da0 | nilenso/kulu-backend | bulk_upload_invoices.clj | (ns kulu-backend.scripts.bulk-upload-invoices
(:require [aws.sdk.s3 :as s3 :only [copy-object]]
[clojure.tools.logging :as log]
[clojure.java.io :as io]
[kulu-backend.invoices.model :as inv]
[kulu-backend.organizations.model :as org]
[kulu-backend.conf... | null | https://raw.githubusercontent.com/nilenso/kulu-backend/0b404f76643e77219432dcbffa681172a61e591b/src/kulu_backend/scripts/bulk_upload_invoices.clj | clojure | (ns kulu-backend.scripts.bulk-upload-invoices
(:require [aws.sdk.s3 :as s3 :only [copy-object]]
[clojure.tools.logging :as log]
[clojure.java.io :as io]
[kulu-backend.invoices.model :as inv]
[kulu-backend.organizations.model :as org]
[kulu-backend.conf... | |
73b678b3b2bd959df9c9b2d3b36ea119c4c76e8d3117c612fa6b6f19a0a5e751 | emaphis/HtDP2e-solutions | ex052.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 ex052) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/1-Fixed-Size-Data/04-Intervals/ex052.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 ex052) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
Ex . 52 .
Which integers are contained in the four intervals a... |
34aad072d4285b9d7a89ced1fa37f244086475ae563721afad1f371e805ff9d7 | ygrek/mldonkey | indexer2.ml | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/utils/lib/indexer2.ml | ocaml | lprintf "Adding doc with field %d" fields; lprint_newline ();
lprintf "done"; lprint_newline ();
lprintf "add (%s)" string; lprint_newline ();
lprintf "add"; lprint_newline ();
lprintf "filter node"; lprint_newline ();
lprintf "filter doc %s\n" (string_of_bool bool);
... | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... |
464e0685b1932e477db993639f95a796c703270f9c2cba1ad4bac4c38c3e1a4b | shop-planner/shop3 | axiom-else-bug.lisp | (in-package :shop-user)
;;;---------------------------------------------------------------------------
;;; File Description:
;;;
;;; Example domain and problems created to illustrate a problem
with backtracking over if - then - else axioms in shop2 .
;;;
;;; History/Bugs/Notes:
;;;
[ 2004/01/23 : rpg ] Cre... | null | https://raw.githubusercontent.com/shop-planner/shop3/ba429cf91a575e88f28b7f0e89065de7b4d666a6/shop3/examples/axiom-else-bug.lisp | lisp | ---------------------------------------------------------------------------
File Description:
Example domain and problems created to illustrate a problem
History/Bugs/Notes:
---------------------------------------------------------------------------
delete
add
delete
add
I'm not entirely sure how to spec... | (in-package :shop-user)
with backtracking over if - then - else axioms in shop2 .
[ 2004/01/23 : rpg ] Created .
(defdomain test-axiom-else-branch
(
(:method (simple-test)
((ok-precondition 12))
(!operator))
(:method (test)
((labeled-precondition 12))
(!operator))
... |
d53296b9552987abe4f53483bd5415647cb7740f0ecf90d8663ce9692562a909 | gbwey/predicate-typed | Maybe.hs | # LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE TypeFamilies #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
{-# L... | null | https://raw.githubusercontent.com/gbwey/predicate-typed/51f8d51f662722e1109d2ff35644aea1e0371b42/src/Predicate/Data/Maybe.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
# LANGUAGE ConstraintKinds #
# LANGUAGE EmptyDataDeriving #
| promoted 'Maybe' functions
** predicates
** constructors
** get rid of Maybe
** type families
$setup
>>> :set -XDataKinds
>>> :set -XTypeApplications
>>> :set -XTypeOperators
... | # LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoStarIsType #
mo... |
a69177ae81411eb22c0601eaaec4cb5a430dd6a9aa6988009939e92ff87952d0 | didierverna/declt | assess.lisp | ;; assess.lisp --- Definitions extraction
Copyright ( C ) 2020 - 2022
Author : < >
This file is part of Declt .
;; Permission to use, copy, modify, and distribute this software for any
;; purpose with or without fee is hereby granted, provided that the above
;; copyright notice and this permission notice... | null | https://raw.githubusercontent.com/didierverna/declt/2b81350102d78b8122be908b8619f43fbf87da57/assess/src/assess.lisp | lisp | assess.lisp --- Definitions extraction
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MER... |
Copyright ( C ) 2020 - 2022
Author : < >
This file is part of Declt .
THIS SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
#... |
c7daa28f974b4c82b840f4a73f8be16beef8912c793e2d5e401d8ffb0ace2198 | DSiSc/why3 | glob.ml | (********************************************************************)
(* *)
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/parser/glob.ml | 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
open Ident
let flag = Debug.register_flag "track_symbol_use"
~desc:"Track@ symbol@ occurrences@ in@ sou... |
a5ea905b742a45bd30b0e82c6e0e32ae5c8438653e0700e0aae513c06d77ab8c | juhp/fbrnch | Koji.hs | module Koji (
kojiNVRTags,
kojiBuildStatus,
kojiBuildTags,
kojiGetBuildID,
kojiGetBuildTaskID,
kojiLatestNVR,
kojiOpenTasks,
kojiScratchBuild,
kojiUserSideTags,
buildIDInfo,
BuildState(..),
kojiBuildBranch,
kojiBuildBranchNoWait,
kojiSource,
kojiBuildTarget,
kojiTagArchs,
kojiWaitRepo,... | null | https://raw.githubusercontent.com/juhp/fbrnch/521d268e90801366f1fefba995257f18e125a10c/src/Koji.hs | haskell | FIXME setTermTitle nvr
can fail like:
for srpm: drop uploading line until doing tee
for git: drop "Created task: "
init to drop final newline
kojiBuild :: String -> [String] -> IO String
kojiBuild target args = do
Right url <- kojiBuild' True target args
return url
This might error with exit 0 occasionall... | module Koji (
kojiNVRTags,
kojiBuildStatus,
kojiBuildTags,
kojiGetBuildID,
kojiGetBuildTaskID,
kojiLatestNVR,
kojiOpenTasks,
kojiScratchBuild,
kojiUserSideTags,
buildIDInfo,
BuildState(..),
kojiBuildBranch,
kojiBuildBranchNoWait,
kojiSource,
kojiBuildTarget,
kojiTagArchs,
kojiWaitRepo,... |
c97b58ba108b2c5c99f562f4eb1e422c473d936712534014fa4728c0571de7b9 | VisionsGlobalEmpowerment/webchange | syllables.clj | (ns webchange.dev-templates.syllables
(:require [webchange.dev-templates :as t]
[webchange.templates.core :as templates]
[webchange.course.core :as core]))
(comment
(def test-course-slug (-> (t/create-test-course) :slug))
(def scene-slug "syllables")
(def test-course-slug "english")
... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/118ba5ee407ba1261bac40a6ba5729ccda6e8150/env/dev/clj/webchange/dev_templates/syllables.clj | clojure | (ns webchange.dev-templates.syllables
(:require [webchange.dev-templates :as t]
[webchange.templates.core :as templates]
[webchange.course.core :as core]))
(comment
(def test-course-slug (-> (t/create-test-course) :slug))
(def scene-slug "syllables")
(def test-course-slug "english")
... | |
da664db90ee74a2b62db9db650bbae042e708b270b257aef4152fea6a13ddfdc | mmirman/caledon | Choice.hs | # LANGUAGE
DeriveFunctor ,
FlexibleContexts ,
TypeSynonymInstances ,
FlexibleInstances ,
MultiParamTypeClasses
#
DeriveFunctor,
FlexibleContexts,
TypeSynonymInstances,
FlexibleInstances,
MultiParamTypeClasses
#-}
module Choice where
import Control.Monad
import Data.Functor
import Control.Appli... | null | https://raw.githubusercontent.com/mmirman/caledon/7e97110270362d46d8784a5197a84b6a4b7e2982/sources/Choice.hs | haskell | determine = (:<|>:)
why doesn't this exist in the standard library? | # LANGUAGE
DeriveFunctor ,
FlexibleContexts ,
TypeSynonymInstances ,
FlexibleInstances ,
MultiParamTypeClasses
#
DeriveFunctor,
FlexibleContexts,
TypeSynonymInstances,
FlexibleInstances,
MultiParamTypeClasses
#-}
module Choice where
import Control.Monad
import Data.Functor
import Control.Appli... |
54768c74cf53562eea9693a4af9907e512f91ec00f9bfb6cf0fc9e7ad072d187 | Opetushallitus/aipal | kysely.clj | Copyright ( c ) 2014 The Finnish National Board of Education - Opetushallitus
;;
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
of the EUPL ( the " Licence " ) ;
;;
;; You may not use this work except... | null | https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal/src/clj/aipal/rest_api/kysely.clj | clojure |
You may not use this work except in compliance with the Licence.
You may obtain a copy of the Licence at: /
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | Copyright ( c ) 2014 The Finnish National Board of Education - Opetushallitus
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
European Union Public Licence for more details .
(ns aipal.rest-api.kysely... |
038d425509ce088ba6d24b63e56c12f85da575b8431eb0e705c624ef53ad3b6b | nineties/Choco | Scheduling.hs | -------------------------------------------------
Choco --
Chikadzume Oriented Compiler --
Copyright 2007 - 2008 by Basement fairy --
-------------------------------------------------
module Scheduling (
opLatency,
opIssueCycles,
opInBasic... | null | https://raw.githubusercontent.com/nineties/Choco/0081351d0b556ff74f096accb65c9ab45d29ddfe/tsubaki/Scheduling.hs | haskell | -----------------------------------------------
-----------------------------------------------
instruction informations | module Scheduling (
opLatency,
opIssueCycles,
opInBasicBlock
) where
import Mach hiding (Inst(..))
import qualified Data.IntMap as I
import qualified Data.Map as M
import qualified Control.Monad.State as ST
import Control.Monad
opLatency op = case op of
Ireload -> 2
Iload _ -> 2
Istore _ -> 2
... |
ea0c76cc3c490d9a17e06ae6e49fcd1bfeedace1c62f6501b0970c80ca01a78e | ovotech/ring-jwt | jwk.clj | (ns ring.middleware.jwk
(:import (java.net URL)
(com.auth0.jwk GuavaCachedJwkProvider UrlJwkProvider)
(com.auth0.jwt.interfaces RSAKeyProvider ECDSAKeyProvider)))
(defn- new-jwk-provider
[url]
(-> (URL. url)
(UrlJwkProvider.)
(GuavaCachedJwkProvider.)))
(def rsa-key-provider
... | null | https://raw.githubusercontent.com/ovotech/ring-jwt/793ac1aef8709811b1a48001fa9bf3bf9f631b9e/src/ring/middleware/jwk.clj | clojure | (ns ring.middleware.jwk
(:import (java.net URL)
(com.auth0.jwk GuavaCachedJwkProvider UrlJwkProvider)
(com.auth0.jwt.interfaces RSAKeyProvider ECDSAKeyProvider)))
(defn- new-jwk-provider
[url]
(-> (URL. url)
(UrlJwkProvider.)
(GuavaCachedJwkProvider.)))
(def rsa-key-provider
... | |
bb7bfb5964323ad77fe91ac14d65b2645bbff7c1b0d670695fb16d17f40160d7 | areina/elfeed-cljsrn | user.clj | (ns user
(:use [figwheel-sidecar.repl-api :as ra]))
(defn start-figwheel
"Start figwheel for one or more builds"
[& build-ids]
(apply ra/start-figwheel! build-ids)
(ra/cljs-repl))
(defn stop-figwheel
"Stops figwheel"
[]
(ra/stop-figwheel!))
| null | https://raw.githubusercontent.com/areina/elfeed-cljsrn/4dea27f785d24a16da05c0ab2ac0c6a6f23360f1/env/dev/user.clj | clojure | (ns user
(:use [figwheel-sidecar.repl-api :as ra]))
(defn start-figwheel
"Start figwheel for one or more builds"
[& build-ids]
(apply ra/start-figwheel! build-ids)
(ra/cljs-repl))
(defn stop-figwheel
"Stops figwheel"
[]
(ra/stop-figwheel!))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.