_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 |
|---|---|---|---|---|---|---|---|---|
7c6338a866c690387ca53acf6ee3e269cfde6c391ce549f32d3e4b33da07ce27 | NorfairKing/smos | Gen.hs | # OPTIONS_GHC -fno - warn - orphans #
module Smos.OptParse.Gen where
import Smos.Data.Gen ()
import Smos.Keys.Gen ()
import Smos.OptParse.Types
import Smos.Report.OptParse.Gen ()
import Smos.Types.Gen ()
import TestImport
instance GenValid KeyConfig where
genValid = genValidStructurally
shrinkValid = shrinkValid... | null | https://raw.githubusercontent.com/NorfairKing/smos/f72b26c2e66ab4f3ec879a1bedc6c0e8eeb18a01/smos/test/Smos/OptParse/Gen.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Smos.OptParse.Gen where
import Smos.Data.Gen ()
import Smos.Keys.Gen ()
import Smos.OptParse.Types
import Smos.Report.OptParse.Gen ()
import Smos.Types.Gen ()
import TestImport
instance GenValid KeyConfig where
genValid = genValidStructurally
shrinkValid = shrinkValid... | |
b10c96f801e4b316f0124e63699cbad25c4b2b4b5f1ff20a1bdef6ae35047426 | msantos/pkt | pkt_lldp.erl | Copyright ( c ) 2009 - 2015 , < >
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions
%% are met:
%%
%% Redistributions of source code must retain the above copyright
%% notice, this list of condition... | null | https://raw.githubusercontent.com/msantos/pkt/8c826b25098b06db8c24805fb1da2d65c14abe06/src/pkt_lldp.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in bi... | Copyright ( c ) 2009 - 2015 , < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT ,
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING ,
BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ;
LOSS OF U... |
b01f28397044804368a49905659742938deea7cf501a7cc9454dbff21359e465 | jstolarek/dep-typed-wbl-heaps-hs | Bool.hs | -----------------------------------------------------------------------
Copyright : 2014 , , Politechnika Łódzka --
-- --
-- License: See LICENSE file in root of the repo --
Repo address : -typed-wbl-heaps-hs --
... | null | https://raw.githubusercontent.com/jstolarek/dep-typed-wbl-heaps-hs/0d6e354cbb71056a3eb9df9ebdc788182e137d1d/src/Basics/Bool.hs | haskell | ---------------------------------------------------------------------
--
License: See LICENSE file in root of the repo --
--
Definition of Bool datatype, which re... |
# LANGUAGE KindSignatures #
# LANGUAGE NoImplicitPrelude #
module Basics.Bool where
data Bool :: * where
False :: Bool
True :: Bool
|
ad318265b139c2687eb8f2a06564df6243cc823761627c9bdc1216bc33c3c0f3 | CarlosMChica/HaskellBook | FixerUpper.hs | # OPTIONS_GHC -fno - warn - type - defaults #
{-# OPTIONS -Wall #-}
module FixerUpper where
1 . const < $ > Just " Hello " < * > " World "
f :: Maybe [Char]
f = const <$> Just "Hello" <*> pure "World"
2 ( , , , ) Just 90 < * > Just 10 Just " Tierness " [ 1 , 2 , 3 ] .
g :: Maybe (Integer, Integer, [Char], [Inte... | null | https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter17/FixerUpper.hs | haskell | # OPTIONS -Wall # | # OPTIONS_GHC -fno - warn - type - defaults #
module FixerUpper where
1 . const < $ > Just " Hello " < * > " World "
f :: Maybe [Char]
f = const <$> Just "Hello" <*> pure "World"
2 ( , , , ) Just 90 < * > Just 10 Just " Tierness " [ 1 , 2 , 3 ] .
g :: Maybe (Integer, Integer, [Char], [Integer])
g = (,,,) <$> Ju... |
56b25d70b4d136f3d971d437de10ec0788fd17b6818bb946c0d0797f9102c2ed | arbace/mandane | test.clj | (do
(def &'list (&bits '1110000000000000))
(def &'string (&bits '1110000000000001))
(def &'symbol (&bits '1110000000000010))
(def &'closure (&bits '1110000000000011))
(def &'atom (&bits '1110000000000100))
(def &'let (&bits '1110000000001000))
(d... | null | https://raw.githubusercontent.com/arbace/mandane/254161d0f08ac8d9705bd04f1a03adf7dba468d7/test.clj | clojure | (do
(def &'list (&bits '1110000000000000))
(def &'string (&bits '1110000000000001))
(def &'symbol (&bits '1110000000000010))
(def &'closure (&bits '1110000000000011))
(def &'atom (&bits '1110000000000100))
(def &'let (&bits '1110000000001000))
(d... | |
225c0ae4c39679f534451dd5bc6c3e7b91a5188f8f2fb1628128ea25c716e508 | rd--/hsc3 | ampDb.help.hs | ambDb
sinOsc ar (ampDb (line kr 0 1 5 DoNothing) * 2 + 180) 0 * dbAmp (-45)
| null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/ampDb.help.hs | haskell | ambDb
sinOsc ar (ampDb (line kr 0 1 5 DoNothing) * 2 + 180) 0 * dbAmp (-45)
| |
0d7c334edf2066753616593f61af70b8f73d4bc85eaa58c5959d2457797780ca | rlepigre/ocaml-earley | misc.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rlepigre/ocaml-earley/66d7acb2b22edae0c2f7d64ef2a50fa70d1ed112/ocaml_ast/src/misc.ml | 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
exception Fatal_error
let fatal_errorf fmt =
Format.kfprintf
(fun _ -> raise Fatal_error)
For... |
9ecfd6587c02433f23754d278a856e6678702367ca4d2e8135e516d2dfa30d80 | lispunion/lander | lander.scm | #! /usr/bin/env lila
#;
(declare-file
(language r7rs)
(implementations gauche chibi))
(import (scheme base)
(scheme char)
(scheme file)
(scheme cxr)
(scheme read)
(scheme write))
(cond-expand
(chibi
(import (srfi 1)
(srfi 69)
(chibi filesystem)))
... | null | https://raw.githubusercontent.com/lispunion/lander/a0cb29197c18a333c178b6f8a20de97949b886b2/lander.scm | scheme | #! /usr/bin/env lila
(declare-file
(language r7rs)
(implementations gauche chibi))
(import (scheme base)
(scheme char)
(scheme file)
(scheme cxr)
(scheme read)
(scheme write))
(cond-expand
(chibi
(import (srfi 1)
(srfi 69)
(chibi filesystem)))
(... | |
925e98b4eee20ffa8036ef2d0c50b579b93bb6eb408eef305cb5a686a16803f7 | facebook/flow | ident.ml |
* 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/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/heap/ident.ml | 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... | |
0ce7f76501b71a1c5efb0c27d5681f0935ae23dab4d276cbcd79aa1dac033dcc | alavrik/erlson | erlson_shell_test.erl | Copyright ( c ) 2011 ,
%%
%% Permission is hereby granted, free of charge, to any person obtaining
%% a copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without restriction , including
%% without limitation the rights to use, copy, modify, merge, publi... | null | https://raw.githubusercontent.com/alavrik/erlson/05e7ef8ce236c6112c44f4072b1f7d4220d18c60/test/erlson_shell_test.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall be
EXPRESS ... | Copyright ( c ) 2011 ,
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
included in all copies or substantial portions of the Software .
... |
8d551049c244ca3a7575dcdfe33bebd303c7fb74ba653bc3dd83b95293eae9b2 | ProjectMAC/propagators | propagators.scm | ;;; ----------------------------------------------------------------------
Copyright 2009 Massachusetts Institute of Technology .
;;; ----------------------------------------------------------------------
This file is part of Propagator Network Prototype .
;;;
Propagator Network Prototype is free software ; you ... | null | https://raw.githubusercontent.com/ProjectMAC/propagators/add671f009e62441e77735a88980b6b21fad7a79/core/propagators.scm | scheme | ----------------------------------------------------------------------
----------------------------------------------------------------------
you can
redistribute it and/or modify it under the terms of the GNU
any later version.
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of M... | Copyright 2009 Massachusetts Institute of Technology .
This file is part of Propagator Network Prototype .
General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option )
Propagator Network Prototype is distributed in the hope that it
You should ... |
8b4124a60c93658bf530998c53cd2b0e756fe846bf13d693660dc1610136c037 | arttuka/reagent-material-ui | diversity_3_rounded.cljs | (ns reagent-mui.icons.diversity-3-rounded
"Imports @mui/icons-material/Diversity3Rounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def diversity-3-rounded... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/diversity_3_rounded.cljs | clojure | (ns reagent-mui.icons.diversity-3-rounded
"Imports @mui/icons-material/Diversity3Rounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def diversity-3-rounded... | |
997bf9223f90ab47ebc3c2bc6c9298baffc7a9cb774cb0b34bcfe282535314c2 | weyrick/roadsend-php | php-gtk.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/ext/gtk/php-gtk.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... |
c47377f202645b08de310ce7e8852b300091dd66d27ebc0f41ea9adf6b0a9a8e | jrm-code-project/LISP-Machine | eftp.lisp | ;-*- Mode:LISP; Package:CHAOS; Base:8 -*-
;This file implements EFTP on the Lisp machine,
with the cooperation of CHSNCP , using the Chaosnet foreign - protocol protocol .
10 . words of header and a checksum
(DEFCONST MAX-PUP-DATA-BYTES (- MAX-DATA-BYTES-PER-PKT PUP-NON-DATA-BYTES))
(DEFCONST PUP-PROTOCOL-ID 100001)
... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/io1/eftp.lisp | lisp | -*- Mode:LISP; Package:CHAOS; Base:8 -*-
This file implements EFTP on the Lisp machine,
Cannot use (:INCLUDE PKT) because PKT defstruct has some garbage at the end
Data follow, then checksum
The bytes are already in Lisp machine order, but the header needs to be fixed.
Return checksum and index in PUP of cksm
Put back ... |
with the cooperation of CHSNCP , using the Chaosnet foreign - protocol protocol .
10 . words of header and a checksum
(DEFCONST MAX-PUP-DATA-BYTES (- MAX-DATA-BYTES-PER-PKT PUP-NON-DATA-BYTES))
(DEFCONST PUP-PROTOCOL-ID 100001)
Structure of a PUP in a Chaosnet packet
(DEFSTRUCT (PUP :ARRAY (:CONSTRUCTOR NIL) (:ALTER... |
a35cc9b403f550cd94891afa310f338ca67c7a07f20dbdd5c6f799216eb779ee | ermine-language/ermine | Style.hs | --------------------------------------------------------------------
-- |
Copyright : ( c ) and 2013
License : BSD2
Maintainer : < >
-- Stability : experimental
-- Portability: non-portable
--
-- This module provides the style information for tokenizing of
-- various portions of the language.
---... | null | https://raw.githubusercontent.com/ermine-language/ermine/bd58949ab56311be9e0d2506a900f3d77652566b/src/Ermine/Parser/Style.hs | haskell | ------------------------------------------------------------------
|
Stability : experimental
Portability: non-portable
This module provides the style information for tokenizing of
various portions of the language.
------------------------------------------------------------------
| The base identifier language... | Copyright : ( c ) and 2013
License : BSD2
Maintainer : < >
module Ermine.Parser.Style
( termIdent
, typeIdent
, kindIdent
, termIdentifier
, typeIdentifier
, kindIdentifier
, op
, operator
, termCon
, typeCon
) where
import Control.Applicative
import Control.Lens hiding (op)... |
a3a40a92616b6c46078666d51c2335af13c06d66526e98768d1e1acce12ae1f6 | jonsterling/dreamtt | Basis.ml | module Error = Error
module Monad = Monad
module Reader = Reader
module Symbol = Symbol
module Pp = Pp
module PpExn = PpExn
module StringMap = Map.Make (String)
| null | https://raw.githubusercontent.com/jonsterling/dreamtt/aa30a57ca869e91a295e586773a892c6601b5ddb/basis/Basis.ml | ocaml | module Error = Error
module Monad = Monad
module Reader = Reader
module Symbol = Symbol
module Pp = Pp
module PpExn = PpExn
module StringMap = Map.Make (String)
| |
7c0933ae42403d6f5158349c2bf56eb02fd9ede4518743a7ad8f3df6d5cdc95a | klarna/erlavro | avro_binary_encoder.erl | %% coding: latin-1
%%%-----------------------------------------------------------------------------
%%%
Copyright ( c ) 2016 - 2018 Klarna Bank AB ( publ )
%%%
This file is provided to you under the Apache License ,
%%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License .... | null | https://raw.githubusercontent.com/klarna/erlavro/c55e55238ed879642c65d00c8105e498b4acc8db/src/avro_binary_encoder.erl | erlang | coding: latin-1
-----------------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific la... | Copyright ( c ) 2016 - 2018 Klarna Bank AB ( publ )
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
Encodes Avro values to bi... |
5f91cc17ef6c4bbb8e5d64c257e30dbd40957d4d55676ff00a2e671ded1482d1 | AvramRobert/omnia | view.clj | (ns omnia.schema.view
(:require [schema.core :as s]
[omnia.schema.text :as t]))
(def View
{:text t/Text
:field-of-view s/Int
:scroll-offset s/Int
:view-offset s/Int}) | null | https://raw.githubusercontent.com/AvramRobert/omnia/af515fb75d7492251436a3d844c0616c82d4eee0/src/omnia/schema/view.clj | clojure | (ns omnia.schema.view
(:require [schema.core :as s]
[omnia.schema.text :as t]))
(def View
{:text t/Text
:field-of-view s/Int
:scroll-offset s/Int
:view-offset s/Int}) | |
59b28898360051bae09dfa56bdef8ddf819debbd48ae999811c04f33c970abea | bradlucas/ads-txt-crawler | httpkit.clj | (ns ads-txt-crawler.httpkit
(:require [org.httpkit.client :as http])
(:import [java.net URI]
[javax.net.ssl SNIHostName SNIServerName SSLEngine SSLParameters]))
(defn sni-configure
[^SSLEngine ssl-engine ^URI uri]
(let [^SSLParameters ssl-params (.getSSLParameters ssl-engine)]
(.setServerNames ... | null | https://raw.githubusercontent.com/bradlucas/ads-txt-crawler/1deae9e8d976280b2aa01a41f7db06777b9e69b5/src/ads_txt_crawler/httpkit.clj | clojure | This produces the following error if called directly with
Error: javax.net.ssl.SSLException: Received fatal alert: handshake_failure for
(try
@(http/get url {:follow-redirects true
:insecure? true
})
(catch java.net.UnknownHostException e1
To fix the issue
Pa... | (ns ads-txt-crawler.httpkit
(:require [org.httpkit.client :as http])
(:import [java.net URI]
[javax.net.ssl SNIHostName SNIServerName SSLEngine SSLParameters]))
(defn sni-configure
[^SSLEngine ssl-engine ^URI uri]
(let [^SSLParameters ssl-params (.getSSLParameters ssl-engine)]
(.setServerNames ... |
e22abe0b55b592b20e16de76c3c151e6b599c71ac11c29c754ac610a7b4c857e | SantiMunin/harmony | LangUtilsSpec.hs | module LangUtilsSpec where
import qualified Data.Set as S
import Language.Abs
import LangUtils
import Test.Hspec
import Test.QuickCheck
import TestUtils ()
import qualified TypeCheck.ApiSpec as AS
spec :: Spec
spec =
describe "LangUtilsSpec" $ do
... | null | https://raw.githubusercontent.com/SantiMunin/harmony/900100bea96763bc9cd6e6c4eae3f031ae5ccd7e/test/LangUtilsSpec.hs | haskell | module LangUtilsSpec where
import qualified Data.Set as S
import Language.Abs
import LangUtils
import Test.Hspec
import Test.QuickCheck
import TestUtils ()
import qualified TypeCheck.ApiSpec as AS
spec :: Spec
spec =
describe "LangUtilsSpec" $ do
... | |
9160d9c4f81bd81e298441f0e02476d2ba9a49afe415130ec428db4cd4fd5c04 | sgimenez/laby | srv.mli |
Copyright ( C ) 2007 - 2010
You have permission to copy , modify , and redistribute under the
terms of the GPL-3.0 . For full license terms , see gpl-3.0.txt .
Copyright (C) 2007-2010 Stéphane Gimenez
You have permission to copy, modify, and redistribute under the
terms of the GPL-3.0. For f... | null | https://raw.githubusercontent.com/sgimenez/laby/47f9560eb827790d26900bb553719afb4b0554ea/src/dtools/srv.mli | ocaml | *
Service management module.
Allow to define procedures that must be executed at start up, and
procedures that are to be executed at exit to have a clean quit.
* Root start atom
* Root stop atom
*
Define a init atom associated with the given [(unit -> unit)]
procedure, which eventualy depends on o... |
Copyright ( C ) 2007 - 2010
You have permission to copy , modify , and redistribute under the
terms of the GPL-3.0 . For full license terms , see gpl-3.0.txt .
Copyright (C) 2007-2010 Stéphane Gimenez
You have permission to copy, modify, and redistribute under the
terms of the GPL-3.0. For f... |
b96f80eb506f83eb17b0ac11edfa6e9a40ba007c610b9b869209ffad76613681 | privet-kitty/cl-competitive | warshall-floyd.lisp | (defpackage :cp/test/warshall-floyd
(:use :cl :fiveam :cp/warshall-floyd)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/warshall-floyd)
(in-suite base-suite)
(defconstant +inf+ most-positive-fixnum)
(test warshall-floyd
;; from -warshall-algorithm-dp-16/
(let ((mat (make-array '(4 4) :initia... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/warshall-floyd.lisp | lisp | from -warshall-algorithm-dp-16/
empty-case | (defpackage :cp/test/warshall-floyd
(:use :cl :fiveam :cp/warshall-floyd)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/warshall-floyd)
(in-suite base-suite)
(defconstant +inf+ most-positive-fixnum)
(test warshall-floyd
(let ((mat (make-array '(4 4) :initial-contents `((0 5 ,+inf+ 10)
... |
7fb723d19aef1ff2c142ebbb5a6b77c5a04195d9912c3e5f5de89e5e8439affd | markbastian/clojure-north-2020 | x04_parting_thoughts.clj | (ns clojure-north-2020.ch04-application.x04-parting-thoughts)
;; # In Conclusion
;; In this workshop, we've learned some key concepts that should help you in
your Clojure journey from novice to full - stack , stateful system developer :
;;
1 . Always start with your data . Model the data , think about the data . D... | null | https://raw.githubusercontent.com/markbastian/clojure-north-2020/084a7af30c08a3cabefe1314744f50edd8043c4a/src/clojure_north_2020/ch04_application/x04_parting_thoughts.clj | clojure | # In Conclusion
In this workshop, we've learned some key concepts that should help you in
write any code until you understand the data.
a data DSL. As transformations become useful, elevate them to functions.
databases. These allow you to model domains at the attribute level rather
than the record le... | (ns clojure-north-2020.ch04-application.x04-parting-thoughts)
your Clojure journey from novice to full - stack , stateful system developer :
1 . Always start with your data . Model the data , think about the data . Do n't
2 . Manipulate your data using Clojure 's baked in functions . Clojure truly is
3 . Datas... |
20ba418789448367e227aeb9b3cc9caade010da2eae71ce37960e238907bba77 | drcode/good-guesser | example.clj | (ns good-guesser.example
(:require [good-guesser.square-grid :refer [square-grid]]
[good-guesser.good-guesser :refer [good-guesser]]
[clojure.pprint :refer [pprint]]))
(defn count-pixels [bmp]
(count (filter #{\*} (apply concat bmp))))
(defn concave-pixels [bmp]
(apply +
(map (f... | null | https://raw.githubusercontent.com/drcode/good-guesser/8d15c64cd6488b410319b2d4a47e6056b638b861/src/good_guesser/example.clj | clojure | (ns good-guesser.example
(:require [good-guesser.square-grid :refer [square-grid]]
[good-guesser.good-guesser :refer [good-guesser]]
[clojure.pprint :refer [pprint]]))
(defn count-pixels [bmp]
(count (filter #{\*} (apply concat bmp))))
(defn concave-pixels [bmp]
(apply +
(map (f... | |
0d0e31f49f894a7deab48a7ef8a3efba56162b846719b1f456fcdfe0b1ef5c91 | nallen05/djula | build-documentation.lisp |
(in-package :djula)
; util
(defun .documentation->alist (documentation)
"turns the stuff returned by GET-FILTER-DOCUMENTATION and GET-TAG-DOCUMENTATION into
an alist for the Djula Server Index Page template"
(labels ((plist->alist (plist)
(when plist
(destructuring-bind (k v . rest) plist
(cons... | null | https://raw.githubusercontent.com/nallen05/djula/331e2d5b0c9967b636e4df22e847ac98f16f6ba9/src/build-documentation.lisp | lisp | util
filters used in the view only index page template
doit |
(in-package :djula)
(defun .documentation->alist (documentation)
"turns the stuff returned by GET-FILTER-DOCUMENTATION and GET-TAG-DOCUMENTATION into
an alist for the Djula Server Index Page template"
(labels ((plist->alist (plist)
(when plist
(destructuring-bind (k v . rest) plist
(cons (cons ... |
aa7eadfd15e9d1300d3e2ce637464c0df3eb90c8e8c989fd715cf1f86f12be02 | lazamar/nix-package-versions | Spec.hs | module Main where
import Data.Time.Calendar (Day)
import Test.Hspec (hspec, Spec, describe, it, shouldBe)
import qualified DatabaseSpec
main :: IO ()
main = hspec $ do
DatabaseSpec.spec
| null | https://raw.githubusercontent.com/lazamar/nix-package-versions/3b2caa78b7e130619818e5afa8b549b23377ac30/test/Spec.hs | haskell | module Main where
import Data.Time.Calendar (Day)
import Test.Hspec (hspec, Spec, describe, it, shouldBe)
import qualified DatabaseSpec
main :: IO ()
main = hspec $ do
DatabaseSpec.spec
| |
05a2e6af8cdcc153d9dbd0646a743e935923d7bb54d160e35b5a936c53bf3842 | Javran/advent-of-code | Day15.hs | module Javran.AdventOfCode.Y2020.Day15 (
) where
import Control.Monad
import Control.Monad.ST
import qualified Data.Vector.Unboxed.Mutable as VUM
import Data.Word
import Javran.AdventOfCode.Prelude
data Day15 deriving (Generic)
solve :: [(Word32, Word32)] -> Int -> Word32
solve xs size = runST $ do
vec <- VUM.re... | null | https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2020/Day15.hs | haskell | module Javran.AdventOfCode.Y2020.Day15 (
) where
import Control.Monad
import Control.Monad.ST
import qualified Data.Vector.Unboxed.Mutable as VUM
import Data.Word
import Javran.AdventOfCode.Prelude
data Day15 deriving (Generic)
solve :: [(Word32, Word32)] -> Int -> Word32
solve xs size = runST $ do
vec <- VUM.re... | |
3c7f0787a3025a617ac8c14b337fb21e48225fe2742157ac3700489b6a6b8e45 | gootik/hakisql | hakisql.erl | -module(hakisql).
-include("types.hrl").
-include_lib("metronome/include/metronome.hrl").
-export([
create/2,
drop/1,
insert/2,
q/2
]).
%% @doc Create a new table.
-spec create(table_name(), table_column_definition()) -> ok.
create(TableName, ColumnDefinition) ->
hakisql_table:create(TableName,... | null | https://raw.githubusercontent.com/gootik/hakisql/4808a94383cf868df34afff47060bc4abb2cd986/src/hakisql.erl | erlang | @doc Create a new table.
@doc Drop a table
@doc Insert rows into a table.
@doc Run a query on a table and return the result. | -module(hakisql).
-include("types.hrl").
-include_lib("metronome/include/metronome.hrl").
-export([
create/2,
drop/1,
insert/2,
q/2
]).
-spec create(table_name(), table_column_definition()) -> ok.
create(TableName, ColumnDefinition) ->
hakisql_table:create(TableName, ColumnDefinition).
-spec d... |
3eacfa14f283bceb844bd8ac64805ce71886d858cb2a0b551f5f04e101dd7b73 | marcoheisig/adventofcode | day-10.lisp | (defpackage :adventofcode-2020-day-10
(:use :cl))
(in-package :adventofcode-2020-day-10)
| null | https://raw.githubusercontent.com/marcoheisig/adventofcode/e96a0da17cd79f424af984ed2648b49ffdacb893/2020/day-10/day-10.lisp | lisp | (defpackage :adventofcode-2020-day-10
(:use :cl))
(in-package :adventofcode-2020-day-10)
| |
110c0d858e36af57f280eee9f8ba19a12ef449fd6bf75ff8e106c1f23ff36d65 | jixiuf/helloerlang | emysql_tcp.erl | Copyright ( c ) 2009 - 2011
< > ,
< > ,
< > ,
%% Eonblast Corporation <>
%%
%% Permission is hereby granted, free of charge, to any person
%% obtaining a copy of this software and associated documentation
files ( the " Software"),to deal in the Software without restric-
%% tion, including wit... | null | https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/gls/deps/emysql/src/emysql_tcp.erl | erlang | Eonblast Corporation <>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
tion, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and ... | Copyright ( c ) 2009 - 2011
< > ,
< > ,
< > ,
files ( the " Software"),to deal in the Software without restric-
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR... |
9c9ddacc780bf9f99df5ea916955b872a7c31a350402761d6c9d009c83f01abd | racket/typed-racket | dummy.rkt | #lang typed/racket/base
(ann 42 String)
| null | https://raw.githubusercontent.com/racket/typed-racket/1c2da7b7fc3e4b8779cdc3bd670f2e08e460ed1b/typed-racket-test/external/fail/dummy.rkt | racket | #lang typed/racket/base
(ann 42 String)
| |
c2eeb55bf65b6c955d14557649466378aa547365a6405fe5d6972533f6c90397 | awakesecurity/spectacle | Fairness.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilyDependencies #
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Language.Spectacle.Fairness
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see LICENSE
--
-- Stability : s... | null | https://raw.githubusercontent.com/awakesecurity/spectacle/430680c28b26dabb50f466948180eb59ba72fc8e/src/Language/Spectacle/Fairness.hs | haskell | # OPTIONS_HADDOCK show-extensions #
|
Module : Language.Spectacle.Fairness
Stability : stable
TODO: docs
@since 1.0.0
* Fairness
** Reification
---------------------------------------------------------------------------------------------------------------------
| Enumerated fairness constraints.
... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilyDependencies #
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see LICENSE
Portability : non - portable ( GHC extensions )
module Language.Spectacle.Fairness
Fairness (Unfair, Weak... |
dd990f0b750da85dda42f87d7b74e2512ba7263d1753b6ebfda2045285f8e26d | camfort/fortran-src | FirstParameter.hs | |
A convenience class for retrieving the first field of any constructor in a
datatype .
The primary usage for this class is generic derivation :
data D a = D a ( ) String deriving Generic
instance FirstParameter ( D a ) a
Note that _ the deriver does not check you are requesting a valid / safe in... | null | https://raw.githubusercontent.com/camfort/fortran-src/e15ba963637c0f4f883a00c0052102c0a7503d11/src/Language/Fortran/Util/FirstParameter.hs | haskell | # OVERLAPPING #
# OVERLAPPABLE # | |
A convenience class for retrieving the first field of any constructor in a
datatype .
The primary usage for this class is generic derivation :
data D a = D a ( ) String deriving Generic
instance FirstParameter ( D a ) a
Note that _ the deriver does not check you are requesting a valid / safe in... |
c6f0d2231c198061b01b87a143459f0c09f59e16822d7cf11d508948b0cdf599 | ekmett/category-extras | Hask.hs | -------------------------------------------------------------------------------------------
-- |
-- Module : Control.Category.Hask
Copyright : 2008
-- License : BSD
--
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
-- Make it clearer when we are dealing with the category (->) tha... | null | https://raw.githubusercontent.com/ekmett/category-extras/f0f3ca38a3dfcb49d39aa2bb5b31b719f2a5b1ae/Control/Category/Hask.hs | haskell | -----------------------------------------------------------------------------------------
|
Module : Control.Category.Hask
License : BSD
Stability : experimental
Portability : portable
Make it clearer when we are dealing with the category (->) that we mean the category
------------------------------------------... | Copyright : 2008
Maintainer : < >
of haskell types via its ( - > )
module Control.Category.Hask (Hask) where
type Hask = (->)
|
635f64faeaa7ebbfe9e7d0e731c93a731bc7006be6c658bda5a1994a8a2c3b56 | DavidAlphaFox/RabbitMQ | rabbit_auth_backend.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/src/rabbit_auth_backend.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
A description p... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
8063d505f391f0022d6b7d8fe54375140855f1047e52cd95fd76518bdd237557 | Oblosys/proxima | Interface.hs | {-# OPTIONS -fglasgow-exts #-}
module UU.Parsing.Interface
( AnaParser, pWrap, pMap
, module UU.Parsing.MachineInterface
, module UU.Parsing.Interface
) where
import GHC.Prim
import UU.Parsing.Machine
import UU.Parsing.MachineInterface
import IOExts
import System.IO.Unsafe
import System.I... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/uuagc/src/UU/Parsing/Interface.hs | haskell | # OPTIONS -fglasgow-exts #
==================================================================================
===== PRIORITIES ======================================================================
=======================================================================================
=============================... | module UU.Parsing.Interface
( AnaParser, pWrap, pMap
, module UU.Parsing.MachineInterface
, module UU.Parsing.Interface
) where
import GHC.Prim
import UU.Parsing.Machine
import UU.Parsing.MachineInterface
import IOExts
import System.IO.Unsafe
import System.IO
infixl 3 <|>
infixl 4 <*>, <$>... |
ce97094bd17cbe395ab1e90b0bf57c59292c5fffd3d8b9a315e0a1246cf13fa4 | emaphis/HtDP2e-solutions | ex015.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 ex015) (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/02-Functions/ex015.rkt | racket | about the language level of this file in a form that our tools can easily process.
Based on ex 7 -- bool imply function
imply truth table
#true
#false
#true
#true | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex015) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
Ex . 15
Define = = > . The function consumes two Boolean value... |
4f5bc366b3bf619979c976be8ef7b21c66e386f44d16665e838edab7aa93619e | dbuenzli/pixeldrift | B0.ml | open B0_kit.V000
(* OCaml library names *)
FIXME this is needed for now because of
*)
let bigarray = B0_ocaml.libname "bigarray"
let unix = B0_ocaml.libname "unix"
let cmdliner = B0_ocaml.libname "cmdliner"
let pixeldrift = B0_ocaml.libname "pixeldrift"
(* Libraries *)
let mod_srcs m =
let mli = Fmt.... | null | https://raw.githubusercontent.com/dbuenzli/pixeldrift/c1fd5f80abbb24e8d6400d21bb895088cb7babc9/B0.ml | ocaml | OCaml library names
Libraries
Tool
Packs | open B0_kit.V000
FIXME this is needed for now because of
*)
let bigarray = B0_ocaml.libname "bigarray"
let unix = B0_ocaml.libname "unix"
let cmdliner = B0_ocaml.libname "cmdliner"
let pixeldrift = B0_ocaml.libname "pixeldrift"
let mod_srcs m =
let mli = Fmt.str "src/%s.mli" m and ml = Fmt.str "src/%... |
c1adf4373abf1811407b8910c444e03d41b98d1d2fce3ebee3e2b3b7c17c1d9f | GameAnalytics/har_redbug | har_redbug.erl | Copyright ( c ) 2018 , 2019 Game Analytics
%%
%% Permission is hereby granted, free of charge, to any person obtaining
%% a copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without restriction , including
%% without limitation the rights to use, copy, modify, me... | null | https://raw.githubusercontent.com/GameAnalytics/har_redbug/92200c9a10af7f2030c01a470b7b9a5a606c8c1c/src/har_redbug.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall be included
EXPRESS OR I... | Copyright ( c ) 2018 , 2019 Game Analytics
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
in all copies or substantial portions of the Softwar... |
112f4adf4a95103096f0e03931f8f7642f4fa3d5df43c01e846108b1331642a0 | monadfix/ormolu-live | Message.hs | # LANGUAGE GADTs , DeriveGeneric , StandaloneDeriving , ScopedTypeVariables ,
GeneralizedNewtypeDeriving , ExistentialQuantification , RecordWildCards #
GeneralizedNewtypeDeriving, ExistentialQuantification, RecordWildCards #-}
# OPTIONS_GHC -fno - warn - name - shadowing -fno - warn - orphans #
-- |
-- Remo... | null | https://raw.githubusercontent.com/monadfix/ormolu-live/d8ae72ef168b98a8d179d642f70352c88b3ac226/ghc-lib-parser-8.10.1.20200412/libraries/ghci/GHCi/Message.hs | haskell | |
Remote GHCi message types and serialization.
See note [Why do we import Prelude here?]
For Binary instances
-----------------------------------------------------------------------------
| Exit the iserv process
-----------------------------------------
These all invoke the corresponding functions in the RTS ... | # LANGUAGE GADTs , DeriveGeneric , StandaloneDeriving , ScopedTypeVariables ,
GeneralizedNewtypeDeriving , ExistentialQuantification , RecordWildCards #
GeneralizedNewtypeDeriving, ExistentialQuantification, RecordWildCards #-}
# OPTIONS_GHC -fno - warn - name - shadowing -fno - warn - orphans #
For detail... |
4b46ebc162d829da8b851c34127e034ddda0ea16ca674d6f41c1df79d05d562a | tommay/pokemon-go | Dump.hs | import qualified System.Environment
import qualified Epic
import qualified GameMaster
main = do
args <- System.Environment.getArgs
Epic.catch (
do
result <- GameMaster.load
gameMaster <- result
print gameMaster
)
$ putStrLn . ("oops: " ++)
| null | https://raw.githubusercontent.com/tommay/pokemon-go/6b0132f03a1d50ad5513b70fe715e57879dfa597/app/Dump.hs | haskell | import qualified System.Environment
import qualified Epic
import qualified GameMaster
main = do
args <- System.Environment.getArgs
Epic.catch (
do
result <- GameMaster.load
gameMaster <- result
print gameMaster
)
$ putStrLn . ("oops: " ++)
| |
1fd579aa3e5bc3a310e8530e1ae6720e13c3090b61f1b27bb1ed6f22ee2b4fca | elaforge/karya | Args.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
{-# LANGUAGE TypeSynonymInstances #-}
| Extract things from the PassedArgs data structure .
module Derive.Args where
import qualified Data.Map as Map
import qualified Util.Log as Log
i... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Derive/Args.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
# LANGUAGE TypeSynonymInstances #
* prev and next
** from 'Derive.ctx_prev_val'
| Polymorphic version of 'prev_control' or 'prev_pitch'.
| Get the previous val. See NOTE [prev-val].
** from 'Derive.state_p... | Copyright 2013
| Extract things from the PassedArgs data structure .
module Derive.Args where
import qualified Data.Map as Map
import qualified Util.Log as Log
import qualified Util.Seq as Seq
import qualified Derive.Derive as Derive
import Derive.Derive (Context, PassedArgs)
import qualified Derive.D... |
12445595173cc266bf64bf6b4e694400d640aafb11d45708de6fee2e0caef627 | commercialhaskell/stack | Lib.hs | # LANGUAGE CPP #
module Lib
( someFunc
) where
someFunc :: IO ()
someFunc = putStrLn "someFunc"
#if defined(FOO) && defined(BAR)
#error FOO and BAR is defined
#endif
| null | https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/haddock-options/files/src/Lib.hs | haskell | # LANGUAGE CPP #
module Lib
( someFunc
) where
someFunc :: IO ()
someFunc = putStrLn "someFunc"
#if defined(FOO) && defined(BAR)
#error FOO and BAR is defined
#endif
| |
9d199a5b3fd964f28adb602ba3a5b091f78e10926e81299e8a4c7f348889cf1c | funimagej/fun.imagej | BBBC003_detector.clj | (ns fun.imagej.test.examples.BBBC003_detector
(:require [fun.imagej.img :as img]
[fun.imagej.core :as ij]
[fun.imagej.ops :as ops]
[fun.imagej.img.shape :as shape]
[fun.imagej.conversion :as convert]
[fun.imagej.segmentation.imp :as ij1seg]
[fun.... | null | https://raw.githubusercontent.com/funimagej/fun.imagej/dcbe14581ba9394d8ecc6e254e02fac8130a942d/test/fun/imagej/test/examples/BBBC003_detector.clj | clojure | Fill in our detected ROI
Create an image for storing our ROI
Take the biggest ROI
Sort the ROIs by area
Convert our image into ROIs
... | (ns fun.imagej.test.examples.BBBC003_detector
(:require [fun.imagej.img :as img]
[fun.imagej.core :as ij]
[fun.imagej.ops :as ops]
[fun.imagej.img.shape :as shape]
[fun.imagej.conversion :as convert]
[fun.imagej.segmentation.imp :as ij1seg]
[fun.... |
a4a56a4071d138220feb72d39bb40bb9bdff93dcb3c30526eabad0262811b183 | ocsigen/ojwidgets | ojw_completion_f.ml |
module Utils = struct
module M = Regexp
(* word is a completion of [pattern]. ex: is_completed_by ~pattern:"e" "eddy" = yes *)
both arg are utf16 JS string
let is_completed_by
?(accents = false)
?(sensitive = true)
?(from_start = false)
~pattern w =
let word_match w =
let pat... | null | https://raw.githubusercontent.com/ocsigen/ojwidgets/4be2233980bdd1cae187c749bd27ddbfff389880/src/internals/ojw_completion_f.ml | ocaml | word is a completion of [pattern]. ex: is_completed_by ~pattern:"e" "eddy" = yes
Returns [true] if there is an active element and
if it has a data-value-to-display attribute
Set the input value to the data-value-to-display of the selected element.
Reset the context of the completion widget.
- _need... |
module Utils = struct
module M = Regexp
both arg are utf16 JS string
let is_completed_by
?(accents = false)
?(sensitive = true)
?(from_start = false)
~pattern w =
let word_match w =
let pattern, w =
if accents then begin
Js.to_string (Ojw_fun.removeDiacritics ... |
f8bb634bab0ca7b1aa88eac32a52b6e76a3a6e7af0feef30151915d64a83898f | smanek/trivial-lisp-webapp | scl.lisp | $ I d : scl.lisp 479 2008 - 11 - 26 16:18:06Z ctian $
;;;; $URL: svn-lisp.net/project/usocket/svn/usocket/trunk/backend/scl.lisp $
;;;; See LICENSE for licensing information.
(in-package :usocket)
(defparameter +scl-error-map+
(append +unix-errno-condition-map+
+unix-errno-error-map+))
(defun scl-map-... | null | https://raw.githubusercontent.com/smanek/trivial-lisp-webapp/36816c17ea378822e02a123c1be960fd9ce3e29d/aux/usocket-svn/backend/scl.lisp | lisp | $URL: svn-lisp.net/project/usocket/svn/usocket/trunk/backend/scl.lisp $
See LICENSE for licensing information.
Sockets and their associated streams are modelled as
different objects. Be sure to close the socket stream
when closing stream-sockets; it makes sure buffers
are flushed and the socket is closed correctl... | $ I d : scl.lisp 479 2008 - 11 - 26 16:18:06Z ctian $
(in-package :usocket)
(defparameter +scl-error-map+
(append +unix-errno-condition-map+
+unix-errno-error-map+))
(defun scl-map-socket-error (err &key condition socket)
(let ((usock-err (cdr (assoc err +scl-error-map+ :test #'member))))
(cond ... |
e60570c0ea554c3d89e98814d948e36647f50091dd5a192ccfe82783e4c6e450 | bitblaze-fuzzball/fuzzball | symbolic_domain.ml |
Copyright ( C ) BitBlaze , 2009 - 2010 . All rights reserved .
Copyright (C) BitBlaze, 2009-2010. All rights reserved.
*)
module V = Vine
open Exec_utils
open Exec_exceptions
open Frag_simplify
open Formula_manager
module SymbolicDomain : Exec_domain.DOMAIN = struct
type t = V.exp
let from_concrete_1 v ... | null | https://raw.githubusercontent.com/bitblaze-fuzzball/fuzzball/b9a617b45e68fa732f1357fedc08a2a10f87a62c/execution/symbolic_domain.ml | ocaml |
Copyright ( C ) BitBlaze , 2009 - 2010 . All rights reserved .
Copyright (C) BitBlaze, 2009-2010. All rights reserved.
*)
module V = Vine
open Exec_utils
open Exec_exceptions
open Frag_simplify
open Formula_manager
module SymbolicDomain : Exec_domain.DOMAIN = struct
type t = V.exp
let from_concrete_1 v ... | |
797d8237012fd13b9d529eb2f196468caafdcbca76b4e54ff3653382455122ab | achin/lein-parent | project.clj | (defproject child-with-parent-path "0.0.1"
:description "Child project that references parent project via coords"
:parent-project {:coords [lein-parent/parent-with-foo-property "0.0.1"]
:inherit [:foo]}) | null | https://raw.githubusercontent.com/achin/lein-parent/37630e184a37f9adc2a431f4016624b3e815f848/dev-resources/t_parent/samples/children/with_parent_coords/project.clj | clojure | (defproject child-with-parent-path "0.0.1"
:description "Child project that references parent project via coords"
:parent-project {:coords [lein-parent/parent-with-foo-property "0.0.1"]
:inherit [:foo]}) | |
10aa38d8726986a65af82f8e7a7923e554f109792ca49b8f4e3c1ed9ca2bdb86 | bhauman/advent-of-clojure | day14.clj | (ns advent-2017.day14
(:require
[advent-2017.day10 :refer [sparse-hash dense-hash]]))
(def test-input "flqrgnkx")
(def puzzle-input "oundnydw")
(defn binary-dense-hash [sparseh]
(->> sparseh
(partition 16)
(map #(reduce bit-xor %))
(map #(Integer/toBinaryString %))
(map #(format "%... | null | https://raw.githubusercontent.com/bhauman/advent-of-clojure/856763baf45bf7bf452ffd304dc1b89f9bc879a6/src/advent-2017/day14.clj | clojure | Elapsed time: 3772.082083 msecs | (ns advent-2017.day14
(:require
[advent-2017.day10 :refer [sparse-hash dense-hash]]))
(def test-input "flqrgnkx")
(def puzzle-input "oundnydw")
(defn binary-dense-hash [sparseh]
(->> sparseh
(partition 16)
(map #(reduce bit-xor %))
(map #(Integer/toBinaryString %))
(map #(format "%... |
37dadfcb68119a7961dda8ef644510de96527957c73a664f51ad174ab3e4c8ea | MassD/mongo | mongoRequest.ml | open MongoUtils;;
open MongoOperation;;
open MongoHeader;;
open Bson;;
let combine_header_body request_id op body_buf =
let body_len = Buffer.length body_buf in
let whole_buf = Buffer.create (4*4+body_len) in
let header_str = encode_header (create_request_header body_len request_id op) in
Buffer.add_string wh... | null | https://raw.githubusercontent.com/MassD/mongo/054779d843a227d486b55dff6ebc915b44906b0d/src/mongoRequest.ml | ocaml | Printf.printf "request_id = %ld\n" request_id; | open MongoUtils;;
open MongoOperation;;
open MongoHeader;;
open Bson;;
let combine_header_body request_id op body_buf =
let body_len = Buffer.length body_buf in
let whole_buf = Buffer.create (4*4+body_len) in
let header_str = encode_header (create_request_header body_len request_id op) in
Buffer.add_string wh... |
3d2dda1570f76a69c1405d6bef140a967d16af32a1d098fd52ba9984e99078ba | gsakkas/rite | 20060322-13:34:44-8717549412aa814d6b0771c1f94c17fb.seminal.ml |
exception Unimplemented
exception AlreadyDone
(*** part a ***)
type move = Home | Forward of float
| Turn of float | For of int * (move)list
(*** part b -- return move***)
let makePoly sides len =
let turnAmount = (2*3.1416)/sides in
let rec makePolyHelp sidesLeft =
let update = Turn(tur... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060322-13%3A34%3A44-8717549412aa814d6b0771c1f94c17fb.seminal.ml | ocaml | ** part a **
** part b -- return move**
** part c **
** part d **
** part e **
** part f **
** possibly helpful testing code ** |
exception Unimplemented
exception AlreadyDone
type move = Home | Forward of float
| Turn of float | For of int * (move)list
let makePoly sides len =
let turnAmount = (2*3.1416)/sides in
let rec makePolyHelp sidesLeft =
let update = Turn(turnAmount)::forward(len) in
update::makePolyHel... |
8035674b9b359dd264fd2983a4cbd9f6dbf08458f62b19d79a1cc6c9231cbc3a | kowainik/summoner | Golden.hs | # OPTIONS_GHC -fno - warn - orphans #
| Golden tests for @summoner@.
In the @test / golden@ folder we now have two projects that are created by
@summoner@.
* @fullProject@ – the project that has all options enabled .
* @smallProject@ – the project that has limited options enabled .
The purpose of this t... | null | https://raw.githubusercontent.com/kowainik/summoner/19fb05033c1e6290caff3752891b6ad2630819ab/summoner-cli/test/Test/Golden.hs | haskell | Orphan instances | # OPTIONS_GHC -fno - warn - orphans #
| Golden tests for @summoner@.
In the @test / golden@ folder we now have two projects that are created by
@summoner@.
* @fullProject@ – the project that has all options enabled .
* @smallProject@ – the project that has limited options enabled .
The purpose of this t... |
fffd215f702c20c6184539bac90a3b9c57da863621cd40fbb9dc74c946453f2b | Liqwid-Labs/liqwid-libs | Orphans.hs | # OPTIONS_GHC -Wno - orphans #
|
Module : Codec . Serialise . Orphans
Maintainer :
Description : Orphan instances for and types .
Orphan instances for and types .
Module : Codec.Serialise.Orphans
Maintainer :
Description: Orphan instances for Serialising and Hashing Cardano types.
Orphan... | null | https://raw.githubusercontent.com/Liqwid-Labs/liqwid-libs/8165d3a33daa5deb377db854b9c7b62aab9c2897/liqwid-script-export/src/Codec/Serialise/Orphans.hs | haskell | # OPTIONS_GHC -Wno - orphans #
|
Module : Codec . Serialise . Orphans
Maintainer :
Description : Orphan instances for and types .
Orphan instances for and types .
Module : Codec.Serialise.Orphans
Maintainer :
Description: Orphan instances for Serialising and Hashing Cardano types.
Orphan... | |
78e056c3fb76f99a5d73ced813699a12a635bc6468f7f1aa91b6322c3ae369fc | ghc/packages-Cabal | Explore.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Distribution.Solver.Modular.Explore (backjumpAndExplore) where
import Distribution.Solver.Compat.Prelude
import Prelude ()
import qualified Distribution.Solver.Types.Progress as P
import qualified Data.List as L (foldl')
im... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-install/Distribution/Solver/Modular/Explore.hs | haskell | # LANGUAGE BangPatterns #
| This function takes the variable we're currently considering, a
last conflict set and a list of children's logs. Each log yields
either a solution or a conflict set. The result is a combined log for
the parent node that has explored a prefix of the children.
We can stop traversing the ... | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Distribution.Solver.Modular.Explore (backjumpAndExplore) where
import Distribution.Solver.Compat.Prelude
import Prelude ()
import qualified Distribution.Solver.Types.Progress as P
import qualified Data.List as L (foldl')
import qualified Data.Map.Strict... |
be49cc391d9ca1e56f4be71483e20f56a73e23d70b5c8012e3621414764add0e | FundingCircle/jackdaw | data_test.clj | (ns jackdaw.data-test
(:require [clojure.test :refer [are deftest]]
[jackdaw.data :as data])
(:import org.apache.kafka.clients.producer.ProducerRecord
[org.apache.kafka.common.header
Headers Header]))
(set! *warn-on-reflection* false)
(deftest producer-record-arity-2
(are [top... | null | https://raw.githubusercontent.com/FundingCircle/jackdaw/e0c66d386277282219e070cfbd0fe2ffa3c9dca5/test/jackdaw/data_test.clj | clojure | (ns jackdaw.data-test
(:require [clojure.test :refer [are deftest]]
[jackdaw.data :as data])
(:import org.apache.kafka.clients.producer.ProducerRecord
[org.apache.kafka.common.header
Headers Header]))
(set! *warn-on-reflection* false)
(deftest producer-record-arity-2
(are [top... | |
7bee90cea17ccc881f9414ed9bd76612a376d4a375528686e4f209fad2a12c32 | ghc/testsuite | fact.hs | module Test where
fact :: Int -> Int
fact n = if n==0 then 2 else (fact n) * n
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/stranal/should_compile/fact.hs | haskell | module Test where
fact :: Int -> Int
fact n = if n==0 then 2 else (fact n) * n
| |
558ab87df9fa93c3de778f1d2d70a53e45b7217f52c8cee2411b70cb7f5e6a6a | exercism/babashka | go_counting_test.clj | (ns go-counting-test
(:require [clojure.test :refer [deftest is]]
[go-counting :as g]))
(def example
[" B "
" B B "
"B W B"
" W W "
" W "])
(deftest territory
(is (= (g/territory example [0 1])
{:stones #{[0 0] [0 1] [1 0]} :owner :black}))
(is (= (g/territory example [2 3... | null | https://raw.githubusercontent.com/exercism/babashka/7375f1938ff95b242320313eaeedb8eca31a1b5b/exercises/practice/go-counting/test/go_counting_test.clj | clojure | (ns go-counting-test
(:require [clojure.test :refer [deftest is]]
[go-counting :as g]))
(def example
[" B "
" B B "
"B W B"
" W W "
" W "])
(deftest territory
(is (= (g/territory example [0 1])
{:stones #{[0 0] [0 1] [1 0]} :owner :black}))
(is (= (g/territory example [2 3... | |
392c5a3d49c8d908ed5993f5b9c8d237630b07b1e51f85e05f7a557adde0db5d | c4-project/c4f | my_quickcheck.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/utils/src/my_quickcheck.mli | ocaml | * Signature of modules that, in addition, have comparison, and therefore
can be checked for unique sampling.
* Convenience module for small non-negative integer generation. | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
eb433df517923283f824e8762bedbeb67115a5bf403ce11dc466d1aec8a91141 | yzhs/ocamlllvm | scheduling.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/asmcomp/i386/scheduling.ml | ocaml | *********************************************************************
Objective Caml
... | , 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 : scheduling.ml 2779 2000 - 02 ... |
add62a102647f96d6d75316fae10bf0d34b45dbf15cc806be6cf54ead88ec296 | simonmar/parconc-examples | ping-tc.hs | # LANGUAGE TemplateHaskell , DeriveDataTypeable , DeriveGeneric #
# OPTIONS_GHC -Wall #
import Control.Distributed.Process hiding (Message)
import Control.Distributed.Process.Closure
import Control.Monad
import Text.Printf
import GHC.Generics (Generic)
import Data.Binary
import Data.Typeable
import DistribUtils
-- <... | null | https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/distrib-ping/ping-tc.hs | haskell | <<Message
>>
<<pingServer
>>
<<remotable
>>
<<master
<3>
>>
<<main
>> | # LANGUAGE TemplateHaskell , DeriveDataTypeable , DeriveGeneric #
# OPTIONS_GHC -Wall #
import Control.Distributed.Process hiding (Message)
import Control.Distributed.Process.Closure
import Control.Monad
import Text.Printf
import GHC.Generics (Generic)
import Data.Binary
import Data.Typeable
import DistribUtils
data... |
2aabc2b882e53974db56225f3dfc069ac1a7e525ba3f221bba28f76c34b8631d | binsec/haunted | x86decoder.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/disasm/x86/x86decoder.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
26d92d6b337b85fd86b3103298d9b45815ac3d727962ff0fc05911b5ae9055f0 | fgalassi/cs61a-sp11 | 2.54.scm | (define (equal? first second)
(cond ((and (list? first) (list? second)) (or
(and (null? first) (null? second))
(and (equal? (car first) (car second)) (equal? (cdr first) (cdr second)))))
((and (symbol? first) (symbol? second)) (eq? first second))
(else... | null | https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/2.54.scm | scheme | (define (equal? first second)
(cond ((and (list? first) (list? second)) (or
(and (null? first) (null? second))
(and (equal? (car first) (car second)) (equal? (cdr first) (cdr second)))))
((and (symbol? first) (symbol? second)) (eq? first second))
(else... | |
6c29fd2aeb8652b1c76c833df80ef0f4843048938af9d506a48ec113d9915255 | jobjo/popper | tag.mli | type t =
| Size
| Sign
| Function
| Char
| Int
| Float
| Bool
| Value
| Operator
| List
| Choice
| Name of string
| Sub_list
val is_operator : t -> bool
val is_value : t -> bool
val to_string : t -> string
| null | https://raw.githubusercontent.com/jobjo/popper/387a94c66c0e74079d0b6005212b338cf10eb71c/src/lib/tag.mli | ocaml | type t =
| Size
| Sign
| Function
| Char
| Int
| Float
| Bool
| Value
| Operator
| List
| Choice
| Name of string
| Sub_list
val is_operator : t -> bool
val is_value : t -> bool
val to_string : t -> string
| |
4818f801ed77c2065dd3cde95e78225042b10ed739cca196e2a3cbcffa3db7c2 | grin-compiler/ghc-wpc-sample-programs | Telescope.hs |
module Agda.TypeChecking.Telescope where
import Prelude hiding (null)
import Control.Monad
import Data.Foldable (forM_, find)
import Data.IntSet (IntSet)
import qualified Data.IntSet as IntSet
import qualified Data.List as List
import Data.Maybe
import Data.Monoid
import Agda.Syntax.Common
import Agda.Syntax.Inter... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/TypeChecking/Telescope.hs | haskell | | Flatten telescope: (Γ : Tel) -> [Type Γ]
# SPECIALIZE flattenTel :: Telescope -> [Dom Type] #
Permutation (Γ -> Γ~)
the telescope should be 'normalise'd.
a tiny bit unsafe
| Unflatten: turns a flattened telescope into a proper telescope. Must be
properly ordered.
| Rename the variables in the telescope ... |
module Agda.TypeChecking.Telescope where
import Prelude hiding (null)
import Control.Monad
import Data.Foldable (forM_, find)
import Data.IntSet (IntSet)
import qualified Data.IntSet as IntSet
import qualified Data.List as List
import Data.Maybe
import Data.Monoid
import Agda.Syntax.Common
import Agda.Syntax.Inter... |
43cd14d60fb89c370f4be4db48bfcc905ad421cdc079750fb03f5d3f770fbcb1 | odis-labs/helix | Show.ml | module Event = Stdweb.Dom.Event
open Helix
let test_simple () =
let open Html in
ul []
[
li [] [ View.show Html.text (Signal.make "text") ];
li [] [ View.show Html.int (Signal.make 42) ];
li [] [ View.show (fun () -> Html.empty) (Signal.make ()) ];
li []
[
View.show
... | null | https://raw.githubusercontent.com/odis-labs/helix/7019765fdd6336f93d9243cf8310b8e805afabfb/tests/Show.ml | ocaml | module Event = Stdweb.Dom.Event
open Helix
let test_simple () =
let open Html in
ul []
[
li [] [ View.show Html.text (Signal.make "text") ];
li [] [ View.show Html.int (Signal.make 42) ];
li [] [ View.show (fun () -> Html.empty) (Signal.make ()) ];
li []
[
View.show
... | |
c1305aa93acf3f750ec0e47925debf59d74c464e9fe1f1d9f644f34b742b82a7 | nh2/network-house | Packet.hs | module Net.Packet (module Data.Array.Unboxed,Word8,
InPacket,len,emptyInPack,toInPack,takeInPack,dropInPack,
byteAt,wordAt,toChunk,
OutPacket,outLen,chunks,Chunk,
emptyOutPack,addChunk,appendOutPack,
splitOutPack,outBytes,loopback,loopbackout
) where
import Net.Bits
import Data.Array.Unboxe... | null | https://raw.githubusercontent.com/nh2/network-house/f31b6af230069f21928aae2b7242eb2c53e4d678/Net/Packet.hs | haskell | | The buffers used to represent packet,
when they are received over the network.
in bytes
^Invariant: all (inRange (bounds buffer)) [from..from+len-1]
| Get a byte at a certain offset.
| Get a word from a certain offset (big endian).
| The buffers for packets, that are to be sent over the network.
Each array co... | module Net.Packet (module Data.Array.Unboxed,Word8,
InPacket,len,emptyInPack,toInPack,takeInPack,dropInPack,
byteAt,wordAt,toChunk,
OutPacket,outLen,chunks,Chunk,
emptyOutPack,addChunk,appendOutPack,
splitOutPack,outBytes,loopback,loopbackout
) where
import Net.Bits
import Data.Array.Unboxe... |
d3df961357849fb6a99a08b42257eba072c66d5a2f929bd7172950a713b1d3d5 | lsrcz/mini-prover | Termination.hs | # LANGUAGE LambdaCase #
module MiniProver.Core.Termination (
isTerminating
, computeDecParam
, computeDecParamCmd
) where
import MiniProver.Core.Syntax
import Data.Either (partitionEithers)
-- Not terminating => return Nothing
-- Terminating => the number of arguments decreasing on
i... | null | https://raw.githubusercontent.com/lsrcz/mini-prover/0aa4cdf3b495ddf6707f27dcbee810d519b43177/src/MiniProver/Core/Termination.hs | haskell | Not terminating => return Nothing
Terminating => the number of arguments decreasing on
nameless function -> nameless origin -> k-th argument -> term -> nameless derivatives | # LANGUAGE LambdaCase #
module MiniProver.Core.Termination (
isTerminating
, computeDecParam
, computeDecParamCmd
) where
import MiniProver.Core.Syntax
import Data.Either (partitionEithers)
isTerminating :: Term -> Maybe Int
isTerminating (TmFix _ (TmLambda nm ty tm)) =
let (d, term)... |
744b1b32f8b0607a63610c50d3784c29901281bff16185322000d4755c83d69a | ZHaskell/z-data | ValueSpec.hs | # LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
module Z.Data.JSON.ValueSpec where
import qualified Data.List as L
import Data.Word
import Data.Int
import GHC.Float
import qualified Z.Data.Builder as B
import Test.QuickCheck
import ... | null | https://raw.githubusercontent.com/ZHaskell/z-data/b547ac196db274e754af9fdda736ff6beb4c98fa/test/Z/Data/JSON/ValueSpec.hs | haskell | large size will generate too huge JSON document | # LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
module Z.Data.JSON.ValueSpec where
import qualified Data.List as L
import Data.Word
import Data.Int
import GHC.Float
import qualified Z.Data.Builder as B
import Test.QuickCheck
import ... |
bf2c1f4ee73a33f70a2def2310b53219b6ec841d0790a69371e2c17da80c309f | c4-project/c4f | function_rewriter.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/delitmus/src/function_rewriter.mli | ocaml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | |
56cc69aefefb787bdf2dc0e9f59286bde0c5ec589a4b736b34db33855bdf5137 | nikita-volkov/rebase | Bits.hs | module Rebase.Data.Bits
(
module Data.Bits
)
where
import Data.Bits
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Data/Bits.hs | haskell | module Rebase.Data.Bits
(
module Data.Bits
)
where
import Data.Bits
| |
64d7448decabacf45178266abb3d6fc6cec462e117d67e05f0f7b200f73b3c29 | dalaing/little-languages | Eval.hs | module Test.Term.Eval where
import Test.Tasty
import Test.Tasty.QuickCheck
import Data.Maybe (mapMaybe)
import Term.Gen
import Term
import Term.Eval.Value
import Term.Eval.SmallStep
import Term.Eval.BigStep
evalTests :: TestTree
evalTests =
testGroup "eval" [
testProperty "smallUnique" propSmallUnique
,... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/unityped/lc/tests/Test/Term/Eval.hs | haskell | module Test.Term.Eval where
import Test.Tasty
import Test.Tasty.QuickCheck
import Data.Maybe (mapMaybe)
import Term.Gen
import Term
import Term.Eval.Value
import Term.Eval.SmallStep
import Term.Eval.BigStep
evalTests :: TestTree
evalTests =
testGroup "eval" [
testProperty "smallUnique" propSmallUnique
,... | |
9322d3f2ea405611c014b7a12390b0ad6c2cec1a150b0ee30c52e1759b147896 | ytomino/headmaster | hmcpp.ml | open C_filename;;
open C_lexical;;
open C_lexical_output;;
open C_preprocessor;;
open C_scanner;;
open C_version;;
open Environment;;
open Environment_gcc;;
open Known_errors;;
open Position;;
open Version;;
type options = {
source_filename: string;
tab_width: int;
gcc_command: string;
iquote_dirs: string list;
i... | null | https://raw.githubusercontent.com/ytomino/headmaster/11571992e480aa9fbc5821fe1be1b62edf5f924f/examples/hmcpp/hmcpp.ml | ocaml | open C_filename;;
open C_lexical;;
open C_lexical_output;;
open C_preprocessor;;
open C_scanner;;
open C_version;;
open Environment;;
open Environment_gcc;;
open Known_errors;;
open Position;;
open Version;;
type options = {
source_filename: string;
tab_width: int;
gcc_command: string;
iquote_dirs: string list;
i... | |
418856c0f56fd6593a7b57cdafc51c7a92f4ad65b4482276ee510bc395fbf9d0 | tezos-commons/baseDAO | EmptyProposal.hs | SPDX - FileCopyrightText : 2021 Tezos Commons
SPDX - License - Identifier : LicenseRef - MIT - TC
module Test.Ligo.RegistryDAO.Tests.EmptyProposal
( emptyProposalTest
) where
import Prelude
import Test.Tasty (TestTree)
import Morley.Util.Named
import Test.Cleveland
import Ligo.BaseDAO.Types
import Test.Lig... | null | https://raw.githubusercontent.com/tezos-commons/baseDAO/c8cc03362b64e8f27432ec70cdb4c0df82abff35/haskell/test/Test/Ligo/RegistryDAO/Tests/EmptyProposal.hs | haskell | Advance one voting period to a proposing stage. | SPDX - FileCopyrightText : 2021 Tezos Commons
SPDX - License - Identifier : LicenseRef - MIT - TC
module Test.Ligo.RegistryDAO.Tests.EmptyProposal
( emptyProposalTest
) where
import Prelude
import Test.Tasty (TestTree)
import Morley.Util.Named
import Test.Cleveland
import Ligo.BaseDAO.Types
import Test.Lig... |
280fb058c19f355af67b01d3bae20c602263687ae920f8f101fcc1266bcefdd4 | Frama-C/Frama-C-snapshot | deps_B.ml | module StateABis =
State_builder.Option_ref
(Datatype.Int)
(struct
let name = "Project.Test.StateABis"
let dependencies = []
end)
module StateB =
State_builder.Option_ref
(Datatype.Bool)
(struct
let name = "Project.Test.StateB"
let dependencies = [ StateABis.self ]
... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/saveload/deps_B.ml | ocaml | module StateABis =
State_builder.Option_ref
(Datatype.Int)
(struct
let name = "Project.Test.StateABis"
let dependencies = []
end)
module StateB =
State_builder.Option_ref
(Datatype.Bool)
(struct
let name = "Project.Test.StateB"
let dependencies = [ StateABis.self ]
... | |
c9a84be2c5ac32a9f1d313e428bbe869030f173c4be8d7cdbf9c3e7346dc00b8 | coq-community/coqffi | unamed.ml | type (_, 'b, 'a) t = int
let foo _ _ _ = true
| null | https://raw.githubusercontent.com/coq-community/coqffi/9307403abe0919665cd38dcc8f71582e950aa7c1/examples/src/unamed.ml | ocaml | type (_, 'b, 'a) t = int
let foo _ _ _ = true
| |
bc1ca46f1edf1034bb97492107c8d3cfce17089db06df01cebb31d9761c66e04 | drym-org/qi | impl.rkt | #lang racket/base
(provide give
->boolean
true.
false.
any?
all?
none?
map-values
filter-values
partition-values
relay
loom-compose
parity-xor
arg
except-args
call
repeat-valu... | null | https://raw.githubusercontent.com/drym-org/qi/a8bd930eda09e07b8f44fd2e7100b7be96d446ea/qi-lib/flow/impl.rkt | racket | we use a lambda to capture the arguments at runtime
since they aren't available at compile time
give a (list-)lifted function available arguments
directly instead of wrapping them with a list
related to `unpack`
accumulated subsequences into associated bodies.
- c+bs is a list of pair?
- each car is a condition... | #lang racket/base
(provide give
->boolean
true.
false.
any?
all?
none?
map-values
filter-values
partition-values
relay
loom-compose
parity-xor
arg
except-args
call
repeat-valu... |
b602830d839b87113df10c59a08bc3f54948ccac3376527727cdc4edb45ca715 | grin-compiler/ghc-whole-program-compiler-project | IntSpec.hs | # LANGUAGE OverloadedStrings , PatternSynonyms , MagicHash , UnboxedTuples , BangPatterns , CPP #
module PrimOp.IntSpec where
import Control.Monad.State.Strict
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Modifiers
import Test.QuickCheck.Monadic
import Stg.Syntax (Name, Type(..))
import Stg.Inter... | null | https://raw.githubusercontent.com/grin-compiler/ghc-whole-program-compiler-project/3fe5fb0aaebfe8005d44d29357dc53156c8b6537/external-stg-interpreter/test/PrimOp/IntSpec.hs | haskell | NOTE: chr# is valid in the unicode range: 0x0 .. 0x10FFFF | # LANGUAGE OverloadedStrings , PatternSynonyms , MagicHash , UnboxedTuples , BangPatterns , CPP #
module PrimOp.IntSpec where
import Control.Monad.State.Strict
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Modifiers
import Test.QuickCheck.Monadic
import Stg.Syntax (Name, Type(..))
import Stg.Inter... |
762b91af56d493da55fd766c4c943a10ce418f6859880872df9b7ec01adc8bea | typesanitizer/b2piet | painter.ml | open Batteries
open Utils.Piet
module V = BatVect
type 'a vec = 'a V.t
type picture_v = colour vec vec * int * int
type 'a array = 'a Utils.Array.t
type picture = colour array array * int * int
type ir = Utils.PietIR.ir
let id x = x
module IRExpansion = struct
module PI = Utils.PietIR
type ir_draw = Grow of in... | null | https://raw.githubusercontent.com/typesanitizer/b2piet/dc60d3df1b6d8d237db2864f78bbb54c81906359/src/painter.ml | ocaml | prepend entry for 0, now list index = number to be pushed
NOTE: the b - 1 below should actually be b - 2 according to
batteries documentation but there is an off-by-one error in
library.
18 |> Random.int |> num_to_colour
18 |> Random.int |> num_to_colour
assert a > 0
assert... | open Batteries
open Utils.Piet
module V = BatVect
type 'a vec = 'a V.t
type picture_v = colour vec vec * int * int
type 'a array = 'a Utils.Array.t
type picture = colour array array * int * int
type ir = Utils.PietIR.ir
let id x = x
module IRExpansion = struct
module PI = Utils.PietIR
type ir_draw = Grow of in... |
14b0bb260d78474c878c7468ea8313ffb3272b450fcb5ad96daef51b9795ded4 | r0man/sqlingvo | create_table_test.cljc | (ns sqlingvo.create-table-test
(:require #?(:clj [sqlingvo.test :refer [db sql=]]
:cljs [sqlingvo.test :refer [db] :refer-macros [sql=]])
[clojure.test :refer [are deftest is]]
[sqlingvo.core :as sql]))
(deftest test-create-table-keyword-db
(sql= (sql/create-table :postgresql... | null | https://raw.githubusercontent.com/r0man/sqlingvo/1f13624ed60ec0866fe51311d92da73638708172/test/sqlingvo/create_table_test.cljc | clojure | (ns sqlingvo.create-table-test
(:require #?(:clj [sqlingvo.test :refer [db sql=]]
:cljs [sqlingvo.test :refer [db] :refer-macros [sql=]])
[clojure.test :refer [are deftest is]]
[sqlingvo.core :as sql]))
(deftest test-create-table-keyword-db
(sql= (sql/create-table :postgresql... | |
875806b7a6af050e5a42e8cd86d816a07424190c501dfd1bd7363300f88fe9b0 | sfu-natlang/yarowsky | subramanya.ml |
Graph propagation of . 2010 .
Graph propagation of Subramanya et al. 2010.
*)
open Utils
let propagate table_init table_get nodes neighbours labels is_seeded seed_dist free_dist weight mu nu iters =
let num_nodes = List.length nodes in
let num_pairs = sumi (fun x -> List.length (neighbours x)) nodes in
le... | null | https://raw.githubusercontent.com/sfu-natlang/yarowsky/2c73d702909b4d3844b31a60947edfe72ab156b7/programs/subramanya.ml | ocaml |
Graph propagation of . 2010 .
Graph propagation of Subramanya et al. 2010.
*)
open Utils
let propagate table_init table_get nodes neighbours labels is_seeded seed_dist free_dist weight mu nu iters =
let num_nodes = List.length nodes in
let num_pairs = sumi (fun x -> List.length (neighbours x)) nodes in
le... | |
993b26886f546a3e3492cd62d77a0d24aaacf9376b74e1d2cb8bc8cc6b6dbc15 | RefactoringTools/wrangler | def7.erl | @private
-module(def7).
-compile([export_all]).
listsFlatten([]) -> [];
listsFlatten([H | T]) when is_list(H) ->
H ++ listsFlatten(T);
listsFlatten(List) when is_list(List) -> List.
caseFun(X) ->
case X of
{even, N} -> 2 * N;
{odd, N} -> 3 * N;
Other -> Other
end.
ifAndCase(N) when is_numb... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/symbolic_evaluation/tests/definitions/def7.erl | erlang | @private
-module(def7).
-compile([export_all]).
listsFlatten([]) -> [];
listsFlatten([H | T]) when is_list(H) ->
H ++ listsFlatten(T);
listsFlatten(List) when is_list(List) -> List.
caseFun(X) ->
case X of
{even, N} -> 2 * N;
{odd, N} -> 3 * N;
Other -> Other
end.
ifAndCase(N) when is_numb... | |
22b5330d386cc5546e3da53fc1d55d9d342475d69bb7295e190b4f1bfc57f70b | uncomplicate/clojurecuda | constants.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) or later
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be boun... | null | https://raw.githubusercontent.com/uncomplicate/clojurecuda/532ef26e0467d7963a37d7806634125ce091728b/src/clojure/uncomplicate/clojurecuda/internal/constants.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php) or later
which can be found in the file LICENSE 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 rem... | Copyright ( c ) . All rights reserved .
(ns ^{:author "Dragan Djuric"}
uncomplicate.clojurecuda.internal.constants
"Defines constants and mappings from/to CUDA constants."
(:import [jcuda.driver CUctx_flags JCudaDriver CUdevice_attribute CUcomputemode CUmemAttach_flags
CUfunc_cache CUdevice_P... |
cd50705a53e725559d24a59a63dbb088dc9c502a2f11711b0f2575e4b9af0c2b | cram2/cram | vector-set-zero.lisp | Regression test VECTOR - SET - ZERO for GSLL , automatically generated
;;
Copyright 2009 , 2010 , 2011 , 2014
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publis... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/vector-set-zero.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Publi... | Regression test VECTOR - SET - ZERO for GSLL , automatically generated
Copyright 2009 , 2010 , 2011 , 2014
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
... |
7406de6b25bf11cc92efd66c7bda420bac78a3ebad31b3c199aa92bab196aa43 | rescript-lang/rescript-editor-support | res_comment.ml | type style =
| SingleLine
| MultiLine
let styleToString s = match s with
| SingleLine -> "SingleLine"
| MultiLine -> "MultiLine"
type t = {
txt: string;
style: style;
loc: Location.t;
mutable prevTokEndPos: Lexing.position;
}
let loc t = t.loc
let txt t = t.txt
let prevTokEndPos t = t.prevTokEndPos
... | null | https://raw.githubusercontent.com/rescript-lang/rescript-editor-support/f6afacf93194036fafcff050cdaff150a85ccbe0/src/vendor/res_outcome_printer/res_comment.ml | ocaml | type style =
| SingleLine
| MultiLine
let styleToString s = match s with
| SingleLine -> "SingleLine"
| MultiLine -> "MultiLine"
type t = {
txt: string;
style: style;
loc: Location.t;
mutable prevTokEndPos: Lexing.position;
}
let loc t = t.loc
let txt t = t.txt
let prevTokEndPos t = t.prevTokEndPos
... | |
ca5b49517850dd901c7b2c0b170ec95e1c42272184a43ca0b36ee848ab32064c | kazu-yamamoto/hhp | Cradle.hs | module Hhp.Cradle (
findCradle
, findCradleWithoutSandbox
) where
import Control.Applicative ((<|>))
import qualified Control.Exception as E
import Control.Monad (filterM)
import Data.List (isSuffixOf)
import System.Directory (getCurrentDirectory, getDirectoryContents, doesFileExist)
import System.FilePath ((<... | null | https://raw.githubusercontent.com/kazu-yamamoto/hhp/81fcf5753cce716d37644b713f46fdd177d02de4/lib/Hhp/Cradle.hs | haskell | --------------------------------------------------------------
| Finding 'Cradle'.
Find a cabal file by tracing ancestor directories.
Find a sandbox according to a cabal sandbox config
in a cabal directory.
Just for testing
--------------------------------------------------------------
Input: a directly to ... | module Hhp.Cradle (
findCradle
, findCradleWithoutSandbox
) where
import Control.Applicative ((<|>))
import qualified Control.Exception as E
import Control.Monad (filterM)
import Data.List (isSuffixOf)
import System.Directory (getCurrentDirectory, getDirectoryContents, doesFileExist)
import System.FilePath ((<... |
7dbf73fe14cc78d8f3a641d775ada2147bd65abfa0f0c5d58049e03a9a7ace98 | TrustInSoft/tis-interpreter | cmdline.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/kernel_services/cmdline_parameters/cmdline.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
ebf59de25ea53d4136120edd2c79707f179174c92b90375fc894ec4a77f80632 | JonasDuregard/BNFC-meta | Example.hs | # LANGUAGE QuasiQuotes #
import Typesafe
import Language.LBNF.Runtime(printTree) -- overloaded pretty-printing function
import Prelude hiding (exp)
-- All variables are meta-variables.
-- Variables must be declared in the function parameters
Boolean and numeric variables are type checked by .
prg n tmp x = [prog|... | null | https://raw.githubusercontent.com/JonasDuregard/BNFC-meta/1526a2fbd7b01d374ebe2e49f78494f46d7472b8/examples/typesafe/Example.hs | haskell | overloaded pretty-printing function
All variables are meta-variables.
Variables must be declared in the function parameters | # LANGUAGE QuasiQuotes #
import Typesafe
import Prelude hiding (exp)
Boolean and numeric variables are type checked by .
prg n tmp x = [prog|
f() {
n = 0;
x := True ;
tmp = 0;
while ( tmp < 10 ) {
tmp++;
n = n * n;
}
}
|]
main = putStr $ printTree $ fresh vars prg where
vars = (map return ['a'... |
d7736815aef7004c6eb53bd1fda550a672d3c7baf670c85bfe9b59a4ce65a907 | RichiH/git-annex | Log.hs | git - annex command
-
- Copyright 2012 , 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012, 2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Command.Log where
import qualified Data.Set as S
import qualified Data.M... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Command/Log.hs | haskell | Displays changes made. Streams, and can display changes affecting
- different keys, but does twice as much reading of logged values
- as showLogIncremental.
Generates a display of the changes.
- Uses a formatter to generate a display of items that are added and
- removed.
remove - empty is a significant optimis... | git - annex command
-
- Copyright 2012 , 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012, 2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Command.Log where
import qualified Data.Set as S
import qualified Data.M... |
43edcbf01c2d77d1e0eabb4bb53a2a430775393d09a97067b0b781dddbafc81e | c-cube/quip | profile.ml |
module type BACKEND = sig
val get_ts : unit -> float
val emit_duration_event :
name : string ->
start : float ->
end_ : float ->
unit ->
unit
val emit_instant_event :
name : string ->
ts : float ->
unit ->
unit
val teardown : unit -> unit
end
type backend = (module BACKE... | null | https://raw.githubusercontent.com/c-cube/quip/d8671f8dbf299a010490a6c8824c602332e7f489/src/core/profile.ml | ocaml | where to print events
slow path |
module type BACKEND = sig
val get_ts : unit -> float
val emit_duration_event :
name : string ->
start : float ->
end_ : float ->
unit ->
unit
val emit_instant_event :
name : string ->
ts : float ->
unit ->
unit
val teardown : unit -> unit
end
type backend = (module BACKE... |
e7f43dfc44ec25dd0cd64b7fcc9df8e941edf611fc0489c1388aebc7324328a3 | aryx/xix | path.mli |
val find_in_path:
string (* cmd *) -> string list (* $path *) -> Common.filename
val search_path_for_cmd:
string (* cmd *) -> string list (* $path *)
| null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/shell/path.mli | ocaml | cmd
$path
cmd
$path |
val find_in_path:
val search_path_for_cmd:
|
123d1b8388c8c9811a00fcc171b4c615689391c9a9b9c3def343e7d386d719c6 | glondu/belenios | tool_js_booth.ml | (**************************************************************************)
(* BELENIOS *)
(* *)
Copyright © 2012 - 2023
(* ... | null | https://raw.githubusercontent.com/glondu/belenios/a1f9e4cc8c9aa823f3d0f9ba1e21b8c700cd5522/src/web/clients/tool/tool_js_booth.ml | ocaml | ************************************************************************
BELENIOS
This program is free softw... | Copyright © 2012 - 2023
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... |
0ea91274f6da5df70e61cbf0984f54702b7d260ba667cc9576f13525d0bb6390 | Mesabloo/nihil | Syntax.hs | # LANGUAGE RecordWildCards #
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE BangPatterns #-}
module Nihil.Syntax
*
runLexer
*
, runParser
*
, runDesugarer
-- * Re-exports
, module Nihil.Syntax.Pretty
, module AC
) where
import Nihil.Syntax.Common
import Nihil.CommonError
import Nihil.Utils.Source
import Nihil.... | null | https://raw.githubusercontent.com/Mesabloo/nihil/3821052ca5691a6492b23bd8a46bfe70567d374f/src/parser/Nihil/Syntax.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE BangPatterns #
* Re-exports | # LANGUAGE RecordWildCards #
module Nihil.Syntax
*
runLexer
*
, runParser
*
, runDesugarer
, module Nihil.Syntax.Pretty
, module AC
) where
import Nihil.Syntax.Common
import Nihil.CommonError
import Nihil.Utils.Source
import Nihil.Syntax.Concrete.Parser.Statement (pProgram)
import Nihil.Syntax.Concrete (To... |
17d50d6fe28ecc8ea93738fedb1ea183a984c3f76ab13f2697e7035d07563f08 | matsen/pplacer | test_newick_parser.ml | open Ppatteries
open OUnit
open Test_util
let suite = List.map
(fun (s, test_without_labels) ->
s >:: begin fun () ->
let gt = Newick_gtree.of_string s in
let gt' = gt
|> Newick_gtree.to_string ~with_node_numbers:true
|> Newick_gtree.of_string
in
let gt'' = gt'
|> ... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/tests/pplacer/test_newick_parser.ml | ocaml | open Ppatteries
open OUnit
open Test_util
let suite = List.map
(fun (s, test_without_labels) ->
s >:: begin fun () ->
let gt = Newick_gtree.of_string s in
let gt' = gt
|> Newick_gtree.to_string ~with_node_numbers:true
|> Newick_gtree.of_string
in
let gt'' = gt'
|> ... | |
22b16e3aa5517928612bfdb9cd3f2003d065304ec97bb4cb5d55f1be16a8e982 | juspay/atlas | Search.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/parking-bap/src/Storage/Queries/Search.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
1299b8b7c9e888d15253d541069c6be95f65cc5aee00cbcd73a0b45181eadf9a | tek/ribosome | UserInput.hs | module Ribosome.App.UserInput where
import qualified Data.Text.IO as Text
import Path (Path)
import Rainbow (
Chunk,
Radiant,
blue,
bold,
chunk,
color256,
faint,
fore,
green,
hPutChunks,
hPutChunksLn,
magenta,
only256,
yellow,
)
import System.IO (getLine, stderr)
import Ribosome.App.Erro... | null | https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/app/lib/Ribosome/App/UserInput.hs | haskell | module Ribosome.App.UserInput where
import qualified Data.Text.IO as Text
import Path (Path)
import Rainbow (
Chunk,
Radiant,
blue,
bold,
chunk,
color256,
faint,
fore,
green,
hPutChunks,
hPutChunksLn,
magenta,
only256,
yellow,
)
import System.IO (getLine, stderr)
import Ribosome.App.Erro... | |
d92d57a315a5b11e25aa2b3edffc389be2683b49ec6a5fb319bbb23a4ed84b73 | outergod/cl-m4 | m4.lisp | ;;;; cl-m4 - m4.lisp
Copyright ( C ) 2010 < >
This file is part of cl - m4 .
;;;; cl-m4 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or
;;;; (at your option) any ... | null | https://raw.githubusercontent.com/outergod/cl-m4/9f6518b5a173a1234ae39ef45758927d329ded4a/test/m4.lisp | lisp | cl-m4 - m4.lisp
cl-m4 is free software; you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any later version.
cl-m4 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 PARTICUL... | Copyright ( C ) 2010 < >
This file is part of cl - m4 .
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(in-package :cl-m4-test)
(in-suite all)
(defsuite m4)
(in-suite m4)
(set-dispatch-macro-character #\# #\> #'cl-he... |
a18aab55f0089beb89c4096ce88cf5f4c140a717ddc1574a0777ddee03369f86 | input-output-hk/cardano-ledger | Debug.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import Cardano.Ledger.Alonzo.Language (Language (..))
import Cardano.Ledger.Alonzo.TxInfo (debugPlutus)
import Cardano.Ledger.BaseTypes (natVersion)
import System.Environment (getArgs)
import System.IO
main :... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/a87ffef26cb6d41f819cd86ec1282d16ee678daf/libs/plutus-preprocessor/src/Debug.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import Cardano.Ledger.Alonzo.Language (Language (..))
import Cardano.Ledger.Alonzo.TxInfo (debugPlutus)
import Cardano.Ledger.BaseTypes (natVersion)
import System.Environment (getArgs)
import System.IO
main :... | |
9d37d5c6e6d0f2ce0cac3ce62abb1c3e6de599474ee999ca9801fe892d2ebc40 | scicloj/clojure-data-cookbook | dev.clj | (ns dev
(:require [nextjournal.clerk :as clerk]
[nextjournal.clerk.viewer :as v]))
;; Tell Clerk to render all tablecloth datasets as tables
;; (clerk/add-viewers! [{:pred #(= tech.v3.dataset.impl.dataset.Dataset (type %))
;; ;; :fetch-fn (fn [_ file] {:nextjournal/content-type "i... | null | https://raw.githubusercontent.com/scicloj/clojure-data-cookbook/c404af1bc8dd71906c5170d4705a74a860ac3d87/env/dev/src/dev.clj | clojure | Tell Clerk to render all tablecloth datasets as tables
(clerk/add-viewers! [{:pred #(= tech.v3.dataset.impl.dataset.Dataset (type %))
;; :fetch-fn (fn [_ file] {:nextjournal/content-type "image/png"
;; :nextjournal/value (Files/readAllBytes (.toPat... | (ns dev
(:require [nextjournal.clerk :as clerk]
[nextjournal.clerk.viewer :as v]))
(defn start! []
(clerk/serve! {:browse? true})
:ready)
(defn start-and-watch! []
(clerk/serve! {:browse? true :watch-paths ["book" "data"]}))
(defn show [notebook]
(clerk/show! notebook))
|
3e5c5f981c0304bda6a103e65dd0282627c35e79f2e0e31c3510312940f0e2c3 | avsm/platform | color_map.ml | In reality , this can really be represented as a bool array .
The representation is best thought of as a list of all chars along with a
flag :
( a , 0 ) , ( b , 1 ) , ( c , 0 ) , ( d , 0 ) , ...
characters belonging to the same color are represented by sequnces of
characters with the flag ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/re.1.9.0/lib/color_map.ml | ocaml | In reality , this can really be represented as a bool array .
The representation is best thought of as a list of all chars along with a
flag :
( a , 0 ) , ( b , 1 ) , ( c , 0 ) , ( d , 0 ) , ...
characters belonging to the same color are represented by sequnces of
characters with the flag ... | |
0e373074802c01c3009c9c7b27d2cf018669d09bbaa86d7f00d371079179d58e | ranjitjhala/haddock-annot | Build.hs | -----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Build
Copyright : 2003 - 2005 ,
2006 ,
2007 - 2008
--
-- Maintainer :
-- Portability : portable
--
-- This is the entry point to actually building t... | null | https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/Cabal-1.10.1.1/Distribution/Simple/Build.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Simple.Build
Maintainer :
Portability : portable
This is the entry point to actually building the modules in a package. It
doesn't actually do much itself, most of the work is delegated to
compiler-spe... | Copyright : 2003 - 2005 ,
2006 ,
2007 - 2008
Copyright ( c ) 2003 - 2005 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are
met :
* Redistr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.