_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 |
|---|---|---|---|---|---|---|---|---|
2292b6b2545c8e5a68b7404a2736429d24fa33bcd9eded931964365846d58b3d | rizo/snowflake-os | e1000.mli |
val init : unit -> unit
| null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/kernel/e1000.mli | ocaml |
val init : unit -> unit
| |
3b29aeaaf11aa9971594c8db2fdc4f3b734e702639f5f342b251ec832dd987cd | parapluu/Concuerror | concuerror_ticket_tests.erl | %%%----------------------------------------------------------------------
Copyright ( c ) 2011 , < > ,
< >
and < > .
%%% All rights reserved.
%%%
This file is distributed under the Simplified BSD License .
%%% Details can be found in the LICENSE file.
%%%------------... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/resources/utest/concuerror_ticket_tests.erl | erlang | ----------------------------------------------------------------------
All rights reserved.
Details can be found in the LICENSE file.
----------------------------------------------------------------------
Description : Ticket interface unit tests
---------------------------------------------------------------------... | Copyright ( c ) 2011 , < > ,
< >
and < > .
This file is distributed under the Simplified BSD License .
Author : < >
< >
-module(concuerror_ticket_tests).
-include_lib("eunit/include/eunit.hrl").
Spec for auto - generated test/0 func... |
e5012b88b88f9f6566c87b4f4958ed7362be2e0e26232178dddce26d0f8a47ef | facebook/pyre-check | taintAnalysis.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/pyre-check/d9795d776eafc93b0e51bbb5238ca2f1515a8aed/source/interprocedural_analyses/taint/taintAnalysis.ml | ocaml | TaintAnalysis: this is the entry point of the taint analysis.
In order to save time, sanity check models before starting the analysis.
* Perform a full type check and build a type environment.
In order to get an accurate call graph and type information, we need to ensure that we
schedule a type check f... |
* 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... |
414271664a54e419a4d0e3007510d1a26d388092d2efc5842bece593f9fa2444 | ghcjs/ghcjs-boot | text001.hs | Bug report 28 May 99
When compiled with ghc-4.02 , everything 's fine , it outputs " Value 7 " as
expected . But compiled with ghc - pre-4.03 it yields this error message .
Fail : Prelude.read : no parse
When compiled with ghc-4.02, everything's fine, it outputs "Value 7" as
expected. But compiled with ... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/tests/text001.hs | haskell | Bug report 28 May 99
When compiled with ghc-4.02 , everything 's fine , it outputs " Value 7 " as
expected . But compiled with ghc - pre-4.03 it yields this error message .
Fail : Prelude.read : no parse
When compiled with ghc-4.02, everything's fine, it outputs "Value 7" as
expected. But compiled with ... | |
2b87f86dadc7dd39a49bb1068d4239e91e78b9e532306d29d54f78b66ca8210c | vkz/PLAI | type-checker.rkt | #lang plai-typed
(define-type Type
[numT]
[boolT]
[funT (arg : Type) (ret : Type)])
(define-type-alias TyEnv (listof Binding))
(define extend-ty-env cons)
(define-type Binding
[bound (name : symbol) (type : Type)])
(define bind bound)
(define lookup
(lambda ([id : symbol]
[env : TyEnv])
(... | null | https://raw.githubusercontent.com/vkz/PLAI/3a7dc604dab78f4ebcfa6f88d03242cb3f7f1113/type-checker.rkt | racket | #lang plai-typed
(define-type Type
[numT]
[boolT]
[funT (arg : Type) (ret : Type)])
(define-type-alias TyEnv (listof Binding))
(define extend-ty-env cons)
(define-type Binding
[bound (name : symbol) (type : Type)])
(define bind bound)
(define lookup
(lambda ([id : symbol]
[env : TyEnv])
(... | |
333521087fbb4665ac1bc78bd99199e5246af796aa0207e419594f01b0c224f5 | YoshikuniJujo/test_haskell | makeEnumVkBlendOp.hs | # OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import MakeEnum
main :: IO ()
main = makeEnum "/usr/include/vulkan/vulkan_core.h" "BlendOp" "VkBlendOp" ""
| null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/d90cb245f0622524c3426635ab0080e8aa80b60b/themes/gui/vulkan/try-my-vulkan/tools/makeEnumVkBlendOp.hs | haskell | # OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import MakeEnum
main :: IO ()
main = makeEnum "/usr/include/vulkan/vulkan_core.h" "BlendOp" "VkBlendOp" ""
| |
101ce1932b34a2e04f50aa9cd7cba61dcdfe1d6036675a72b314ecc9cdc3efa5 | mirage/ca-certs-nss | ca_certs_nss.ml | module Make (C : Mirage_clock.PCLOCK) = struct
let authenticator =
let tas =
List.fold_left
(fun acc data ->
Result.bind acc (fun acc ->
Result.map
(fun cert -> cert :: acc)
(X509.Certificate.decode_der (Cstruct.of_string data))))
(Ok [... | null | https://raw.githubusercontent.com/mirage/ca-certs-nss/306dfb17b45fca4fc44b6987c06d2a7971d51daa/lib/ca_certs_nss.ml | ocaml | module Make (C : Mirage_clock.PCLOCK) = struct
let authenticator =
let tas =
List.fold_left
(fun acc data ->
Result.bind acc (fun acc ->
Result.map
(fun cert -> cert :: acc)
(X509.Certificate.decode_der (Cstruct.of_string data))))
(Ok [... | |
0ac0388ea94a34427fd1912a733cbafb8698aabd8150e0ca9975fb0b8140d0e2 | discus-lang/ddc | TransInteract.hs | module DDCI.Core.Command.TransInteract
( cmdTransInteract
, cmdTransInteractLoop)
where
import DDCI.Core.Output
import DDCI.Core.State
import DDC.Driver.Command.Check
import DDC.Driver.Command.Trans
import DDC.Build.Language
import DDC.Core.Fragment
import DDC.Core.Simplifier.Parser
import DDC.Core.Tran... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-tools/src/ddci-core/DDCI/Core/Command/TransInteract.hs | haskell | ------------------------------------------------------------
| Apply the current transform to an expression.
Expression is well-typed.
Expression had a parse or type error. | module DDCI.Core.Command.TransInteract
( cmdTransInteract
, cmdTransInteractLoop)
where
import DDCI.Core.Output
import DDCI.Core.State
import DDC.Driver.Command.Check
import DDC.Driver.Command.Trans
import DDC.Build.Language
import DDC.Core.Fragment
import DDC.Core.Simplifier.Parser
import DDC.Core.Tran... |
216f45dc9cd7a3dfa3173af7dc633a2bff0e0697f65f4b43c08237cc5f8b4360 | tomhanika/conexp-clj | scene_layouts.clj | (ns conexp.gui.draw.scene-layouts
"Basic namespace for drawing lattice."
(:require [conexp.base :refer :all]
[conexp.gui.draw.nodes-and-connections :refer :all]
[conexp.gui.draw.scenes :refer :all]
[conexp.gui.util :refer :all]
[conexp.layouts.base :refer :all]
... | null | https://raw.githubusercontent.com/tomhanika/conexp-clj/3cb86b4906864de7254e1f93e1bb263d165373d9/src/main/clojure/conexp/gui/draw/scene_layouts.clj | clojure | get diagram from scene
node and line iterators
manipulate layout of scene
draw nodes with coordinates and connections on a scene
| (ns conexp.gui.draw.scene-layouts
"Basic namespace for drawing lattice."
(:require [conexp.base :refer :all]
[conexp.gui.draw.nodes-and-connections :refer :all]
[conexp.gui.draw.scenes :refer :all]
[conexp.gui.util :refer :all]
[conexp.layouts.base :refer :all]
... |
e3d15454085c8d29312d186feb9b4d156d4c53b7cd32bba9409bbe0bfb2ab784 | ocaml-sf/learn-ocaml-corpus | build_forget_to_increment_depth.ml | (* The data values carried by the leaves of a tree. *)
let rec elements t xs =
match t with
| Leaf x ->
x :: xs
| Fork (t, u) ->
elements t (elements u xs)
let elements (t : 'a tree) : 'a list =
elements t []
(* The depths of the leaves of a tree. *)
let rec depths d t ds =
match t with
| Le... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/spectre/wrong/build_forget_to_increment_depth.ml | ocaml | The data values carried by the leaves of a tree.
The depths of the leaves of a tree.
The elements and depths, combined.
A direct definition can also be given.
A facility for reading and consuming the elements of a list.
Reconstructing a tree from its spectre.
Premature end of input.
If this element lies ... |
let rec elements t xs =
match t with
| Leaf x ->
x :: xs
| Fork (t, u) ->
elements t (elements u xs)
let elements (t : 'a tree) : 'a list =
elements t []
let rec depths d t ds =
match t with
| Leaf _ ->
d :: ds
| Fork (t, u) ->
depths (d + 1) t (depths (d + 1) u ds)
let depths... |
5bd00783de4af8d9a33946017a9bed360e67b949083fce09a1578598c02a7d44 | wadehennessey/wcl | manager.lisp | -*- Mode : Lisp ; Package : XLIB ; Syntax : COMMON - LISP ; ; Lowercase : T -*-
;;; Window Manager Property functions
;;;
TEXAS INSTRUMENTS INCORPORATED
;;; P.O. BOX 2909
AUSTIN , TEXAS 78769
;;;
Copyright ( C ) 1987 Texas Instruments Incorporated .
;;;
;;; Permission is granted to any indiv... | null | https://raw.githubusercontent.com/wadehennessey/wcl/841316ffe06743d4c14b4ed70819bdb39158df6a/src/clx/manager.lisp | lisp | Package : XLIB ; Syntax : COMMON - LISP ; ; Lowercase : T -*-
Window Manager Property functions
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 al... |
TEXAS INSTRUMENTS INCORPORATED
AUSTIN , TEXAS 78769
Copyright ( C ) 1987 Texas Instruments Incorporated .
Texas Instruments Incorporated provides this software " as is " without
(in-package :xlib)
(defun wm-name (window)
(declare (type window window))
(declare (values string))
(get-propert... |
b39f482d0370bfeae2ab96fd3b83c77e4d75091add2ae2686198604dbb4860e5 | markandrus/twilio-haskell | UsageTrigger.hs | # LANGUAGE MultiParamTypeClasses #
{-#LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
-------------------------------------------------------------------------------
-- |
-- Module : Twilio.UsageTrigger
Copyright : ( C ) 2017-
-- License : BSD-style (see the file LICENSE)
Maintainer : ... | null | https://raw.githubusercontent.com/markandrus/twilio-haskell/00704dc86dbf2117b855b1e2dcf8b6c0eff5bfbe/src/Twilio/UsageTrigger.hs | haskell | #LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
|
Module : Twilio.UsageTrigger
License : BSD-style (see the file LICENSE)
Stability : provisional
-----------------------------------------------------------------------------
* Resource
| Get... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE ViewPatterns #
Copyright : ( C ) 2017-
Maintainer : < >
module Twilio.UsageTrigger
UsageTrigger(..)
, Twilio.UsageTrigger.get
) where
import Control.Monad
import Control.Monad.Catch
import Data.Aeson
import Data.Monoid
import Data.Text (Text)
im... |
9907fd86e9a029e8c1565230024ec2fb78b1075c344cf4252593adc414514c26 | rizo/streams-bench | Push_fold_k.ml | FIXME :
of_list [ 1;2;3;4;5 ]
| > flat_map ( fun x - > of_list [ x;x ] )
| > take 4
| > fold ( fun acc x - > x : : acc ) [ ]
of_list [1;2;3;4;5]
|> flat_map (fun x -> of_list [x;x])
|> take 4
|> fold (fun acc x -> x :: acc) [] *)
type 'a thunk = unit -> 'a
type 'a t = { run : 'r. (co... | null | https://raw.githubusercontent.com/rizo/streams-bench/87baf838971c84613b801ab32b6473d397bcc23f/src/Push_fold_k.ml | ocaml | FIXME :
of_list [ 1;2;3;4;5 ]
| > flat_map ( fun x - > of_list [ x;x ] )
| > take 4
| > fold ( fun acc x - > x : : acc ) [ ]
of_list [1;2;3;4;5]
|> flat_map (fun x -> of_list [x;x])
|> take 4
|> fold (fun acc x -> x :: acc) [] *)
type 'a thunk = unit -> 'a
type 'a t = { run : 'r. (co... | |
a4fc6b680adc23afaba55fa14f67103725e62b733a06ad597a9f59cfd22261db | PacktWorkshops/The-Clojure-Workshop | inflection_points.clj | In REPL : 1 . Define some sample data
(def sample-data
[[24.2 420031]
[25.8 492657]
[23.8 691995] ;min
[23.2 794243]
[23.1 836204] ;min
[23.5 884120]])
In REPL : 2 . local - max ? and local - min ?
(defn local-max? [[a b c]]
(and (< (first a) (firs... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter07/Exercise7.01/inflection_points.clj | clojure | min
min
In REPL: local-max? and local-min? with "clever" destructuring
=> false
=> false
=> true
In REPL | In REPL : 1 . Define some sample data
(def sample-data
[[24.2 420031]
[25.8 492657]
[23.2 794243]
[23.5 884120]])
In REPL : 2 . local - max ? and local - min ?
(defn local-max? [[a b c]]
(and (< (first a) (first b)) (< (first c) (first b))))
(defn local-min? [[a b c]]
(and (> (first a) (first b))... |
79508182d5562dcb160b55a0a28a118c776b187c96e130df8d09d1c007474a82 | xapi-project/squeezed | squeeze_xen.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems 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 ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/squeezed/1c23bfe2d8284384ad66fa0dedb1583b570369b8/src/squeeze_xen.ml | ocaml | immutable
immutable
immutable
immutable
mutable: written by guest agent
immutable
mutable: written by us
mutable: written by domain manager
mutable: written by domain manager
* Cache of per-domain info, to avoid repeated per-domain queries
Misc other stuff appears in max_memory_pages
get_per_domai... |
* Copyright ( C ) 2006 - 2009 Citrix Systems 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 ; version 2.1 only . with the special
* exception on linking describe... |
c3cdb7a3efe623edea386cea4dce1e85a03a0b40b53b4624adf3aeddefd9ef89 | azimut/shiny | buffers.lisp | (in-package :shiny)
;; TODO:
;; - right now it uses (at) to stop (word-play),
;; might be buffer-play can support other thing
;; ... I could have used (buffer-read) and (phasor-loop)
;; ... on the other hand it makes easy to play backwards
;; - Make it quickload-able
;; - Add slice support. With start and ... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/lib/buffers.lisp | lisp | TODO:
- right now it uses (at) to stop (word-play),
might be buffer-play can support other thing
... I could have used (buffer-read) and (phasor-loop)
... on the other hand it makes easy to play backwards
- Make it quickload-able
- Add slice support. With start and stop as relative values
Bu... | (in-package :shiny)
(defvar *buffers* (make-hash-table :test #'equal)
"Global cache for all buffers loaded through (bbufer-load).
Key is the (file-namestring). Example: \"sample.wav\"
Value is the actual buffer object.")
(defvar *sample-words* (make-hash-table :test #'equal))
(defvar *instruments* (make-hash-... |
675007c9aa076b32fc3a416185915954c5ff601167a8cb2e624fd79b0aee9419 | EMSL-NMR-EPR/Haskell-MFAPipe-Executable | Stoichiometry.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
-----------------------------------------------------------------------------
-- |
-- Module : Science.Chemistry.Stoichi... | null | https://raw.githubusercontent.com/EMSL-NMR-EPR/Haskell-MFAPipe-Executable/8a7fd13202d3b6b7380af52d86e851e995a9b53e/MFAPipe/src/Science/Chemistry/Stoichiometry.hs | haskell | ---------------------------------------------------------------------------
|
Module : Science.Chemistry.Stoichiometry
License : ECL-2.0 (see the LICENSE file in the distribution)
Maintainer :
Stability : experimental
Portability : portable
This module exports classes and types for the constr... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
Copyright : 2016 - 17 Pacific Northwest National Laboratory
module Science.Chemistry.Stoichiometry
* HasStoichiometr... |
23d3aeed00dd85324041df7276f9859f2497e023cde1ab85f8475de7f30c9f91 | active-group/sqlosure | oracledb.clj | (ns sqlosure.backends.oracledb
(:require [active.clojure.monad :as m]
[sqlosure.backend :as backend]
[sqlosure.sql-put :as sql-put]))
TODO This is only a stub implementation .
(defn oracledb-put-alias
[alias]
(if alias
(sql-put/write! alias)
(m/return nil)))
(def oracledb-put-... | null | https://raw.githubusercontent.com/active-group/sqlosure/3cd74e90df4f3c49c841a1a75941acc7444c4bfb/src/sqlosure/backends/oracledb.clj | clojure | (ns sqlosure.backends.oracledb
(:require [active.clojure.monad :as m]
[sqlosure.backend :as backend]
[sqlosure.sql-put :as sql-put]))
TODO This is only a stub implementation .
(defn oracledb-put-alias
[alias]
(if alias
(sql-put/write! alias)
(m/return nil)))
(def oracledb-put-... | |
576eed263de91f04b96517c9d0813cdef4bad0a6c2d591e12980f0b3cf315aa4 | typelead/etlas | Message.hs | {-# LANGUAGE BangPatterns #-}
module Distribution.Solver.Modular.Message (
Message(..),
showMessages
) where
import qualified Data.List as L
import Prelude hiding (pi)
from Cabal
import Distribution.Solver.Modular.Dependency
import Distribution.Solver.Modular.Flag
import Distribution.Solver.Modular.Pack... | null | https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Solver/Modular/Message.hs | haskell | # LANGUAGE BangPatterns #
^ increase indentation level
^ decrease indentation level
| Transforms the structured message type to actual messages (strings).
Takes an additional relevance predicate. The predicate gets a stack of goal
variables and can decide whether messages regarding these goals are relevant.
You ... |
module Distribution.Solver.Modular.Message (
Message(..),
showMessages
) where
import qualified Data.List as L
import Prelude hiding (pi)
from Cabal
import Distribution.Solver.Modular.Dependency
import Distribution.Solver.Modular.Flag
import Distribution.Solver.Modular.Package
import Distribution.Solver... |
c781ac5ac10072ec06659e2482cfc89ef4d4fa75ec626c1fdd2cf0ad6c3c0788 | shirok/Gauche | chibi-test.scm | ;;
A quick hack to run test suite written for
;;
(define-module compat.chibi-test
(use gauche.test)
(use util.match)
(export chibi-test current-test-comparator))
(select-module compat.chibi-test)
(define current-test-comparator (make-parameter equal?))
(define-syntax gauche:parameterize parameterize)
(define... | null | https://raw.githubusercontent.com/shirok/Gauche/a41f073942a282e68c1559474f369021ed4533bc/lib/compat/chibi-test.scm | scheme |
do that, so we translate the whole body of chibi-test into
nested lets.
we also cheat the scope - we want to replace macros such as
test, include and parameterize, but we want them to be effective
only inside chibi-test.
necessary modules
are supposed to be already used in the includer.
So as import
ignore t... | A quick hack to run test suite written for
(define-module compat.chibi-test
(use gauche.test)
(use util.match)
(export chibi-test current-test-comparator))
(select-module compat.chibi-test)
(define current-test-comparator (make-parameter equal?))
(define-syntax gauche:parameterize parameterize)
(define gauch... |
339f09a0ef4c51c3effde1c59d0668c469455e3286ae5f356c43618863ee412f | zarkone/stumpwm.d | package.lisp | package.lisp
(defpackage #:wifi
(:use #:cl :common-lisp :stumpwm )
(:export #:*iwconfig-path*
#:*wireless-device*))
| null | https://raw.githubusercontent.com/zarkone/stumpwm.d/021e51c98a80783df1345826ac9390b44a7d0aae/modules/modeline/wifi/package.lisp | lisp | package.lisp
(defpackage #:wifi
(:use #:cl :common-lisp :stumpwm )
(:export #:*iwconfig-path*
#:*wireless-device*))
| |
139430e22d2770c43ecddbf24d9a4e945d950696383acc6dd4caafed0d7116be | spawnfest/eep49ers | wxNotifyEvent.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2020 . All Rights Reserved .
%%
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 applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxNotifyEvent.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2008 - 2020 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(wxNotifyEvent).
-include("wxe.hrl").
-export([allow/1,isAllowed/1,veto/1]).
-export([getClientData/1,getExt... |
c8a7e49f1663411c0350cee868c8fdcef13b2c1f1bf84f1d9ed5ab294718a449 | haskell/cabal | cabal.test.hs | import Test.Cabal.Prelude
main = cabalTest $ do
void . fails $ cabal' "v2-run" ["script.hs"]
| null | https://raw.githubusercontent.com/haskell/cabal/bbc11f1c71651e910976c16498bc4871d7b416ea/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptBad/cabal.test.hs | haskell | import Test.Cabal.Prelude
main = cabalTest $ do
void . fails $ cabal' "v2-run" ["script.hs"]
| |
f63e1e09b95b2c6bb2b2ab736c406e558d0a46194137c269133a524ef39aca02 | cj1128/sicp-review | 2.50.scm | (define (flip-horiz painter)
(transform-painter painter
(make-vect 1.0 0.0)
(make-vect 0.0 0.0)
(make-vect 1.0 1.0)))
(define (rotate180 painter)
(transform-painter painter
(make-vect 1.0 1.0)
(make-vect 0.0 1.... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-2/2.2/2.50.scm | scheme | (define (flip-horiz painter)
(transform-painter painter
(make-vect 1.0 0.0)
(make-vect 0.0 0.0)
(make-vect 1.0 1.0)))
(define (rotate180 painter)
(transform-painter painter
(make-vect 1.0 1.0)
(make-vect 0.0 1.... | |
caa9140c3e46b92ab1d3dbe81490be060e593172d082db7bc31404e7241939f4 | rtoy/cmucl | boot-19f.lisp | ;;;;
Boot file for changing the fasl file version numbers to 19e .
;;;;
(in-package :c)
(setf lisp::*enable-package-locked-errors* nil)
;;;
Note that BYTE - FASL - FILE - VERSION is a constant .
;;;
( Be sure to change BYTE - FASL - FILE - VERSION in
;;; compiler/byte-comp.lisp to the correct value too!)
;;;
(... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/bootfiles/19e/boot-19f.lisp | lisp |
compiler/byte-comp.lisp to the correct value too!)
Don't check fasl versions in the compiling Lisp because we'll
load files compiled with the new version numbers.
This is here because BYTE-FASL-FILE-VERSION is constant-folded in
OPEN-FASL-FILE. To make the new version number take effect, we
have to redef... | Boot file for changing the fasl file version numbers to 19e .
(in-package :c)
(setf lisp::*enable-package-locked-errors* nil)
Note that BYTE - FASL - FILE - VERSION is a constant .
( Be sure to change BYTE - FASL - FILE - VERSION in
(setf (symbol-value 'byte-fasl-file-version) #x19f)
(setf (backend-fasl-... |
f9bdba2d1967bd7b85c448169cd1ac799c65168d2d0e7e70ca57c01a37a94ec0 | expipiplus1/vulkan | Bracket.hs | module VK.Bracket
( brackets
) where
import Data.List ( (\\) )
import qualified Data.Map as Map
import qualified Data.Text.Extra as T
import Data.Vector ( Vector )
import Polysemy
import Relude ... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/a46784a1079839381e18cfe37a8c0d6ce29a0c90/generate-new/vk/VK/Bracket.hs | haskell | TODO: Missing functions here should be warnings, because we might be
generating a different version of the spec.
, cdBracket "VideoSessionKHR"
Check that we can generate all the handles
A crude way of getting all the type names we generate | module VK.Bracket
( brackets
) where
import Data.List ( (\\) )
import qualified Data.Map as Map
import qualified Data.Text.Extra as T
import Data.Vector ( Vector )
import Polysemy
import Relude ... |
60dfb1b3710d5b5182123f8dec7901e1baee379469fd06302716dccc1c830bb6 | gator1/jepsen | model.clj | (ns jepsen.model
"Functional abstract models of database behavior."
(:refer-clojure :exclude [set])
(:import knossos.model.Model
(clojure.lang PersistentQueue))
(:use clojure.tools.logging)
(:require [clojure.core :as core]
[knossos.model :as knossos]
[multiset.core :as mult... | null | https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/jepsen/src/jepsen/model.clj | clojure | (ns jepsen.model
"Functional abstract models of database behavior."
(:refer-clojure :exclude [set])
(:import knossos.model.Model
(clojure.lang PersistentQueue))
(:use clojure.tools.logging)
(:require [clojure.core :as core]
[knossos.model :as knossos]
[multiset.core :as mult... | |
1a8471b28c5cc3d0540681ce0cff058e906f92ff252688fc93f16ca02986bc7a | fujita-y/ypsilon | srfi-64.scm | #!nobacktrace
(define-library (srfi srfi-64)
(import (srfi 64))
(export test-begin
test-end
test-group
test-group-with-cleanup
test-skip
test-expect-fail
test-match-name
test-match-nth
test-match-all
test-match-any
t... | null | https://raw.githubusercontent.com/fujita-y/ypsilon/44260d99e24000f9847e79c94826c3d9b76872c2/sitelib/srfi/srfi-64.scm | scheme | #!nobacktrace
(define-library (srfi srfi-64)
(import (srfi 64))
(export test-begin
test-end
test-group
test-group-with-cleanup
test-skip
test-expect-fail
test-match-name
test-match-nth
test-match-all
test-match-any
t... | |
389240be0f8d97129b8d93364ca66de3103b0ee90cba2c7ab16714e139d37a3a | ocaml-opam/opam-rt | utils.mli |
* Copyright ( c ) 2013 - 2020 OCamlPro
* Authors < > ,
* < > ,
* < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice app... | null | https://raw.githubusercontent.com/ocaml-opam/opam-rt/2f42d8dcdbd9f16e0e385314a8bf9396cb8a88fa/src/tests/utils.mli | ocaml | * Config
* Init
Repository initialisation
* opam
Repo server
* Run |
* Copyright ( c ) 2013 - 2020 OCamlPro
* Authors < > ,
* < > ,
* < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice app... |
6b7e5572ad71ec8706cacf879ed9098bc67d0c0c8cfbf580c80a82032dcb685d | cgoldammer/chess-database-backend | StatsHelpers.hs | |Assorted statistical functions needed as part of the app .
module Services.StatsHelpers where
-- Arithmetic mean
mean :: (Floating a) => [a] -> a
mean xs = sum xs / (fromIntegral . length) xs
var :: (Floating a) => [a] -> a
var xs = sum (map (\x -> (x - m)^(2::Integer)) xs) / (fromIntegral (length xs)-1)
where m... | null | https://raw.githubusercontent.com/cgoldammer/chess-database-backend/03b6b8d3072941e7da395eb4371ece588093e140/src/Services/StatsHelpers.hs | haskell | Arithmetic mean | |Assorted statistical functions needed as part of the app .
module Services.StatsHelpers where
mean :: (Floating a) => [a] -> a
mean xs = sum xs / (fromIntegral . length) xs
var :: (Floating a) => [a] -> a
var xs = sum (map (\x -> (x - m)^(2::Integer)) xs) / (fromIntegral (length xs)-1)
where m = mean xs
stdDev ... |
d7b280a6e76f13891c680856a643b69295424af20312e6e94cf851f9f519adf3 | skanev/playground | 90.scm | SICP exercise 2.90
;
; Suppose we want to have a polynomial system that is efficient for both
sparse and dense polynomials . One way to do this is to allow both kinds of
; term-list representations in our system. The situation is analogous to the
complex - number example of section 2.4 , where we allowed both rec... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/02/90.scm | scheme |
Suppose we want to have a polynomial system that is efficient for both
term-list representations in our system. The situation is analogous to the
polar representations. To do this we must distinguish different types of
term lists and make the operations on term lists generic. Redesign the
polynomial system to imp... | SICP exercise 2.90
sparse and dense polynomials . One way to do this is to allow both kinds of
complex - number example of section 2.4 , where we allowed both rectangular and
(define (attach-tag type-tag contents)
(cons type-tag contents))
(define (type-tag datum)
(if (pair? datum)
(car datum)
... |
6b79fb0ca6fadfac356562f9c907f2c8939aa6b7f1af16b0ab999b36f9fe2f6f | mmottl/gsl-ocaml | root.mli | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
* One dimensional Root - Finding
module Bracket :
sig
type kind =
| BISECTION
| FALSEPOS
| BRENT
type t
val make : kind ->... | null | https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/src/root.mli | ocaml | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
* One dimensional Root - Finding
module Bracket :
sig
type kind =
| BISECTION
| FALSEPOS
| BRENT
type t
val make : kind ->... | |
99ecef1660a83cc5b8f50121ac1d1e1a3f736f2c242e777b88b2a5ed756b697f | mwunsch/overscan | info.rkt | #lang info
(define scribblings '(("scribblings/overscan.scrbl" (multi-page))))
| null | https://raw.githubusercontent.com/mwunsch/overscan/f198e6b4c1f64cf5720e66ab5ad27fdc4b9e67e9/overscan/info.rkt | racket | #lang info
(define scribblings '(("scribblings/overscan.scrbl" (multi-page))))
| |
8d04601d9678ecf9339211517c5ed8eb9523d7f73a52fba5473a7f0a483d0083 | noinia/hgeometry | Internal.hs | # LANGUAGE Unsafe #
module Geometry.Matrix.Internal where
import Control.Lens (set)
import Geometry.Vector
import qualified Data.Vector.Fixed as FV
--------------------------------------------------------------------------------
-- * Helper functions to easily create matrices
-- | Creates a row w... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/src/Geometry/Matrix/Internal.hs | haskell | ------------------------------------------------------------------------------
* Helper functions to easily create matrices
| Creates a row with zeroes everywhere, except at position i, where the
value is the supplied value. | # LANGUAGE Unsafe #
module Geometry.Matrix.Internal where
import Control.Lens (set)
import Geometry.Vector
import qualified Data.Vector.Fixed as FV
mkRow :: forall d r. (Arity d, Num r) => Int -> r -> Vector d r
mkRow i x = set (FV.element i) x zero
|
3891eae13a9419d979be1d4905d21a7177d0fdea7f104cda1d9fc3e801374e5b | arrdem/blather | user.clj | (ns user)
(defn match [pattern string]
(let [[string & groups] (re-find pattern string)]
{:matched-text string
:groups (into (sorted-map) vector (range 1 Long/MAX_VALUE) groups)}))
| null | https://raw.githubusercontent.com/arrdem/blather/76fc860f26ae2fb7f0d2240da42cf85b0cb1169d/src/dev/clj/user.clj | clojure | (ns user)
(defn match [pattern string]
(let [[string & groups] (re-find pattern string)]
{:matched-text string
:groups (into (sorted-map) vector (range 1 Long/MAX_VALUE) groups)}))
| |
0e74efbcc005ad1248bcf108687a0087f1c962598f0cad7cbb31906fc812247b | ntoronto/drbayes | store.rkt | #lang typed/racket/base
(require racket/list
racket/match
racket/promise
"bottom.rkt"
"store-index.rkt"
"../flonum.rkt"
"../utils.rkt"
"../untyped-utils.rkt")
(provide (all-defined-out))
(struct Store ([random : (Maybe-Promise (U Prob Bad-Prob))]
... | null | https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/private/set/store.rkt | racket | #lang typed/racket/base
(require racket/list
racket/match
racket/promise
"bottom.rkt"
"store-index.rkt"
"../flonum.rkt"
"../utils.rkt"
"../untyped-utils.rkt")
(provide (all-defined-out))
(struct Store ([random : (Maybe-Promise (U Prob Bad-Prob))]
... | |
0f51038a4511c5868dfae47fc48f03659fbd24352294f02b7bdddb1d74bde6bf | BranchTaken/Hemlock | rangeIntf.ml | (** Range interfaces. *)
(** Range limit type. The distinction matters for minimal and maximal ranges. *)
type 'a limit =
* Half - open range limit .
| Incl of 'a (** Full-open range limit. *)
(** Range length type. Maximal full-open ranges may overflow the type being used to express length,
which is encoded as... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/ed397cf3294ca397024e69eb3b1ed5f1db773db6/bootstrap/src/basis/rangeIntf.ml | ocaml | * Range interfaces.
* Range limit type. The distinction matters for minimal and maximal ranges.
* Full-open range limit.
* Range length type. Maximal full-open ranges may overflow the type being used to express length,
which is encoded as [Overflow]. Furthermore the `nat` type may have infinite range length, whi... |
type 'a limit =
* Half - open range limit .
type 'a length =
| Overflow
| Length of 'a
module type SRange = sig
type t
type elm
type limit
type length
val ( =:< ): elm -> elm -> t
* [ base = : < past ] initializes a half - open range , i.e [ \[base .. past ) ] . No constraint is assumed
reg... |
dce5db32798b8d4dd5430648819dad92c0e8eec2023ce5abf92055984698e70e | seckcoder/iu_c311 | graph.rkt | #lang racket
(provide anon-vtx
wset-by-v
vs
cyclic->acyclic
make-graph
+bundle
bundle
bundle?
pr-graph
empty-visited
visited?
extend-visited
bdl-by-v
)
(define (union g vs)
(let ((vs-list vs)
... | null | https://raw.githubusercontent.com/seckcoder/iu_c311/a1215983b6ab08df32058ef1e089cb294419e567/racket/compiler/demos/parser/graph.rkt | racket | replace
v->w
all vtx of g
return an empty graph
v: vertex
wset: connected points
vbset: information for vertex
add a bundle to the graph
if the v:ws is already exist in the graph,
it will try to extend the bundle
if the v:ws is not exist in the graph
it will add a new bundle
O(bundle-num)
simply add the b... | #lang racket
(provide anon-vtx
wset-by-v
vs
cyclic->acyclic
make-graph
+bundle
bundle
bundle?
pr-graph
empty-visited
visited?
extend-visited
bdl-by-v
)
(define (union g vs)
(let ((vs-list vs)
... |
61298060556fb49f144f53a4b59ae6c4f8296df42d93ff8d211d69f91765fffb | imitator-model-checker/imitator | TypeConstraintResolver.mli | open DiscreteType
open FunctionSig
open ParsingStructure
type resolved_constraint =
| Resolved_type_constraint of DiscreteType.var_type_discrete
| Resolved_length_constraint of int
val string_of_resolved_constraints : (constraint_name * resolved_constraint) list -> string
val resolve_constraints : variable_in... | null | https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/TypeConstraintResolver.mli | ocaml | open DiscreteType
open FunctionSig
open ParsingStructure
type resolved_constraint =
| Resolved_type_constraint of DiscreteType.var_type_discrete
| Resolved_length_constraint of int
val string_of_resolved_constraints : (constraint_name * resolved_constraint) list -> string
val resolve_constraints : variable_in... | |
6469d8f411e7f5d6aeb0c62f6161e0b69a14821e08d55fdb5845d6d487f81619 | emilaxelsson/dino | Dino.hs | -- | The Dino language
--
Dino is a tagless embedded DSL for numeric simple calculations .
module Dino
( module Dino.Prelude
, module Dino.Types
, module Dino.Expression
) where
import Dino.Prelude
import Dino.Types
import Dino.Expression
import Dino.Interpretation ()
| null | https://raw.githubusercontent.com/emilaxelsson/dino/3b3115a7fd694cbc3d4fca4d61b0166f4707173f/src/Dino.hs | haskell | | The Dino language
| Dino is a tagless embedded DSL for numeric simple calculations .
module Dino
( module Dino.Prelude
, module Dino.Types
, module Dino.Expression
) where
import Dino.Prelude
import Dino.Types
import Dino.Expression
import Dino.Interpretation ()
|
bf101d14543c0ed318a2bbbbdee54f9c4bf1bde7ccd2745d9b3a111e4b756d9f | Vaguery/klapaucius | vectorized_test.clj | (ns push.type.extra.vectorized_test
(:require [push.type.item.scalar :as s]
[push.type.item.string :as string]
[push.type.item.char :as char]
[push.type.item.complex :as cplx])
(:use midje.sweet)
(:require [push.type.core :as core])
(:use [push.util.test-helpers])
(:use [pu... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/test/push/type/extra/vectorized_test.clj | clojure | it's generic | (ns push.type.extra.vectorized_test
(:require [push.type.item.scalar :as s]
[push.type.item.string :as string]
[push.type.item.char :as char]
[push.type.item.complex :as cplx])
(:use midje.sweet)
(:require [push.type.core :as core])
(:use [push.util.test-helpers])
(:use [pu... |
98ad2da6ea17ed387ed74fb768045bb59a28ef2c04bf3ae3a5e5c610ec9db75a | pkamenarsky/synchron | DOM.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Replica.DOM where
import Control.Applicative (empty)
import Control... | null | https://raw.githubusercontent.com/pkamenarsky/synchron/8fa21f586b974da830c202b58a46a652176a6933/src/Replica/DOM.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
putStrLn (BC.unpack $ A.encode html)
| -US/docs/Web/HTML/Element/div
| -US/docs/Web/HTML/Element/table
| -US/docs/Web/HTML/Element/thead
| -US/docs/Web/HTML/Element/tbody
| -US/docs/Web/HTML/... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
module Replica.DOM where
import Control.Applicative (empty)
import Control.Concurrent (newEmptyMVar, modifyMVar, newMVar, putMVar, takeMVar)
import Control.Monad (void)
import ... |
8353e8f7888ad9ae45c9fe281b423fb584d3d5039c91ec6a2456a69cc92dd020 | 5HT/ant | Bitmap.ml |
type bitmap =
{
bm_width : int;
bm_height : int;
bm_bytes_per_row : int;
bm_data : string
};
value make width height =
{
bm_width = width;
bm_height = height;
bm_bytes_per_row = (width + 7) / 8;
bm_data = String.make (((width + 7) / 8) * height) '\000'
}... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Runtime/Bitmap.ml | ocaml |
type bitmap =
{
bm_width : int;
bm_height : int;
bm_bytes_per_row : int;
bm_data : string
};
value make width height =
{
bm_width = width;
bm_height = height;
bm_bytes_per_row = (width + 7) / 8;
bm_data = String.make (((width + 7) / 8) * height) '\000'
}... | |
74de9111955cab71b37cf4c2db92fe7c51485cb4fb094e137c57a6eb54876e62 | reborg/parallel | core_test.clj | (ns core-test
(:import [clojure.lang RT]
[java.io File]
[java.util.concurrent ConcurrentLinkedQueue])
(:require [parallel.core :as p]
[clojure.core.reducers :as r]
[clojure.test :refer :all]))
(deftest frequencies-test
(testing "frequencies with xform"
(is (= 500... | null | https://raw.githubusercontent.com/reborg/parallel/7fde6e48e49455f213c435239c35d31c60e08948/test/core_test.clj | clojure | (int (/ 100000 (Math/pow 2 8))) | (ns core-test
(:import [clojure.lang RT]
[java.io File]
[java.util.concurrent ConcurrentLinkedQueue])
(:require [parallel.core :as p]
[clojure.core.reducers :as r]
[clojure.test :refer :all]))
(deftest frequencies-test
(testing "frequencies with xform"
(is (= 500... |
7b7878e5f27719d6c7c088156cefa68532096872817033daffa9d1ee7faae5c7 | ChrisPenner/lens-regex-pcre | Spec.hs | import Test.Hspec
import Text
import ByteString
main :: IO ()
main = hspec $ do
describe "text" Text.spec
describe "bytestring" ByteString.spec
| null | https://raw.githubusercontent.com/ChrisPenner/lens-regex-pcre/c7587b825f8ab788720d88cbafab72cc72690802/test/Spec.hs | haskell | import Test.Hspec
import Text
import ByteString
main :: IO ()
main = hspec $ do
describe "text" Text.spec
describe "bytestring" ByteString.spec
| |
18143ce605ce1d24ff1df50ce71e88a895d0485a9178a957fed269fb1dd42caa | mhkoji/Senn | lib.lisp | (defpackage :senn.t.win.lib
(:use :cl)
(:export :make-ime))
(in-package :senn.t.win.lib)
(defmacro make-ime (&key test)
`(progn
(senn.lib.win:init (merge-pathnames
"t/kkc-engine-today.py"
(asdf:system-source-directory :senn)))
(unwind-protect
... | null | https://raw.githubusercontent.com/mhkoji/Senn/30f930e14a80796621ca4faa8ca3b1794f8a4d9f/senn/t/win/lib.lisp | lisp | (defpackage :senn.t.win.lib
(:use :cl)
(:export :make-ime))
(in-package :senn.t.win.lib)
(defmacro make-ime (&key test)
`(progn
(senn.lib.win:init (merge-pathnames
"t/kkc-engine-today.py"
(asdf:system-source-directory :senn)))
(unwind-protect
... | |
439466afc7a825d2ffa92e018825ff02a466a1173aa0c6e1c854384cc103e078 | cedlemo/OCaml-GI-ctypes-bindings-generator | Target_entry.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Target_entry"
let f_target = field t_typ "target" (string)
let f_flags = field t_typ "flags" (uint32_t)
let f_info = field t_typ "info" (uint32_t)
let _ = seal t_typ
let create =
foreign "gtk_target_entry_new" (string @-> uint32_t @-> uint32_... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Target_entry.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Target_entry"
let f_target = field t_typ "target" (string)
let f_flags = field t_typ "flags" (uint32_t)
let f_info = field t_typ "info" (uint32_t)
let _ = seal t_typ
let create =
foreign "gtk_target_entry_new" (string @-> uint32_t @-> uint32_... | |
0bd7b3a5ec9c65bf13e3d983ece1f3b04061bf9b47ed5ffc6532b69e262a6ecc | Javran/advent-of-code | Day25.hs | module Javran.AdventOfCode.Y2018.Day25 (
) where
import Control.Monad
import Control.Monad.ST
import qualified Data.Vector as V
import Javran.AdventOfCode.Prelude
import qualified Javran.AdventOfCode.UnionFind.ST as UF
import Text.ParserCombinators.ReadP hiding (count, get, many)
data Day25 deriving (Generic)
type... | null | https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2018/Day25.hs | haskell | module Javran.AdventOfCode.Y2018.Day25 (
) where
import Control.Monad
import Control.Monad.ST
import qualified Data.Vector as V
import Javran.AdventOfCode.Prelude
import qualified Javran.AdventOfCode.UnionFind.ST as UF
import Text.ParserCombinators.ReadP hiding (count, get, many)
data Day25 deriving (Generic)
type... | |
6b6cbcd1279689698b14e4711e4188a7a2bd1b7585a7f4c28a691bba1e0f6250 | status-im/extensions-fiddle | ethereum.cljs | (ns react-native-web.ethereum
(:require [re-frame.core :as re-frame]
[status-im.abi-spec :as abi-spec]))
(defn rpc-args [method params from]
{:method method
:params params
:from from})
(defn parse-call-result [o outputs]
(let [result (get (js->clj o) "result")]
(cond
(= "0x" result... | null | https://raw.githubusercontent.com/status-im/extensions-fiddle/3f3544e90ff0ecdb1dfd051886b5a5f28e506b0b/src/react_native_web/ethereum.cljs | clojure | (ns react-native-web.ethereum
(:require [re-frame.core :as re-frame]
[status-im.abi-spec :as abi-spec]))
(defn rpc-args [method params from]
{:method method
:params params
:from from})
(defn parse-call-result [o outputs]
(let [result (get (js->clj o) "result")]
(cond
(= "0x" result... | |
73fae42e17d71953700f835cba319f454f778d22fe4ba0fd912e312c6748cf03 | karlhof26/gimp-scheme | make-rotationally-seamless.scm | ; make-rotationally-seamless.scm
; version 1.1
;
This is Script - Fu program written for GIMP 2.8 .
;
; Updated for Gimp-2.10.20
;
; Its purpose is to help create texture images that can not only be tiled
; through translation, but also when combined with flipping and rotation. It
works by taking one hal... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/a8de87a29db39337929b22eb4f81345f91765f55/make-rotationally-seamless.scm | scheme | make-rotationally-seamless.scm
version 1.1
Updated for Gimp-2.10.20
Its purpose is to help create texture images that can not only be tiled
through translation, but also when combined with flipping and rotation. It
other edges. It leaves the original image as a layer underneath so you can
fine tune ... | This is Script - Fu program written for GIMP 2.8 .
works by taking one half of one side and flipping and rotating it around the
Copyright 2015
you may not use this file except in compliance with the License .
distributed under the License is distributed on an " AS IS " BASIS ,
(define (script-fu... |
d28d7ec2a52b078a7176949f96e11012767be835ac79ebc512c9afc9c71a8100 | dnadales/sandbox | Transaction.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE OverloadedLists #
{-# LANGUAGE TypeOperators #-}
module ChimericLedgers.Transaction where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Word (Word32)
import ... | null | https://raw.githubusercontent.com/dnadales/sandbox/401c4f0fac5f8044fb6e2e443bacddce6f135b4b/chimeric-ledgers/src/ChimericLedgers/Transaction.hs | haskell | # LANGUAGE TypeOperators #
| @hash c@ is (should be) the cryptographic collision-resistant hash of
| Id of the previous transaction to which this input refers.
| Index within the transaction referred by 'tid' that refers to the
output that should be spent.
| Address that owns the value.
>@) :: Value ... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE OverloadedLists #
module ChimericLedgers.Transaction where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Word (Word32)
import ChimericLedgers.Address
import ... |
fab499fddf055395102e334d6d0deb324464f32e9d937ca5bc115fb75f79185e | heshrobe/joshua-dist | noisy-or-nodes.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : Ideal ; Base : 10 -*-
(in-package :ideal)
;;;;********************************************************
Copyright ( c ) 1989 , 1992 Rockwell International -- All rights reserved .
Rockwell International Science Center Palo Alto Lab
;;;;*******************... | null | https://raw.githubusercontent.com/heshrobe/joshua-dist/f59f06303f9fabef3e945a920cf9a26d9c2fd55e/ideal/code/noisy-or-nodes.lisp | lisp | Syntax : Common - Lisp ; Package : Ideal ; Base : 10 -*-
********************************************************
********************************************************
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
-----------------------------------------------------------------------------------------
---------- ABSTRA... |
(in-package :ideal)
Copyright ( c ) 1989 , 1992 Rockwell International -- All rights reserved .
Rockwell International Science Center Palo Alto Lab
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(NOISY-OR-NODE-P
NOISY-OR-SUBTYPE
CONVERT-NOISY-OR-NODE-TO-CHANCE-NODE... |
a66711a1e6637f548ea867952ca5854e7a4515cf10421f3ddbcca2bcf33a3758 | jserot/caph | arrays.ml | (************************************************************************************)
(* *)
(* CAPH *)
(* -bpclermont.fr ... | null | https://raw.githubusercontent.com/jserot/caph/2b3b241f0c32aa4fcaf60d4b8529956cca8aa6b1/compiler/arrays.ml | ocaml | **********************************************************************************
CAPH
-bpclermont.fr
... |
Copyright 2011 - 2019 . All rights reserved .
This file is distributed under the terms of the Q Public License version 1.0 .
module Array1 = struct
type 'a t = 'a array
exception Invalid_index of int
exception Invalid_size
let make n v ... |
73a4c000e7edcbb98565516f7d47e6911343c1da0d3c4100401423b72583d69c | PapenfussLab/bioshake | BWA.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
# LANGUAGE ViewPat... | null | https://raw.githubusercontent.com/PapenfussLab/bioshake/afeb7219b171e242b6e9bb9e99e2f80c0a099aff/Bioshake/Internal/BWA.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators # | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ViewPatterns #
module Bioshake.Internal.BWA where
import Bioshake hiding (C)
import Bioshake.TH
import Control.Monad.Trans (lift)
import... |
59f63ba77c0d6a42b2d03d7c7f32dae23dbdfdedc8e9ac64a9c677f82b680dd6 | winny-/aoc | day14-original.rkt | #lang debug racket
(require memo)
(struct Input (polymer insertions) #:transparent)
(define (read2 [ip (current-input-port)])
(let loop ([template #f] [insertions (hash)])
(match (read-line ip)
[(? eof-object? e) (Input template insertions)]
["" (loop template insertions)]
[(regexp "^[A-Z]+$"... | null | https://raw.githubusercontent.com/winny-/aoc/fb8a3b9452224e6de1adcee8e2aecabda771345b/2021/day14/day14-original.rkt | racket | (printf "~a: ~a\n" n poylmer)
Local Variables:
compile-command: "racket day14.rkt < sample.txt"
End: | #lang debug racket
(require memo)
(struct Input (polymer insertions) #:transparent)
(define (read2 [ip (current-input-port)])
(let loop ([template #f] [insertions (hash)])
(match (read-line ip)
[(? eof-object? e) (Input template insertions)]
["" (loop template insertions)]
[(regexp "^[A-Z]+$"... |
2f49b55c790335424a6a176f992fbcb70d9b9bd42b4d82a60e26217275cfd6d4 | chrovis/cljam | bed.clj | (ns cljam.io.bed
"Functions to read and write the BED (Browser Extensible Data) format. See
#format1 for the detail BED specifications."
(:require [clojure.java.io :as cio]
[clojure.string :as cstr]
[proton.core :refer [as-long]]
[cljam.io.protocols :as protocols]
[... | null | https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/src/cljam/io/bed.clj | clojure | The chromEnd base is not included in the display of the feature.
Lower-numbered fields must be populated if higher-numbered fields are used.
Blocks may not overlap.
The chromEnd base is not included in the display of the feature.
Lower-numbered fields must be populated if higher-numbered fields are used.
Blocks m... | (ns cljam.io.bed
"Functions to read and write the BED (Browser Extensible Data) format. See
#format1 for the detail BED specifications."
(:require [clojure.java.io :as cio]
[clojure.string :as cstr]
[proton.core :refer [as-long]]
[cljam.io.protocols :as protocols]
[... |
277411c78a1bbea173e861d2cf64c26acabf1cdccd45c9a2197e85ccb7fb97e7 | mikeball/foundation | reading.clj | (ns taoclj.foundation.reading
(:require [taoclj.foundation.naming :refer [from-db-name]]
[cheshire.core :as cheshire])
(:import [java.sql Types]))
; *** result set readers *********************
; array conversions
(def type-int-array (Class/forName "[I"))
(def type-string-array (Class/forName "[Lja... | null | https://raw.githubusercontent.com/mikeball/foundation/a0376f49759b1552f2f70e7585029b592b6fb346/src/taoclj/foundation/reading.clj | clojure | *** result set readers *********************
array conversions
left off need to add support for all array types
also get type only once, use let block
top-level-list
convert sub-arrays
break out function for perf
break out function for perf | (ns taoclj.foundation.reading
(:require [taoclj.foundation.naming :refer [from-db-name]]
[cheshire.core :as cheshire])
(:import [java.sql Types]))
(def type-int-array (Class/forName "[I"))
(def type-string-array (Class/forName "[Ljava.lang.String;"))
(defn is-array? [item]
(or (= type-string-ar... |
6209d5bac836b73db39973917dcef859bfafed94a7dfc566d8f94be1d306e4a9 | emotiq/emotiq | socket-actors-test.lisp | ;;; socket-actor-test.lisp
;;; Tests of actor sockets, without gossip
(ql:quickload :gossip)
(in-package :gossip)
(defparameter *server-address* "localhost")
;(defparameter *server-address* "ec2-35-157-133-208.eu-central-1.compute.amazonaws.com")
(defun setup-server ()
; Start listener socket thread
(start-goss... | null | https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/gossip/attic/socket-actors-test.lisp | lisp | socket-actor-test.lisp
Tests of actor sockets, without gossip
(defparameter *server-address* "ec2-35-157-133-208.eu-central-1.compute.amazonaws.com")
Start listener socket thread
(trace ac:send)
(loopback-server)
Start listener socket thread
(test-sa-client1) ; should return (<some actor> "FooGOO")
(test-sa-cli... |
(ql:quickload :gossip)
(in-package :gossip)
(defparameter *server-address* "localhost")
(defun setup-server ()
(start-gossip-server :TCP))
(defparameter *stop-loopback* nil)
(defun loopback-server ()
"Wait for an object to appear -- from anywhere -- and echo it."
(setup-server)
(setf *stop-loopback* nil)
... |
8a57a9f71587acf51580e160eb4a47e10f367ea140aa44637b2189dfdf0e3960 | jbclements/sxml | ssax.rkt | #lang racket/base
(require "myenv.rkt")
(require "util.rkt")
(require "parse-error.rkt")
(require "input-parse.rkt")
(require "SSAX-code.rkt")
(require "SXML-tree-trans.rkt")
(require "sxpathlib.rkt")
(require "access-remote.rkt")
(require "id.rkt")
(require "xlink-parser.rkt")
(require "ssax-prim.rkt")
(require "mult... | null | https://raw.githubusercontent.com/jbclements/sxml/d3b8570cf7287c4e06636e17634f0f5c39203d52/sxml/ssax/ssax.rkt | racket | #lang racket/base
(require "myenv.rkt")
(require "util.rkt")
(require "parse-error.rkt")
(require "input-parse.rkt")
(require "SSAX-code.rkt")
(require "SXML-tree-trans.rkt")
(require "sxpathlib.rkt")
(require "access-remote.rkt")
(require "id.rkt")
(require "xlink-parser.rkt")
(require "ssax-prim.rkt")
(require "mult... | |
e6b3d9ee86e8199892e2c9a5f29816f2a387b7fa4068b4cbcc309c378254802f | richhickey/rdfm | rdfm.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/richhickey/rdfm/d3adeb5f0eb9438d52cc5d1008c3b6163f3a2bc1/src/org/clojure/rdfm.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 org.clojure.rdfm
(:refer-clojure :exclude [assoc dissoc])
(:import
(java.util UUID)
(javax.xml.datatype DatatypeFactory XMLGregorianCalendar)
(org.openrdf.repository Repository RepositoryConnection)
(org.openrdf.model Literal Resource Statement URI Val... |
d67a41e1d4710693fa0d76c9bdeedb629d3111a110d404ac1847bfda7b434c5f | input-output-hk/ouroboros-network | LeaderSchedule.hs | {-# LANGUAGE NamedFieldPuns #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Test.ThreadNet.LeaderSchedule (tests) where
import Control.Monad (replicateM)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Test.QuickCheck
import ... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/54cd34e68afafe957feef485ceaee3171efb0693/ouroboros-consensus-mock-test/test/Test/ThreadNet/LeaderSchedule.hs | haskell | # LANGUAGE NamedFieldPuns #
^ Note: we don't think this value actually matters, since this test
overrides the leader schedule.
TODO shrink
this is entirely ignored because of the 'WithLeaderSchedule' combinator
------------------------------------------------------------------------------
Dependent generation a... | # LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Test.ThreadNet.LeaderSchedule (tests) where
import Control.Monad (replicateM)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Test.QuickCheck
import Test.Tasty
import Test... |
8d69ade7b7d5684b05150c1702ecede12098a62abbf2f1bc1f0cc3116b221af1 | unnohideyuki/bunny | sample306.hs | x = 1.0 :: Float
y = 2.0 :: Float
z = 0.0 :: Float
t = 10.0 :: Float
main = do print $ succ (2.3 :: Float)
print $ pred (2.3 :: Float)
print $ (toEnum 3 :: Float)
print $ fromEnum (2.3 :: Float)
print $ take 10 $ [x..]
print $ take 10 $ [y, x ..]
print $ [z .... | null | https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample306.hs | haskell | x = 1.0 :: Float
y = 2.0 :: Float
z = 0.0 :: Float
t = 10.0 :: Float
main = do print $ succ (2.3 :: Float)
print $ pred (2.3 :: Float)
print $ (toEnum 3 :: Float)
print $ fromEnum (2.3 :: Float)
print $ take 10 $ [x..]
print $ take 10 $ [y, x ..]
print $ [z .... | |
740cc8ee3edcd80079b55c96b4271dbe8576195e2b9f40e9dac4b75a9c41578b | dwayne/eopl3 | ex2.9.rkt | #lang racket
Exercise 2.9
;;
;; Add an observer called has-binding? and
;; implement it using the a-list representation.
(define (empty-env)
'())
(define (empty-env? env)
(null? env))
(define (extend-env var val env)
(cons (cons var val) env))
(define (apply-env env search-var)
(if (empty-env? env)
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/02-ch2/racket/ex2.9.rkt | racket |
Add an observer called has-binding? and
implement it using the a-list representation. | #lang racket
Exercise 2.9
(define (empty-env)
'())
(define (empty-env? env)
(null? env))
(define (extend-env var val env)
(cons (cons var val) env))
(define (apply-env env search-var)
(if (empty-env? env)
(error 'apply-env "No binding for ~s" search-var)
(let ([saved-var (caar env)])
... |
aa29b4dc0bb736c17112bb91e6493b2159489999cfecb1bb84234db45830ba13 | emina/rosette | install.rkt | #lang racket/base
;; Check whether z3 is installed during package setup.
;; If missing, builds & links a z3 binary.
(provide pre-installer post-installer)
(require racket/match
racket/file
racket/port
net/url
file/unzip)
We need to run the Z3 installer as a pre - install step ... | null | https://raw.githubusercontent.com/emina/rosette/ec1a0db46455e289de0f5802ff6bfc04cd32f5c0/rosette/private/install.rkt | racket | Check whether z3 is installed during package setup.
If missing, builds & links a z3 binary.
the build that its output gets pushed off screen by the later steps. So we
use this little hack to repeat the failure message as a post-install step,
which happens at the very end of the install and so makes the error messa... | #lang racket/base
(provide pre-installer post-installer)
(require racket/match
racket/file
racket/port
net/url
file/unzip)
We need to run the Z3 installer as a pre - install step , because building the
documentation relies on Z3 being available . But pre - install is so earl... |
9e9d5775c04a9d2f1d4e20628333b57dd8e70cd0fcd1b3e2bcbe351b5e99cb6e | fp-works/2019-winter-Haskell-school | Exercise01Spec.hs | module CIS194.Homework01.Exercise01Spec where
import CIS194.Homework01.Exercise01
import Test.Tasty.Hspec
spec_toDigits :: Spec
spec_toDigits = do
it "returns an expected list for a negative integer" $
toDigits (-123) `shouldBe` [1..3]
it "returns [0] for 0" $
toDigits 0 `shouldBe` [0]
it "returns a... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week1/daniel-deng/test/CIS194/Homework01/Exercise01Spec.hs | haskell | module CIS194.Homework01.Exercise01Spec where
import CIS194.Homework01.Exercise01
import Test.Tasty.Hspec
spec_toDigits :: Spec
spec_toDigits = do
it "returns an expected list for a negative integer" $
toDigits (-123) `shouldBe` [1..3]
it "returns [0] for 0" $
toDigits 0 `shouldBe` [0]
it "returns a... | |
6a7bd843572fb70b007160131830ecc31d314599a8b22508e47fe30c973fe463 | byorgey/AoC | 24.hs | -- I ultimately solved day 24 by hand, but used the code in this
-- module to help me explore!
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TupleSections #
import ... | null | https://raw.githubusercontent.com/byorgey/AoC/1789a50667dacbe3aeac5c33d12463ba4da5ea71/2021/24/24.hs | haskell | I ultimately solved day 24 by hand, but used the code in this
module to help me explore!
# LANGUAGE DeriveDataTypeable #
# LANGUAGE PatternSynonyms #
# LANGUAGE TemplateHaskell #
----------------------------------------------------------
----------------------------------------------------------
---------------... |
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
import Control.Applicative (many, (<|>))
import Control.Arrow ((>>>))
import Control.Lens
import Control.Monad.Reader (ReaderT, ask, runReaderT)
import ... |
b78ee8787b7cc3e21bc3d6a8b5ae8d544dd1c529ea4262689f7bf028fb185809 | jacekschae/learn-pedestal-course-files | account.clj | (ns cheffy.account
(:require [cheffy.components.auth :as auth]
[ring.util.response :as rr]
[io.pedestal.http :as http]
[io.pedestal.http.body-params :as bp]
[cheffy.interceptors :as interceptors]
[io.pedestal.interceptor.chain :as chain]))
(def sign-up-inte... | null | https://raw.githubusercontent.com/jacekschae/learn-pedestal-course-files/30666cbb8b3662444e16e7fc9ebe65795d7eb7a4/increments/59-confirm-account/src/main/cheffy/account.clj | clojure | (ns cheffy.account
(:require [cheffy.components.auth :as auth]
[ring.util.response :as rr]
[io.pedestal.http :as http]
[io.pedestal.http.body-params :as bp]
[cheffy.interceptors :as interceptors]
[io.pedestal.interceptor.chain :as chain]))
(def sign-up-inte... | |
e03716089b0c24f4e8dd0d5be594d378441806bd6e423bd1cdd6362bca72d86b | epicallan/hreq | HasRequest.hs | | This module provides a ' HasRequest ' class that Interprets
-- a 'ReqContent' type level list into 'Request' data
--
{-# LANGUAGE PatternSynonyms #-}
module Hreq.Core.Client.HasRequest where
import Prelude ()
import Prelude.Compat
import Data.Kind
import Data.Hlist
import Data.Proxy
import Data.Singletons
im... | null | https://raw.githubusercontent.com/epicallan/hreq/f12fcb9b9dd1ad903c6b36a8cf850edb213d4792/hreq-core/src/Hreq/Core/Client/HasRequest.hs | haskell | a 'ReqContent' type level list into 'Request' data
# LANGUAGE PatternSynonyms #
and a 'Verb'.
@reqComponents@ is a usually a 'ReqContent Type' type level list.
It can be something else.
------------------------------------------------------------------------------
Helper functions
------------------------... | | This module provides a ' HasRequest ' class that Interprets
module Hreq.Core.Client.HasRequest where
import Prelude ()
import Prelude.Compat
import Data.Kind
import Data.Hlist
import Data.Proxy
import Data.Singletons
import GHC.TypeLits
import Data.String (fromString)
import Data.String.Conversions (cs)
import Da... |
a9e399bba8a7d65157bc24cc8cb5e0ac6b72ec80fa982b95989f7f77cf8990e8 | erlang/otp | asn1_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2001 - 2022 . All Rights Reserved .
%%
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 applicab... | null | https://raw.githubusercontent.com/erlang/otp/63abc6807d9998e8c44bc86cc673912b539ac397/lib/asn1/test/asn1_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2001 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Purpose : Test suite for the ASN.1 application
-module(asn1_SUITE).
-define(NO_MAPS_MODULE, asn1_test_lib_no_maps... |
f16e0c3431a65b21ada299dd6e103017edae0579783d6bd4e5508bb3c60b5205 | ocaml-multicore/tezos | injection.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_011_PtHangz2/lib_client/injection.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2018 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WIT... |
1637fab8566ecf5319561cbf2d92fceb96a44572d7c10d8afb17cd5eee714e87 | webyrd/cool-relational-interpreter-examples | variadic-lambda-tests.scm | ;; The version of the relational interpreter in
;; 'interp-with-variadic-lambda.scm' supports 'apply', variadic
;; 'lambda'/application, multi-argument 'lambda'/application, and a
;; fair number of built-ins, such as 'quote', 'list', and 'cons'.
;;
;; Importantly, 'apply' has been moved towards the top of the 'conde'
;... | null | https://raw.githubusercontent.com/webyrd/cool-relational-interpreter-examples/c68d261279a301d6dae11ac1e2827a3a619af017/append/variadic-lambda-tests.scm | scheme | The version of the relational interpreter in
'interp-with-variadic-lambda.scm' supports 'apply', variadic
'lambda'/application, multi-argument 'lambda'/application, and a
fair number of built-ins, such as 'quote', 'list', and 'cons'.
Importantly, 'apply' has been moved towards the top of the 'conde'
in 'eval-exp... | (load "interp-with-variadic-lambda.scm")
(load "../mk/test-check.scm")
(load "../mk/matche.scm")
(define member? (lambda (x ls) (not (not (member x ls)))))
(let ()
(define append
(lambda (l s)
(cond
((null? l) s)
(else (cons (car l) (append (cdr l) s))))))
(test "Scheme append-1"
... |
89b46d81f2d8866aef22942e06420b9caa2dffa3706310901a2cd65602876d99 | dakrone/clojure-opennlp | treebank.clj | (ns opennlp.test.treebank
(:use [opennlp.treebank])
(:use [clojure.test])
(:use [opennlp.nlp :only [make-tokenizer make-pos-tagger]])
(:import [java.io File FileNotFoundException]))
(def tokenize (make-tokenizer "models/en-token.bin"))
(def pos-tag (make-pos-tagger "models/en-pos-maxent.bin"))
(def chunker (ma... | null | https://raw.githubusercontent.com/dakrone/clojure-opennlp/17627c13fe261e62e6c7ff0521fba2b6d92ec091/test/opennlp/test/treebank.clj | clojure | (ns opennlp.test.treebank
(:use [opennlp.treebank])
(:use [clojure.test])
(:use [opennlp.nlp :only [make-tokenizer make-pos-tagger]])
(:import [java.io File FileNotFoundException]))
(def tokenize (make-tokenizer "models/en-token.bin"))
(def pos-tag (make-pos-tagger "models/en-pos-maxent.bin"))
(def chunker (ma... | |
15653f23be7189cc9dfffa6e1a4f12ce8721dad4c1ffe633b349f22197aea5ab | faylang/fay | DoLet2.hs | module DoLet2 where
import FFI
main = do
print 1
let [a,b] = [3]
print a
| null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/DoLet2.hs | haskell | module DoLet2 where
import FFI
main = do
print 1
let [a,b] = [3]
print a
| |
eb04bbe5069c8d86a5326e2a1ed10bb47a823a0060ee0beca9afc0f31e5527c0 | tnelson/Forge | blah.rkt | #lang forge
sig Elem {}
pred main {
some Elem * Elem -> Elem
}
run main for exactly 2 Elem | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/examples/blah.rkt | racket | #lang forge
sig Elem {}
pred main {
some Elem * Elem -> Elem
}
run main for exactly 2 Elem | |
0d631efb5faf4e3377e702d627d75b2d9e8738ef5542d15fca46277b9d059196 | c-cube/ocaml-containers | CCMap.ml | (* This file is free software, part of containers. See file "license" for more details. *)
(** {1 Extensions of Standard Map} *)
type 'a iter = ('a -> unit) -> unit
type 'a printer = Format.formatter -> 'a -> unit
module type OrderedType = Map.OrderedType
module type S = sig
include Map.S
val get : key -> 'a t... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/core/CCMap.ml | ocaml | This file is free software, part of containers. See file "license" for more details.
* {1 Extensions of Standard Map}
* [get k m] returns [Some v] if the current binding of [k] in [m] is [v],
or [None] if the key [k] is not present.
Safe version of {!find}.
* [update k f m] calls [f (Some v)] if [find k... |
type 'a iter = ('a -> unit) -> unit
type 'a printer = Format.formatter -> 'a -> unit
module type OrderedType = Map.OrderedType
module type S = sig
include Map.S
val get : key -> 'a t -> 'a option
val get_or : key -> 'a t -> default:'a -> 'a
* [ get_or k m ~default ] returns the value associated to [ k ] if ... |
a0b80ce6f4b66f272a6b3e859ff18378d5fc6a8707dc31ee5e7129dc6539e4a1 | chef/chef-server | chef_index_tests.erl | Copyright 2015 Chef Server , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or ... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/chef_index/test/chef_index_tests.erl | erlang |
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
| Copyright 2015 Chef Server , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(chef_index_tes... |
1da35132a4eaac302fcb5828822dc1c9118a51e22625783cc1bc901927a4d8f0 | jaked/orpc | orpc_pp.ml |
* This file is part of orpc , OCaml signature to ONC RPC generator
* Copyright ( C ) 2008 - 9 Skydeck , Inc
* Copyright ( C ) 2010
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free So... | null | https://raw.githubusercontent.com/jaked/orpc/ecb5df8ec928070cd89cf035167fcedf3623ee3c/src/orpc/orpc_pp.ml | ocaml |
* This file is part of orpc , OCaml signature to ONC RPC generator
* Copyright ( C ) 2008 - 9 Skydeck , Inc
* Copyright ( C ) 2010
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free So... | |
741690ff4bc355fc3020f9ab974696d7e0e2df94f6b250a3275f570881a3ee8d | avsm/eeww | odoc_to_text.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/avsm/eeww/4834abb9a40a9f35d0d7041a61e53e3426d8886f/boot/ocaml/ocamldoc/odoc_to_text.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Odoc_info
open Exception
open Type
open Value
open Module
open Class
class virtual info =
object (s... |
44dc00470424d6d6cd081b55adc235e7e24953c441ce0be5fdd378d50e2a5910 | bmeurer/ocaml-experimental | odoc_exception.ml | (***********************************************************************)
(* OCamldoc *)
(* *)
, projet Cristal , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/ocamldoc/odoc_exception.ml | ocaml | *********************************************************************
OCamldoc
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
module Name = Odoc_name
type ex... |
259184278fa3ee44ab50a1051633574353601590f3eff6a049514dbd86e727e5 | clj-easy/graalvm-clojure | main.clj | (ns simple.main
(:require [next.jdbc :as jdbc]
[clojure.string :as str]
[honeysql.core :as sql]
[honeysql.helpers :refer [select insert-into columns values from]])
(:gen-class))
(set! *warn-on-reflection* true)
(def sql-create-table
["CREATE TABLE IF NOT EXISTS graalvm_test... | null | https://raw.githubusercontent.com/clj-easy/graalvm-clojure/5de155ad4f95d5dac97aac1ab3d118400e7d186f/next-jdbc/src/simple/main.clj | clojure | (ns simple.main
(:require [next.jdbc :as jdbc]
[clojure.string :as str]
[honeysql.core :as sql]
[honeysql.helpers :refer [select insert-into columns values from]])
(:gen-class))
(set! *warn-on-reflection* true)
(def sql-create-table
["CREATE TABLE IF NOT EXISTS graalvm_test... | |
36be701dbf1f0988313f984cd2776fe95d83a1adb75f418f9e32c8add413c8f7 | OCamlPro/operf-micro | almabench.ml |
* ALMABENCH 1.0.1
* OCaml version
*
* A number - crunching benchmark designed for cross - language and vendor
* comparisons .
*
* Written by , from versions for
* C++ and java .
*
* No rights reserved . This is public domain software , for use by ... | null | https://raw.githubusercontent.com/OCamlPro/operf-micro/d5d2bf2068204b889321b0c5a7bc0d079c0fca80/share/operf-micro/benchmarks/almabench/almabench.ml | ocaml | number of days to include in test
tables for trigonometric terms to be added to the mean elements
of the semi-major axes.
tables giving the trigonometric terms to be added to the mean elements of
the mean longitudes .
Normalize angle into the range -pi <= A < +pi.
The reference frame is equatorial and is... |
* ALMABENCH 1.0.1
* OCaml version
*
* A number - crunching benchmark designed for cross - language and vendor
* comparisons .
*
* Written by , from versions for
* C++ and java .
*
* No rights reserved . This is public domain software , for use by ... |
552a4f44d4013f9060d352cb4a153f3ccf97c143894b56c8beec3bf1e2c17567 | ghcjs/jsaddle-dom | Node.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.Node
(getRootNode, getRootNode_, hasChildNodes, hasChildNodes_,
normalize, cloneNode, cloneNode_, isEqualNo... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/Node.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/Node.hasChildNodes Mozilla Node.hasChildNodes documentation>
| <-US/docs/Web/API/Node.hasChildNodes Mozilla Node.hasChildNodes documentation>
| <-US/docs/Web/API/Node.normalize Mozilla Node.normalize do... | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.Node
(getRootNode, getRootNode_, hasChildNodes, hasChildNodes_,
normalize, cloneNode, cloneNode_, isEqualNode, isEqualNode_,
isSameNode, isSameNode_, compareDocumentPosition,
compareDocument... |
49935dc80e92a8177df9c01fadb4688ae45211bd6c619fd2693064b794097fb2 | gedge-platform/gedge-platform | rabbit_mgmt_wm_health_check_alarms.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
%% An HTTP API counterpart of 'rabbitmq-diagnosti... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management/src/rabbit_mgmt_wm_health_check_alarms.erl | erlang |
An HTTP API counterpart of 'rabbitmq-diagnostics check_alarms'
-------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_wm_health_check_alarms).
-export([... |
2f5233fbfe4fa9f9a3be98fa74dd0946088cf88e6c20539412aca9f5c97d7f24 | eareese/htdp-exercises | 160-set-add.rkt | #lang htdp/bsl
Exercise 160 . Design the functions set+.L and set+.R , which create a set by adding a number x to some given set s for the left - hand and right - hand data definition , respectively .
A Son . L is one of :
; – empty
– ( cons Number Son . L )
;
; Son is used when it
; applies to Son.L and Son.R
... | null | https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part02-arbitrarily-large-data/160-set-add.rkt | racket | – empty
Son is used when it
applies to Son.L and Son.R
A Son.R is one of:
– empty
Constraint If s is a Son.R,
no number occurs twice in s.
Son
empty set
Number Son -> Son
is x in s
Number Son.L -> Son.L
remove x from s
Number Son.R -> Son.R
remove x from s
Number Son.L -> Son.L
add x to s
Number Son... | #lang htdp/bsl
Exercise 160 . Design the functions set+.L and set+.R , which create a set by adding a number x to some given set s for the left - hand and right - hand data definition , respectively .
A Son . L is one of :
– ( cons Number Son . L )
– ( cons Number Son . R )
Figure 58 : Two data representat... |
89d043a3eb6ef48e1dcbda39b068cc1db6adeadd028e959ab34fba8575d1d799 | diku-dk/futhark | Engine.hs | {-# LANGUAGE Strict #-}
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
-- |
--
-- Perform general rule-based simplification based on data dependency
-- information. This module will:
--
* Perform common - subexpression elimination ( CSE ) .
--
-- * Hoist expressions out of loops (including lambda... | null | https://raw.githubusercontent.com/diku-dk/futhark/174e8d862def6f52d5c9a36fa3aa6e746049776e/src/Futhark/Optimise/Simplify/Engine.hs | haskell | # LANGUAGE Strict #
|
Perform general rule-based simplification based on data dependency
information. This module will:
* Hoist expressions out of loops (including lambdas) and
branches. This is done as aggressively as possible.
* Apply simplification rules (see
If you just want to run the simpli... | # LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
* Perform common - subexpression elimination ( CSE ) .
" Futhark . Optimise . Simplification . Rules " ) .
may prefer to use the " Futhark . Optimise . Simplify " module .
module Futhark.Optimise.Simplify.Engine
* Monadic interface
SimpleM,
... |
9cf71a1aac571d177de4122e1168ff54ee781a514a0b5a86ee5c7883a57c5ef8 | OtpChatBot/Ybot | talker_app_sup.erl | %%%-----------------------------------------------------------------------------
%%% @author 0xAX <>
%%% @doc
Talkerapp transport root supervisor .
%%% @end
%%%-----------------------------------------------------------------------------
-module(talker_app_sup).
-behaviour(supervisor).
%% API
-export([start_link/0,... | null | https://raw.githubusercontent.com/OtpChatBot/Ybot/5ce05fea0eb9001d1c0ff89702729f4c80743872/src/transport/talkerapp/talker_app_sup.erl | erlang | -----------------------------------------------------------------------------
@author 0xAX <>
@doc
@end
-----------------------------------------------------------------------------
API
Supervisor callbacks
===================================================================
API functions
=======================... | Talkerapp transport root supervisor .
-module(talker_app_sup).
-behaviour(supervisor).
-export([start_link/0, start_talkerapp_client/5]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
-spec start_talkerapp_client(Callback :: pid(), BotNick :: binary(), Room ::... |
7bb6f672e4714c08826c42ba31d900e6959fddcca7f94b931018bb048931eecc | jserot/lascar | stringable.mli | (**********************************************************************)
(* *)
LASCAr
(* *)
Copyright ( c ) 2017 - prese... | null | https://raw.githubusercontent.com/jserot/lascar/79bd11cd0d47545bccfc3a3571f37af065915c83/src/utils/stringable.mli | ocaml | ********************************************************************
This source code is licensed under the lic... | LASCAr
Copyright ( c ) 2017 - present , . All rights reserved .
* { 2 String - convertible types }
module type T = sig
type t
val to_string: t -> string
end
module Pair (M1: T) (M2: T) :
sig
include T with type t = M1.t * M2.t
val mk: M1... |
f42fba33bcae704e59ff8511e84b470b6aa047df28aa3106605fdc09f549fbda | cxphoe/SICP-solutions | 2.37.rkt | (load "2.36.rkt")
(define (dot-product v w)
(accumulate + 0 (map * v w)))
(define (matrix-*-vector m v)
(map (lambda (w)
(dot-product v w))
m))
(define (matrix-*-matrix m n)
(let ((cols (transpose n)))
(map (lambda (x)
(matrix-*-vector cols x))
m)))
(define (transpose m... | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%202-Building%20Abstractions%20with%20Data/2.Hierarchical%20Data%20and%20the%20Closure%20Property/2.37.rkt | racket | (load "2.36.rkt")
(define (dot-product v w)
(accumulate + 0 (map * v w)))
(define (matrix-*-vector m v)
(map (lambda (w)
(dot-product v w))
m))
(define (matrix-*-matrix m n)
(let ((cols (transpose n)))
(map (lambda (x)
(matrix-*-vector cols x))
m)))
(define (transpose m... | |
462227394ec0fe62354e72698b112e9b536be69858167f34c7041543495c7a1b | dbuenzli/fmt | fmt.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 The fmt programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... | null | https://raw.githubusercontent.com/dbuenzli/fmt/9db1a3c058973123324e374d751f452a8e434505/src/fmt.ml | ocaml | Errors
Standard outputs
Formatting
Separators
Sequencing
Boxes
Brackets
Stdlib types formatters
there's a newline at the end
x is an integer.
to normalize x.
Stdlib type dumpers
Stdlib types
Sequencing
Stdlib data structures
Magnitudes
No fractional digit
XXX we should get rid of this... | ---------------------------------------------------------------------------
Copyright ( c ) 2014 The fmt programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... |
392c38949e606b3fe3a57797d1774e599cefd8c154831a997a17272ac4719e4b | qfpl/reflex-workshop | Apply.hs | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... | null | https://raw.githubusercontent.com/qfpl/reflex-workshop/244ef13fb4b2e884f455eccc50072e98d1668c9e/src/Workshop/Behaviors/Instances/Apply.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs # | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... |
813c8f40d6ffa578da3bdbeee9453a9c1a2dcadbca322c59d46dc79cf289d803 | skanev/playground | 23.scm | EOPL exercise 3.23
;
; What is the value of the following PROC program?
;
let = proc ( maker )
; proc (x)
if )
; then 0
else -(((maker maker ) -(x , 1 ) ) , -4 )
in let times4 = proc ( x ) ( ( makemult ) x )
in ( times4 3... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/03/23.scm | scheme |
What is the value of the following PROC program?
proc (x)
then 0
Use tricks of this program to write a procedure for factorial in PROC. As a
of its procedures suggest. | EOPL exercise 3.23
let = proc ( maker )
if )
else -(((maker maker ) -(x , 1 ) ) , -4 )
in let times4 = proc ( x ) ( ( makemult ) x )
in ( times4 3 )
hint , remember that you can use currying ( exercise 3.20 ) to define a
two - argument procedure times .
... |
5893861df5a84eff7efb038576df0421d47fedc043a767d837c2f63d44b9d2b1 | picty/parsifal | struct-0d.ml | struct s = {
x : uint8;
parse_field y : copy(x+1);
}
| null | https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/syntax/unit/struct-0d.ml | ocaml | struct s = {
x : uint8;
parse_field y : copy(x+1);
}
| |
943e695a562764e02f95af6f5435dbe3cb7b18115249f954ec91dcb82887bd60 | MastodonC/kixi.hecuba | calculated_fields.clj | (ns kixi.hecuba.data.calculated-fields
"Calcualated fields."
(:require [kixi.hecuba.storage.db :as db]
[qbits.hayt :as hayt]
[clojure.tools.logging :as log]
[clojure.string :as string]
[clj-time.core :as... | null | https://raw.githubusercontent.com/MastodonC/kixi.hecuba/467400bbe670e74420a2711f7d49e869ab2b3e21/src/clj/kixi/hecuba/data/calculated_fields.clj | clojure | (ns kixi.hecuba.data.calculated-fields
"Calcualated fields."
(:require [kixi.hecuba.storage.db :as db]
[qbits.hayt :as hayt]
[clojure.tools.logging :as log]
[clojure.string :as string]
[clj-time.core :as... | |
cac0edf99399f4d2ec30a29d3dee8baca20c1e1fa5ee85d50f4a6d47e79af9b1 | GaloisInc/pate | SimulatorHooks.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE ImplicitParams #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE ViewPatterns #
-- | Modified crucible extension evaluators for the InlineCallee symbolic execution
--
-- The goal of these ... | null | https://raw.githubusercontent.com/GaloisInc/pate/daa961af333c1e5a62391a45e679cbdae9798ed5/src/Pate/Verification/SimulatorHooks.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| Modified crucible extension evaluators for the InlineCallee symbolic execution
The goal of these overrides is to concretize as much as we can eagerly to
improve the performance of the memory model during symbolic execution. Many
code constructs lead to symbolic writes,... | # LANGUAGE DataKinds #
# LANGUAGE ImplicitParams #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE ViewPatterns #
concrete ( if you ask the SMT solver for a model , there will only be one ) . We
module Pate.Verification.SimulatorHooks (
hookedMacawExtensions
) wher... |
d9dead01d23e82e74aacd4f242b32d4930dea9afae6fcdb631f0948255f425dc | korya/efuns | sound.ml | (***********************************************************************)
(* *)
(* ____ *)
(* *)
Fabrice Le Fessa... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/gwml/no_esd/sound.ml | ocaml | *********************************************************************
____
... | Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
type sound = string
open Options
let use_sound = define_option ["use_sound"]
"<use_sound> is tr... |
0510c3f090fce44e938ec746ad637526aa6963331cc0971fc3cdd9ec99ef012d | cwmaguire/zombunity-mud | login_test.clj | (ns zombunity.login-test
(:use clojure.test)
(:require [zombunity.dispatch :as disp]
[zombunity.data :as data]
[zombunity.data.login-data :as login-data]))
(def first-run {"login_state" {:conn_id 1 :num_logins 1 :num_passwords 0}
"msg-to-client" {:conn-id 1 :message "enter l... | null | https://raw.githubusercontent.com/cwmaguire/zombunity-mud/ec14406f4addac9b9a0742d3043a6e7bccef1fa6/zombunity_server/test/zombunity/login_test.clj | clojure | (ns zombunity.login-test
(:use clojure.test)
(:require [zombunity.dispatch :as disp]
[zombunity.data :as data]
[zombunity.data.login-data :as login-data]))
(def first-run {"login_state" {:conn_id 1 :num_logins 1 :num_passwords 0}
"msg-to-client" {:conn-id 1 :message "enter l... | |
1a70fea95cc333606e6807b3f71ccf6d444e984499fb20034f1a340117147ea7 | marksteele/cinched | cinched_crypto_blob_rest_handler.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2016 ,
%%% @doc
REST API
%%% @end
Created : 24 Jan 2016 by < >
%%%-------------------------------------------------------------------
This file is provided to you under the Apache License ,
%% Version 2.0 (the ... | null | https://raw.githubusercontent.com/marksteele/cinched/5284d048c649128fa8929f6e85cdc4747d223427/src/cinched_crypto_blob_rest_handler.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
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 expres... | @author < >
( C ) 2016 ,
REST API
Created : 24 Jan 2016 by < >
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... |
8d7e25129f4b07ac6c1633215663fdbaf4dedd8da1771a93927d95f6cfe76d4b | rvirding/luerl | luerl_emul.erl | Copyright ( c ) 2013 - 2020
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed... | null | https://raw.githubusercontent.com/rvirding/luerl/5e61c1838d08430af67fb870995b05a41d64aeee/src/luerl_emul.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright ( c ) 2013 - 2020
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author :
Purpose : A basic LUA 5.3 machine emulator .
First version of emulator . Compiler so far only explicitly handles
We explic... |
39cce6a14c69cd1303b1df0b638fd9635ad40d6b93889da3666654102073f5fa | unisonweb/unison | Ann.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
module Unison.Parser.Ann where
import qualified Unison.Lexer.Pos as L
data Ann
{ sig : : String , start : : L.Pos , end : : L.Pos }
| External
| Ann {start :: L.Pos, end :: L.Pos}
deriving (Eq, Ord, Show)
startingLine :: ... | null | https://raw.githubusercontent.com/unisonweb/unison/59e8a256934b39ae50c8e15e259e66dc00c217c1/unison-syntax/src/Unison/Parser/Ann.hs | haskell | # LANGUAGE OverloadedStrings #
If we have a concrete location from a file, use it
| Checks whether an annotation contains a given position
i.e. pos ∈ [start, end)
>>> Intrinsic `contains` L.Pos 1 1
False
>>> External `contains` L.Pos 1 1
False
True
False
| Checks whether an annotation contains another ann... | # LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
module Unison.Parser.Ann where
import qualified Unison.Lexer.Pos as L
data Ann
{ sig : : String , start : : L.Pos , end : : L.Pos }
| External
| Ann {start :: L.Pos, end :: L.Pos}
deriving (Eq, Ord, Show)
startingLine :: Ann -> Maybe L.Line
startingLine (A... |
8b69f3c8dfef7cb5a9ad0c1d82e895dd20a3778f07715c69712b5d3916f330e4 | nklein/userial | peek.lisp | Copyright ( c ) 2011 nklein software
MIT License . See included LICENSE.txt file for licensing details .
(in-package :userial)
(defmacro with-peek-buffer (() &body body)
`(with-buffer (make-array (list (buffer-capacity))
:element-type '(unsigned-byte 8)
:d... | null | https://raw.githubusercontent.com/nklein/userial/dc34fc73385678a61c39e98f77a4443433eedb1d/userial/peek.lisp | lisp | Copyright ( c ) 2011 nklein software
MIT License . See included LICENSE.txt file for licensing details .
(in-package :userial)
(defmacro with-peek-buffer (() &body body)
`(with-buffer (make-array (list (buffer-capacity))
:element-type '(unsigned-byte 8)
:d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.