_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 |
|---|---|---|---|---|---|---|---|---|
52beeb7eaebb68abe812c34c4bc207c5244031644dbfa104a2373011c163c5ac | mkcp/raft-consensus | core_test.clj | (ns raft.core-test
(:require [clojure.test :refer :all]
[raft.core :as raft]))
(deftest leader-election
(testing "followers"
(testing "New nodes begin as Follower")
(testing "FIXME: After timeout, Follower becomes Candidate and begins election"))
(testing "candidates"
(testing "FIXME: C... | null | https://raw.githubusercontent.com/mkcp/raft-consensus/575cc831d3861ae415e372bd6c15ab067b683471/test/raft/core_test.clj | clojure | (ns raft.core-test
(:require [clojure.test :refer :all]
[raft.core :as raft]))
(deftest leader-election
(testing "followers"
(testing "New nodes begin as Follower")
(testing "FIXME: After timeout, Follower becomes Candidate and begins election"))
(testing "candidates"
(testing "FIXME: C... | |
7a02c2a39a6382d47db7c4e09a7903ea046629cc8e791bdd549e9ec4463a99e5 | protz/mezzo | UntypedMezzo.ml | (*****************************************************************************)
(* Mezzo, a programming language based on permissions *)
Copyright ( C ) 2011 , 2012 and
(* *)
(* This program is free softwar... | null | https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/compiler/UntypedMezzo.ml | ocaml | ***************************************************************************
Mezzo, a programming language based on permissions
This program is free software: you can redistribute it and/or modify
(at your optio... | Copyright ( C ) 2011 , 2012 and
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
This is the definition of .
Thi... |
555f12e2557cd78584d5678464b7ed030de471dd3ab0ef1db4c5059c18d2f304 | exercism/babashka | wordy_test.clj | (ns wordy-test
(:require [clojure.test :refer [deftest is]]
wordy))
(deftest addition
(is (= (wordy/evaluate "What is 1 plus 1?") 2)))
(deftest more-addition
(is (= (wordy/evaluate "What is 53 plus 2?") 55)))
(deftest addition-with-negative-numbers
(is (= (wordy/evaluate "What is -1 plus -10?") -... | null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/wordy/test/wordy_test.clj | clojure | (ns wordy-test
(:require [clojure.test :refer [deftest is]]
wordy))
(deftest addition
(is (= (wordy/evaluate "What is 1 plus 1?") 2)))
(deftest more-addition
(is (= (wordy/evaluate "What is 53 plus 2?") 55)))
(deftest addition-with-negative-numbers
(is (= (wordy/evaluate "What is -1 plus -10?") -... | |
a180cc17a0adba20920e385da75f1d5aac4678b5988d3301a934d51599a543c2 | liquidz/antq | github_tag.clj | (ns antq.diff.github-tag
(:require
[antq.diff :as diff]
[antq.util.git :as u.git]
[clojure.string :as str]))
(defn- exact-or-included
[coll ^String target]
(or (some #(and (= target %) %) coll)
(first (filter #(str/includes? % target) coll))))
(defmethod diff/get-diff-url :github-tag
[{:as dep ... | null | https://raw.githubusercontent.com/liquidz/antq/bf69baa6be1838a5a5b93ab48b0ebb5b45f3acea/src/antq/diff/github_tag.clj | clojure | (ns antq.diff.github-tag
(:require
[antq.diff :as diff]
[antq.util.git :as u.git]
[clojure.string :as str]))
(defn- exact-or-included
[coll ^String target]
(or (some #(and (= target %) %) coll)
(first (filter #(str/includes? % target) coll))))
(defmethod diff/get-diff-url :github-tag
[{:as dep ... | |
520e0113d6e5f2d9822a5f8640bb545f593110f69c2ded87cc9ae9b727776dba | aufishgrp/cowpaths | cowpaths_handler.erl | -module(cowpaths_handler).
-callback cowpaths() -> cowpaths_types:cowpathspecs(). | null | https://raw.githubusercontent.com/aufishgrp/cowpaths/04d2639eccd66183dccd45a457a4b69dc18acb56/src/cowpaths_handler.erl | erlang | -module(cowpaths_handler).
-callback cowpaths() -> cowpaths_types:cowpathspecs(). | |
f2210fb7b53e7a67bb3d439b16145a3764cb5b5844f3472d0466af83aa1fbf70 | evturn/haskellbook | 27.14-strict-list.hs | {-# LANGUAGE Strict #-}
module StrictList where
data List a = Nil
| Cons a (List a)
deriving Show
take' n _ | n <= 0 = Nil
take' _ Nil = Nil
take' n (Cons x xs) = (Cons x (take' (n - 1) xs))
map' _ Nil = Nil
map' f (Cons x xs) = (Cons (f x) (map' f xs))
repeat' x =... | null | https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/27/27.14-strict-list.hs | haskell | # LANGUAGE Strict # |
module StrictList where
data List a = Nil
| Cons a (List a)
deriving Show
take' n _ | n <= 0 = Nil
take' _ Nil = Nil
take' n (Cons x xs) = (Cons x (take' (n - 1) xs))
map' _ Nil = Nil
map' f (Cons x xs) = (Cons (f x) (map' f xs))
repeat' x = xs where xs = (Cons x x... |
6e916df565d26f1667458bfcb95e4ec2b4f9e77acc77ac5231906642540b60ed | janestreet/universe | ascii_table_kernel.ml | open Core_kernel
include Ascii_table_kernel_intf
let list_sum ~f lst = List.fold lst ~init:0 ~f:(fun a b -> a + f b)
let list_max ~f lst = List.fold lst ~init:0 ~f:(fun a b -> max a (f b))
module El = struct
One element in the table .
type t = Attr.t list * string list
type row = t list
type grid = row list
... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/textutils/ascii_table/kernel/ascii_table_kernel.ml | ocaml | [generic_min_chars] = minimum number of characters for a column that doesn't have
an [min_width] value.
need to avoid a divide-by-zero
This layout algorithm looks unbearably inefficient, but it's
simple and works reasonably well in the common case. | open Core_kernel
include Ascii_table_kernel_intf
let list_sum ~f lst = List.fold lst ~init:0 ~f:(fun a b -> a + f b)
let list_max ~f lst = List.fold lst ~init:0 ~f:(fun a b -> max a (f b))
module El = struct
One element in the table .
type t = Attr.t list * string list
type row = t list
type grid = row list
... |
f33d36bb0065304d77c28029f6cf51ad231891e6386be35b7f09ddcce920d325 | codinuum/cca | f_wait_spec.ml |
Copyright 2013 - 2018 RIKEN
Copyright 2018 - 2020 Chiba Institude of Technology
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 b... | null | https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/ast/analyzing/langs/fortran/parsing/src/labels/f_wait_spec.ml | ocaml | F2003 |
Copyright 2013 - 2018 RIKEN
Copyright 2018 - 2020 Chiba Institude of Technology
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 b... |
6563623c07d2c6a94fcc36852e705713e4beb76e0c18530d37d04c00b19c7d73 | timgilbert/haunting-refrain-posh | index.cljs | (ns haunting-refrain.views.index
(:require [re-frame.core :as rf]
[haunting-refrain.components.misc :as misc]
[haunting-refrain.components.playlist :as pl]
[haunting-refrain.config :as config]))
(defn go-button []
(let [logged-in? (rf/subscribe [:auth/logged-in? :foursquare])]
... | null | https://raw.githubusercontent.com/timgilbert/haunting-refrain-posh/99a7daafe54c5905a3d1b0eff691b5c602ad6d8d/src/cljs/haunting_refrain/views/index.cljs | clojure | temp | (ns haunting-refrain.views.index
(:require [re-frame.core :as rf]
[haunting-refrain.components.misc :as misc]
[haunting-refrain.components.playlist :as pl]
[haunting-refrain.config :as config]))
(defn go-button []
(let [logged-in? (rf/subscribe [:auth/logged-in? :foursquare])]
... |
a55514d553c73d31b06e5e1366a5fda9d97f70ffb466c6c543bf80e067810876 | ghcjs/ghcjs | profRead.hs | module Main where
import Control.Applicative
import System.Environment
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Text.Read
import Data.List.Split
main = do
args <- getArgs
case args of
[x] -> profRead "ghcjs.prof" (read x)
[file,... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/utils/profRead.hs | haskell | module Main where
import Control.Applicative
import System.Environment
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Text.Read
import Data.List.Split
main = do
args <- getArgs
case args of
[x] -> profRead "ghcjs.prof" (read x)
[file,... | |
f0cdb5868b105e21a4ffb514cc558662e4b836a3e29ebe1537815ad29a22f2bc | hamler-lang/hamler | UDP.erl | %%---------------------------------------------------------------------------
%% |
Module : UDP
Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
%% License : BSD-style (see the LICENSE file)
%%
Maintainer : ,
,
%% Stability : experimental
%% Portability : ... | null | https://raw.githubusercontent.com/hamler-lang/hamler/3ba89dde3067076e112c60351b019eeed6c97dd7/lib/Network/UDP.erl | erlang | ---------------------------------------------------------------------------
|
License : BSD-style (see the LICENSE file)
Stability : experimental
Portability : portable
The UDP FFI module.
--------------------------------------------------------------------------- | Module : UDP
Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
Maintainer : ,
,
-module('UDP').
-include("../Foreign.hrl").
-export([ open/1
, openWith/2
, recv/2
, recvTimeout/3
, send/4
, sendTo/4
, close/1
... |
3819d88aba88f6f77fb4b0c617b82c948f8c9be59510dec7eef2b6ce9dadbe3f | aggieben/weblocks | filter.lisp |
(in-package :weblocks)
(export '())
(defun datagrid-render-search-bar (grid &rest keys)
"Renders a search bar for the datagrid."
(with-html
(:div :class "datagrid-search-bar"
(with-extra-tags
(htm (:span :class "title" (:strong "Search table ")))
(when (datagrid-show-total-items-count-p gri... | null | https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/src/widgets/datagrid/filter.lisp | lisp | we also need to clear the selection
"
" |
(in-package :weblocks)
(export '())
(defun datagrid-render-search-bar (grid &rest keys)
"Renders a search bar for the datagrid."
(with-html
(:div :class "datagrid-search-bar"
(with-extra-tags
(htm (:span :class "title" (:strong "Search table ")))
(when (datagrid-show-total-items-count-p gri... |
336286388ed05236ffe110071256609293a7f327d4a0182542e7f05621f8a455 | austinhaas/rete | rete_macros.clj | (ns pettomato.rete.rete-macros
(:require
[clojure.walk :refer [postwalk]]
[pettomato.rete.util :refer [memoize-once collapse-terms invert-signed-terms]]))
(defn- var-symbol? [x] (and (symbol? x) (= (get (str x) 0) \?)))
(defn- expr? [x] (and (list? x) (symbol? (first x))))
(defn- synthesize-production [preco... | null | https://raw.githubusercontent.com/austinhaas/rete/5acdfa9e58f8d0fbb084ef8e229edd1bf63d37ae/src/pettomato/rete/rete_macros.clj | clojure | 'var->pos' is a mapping from each variable in preconditions to
e.g., [[?a 'x] [?b 'y]] => {?a [0 0], ?b [1 0]}.
So that earlier bindings will replace later bindings.
a = constant tests, b = consistency tests. | (ns pettomato.rete.rete-macros
(:require
[clojure.walk :refer [postwalk]]
[pettomato.rete.util :refer [memoize-once collapse-terms invert-signed-terms]]))
(defn- var-symbol? [x] (and (symbol? x) (= (get (str x) 0) \?)))
(defn- expr? [x] (and (list? x) (symbol? (first x))))
(defn- synthesize-production [preco... |
b7bca06e477559af02dd5be1d2f32b340583dc3c94794854e6b85e4e2259bbbc | stepcut/plugins | Tiny.hs | module Tiny ( resource ) where
import API
import A
import B
import C
resource = tiny {
field = a ++ b ++ c
}
| null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/make/makeall001/Tiny.hs | haskell | module Tiny ( resource ) where
import API
import A
import B
import C
resource = tiny {
field = a ++ b ++ c
}
| |
b51c1a7bf722e016ad49505ba4ed93d7b885ba652fa741cdb171904efbb9dee4 | owickstrom/gi-gtk-declarative | Widget.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeOperators #-}
-- | A 'Widget' value can wrap any 'Patchable' widget, hiding the underlying
-- widget t... | null | https://raw.githubusercontent.com/owickstrom/gi-gtk-declarative/205351a54698be7b583dd34d189a89470ee2b11b/gi-gtk-declarative/src/GI/Gtk/Declarative/Widget.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
| A 'Widget' value can wrap any 'Patchable' widget, hiding the underlying
widget type, such that you can embed heterogeneous collections of widgets in
containers.
| A 'Widget' value wraps a 'Patchable' and 'E... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
module GI.Gtk.Declarative.Widget
( Widget(..)
* Widget to conversion
, FromWidget(..)
)
where
import Data.Typeable
import GI.Gtk.Declarative.EventSource
import GI.Gtk.... |
2630c184038b8efcc18a7fd8b12b9e13d3b8e08545946896f627206e2837e56e | takenobu-hs/ghci-hexcalc | Spec.hs | module Main where
import Test.DocTest
main :: IO ()
main = doctest ["src/Data/GHex.hs"]
| null | https://raw.githubusercontent.com/takenobu-hs/ghci-hexcalc/380872162904ffac64124a541735f8e31965bad3/test/Spec.hs | haskell | module Main where
import Test.DocTest
main :: IO ()
main = doctest ["src/Data/GHex.hs"]
| |
1da6dc6e5cbf954ef9e5c555ead22e1246f3338f0a247bb583958a9a8f0a1d22 | c4-project/c4f | ast.ml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/litmus_c/src/ast.ml | ocaml | * Generic declarations parametrised on qualifiers and declarator.
* Type of qualifiers.
* Generic composite specs parametrised on sort and declaration.
* Declarators
* Abstract declarators
Trying to get 'X : Y' if X exists, and ': Y' if not.
.
->
The space should be surpressed when there is no return value,... | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
99b256084da8d43fb067eceb548ef98df47f66d718d12395d2fe5ba53cf4f03f | ygmpkk/house | Writer.hs | module Writer where
import Prop
import Unstable.Control.Monad.Trans
import Data.Monoid
listen_return x = listen (return x) === return (x,mempty)
listen_bind m1 m2 = listen (m1 >>= m2) === (do (x,w1) <- listen m1
(y,w2) <- listen (m2 x)
... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/monads/Unstable/Control/Monad/laws/Writer.hs | haskell | module Writer where
import Prop
import Unstable.Control.Monad.Trans
import Data.Monoid
listen_return x = listen (return x) === return (x,mempty)
listen_bind m1 m2 = listen (m1 >>= m2) === (do (x,w1) <- listen m1
(y,w2) <- listen (m2 x)
... | |
fc1ce0e7384a500478f1d106039319358a64865697f4ab8635fb2c3736d9f17a | DSiSc/why3 | ACSLtoWhy3.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/jessie/ACSLtoWhy3.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
let help = "Checks ACSL contracts using Why3"
let global_logic_decls_theory_name = "Global logic declar... |
2ef7bdd8eedeeb1a64cb4bb025f2482603bf8c1c2162bf98cacfd845e7dd8bd6 | alvatar/spheres | uidevice.scm | (c-declare
#<<end-c-declare
//
// UIDevice+Hardware.h
// TestTable
//
// Created by Inder Kumar Rathore on 19/01/13.
// Copyright (c) 2013 Rathore. All rights reserved.
//
#import <UIKit/UIKit.h>
#define IS_IPAD (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad)
#define DEVICE_IOS_VERSION [[UIDevice currentDev... | null | https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/gambit/ios/uidevice.scm | scheme |
// getting size of answer
//Device is not available
! Get iOS Device model ID
! Get iOS Device m... | (c-declare
#<<end-c-declare
//
// UIDevice+Hardware.h
// TestTable
//
// Created by Inder Kumar Rathore on 19/01/13.
// Copyright (c) 2013 Rathore. All rights reserved.
//
#import <UIKit/UIKit.h>
#define IS_IPAD (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad)
#define DEVICE_IOS_VERSION [[UIDevice currentDev... |
f57c16b1e60cd2e765613fa7382048b09dd44e70a5b9f95f273cf54a061a38df | RichiH/git-annex | Difference.hs | git - annex difference log
-
- Copyright 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Logs.Difference (
recordDifferences,
recordedDifferences,
recordedDifferencesFor,
module Logs... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Logs/Difference.hs | haskell | Map of UUIDs that have Differences recorded.
If a new version of git-annex has added a Difference this version | git - annex difference log
-
- Copyright 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Logs.Difference (
recordDifferences,
recordedDifferences,
recordedDifferencesFor,
module Logs... |
6435c64a9404c7ce335a1472e90de6a9d8450c9ec6ff0802e687e66693bc2493 | cojna/iota | RangeMulRangeSumSpec.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Data.SegTree.RangeMulRangeSumSpec where
import Data.SegTree.RangeMulRangeSum ()
import Data.Semigroup
import Test.Prelude
import Test.Prop.MonoidAction (monoidActionSpec)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "MonoidAc... | null | https://raw.githubusercontent.com/cojna/iota/a64e8c5e4dd4f92e5ed3fcd0413be94ef1108f9e/test/Data/SegTree/RangeMulRangeSumSpec.hs | haskell | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Data.SegTree.RangeMulRangeSumSpec where
import Data.SegTree.RangeMulRangeSum ()
import Data.Semigroup
import Test.Prelude
import Test.Prop.MonoidAction (monoidActionSpec)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "MonoidAc... | |
9d8a9a9ab0a31f4bb87a1ec2a76943930b770e1b1d59a9264df50d78c6b8b913 | aaronallen8455/erriscope | Erriscope.hs | # LANGUAGE ImplicitParams #
# LANGUAGE CPP #
# LANGUAGE LambdaCase #
module Erriscope
( plugin
) where
import Control.Concurrent.MVar
import Control.Exception.Safe (throwIO, try, tryAny)
import Control.Monad
import Control.Monad.IO.Class
import qualified Data.ByteString.Buil... | null | https://raw.githubusercontent.com/aaronallen8455/erriscope/136395a72465c62046aad0dfd976d8d251b18fd0/erriscope/src/Erriscope.hs | haskell | phase in which case we may not know the module name but still want to have
the file registered so that deleted file pruning will work.
^ It is necessary to track the errors that have been emitted for a file
because when compiling with multiple targets in stack, the log action
is run for each target which means dup... | # LANGUAGE ImplicitParams #
# LANGUAGE CPP #
# LANGUAGE LambdaCase #
module Erriscope
( plugin
) where
import Control.Concurrent.MVar
import Control.Exception.Safe (throwIO, try, tryAny)
import Control.Monad
import Control.Monad.IO.Class
import qualified Data.ByteString.Buil... |
99097a0d76234d63d3109e964ddb831fbd457029eb0265cf1efb0058581c7150 | CorticalComputer/Book_NeuroevolutionThroughErlang | sensor.erl | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
%%
Copyright ( C ) 2012 by , DXNN Research Group ,
%All rights reserved.
%
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for th... | null | https://raw.githubusercontent.com/CorticalComputer/Book_NeuroevolutionThroughErlang/81b96e3d7985624a6183cb313a7f9bff0a7e14c5/Ch_12and13/sensor.erl | erlang |
All rights reserved.
io:format("Sensor:~p is terminating.~n",[Id]), | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
Copyright ( C ) 2012 by , DXNN Research Group ,
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for the terms of use .
-module(s... |
5e2d72000cd7487eaad00fa3a32fc8c950ae620a0655a709e0d60fa84ef15dd5 | Bannerets/flowest | Mapper.ml | open! Base
(* Maps Flow Ast to Ts Ast *)
module FlowAst = Flow_parser.Flow_ast
module TsAst = Ts.Ast
module FLoc = Flow_parser.Loc
module TLoc = Ts.Loc
let map_loc (loc: Flow_parser.Loc.t) = Ts.Loc.{
start = { line = loc.start.line; column = loc.start.column };
_end = { line = loc._end.line; column = loc._end.co... | null | https://raw.githubusercontent.com/Bannerets/flowest/5e6cee541d0ec36156c220e8311ea6690be5b414/src/flowest_lib/Mapper.ml | ocaml | Maps Flow Ast to Ts Ast
Generic Unqualified
TODO: handle 'mixins'?
TODO:
TODO: | open! Base
module FlowAst = Flow_parser.Flow_ast
module TsAst = Ts.Ast
module FLoc = Flow_parser.Loc
module TLoc = Ts.Loc
let map_loc (loc: Flow_parser.Loc.t) = Ts.Loc.{
start = { line = loc.start.line; column = loc.start.column };
_end = { line = loc._end.line; column = loc._end.column };
}
let map_with_loc: '... |
077d3d24b6b786ce91b239468a20014d0577366b2f5c03da960a533cd67d8884 | finnishtransportagency/harja | json_validointi_test.clj | (ns harja.tyokalut.json-validointi-test
(:require [clojure.test :refer [deftest is use-fixtures]]
[harja.testi :refer :all]
[harja.tyokalut.json-validointi :as json]
[harja.palvelin.integraatiot.api.tyokalut.json-skeemat :as json-skeemat]
[harja.palvelin.integraatiot.ap... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/67b0ec8ba5029942438fb8979508ec735354835e/test/clj/harja/tyokalut/json_validointi_test.clj | clojure | (log/debug "VIRHEET:" virheet)
(log/debug "VIRHEET:" virheet) | (ns harja.tyokalut.json-validointi-test
(:require [clojure.test :refer [deftest is use-fixtures]]
[harja.testi :refer :all]
[harja.tyokalut.json-validointi :as json]
[harja.palvelin.integraatiot.api.tyokalut.json-skeemat :as json-skeemat]
[harja.palvelin.integraatiot.ap... |
0d1da3e820056687db95876827f5b164cb99e31fc7fc647e7cc812932ac573e5 | ekmett/guanxi | Monad.hs | # language OverloadedLists #
module Spec.FD.Monad where
import FD.Monad
import FD.Var
import Test.Hspec hiding (example)
spec :: Spec
spec =
describe "FD.Monad" $
it "solves x <- [1..4], y <- [1..4], x < y" $ do
let result = run example
result `shouldBe` [(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)]
examp... | null | https://raw.githubusercontent.com/ekmett/guanxi/e267f4210a9c10d0091371ea9b028b7d6fa8b9f3/test/Spec/FD/Monad.hs | haskell | # language OverloadedLists #
module Spec.FD.Monad where
import FD.Monad
import FD.Var
import Test.Hspec hiding (example)
spec :: Spec
spec =
describe "FD.Monad" $
it "solves x <- [1..4], y <- [1..4], x < y" $ do
let result = run example
result `shouldBe` [(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)]
examp... | |
0212830e87ff31b2a8f5ea20e35258222d69b17f18b968c3098fd7db10ea968d | RedPRL/algaett | Data.ml | open Bwd
module ULvlShift = Mugen.Shift.Int
type global = Bantorra.Manager.path * int
[@@@warning "-30"]
type syn =
| Var of int
| Axiom of Yuujinchou.Trie.path
| Def of Yuujinchou.Trie.path * value SyncLazy.t
| Pi of syn * (* binding *) syn
| Lam of (* binding *) syn
| App of syn * syn
| Sigma of syn ... | null | https://raw.githubusercontent.com/RedPRL/algaett/5bc95fcce57c735a068a3f9d676ee673ee4e2b21/src/nbe/Data.ml | ocaml | binding
binding
binding
binding
invariant: lazy values must be effect-less
invariant: lazy values must be effect-less | open Bwd
module ULvlShift = Mugen.Shift.Int
type global = Bantorra.Manager.path * int
[@@@warning "-30"]
type syn =
| Var of int
| Axiom of Yuujinchou.Trie.path
| Def of Yuujinchou.Trie.path * value SyncLazy.t
| App of syn * syn
| Pair of syn * syn
| Fst of syn
| Snd of syn
| Univ of syn
| TpULvl
... |
bb7c6ef3a234159262c9f2cee03df998659b09e51802580a5e68b4fbcb6c353f | exercism/haskell | PacmanRules.hs | module PacmanRules (eatsGhost, scores, loses, wins) where
eatsGhost :: Bool -> Bool -> Bool
eatsGhost =
error "Implement this function."
scores :: Bool -> Bool -> Bool
scores =
error "Implement this function."
loses :: Bool -> Bool -> Bool
loses =
error "Implement this function."
wins :: Bool -> Bool -> Bool ... | null | https://raw.githubusercontent.com/exercism/haskell/5e3089616050f6bb9ed97734dad9b46e9800186c/exercises/concept/pacman-rules/src/PacmanRules.hs | haskell | module PacmanRules (eatsGhost, scores, loses, wins) where
eatsGhost :: Bool -> Bool -> Bool
eatsGhost =
error "Implement this function."
scores :: Bool -> Bool -> Bool
scores =
error "Implement this function."
loses :: Bool -> Bool -> Bool
loses =
error "Implement this function."
wins :: Bool -> Bool -> Bool ... | |
0fb78e767084e64d4a432c7d652e2d5af32dbfda69b8af778031537fd3577bfa | lthms/spatial-sway | spatial_ipc.mli | 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 /.
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at /. *)
val socket_path : string
typ... | null | https://raw.githubusercontent.com/lthms/spatial-sway/2f194eca2767e3cf736caf6e76c5416d57be9905/lib/spatial_ipc/spatial_ipc.mli | ocaml | * @raise [Invalid_argument] | 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 /.
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at /. *)
val socket_path : string
typ... |
3851057e07038742ccd637b14f5bd1ef619ca9ad9f31249102d425a650ac822d | primetype/inspector | Report.hs | module Inspector.Report
( TestReport (..)
, Report (..)
, prettyC
) where
import Foundation
import Foundation.Conduit
import Foundation.VFS
import Control.Monad (forM_)
import Basement.Bounded
import qualified Basement.Terminal.ANSI as ANSI
import Inspector.TestVector.TestVector (TestVector... | null | https://raw.githubusercontent.com/primetype/inspector/bd2ee67c757729d2a725282b27d3b98458f3fe2e/src/Inspector/Report.hs | haskell | module Inspector.Report
( TestReport (..)
, Report (..)
, prettyC
) where
import Foundation
import Foundation.Conduit
import Foundation.VFS
import Control.Monad (forM_)
import Basement.Bounded
import qualified Basement.Terminal.ANSI as ANSI
import Inspector.TestVector.TestVector (TestVector... | |
5eee3a648469c17b8ab06d3480ea98eb668790f2faf30511b19be47e9fd934d7 | CSCfi/rems | test_organizations.clj | (ns ^:integration rems.service.test-organizations
(:require [clojure.test :refer :all]
[rems.service.organizations :as organizations]
[rems.db.organizations]
[rems.db.test-data-helpers :as test-helpers]
[rems.db.testing :refer [rollback-db-fixture test-db-fixture]]
... | null | https://raw.githubusercontent.com/CSCfi/rems/490087c4d58339c908da792111029fbaf817a26f/test/clj/rems/service/test_organizations.clj | clojure | reset all to false for the following tests | (ns ^:integration rems.service.test-organizations
(:require [clojure.test :refer :all]
[rems.service.organizations :as organizations]
[rems.db.organizations]
[rems.db.test-data-helpers :as test-helpers]
[rems.db.testing :refer [rollback-db-fixture test-db-fixture]]
... |
6fad6b8b39835e9df39f27912b15fc6d384b7b4fd03392225c04d682105e9c90 | emanjavacas/cosycat | users_frame.cljs | (ns cosycat.project.components.users.users-frame
(:require [re-frame.core :as re-frame]
[reagent.core :as reagent]
[react-bootstrap.components :as bs]
[cosycat.project.components.users.add-user-modal :refer [add-user-modal]]
[cosycat.components :refer [user-profile-comp... | null | https://raw.githubusercontent.com/emanjavacas/cosycat/a7186363d3c0bdc7b714af126feb565f98793a6e/src/cljs/cosycat/project/components/users/users_frame.cljs | clojure | TODO: remove-user-modal | (ns cosycat.project.components.users.users-frame
(:require [re-frame.core :as re-frame]
[reagent.core :as reagent]
[react-bootstrap.components :as bs]
[cosycat.project.components.users.add-user-modal :refer [add-user-modal]]
[cosycat.components :refer [user-profile-comp... |
a29d9dc42c6618a3c7e98e8374b0a22ad7f04390488c957ca5a3df4832386deb | mfikes/advent-of-code | util.cljc | (ns advent.util)
(defn count'
"Like core count, but when applied to a directly reduceable coll, does not
force the collection to be realized fully in memory."
[coll]
(transduce identity (completing (fn [c _] (inc c))) 0 coll))
(defn nth'
"Like core nth, but when applied to a directly reduceable coll, does n... | null | https://raw.githubusercontent.com/mfikes/advent-of-code/72a015ac8fd9b1097efea69a0bb8acc26462665e/src/advent/util.cljc | clojure | (ns advent.util)
(defn count'
"Like core count, but when applied to a directly reduceable coll, does not
force the collection to be realized fully in memory."
[coll]
(transduce identity (completing (fn [c _] (inc c))) 0 coll))
(defn nth'
"Like core nth, but when applied to a directly reduceable coll, does n... | |
1132cab8d86d0918ba2e1e15b7200cc0754c05e1f5809f6be6ce06d3dafcac47 | nicolov/cs61as-racket-homework | hw5.rkt | #lang planet dyoo/simply-scheme:2
;
; Define an accumulate function with an initial value
(define (accumulate f start xs)
(if (null? xs)
start
(accumulate f (f (car xs) start) (cdr xs))))
;
Exercise 1
SICP 2.26
(define x (list 1 2 3))
(define y (list 4 5 6))
; (append x y)
; '(1 2 3 4 5 6)
; (co... | null | https://raw.githubusercontent.com/nicolov/cs61as-racket-homework/31f6e1855305838d7fe3824017164e234ee9e20c/hw5.rkt | racket |
Define an accumulate function with an initial value
(append x y)
'(1 2 3 4 5 6)
(cons x y)
(list x y)
a
b
c
(fold-right / 1 (list 1 2 3))
(fold-left / 1 (list 1 2 3))
(fold-right list `() (list 1 2 3))
(fold-left list `() (list 1 2 3))
op should be right and left associative
| #lang planet dyoo/simply-scheme:2
(define (accumulate f start xs)
(if (null? xs)
start
(accumulate f (f (car xs) start) (cdr xs))))
Exercise 1
SICP 2.26
(define x (list 1 2 3))
(define y (list 4 5 6))
' ( ( 1 2 3 ) 4 5 6 )
' ( ( 1 2 3 ) ( 4 5 6 ) )
Exercise 2
SICP 2.29
(define (make-m... |
4b4073163c61447537b7f25735f960cd2047aee0af0a671a5688506d28914f3f | input-output-hk/hydra-sim | Channels.hs | module HydraSim.Examples.Channels (AWSCenters (..), channel, getSOrError) where
import Control.Monad.Class.MonadAsync
import Control.Monad.Class.MonadTime
import Control.Monad.Class.MonadTimer
import HydraSim.Channel
data AWSCenters
= NVirginiaAWS
| OhioAWS
| NCaliforniaAWS
| OregonAWS
| CanadaAWS... | null | https://raw.githubusercontent.com/input-output-hk/hydra-sim/8119e630c73dafc024dc04e7a24c2328fc18e421/src/HydraSim/Examples/Channels.hs | haskell | | Create a delayed channel, with an @S@ taken from measurements between data
centers across the world.
| module HydraSim.Examples.Channels (AWSCenters (..), channel, getSOrError) where
import Control.Monad.Class.MonadAsync
import Control.Monad.Class.MonadTime
import Control.Monad.Class.MonadTimer
import HydraSim.Channel
data AWSCenters
= NVirginiaAWS
| OhioAWS
| NCaliforniaAWS
| OregonAWS
| CanadaAWS... |
ef67aef01474332eb93f708bf74be557ffa9a1f6e35a20d62ac725040e807b00 | vehicle-lang/vehicle | CapitaliseTypeNames.hs | module Vehicle.Compile.CapitaliseTypeNames
( capitaliseTypeNames,
)
where
import Control.Monad.State (MonadState (..), evalState, modify, when)
import Data.Functor.Foldable (Recursive (..))
import Data.Set (Set, insert, member)
import Vehicle.Compile.Prelude
import Vehicle.Compile.Type.Subsystem.Standard
import Ve... | null | https://raw.githubusercontent.com/vehicle-lang/vehicle/3a3548f9b48c3969212ccb51e954d4d4556ea815/vehicle/src/Vehicle/Compile/CapitaliseTypeNames.hs | haskell | ------------------------------------------------------------------------------
convention. This pass identifies all such defined functions and capitalises
all references to them. Cannot be done during the main compilation pass as we
need to be able to distinguish between free and bound variables.
We don't capitalis... | module Vehicle.Compile.CapitaliseTypeNames
( capitaliseTypeNames,
)
where
import Control.Monad.State (MonadState (..), evalState, modify, when)
import Data.Functor.Foldable (Recursive (..))
import Data.Set (Set, insert, member)
import Vehicle.Compile.Prelude
import Vehicle.Compile.Type.Subsystem.Standard
import Ve... |
7410cf8441ce6c6c66b203c71ba1b0167e660270470dbc5c647f169cf63ceacd | mfoemmel/erlang-otp | wxScrollWinEvent.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxScrollWinEvent.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
See also the message variant { @link wxE... |
386e2fd009662a2a601ee65f9fb16c5e3fdac522956eda23450ba929d2521ec8 | wardle/hermes | cli.clj | (ns com.eldrix.hermes.cmd.cli
(:require [clojure.set :as set]
[clojure.string :as str]
[clojure.tools.cli :as cli]))
;; Specific options relating to automatic import from a well-known distribution
(def uk-trud-opts
[[nil "--api-key API-KEY-PATH" "Path to a file containing TRUD API key"
... | null | https://raw.githubusercontent.com/wardle/hermes/fa75e38889e78d2d285011f8cfb43b10f90f8509/cmd/com/eldrix/hermes/cmd/cli.clj | clojure | Specific options relating to automatic import from a well-known distribution
a well-known 'install' parameter e.g. 'api-key'?
-> flag
a 'api-key=xxxx' pair of a well-known 'install' flag?
-> flag and value
return commands in order given on command-line
determine options for command(s) | (ns com.eldrix.hermes.cmd.cli
(:require [clojure.set :as set]
[clojure.string :as str]
[clojure.tools.cli :as cli]))
(def uk-trud-opts
[[nil "--api-key API-KEY-PATH" "Path to a file containing TRUD API key"
:missing "Missing TRUD API key"]
[nil "--cache-dir PATH" "Path to a downloa... |
e349758ee9534e816c8ddc907a865c5c65839b9c0440b67cac7b0af8245d2b1c | cxphoe/SICP-solutions | 1.30.rkt | (define (coeff count)
(cond ((= count 0) 1)
((even? count) 2)
(else 4)))
(define (sum-sim term a next b)
(define (iter a result count)
(if (= a b)
(+ result (term a))
(iter (next a)
(+ result (* (coeff count) (term a)))
(+ count 1))))
(iter a 0 0))
... | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%201-Building%20Abstractions%20with%20Procedures/1.30.rkt | racket | (define (coeff count)
(cond ((= count 0) 1)
((even? count) 2)
(else 4)))
(define (sum-sim term a next b)
(define (iter a result count)
(if (= a b)
(+ result (term a))
(iter (next a)
(+ result (* (coeff count) (term a)))
(+ count 1))))
(iter a 0 0))
... | |
72625facf94680d06f698b8ad191f1841dae6f18f4f0e5d35da17d303c86c9b0 | takikawa/racket-ppa | launch-many-worlds.rkt | #lang racket/base
(provide
;; (launch-many-worlds e1 ... e2)
;; run expressions e1 through e2 in parallel,
;; produce all values
launch-many-worlds
launch - many - worlds / proc : ( - > Any ) * - > [ Any ]
launch-many-worlds/proc)
;; ----------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/share/pkgs/htdp-lib/2htdp/private/launch-many-worlds.rkt | racket | (launch-many-worlds e1 ... e2)
run expressions e1 through e2 in parallel,
produce all values
---------------------------------------------------------------------------------------------------
check arguments:
-- IN --
run the thunks as parallel threads and produce 'values' of their results
allocate the progra... | #lang racket/base
(provide
launch-many-worlds
launch - many - worlds / proc : ( - > Any ) * - > [ Any ]
launch-many-worlds/proc)
(require racket/list racket/function racket/gui mzlib/etc htdp/error)
(define-syntax-rule
(launch-many-worlds e ...)
(launch-many-worlds* (lambda () e) ...))
(define (launch-ma... |
bd1f12f598e10519d06d10a4c730f0a0f915a55b638eb0634ccbc69a2b118cc3 | cmsc430/www | interp.rkt | #lang racket
(provide interp)
(require "ast.rkt")
;; Expr -> Integer
(define (interp e)
(match e
[(Int i) i]
[(Prim1 p e) (interp-prim1 p (interp e))]))
;; Op Integer -> Integer
(define (interp-prim1 op i)
(match op
['add1 (add1 i)]
['sub1 (sub1 i)]))
| null | https://raw.githubusercontent.com/cmsc430/www/0809867532b8ef516029ac38093a145db5b424ea/langs/blackmail/interp.rkt | racket | Expr -> Integer
Op Integer -> Integer | #lang racket
(provide interp)
(require "ast.rkt")
(define (interp e)
(match e
[(Int i) i]
[(Prim1 p e) (interp-prim1 p (interp e))]))
(define (interp-prim1 op i)
(match op
['add1 (add1 i)]
['sub1 (sub1 i)]))
|
fd6325d23162bc460b576ed905458362b58ec6c5937fa7185260315897274e05 | twanvl/ttie | PrettyM.hs | {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
# LANGUAGE DefaultSignatures #
# LANGUAGE MultiParamTypeClasses , FlexibleContexts #
# OPTIONS_GHC -fno - warn - orphans #
module Util.PrettyM
( module Util.PrettyM
, Doc
) where
import Prelude ()
import Util.MyPrelude
import Util.WLPPrint (Doc)
import q... | null | https://raw.githubusercontent.com/twanvl/ttie/cfae8ec79d1d2d7cf4f9913c613a3a965717b4e8/src/Util/PrettyM.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------... | # LANGUAGE DefaultSignatures #
# LANGUAGE MultiParamTypeClasses , FlexibleContexts #
# OPTIONS_GHC -fno - warn - orphans #
module Util.PrettyM
( module Util.PrettyM
, Doc
) where
import Prelude ()
import Util.MyPrelude
import Util.WLPPrint (Doc)
import qualified Util.WLPPrint as PP
Utilities
instance Monoi... |
0148443ee3bdc9ecf5048ce63d0c493892e7076f52b251045f8afb913c2ab894 | papertrail/slack-hooks | routes.clj | (ns slack-hooks.routes
(:use ring.util.response)
(:require [ring.middleware.params :refer [wrap-params]]
[ring.middleware.keyword-params :refer [wrap-keyword-params]]
[ring.middleware.json :refer [wrap-json-body]]
[slack-hooks.service.github :as service.github]
[s... | null | https://raw.githubusercontent.com/papertrail/slack-hooks/e9cfdbfee40e678be956416366684ee22d6cb282/src/slack_hooks/routes.clj | clojure | (ns slack-hooks.routes
(:use ring.util.response)
(:require [ring.middleware.params :refer [wrap-params]]
[ring.middleware.keyword-params :refer [wrap-keyword-params]]
[ring.middleware.json :refer [wrap-json-body]]
[slack-hooks.service.github :as service.github]
[s... | |
c26aa592ea3a81e91dda217a54d47966305a205f569c837e1a4bd4156458683c | korya/efuns | typeopt.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/ocamlsrc/compat/2.04/include/typeopt.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : typeopt.mli , v 1.1 2000/05/2... |
a6b1394012e822e0f17e21225aed882545d5ae5e42b89fa4fd90b4b2adf2bf1c | launchdarkly/erlang-server-sdk | ldclient_update_requestor_httpc_SUITE.erl | -module(ldclient_update_requestor_httpc_SUITE).
-include_lib("common_test/include/ct.hrl").
%% ct functions
-export([all/0]).
-export([init_per_suite/1]).
-export([end_per_suite/1]).
-export([init_per_testcase/2]).
-export([end_per_testcase/2]).
%% Tests
-export([
authorization_header_set_on_request/1,
user_... | null | https://raw.githubusercontent.com/launchdarkly/erlang-server-sdk/d9a4442a8a214bf950dec8182b26cd042436f4c8/test/ldclient_update_requestor_httpc_SUITE.erl | erlang | ct functions
Tests
====================================================================
Helpers
====================================================================
Assigned as TEST-NET-1, unused on net.
====================================================================
Tests
====================================... | -module(ldclient_update_requestor_httpc_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0]).
-export([init_per_suite/1]).
-export([end_per_suite/1]).
-export([init_per_testcase/2]).
-export([end_per_testcase/2]).
-export([
authorization_header_set_on_request/1,
user_agent_header_set_on_reque... |
544c76a74c767d0f5499b3dbde8a1b3171a174df428a898cc23f6938d2e92c3e | yakaz/yamerl | ex_6.27_invalid_tag_shorthands.erl | -module('ex_6.27_invalid_tag_shorthands').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertThrow(
{yamerl_exception,
[
{yamerl_parsing_error,error,
"Tag handle \"!h!\" never declared",
4,... | null | https://raw.githubusercontent.com/yakaz/yamerl/0032607a7b27fa2b548fc9a02d7ae6b53469c0c5/test/parsing/ex_6.27_invalid_tag_shorthands.erl | erlang | -module('ex_6.27_invalid_tag_shorthands').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertThrow(
{yamerl_exception,
[
{yamerl_parsing_error,error,
"Tag handle \"!h!\" never declared",
4,... | |
543d3fc5489ec7db47a40c8a4033b8735b8b5848b5d2d36bf7d2e59be575e44b | promesante/hn-clj-pedestal-re-frame | core.cljs | (ns hn-clj-pedestal-re-frame.core
(:require
[reagent.core :as reagent]
[re-frame.core :as re-frame]
[hn-clj-pedestal-re-frame.events.init :as events]
[hn-clj-pedestal-re-frame.events.authentication]
[hn-clj-pedestal-re-frame.events.core]
[hn-clj-pedestal-re-frame.events.init]
[hn-clj-pedestal-re-... | null | https://raw.githubusercontent.com/promesante/hn-clj-pedestal-re-frame/76b62dbbcc1c803c8e233809796eda75893cf7c9/src/cljs/hn_clj_pedestal_re_frame/core.cljs | clojure | (ns hn-clj-pedestal-re-frame.core
(:require
[reagent.core :as reagent]
[re-frame.core :as re-frame]
[hn-clj-pedestal-re-frame.events.init :as events]
[hn-clj-pedestal-re-frame.events.authentication]
[hn-clj-pedestal-re-frame.events.core]
[hn-clj-pedestal-re-frame.events.init]
[hn-clj-pedestal-re-... | |
664a9bbec39ba448c6d81e408e33f3e0b6bc3a77f1945484f697d8d081459009 | ropas/sparrow | stepManager.ml | (***********************************************************************)
(* *)
Copyright ( c ) 2007 - present .
Programming Research Laboratory ( ROPAS ) , Seoul National University .
(* All rights reserv... | null | https://raw.githubusercontent.com/ropas/sparrow/3ec055b8c87b5c8340ef3ed6cde34f5835865b31/src/util/stepManager.ml | ocaml | *********************************************************************
All rights reserved.
See the LICENSE file for details. ... | Copyright ( c ) 2007 - present .
Programming Research Laboratory ( ROPAS ) , Seoul National University .
This software is distributed under the term of the BSD license .
let make_istr x =
"\n\n\n"^
"--------------------------------------------------... |
6700716a4a830c8cee78e647cebbbf81adab4ddab05c224ce3386945a34c0db5 | braidchat/braid | tag.clj | (ns braid.chat.db.tag
(:require
[datomic.api :as d]
[braid.core.server.db :as db]
[braid.chat.db.common :refer [create-entity-txn db->tag]]))
Queries
(defn tag-group-id
[tag-id]
(-> (d/pull (db/db) [{:tag/group [:group/id]}] [:tag/id tag-id])
(get-in [:tag/group :group/id])))
(defn users-su... | null | https://raw.githubusercontent.com/braidchat/braid/2e44eb6e77f1d203115f9b9c529bd865fa3d7302/src/braid/chat/db/tag.clj | clojure | Transactions
TODO: throw an exception/some sort of error condition if user tried to
subscribe to a tag they can't? | (ns braid.chat.db.tag
(:require
[datomic.api :as d]
[braid.core.server.db :as db]
[braid.chat.db.common :refer [create-entity-txn db->tag]]))
Queries
(defn tag-group-id
[tag-id]
(-> (d/pull (db/db) [{:tag/group [:group/id]}] [:tag/id tag-id])
(get-in [:tag/group :group/id])))
(defn users-su... |
fe849b0011230eed009a24cd26752965f2bddc91827678a92d722bef33f02dc2 | rodrigosetti/stamps | adjustment-saturation.rkt | #lang s-exp stamps/lang
; Stamps Tutorial
; Adjustment - Saturation
Saturation is a value between 0 ( no color ) to 1 ( full color )
; When the adjustment is a single value it represents a percentage
to increase or decrease towards 1 or 0 .
(define-shape ramp-up
(circle)
30 % more saturation
80 % smaller
... | null | https://raw.githubusercontent.com/rodrigosetti/stamps/958938dd71fdaa64041ea13f1b491bda628bda9c/tutorial/adjustment-saturation.rkt | racket | Stamps Tutorial
Adjustment - Saturation
When the adjustment is a single value it represents a percentage
red | #lang s-exp stamps/lang
Saturation is a value between 0 ( no color ) to 1 ( full color )
to increase or decrease towards 1 or 0 .
(define-shape ramp-up
(circle)
30 % more saturation
80 % smaller
[translate 1 0 ]))
Saturation starts at zero in the first shape .
(define-shape outer
(ramp-u... |
598648ec2130f30966e321f4ed26caf26f36e4e9c31149b23a15c70c51664f4e | ocaml-ppx/ocamlformat | comment_sparse.ml | [@@@ocamlformat "break-cases=nested"]
let f x =
match x with
| `A ->
()
| `B ->
Proin , finibus et finibus , semper et mi . Aenean
pretium fermentum tellus , a faucibus sagittis et . Cras non
()
| null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/passing/tests/comment_sparse.ml | ocaml | [@@@ocamlformat "break-cases=nested"]
let f x =
match x with
| `A ->
()
| `B ->
Proin , finibus et finibus , semper et mi . Aenean
pretium fermentum tellus , a faucibus sagittis et . Cras non
()
| |
75b732f19a82cb7acc84b5ecec630a6895a866e729d73ca641703b0a3f8f7308 | nasa/Common-Metadata-Repository | 087_update_generic_document_name_length.clj | (ns cmr.metadata-db.migrations.087-update-generic-document-name-length
(:require
[config.mdb-migrate-helper :as h]))
(defn up
"Migrates the database up to version 87."
[]
(println "cmr.metadata-db.migrations.087-update-generic-document-name-length up...")
(h/sql "alter table METADATA_DB.CMR_GENERIC_DOCUME... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/d4434719cd72df815d8292d16c5e34fa909b79eb/metadata-db-app/src/cmr/metadata_db/migrations/087_update_generic_document_name_length.clj | clojure | do nothing as we don't want to truncate the document name | (ns cmr.metadata-db.migrations.087-update-generic-document-name-length
(:require
[config.mdb-migrate-helper :as h]))
(defn up
"Migrates the database up to version 87."
[]
(println "cmr.metadata-db.migrations.087-update-generic-document-name-length up...")
(h/sql "alter table METADATA_DB.CMR_GENERIC_DOCUME... |
202750aa2b65b98c2079577e547025fbcc0dca745b1730889752025b20a2bf6d | clojure-interop/google-cloud-clients | DatabaseAdminStubSettings$Builder.clj | (ns com.google.cloud.spanner.admin.database.v1.stub.DatabaseAdminStubSettings$Builder
"Builder for DatabaseAdminStubSettings."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.spanner.admin.database.v1.stub DatabaseAdminStubSettings$Builder]))
(defn drop-database-settings
"Returns th... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings%24Builder.clj | clojure | (ns com.google.cloud.spanner.admin.database.v1.stub.DatabaseAdminStubSettings$Builder
"Builder for DatabaseAdminStubSettings."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.spanner.admin.database.v1.stub DatabaseAdminStubSettings$Builder]))
(defn drop-database-settings
"Returns th... | |
f9c2f92cb0ebceb76d048c75b8be65e4d87bdde52e43f886c12a88d89f7f79da | bravit/hid-examples | Hello.hs | # LANGUAGE TemplateHaskell #
module Hello where
import Language.Haskell.TH
hello :: Q Exp
hello = [| putStrLn "Hello world" |]
| null | https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/ch12/th/hello/Hello.hs | haskell | # LANGUAGE TemplateHaskell #
module Hello where
import Language.Haskell.TH
hello :: Q Exp
hello = [| putStrLn "Hello world" |]
| |
19451a64867290cbf213594e0602c8fdac4116a22f310bdccf676828b85bb8e0 | gsakkas/rite | 3320.ml |
let rec mulByDigit i l =
match List.rev l with
| [] -> []
| h::m::t ->
((mulByDigit i m) :: t) @
[((h * i) / 10) + ((m * i) mod 10); (h * i) mod 10];;
fix
let rec mulByDigit i l =
match List.rev l with
| [ ] - > [ ]
| h::m::t - >
( mulByDigit i ( m : : t ) ) @
[... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/3320.ml | ocaml |
let rec mulByDigit i l =
match List.rev l with
| [] -> []
| h::m::t ->
((mulByDigit i m) :: t) @
[((h * i) / 10) + ((m * i) mod 10); (h * i) mod 10];;
fix
let rec mulByDigit i l =
match List.rev l with
| [ ] - > [ ]
| h::m::t - >
( mulByDigit i ( m : : t ) ) @
[... | |
b9695348f21941caecf3b81464de3813c5a9ab81e00bc342d902ace060b89e9b | binaryage/chromex | hardware_platform.clj | (ns chromex.ext.enterprise.hardware-platform
"Use the chrome.enterprise.hardwarePlatform API to get the
manufacturer and model of the hardware platform where the browser runs.
Note: This API is only available to extensions installed by enterprise
policy.
* available since Chrome 71
* "
(:refer-... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/enterprise/hardware_platform.clj | clojure | -- convenience ------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
-- API TABLE --------------------------------------------------------... | (ns chromex.ext.enterprise.hardware-platform
"Use the chrome.enterprise.hardwarePlatform API to get the
manufacturer and model of the hardware platform where the browser runs.
Note: This API is only available to extensions installed by enterprise
policy.
* available since Chrome 71
* "
(:refer-... |
df322cc1484288abb77ff51e434074d69bde922e0145036164bf1586532dcb6f | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | GetSubscriptionItemsItem.hs | {-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
| Contains the different functions to run the operation
module StripeAPI.Operations.GetSub... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Operations/GetSubscriptionItemsItem.hs | haskell | # LANGUAGE ExplicitForAll #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains all available parameters of this operation (query and path parameters)
| Monadic computation which returns the result of the operation
| Defines the object schema located at @paths.\/v1\/subscription_items\/{item}.GET.para... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
| Contains the different functions to run the operation
module StripeAPI.Operations.GetSubscriptionItemsItem where
import qualified Control.Monad.Fail
import qualified Control.Monad.Tr... |
c9775531e65857bf38ab01a06e27765ba58d4dd4b526d7e134a3028a91b1536a | jeffshrager/biobike | defs.lisp | ;;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: bbi; -*-
(in-package :bbi)
;;; +=========================================================================+
| Copyright ( c ) 2005 JP , , , |
;;; | |
;;; | Permission is hereby grante... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/BBL/defs.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; Package: bbi; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and as... |
(in-package :bbi)
| Copyright ( c ) 2005 JP , , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject to |
| in ... |
6a1f44539c4989ccecb95e8b0ab2f2e43e3a56e77abe257758ffcdebda102a95 | rtoy/ansi-cl-tests | pushnew.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Apr 19 22:28:35 2003
Contains : Tests of PUSHNEW
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest pushnew.1
(let ((x nil))
(let ((y (pushnew 'a x)))
(and
(eqt x y)
(equal x '(a))
t)))
t)
(deftest pushnew.2... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/pushnew.lsp | lisp | -*- Mode: Lisp -*-
Check that a NIL :key argument is the same as no key argument at all
Check that a NIL :key argument is the same as no key argument at all
Test that explicit calls to macroexpand in subforms
are done in the correct environment | Author :
Created : Sat Apr 19 22:28:35 2003
Contains : Tests of PUSHNEW
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest pushnew.1
(let ((x nil))
(let ((y (pushnew 'a x)))
(and
(eqt x y)
(equal x '(a))
t)))
t)
(deftest pushnew.2
(let* ((x (copy-tree ... |
d467a19289732e85256be518b2d327459f7a1582dbf62e6bd678fb0cc58b4264 | OCamlPro/ocp-indent | nstream.mli | (**************************************************************************)
(* *)
Copyright 2011
Copyright 2012 - 2013 OCamlPro
(* ... | null | https://raw.githubusercontent.com/OCamlPro/ocp-indent/9e26c0a2699b7076cebc04ece59fb354eb84c11c/src/nstream.mli | ocaml | ************************************************************************
All rights reserved.This file is distributed under the terms of the
exception. ... | Copyright 2011
Copyright 2012 - 2013 OCamlPro
GNU Lesser General Public License version 2.1 with linking
is distributed in the hope that it will be useful ,
open Pos
type token = {
region ... |
b78ae29afd9d39a40f388a604ea1ae93e06913a29d1d3137cb4c83e18bf84642 | alanz/ghc-exactprint | RecordWildcard.hs | # LANGUAGE RecordWildCards #
parseArgs =
Args
{ equalProb = E `elem` opts
, ..
}
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/RecordWildcard.hs | haskell | # LANGUAGE RecordWildCards #
parseArgs =
Args
{ equalProb = E `elem` opts
, ..
}
| |
75beb1a17f1e4422af061543e9ab6e122a161f1de87c5889e0966fe60aeb861a | 2600hz/kazoo | kazoo_couch_maintenance.erl | %%%-----------------------------------------------------------------------------
( C ) 2012 - 2020 , 2600Hz
%%% @doc
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_couch/src/kazoo_couch_maintenance.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
----------------------------------------------------------------------------- | ( C ) 2012 - 2020 , 2600Hz
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kazoo_couch_maintenance).
-include("kz_couch.hrl").
-export([]).
|
da929477b015bdc36e4fd724b8eebb5da925917b47b4dbdfcfb1335f8750bef5 | evturn/haskellbook | 28.05-map.hs | module Main where
import Criterion.Main
import qualified Data.Map as M
genList :: Int -> [(String, Int)]
genList n = go n []
where
go 0 xs = ("0", 0) : xs
go n' xs = go (n' - 1) ((show n', n') : xs)
pairList :: [(String, Int)]
pairList = genList 9001
testMap :: M.Map String Int
testMap = ... | null | https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/28/28.05-map.hs | haskell | module Main where
import Criterion.Main
import qualified Data.Map as M
genList :: Int -> [(String, Int)]
genList n = go n []
where
go 0 xs = ("0", 0) : xs
go n' xs = go (n' - 1) ((show n', n') : xs)
pairList :: [(String, Int)]
pairList = genList 9001
testMap :: M.Map String Int
testMap = ... | |
95af97f3180f01ab798f5469d76cce80feb8601ba10b216b97c065155aceebdf | stevebleazard/ocaml-jsonxt | writer_file.mli | module type Intf = sig
val json_to_file : string -> 'a Json_internal.constrained -> (unit, string) result
val json_to_file_exn : string -> 'a Json_internal.constrained -> unit
val json_to_channel : out_channel -> 'a Json_internal.constrained -> (unit, string) result
val json_to_channel_exn : out_channel -> ... | null | https://raw.githubusercontent.com/stevebleazard/ocaml-jsonxt/fe982b6087dd76ca003d8fbc19ae9a519f54b828/lib/writer_file.mli | ocaml | module type Intf = sig
val json_to_file : string -> 'a Json_internal.constrained -> (unit, string) result
val json_to_file_exn : string -> 'a Json_internal.constrained -> unit
val json_to_channel : out_channel -> 'a Json_internal.constrained -> (unit, string) result
val json_to_channel_exn : out_channel -> ... | |
15c529154d551d1d2c27c3c419f2fa1f6bddb9584f78a82424fec0c6515fbc48 | EFanZh/EOPL-Exercises | exercise-7.21-test.rkt | #lang racket
(require (except-in rackunit check))
(require "../solutions/exercise-7.21.rkt")
(check-equal? (run "11") (num-val 11))
(check-equal? (run "-33") (num-val -33))
(check-equal? (run "-(44, 33)") (num-val 11))
(check-equal? (run "-(-(44, 33), 22)") (num-val -11))
(check-equal? (run "-(55, -(22, 11))") (num-v... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-7.21-test.rkt | racket | #lang racket
(require (except-in rackunit check))
(require "../solutions/exercise-7.21.rkt")
(check-equal? (run "11") (num-val 11))
(check-equal? (run "-33") (num-val -33))
(check-equal? (run "-(44, 33)") (num-val 11))
(check-equal? (run "-(-(44, 33), 22)") (num-val -11))
(check-equal? (run "-(55, -(22, 11))") (num-v... | |
9da6029b8f5e73680ded071d99bccb1268b935945a82ba793f61b11d4b30dcb5 | input-output-hk/hydra | ScriptRegistry.hs | # LANGUAGE PatternSynonyms #
| A data - type to keep track of reference scripts published on - chain ,
-- and needed to construct transactions leveraging reference inputs.
module Hydra.Chain.Direct.ScriptRegistry where
import Hydra.Prelude
import Cardano.Api.UTxO (UTxO)
import qualified Cardano.Api.UTxO as UTxO
i... | null | https://raw.githubusercontent.com/input-output-hk/hydra/87eb24e2e29e8cd4c0060569d3d6ce45ded3be1f/hydra-node/src/Hydra/Chain/Direct/ScriptRegistry.hs | haskell | and needed to construct transactions leveraging reference inputs.
be found.
| Get the UTxO that corresponds to a script registry.
**Property**:
newScriptRegistry (registryUTxO r) === Just r
scripts of the 'ScriptRegistry'.
This is implemented by repeated querying until we have all necessary
reference scr... | # LANGUAGE PatternSynonyms #
| A data - type to keep track of reference scripts published on - chain ,
module Hydra.Chain.Direct.ScriptRegistry where
import Hydra.Prelude
import Cardano.Api.UTxO (UTxO)
import qualified Cardano.Api.UTxO as UTxO
import qualified Data.Map as Map
import Hydra.Cardano.Api (
CtxUTxO,... |
d91a06d648e7fe7c315c4aed3000d58482e2683bf930912bf784b26bba235494 | metaocaml/ber-metaocaml | t093-pushacc.ml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
let x = false in
let y = true in
let z = true in
let a = true in
le... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocaml/t093-pushacc.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
let x = false in
let y = true in
let z = true in
let a = true in
le... | |
9c7454e3904ea920519d32884b45fe425bf6c434fafff0afbb1cb59e1e8f145d | xapi-project/xen-api | bios_strings.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/xen-api/47fae74032aa6ade0fc12e867c530eaf2a96bf75/ocaml/xapi/bios_strings.ml | ocaml | A single record from the output of dmidecode,
* without its type, handle nor size.
* Arrays are represented by a string with values separated by eol
k
v
k
number of elements, ignored
lines
name
values
Get host bios strings |
* 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... |
fa3fdf142089bdd4a9f64af5c5a747881818a8cb8d9e1f7d5f12725630db4233 | conscell/hugs-android | Internals.hs | ----------------------------------------------------------------
Primitives for accessing Hugs internals .
--
NB These primitives are an _ experimental _ feature which may be
-- removed in future versions of Hugs.
-- They can only be used if hugs was configured with the
-- "--enable-internal-prims" flag.
-... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/hugsbase/Hugs/Internals.hs | haskell | --------------------------------------------------------------
removed in future versions of Hugs.
They can only be used if hugs was configured with the
"--enable-internal-prims" flag.
The primitives defined in this module provide the means with
which to implement simple error-recovery and debugging fac... | Primitives for accessing Hugs internals .
NB These primitives are an _ experimental _ feature which may be
in Haskell .
module Hugs.Internals(
ptrEq,
Name,
nameString,
nameInfo,
nameEq,
Cell,
getCell,
cellPtrEq,
CellKind(..),
classifyCell,
catchError,
Addr,
nameCode,
Instr... |
37f3ac5117ca344f74c69bb3dd3e3dc876a784dbed7914bd3aecdf1c9f49df86 | xapi-project/message-switch | protocol_lwt.mli |
* Copyright ( c ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... | null | https://raw.githubusercontent.com/xapi-project/message-switch/b51b75a5789bec8f8c3a7825eb2af576cdef95ab/lwt/protocol_lwt.mli | ocaml |
* Copyright ( c ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... | |
9c0a215208952b569a9a7f344d91ecea5f98e577add242c719e2c429a4899fff | pedestal/samples | dev.clj | Copyright 2013 Relevance , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; 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 licens... | null | https://raw.githubusercontent.com/pedestal/samples/caaf04afe255586f8f4e1235deeb0c1904179355/helloworld-app/dev/dev.clj | clojure | The use and distribution terms for this software are covered by the
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 this notice, or any other, from this software.
| Copyright 2013 Relevance , Inc.
Eclipse Public License 1.0 ( )
(ns dev
(:use [cljs.repl :only [repl]]
[cljs.repl.browser :only [repl-env]])
(:require [io.pedestal.app-tools.server :as server]
[io.pedestal.app-tools.build :as build]
[io.pedestal.app-tools.compile.repl :as repl]... |
51f957823cb5425458525fae60fe9f1a86b255bcb0a1f23d779c267b47e3d743 | ygmpkk/house | SampleVar.hs | -----------------------------------------------------------------------------
-- |
Module : Control . Concurrent . SampleVar
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : experimental
-- Portab... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/base/Control/Concurrent/SampleVar.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable (concurrency)
Sample variables
------------------------------------------------------------------... | Module : Control . Concurrent . SampleVar
Copyright : ( c ) The University of Glasgow 2001
module Control.Concurrent.SampleVar
(
: : IO ( SampleVar a )
: : a - > IO ( SampleVar a )
: : SampleVar a - > IO ( )
: : SampleVar a - > IO a
: : SampleVar a - > a - > IO ( )
) where
... |
d20d65e8eb2de4093bc316efcaebe6d4955437afcc95834f34c08e638d127a62 | babashka/babashka | problems_test.cljc | (ns expound.problems-test
(:require [clojure.test :as ct :refer [is deftest use-fixtures]]
[clojure.spec.alpha :as s]
[expound.problems :as problems]
[expound.test-utils :as test-utils]))
(use-fixtures :once
test-utils/check-spec-assertions
test-utils/instrument-all)
(s/def :... | null | https://raw.githubusercontent.com/babashka/babashka/665ae4dd97535bf72a5ce34a19d624e74e5c4fe8/test-resources/lib_tests/expound/problems_test.cljc | clojure | (ns expound.problems-test
(:require [clojure.test :as ct :refer [is deftest use-fixtures]]
[clojure.spec.alpha :as s]
[expound.problems :as problems]
[expound.test-utils :as test-utils]))
(use-fixtures :once
test-utils/check-spec-assertions
test-utils/instrument-all)
(s/def :... | |
5f1472f887c2ecbacad2a917cf7a448ea21140a42d3e02b10e1e34c7dce11d7b | RichiH/git-annex | DynamicConfig.hs | dynamic configuration
-
- Copyright 2017 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2017 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Config.DynamicConfig where
import Common
import Control.Concurrent.STM
-- | A configuration value t... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Config/DynamicConfig.hs | haskell | | A configuration value that may only be known after performing an IO
is accessed; its result is then cached. | dynamic configuration
-
- Copyright 2017 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2017 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Config.DynamicConfig where
import Common
import Control.Concurrent.STM
action . The IO action wil... |
518680df131bc6ac8570ae2ba91091441815480e829e9c9b41aa30eabfe9eaba | typedbyte/finito | Main.hs | module Main where
-- base
import Control.Monad ( forM_, replicateM, mapM_, when, zipWithM_ )
import Data.List ( transpose )
-- split
import Data.List.Split ( chunksOf )
import AI.Search.FiniteDomain.Int
-- This is our test scenario.
testSudoku :: [Int]
testSudoku =
[ 0, 0, 4, 0, 0, 0, 5, 0,... | null | https://raw.githubusercontent.com/typedbyte/finito/6755377cdd1108f518f40930c6184b44829930c2/examples/sudoku/Main.hs | haskell | base
split
This is our test scenario.
Some helper functions to prepare and print Sudoku values.
This function transforms a given Sudoku puzzle into a constraint.
Put it all together.
| module Main where
import Control.Monad ( forM_, replicateM, mapM_, when, zipWithM_ )
import Data.List ( transpose )
import Data.List.Split ( chunksOf )
import AI.Search.FiniteDomain.Int
testSudoku :: [Int]
testSudoku =
[ 0, 0, 4, 0, 0, 0, 5, 0, 0,
0, 0, 0, 0, 0, 0, 0, 4, 9,
6, 0... |
a0a9f24f2d297d873f553c6bf45bb6591fefcd8b1589441c915b41851f8322f9 | liquidz/misaki | tester.clj | (ns misaki.test.tester
(:require
[misaki [config :refer [*base-dir* *config* with-config]]
[tester :refer :all]]
[misaki.util.file :refer [path]]
[clojure [test :refer :all]
[string :as str]]
[clojure.java.io :as io]))
(def BASE_DIR "test/files/tester/")
;;; set-bas... | null | https://raw.githubusercontent.com/liquidz/misaki/b8104e632058e3b3da4487513d10e666e5914ec9/test/misaki/test/tester.clj | clojure | set-base-dir!
get-base-config
bind-config
template-file
public-file | (ns misaki.test.tester
(:require
[misaki [config :refer [*base-dir* *config* with-config]]
[tester :refer :all]]
[misaki.util.file :refer [path]]
[clojure [test :refer :all]
[string :as str]]
[clojure.java.io :as io]))
(def BASE_DIR "test/files/tester/")
(deftest se... |
946dd90b180520e1415ca9f8e8ea88473bf0887362c587ab03d123a37acc2497 | yesodweb/persistent | Class.hs | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE UndecidableInstances #
module Database.Persist.Sql.Class
( RawSql (..)
, PersistFieldSql (..)
, Enti... | null | https://raw.githubusercontent.com/yesodweb/persistent/85fcfe8c0c90eb1fb1080818f956024e0aca8405/persistent/Database/Persist/Sql/Class.hs | haskell | # LANGUAGE TypeSynonymInstances #
| Class for data types that may be retrived from a 'rawSql'
query.
| Number of columns that this data type needs and the list
of substitutions for @SELECT@ placeholders @??@.
| A string telling the user why the column count is what
it is.
| Transform a row of the result into the... | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Database.Persist.Sql.Class
( RawSql (..)
, PersistFieldSql (..)
, EntityWithPrefix(..)
, unPrefix
) ... |
5ece1b9366bb3314ba8d6d8b4cb520c9808a2cce4e2d34d70c16d3995a8c6687 | pepeiborra/term | IOStableRef.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.IOStableRef
Copyright : ( c ) 2002
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
Mutable references... | null | https://raw.githubusercontent.com/pepeiborra/term/7644e0f8fbc81754fd5255602dd1f799adcd5938/Data/IOStableRef.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.IOStableRef
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
---------------------------------------------------------------------... | Copyright : ( c ) 2002
Mutable references in the IO monad , with stable orderings .
module Data.IOStableRef
(
abstract , instance of : , Ord ,
) where
import Prelude
import Data.IORef
import Data.Unique
data IOStableRef a
= IOStableRef !Unique !(IORef a)
instance Eq (IOStableRef a) where
IO... |
a8160f6dd85a6133eb90e98a2153750502cddd83e233d77b6b841f77b14ed343 | helium/erlang-libp2p | multistream_SUITE.erl | -module(multistream_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0, init_per_testcase/2, end_per_testcase/2]).
-export([client_ls_test/1, client_negotiate_handler_test/1]).
all() ->
[
client_ls_test
, client_negotiate_handler_test
].
init_per_testcase(TestCase, Config) ->
Con... | null | https://raw.githubusercontent.com/helium/erlang-libp2p/d587854c8a1f093576bbd05ab4616bcc2693e600/test/multistream_SUITE.erl | erlang | Tests
| -module(multistream_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0, init_per_testcase/2, end_per_testcase/2]).
-export([client_ls_test/1, client_negotiate_handler_test/1]).
all() ->
[
client_ls_test
, client_negotiate_handler_test
].
init_per_testcase(TestCase, Config) ->
Con... |
96032962d297e326151631fb8c82b00490b69872db8d90000b8f979122f3317f | SimulaVR/godot-haskell | RemoteTransform.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.RemoteTransform
(Godot.Core.RemoteTransform.force_up... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/RemoteTransform.hs | haskell | | @RemoteTransform@ caches the remote node. It may not notice if the remote node disappears; @method force_update_cache@ forces it to update the cache again.
| @RemoteTransform@ caches the remote node. It may not notice if the remote node disappears; @method force_update_cache@ forces it to update the cache again. | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.RemoteTransform
(Godot.Core.RemoteTransform.force_up... |
e8183c6ec3a0aaaef26c69d19e9ba4db238e6238ddf01f75a44dc22449972282 | wdebeaum/step | forfeit.lisp | ;;;;
;;;; W::forfeit
;;;;
(define-words :pos W::V :TEMPL AGENT-FORMAL-XP-TEMPL
:words (
(W::forfeit
(SENSES
((meta-data :origin "verbnet-1.5" :entry-date 20051219 :change-date 20090501 :comments nil :vn ("contribute-13.2-1-1"))
(LF-PARENT ONT::surrender)
;(TEMPL agent-affected-goal-optional-templ) ... | null | https://raw.githubusercontent.com/wdebeaum/step/a28ce9dc0acd732be9cf762ffdf7cbcb501d4200/src/LexiconManager/Data/new/forfeit.lisp | lisp |
W::forfeit
(TEMPL agent-affected-goal-optional-templ) ; like surrender |
(define-words :pos W::V :TEMPL AGENT-FORMAL-XP-TEMPL
:words (
(W::forfeit
(SENSES
((meta-data :origin "verbnet-1.5" :entry-date 20051219 :change-date 20090501 :comments nil :vn ("contribute-13.2-1-1"))
(LF-PARENT ONT::surrender)
(TEMPL AGENT-AFFECTED-AFFECTEDR-XP-OPTIONAL-TEMPL)
)
)
)
)... |
858f3808e6546204cc3d407f650a9714a90194648b6705cfb3d679fca8ef5b2d | dongcarl/guix | vpn.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2013 , 2016 , 2018 , 2019 , 2020 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2016 , 2017 , 2019 , 2021 < >
Copyright © 2016–2021 < >
Copyright © 2017 < >
Copyright © 2018 , 2020 ... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/vpn.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
Copyright © 2013 , 2016 , 2018 , 2019 , 2020 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2016 , 2017 , 2019 , 2021 < >
Copyright © 2016–2021 < >
Copyright © 2017 < >
Copyright © 2018 , 2020 < >
Copyright © 2018 Meiyo < >
Copyright © 2019... |
5e278fda3321ab94d1ace2988341e76a3a48e0ea0558b89bef6d9c2189c04d3c | airbus-seclab/bincat | pointer.ml |
This file is part of BinCAT .
Copyright 2014 - 2020 - Airbus
BinCAT is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or ( at your
opti... | null | https://raw.githubusercontent.com/airbus-seclab/bincat/493a03890b3b472fd198ce58c7e9280abd0f9f93/ocaml/src/domains/pointer.ml | ocaml | * a pointer is a pair (r, o) where r is the region it points-to and o an offset in that region |
This file is part of BinCAT .
Copyright 2014 - 2020 - Airbus
BinCAT is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or ( at your
opti... |
9030c8dcc6456c9eed2935deb87c366d8fb9155ffd1bf95565aee64fd6aeac41 | acl2/acl2 | closure@useless-runes.lsp | (ABNF::ALTERNATION-CALLED-RULES
(21 7 (:REWRITE DEFAULT-<-2))
(21 7 (:REWRITE DEFAULT-<-1))
(4 4 (:REWRITE DEFAULT-CDR))
(4 4 (:REWRITE DEFAULT-CAR))
)
(ABNF::ALT/CONC/REP/ELEM-CALLED-RULES-FLAG
(24 2 (:TYPE-PRESCRIPTION RETURN-LAST))
(21 7 (:REWRITE DEFAULT-<-2))
(21 7 (:REWRITE DEFAULT-<-1))
(4 4 (:REWRITE D... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/abnf/operations/.sys/closure%40useless-runes.lsp | lisp | (ABNF::ALTERNATION-CALLED-RULES
(21 7 (:REWRITE DEFAULT-<-2))
(21 7 (:REWRITE DEFAULT-<-1))
(4 4 (:REWRITE DEFAULT-CDR))
(4 4 (:REWRITE DEFAULT-CAR))
)
(ABNF::ALT/CONC/REP/ELEM-CALLED-RULES-FLAG
(24 2 (:TYPE-PRESCRIPTION RETURN-LAST))
(21 7 (:REWRITE DEFAULT-<-2))
(21 7 (:REWRITE DEFAULT-<-1))
(4 4 (:REWRITE D... | |
18a641098125d799f8836735dc297cbdd48e07274c218e6dbcbd6d573ccb28cc | djnym/erlang-pool-research | pt_bench.erl | -module (pt_bench).
-export ([setup/0, teardown/1]).
-export ([warm/1,do_one/1, do/0, do/7, spawn_test_many/5, test_many_response/5,
random_string/1, random_dict/1, all/0, pools/0 ]).
setup () ->
ok.
teardown (ok) ->
ok.
all() -> [ pt_baseline_sup | pools() ].
pools() -> [ pt_gsp_sup, pt_gproc_sup, p... | null | https://raw.githubusercontent.com/djnym/erlang-pool-research/3e41f46e40a2d346d984bb016d871b6234a2a50d/src/pt_bench.erl | erlang | warm up | -module (pt_bench).
-export ([setup/0, teardown/1]).
-export ([warm/1,do_one/1, do/0, do/7, spawn_test_many/5, test_many_response/5,
random_string/1, random_dict/1, all/0, pools/0 ]).
setup () ->
ok.
teardown (ok) ->
ok.
all() -> [ pt_baseline_sup | pools() ].
pools() -> [ pt_gsp_sup, pt_gproc_sup, p... |
ce8081d4b278209a191ad0a1ba9f3e4c4e24d282e3d661595735ba90f9009648 | tweag/ormolu | line-single-line-out.hs | x :: [Int]
x = [1, 2, 3]
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/other/line-single-line-out.hs | haskell | x :: [Int]
x = [1, 2, 3]
| |
1cdbaa3127b2a6b8113941a94eaaa6f2710036313879477b50763280c568323b | JHU-PL-Lab/jaylang | up_down05.ml |
let rec bot _ = bot ()
let fail _ = assert false
let rec c5_COEFFICIENT_1082 = 0
let rec c4_COEFFICIENT_1081 = 0
let rec c3_COEFFICIENT_1080 = 0
let rec c2_COEFFICIENT_1078 = 0
let rec c1_COEFFICIENT_1077 = 0
let rec c0_COEFFICIENT_1076 = 0
let rec app_1030 x_DO_NOT_CARE_1216 x_DO_NOT_CARE_1217 ... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/termination/up_down05.ml | ocaml |
let rec bot _ = bot ()
let fail _ = assert false
let rec c5_COEFFICIENT_1082 = 0
let rec c4_COEFFICIENT_1081 = 0
let rec c3_COEFFICIENT_1080 = 0
let rec c2_COEFFICIENT_1078 = 0
let rec c1_COEFFICIENT_1077 = 0
let rec c0_COEFFICIENT_1076 = 0
let rec app_1030 x_DO_NOT_CARE_1216 x_DO_NOT_CARE_1217 ... | |
9b153c57b70434c578d0feac25e98ec046e6576d2ceee6371e07835a8ce271d5 | anonymous-admin/anonymous | tracker_interactor.erl | Author :
Creation Date : 2 - Nov-2011
-module(tracker_interactor).
-export([init/1,start_link/1,handle_cast/2,terminate/2]).
-export([handle_call/3, handle_info/2, code_change/3]).
-export([create_record/0, make_url/1, send_request/1, response_handler/1]).
-behaviour(gen_server).
-include("defs.hrl").
init([Tracker,... | null | https://raw.githubusercontent.com/anonymous-admin/anonymous/0d178f8f02dce74d5f76d78f81f70da9229a77cd/run%20Torrent%20client/tracker_interactor.erl | erlang | Author :
Creation Date : 2 - Nov-2011
-module(tracker_interactor).
-export([init/1,start_link/1,handle_cast/2,terminate/2]).
-export([handle_call/3, handle_info/2, code_change/3]).
-export([create_record/0, make_url/1, send_request/1, response_handler/1]).
-behaviour(gen_server).
-include("defs.hrl").
init([Tracker,... | |
0511863931fb839ffcd3228ba52ea78f1cb65f41134143f8492172f530378b57 | tadeuzagallo/verve-lang | Eval.hs | {-# LANGUAGE BangPatterns #-}
# OPTIONS_GHC -fno - warn - incomplete - patterns -fno - warn - incomplete - uni - patterns #
module Interpreter.Eval
( eval
, evalWithEnv
) where
import Core.Absyn
import Interpreter.Env
import qualified Interpreter.Value as Rt
import Data.List (find)
eval :: Term -> Rt.Value
eva... | null | https://raw.githubusercontent.com/tadeuzagallo/verve-lang/c7db1f5d4bb399b6c2623dd2444a981b5aba1aa4/src/Interpreter/Eval.hs | haskell | # LANGUAGE BangPatterns #
partial application
curry - is this a good idea?
nice
force strictness since this is the only place where side effects can happen
TODO: this hack with Halt is a bit sad
discard types from sums | # OPTIONS_GHC -fno - warn - incomplete - patterns -fno - warn - incomplete - uni - patterns #
module Interpreter.Eval
( eval
, evalWithEnv
) where
import Core.Absyn
import Interpreter.Env
import qualified Interpreter.Value as Rt
import Data.List (find)
eval :: Term -> Rt.Value
eval = snd . evalTerm defaultEnv
... |
e7eddc95c365d1e12b992e9b3a2f449477af565c3f6569c6b017111fd7583177 | onedata/op-worker | cdmi_streamer.erl | %%%--------------------------------------------------------------------
@author
@author
( C ) 2015 - 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%--------------------------------------------------------------------
%%% @doc
%%% Functions res... | null | https://raw.githubusercontent.com/onedata/op-worker/8a90006a45f1220c1e7b2809b694f85534ff5d29/src/http/cdmi/cdmi_streamer.erl | erlang | --------------------------------------------------------------------
@end
--------------------------------------------------------------------
@doc
Functions responsible for streaming content of files.
@end
--------------------------------------------------------------------
API
===================================... | @author
@author
( C ) 2015 - 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(cdmi_streamer).
-author("Tomasz Lichon").
-author("Bartosz Walkowicz").
-include("http/cdmi.hrl").
-include("http/rest.hrl").
-include("middleware/middleware.hrl").
-incl... |
6e1b7201d9d17e668a5a3807699eb2958849a63d18dcc8bcd56720a1c64f6882 | lem-project/lem | gray.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
swank-gray.lisp stream based IO redirection .
;;;
Created 2003
;;;
;;; This code has been placed in the Public Domain. All warranties
;;; are disclaimed.
;;;
(in-package micros/backend)
#.(progn
(defvar *gray-stream-symbols*
'(fundamental-character-out... | null | https://raw.githubusercontent.com/lem-project/lem/c1c3d35905bfd0c6d1af1df4f7c6a7f415a1c7e9/lib/micros/swank/gray.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
This code has been placed in the Public Domain. All warranties
are disclaimed.
buffer write lock.
Another alternative would be to grab the world-lock here, but that's less
future-proof, and could introduce other lock-ordering issues in the
future.
| swank-gray.lisp stream based IO redirection .
Created 2003
(in-package micros/backend)
#.(progn
(defvar *gray-stream-symbols*
'(fundamental-character-output-stream
stream-write-char
stream-write-string
stream-fresh-line
stream-force-output
stream-finish-output
fundam... |
fed0ef4fdca038f818d62b61fe2e53974fc8a5fe588317023c34b1314b626c77 | ghcjs/ghcjs | marshalString.hs | {-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI, OverloadedStrings #-}
module Main where
import Foreign.Ptr
import GHCJS.Types
import GHCJS.Foreign
import qualified Data.JSString as JSS
import qualified Data.JSString.Text as JSS
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
import qua... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ffi/marshalString.hs | haskell | # LANGUAGE ForeignFunctionInterface, JavaScriptFFI, OverloadedStrings # |
module Main where
import Foreign.Ptr
import GHCJS.Types
import GHCJS.Foreign
import qualified Data.JSString as JSS
import qualified Data.JSString.Text as JSS
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
import qualified Data.Text.Encoding.Error as TE
import qualified Data.ByteString as B
... |
0527ba1d515c4c8735df4ee147345554895b1290458ee21d79abb96a6a828da4 | hellonico/origami-fun | short_stream3.clj | (ns opencv4.video.short-stream3
(:require
[opencv4.core :refer :all]
[opencv4.video :as v]
[opencv4.utils :as u]))
(defn -main[ & args]
(u/simple-cam-window
(fn [buffer]
(u/resize-by buffer 0.5)
(let [ output (new-mat) bottom (-> buffer clone (flip! -1)) ]
(-> buffer (cvt-color! COLOR_... | null | https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/video/short_stream3.clj | clojure | (ns opencv4.video.short-stream3
(:require
[opencv4.core :refer :all]
[opencv4.video :as v]
[opencv4.utils :as u]))
(defn -main[ & args]
(u/simple-cam-window
(fn [buffer]
(u/resize-by buffer 0.5)
(let [ output (new-mat) bottom (-> buffer clone (flip! -1)) ]
(-> buffer (cvt-color! COLOR_... | |
c38d9faa0aff2b0f926081b985b44da5a4438bee237a597fd8408577c87034c8 | caiorss/Functional-Programming | taxbracket.hs |
---------------------------------------------------------------------------
TAX BRACKET CALCULATION
----------------------------------------------------------------------
Source : -tax-calculation-challenge
People seems to be more interested in answering the question than the co... | null | https://raw.githubusercontent.com/caiorss/Functional-Programming/ef3526898e3014e9c99bf495033ff36a4530503d/codes/taxbracket.hs | haskell | -------------------------------------------------------------------------
--------------------------------------------------------------------
----------------------------------------------------------------
-----------------------------------------------
------------------------------------------------------------... |
TAX BRACKET CALCULATION
Source : -tax-calculation-challenge
People seems to be more interested in answering the question than the code that solved it . Actually ,
people seemed to be more interested in outdoing one another in creating answers to that . What I found most
interest... |
b732a042e3b1a07e7360f2741f01f70cd1018e2519a3bd03d5f16f3f155c4745 | SamB/coq | implicit_quantifiers.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/interp/implicit_quantifiers.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id$ i
i
i | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Decl_kinds... |
f6bdd1c92d3970c3a074a2809f48b37d9100a727fb875a1e92f4e459e5bf227c | TrustInSoft/tis-kernel | ordered_stmt.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_services/analysis/ordered_stmt.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
210ebd8e2cc2c60ad02cb32a83a0ec6b275de7a3adb012850e2d107a0f6fcc82 | ucsd-progsys/dsolve | filename.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/stdlib/filename.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : filename.mli , v 1.35 2007/01... |
140da6a07c7ef37d1abbd90c8dda3de35a4a94c5acf52833620bbb200378c7cc | aaronallen8455/inventory | ProcessHie.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module DefCounts.ProcessHie
( DefCounter
, DefType(..)
, declLines
) where
import qualified Data.Array as A
import qualified Data.ByteString as BS
import Data.Map.Append.Strict (AppendMap(..))
import qualified Data.Map.Strict as M
import ... | null | https://raw.githubusercontent.com/aaronallen8455/inventory/e16244f2c3b920ec0caffc4b81d236219b78bd91/src/DefCounts/ProcessHie.hs | haskell | # LANGUAGE OverloadedStrings #
num lines
num occurrences
| Supports indexing into the source code by line number | # LANGUAGE LambdaCase #
module DefCounts.ProcessHie
( DefCounter
, DefType(..)
, declLines
) where
import qualified Data.Array as A
import qualified Data.ByteString as BS
import Data.Map.Append.Strict (AppendMap(..))
import qualified Data.Map.Strict as M
import Data.Monoid
import ... |
cbcf6090f7dd1fc81d4f3eb09cacb214d4aef927612d0974019d5683f5f4ff36 | gonzojive/hunchentoot | easy-handlers.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*-
$ Header : /usr / local / cvsrep / hunchentoot / easy - handlers.lisp , v 1.13 2008/02/13 16:02:17 edi Exp $
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with ... | null | https://raw.githubusercontent.com/gonzojive/hunchentoot/36e3a81655be0eeb8084efd853dd3ac3e5afc91b/easy-handlers.lisp | lisp | Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and t... | $ Header : /usr / local / cvsrep / hunchentoot / easy - handlers.lisp , v 1.13 2008/02/13 16:02:17 edi Exp $
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.