_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 |
|---|---|---|---|---|---|---|---|---|
d49d8b227d1c8d78bd4eb0954b01c6aa626e95b92f9424c7ce414feb0c4e5e44 | leftaroundabout/manifolds | TriangT.hs |
module TriangT where
import Data.SimplicialComplex
import Data.Manifold.TreeCover
import Graphics.Dynamic.Plot.R2
import Diagrams.Prelude
import Diagrams.Backend.Cairo
import IPPrint.Colored
triangTest :: AutoTriang Two P2
triangTest =
elementaryTriang (p2(0,0) :<| p2(0,1) .<. p2(1,0))
<> elementaryTriang (... | null | https://raw.githubusercontent.com/leftaroundabout/manifolds/6f4d3ed71497074ad4cef2874a2d9fe73a14a377/test/TriangT.hs | haskell |
module TriangT where
import Data.SimplicialComplex
import Data.Manifold.TreeCover
import Graphics.Dynamic.Plot.R2
import Diagrams.Prelude
import Diagrams.Backend.Cairo
import IPPrint.Colored
triangTest :: AutoTriang Two P2
triangTest =
elementaryTriang (p2(0,0) :<| p2(0,1) .<. p2(1,0))
<> elementaryTriang (... | |
a5ab332611071a6ec3730124d381cb6a076da9ce96d6f4492a96030a99231015 | jsarracino/spyder | Desugar.hs | module Language.Spyder.Translate.Desugar (
stripLt
, gatherDecls
, generateBoogieBlock
) where
import Language.Spyder.AST.Imp
import qualified Data.Map.Strict as Map
import Data.Set (union, empty, Set, singleton, toList)
import Control.Monad (liftM)
-- need to know the dimensions of each array.
type ArrInfo =... | null | https://raw.githubusercontent.com/jsarracino/spyder/a2f6d08eb2a3907d31a89ae3d942b50aaba96a88/Language/Spyder/Translate/Desugar.hs | haskell | need to know the dimensions of each array.
desugar lt into ! (geq)
gather decls | module Language.Spyder.Translate.Desugar (
stripLt
, gatherDecls
, generateBoogieBlock
) where
import Language.Spyder.AST.Imp
import qualified Data.Map.Strict as Map
import Data.Set (union, empty, Set, singleton, toList)
import Control.Monad (liftM)
type ArrInfo = VDecl
stripLt :: Block -> Block
stripLt (S... |
704d5213982819d752d3af33e576fc6ec42d182426f29cc446e2c019f66a1a05 | rowangithub/DOrder | lightenv.ml |
* Copyright © 2008 The Regents of the University of California . All rights reserved .
*
* Permission is hereby granted , without written agreement and without
* license or royalty fees , to use , copy , modify , and distribute this
* software and its documentation for any purpose , provided that the
... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/liquid/lightenv.ml | ocaml |
* Copyright © 2008 The Regents of the University of California . All rights reserved .
*
* Permission is hereby granted , without written agreement and without
* license or royalty fees , to use , copy , modify , and distribute this
* software and its documentation for any purpose , provided that the
... | |
2869e740b69401ba61f18cd11fb3c4546b2a6e147ff6cb185b61c9e36e64e49c | input-output-hk/marlowe-cardano | Types.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE TypeFamilies #
module Language.Marlowe.Protocol.Sync.Types
where
import Data.Aeson (Key, ToJSON, Value(..), object, (.=))
import Data.Binary (get, getWord8, put, putWord8)
import Language.Marlowe.Runtime.ChainSync.Api (BlockHeader)
import Language.Marlowe.Run... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/bc9a0325f13b886e90ea05196ffb70a46c2ab095/marlowe-runtime/history-api/Language/Marlowe/Protocol/Sync/Types.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
module Language.Marlowe.Protocol.Sync.Types
where
import Data.Aeson (Key, ToJSON, Value(..), object, (.=))
import Data.Binary (get, getWord8, put, putWord8)
import Language.Marlowe.Runtime.ChainSync.Api (BlockHeader)
import Language.Marlowe.Runtime.Core.Api (Contract... |
f57e9276980b62ac68b4ab6c29a94b5756e54db0e3841c6123e33c190b08ae30 | clojure-interop/java-jdk | EditorKit.clj | (ns javax.swing.text.EditorKit
"Establishes the set of things needed by a text component
to be a reasonably functioning editor for some type
of text content. The EditorKit acts as a factory for some
kind of policy. For example, an implementation
of html and rtf can be provided that is replaceable
with oth... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/text/EditorKit.clj | clojure | (ns javax.swing.text.EditorKit
"Establishes the set of things needed by a text component
to be a reasonably functioning editor for some type
of text content. The EditorKit acts as a factory for some
kind of policy. For example, an implementation
of html and rtf can be provided that is replaceable
with oth... | |
379f1b6a4aad02428dc63df47c357396c5e4b7816b6d6ba3101a73358a1334d7 | jtendo/confetti | example_srv.erl | %%%-------------------------------------------------------------------
@author
( C ) 2011 , jtendo
%%% @doc
%%% Example: using confetti configuration provider.
%%% @end
%%%-------------------------------------------------------------------
-module(example_srv).
-behaviour(gen_server).
%% API
-export([start_lin... | null | https://raw.githubusercontent.com/jtendo/confetti/af523158d47e608b0aded67c1f32e0ad3feb28d3/src/example_srv.erl | erlang | -------------------------------------------------------------------
@doc
Example: using confetti configuration provider.
@end
-------------------------------------------------------------------
API
gen_server callbacks | @author
( C ) 2011 , jtendo
-module(example_srv).
-behaviour(gen_server).
-export([start_link/0]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-define(SERVER, ?MODULE).
validate1(Conf) ->
io:format("Config seems... |
c7a767132fd102f4a5b31e65d47f22635e487840ae4bb0bdc8edddfb0f65759a | michaelw/cl-dot | scrape-attributes.lisp | ;;; Usage:
;;;
( ql : quickload ' (: : drakma : cxml : cxml - stp : xml.location : closure - html : cl - dot ) )
;;; (load "scrape-attributes.lisp")
;;; (cl-dot.attribute-scraper:write-attributes-definition)
(cl:defpackage #:cl-dot.attribute-scraper
(:use
#:cl
#:alexandria)
(:import-from #:cl-dot
#:te... | null | https://raw.githubusercontent.com/michaelw/cl-dot/d32808109952faf8e4d342c0ff4f5a2587b315cb/tools-for-development/scrape-attributes.lisp | lisp | Usage:
(load "scrape-attributes.lisp")
(cl-dot.attribute-scraper:write-attributes-definition)
Parameters
Obtaining and parsing the document
Scraping of attributes
Find rows in the attributes table. For each row, extract the name,
the graph elements it is allowed in and its type.
Scraping of node, edge and cl... | ( ql : quickload ' (: : drakma : cxml : cxml - stp : xml.location : closure - html : cl - dot ) )
(cl:defpackage #:cl-dot.attribute-scraper
(:use
#:cl
#:alexandria)
(:import-from #:cl-dot
#:text
#:label-text)
(:export
#:write-attributes-definition))
(cl:in-package #:cl-dot.attribute-scraper)... |
3f4a98e7f76b4b377cbf2f32310bf2ff4cf904a586acfe69cd578e944c7e9595 | Gabriella439/Haskell-Morte-Library | Parser.hs | {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecursiveDo #
| Parsing logic for the Morte language
module Morte.Parser (
*
exprFromText,
-- * Errors
ParseError(..),
ParseMessage(..)
) where
import Control.Applicative hiding (Const)
import Control.E... | null | https://raw.githubusercontent.com/Gabriella439/Haskell-Morte-Library/f7a459c7ec1d69f71c389f5693a26a94c1854636/src/Morte/Parser.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
* Errors
| The specific parsing error
| Lexing failed, returning the remainder of the text
| Parsing failed, returning the invalid token and the expected tokens
| Structured type for parsing errors | # LANGUAGE RecursiveDo #
| Parsing logic for the Morte language
module Morte.Parser (
*
exprFromText,
ParseError(..),
ParseMessage(..)
) where
import Control.Applicative hiding (Const)
import Control.Exception (Exception)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Tran... |
2609b7ce897f62ae52b368e93843446f4d00cf2e495d6baea478c2e930c9c249 | beamjs/erlv8 | erlv8.erl | -module(erlv8).
-export([start/0,stop/0]).
-include_lib("erlv8/include/erlv8.hrl").
start() ->
application:start(erlv8).
stop() ->
application:stop(erlv8).
%% TESTS
-include_lib("eunit/include/eunit.hrl").%
-ifdef(TEST).
suppress_kernel_logger_test() ->
% not a test, obviously
error_logger:delete_report_handler... | null | https://raw.githubusercontent.com/beamjs/erlv8/157a7db0a9c284ea1da107fe3272ff7b19813d26/src/erlv8.erl | erlang | TESTS
not a test, obviously
allow time for process to stop
TODO: cover all standard exits?
allow ample time
test another API
TODO: Externals don't have internal fields anymore, find another way to test this:
?assertEqual(error, Global:get_internal_field(1)),
?assertEqual(error, Global:set_internal_field(1, 1... | -module(erlv8).
-export([start/0,stop/0]).
-include_lib("erlv8/include/erlv8.hrl").
start() ->
application:start(erlv8).
stop() ->
application:stop(erlv8).
-ifdef(TEST).
suppress_kernel_logger_test() ->
error_logger:delete_report_handler(error_logger_tty_h).
valid_vm_creation_test() ->
start(),
{ok, VM} = erl... |
0c6bb8712bcecd69c50cafee874d6abd3f50c6f3df9b60f19e84d96cb835e95d | weyrick/roadsend-php | opaque-math-binding.scm | ;; ***** BEGIN LICENSE BLOCK *****
Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , Inc.
;;
;; 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 2.... | null | https://raw.githubusercontent.com/weyrick/roadsend-php/d6301a897b1a02d7a85bdb915bea91d0991eb158/runtime/opaque-math-binding.scm | scheme | ***** BEGIN LICENSE BLOCK *****
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
either version 2.1
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , Inc.
of the License , or ( at your option ) any later version .
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
Foundation , Inc. , 51 Franklin Street , Fifth... |
027418db33cd15fdcf902ef985e26df42d06ba57b1a4047cc4b062106d160ad4 | fogus/reinen-vernunft | amb_test.clj | (ns reinen-vernunft.amb-test
(:require [clojure.test :refer :all]
[fogus.reinen-vernunft.amb :as rv]))
(deftest test-amb-null-body
(is (nil? (rv/amb))))
(deftest test-amb-simple-binding
(is (= 3 (rv/amb [x (range 10)]
(rv/accept (= x 3)
x))))
(is (n... | null | https://raw.githubusercontent.com/fogus/reinen-vernunft/09d57cdda14dd2227e2a31f59290fc50a6db688f/test/reinen_vernunft/amb_test.clj | clojure | (ns reinen-vernunft.amb-test
(:require [clojure.test :refer :all]
[fogus.reinen-vernunft.amb :as rv]))
(deftest test-amb-null-body
(is (nil? (rv/amb))))
(deftest test-amb-simple-binding
(is (= 3 (rv/amb [x (range 10)]
(rv/accept (= x 3)
x))))
(is (n... | |
4b069dd25f687c4187cd9aadbeaede2656a8b98d17e558eb46859f632bfc1f4c | babashka/nbb | example.cljs | (ns example
(:require ["fs" :as fs]
["showdown$default" :as showdown]))
(let [converter (showdown/Converter.)
text (str (fs/readFileSync "README.md"))]
(println (.makeHtml converter text)))
;; output: <h1 id="showdownexample">showdown example</h1>
| null | https://raw.githubusercontent.com/babashka/nbb/4d06aa142a5fb5baac48a8ad8e611d672f779b5f/examples/showdown/example.cljs | clojure | output: <h1 id="showdownexample">showdown example</h1> | (ns example
(:require ["fs" :as fs]
["showdown$default" :as showdown]))
(let [converter (showdown/Converter.)
text (str (fs/readFileSync "README.md"))]
(println (.makeHtml converter text)))
|
7348784a6cf9bdeb88767bbb9ef0a6e805535cb6db79b9ed71435a39d69f6d2c | clojure-interop/aws-api | LengthCheckInputStream.clj | (ns com.amazonaws.util.LengthCheckInputStream
"Used to perform length check to ensure the number of bytes read from the
underlying input stream is the same as the expected total."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.util LengthCheckInputStream]))
(defn ->length-check-input-... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.util/src/com/amazonaws/util/LengthCheckInputStream.clj | clojure | must be non-negative. - `long` | (ns com.amazonaws.util.LengthCheckInputStream
"Used to perform length check to ensure the number of bytes read from the
underlying input stream is the same as the expected total."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.util LengthCheckInputStream]))
(defn ->length-check-input-... |
14e12e0f459ce8196502246456672f2055e91c146530c1a05af7f01f73e98108 | qkrgud55/ocamlmulti | expunge.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/toplevel/expunge.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : expunge.ml 12800 2012 - 07 - ... |
072901062f74d831956adf1a06235acad7b49f8451a4967eaafdf769bbd1093a | Mesabloo/nihil | OperatorFixity.hs | # LANGUAGE BlockArguments #
{-# LANGUAGE OverloadedStrings #-}
module Nihil.Syntax.Concrete.Parser.Statement.OperatorFixity where
import Nihil.Syntax.Common (Parser)
import Nihil.Syntax.Concrete.Core
import Nihil.Syntax.Concrete.Parser
import Nihil.Syntax.Concrete.Parser.Enclosed
import Nihil.Syntax.Concrete.Parser.I... | null | https://raw.githubusercontent.com/Mesabloo/nihil/3821052ca5691a6492b23bd8a46bfe70567d374f/src/parser/Nihil/Syntax/Concrete/Parser/Statement/OperatorFixity.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE BlockArguments #
module Nihil.Syntax.Concrete.Parser.Statement.OperatorFixity where
import Nihil.Syntax.Common (Parser)
import Nihil.Syntax.Concrete.Core
import Nihil.Syntax.Concrete.Parser
import Nihil.Syntax.Concrete.Parser.Enclosed
import Nihil.Syntax.Concrete.Parser.Identifier
import Nihil.Syntax.Concr... |
644ea0cdbf5aa1b376f4a7dae6aca70a32e681f0023e77394658343565397aec | WickedShell/clj-mavlink | mavlink2_signing_tlog.clj | (ns mavlink.mavlink2-signing-tlog
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[clojure.core.async :as async]
[mavlink.checksum :refer :all]
[mavlink.core :refer :all]
[mavlink.type :refer :all]
[mavlink.test_utilities :refer :al... | null | https://raw.githubusercontent.com/WickedShell/clj-mavlink/21d79d07f862e3fb6d9a75be8e65151e2ab4952b/test/mavlink/mavlink2_signing_tlog.clj | clojure | give the encode a thread an opportunity to run | (ns mavlink.mavlink2-signing-tlog
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[clojure.core.async :as async]
[mavlink.checksum :refer :all]
[mavlink.core :refer :all]
[mavlink.type :refer :all]
[mavlink.test_utilities :refer :al... |
1f611f4195c9bd8a8a6bc43af5ffcc96bdb3b8d5ff00db287768d0718cf1eb59 | TrustInSoft/tis-kernel | Warning.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/Warning.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
8c553af32d48a5dff47b2626059b9eee904cb50e7877b302ba12a925182dfbf3 | 3b/3bz | ht-constants.lisp | (in-package 3bz)
#++
(defconstant +static-huffman-tree+ (if (boundp '+static-huffman-tree+)
+static-huffman-tree+
(make-huffman-tree)))
#++
(build-tree +static-huffman-tree+ *fixed-lit/length-table* *fixed-dist-table*)
#++(dump-tree +static-h... | null | https://raw.githubusercontent.com/3b/3bz/569614c40408f3aefc77ba233e0e4bd66d3850ad/ht-constants.lisp | lisp | (in-package 3bz)
#++
(defconstant +static-huffman-tree+ (if (boundp '+static-huffman-tree+)
+static-huffman-tree+
(make-huffman-tree)))
#++
(build-tree +static-huffman-tree+ *fixed-lit/length-table* *fixed-dist-table*)
#++(dump-tree +static-h... | |
ca7728a0fc360a1c9515d779008a5e0a859308bfb5057682685c120d5bd9ef27 | cxphoe/SICP-solutions | 3.47.rkt | (define (make-semaphore n)
(let ((lock (make-mutex))
(taken 0))
(define (semaphore m)
(cond ((eq? m 'acquire)
(if (< taken n)
(begin (set! taken (+ 1 taken))
(lock 'release))
(begin (lock 'release)
(semaph... | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%203-Modeling%20with%20Mutable%20Data/4.Concurrence/3.47.rkt | racket | (define (make-semaphore n)
(let ((lock (make-mutex))
(taken 0))
(define (semaphore m)
(cond ((eq? m 'acquire)
(if (< taken n)
(begin (set! taken (+ 1 taken))
(lock 'release))
(begin (lock 'release)
(semaph... | |
6facb136a7ad161b7d5bdb2d62316ce9e3266f3e71385580df27c37160c9ca05 | lojic/LearningRacket | bank-account-semaphore.rkt | #lang racket
(require "../concurrency.rkt")
(provide open-bank balance update)
(define/atomic (open-bank)
(box 0))
(define/atomic (balance account)
(unbox account))
(define/atomic (update account amount)
(set-box! account (+ amount (unbox account)))
(unbox account)) | null | https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/exercism.io/bank-account/bank-account-semaphore.rkt | racket | #lang racket
(require "../concurrency.rkt")
(provide open-bank balance update)
(define/atomic (open-bank)
(box 0))
(define/atomic (balance account)
(unbox account))
(define/atomic (update account amount)
(set-box! account (+ amount (unbox account)))
(unbox account)) | |
1a89dca73a5c7353cc53537b49269785d192381a730b47cb8a44abbb45b88593 | ostinelli/misultin | misultin_req.erl | % ==========================================================================================================
MISULTIN - Request
%
% >-|-|-(°>
%
Copyright ( C ) 2011 , < > .
% All rights reserved.
%
Code portions from have been originally taken under MIT license from MOCHIWEB :
% </>
%
% BSD License
%
% Redis... | null | https://raw.githubusercontent.com/ostinelli/misultin/b9fe3125cf17f4415a6d7fc60642b670f5e18eb8/src/misultin_req.erl | erlang | ==========================================================================================================
>-|-|-(°>
All rights reserved.
</>
BSD License
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
* Redist... | MISULTIN - Request
Copyright ( C ) 2011 , < > .
Code portions from have been originally taken under MIT license from MOCHIWEB :
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR
PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ... |
7e736a3d3b91881b941224d33fe73804af0a3f3a4291629ddabdf817f37d3316 | falsetru/htdp | 9.5.5.scm | (require rackunit)
(require rackunit/text-ui)
(define (convert lon)
(cond [(empty? lon) 0]
[else (+ (first lon) (* 10 (convert (rest lon))))]))
(define (check-guess-for-list guess target)
(cond [(< (convert guess) target) 'TooSmall]
[(> (convert guess) target) 'TooLarge]
[else 'Perfect]))
... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/09/9.5.5.scm | scheme | (require rackunit)
(require rackunit/text-ui)
(define (convert lon)
(cond [(empty? lon) 0]
[else (+ (first lon) (* 10 (convert (rest lon))))]))
(define (check-guess-for-list guess target)
(cond [(< (convert guess) target) 'TooSmall]
[(> (convert guess) target) 'TooLarge]
[else 'Perfect]))
... | |
23b7bb37ae4f601e07fb638e0e7fde4899caeee4d16d85c8e62e2623190f95ee | kazu-yamamoto/mighttpd | Test.hs | {-# LANGUAGE OverloadedStrings #-}
module Test where
import Control.Applicative
import Test.Framework (defaultMain, testGroup, Test)
import Test.Framework.Providers.HUnit
import Test.HUnit hiding (Test)
import URLMap
import File
import Network.Web.URI
import Network.Web.Server.Basic
tests :: [Test]
tests = [
tes... | null | https://raw.githubusercontent.com/kazu-yamamoto/mighttpd/0e5c5db56fefaff4c7d40e2a696f22e67100fd6c/Test.hs | haskell | # LANGUAGE OverloadedStrings #
-------------------------------------------------------------- |
module Test where
import Control.Applicative
import Test.Framework (defaultMain, testGroup, Test)
import Test.Framework.Providers.HUnit
import Test.HUnit hiding (Test)
import URLMap
import File
import Network.Web.URI
import Network.Web.Server.Basic
tests :: [Test]
tests = [
testGroup "mapper" [
testCase... |
3f576c519d0a9901358ddee06354ee947aec3e5dbd1a600474b95e4628ac05c1 | 0zat/gen-bs | js_obj_to_typedef.ml | open Bs_type
open Js
let make_ident_name name =
"_" ^ name
let make_aux_name name =
"__" ^ name
let make_like_name name =
"_" ^ name ^ "_like"
let make_aux parent name : Bs.type_def =
let base = make_aux_name name in
let typedef =
if BatOption.is_some parent then
to_ident ~variables:[to_variable... | null | https://raw.githubusercontent.com/0zat/gen-bs/20348991775d9ef3974c3b824968a0ab219502a8/src/intermediate/js_to_bs/obj_to_typedef/js_obj_to_typedef.ml | ocaml | open Bs_type
open Js
let make_ident_name name =
"_" ^ name
let make_aux_name name =
"__" ^ name
let make_like_name name =
"_" ^ name ^ "_like"
let make_aux parent name : Bs.type_def =
let base = make_aux_name name in
let typedef =
if BatOption.is_some parent then
to_ident ~variables:[to_variable... | |
d34d005f0ce5941ab4aa67d103bb366ae1f273369c8c3d92ac0df72f5283798a | input-output-hk/ouroboros-network | P2P.hs | # LANGUAGE CPP #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
{-# LANGUAGE KindSignatures #-}
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
#if !defined(mingw32_HOST_OS)
#defin... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/a3de4116840c7fa07bda02d3e6f678cd1f9c2be4/ouroboros-network/src/Ouroboros/Network/Diffusion/P2P.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE RankNTypes #
| This module is expected to be imported qualified (it will clash
| P2P DiffusionTracers Extras
NodeToClient tracers
| Connection manager tracer for local clients
| Server tracer ... | # LANGUAGE CPP #
# LANGUAGE GADTs #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
#if !defined(mingw32_HOST_OS)
#define POSIX
#endif
with the " Ouroboros . Network . Diffusion . NonP2P " ) .
module Ouroboros.Network.Diffusion.P2P
( TracersExtra (..)
, nullTra... |
70a1601d971a3ae14feb34ade3cbed9372e69245ebb166b892a774d6d592551d | diku-dk/futhark | Error.hs | -- | Futhark error definitions.
module Futhark.Error
( CompilerError (..),
prettyCompilerError,
ErrorClass (..),
externalError,
externalErrorS,
InternalError (..),
compilerBug,
compilerBugS,
compilerLimitation,
compilerLimitationS,
internalErrorS,
)
where
import Control.Exce... | null | https://raw.githubusercontent.com/diku-dk/futhark/98e4a75e4de7042afe030837084764bbf3c6c66e/src/Futhark/Error.hs | haskell | | Futhark error definitions.
implementation limitations. The latter are already known and need
not be reported.
| A compiler error.
| An error that happened due to something the user did, such as
provide incorrect code or options.
for debugging, which can be written to a file.
| Print an error intended for hum... | module Futhark.Error
( CompilerError (..),
prettyCompilerError,
ErrorClass (..),
externalError,
externalErrorS,
InternalError (..),
compilerBug,
compilerBugS,
compilerLimitation,
compilerLimitationS,
internalErrorS,
)
where
import Control.Exception
import Control.Monad.Error... |
1bc437c6d55cd30b6bf136caea6a47cbc5c426470eb436a5c818ba462fe703d1 | let-def/lrgrep | lrgrep_support.mli | open Utils
module RT = Lrgrep_runtime
Pack a sparse list of transition using the sparse vector representation
described in the Dragon Book .
described in the Dragon Book. *)
module Sparse_packer : sig
(** A packer for sparse vector with elements of type ['a] *)
type 'a t
(** Create a new packer *)
... | null | https://raw.githubusercontent.com/let-def/lrgrep/0b692a8c6aba8c1fe5d467e89d1bb14602fee9f2/support/lrgrep_support.mli | ocaml | * A packer for sparse vector with elements of type ['a]
* Create a new packer
* A sparse vector indexed by lr1 states, with elements of type ['a]
* [pack t f] Produces a sparse table from the content of packer [t].
Each element as to be mapped to instructions by [f].
* Emit and link bytecode program
* A code... | open Utils
module RT = Lrgrep_runtime
Pack a sparse list of transition using the sparse vector representation
described in the Dragon Book .
described in the Dragon Book. *)
module Sparse_packer : sig
type 'a t
val make : unit -> 'a t
type 'a vector = (RT.lr1 * 'a) list
* Add a new sparse vector to... |
cd5c40f5519a1aeddb724cbf0ac0a75e3a343d0497de764865c33bde8368155e | 40ants/reblocks-ui | form.lisp | (uiop:define-package #:reblocks-ui-docs/form
(:use #:cl)
(:import-from #:40ants-doc
#:defsection)
(:import-from #:reblocks)
(:import-from #:reblocks/doc/example
#:defexample)
(:import-from #:reblocks-ui/form
#:with-html-form
#:error-placeholder
... | null | https://raw.githubusercontent.com/40ants/reblocks-ui/4adb19f23601de14e16e09c5cbb09ddf7daf062e/docs/form.lisp | lisp | :ignore-words ("API"
"AJAX"
"HTML"
"UI"
"GET"
"POST"
Here we providing an alternative question
This will show a form error
in place of FORM-ERROR-PLACEHOLDER:
If we'll use AND instead of EVERY,
error. | (uiop:define-package #:reblocks-ui-docs/form
(:use #:cl)
(:import-from #:40ants-doc
#:defsection)
(:import-from #:reblocks)
(:import-from #:reblocks/doc/example
#:defexample)
(:import-from #:reblocks-ui/form
#:with-html-form
#:error-placeholder
... |
5d8e86ccd725b51be4e010fb9f574c0016a00bae191e60620c1166a010e9b01f | DaveWM/willa | streams_test.clj | (ns willa.unit.streams-test
(:require [clojure.test :refer :all]
[willa.streams :refer :all]
[jackdaw.streams :as streams]
[willa.test-utils :as u]
[willa.utils :as wu])
(:import (jackdaw.streams.interop CljKStream CljKTable)))
(deftest coerce-to-kstream-test
(let... | null | https://raw.githubusercontent.com/DaveWM/willa/f74a5f36a0206dbefab965be7222d5f0b841704c/test/willa/unit/streams_test.clj | clojure | (ns willa.unit.streams-test
(:require [clojure.test :refer :all]
[willa.streams :refer :all]
[jackdaw.streams :as streams]
[willa.test-utils :as u]
[willa.utils :as wu])
(:import (jackdaw.streams.interop CljKStream CljKTable)))
(deftest coerce-to-kstream-test
(let... | |
3b702134e8ae8f1f62121d9a1f650381ab40444ea56bbcbfa63d985d30eba18b | ixiongdi/sicp | code.scm | (define (p) (p))
(define (test x y)
(if (= x 0)
0
y))
(test 0 (p)) | null | https://raw.githubusercontent.com/ixiongdi/sicp/d591b2e57d325d975bc00460af84c5face94d1a3/exercises/1.5/code.scm | scheme | (define (p) (p))
(define (test x y)
(if (= x 0)
0
y))
(test 0 (p)) | |
86ba7c1305004efaaf97f7b13af441ebcde5e25009c43ba78699acfc26325801 | c-cube/trustee | Xdg.ml | let name_of_project = ref "trustee"
let getenv_or_empty s =
try Sys.getenv s with _ -> ""
let (<+>) x y = if x="" then y() else x
let get_home : unit -> string =
let s = lazy (getenv_or_empty "HOME" <+> (fun () -> "/tmp")) in
fun () -> Lazy.force s
let interpolate_home ?(f=fun _-> None) s =
let buf = Buffer... | null | https://raw.githubusercontent.com/c-cube/trustee/397841b8ff813255f5643fef43a7187e81db21f5/src/core/Xdg.ml | ocaml | let name_of_project = ref "trustee"
let getenv_or_empty s =
try Sys.getenv s with _ -> ""
let (<+>) x y = if x="" then y() else x
let get_home : unit -> string =
let s = lazy (getenv_or_empty "HOME" <+> (fun () -> "/tmp")) in
fun () -> Lazy.force s
let interpolate_home ?(f=fun _-> None) s =
let buf = Buffer... | |
d6d1bb6485ddde5a3b2b17b0005939bce117473b61afa67835e490748c170812 | SimulaVR/godot-haskell | Physics2DDirectBodyState.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.Physics2DDirectBodyState
(Godot.Core.Physics2DDirect... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/Physics2DDirectBodyState.hs | haskell | | Adds a constant directional force without affecting rotation.
| Adds a constant directional force without affecting rotation.
| Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates.
| Adds a positioned force to the body. Both the force and the offset fr... | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.Physics2DDirectBodyState
(Godot.Core.Physics2DDirect... |
c8bf612b045a10383f21e7bedc921ac843909cbe7a240d9cd1edcadecbd75299 | graninas/Functional-Design-and-Architecture | Interpreter.hs | module Andromeda.LogicControl.Impl.Interpreter where
import qualified Andromeda.LogicControl.Domain as T
import qualified Andromeda.LogicControl.Language as L
import qualified Andromeda.Hardware.Impl.Runtime as RImpl
import qualified Andromeda.Hardware.Impl.Interpreters.Hdl as HdlImpl
import qualified Andromeda.Hardw... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/786069eb89f990d5ef94e7251eff13515773cd9b/Second-Edition-Manning-Publications/BookSamples/CH07/Section7p2p1/src/Andromeda/LogicControl/Impl/Interpreter.hs | haskell | module Andromeda.LogicControl.Impl.Interpreter where
import qualified Andromeda.LogicControl.Domain as T
import qualified Andromeda.LogicControl.Language as L
import qualified Andromeda.Hardware.Impl.Runtime as RImpl
import qualified Andromeda.Hardware.Impl.Interpreters.Hdl as HdlImpl
import qualified Andromeda.Hardw... | |
4af30f61f8cde05eb589a471aa1f8be6a01693727a0f1a347d3ba28b8fc72b8b | fossas/fossa-cli | NimbleSpec.hs | module Nim.NimbleSpec (
spec,
) where
import Data.Aeson (decodeFileStrict')
import Data.Text (Text)
import DepTypes (DepType (GitType), Dependency (Dependency), VerConstraint (CEq))
import GraphUtil (expectDeps, expectDirect, expectEdges)
import Strategy.Nim.NimbleLock (
NimPackage (NimPackage),
NimbleDownloadMe... | null | https://raw.githubusercontent.com/fossas/fossa-cli/8d6155e8a7c2ab5c34f9facbc1cd7ce927f2944b/test/Nim/NimbleSpec.hs | haskell | module Nim.NimbleSpec (
spec,
) where
import Data.Aeson (decodeFileStrict')
import Data.Text (Text)
import DepTypes (DepType (GitType), Dependency (Dependency), VerConstraint (CEq))
import GraphUtil (expectDeps, expectDirect, expectEdges)
import Strategy.Nim.NimbleLock (
NimPackage (NimPackage),
NimbleDownloadMe... | |
3e6441ff49652295421b2ae0de9299fdeb868791235c16c920fd60cc43b28411 | ocaml-ppx/ocamlformat | Range.mli | (**************************************************************************)
(* *)
(* OCamlFormat *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/7b15e6e36c578941d297aa88fbdb89142fb6d55e/lib/Range.mli | ocaml | ************************************************************************
OCamlFormat
... | Copyright ( c ) Facebook , Inc. and its affiliates .
This source code is licensed under the MIT license found in
type t
val make : ?range:int * int -> string -> t
val get : t -> int * int
val is_whole : t -> bool
val conv : (string -> t) Cmdliner.Arg.conv
|
4b6401431d56090925c20a5972b9dcbe12d10226835a6536d86b99f4f671d316 | mangpo/greenthumb | arm-symbolic.rkt | #lang s-exp rosette
(require "../symbolic.rkt"
"../inst.rkt")
(provide arm-symbolic%)
(define arm-symbolic%
(class symbolic%
(super-new)
(override len-limit window-size)
Num of instructions that can be synthesized within a minute .
(define (len-limit) 2)
Context - aware window decomposition si... | null | https://raw.githubusercontent.com/mangpo/greenthumb/7a8626205879af8c788f9927eeff643f4ddc5cde/arm/arm-symbolic.rkt | racket | #lang s-exp rosette
(require "../symbolic.rkt"
"../inst.rkt")
(provide arm-symbolic%)
(define arm-symbolic%
(class symbolic%
(super-new)
(override len-limit window-size)
Num of instructions that can be synthesized within a minute .
(define (len-limit) 2)
Context - aware window decomposition si... | |
553c7287e3a15b6ba6906c8d3edb39ea4ea415379e31c72965fc7ea7231ef1ce | achirkin/qua-view | BrowseScenarios.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DataKinds #
module Widgets.Modal.BrowseScenarios
( popupBrowseScenarios
) where
import Reflex.Dom
import Commons
import Program.UserAction
import Widgets.Commons
import Widgets.Modal
-- | Modal window allowing user to select a scenario to load it from luci.
po... | null | https://raw.githubusercontent.com/achirkin/qua-view/62626ead828889a1c7ef1fdba4d84324eb5420b3/src/Widgets/Modal/BrowseScenarios.hs | haskell | # LANGUAGE OverloadedStrings #
| Modal window allowing user to select a scenario to load it from luci.
TODO: Scenario list table
("data-dismiss" =: "modal") | # LANGUAGE DataKinds #
module Widgets.Modal.BrowseScenarios
( popupBrowseScenarios
) where
import Reflex.Dom
import Commons
import Program.UserAction
import Widgets.Commons
import Widgets.Modal
popupBrowseScenarios :: Reflex t => Event t (ElementClick s) -> Widget x (Event t ScId)
popupBrowseScenarios bro... |
3df7ddaef2db0321269926d5255ca1613503171b37e8845751e757a3bb4db1b7 | rigidus/rigidus.ru | daemon.lisp | ;; [[file:doc.org::*Демонизация][daemon]]
(require 'swank)
(swank:create-server :dont-close t :port 6777)
(push (pathname (format nil "/home/~A/src/rigidus.ru/"
(sb-posix:passwd-name
(sb-posix:getpwuid
(sb-posix:stat-uid
... | null | https://raw.githubusercontent.com/rigidus/rigidus.ru/34fe088f5c3d22243b49cf97f376c8f3c1243dff/src/daemon.lisp | lisp | [[file:doc.org::*Демонизация][daemon]]
daemon ends here | (require 'swank)
(swank:create-server :dont-close t :port 6777)
(push (pathname (format nil "/home/~A/src/rigidus.ru/"
(sb-posix:passwd-name
(sb-posix:getpwuid
(sb-posix:stat-uid
(sb-posix:stat (format nil "/proc/~A" (... |
8f705bfc6f1479bd9a58e686f9c629581c97fec2678f41465379284e11f97f7b | meh/clj-sockets | socket.clj | ;; Copyleft (ɔ) meh. -
;;
;; This file is part of clj-sockets - -sockets
;;
;; clj-sockets is free software: you can redistribute it and/or modify it under
the terms of the Lesser GNU General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option )
;; an... | null | https://raw.githubusercontent.com/meh/clj-sockets/ad83aa4af10118fd77981a20e219f7539001c185/src/sockets/socket.clj | clojure | Copyleft (ɔ) meh. -
This file is part of clj-sockets - -sockets
clj-sockets is free software: you can redistribute it and/or modify it under
any later version.
clj-sockets is distributed in the hope that it will be useful, but WITHOUT
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PART... | the terms of the Lesser GNU General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option )
You should have received a copy of the Lesser GNU General Public License
(ns sockets.socket
(:refer-clojure :exclude [send set get])
(:require [sockets.nat... |
c94e3dd53729457a40357fdd681107b5b40cc3a24cd83e8527a230e9960e41b2 | samhh/tshm | Parser.hs | -- This module follows the following whitespace rules:
-- * Consume all whitespace after tokens where possible.
-- * Therefore, assume no whitespace before tokens.
-- * Always handle newlines explicitly, because they can potentially act as
-- delimiters in objects.
module TSHM.Parser where
import ... | null | https://raw.githubusercontent.com/samhh/tshm/e4e4169a4cc5fe5a4a68a959449a3016093cc96d/lib/TSHM/Parser.hs | haskell | This module follows the following whitespace rules:
* Consume all whitespace after tokens where possible.
* Therefore, assume no whitespace before tokens.
* Always handle newlines explicitly, because they can potentially act as
delimiters in objects.
Overloaded function members don't have to be direct s... |
module TSHM.Parser where
import Control.Monad.Combinators.Expr (Operator (..),
makeExprParser)
import qualified Control.Monad.Combinators.NonEmpty as NE
import Data.List (foldr1)
import qualified Data.Text ... |
4aee7ebfd8c9b2f8749fee45680e2eb45568df33abe94a0e3fc3cf4cf239e757 | nominolo/lambdachine | SumEvalThunk.hs | # LANGUAGE NoImplicitPrelude , MagicHash #
-- RUN: %bc_vm_chk
CHECK : @Result@ IND - > GHC.Bool . True`con_info
module Bc.SumEvalThunk where
import GHC.Prim
import GHC.Types
upto :: Int# -> Int# -> [Int]
upto lo hi =
if isTrue# (lo ># hi) then [] else
I# lo : upto (lo +# 1#) hi
loop :: Int# -> [Int] -> Int#
... | null | https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/tests/Bc/SumEvalThunk.hs | haskell | RUN: %bc_vm_chk | # LANGUAGE NoImplicitPrelude , MagicHash #
CHECK : @Result@ IND - > GHC.Bool . True`con_info
module Bc.SumEvalThunk where
import GHC.Prim
import GHC.Types
upto :: Int# -> Int# -> [Int]
upto lo hi =
if isTrue# (lo ># hi) then [] else
I# lo : upto (lo +# 1#) hi
loop :: Int# -> [Int] -> Int#
loop acc [] = acc
l... |
93f238f14e161e3bcd4c52ee429e9362f61f8048f836be70420835cf5aabc2af | jrheard/voke | damage.cljs | (ns voke.system.damage
"Responsible for listening to :contact events and firing :damage events."
(:require [cljs.spec :as s]
[voke.specs]
[voke.events :refer [publish-event]]))
(defn one-way-damage-check
"Checks to see if entity a can damage entity b, and fires a :damage event if so."
[... | null | https://raw.githubusercontent.com/jrheard/voke/15b272955d214ce0c531fb2b8d645feb217255c2/src/voke/system/damage.cljs | clojure | (ns voke.system.damage
"Responsible for listening to :contact events and firing :damage events."
(:require [cljs.spec :as s]
[voke.specs]
[voke.events :refer [publish-event]]))
(defn one-way-damage-check
"Checks to see if entity a can damage entity b, and fires a :damage event if so."
[... | |
81c422e574284ee267661bc42dcb9fec255aedd80be18dc7be91c47eca955d13 | igarnier/vplot | backend.ml | include Vlayout.Backends.Cairo (Cmds)
| null | https://raw.githubusercontent.com/igarnier/vplot/146467257f110f71d48415fc3ddaf0f46a71035a/lib/backend.ml | ocaml | include Vlayout.Backends.Cairo (Cmds)
| |
57172ff99ca9cf709cfdc51b1af7be01b3f60a9a16f645d9ab2ad1913ba70161 | TerrorJack/ghc-alter | T4855.hs | import Debug.Trace
main = trace "我爱我的电脑" $ return () | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/IO/T4855.hs | haskell | import Debug.Trace
main = trace "我爱我的电脑" $ return () | |
16bbf733bd7b1e8fdadd4f6f95397fcc7014c1e7ad43eb64da4c3d3f60e6dea8 | sealchain-project/sealchain | Gen.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Template... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/pact/tests/Analyze/Gen.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
Note [EmptyInterval]: For both genDecimal and genInteger, it's possible that
properties.
Explicitly shrink the size parameter to generate smal... | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeApplications #
module Analyze.Gen where
import Control.DeepSeq
import Control.Lens hiding (op, (...), Empty)
import ... |
0e09627cac78a4b6c389f9a1911fa8f43d19feaf7d92ab365dd8a13240f6d7a8 | teamwalnut/graphql-ppx | source_pos.ml | type source_position = { index : int; line : int; col : int }
type span = source_position * source_position
type 'a spanning = { item : 'a; span : span }
let origin = { index = 0; line = 0; col = 0 }
let nopos = { index = -1; line = -1; col = -1 }
let nospan = (nopos, nopos)
let advance_line { index; line; col = _ } ... | null | https://raw.githubusercontent.com/teamwalnut/graphql-ppx/8276452ebe8d89a748b6b267afc94161650ab620/src/graphql_compiler/source_pos.ml | ocaml | type source_position = { index : int; line : int; col : int }
type span = source_position * source_position
type 'a spanning = { item : 'a; span : span }
let origin = { index = 0; line = 0; col = 0 }
let nopos = { index = -1; line = -1; col = -1 }
let nospan = (nopos, nopos)
let advance_line { index; line; col = _ } ... | |
75a7a91fdadb179945ca16edaa98f6610163a76a892287c9e93b1bae7959b86a | ygrek/mldonkey | guiDownloads.ml | Copyright 2004 b8_bavard ,
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
( at your option ) any l... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/gtk2/gui/guiDownloads.ml | ocaml | The downloads window of MLgui
***********************************************************************
Global tables
... | Copyright 2004 b8_bavard ,
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
( at your option ) any l... |
92348c689fad0d52ab65abe749be5f137b099eb6c75476e0bb1bb7335c3f1c5f | GaloisInc/what4 | Endian.hs | module What4.Utils.Endian where
data Endian = LittleEndian | BigEndian deriving (Eq,Show,Ord)
| null | https://raw.githubusercontent.com/GaloisInc/what4/91200aa39565c156226cec6a9409a692e4022501/what4/src/What4/Utils/Endian.hs | haskell | module What4.Utils.Endian where
data Endian = LittleEndian | BigEndian deriving (Eq,Show,Ord)
| |
79ee0c93578be26d83160ceaf2471a23c3d6606973ce2ec781d3d6e32145d18b | jellelicht/guix | package-hello.scm | (use-modules (guix)
(guix build-system gnu)
(guix licenses))
(package
(name "hello")
(version "2.10")
(source (origin
(method url-fetch)
(uri (string-append "mirror-" version
".tar.gz"))
(sha256
(base32
... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/doc/package-hello.scm | scheme | (use-modules (guix)
(guix build-system gnu)
(guix licenses))
(package
(name "hello")
(version "2.10")
(source (origin
(method url-fetch)
(uri (string-append "mirror-" version
".tar.gz"))
(sha256
(base32
... | |
8a75eee1dace114d9b0c210b5bf1dcc58508324ae892de928faba098f3a190c3 | basho/riak_ensemble | synctree_intercepts.erl | -module(synctree_intercepts).
-compile([export_all, nowarn_export_all]).
-define(M, synctree_orig).
%% copied from synctree.erl
-record(tree, {id :: term(),
width :: pos_integer(),
segments :: pos_integer(),
height :: pos_integer(),
shift :... | null | https://raw.githubusercontent.com/basho/riak_ensemble/f279810f3b9b3a1b4bc82dda738364242896ff32/test/synctree_intercepts.erl | erlang | copied from synctree.erl
io:format("~p: corrupt_upper: ~p~n", [Id, Updates]),
{root, Leader} -> | -module(synctree_intercepts).
-compile([export_all, nowarn_export_all]).
-define(M, synctree_orig).
-record(tree, {id :: term(),
width :: pos_integer(),
segments :: pos_integer(),
height :: pos_integer(),
shift :: pos_integer(),
... |
869f0c493aebba13300e9de9e5aeb5a3f69388897d6ea6b26c4c4a3a23663e9a | tisnik/clojure-examples | core.clj | (ns clisktest5.core
(:gen-class)
(:use clisk.live))
(import java.io.File)
(import javax.imageio.ImageIO)
(defn write-image
"Uložení rastrového obrázku typu BufferedImage do souboru."
[image file-name]
(ImageIO/write image "png" (File. file-name)))
(defn write-pattern
"Vytvoření rastrového obr... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/clisktest5/src/clisktest5/core.clj | clojure | zxn= zx*zx*zx-3.0*zx*zy*zy+cx;
x0 y0 scale maxiter filename | (ns clisktest5.core
(:gen-class)
(:use clisk.live))
(import java.io.File)
(import javax.imageio.ImageIO)
(defn write-image
"Uložení rastrového obrázku typu BufferedImage do souboru."
[image file-name]
(ImageIO/write image "png" (File. file-name)))
(defn write-pattern
"Vytvoření rastrového obr... |
a8b485ee7b196ade4505ba6ff3021a6519697824f71e43bdfa8322787063142a | depressed-pho/HsOpenSSL | Store.hs | {-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE ForeignFunctionInterface #
{-# OPTIONS_HADDOCK prune #-}
-- |An interface to X.509 certificate store.
module OpenSSL.X509.Store
( X509Store
, X509_STORE -- private
, newX509Store
, wrapX509Store -- private
, withX509StorePtr -- priva... | null | https://raw.githubusercontent.com/depressed-pho/HsOpenSSL/9e6a2be8298a9cbcffdfff55eab90e1e497628c3/OpenSSL/X509/Store.hs | haskell | # LANGUAGE EmptyDataDecls #
# OPTIONS_HADDOCK prune #
|An interface to X.509 certificate store.
private
private
private
private
private
private
certificate store. The certificate store is usually used for chain
verification.
|@'addCertToStore' store cert@ adds a certificate to store.
|@... | # LANGUAGE ForeignFunctionInterface #
module OpenSSL.X509.Store
( X509Store
, newX509Store
, addCertToStore
, addCRLToStore
, X509StoreCtx
, getStoreCtxCert
, getStoreCtxIssuer
, getStoreCtxCRL
, getStoreCtxChain
)
where
import Control.Applicative ((<$>))
import Control... |
131a013ef4f0f73615717acbfef1cb3cf7d9340137e06670619a71457d40d053 | mzp/coq-ruby | command.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/toplevel/command.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Commands of the interface
that ca... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : command.ml 12187 ... |
b3e5511a0769c702c266067d5b5b1fc02db2dadb8447ad954dafdbce77ca179b | brendanhay/gogol | Create.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-resourcemanager/gen/Gogol/ResourceManager/Cloudresourcemanager/TagBindings/Create.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
/See:/ <-manager Cloud Resource Manager API Reference> for @cloudresourcemanager.tagBindings.create@.
* Resource
** Constructing a Request
| A resource alias for @cloudresourcemanager.tagBindings.create@ method which the
/Se... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
d1a1c92138003093d47baf2942876b318091b64476e51ac2c27d31213e942e30 | carl-eastlund/dracula | test-debug.rkt | #lang scheme
(require "checks.ss"
"../debug.ss")
(provide debug-suite)
(define debug-suite
(test-suite "debug.ss"
(test-suite "dprintf"
(test
(let ()
(define logger (make-logger))
(define receiver (make-log-receiver logger 'debug))
(parameterize ([current-logger... | null | https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/private/scheme/test/test-debug.rkt | racket | #lang scheme
(require "checks.ss"
"../debug.ss")
(provide debug-suite)
(define debug-suite
(test-suite "debug.ss"
(test-suite "dprintf"
(test
(let ()
(define logger (make-logger))
(define receiver (make-log-receiver logger 'debug))
(parameterize ([current-logger... | |
c9d9192caee12c680e7adf6661b9c36c7b254b796b6c99f5006b65e1cb5abc81 | zikajk/bq2pg | user.clj | (ns user
(:require [bq2pg.config :refer [load-config-repl! CONFIG]]
[bq2pg.integration :refer [integrate!]]
[bq2pg.bq :refer [create-bq-client]]
[bq2pg.gcs :refer [create-gcs-client]]
[malli.clj-kondo :as mc]
[malli.dev :as md]))
(-> (mc/collect *ns*) (mc/l... | null | https://raw.githubusercontent.com/zikajk/bq2pg/38d549ae1c55a91c9261a3d1ede0bddb07cdd5a1/dev/user.clj | clojure | (ns user
(:require [bq2pg.config :refer [load-config-repl! CONFIG]]
[bq2pg.integration :refer [integrate!]]
[bq2pg.bq :refer [create-bq-client]]
[bq2pg.gcs :refer [create-gcs-client]]
[malli.clj-kondo :as mc]
[malli.dev :as md]))
(-> (mc/collect *ns*) (mc/l... | |
e88050d63d46da409c4e5ac4286a991f694820c6a845455b4834cf90dcb6f3bb | TristeFigure/shuriken | tree_test.clj | (ns shuriken.tree-test
(:require [clojure.test :refer :all]
[shuriken.core :refer :all]))
(def a-tree
{:a {:d {:j :_}
:e {:k :_}}
:b {:f {:l :_}
:g {:m :_}}
:c {:h {:n :_}
:i {:o :_}}})
(deftest test-breadth-tree-seq
(testing "it works"
(let [result (tree-seq-breadth m... | null | https://raw.githubusercontent.com/TristeFigure/shuriken/cd36dd2a4005c85260125d89d5a3f475d248e6e4/test/shuriken/tree_test.clj | clojure | (ns shuriken.tree-test
(:require [clojure.test :refer :all]
[shuriken.core :refer :all]))
(def a-tree
{:a {:d {:j :_}
:e {:k :_}}
:b {:f {:l :_}
:g {:m :_}}
:c {:h {:n :_}
:i {:o :_}}})
(deftest test-breadth-tree-seq
(testing "it works"
(let [result (tree-seq-breadth m... | |
5199ced7974495e11df8be64554d2b839eaa9f3a04e4030d72f081ff359d8473 | dpiponi/Moodler | test_bounce.hs | do
restart
root <- getRoot
let out = "out"
let keyboard = "keyboard"
let trigger = "trigger"
adsr0 <- new' "adsr"
audio_saw1 <- new' "audio_saw"
audio_saw2 <- new' "audio_saw"
audio_sin3 <- new' "audio_sin"
audio_sin4 <- new' "audio_sin"
audio_square5 <- new' "audio_square"
... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/saves/test_bounce.hs | haskell | do
restart
root <- getRoot
let out = "out"
let keyboard = "keyboard"
let trigger = "trigger"
adsr0 <- new' "adsr"
audio_saw1 <- new' "audio_saw"
audio_saw2 <- new' "audio_saw"
audio_sin3 <- new' "audio_sin"
audio_sin4 <- new' "audio_sin"
audio_square5 <- new' "audio_square"
... | |
0c1d88513b677a07caec5833c2cf1418f987e376fa98893598265e1ee53aefa3 | pflanze/chj-schemelib | define-nested.scm | Copyright 2010 , 2011 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require def... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/define-nested.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
utility: | Copyright 2010 , 2011 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require define-macro-star
cj-source
test)
(define-macro* (define-nested bind expr)
(let ((bind* (source-code bind)))
... |
a7d44b63fa2d1b4d6b17ff716f54869e38fd9ce7f2d6b5347f6f21991b036d80 | soegaard/little-helper | list-stack.scm | list-stack.scm -- -- 6th nov 2005
(module list-stack mzscheme
(require (only (lib "list.ss") foldl)
(lib "42.ss" "srfi"))
(define-struct stack (elements))
(define empty (make-stack '()))
(define (empty? s)
(null? (stack-elements s)))
(define (insert x s)... | null | https://raw.githubusercontent.com/soegaard/little-helper/26249c688e5adf1e2535c405c6289030eff561b4/planet/galore.plt/2/2/list-stack.scm | scheme | list-stack.scm -- -- 6th nov 2005
(module list-stack mzscheme
(require (only (lib "list.ss") foldl)
(lib "42.ss" "srfi"))
(define-struct stack (elements))
(define empty (make-stack '()))
(define (empty? s)
(null? (stack-elements s)))
(define (insert x s)... | |
a64586087bf1aa8b97c0b2df4995b2d08ec8cdad59c2d6ff44f704be0afeaf20 | craigl64/clim-ccl | resource.lisp | -*- Mode : Common - Lisp ; Package : XLIB ; Syntax : COMMON - LISP ; ; Lowercase : T -*-
RESOURCE - Lisp version of XLIB 's Xrm resource manager
;;;
TEXAS INSTRUMENTS INCORPORATED
;;; P.O. BOX 2909
AUSTIN , TEXAS 78769
;;;
Copyright ( C ) 1987 Texas Instruments Incorporated .
;;;
;;; Permi... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/xlib/resource.lisp | lisp | Package : XLIB ; Syntax : COMMON - LISP ; ; Lowercase : T -*-
P.O. BOX 2909
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
documentat... |
RESOURCE - Lisp version of XLIB 's Xrm resource manager
TEXAS INSTRUMENTS INCORPORATED
AUSTIN , TEXAS 78769
Copyright ( C ) 1987 Texas Instruments Incorporated .
Texas Instruments Incorporated provides this software " as is " without
(in-package :xlib)
The C version of this uses a 64 entry h... |
f70618ccdde4e914653dc242c1764a207a91eb2232341b6ef6e201289c2f6b20 | WorksHub/client | events.cljs | (ns wh.company.applications.events
(:require [cljs-time.format :as tf]
[clojure.string :as str]
[re-frame.core :refer [path reg-event-db reg-event-fx]]
[wh.common.cases :as cases]
[wh.common.graphql-queries :as queries]
[wh.common.job :refer [format-job-loca... | null | https://raw.githubusercontent.com/WorksHub/client/fb17d9b33b348dd85090533ef2b7e9c563a0a2c6/client/src/wh/company/applications/events.cljs | clojure | if no permission, send back to payment flow
jettison applications; we'll be getting new ones
remove the application because it's no longer in this state
(only applicable for 'applications' whereas we just re-query 'applications-by-job' in the case of company view)
we only want state frequencies for this job, but ... | (ns wh.company.applications.events
(:require [cljs-time.format :as tf]
[clojure.string :as str]
[re-frame.core :refer [path reg-event-db reg-event-fx]]
[wh.common.cases :as cases]
[wh.common.graphql-queries :as queries]
[wh.common.job :refer [format-job-loca... |
d49e6c481b5779b0dd773688b76ead47210dac50c326d2b3d1fee6bfbbe856b6 | jimcrayne/jhc | IO.hs | # OPTIONS_JHC -fno - prelude -funboxed - tuples -fforall -fffi #
module Jhc.IO(
IO(..),
thenIO,
thenIO_,
returnIO,
fromUIO,
fromUIO_,
UIO(),
UIO_(),
World__(),
catch,
unIO,
etaIO,
dependingOn,
fixIO,
ioError,
runMain,
exitFailure,
strictReturn,
... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/lib/jhc/Jhc/IO.hs | haskell | | this ensures the world parameter is eta expanded out
unsafe operations
we have to replace the error handler because the context might have quit by the time the value is evaluated.
showError (IOError z) = putErrLn z `thenIO_` exitFailure
no catching on other targets just yet
some primitives
| this is wrapped aro... | # OPTIONS_JHC -fno - prelude -funboxed - tuples -fforall -fffi #
module Jhc.IO(
IO(..),
thenIO,
thenIO_,
returnIO,
fromUIO,
fromUIO_,
UIO(),
UIO_(),
World__(),
catch,
unIO,
etaIO,
dependingOn,
fixIO,
ioError,
runMain,
exitFailure,
strictReturn,
... |
131100c5cc5cdcb0ca154bfa86e79cbf1134e72ce3941e3c1b9fb324fe2db3d2 | deadpendency/deadpendency | IsPackageNotAliveRule.hs | module RG.Effect.AssessDependencies.Backend.Rules.IsPackageNotAliveRule
( isPackageNotAliveRule,
)
where
import Common.Model.Assessment.DependencyAssessmentFailure
import Common.Model.Assessment.DependencyAssessmentViolation
import Common.Model.Assessment.DependencyAssessmentWarning
import Common.Model.Dependency.... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/report-generator/src/RG/Effect/AssessDependencies/Backend/Rules/IsPackageNotAliveRule.hs | haskell | module RG.Effect.AssessDependencies.Backend.Rules.IsPackageNotAliveRule
( isPackageNotAliveRule,
)
where
import Common.Model.Assessment.DependencyAssessmentFailure
import Common.Model.Assessment.DependencyAssessmentViolation
import Common.Model.Assessment.DependencyAssessmentWarning
import Common.Model.Dependency.... | |
d72f222793dfc2259c1feb17917b26931b2cc83142e082a060ffd1247dc26942 | LeventErkok/hArduino | Analog.hs | -------------------------------------------------------------------------------
-- |
Module : System . Hardware . Arduino . SamplePrograms . Analog
Copyright : ( c )
-- License : BSD3
-- Maintainer :
-- Stability : experimental
--
Reads the value of an analog input , controlled by a 10 K... | null | https://raw.githubusercontent.com/LeventErkok/hArduino/ee04988ad9ef3d4384d7ce7a8670518ce8b0a34c/System/Hardware/Arduino/SamplePrograms/Analog.hs | haskell | -----------------------------------------------------------------------------
|
License : BSD3
Maintainer :
Stability : experimental
-----------------------------------------------------------------------------
| Read the value of an analog input line. We will print the value
on the screen, and also b... | Module : System . Hardware . Arduino . SamplePrograms . Analog
Copyright : ( c )
Reads the value of an analog input , controlled by a 10 K potentiometer .
module System.Hardware.Arduino.SamplePrograms.Analog where
import Control.Monad (when)
import Control.Monad.Trans (liftIO)
import Syste... |
94e9a0305552e6fe268ed21f365241f98d18849e029b31b94729034a5f7ba055 | adoptingerlang/service_discovery | sdp_query.erl | -module(sdp_query).
-export([get/1,
get/2,
run/2,
load_sql/0]).
get(Name) ->
persistent_term:get({?MODULE, Name}).
get(Name, Params) ->
lists:map(fun(Key) when is_atom(Key) ->
proplists:get_value(Key, Params);
(S) ->
S
... | null | https://raw.githubusercontent.com/adoptingerlang/service_discovery/03bed070048e70ce267fa4a585fa157bbc883425/apps/service_discovery_postgres/src/sdp_query.erl | erlang | -module(sdp_query).
-export([get/1,
get/2,
run/2,
load_sql/0]).
get(Name) ->
persistent_term:get({?MODULE, Name}).
get(Name, Params) ->
lists:map(fun(Key) when is_atom(Key) ->
proplists:get_value(Key, Params);
(S) ->
S
... | |
6a4629680004e50a7a03547f909b689490b931ac880fe8e802ae585b73026848 | tamarin-prover/tamarin-prover | Guarded.hs | # LANGUAGE BangPatterns #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE MultiParamTypeClasses #
-- |
Copyright : ( c ... | null | https://raw.githubusercontent.com/tamarin-prover/tamarin-prover/b14a9e06f20c36a4811944f9216d8826eaa68eab/lib/theory/src/Theory/Constraint/System/Guarded.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric #
|
License : GPL v3 (see LICENSE)
Guarded formulas.
* Guarded formulas
** Smart constructors
** Transformation
** Queries
** Conversions to non-bound representations
, unbindAtom
** Substitutions
** Skolemization
** Pretty... | # LANGUAGE BangPatterns #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
Copyright : ( c ) 2011 &
Maintainer : < >
Portability : GHC only
module Theory.Constraint.System... |
cdb942c48e1bbb6f7ebe1e2ae7a15c5eefde838b465a5835296eb35b93a9922c | hasktorch/hasktorch | Base.hs | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
module Torch.GraduallyTyped.NN.Transformer.RoBERTa.Base where
import Data.Singletons (SingI (sing))
import GHC.TypeLits (Nat)
import Torch.GraduallyTyped.Device (Device, DeviceType, SDevice)
import Torch.GraduallyTyped.NN.Class (ModelSpec)
import Torch.GraduallyTyped... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/c34996b0a401a5b1b98b5774e892fde88adaa079/experimental/gradually-typed/src/Torch/GraduallyTyped/NN/Transformer/RoBERTa/Base.hs | haskell | | RoBERTa-Base number of layers.
| RoBERTa-Base number of layers singleton.
| RoBERTa-Base number of attention heads.
'num_attention_heads = 12'
| RoBERTa-Base head embedding dimension.
'd_kv = 64'
| RoBERTa-Base embedding dimension.
| RoBERTa-Base model dimension.
| RoBERTa-Base feed-forward network dimension... | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
module Torch.GraduallyTyped.NN.Transformer.RoBERTa.Base where
import Data.Singletons (SingI (sing))
import GHC.TypeLits (Nat)
import Torch.GraduallyTyped.Device (Device, DeviceType, SDevice)
import Torch.GraduallyTyped.NN.Class (ModelSpec)
import Torch.GraduallyTyped... |
1cd1afff2dd4bd3c6ff73631960619c373513504c8339435cfd7a0114b111441 | racket/gui | more-tests.rkt | #lang racket/gui
;; some more advanced aligned-pasteboard tests take from the
;; test-case-boxes
(require "../aligned-editor-container.rkt" "../aligned-pasteboard.rkt")
;; a text-case snip
(define test-case-box%
(class aligned-editor-snip%
;; these edit-sequences are looping
(define/public (hide-entries)
... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mrlib/private/aligned-pasteboard/tests/more-tests.rkt | racket | some more advanced aligned-pasteboard tests take from the
test-case-boxes
a text-case snip
these edit-sequences are looping
these edit-sequences are looping
the top line of the test-case
a line labeled with the given string and containing a given text
a text field fit to be in a test-case (no borders or margins... | #lang racket/gui
(require "../aligned-editor-container.rkt" "../aligned-pasteboard.rkt")
(define test-case-box%
(class aligned-editor-snip%
(define/public (hide-entries)
(send* editor
(begin-edit-sequence)
(release-snip call-line)
(release-snip exp-line)
(release-snip act-... |
b6c7f3dc17362627751198192bf26f1015f8f97ebee3c6ea44a357de2eecf76e | yurug/ocaml4.04.0-copatterns | ocamlprof.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
an... | null | https://raw.githubusercontent.com/yurug/ocaml4.04.0-copatterns/b3ec6a3cc203bd2cde3b618546d29e10f1102323/tools/ocamlprof.ml | ocaml | ************************************************************************
OCaml
... | and , INRIA Rocquencourt
Ported to Caml Special Light by
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Printf
open Location
open Parsetree
let idprefix = "... |
217b0302f5c10185d652f4a140586d4d3c1159192ea50cbe69f3e26b8bbe23e0 | BranchTaken/Hemlock | uns.mli | * 64 - bit unsigned integer type .
See { ! module : ConvertIntf } for documentation on conversion functions .
See {!module:ConvertIntf} for documentation on conversion functions. *)
open RudimentsInt0
type t = uns
include IntnbIntf.SU with type t := t
val trunc_of_zint: Zint.t -> t
val extend_to_zint: t... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/53da5c0d9cf0c94d58b4391735d917518eec67fa/bootstrap/src/basis/uns.mli | ocaml | ************************************************************************************************
* [bits_of_i64 x] converts [x] to a bitwise identical {!type:u64} value.
* [to_i64_bits t] converts [t] to a bitwise identical {!type:i64} value.
* [like_of_i64_hlt x] converts [x] to an equivalent {!type:u64} value, or h... | * 64 - bit unsigned integer type .
See { ! module : ConvertIntf } for documentation on conversion functions .
See {!module:ConvertIntf} for documentation on conversion functions. *)
open RudimentsInt0
type t = uns
include IntnbIntf.SU with type t := t
val trunc_of_zint: Zint.t -> t
val extend_to_zint: t... |
5908d68f603e62a59496bf2df1f7c71da16554185d9678d752974143b989d187 | returntocorp/semgrep | misc_ctor_one_arg.ml | (* ERROR: match *)
let a = Foo 1
(* ERROR: match *)
let b = Foo (1+2)
this is not matched , even though $ X could be matched to the
* Tuple ( 1,2 ) , because we treat specially constructor calls .
* Those are parsed as Constructor(Foo , [ 1 ; 2 ] ) not as
* , Tuple(1 ; 2 ) ) which fix things for
* rang... | null | https://raw.githubusercontent.com/returntocorp/semgrep/8c379c2c73b4ece1b1316655b00e21a8af3f00bb/tests/patterns/ocaml/misc_ctor_one_arg.ml | ocaml | ERROR: match
ERROR: match | let a = Foo 1
let b = Foo (1+2)
this is not matched , even though $ X could be matched to the
* Tuple ( 1,2 ) , because we treat specially constructor calls .
* Those are parsed as Constructor(Foo , [ 1 ; 2 ] ) not as
* , Tuple(1 ; 2 ) ) which fix things for
* range and autofix .
* Tuple (1,2), bec... |
9cde3a07831dda13438aa59e81f34f5edcb997930943925b5b0a0dfc19b66007 | SumitPadhiyar/confuzz | crowbar.mli | * { 1 : top Types }
type 'a gen
* [ ' a gen ] knows how to generate [ ' a ] for use in Crowbar tests .
type ('k, 'res) gens =
| [] : ('res, 'res) gens
| (::) : 'a gen * ('k, 'res) gens -> ('a -> 'k, 'res) gens
(** multiple generators are passed to functions using a listlike syntax.
for example, [map [int;... | null | https://raw.githubusercontent.com/SumitPadhiyar/confuzz/7d6b2af51d7135025f9ed1e013a9ae0940f3663e/src/core/crowbar.mli | ocaml | * multiple generators are passed to functions using a listlike syntax.
for example, [map [int; int] (fun a b -> a + b)]
*/*
re-export stdlib's list
We only want to override [] syntax in the argument to Map
*/*
* [int] generates an integer ranging from min_int to max_int, inclusive.
If you need integers ... | * { 1 : top Types }
type 'a gen
* [ ' a gen ] knows how to generate [ ' a ] for use in Crowbar tests .
type ('k, 'res) gens =
| [] : ('res, 'res) gens
| (::) : 'a gen * ('k, 'res) gens -> ('a -> 'k, 'res) gens
type 'a printer = Format.formatter -> 'a -> unit
* pretty - printers for items generated by Crowbar ; u... |
bf235298c4c183dbd4b571cbbd8211ccaf72536080eeda726e259262e6b90376 | Yuppiechef/datomic-schema | core.clj | (ns example.core
(:use
[datomic-schema.schema :only [fields part schema]])
(:require
[datomic.api :as d]
[datomic-schema.schema :as s])
(:gen-class))
(defonce db-url "datomic:mem")
(defn dbparts []
[(part "app")])
(defn dbschema []
[(schema user
(fields
[username :string :indexed]
... | null | https://raw.githubusercontent.com/Yuppiechef/datomic-schema/2ca2005daa686859d4a5e4ab2eb3e59b91ad96dc/example/src/example/core.clj | clojure | (ns example.core
(:use
[datomic-schema.schema :only [fields part schema]])
(:require
[datomic.api :as d]
[datomic-schema.schema :as s])
(:gen-class))
(defonce db-url "datomic:mem")
(defn dbparts []
[(part "app")])
(defn dbschema []
[(schema user
(fields
[username :string :indexed]
... | |
0fb0619879edc3c896e5337abfa57429946d3a8d9e1425d69d6958f58c1fb7e0 | melange-re/melange | js_of_lam_array.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/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.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
db5a1b30bc2215aa1eb7fbfc9069e9b468a7971d959d89cc1cbf89392ae3d31b | paulosuzart/clact | project.clj | (defproject clacts "0.1.0"
:description "Clacts: Record your friends facts"
:url "paulosuzart.guithub.com/blog/2012/07/09/tcp-server-with-clojure-aleph-and-gloss/"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[aleph "0.2.1-rc5"]
[org.clojure/java.jdbc "0... | null | https://raw.githubusercontent.com/paulosuzart/clact/9eeae62494075434a1ce4d647554eb47e6f1684c/project.clj | clojure | (defproject clacts "0.1.0"
:description "Clacts: Record your friends facts"
:url "paulosuzart.guithub.com/blog/2012/07/09/tcp-server-with-clojure-aleph-and-gloss/"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[aleph "0.2.1-rc5"]
[org.clojure/java.jdbc "0... | |
1ed01ccdef4706f0ae0a2a39440a88e50ab021921ad1a7e1408433b1da78ee8d | bpiel/guildsman | tensor.clj | (ns com.billpiel.guildsman.tensor
(:require [com.billpiel.guildsman.data-type :as dt]
[com.billpiel.guildsman.shape :as sh]))
#_(def deleted (atom #{}))
(defn get-shape-by-handle [handle]
(-> handle com.billpiel.guildsman.TensorNI/shape dt/md-array->vecs))
(defn get-data-type-by-handle [handle]
(->... | null | https://raw.githubusercontent.com/bpiel/guildsman/59c9a7459de19525cfc54112f02127e0777a00ce/src/clj/com/billpiel/guildsman/tensor.clj | clojure | TODO TEMP byte array becomes string
so sequential? returns `true` | (ns com.billpiel.guildsman.tensor
(:require [com.billpiel.guildsman.data-type :as dt]
[com.billpiel.guildsman.shape :as sh]))
#_(def deleted (atom #{}))
(defn get-shape-by-handle [handle]
(-> handle com.billpiel.guildsman.TensorNI/shape dt/md-array->vecs))
(defn get-data-type-by-handle [handle]
(->... |
4b86b7d166f91d71b647f11ac43811952379c8899fc2859ef9da9d23ae69ca12 | ygrek/mldonkey | store.mli | Copyright 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
( at y... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/utils/lib/store.mli | ocaml | Copyright 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
( at y... | |
04e14e828874dd3870f7468d10f1f074eb8e5d30ddc2e89dbfa93b6d5555bf6f | spacegangster/space-ui | all.cljc | (ns space-ui.keyframes.all
(:require [garden.stylesheet :as gs]))
(def completion--blue
(gs/at-keyframes :keyframes/completion
[:0% {:width 0}]
[:50%
{:width :100%
:background "hsla(200, 80, 70, .6)"}]
[:100%
{:width :100%
:background "hsla(200, 50, 50, .2)"}]))
... | null | https://raw.githubusercontent.com/spacegangster/space-ui/74825c904b6b456d845c3b3d669ce795b33f5ba9/src/space_ui/keyframes/all.cljc | clojure | (ns space-ui.keyframes.all
(:require [garden.stylesheet :as gs]))
(def completion--blue
(gs/at-keyframes :keyframes/completion
[:0% {:width 0}]
[:50%
{:width :100%
:background "hsla(200, 80, 70, .6)"}]
[:100%
{:width :100%
:background "hsla(200, 50, 50, .2)"}]))
... | |
ad736aa517d4aee75084d3d0ec09c164308ce0fd1cf142668de835f1fb79fc93 | jwiegley/notes | foo.hs | module Main where
import Data.Monoid hiding (Sum)
import Control.Applicative
import Data.Functor.Identity
data Sum f g a = InL (f a) | InR (g a) deriving Show
instance (Functor f, Functor g) => Functor (Sum f g) where
fmap f (InL x) = InL (fmap f x)
fmap f (InR y) = InR (fmap f y)
class Natural f g where
... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/gists/7246118/foo.hs | haskell | module Main where
import Data.Monoid hiding (Sum)
import Control.Applicative
import Data.Functor.Identity
data Sum f g a = InL (f a) | InR (g a) deriving Show
instance (Functor f, Functor g) => Functor (Sum f g) where
fmap f (InL x) = InL (fmap f x)
fmap f (InR y) = InR (fmap f y)
class Natural f g where
... | |
2cf150aebed090f0d708ea906c83d4abdf29dda9a21c9499b5596141d63295fb | rollacaster/sketches | piet_mondarin.cljs | (ns sketches.generative-artistry.piet-mondarin
(:require [quil.core :as q :include-macros true]
[quil.middleware :as md]
[quil.sketch]))
(defn split-on-x [square split-at]
(let [square-a {:x (:x square)
:y (:y square)
:width (- (:width square) (+ (- (:wid... | null | https://raw.githubusercontent.com/rollacaster/sketches/ba79fccf2a37139de9193ed2ea7a6cc04b63fad0/src/sketches/generative_artistry/piet_mondarin.cljs | clojure | (ns sketches.generative-artistry.piet-mondarin
(:require [quil.core :as q :include-macros true]
[quil.middleware :as md]
[quil.sketch]))
(defn split-on-x [square split-at]
(let [square-a {:x (:x square)
:y (:y square)
:width (- (:width square) (+ (- (:wid... | |
4a4cbc059c11e7ce352d2da635a879af83f3edbb2e82aa5aefa54defc263f749 | marianoguerra/immutant-recipes | project.clj | (defproject static-files "0.2.0-SNAPSHOT"
:description "example to serve static files on immutant"
:url "-recipes/"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]])
| null | https://raw.githubusercontent.com/marianoguerra/immutant-recipes/6b05ad77f91826e8613421de5bee337fc1cc65d0/static-files/project.clj | clojure | (defproject static-files "0.2.0-SNAPSHOT"
:description "example to serve static files on immutant"
:url "-recipes/"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]])
| |
33b3046d9740e138257c65253a8dfba0a0e5d3a7b560fe4ad7470b2e631b0a1b | nobutaka/nanopass | tests-1.6-req.scm | (add-tests-with-string-output "let"
[(let ([x 5]) x) => "5\n"]
[(let ([x (fx+ 1 2)]) x) => "3\n"]
[(let ([x (fx+ 1 2)])
(let ([y (fx+ 3 4)])
(fx+ x y)))
=> "10\n"]
[(let ([x (fx+ 1 2)])
(let ([y (fx+ 3 4)])
(fx- y x)))
=> "4\n"]
[(let ([x (fx+ 1 2)]
[y (fx+ 3 4)])
(... | null | https://raw.githubusercontent.com/nobutaka/nanopass/80e0344a1f143832a75d798be903e05b5dbdd079/tests/tests-1.6-req.scm | scheme | (add-tests-with-string-output "let"
[(let ([x 5]) x) => "5\n"]
[(let ([x (fx+ 1 2)]) x) => "3\n"]
[(let ([x (fx+ 1 2)])
(let ([y (fx+ 3 4)])
(fx+ x y)))
=> "10\n"]
[(let ([x (fx+ 1 2)])
(let ([y (fx+ 3 4)])
(fx- y x)))
=> "4\n"]
[(let ([x (fx+ 1 2)]
[y (fx+ 3 4)])
(... | |
4e369879d42540a82e4531c1cc84d04353cfe280f1b45acacf37cf78a936484c | racket/redex | loc-wrapper-ct.rkt | #lang racket/base
(require (for-template racket/base)
(for-template "loc-wrapper-rt.rkt")
"term-fn.rkt")
(provide to-lw/proc to-lw/uq/proc)
(define (process-arg stx quote-depth)
(define quoted? (quote-depth . > . 0))
(define init-loc-wrapper/q? (if quoted? 'init-loc-wrapper/quoted 'init-loc-wrapp... | null | https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-lib/redex/private/loc-wrapper-ct.rkt | racket | do not render `mf-apply` annotations | #lang racket/base
(require (for-template racket/base)
(for-template "loc-wrapper-rt.rkt")
"term-fn.rkt")
(provide to-lw/proc to-lw/uq/proc)
(define (process-arg stx quote-depth)
(define quoted? (quote-depth . > . 0))
(define init-loc-wrapper/q? (if quoted? 'init-loc-wrapper/quoted 'init-loc-wrapp... |
e3a3b6581813544a772edd6016877dc6d433dfdd3e2ede19b36812d53ea8cde0 | avsm/mirage-duniverse | tls_lwt.ml | open Lwt
exception Tls_alert of Tls.Packet.alert_type
exception Tls_failure of Tls.Engine.failure
let o f g x = f (g x)
type tracer = Sexplib.Sexp.t -> unit
(* This really belongs just about anywhere else: generic unix name resolution. *)
let resolve host service =
let open Lwt_unix in
getprotobyname "tcp" >>... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tls/lwt/tls_lwt.ml | ocaml | This really belongs just about anywhere else: generic unix name resolution.
* XXX bad XXX
* This is a point that should particularly be protected from concurrent r/w.
* Doing this before a `t` is returned is safe; redoing it during rekeying is
* not, as the API client already sees the `t` and can mistake... | open Lwt
exception Tls_alert of Tls.Packet.alert_type
exception Tls_failure of Tls.Engine.failure
let o f g x = f (g x)
type tracer = Sexplib.Sexp.t -> unit
let resolve host service =
let open Lwt_unix in
getprotobyname "tcp" >>= fun tcp ->
getaddrinfo host service [AI_PROTOCOL tcp.p_proto] >>= function
|... |
c41375b27b1ee9409c97f83dfc7634b23adc1f0464c5784d92fb7261c67dbaa3 | aesiniath/unbeliever | CheckRopeBehaviour.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# OPTIONS_GHC -fno - warn - missing - signatures #
module CheckRopeBehaviour
( checkRopeBehaviour
) where
import Core.Text.Rope
import Core.Text.Utilities
import Data.Char (isSpace)
import qualified Data.FingerTree as F
import Data.Hashable (hash)
im... | null | https://raw.githubusercontent.com/aesiniath/unbeliever/a315a894c580b72ca32b3157518c6ba4653d9381/tests/CheckRopeBehaviour.hs | haskell | # LANGUAGE OverloadedStrings #
expect same behaviour of Rope
exercise splitRopeting at and between piece boundaries
expect same behaviour of Rope | # LANGUAGE QuasiQuotes #
# OPTIONS_GHC -fno - warn - missing - signatures #
module CheckRopeBehaviour
( checkRopeBehaviour
) where
import Core.Text.Rope
import Core.Text.Utilities
import Data.Char (isSpace)
import qualified Data.FingerTree as F
import Data.Hashable (hash)
import qualified Data.List as List
im... |
7823eb738758bfb07181d29c867f956ac1440dc594a427587f9784f4e44ff4fa | Bodigrim/arithmoi | Impl.hs | -- |
Module : Math . . Primes . Counting . Impl
Copyright : ( c ) 2011
Licence : MIT
Maintainer : < >
--
Number of primes not exceeding @n@ , @π(n)@ , and @n@-th prime .
--
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE ScopedTypeVariables #
# ... | null | https://raw.githubusercontent.com/Bodigrim/arithmoi/979f3a8f02de17ea7e52392320d3e81f16bb6d32/Math/NumberTheory/Primes/Counting/Impl.hs | haskell | |
# LANGUAGE BangPatterns #
# LANGUAGE FlexibleContexts #
| @'primeCount' n == π(n)@ is the number of (positive) primes not exceeding @n@.
not exceed 'primeCountMaxArg'.
Requires @/O/(n^0.5)@ space, the time complexity is roughly @/O/(n^0.7)@.
<#Algorithms_for_evaluating_.CF.80.28x.29>.
|... | Module : Math . . Primes . Counting . Impl
Copyright : ( c ) 2011
Licence : MIT
Maintainer : < >
Number of primes not exceeding @n@ , @π(n)@ , and @n@-th prime .
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fspec - constr - count=24 #
# OPTIONS_GHC -Wno - incomplete - uni - patt... |
6a5640fad77b1f96657b9ce19f9462ab200d4c46d114469641c92920441ae9c1 | matsen/pplacer | mapsSets.ml | open Batteries
open Ppr
module OrderedFloat = struct
type t = float
let compare = Pervasives.compare
end
module OrderedInt = struct
type t = int
let compare a b = a - b
end
module OrderedChar = struct
type t = char
let compare = Char.compare
end
module OrderedString = struct
type t = string
let comp... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/common_src/mapsSets.ml | ocaml | general things we might want to do with maps
if x is a key of m, make sure that it is bound to y.
* otherwise, add (x,y) as a kv-pair to m
of_pairlist : given key, value pairs
listly means add values as a list associated with a key
the above rev's things
collect key,value pairs into a map from the key... | open Batteries
open Ppr
module OrderedFloat = struct
type t = float
let compare = Pervasives.compare
end
module OrderedInt = struct
type t = int
let compare a b = a - b
end
module OrderedChar = struct
type t = char
let compare = Char.compare
end
module OrderedString = struct
type t = string
let comp... |
eec71d6bdb4987d511b6a564649cfbb38d4d504abc404e3ef400a1ad224ed73f | manuel-serrano/bigloo | evobject.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / / runtime / Eval / evobject.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/runtime/Eval/evobject.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Eval class definition */
*===========================... | * serrano / prgm / project / bigloo / / runtime / Eval / evobject.scm * /
* Author : * /
* Creation : Sat Jan 14 17:11:54 2006 * /
* Last change : Mon Jun 4 08:46:51 2018 ( serrano ) * /
* Copyrig... |
7501a4f5bf35c5515cdfffee7f0cb2dc882dc1000a5636f8ad6fcd4be8e77c47 | jakepearson/quickie | quickp.clj | (ns leiningen.quickp
(:require [leiningen.quickie :as quickie]))
(defn quickp
"Run each test in a different thread"
[project & args]
(apply quickie/run-parallel project args))
| null | https://raw.githubusercontent.com/jakepearson/quickie/ef005df803173b7707d16b63e24696e09264973a/src/leiningen/quickp.clj | clojure | (ns leiningen.quickp
(:require [leiningen.quickie :as quickie]))
(defn quickp
"Run each test in a different thread"
[project & args]
(apply quickie/run-parallel project args))
| |
f8604df166d6a752fde8be1c980e8820ac7155b5843b7a60821749200d22cb07 | nitrogen/simple_bridge | mochiweb_simple_bridge.erl | % vim: sw=4 ts=4 et
% Simple Bridge
Copyright ( c ) 2008 - 2010
See MIT - LICENSE for licensing information .
-module (mochiweb_simple_bridge).
-behaviour (simple_bridge).
-include("simple_bridge.hrl").
-export ([
init/1,
protocol/1,
host/1,
request_method/1,
path/1,
uri/1,
peer_ip/1... | null | https://raw.githubusercontent.com/nitrogen/simple_bridge/0b33e15759b23050c151912374a68e18f2a3b83d/src/mochiweb_bridge_modules/mochiweb_simple_bridge.erl | erlang | vim: sw=4 ts=4 et
Simple Bridge
NOTE: It seems to be common for folks to manually override this directly in
the code here. That, however, is not necessary. It's far simpler to set
the faux-mochiweb environment variable max_reqest_size. I say "faux-mochiweb"
because it isn't ACTUALLY a stock mochiweb variable, b... | Copyright ( c ) 2008 - 2010
See MIT - LICENSE for licensing information .
-module (mochiweb_simple_bridge).
-behaviour (simple_bridge).
-include("simple_bridge.hrl").
-export ([
init/1,
protocol/1,
host/1,
request_method/1,
path/1,
uri/1,
peer_ip/1,
peer_port/1,
headers/1,
... |
0583f3aa7bd40c4d5df80a318fbccbf6a45a65204623b184a276179fc8c8b601 | nilenso/time-tracker | routes.clj | (ns time-tracker.timers.routes
(:require [time-tracker.timers.handlers :as handlers]
[time-tracker.auth.core :refer [wrap-auth]]
[time-tracker.db :refer [wrap-transaction]]
[time-tracker.web.middleware :refer [with-rest-middleware]]
[clojure.algo.generic.functor :refer ... | null | https://raw.githubusercontent.com/nilenso/time-tracker/054d0dc6d6b89a4ed234d8f0b0a260b6deeef9e3/src/clj/time_tracker/timers/routes.clj | clojure | (ns time-tracker.timers.routes
(:require [time-tracker.timers.handlers :as handlers]
[time-tracker.auth.core :refer [wrap-auth]]
[time-tracker.db :refer [wrap-transaction]]
[time-tracker.web.middleware :refer [with-rest-middleware]]
[clojure.algo.generic.functor :refer ... | |
cc9b7c2d8637c68a8bb3f7952ca678c258929bbf105995487363ff9a164b77b6 | igrishaev/dynamodb | sql.clj | (ns dynamodb.sql)
(deftype SQL [^String string]
Object
(toString [_]
string))
(defn sql [string]
(new SQL string))
(defn sql? [obj]
(instance? SQL obj))
| null | https://raw.githubusercontent.com/igrishaev/dynamodb/9d47aa9be08c056634a6af82a0246481d3ca51c1/src/dynamodb/sql.clj | clojure | (ns dynamodb.sql)
(deftype SQL [^String string]
Object
(toString [_]
string))
(defn sql [string]
(new SQL string))
(defn sql? [obj]
(instance? SQL obj))
| |
b22c2a5a2f087b8ddf8b33345a5930765c2c9ff35410838388ce0bb206af3b89 | privet-kitty/cl-competitive | fast-gcd.lisp | (defpackage :cp/test/fast-gcd
(:use :cl :fiveam :cp/fast-gcd)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/fast-gcd)
(in-suite base-suite)
(test fast-gcd
(finishes
(dotimes (x 30)
(dotimes (y 30)
(assert (= (gcd x y) (fast-gcd x y)))
(assert (= (gcd (- most-positive-f... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/fast-gcd.lisp | lisp | (defpackage :cp/test/fast-gcd
(:use :cl :fiveam :cp/fast-gcd)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/fast-gcd)
(in-suite base-suite)
(test fast-gcd
(finishes
(dotimes (x 30)
(dotimes (y 30)
(assert (= (gcd x y) (fast-gcd x y)))
(assert (= (gcd (- most-positive-f... | |
59096cd6decb3eb3e59ca05b7fa7374659931a6adbdd8868403af40ee7572232 | matsen/pplacer | placerun.ml |
* a placerun is a data structure representing a single pplacer run .
* a placerun is a data structure representing a single pplacer run.
*)
open Ppatteries
type 'a placerun =
{
ref_tree : 'a Gtree.gtree;
name : string;
pqueries : Pquery.pquery list;
transm : (int * float) IntMap.... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/placerun.ml | ocaml |
* a placerun is a data structure representing a single pplacer run .
* a placerun is a data structure representing a single pplacer run.
*)
open Ppatteries
type 'a placerun =
{
ref_tree : 'a Gtree.gtree;
name : string;
pqueries : Pquery.pquery list;
transm : (int * float) IntMap.... | |
6728dbed95232593a99819d1c22034e7b34bc8fcb4bdf5d25fcf8c258651a685 | TrustInSoft/tis-interpreter | mergemap.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/qed/src/mergemap.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
526fe4c6f3e3e0a9a132a22968e2e9eb3e742002ba341213262338fb8c7233f4 | clojurecup2014/parade-route | delays.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Internal/Plugins/clojure/test_clojure/delays.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns clojure.test-clojure.delays
(:use clojure.test))
(deftest calls-once
(let [a (atom 0)
d (delay (swap! a inc))]
(is (= 0 @a))
(is (= 1 @d))
(is (= 1 @d))
(is (= 1 @a))))
(deftest saves-exceptions
(let [f #(do (throw (Exception. "broken"))... |
545cc29a7a897bd04fb73c89a899940ab5d2c416b551a07cf4d7b7bbd0c2a48f | kupl/LearnML | patch.ml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let diff ((e : aexp), (x : string)) : aexp =
let rec df ((e : aexp), (x : string)) : aexp =
match e with
| Sum hd :: tl -> Sum [ df (hd, x); df (Sum tl, x) ]
| Sum _ -> Const 0
| Tim... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/diff/sub133/patch.ml | ocaml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let diff ((e : aexp), (x : string)) : aexp =
let rec df ((e : aexp), (x : string)) : aexp =
match e with
| Sum hd :: tl -> Sum [ df (hd, x); df (Sum tl, x) ]
| Sum _ -> Const 0
| Tim... | |
27d6468b24dcf0ca88770d6f5eaae725585791696db1014797906ca482e3ae3a | fluree/db | operations.cljc | (ns fluree.db.operations
(:require
[fluree.db.util.core :as util #?(:clj :refer :cljs :refer-macros) [try* catch*]]
[fluree.db.util.log :as log :include-macros true]
[clojure.core.async :as async]))
#?(:clj (set! *warn-on-reflection* true))
(defn- conn-closed?
"Returns true if connection has been clos... | null | https://raw.githubusercontent.com/fluree/db/27999d15dcd90053119b06c6eb19c24fff137a56/src/fluree/db/operations.cljc | clojure | (ns fluree.db.operations
(:require
[fluree.db.util.core :as util #?(:clj :refer :cljs :refer-macros) [try* catch*]]
[fluree.db.util.log :as log :include-macros true]
[clojure.core.async :as async]))
#?(:clj (set! *warn-on-reflection* true))
(defn- conn-closed?
"Returns true if connection has been clos... | |
9c938dfc76ba76f2c6a804df4df8098cfeb5a231c47d4280d3cb89d9e122bc79 | ptal/AbSolute | pc_interpretation.ml | Copyright 2020
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option ) any later version .
This program is distr... | null | https://raw.githubusercontent.com/ptal/AbSolute/469159d87e3a717499573c1e187e5cfa1b569829/src/transformers/propagator_completion/pc_interpretation.ml | ocaml | We check that the approximation is possible with the current variables and formula `f`.
See `interpret` documentation.
We list the variants explicitly because it must be considered if we add a new abstract type. | Copyright 2020
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option ) any later version .
This program is distr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.