_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 |
|---|---|---|---|---|---|---|---|---|
699f18571b5929971ca7799fc7a05c27a5049809a32445b3c3ab809fc78b49dc | input-output-hk/ouroboros-network | Main.hs | module Main (main) where
import Test.Tasty
import qualified Test.Ouroboros.Network.Testing.Data.AbsBearerInfo as AbsBearerInfo
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests =
testGroup "ouroboros-network-testing"
[ AbsBearerInfo.tests
]
| null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/7f51891ae0af376b3e912d098e4082d32df30ffe/ouroboros-network-testing/test/Main.hs | haskell | module Main (main) where
import Test.Tasty
import qualified Test.Ouroboros.Network.Testing.Data.AbsBearerInfo as AbsBearerInfo
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests =
testGroup "ouroboros-network-testing"
[ AbsBearerInfo.tests
]
| |
f1c32b49102bf2a50dfe0209eb0fe0d1f898488344a018ecf26a7facda9cfd28 | camfort/fortran-src | Fortran2008Spec.hs | module Language.Fortran.Parser.Free.Fortran2008Spec ( spec ) where
import Test.Hspec
spec :: Spec
spec =
describe "Fortran 2008 Parser" $
it "TODO" pending
| null | https://raw.githubusercontent.com/camfort/fortran-src/a78ce84d4b0ce198ae765511b6c604a0663f8480/test/Language/Fortran/Parser/Free/Fortran2008Spec.hs | haskell | module Language.Fortran.Parser.Free.Fortran2008Spec ( spec ) where
import Test.Hspec
spec :: Spec
spec =
describe "Fortran 2008 Parser" $
it "TODO" pending
| |
abff8ed4e9ab60cb3dba6387dc1e90e76f05638953cc4742a8c5af59dbd6f5a1 | nushio3/learn-haskell | greet-using-string.hs | main :: IO ()
main = do
name <- getLine
putStrLn $ "Hello, " ++ name
| null | https://raw.githubusercontent.com/nushio3/learn-haskell/eda0fd0b33e9c4b7552afd24c6a25a105cca5f94/greet-using-string.hs | haskell | main :: IO ()
main = do
name <- getLine
putStrLn $ "Hello, " ++ name
| |
07e5f483ef249edd0408e1654f5490f9a8bd6172892c74924ff66188b2633f6d | SahilKang/cl-rdkafka | toppar.lisp | Copyright ( C ) 2018 - 2020 < >
;;;
;;; This file is part of cl-rdkafka.
;;;
;;; cl-rdkafka is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;; (at your option) any l... | null | https://raw.githubusercontent.com/SahilKang/cl-rdkafka/4d0b6f7f9b102769cb91a020e4e192a2ea066e0b/src/high-level/toppar.lisp | lisp |
This file is part of cl-rdkafka.
cl-rdkafka is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-rdkafka is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS... | Copyright ( C ) 2018 - 2020 < >
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
(in-package #:cl-rdkafka)
(defmacro foreach-toppar (toppar-list (&rest f... |
611ac001fb63afcdfbd97f2a3689368a8b8ea0a087ad3bea5906e46fc6c37898 | alpaca-lang/alpaca | stacktrace_tests.erl | -*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*-
ex : ts=4 sw=4 et
Copyright 2018
%%%
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
%%%
%%% ... | null | https://raw.githubusercontent.com/alpaca-lang/alpaca/aa2bb5594dda8292ca0bffb8e8a6ebc0f60e8dbc/test/stacktrace_tests.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | -*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*-
ex : ts=4 sw=4 et
Copyright 2018
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(stacktrace_tests).
-include_lib("eunit/include/... |
27fe928bff917512f5b89357f69170b9cab1630b856f7a9f4ecc6e30cd2ccbf8 | finkel-lang/finkel | import.hs | foreign import ccall safe "string.h strlen" -- Haskell
cstrlen :: Ptr CChar -> IO CSize
| null | https://raw.githubusercontent.com/finkel-lang/finkel/c3c7729d5228bd7e0cf76e8ff05fe2f79a0ec0a2/doc/include/language-syntax/ffi/import.hs | haskell | Haskell | cstrlen :: Ptr CChar -> IO CSize
|
7a667dd8a413dc7bb1ded3bf4659c79ed7c0b56e8897ee2f567559d67de2320e | andorp/mini-grin | Definitional.hs | # LANGUAGE LambdaCase , GeneralizedNewtypeDeriving , InstanceSigs , TypeFamilies , TemplateHaskell , ScopedTypeVariables #
module Grin.Interpreter.Definitional where
import Control.Monad (forM_, when)
import Control.Monad.Fail
import Control.Monad.Reader (MonadReader(..))
import Control.Monad.State (MonadState(..))
im... | null | https://raw.githubusercontent.com/andorp/mini-grin/99913efa0f81cb2a76893d3e48c6d025df9c40c9/grin/src/Grin/Interpreter/Definitional.hs | haskell | * Definitional Interpreter
* Test runs | # LANGUAGE LambdaCase , GeneralizedNewtypeDeriving , InstanceSigs , TypeFamilies , TemplateHaskell , ScopedTypeVariables #
module Grin.Interpreter.Definitional where
import Control.Monad (forM_, when)
import Control.Monad.Fail
import Control.Monad.Reader (MonadReader(..))
import Control.Monad.State (MonadState(..))
im... |
17742b7b037d8d8398678284744682e4981412a721371b12ef2c883354e01cee | acl2/acl2 | fixed-point-shift.cpp.ref.ast.lsp |
(funcdef rshift (x) (block (return (* (/ x (expt 2 1)) (expt 2 2)))))(funcdef lshift (x) (block (return (/ (/ x (expt 2 1)) (expt 2 2)))))
| null | https://raw.githubusercontent.com/acl2/acl2/c2d69bad0ed3132cc19a00cb632de8b73558b1f9/books/projects/rac/tests/yaml_test/ac_types/fixed-point-shift.cpp.ref.ast.lsp | lisp |
(funcdef rshift (x) (block (return (* (/ x (expt 2 1)) (expt 2 2)))))(funcdef lshift (x) (block (return (/ (/ x (expt 2 1)) (expt 2 2)))))
| |
8543c3f2d24782fc8dc9749509d2b4a7609ae3c6ef870ce5e4c19632e3160c17 | russross/cownfs | common.mli | Copyright 2004 , 2005
* See the file COPYING for information about licensing and distribution .
* See the file COPYING for information about licensing and distribution. *)
type priority = Read | Write | Link
type file = FhOnly of Fh.t | FhName of Fh.t * string
val mountFileName : string
type session = in... | null | https://raw.githubusercontent.com/russross/cownfs/cc67fae0294203a78b022d7300be8aa6c35c58af/common.mli | ocaml | Copyright 2004 , 2005
* See the file COPYING for information about licensing and distribution .
* See the file COPYING for information about licensing and distribution. *)
type priority = Read | Write | Link
type file = FhOnly of Fh.t | FhName of Fh.t * string
val mountFileName : string
type session = in... | |
935b86667ba1f33bf32d889f13e2f393a65dedd0282a5bd6d0624bc3f6f3948e | lemonidas/Alan-Compiler | QuadTypes.mli | type quad_elem_t =
|Quad_none (* Error Handling *)
|Quad_entry of Symbol.entry (* Symbol Table Entries *)
Dereferenced Symbol Entries
|Quad_int of string (* Constant Integers *)
|Quad_char of string (* Constant Characters ... | null | https://raw.githubusercontent.com/lemonidas/Alan-Compiler/bbedcbf91028d45a2e26839790df2a1347e8bc52/QuadTypes.mli | ocaml | Error Handling
Symbol Table Entries
Constant Integers
Constant Characters
Constant Strings | type quad_elem_t =
Dereferenced Symbol Entries
val string_of_quad_elem_t : quad_elem_t -> string
type quad_t =
|Quad_dummy
|Quad_unit of Symbol.entry
|Quad_endu of Symbol.entry
|Quad_calc of string * quad_elem_t * quad_elem_t * quad_elem_t
|Quad_set of quad_elem_t * quad_elem_t
|Quad_array of quad_elem_t * ... |
e222f24cee5b81810a0be42dffb74a2877374756c9318aeef58b61e4d5eab8c0 | botsunit/bucs | bucinet_tests.erl | -module(bucinet_tests).
-include_lib("eunit/include/eunit.hrl").
bucinet_test_() ->
{setup,
fun setup/0, fun teardown/1,
[
?_test(t_to_ip())
, ?_test(t_ip_to_string())
, ?_test(t_ip_to_binary())
, ?_test(t_active_ip())
, ?_test(t_loopback())
, ?_test(t_active_ips())
, ?_test(t_coun... | null | https://raw.githubusercontent.com/botsunit/bucs/792437befd259042efaf95e301dec019a5dd6ea4/test/bucinet_tests.erl | erlang | -module(bucinet_tests).
-include_lib("eunit/include/eunit.hrl").
bucinet_test_() ->
{setup,
fun setup/0, fun teardown/1,
[
?_test(t_to_ip())
, ?_test(t_ip_to_string())
, ?_test(t_ip_to_binary())
, ?_test(t_active_ip())
, ?_test(t_loopback())
, ?_test(t_active_ips())
, ?_test(t_coun... | |
43e4853a6eca5db7d87e0394a1de310ab989d60461be139de7f4d389711c95e1 | alang9/dynamic-graphs | gen-program.hs | import qualified Data.Graph.Dynamic.Program as Program
import qualified Data.Text.Lazy.IO as TL
import System.Environment (getArgs, getProgName)
import System.Exit (exitFailure)
import qualified System.IO as IO
import qualified Test.QuickCheck ... | null | https://raw.githubusercontent.com/alang9/dynamic-graphs/b88f001850c7bee8faa62099e93172a0bb0df613/benchmarks/hs/gen-program.hs | haskell | import qualified Data.Graph.Dynamic.Program as Program
import qualified Data.Text.Lazy.IO as TL
import System.Environment (getArgs, getProgName)
import System.Exit (exitFailure)
import qualified System.IO as IO
import qualified Test.QuickCheck ... | |
f50ac69946e56d3a666309ea003904fa44eb46b5c63cea525e303f7179f12114 | coccinelle/coccinelle | parse_string_c.mli | (* the result is reversed, as that is what is useful for the caller *)
val parse_string : (string * Ast_c.isWchar) -> Ast_c.info ->
Parser_c.token list
| null | https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/parsing_c/parse_string_c.mli | ocaml | the result is reversed, as that is what is useful for the caller | val parse_string : (string * Ast_c.isWchar) -> Ast_c.info ->
Parser_c.token list
|
87a119a20947c4145d0232ab610c5f11d0ba0a555102f903342ceb8879d47548 | klutometis/clrs | 15.1-1.scm | (require-extension syntax-case check srfi-11 foof-loop array-lib)
(require '../15.1/section)
(import section-15.1)
(let ((a (list->array 2
'((7 9 3 4 8 4)
(8 5 6 4 5 7))))
(t (list->array 2
'((2 3 1 3 4)
(2 1 2 2 1))))
(e0 2)
... | null | https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/15.1/15.1-1.scm | scheme | (require-extension syntax-case check srfi-11 foof-loop array-lib)
(require '../15.1/section)
(import section-15.1)
(let ((a (list->array 2
'((7 9 3 4 8 4)
(8 5 6 4 5 7))))
(t (list->array 2
'((2 3 1 3 4)
(2 1 2 2 1))))
(e0 2)
... | |
68d69e24b8cf43bcc765fe5ef7eddf54b3c6b4f21e6128269d96b85bb2c71574 | evturn/haskellbook | 10.10-warm-up-and-review.hs | 1 .
-- Given the following set of consonants and vowels:
stops :: String
stops = "pbtdkg"
vowels :: String
vowels = "aeiou"
-- a)
-- Write a function that takes inputs from `stops` and `vowels` and makes
3 - tuples of all possible stop - vowel - stop combinations .
stopVowelStop :: [(Char, Char, Char)]
stopVowelS... | null | https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/10/10.10-warm-up-and-review.hs | haskell | Given the following set of consonants and vowels:
a)
Write a function that takes inputs from `stops` and `vowels` and makes
b)
Modify that function so that it only returns the combinations that
begin with a 'p'.
c)
Set up lists of nouns and verbs and modify the function to make tuples
representing possible nou... | 1 .
stops :: String
stops = "pbtdkg"
vowels :: String
vowels = "aeiou"
3 - tuples of all possible stop - vowel - stop combinations .
stopVowelStop :: [(Char, Char, Char)]
stopVowelStop = [(s, v, s') | s <- stops, v <- vowels, s' <- stops]
stopVowelStopP :: [(Char, Char, Char)]
stopVowelStopP = [(s, v, s') | s <-... |
0b7a219a92dcbc6ce084bb6f2d7b6055fb807b88fc208fd219e61b628f9f3a50 | thelema/ocaml-community | thread.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
and , projet Cris... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/otherlibs/systhreads/thread.mli | ocaml | *********************************************************************
OCaml
... | and , projet Cristal , INRIA Rocquencourt
Copyright 1995 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
* Lightweight threads for [ 1003.1c ] and .
ty... |
ea35dbcb3e07700649adc3c7f81381da5c0947b2e0b4a99b0395af830e64bb0e | lambe-lang/mitch | t02_sum.ml | open Mitch.Lang.Term
open Mitch.Ir.Objcode
open Mitch.Ir.Render
open Mitch.System
open Preface.Result.Monad (struct
type t = string
end)
let compile s =
return s
>>= Transpiler.run
<&> Expander.run
>>= Optimiser.run
<&> Simplifier.run
<&> Normaliser.run
let compile_01 () =
let result = compile (Inl (... | null | https://raw.githubusercontent.com/lambe-lang/mitch/2c47f6627c3a219c31afd078836e9e7be3e26719/test/mitch/t02_sum.ml | ocaml | open Mitch.Lang.Term
open Mitch.Ir.Objcode
open Mitch.Ir.Render
open Mitch.System
open Preface.Result.Monad (struct
type t = string
end)
let compile s =
return s
>>= Transpiler.run
<&> Expander.run
>>= Optimiser.run
<&> Simplifier.run
<&> Normaliser.run
let compile_01 () =
let result = compile (Inl (... | |
5a8d1945255df8242dca14a6b13af5cbc6058e9250123e4943a05ec8ce3652e6 | fukamachi/caveman | skeleton.lisp | (in-package :cl-user)
(defpackage :caveman2.skeleton
(:use :cl)
(:export :make-project))
(in-package :caveman2.skeleton)
(defvar *skeleton-directory*
(asdf:system-relative-pathname :caveman2 #p"v2/skeleton/"))
(defun make-project (path &rest params &key name description author email license &allow-other-keys)
... | null | https://raw.githubusercontent.com/fukamachi/caveman/faa5f7e3b364fd7e7096af9a7bb06728b8d80441/v2/src/skeleton.lisp | lisp | (in-package :cl-user)
(defpackage :caveman2.skeleton
(:use :cl)
(:export :make-project))
(in-package :caveman2.skeleton)
(defvar *skeleton-directory*
(asdf:system-relative-pathname :caveman2 #p"v2/skeleton/"))
(defun make-project (path &rest params &key name description author email license &allow-other-keys)
... | |
b0f2cf601e639bec678696483fc559397733af4b396585445a05550b98d4a5ee | simingwang/emqx-plugin-kafkav5 | ssl.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1999 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/ssl-10.7/src/ssl.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1999 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Purpose : Main API module for the SSL application that implements TLS and DTLS
-module(ssl).
-include_lib("publ... |
3583b3cd48250b0fe28e5b291e995979e2e5dbb3ecc0da3fe53655059622e10e | deadpendency/deadpendency | TheMain.hs | module CRC.TheMain
( theMain,
)
where
import CRC.AppGoogleScopes (AppGoogleScopes)
import CRC.Loader.ComponentDetailsLoader (loadComponentDetails)
import CRC.Loader.ConfigLoader
import CRC.Model.AppContext (AppContext (..))
import CRC.Serve.Server (runServer)
import Common.Loader.CommonConfigLoader (loadCommonConf... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/check-run-creator/src/CRC/TheMain.hs | haskell | preload as crc will always do the initial install auth | module CRC.TheMain
( theMain,
)
where
import CRC.AppGoogleScopes (AppGoogleScopes)
import CRC.Loader.ComponentDetailsLoader (loadComponentDetails)
import CRC.Loader.ConfigLoader
import CRC.Model.AppContext (AppContext (..))
import CRC.Serve.Server (runServer)
import Common.Loader.CommonConfigLoader (loadCommonConf... |
79e2288d71738657af938d696081ecfee0dff1bf9f76888bc8ae2ef725484a54 | ocaml-omake/omake | omake_value_print.mli |
val pp_print_target : Omake_value_type.target Lm_printf.t
val pp_print_wild_list : Lm_wild.in_patt list Lm_printf.t
val pp_print_source_list : ('a * Omake_value_type.source_core) list Lm_printf.t
val pp_print_value : Omake_value_type.t Lm_printf.t
val pp_print_simple_value : Omak... | null | https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/ir/omake_value_print.mli | ocaml | Helpers, used in printing and for $(Fun.arity) function |
val pp_print_target : Omake_value_type.target Lm_printf.t
val pp_print_wild_list : Lm_wild.in_patt list Lm_printf.t
val pp_print_source_list : ('a * Omake_value_type.source_core) list Lm_printf.t
val pp_print_value : Omake_value_type.t Lm_printf.t
val pp_print_simple_value : Omak... |
5f091e5a882eacde0c25c745ab9f169b91295bd848fe52bc44f18d418eaa6fb8 | ucsd-progsys/dsolve | baseinst.ml | let _ = if true then assert false else 102
| null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/baseinst.ml | ocaml | let _ = if true then assert false else 102
| |
a0ed771b7567e4f7e775be10f1ef10474812d88b92ff527c9c46b15a2ce18416 | goldfirere/video-resources | Records.hs | # LANGUAGE TypeFamilies , FlexibleInstances , DataKinds , StandaloneKindSignatures ,
PolyKinds , MultiParamTypeClasses #
PolyKinds, MultiParamTypeClasses #-}
module Records where
import Data.Kind
data A = MkA { a_field :: Maybe B }
data B = MKB { b_field :: Maybe C }
data C = MkC { c_fiel... | null | https://raw.githubusercontent.com/goldfirere/video-resources/8bc06dd701f308564c13ac1b802f8812158636d0/2021-02-22-closed-type-family-trick/Records.hs | haskell | # LANGUAGE TypeFamilies , FlexibleInstances , DataKinds , StandaloneKindSignatures ,
PolyKinds , MultiParamTypeClasses #
PolyKinds, MultiParamTypeClasses #-}
module Records where
import Data.Kind
data A = MkA { a_field :: Maybe B }
data B = MKB { b_field :: Maybe C }
data C = MkC { c_fiel... | |
7429b9065a24df267a0457e7916d726c3334e673eb855fcbf5a943710857965a | melange-re/melange | res_parens.ml | open Import.Ast_406
module ParsetreeViewer = Res_parsetree_viewer
type kind = Parenthesized | Braced of Location.t | Nothing
let expr expr =
let optBraces, _ = ParsetreeViewer.processBracesAttr expr in
match optBraces with
| Some ({Location.loc = bracesLoc}, _) -> Braced(bracesLoc)
| _ ->
begi... | null | https://raw.githubusercontent.com/melange-re/melange/d6f41989ec092eea5a623171fe5e54e17fde0d10/jscomp/napkin/res_parens.ml | ocaml | readability? maybe remove
a && b || c, add parens to (a && b) for readability, who knows the difference by heart…
%extension.x vs (%extension).x | open Import.Ast_406
module ParsetreeViewer = Res_parsetree_viewer
type kind = Parenthesized | Braced of Location.t | Nothing
let expr expr =
let optBraces, _ = ParsetreeViewer.processBracesAttr expr in
match optBraces with
| Some ({Location.loc = bracesLoc}, _) -> Braced(bracesLoc)
| _ ->
begi... |
7308f55a9325218583ff3b2b5de6b7607db358a66855ff11c2740b2a38b54ad6 | cedlemo/OCaml-GI-ctypes-bindings-generator | Tool_item.ml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let create =
foreign "gtk_tool_item_new" (void @-> returning (ptr t_typ))
let get_ellipsize_mode =
foreign "gtk_tool_item_get_ellipsize_mode" (t_typ @-> returning (Ellipsize_mode.t_view))
let get_expand =
foreign "gtk_tool_item_get_expand" ... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Tool_item.ml | ocaml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let create =
foreign "gtk_tool_item_new" (void @-> returning (ptr t_typ))
let get_ellipsize_mode =
foreign "gtk_tool_item_get_ellipsize_mode" (t_typ @-> returning (Ellipsize_mode.t_view))
let get_expand =
foreign "gtk_tool_item_get_expand" ... | |
df1943abc5c875892cf2dda5c386a216841e955ce3dac40f50c24a41b976d39c | furkan3ayraktar/clojure-polylith-realworld-example-app | store_test.clj | (ns clojure.realworld.comment.store-test
(:require [clj-time.core :as t]
[clojure.java.jdbc :as jdbc]
[clojure.realworld.comment.store :as store]
[clojure.realworld.database.interface :as database]
[clojure.test :refer [deftest is use-fixtures]]))
(defn test-db
([] {... | null | https://raw.githubusercontent.com/furkan3ayraktar/clojure-polylith-realworld-example-app/7703ee7af93887ea600d1c05e400255303a6ed47/components/comment/test/clojure/realworld/comment/store_test.clj | clojure | (ns clojure.realworld.comment.store-test
(:require [clj-time.core :as t]
[clojure.java.jdbc :as jdbc]
[clojure.realworld.comment.store :as store]
[clojure.realworld.database.interface :as database]
[clojure.test :refer [deftest is use-fixtures]]))
(defn test-db
([] {... | |
2ba6b19acbed719ac93e43e628f83f0a6595faba852beb79f6670b3a99cea549 | NorfairKing/smos | Actions.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Smos.Docs.Site.Handler.Actions
( getSmosActionsR,
)
where
import Data.List
import Smos.Actions
import Smos.Docs.Site.Foundation
import Smos.Types
getSmosActionsR :: Handler Html
getSmosAct... | null | https://raw.githubusercontent.com/NorfairKing/smos/3bb953f467d83aacec1ce1dd59b687c87258559e/smos-docs-site/src/Smos/Docs/Site/Handler/Actions.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Smos.Docs.Site.Handler.Actions
( getSmosActionsR,
)
where
import Data.List
import Smos.Actions
import Smos.Docs.Site.Foundation
import Smos.Types
getSmosActionsR :: Handler Html
getSmosActionsR =
defaultLayout $ do
se... |
5142545a77ac72d5314ff8f58d7704bd5e7d39f5c9a8b3416b75e8e791588733 | ghc/testsuite | tcfail156.hs | # LANGUAGE ExistentialQuantification #
-- Illegal existential context on a newtype
module ShouldFail where
newtype Foo = forall a . Foo a
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail156.hs | haskell | Illegal existential context on a newtype | # LANGUAGE ExistentialQuantification #
module ShouldFail where
newtype Foo = forall a . Foo a
|
ac151f7561a8925b2136443f499212fc606bdff75725ce358cdbf657f3cb69ce | jrh13/hol-light | holby.ml | (* ========================================================================= *)
A HOL " by " tactic , doing - like things , trying something that is
sufficient for HOL 's basic rules , trying a few other things like
(* arithmetic, and finally if all else fails using MESON_TAC[]. *)
(* ... | null | https://raw.githubusercontent.com/jrh13/hol-light/8822aa45052e2ec5f9608e79aa3ec7bc84abedf8/Examples/holby.ml | ocaml | =========================================================================
arithmetic, and finally if all else fails using MESON_TAC[].
=========================================================================
-------------------------------------------------------------------------
More refined ne... | A HOL " by " tactic , doing - like things , trying something that is
sufficient for HOL 's basic rules , trying a few other things like
let matching_enter tm y net =
enter [] (tm,((fun tm' -> can (term_match [] tm) tm'),y)) net;;
let unconditional_enter (tm,y) net =
enter [] (tm,((fun t -> t... |
428e7fc98e884fe50c9fef2c905a4124578b92f0ec1448a373767f877aa53fe6 | plumatic/fnhouse | handlers.clj | (ns fnhouse.handlers
"Utilities for turning a set of fnhouse handlers into an API description.
A fnhouse handler is an ordinary Clojure function that accepts a map
with two keys:
:request is a Ring-style request [1] (see fnhouse.schemas/Request)
:resources is an arbitrary map of resources (e.g., dat... | null | https://raw.githubusercontent.com/plumatic/fnhouse/e27ec5649a91470b63285ef9e28c6a77494f7ffd/src/fnhouse/handlers.clj | clojure |
Private schemas
Extracting handler info from a fnhouse handler var
| (ns fnhouse.handlers
"Utilities for turning a set of fnhouse handlers into an API description.
A fnhouse handler is an ordinary Clojure function that accepts a map
with two keys:
:request is a Ring-style request [1] (see fnhouse.schemas/Request)
:resources is an arbitrary map of resources (e.g., dat... |
8942b79175a1093cce3a9c1b23051a8b288438eeba8b3ea27cd2e59957ef1593 | McCLIM/McCLIM | package.lisp | (defpackage #:clim-null
(:use #:clim #:clim-lisp #:clim-backend)
(:import-from #:climi #:maybe-funcall))
| null | https://raw.githubusercontent.com/McCLIM/McCLIM/c079691b0913f8306ceff2620b045b6e24e2f745/Backends/Null/package.lisp | lisp | (defpackage #:clim-null
(:use #:clim #:clim-lisp #:clim-backend)
(:import-from #:climi #:maybe-funcall))
| |
0acd119a3d1fae0e8bb517f07d28d35257523a2542ca80b5e583c8da1637fc3d | Rotaerk/vulkanTest | Framebuffer.hs | module Graphics.VulkanAux.Framebuffer where
import Data.Reflection
import Graphics.Vulkan.Core_1_0
import Graphics.Vulkan.Marshal.Create
import Graphics.VulkanAux.Resource
vkaFramebufferResource :: Given VkDevice => VkaResource VkFramebufferCreateInfo VkFramebuffer
vkaFramebufferResource = vkaSimpleParamResource_ vkC... | null | https://raw.githubusercontent.com/Rotaerk/vulkanTest/beafd3cc27ba60561b9e76cd0058e30949a5affb/sandbox/sandbox/src/Graphics/VulkanAux/Framebuffer.hs | haskell | module Graphics.VulkanAux.Framebuffer where
import Data.Reflection
import Graphics.Vulkan.Core_1_0
import Graphics.Vulkan.Marshal.Create
import Graphics.VulkanAux.Resource
vkaFramebufferResource :: Given VkDevice => VkaResource VkFramebufferCreateInfo VkFramebuffer
vkaFramebufferResource = vkaSimpleParamResource_ vkC... | |
ce542a71d3cd33541078622b7c2c3d4611e1996595de45eadfb61b3eb385eed1 | BinaryAnalysisPlatform/bap-frames | frame_enum.mli | open Core_kernel
module type Enumerated = sig
type t
val rank : t -> int
val all : t list
end
(** Replaces [@@deriving enum] interface from ppx_deriving, that
treats variants with argument-less constructors as
enumerations with an integer value assigned to every constructor. *)
module type Enumerable = ... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap-frames/c9f957492c13106171b04914dab4badc9ff5bcad/lib/frame_enum.mli | ocaml | * Replaces [@@deriving enum] interface from ppx_deriving, that
treats variants with argument-less constructors as
enumerations with an integer value assigned to every constructor. | open Core_kernel
module type Enumerated = sig
type t
val rank : t -> int
val all : t list
end
module type Enumerable = sig
type t
val to_enum : t -> int
val of_enum : int -> t option
val max : int
val min : int
end
module type Substitution = sig
include Enumerated
* [ subs ] is a list of substiti... |
da0f7e9989efed11bf272fa599faee11c4b2e42c396d3b1972bb29d7b5913cf5 | overtone/overtone | fx.clj | (ns
^{:doc "Audio effects library"
:author "Jeff Rose"}
overtone.studio.fx
(:use [overtone.libs.event]
[overtone.sc.synth]
[overtone.sc.ugens]))
(def BITS 32)
(defsynth fx-noise-gate
"A noise gate only lets audio above a certain amplitude threshold through. Often used to filter out ha... | null | https://raw.githubusercontent.com/overtone/overtone/9afb513297662716860a4010bc76a0e73c65ca37/src/overtone/studio/fx.clj | clojure | Equation for distortion:
k = 2*amount/(1-amount) | (ns
^{:doc "Audio effects library"
:author "Jeff Rose"}
overtone.studio.fx
(:use [overtone.libs.event]
[overtone.sc.synth]
[overtone.sc.ugens]))
(def BITS 32)
(defsynth fx-noise-gate
"A noise gate only lets audio above a certain amplitude threshold through. Often used to filter out ha... |
10cc8884e6d6578c607e111003c27058bf1a8a7b4a6a0fe38da10d60b96543af | ranjitjhala/haddock-annot | Builtin.hs | -----------------------------------------------------------------------------
-- |
Module : Distribution . Simple . Program . Builtin
Copyright : 2006 , 2007 - 2009
--
-- Maintainer :
-- Portability : portable
--
The module defines all the known built - in ' Program 's .
--
-- Where possible ... | null | https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/Cabal-1.10.1.1/Distribution/Simple/Program/Builtin.hs | haskell | ---------------------------------------------------------------------------
|
Maintainer :
Portability : portable
Where possible we try to find their version numbers.
* The collection of unconfigured and configured progams
------------------------------------------------------------
* Known programs
---... | Module : Distribution . Simple . Program . Builtin
Copyright : 2006 , 2007 - 2009
The module defines all the known built - in ' Program 's .
module Distribution.Simple.Program.Builtin (
builtinPrograms,
* Programs that knows about
ghcProgram,
ghcPkgProgram,
lhcProgram,
lh... |
53f34e68a65585568378f1333710b5437ecc4ae474faa5247c9de47fa5de9364 | simmone/racket-simple-xlsx | plot-vis-only-test.rkt | #lang racket
(require simple-xml)
(require rackunit/text-ui rackunit)
(require "../../../../xlsx/xlsx.rkt")
(require "../../../../sheet/sheet.rkt")
(require "../../../../lib/lib.rkt")
(require"../../../../xl/charts/lib.rkt")
(require racket/runtime-path)
(define-runtime-path plot_vis_only_file "plot_vis_only.xml")... | null | https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/xl/charts/lib/plot-vis-only-test.rkt | racket | #lang racket
(require simple-xml)
(require rackunit/text-ui rackunit)
(require "../../../../xlsx/xlsx.rkt")
(require "../../../../sheet/sheet.rkt")
(require "../../../../lib/lib.rkt")
(require"../../../../xl/charts/lib.rkt")
(require racket/runtime-path)
(define-runtime-path plot_vis_only_file "plot_vis_only.xml")... | |
098b42aa9923f933684bcecd6242ae124cb0dbaa0debda54b8b3f2a00570ba2c | coccinelle/herodotos | diff_type.mli | type difftype =
GNUDiff of string
| Gumtree of string
| Hybrid of string
| null | https://raw.githubusercontent.com/coccinelle/herodotos/5da230a18962ca445ed2368bc21abe0a8402e00f/herodotos/diff/diff_type.mli | ocaml | type difftype =
GNUDiff of string
| Gumtree of string
| Hybrid of string
| |
d3d1aea6417da93bedc5a02a0bff09fdfc50b4c832793c008487aa7f05239d9e | gwathlobal/CotD | init-terrain-types.lisp | (in-package :cotd)
;;--------------------
TERRAIN - TEMPLATE Declarations
;;--------------------
;;--------------------
Borders
;;--------------------
(set-terrain-type (make-instance 'terrain-type :id +terrain-border-floor+ :name "dirt"
:glyph-idx 95 ... | null | https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/init-terrain-types.lisp | lisp | --------------------
--------------------
--------------------
--------------------
--------------------
Floors
--------------------
--------------------
Walls
--------------------
--------------------
Trees
--------------------
--------------------
Furniture
--------------------
------------------... | (in-package :cotd)
TERRAIN - TEMPLATE Declarations
Borders
(set-terrain-type (make-instance 'terrain-type :id +terrain-border-floor+ :name "dirt"
:glyph-idx 95 :glyph-color (sdl:color :r 205 :g 103 :b 63) :back-color sdl:*black*
... |
ba0604e7e767a986dd2d2479304998ec7909bd7308e12b351cf30eab457ba383 | footprintanalytics/footprint-web | slack.clj | (ns metabase.integrations.slack
(:require [cheshire.core :as json]
[clj-http.client :as http]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[java-time :as t]
[medley.core :as m]
[metabase.email.mess... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/integrations/slack.clj | clojure | Slack integration is broken. In practice, the "account_inactive" error code is the one that is most likely to be
Check `slack-token-valid?` before sending emails to avoid sending repeat emails for the same invalid token.
We should send an email if `slack-token-valid?` is `true` or `nil` (i.e. a pre-existing bot inte... | (ns metabase.integrations.slack
(:require [cheshire.core :as json]
[clj-http.client :as http]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[java-time :as t]
[medley.core :as m]
[metabase.email.mess... |
8660771360c49fa58a7d1580c7ae07239ca0977a5a9c98faf14a4c6c203a6acc | FundingCircle/md2c8e | cli.clj | (ns md2c8e.cli
(:require [cli-matic.core :refer [run-cmd]]
[clojure.java.io :as io :refer [file]]
[clojure.main :as cm]
[cognitect.anomalies :as anom]
[md2c8e.anomalies :refer [anom]]
[md2c8e.confluence :as c8e :refer [make-client]]
[md2c8e.core ... | null | https://raw.githubusercontent.com/FundingCircle/md2c8e/6c93eba8676c8c80af371a44c173704fe0461232/src/md2c8e/cli.clj | clojure | source-file-relative-path
TODO: Make threads a command-line option
(validate pt)
I think it’s sensible to consider `summarize` semi-optional, to the degree that if it
:default :present means required ¯\_(ツ)_/¯ | (ns md2c8e.cli
(:require [cli-matic.core :refer [run-cmd]]
[clojure.java.io :as io :refer [file]]
[clojure.main :as cm]
[cognitect.anomalies :as anom]
[md2c8e.anomalies :refer [anom]]
[md2c8e.confluence :as c8e :refer [make-client]]
[md2c8e.core ... |
58d7d2275b17811e44cdf64186056e59639578a3b1cc45880be82e074306f2c3 | Mercerenies/net-game | numbernoun.lisp | (in-package #:net-game)
(defparameter *numerical* nil)
(defun assign-numbers (&rest lists)
"Assigns numbers to every element in each of the lists. Sets the
global *numerical* variable to be an alist of numbers associated
with objects."
(check-type *numerical* list "an associative list")
(setf *numerical*
... | null | https://raw.githubusercontent.com/Mercerenies/net-game/da30ca36a7f468e6f9c062fd7bc5e4fed4ee95f9/lisp/numbernoun.lisp | lisp | (in-package #:net-game)
(defparameter *numerical* nil)
(defun assign-numbers (&rest lists)
"Assigns numbers to every element in each of the lists. Sets the
global *numerical* variable to be an alist of numbers associated
with objects."
(check-type *numerical* list "an associative list")
(setf *numerical*
... | |
f1a593539f3a78c88ffe827826da07b25d36086280dcfb236b04ed52731223b6 | mirage/bechamel | ext.mli | module Make (Functor : S.FUNCTOR) : sig
XXX(dinosaure ): only on [ > = 4.06.0 ]
type t = private ..
module type Extension = sig
type x
type t += T of x
end
type 'a extension = (module Extension with type x = 'a)
type instance = V : 'a * 'a Functor.t -> instance
module Injection (X : sig
typ... | null | https://raw.githubusercontent.com/mirage/bechamel/7a0aebef3c2ec266db97385264be74274bdc4765/lib/ext.mli | ocaml | module Make (Functor : S.FUNCTOR) : sig
XXX(dinosaure ): only on [ > = 4.06.0 ]
type t = private ..
module type Extension = sig
type x
type t += T of x
end
type 'a extension = (module Extension with type x = 'a)
type instance = V : 'a * 'a Functor.t -> instance
module Injection (X : sig
typ... | |
bd8f76d6eb17cc0cf10fe191acf8dd7cca2f6af6834d6dca35ca01e9dc7f1532 | kztk-m/sparcl | Multiplicity.hs | module Language.Sparcl.Multiplicity where
import Language.Sparcl.Pretty
data Multiplicity = One | Omega
deriving (Eq, Ord, Show)
instance Pretty Multiplicity where
ppr One = text "One"
ppr Omega = text "Omega"
instance Bounded Multiplicity where
minBound = One
maxBound = Omega
class Multipli... | null | https://raw.githubusercontent.com/kztk-m/sparcl/f52d333ce50e0aa6cb307da08811719f8c684f7d/src/Language/Sparcl/Multiplicity.hs | haskell | module Language.Sparcl.Multiplicity where
import Language.Sparcl.Pretty
data Multiplicity = One | Omega
deriving (Eq, Ord, Show)
instance Pretty Multiplicity where
ppr One = text "One"
ppr Omega = text "Omega"
instance Bounded Multiplicity where
minBound = One
maxBound = Omega
class Multipli... | |
9936d745c6ba8d5a52748ae8a05417cdb63ef23d2e361ebf87d76fd4294dbad1 | carocad/clemence | edit_test.clj | (ns clemence.edit-test
(:require [clojure.test :refer :all]
[clemence.core :as clemence]
[criterium.core :as crit]
[ : as tc ]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.test.check.clojure-test :refer [defspec]... | null | https://raw.githubusercontent.com/carocad/clemence/ee6504d05717aa695e5c5047d01bd3fef7ea8325/test/clemence/edit_test.clj | clojure | -------------------------------------------------------------------
The levenshtein distance is simmetric, thus the order of the comparison
leven (P,Q) = leven (Q, P)
tries
-------------------------------------------------------------------
The levenshtein distance is a true metric, thus the triangle-innequality
... | (ns clemence.edit-test
(:require [clojure.test :refer :all]
[clemence.core :as clemence]
[criterium.core :as crit]
[ : as tc ]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.test.check.clojure-test :refer [defspec]... |
ac30a554ec0d63d6e9952bc34b818dd50bb793805db3743e7fb19e1f1f0fe0a2 | dizengrong/erlang_game | chat_dict.erl | @author dzR < >
%% @doc 聊天频道的字典数据
-module (chat_dict).
-include ("chat.hrl").
-export ([init/1]).
-export ([get_chat_room_rec/2, set_chat_room_rec/2, delete_chat_room_rec/2]).
-export ([get_chat_entity_rec/2, set_chat_entity_rec/2, delete_chat_entity_rec/2]).
-export ([get_world_chat_member/1,
add_world_chat_... | null | https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl/src/chat/chat_dict.erl | erlang | @doc 聊天频道的字典数据
@doc 操作chat_room的接口
@doc 私聊的实体操作接口
@doc 操作世界聊天成员的接口 | @author dzR < >
-module (chat_dict).
-include ("chat.hrl").
-export ([init/1]).
-export ([get_chat_room_rec/2, set_chat_room_rec/2, delete_chat_room_rec/2]).
-export ([get_chat_entity_rec/2, set_chat_entity_rec/2, delete_chat_entity_rec/2]).
-export ([get_world_chat_member/1,
add_world_chat_member/2, delete_w... |
87f13860055d65d0485a9348f74dd14ac48acb808f145624f8392bec78e49931 | homebaseio/datalog-console | main.cljs | (ns datalog-console.chrome.extension.devtool.main
{:no-doc true}
(:require [clojure.edn]
[cljs.reader]
[reagent.dom :as rdom]
[datalog-console.client :as console]))
(println ::loaded)
(defn mount! []
(rdom/render [console/root] (js/document.getElementById "root")))
(defn i... | null | https://raw.githubusercontent.com/homebaseio/datalog-console/21b2c88b88b1964ef0135f36a257d99da43cce87/src/main/datalog_console/chrome/extension/devtool/main.cljs | clojure | (ns datalog-console.chrome.extension.devtool.main
{:no-doc true}
(:require [clojure.edn]
[cljs.reader]
[reagent.dom :as rdom]
[datalog-console.client :as console]))
(println ::loaded)
(defn mount! []
(rdom/render [console/root] (js/document.getElementById "root")))
(defn i... | |
c9304c0c7f3ba8957a29364941752908ee3a7873c4b5782ced29b3d8d22af264 | hgoes/smtlib2 | Verify.hs | module Language.SMTLib2.Internals.Proof.Verify where
import qualified Language.SMTLib2.Internals.Backend as B
import Language.SMTLib2.Internals.Monad
import Language.SMTLib2.Internals.Embed
import Language.SMTLib2.Internals.Proof
import Language.SMTLib2
import qualified Language.SMTLib2.Internals.Expression as E
impo... | null | https://raw.githubusercontent.com/hgoes/smtlib2/c35747f2a5a9ec88dc7b1db41a5aab6e98c0458d/Language/SMTLib2/Internals/Proof/Verify.hs | haskell | verifyZ3Rule i "transitivity" | module Language.SMTLib2.Internals.Proof.Verify where
import qualified Language.SMTLib2.Internals.Backend as B
import Language.SMTLib2.Internals.Monad
import Language.SMTLib2.Internals.Embed
import Language.SMTLib2.Internals.Proof
import Language.SMTLib2
import qualified Language.SMTLib2.Internals.Expression as E
impo... |
b56290c574cd04912f6fef323e8dc6416b6f7c3c17fc508058d42815a49bfa23 | dreixel/regular | Selector.hs | # LANGUAGE KindSignatures #
-----------------------------------------------------------------------------
-- |
-- Module : Generics.Regular.Selector
Copyright : ( c ) 2008 Universiteit Utrecht
-- License : BSD3
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
--... | null | https://raw.githubusercontent.com/dreixel/regular/c8460ee827f1eb04dd31b873380ff9626a4a4220/src/Generics/Regular/Selector.hs | haskell | ---------------------------------------------------------------------------
|
Module : Generics.Regular.Selector
License : BSD3
Stability : experimental
Portability : non-portable
Summary: Representation for record selectors.
-----------------------------------------------------------------------... | # LANGUAGE KindSignatures #
Copyright : ( c ) 2008 Universiteit Utrecht
Maintainer :
module Generics.Regular.Selector (Selector(..)) where
class Selector s where
selName :: t s (f :: * -> *) r -> String
|
0b733219b7d065cd72ec2b9b499fe70969b77988b0a1128c1049706e80136c41 | runtimeverification/haskell-backend | Location.hs | |
Module : . Attribute . Location
Description : Line / column location attribute
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Maintainer :
Module : Kore.Attribute.Location
Description : Line/column location attribute
Copyright : (c) Runtime Verific... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/b06757e252ee01fdd5ab8f07de2910711997d845/kore/src/Kore/Attribute/Location.hs | haskell | | Kore identifier representing the @location@ attribute symbol. | |
Module : . Attribute . Location
Description : Line / column location attribute
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Maintainer :
Module : Kore.Attribute.Location
Description : Line/column location attribute
Copyright : (c) Runtime Verific... |
68410987f04c683e71f406426ffa943620bc6bcae195bee1c391b119606b933e | PEZ/pirate-lang | seven_segmemts.clj | (ns pez.lab.seven-segments
(:require [clojure.string :as string]))
(defn transpose [v]
(->> v
(remove nil?)
(apply mapv vector)))
(def seven-segment-alphabet
{\a ["#### "
"# # "
"#### "
"# # "
"# # "]
\b ["# "
"# "
"#### "
"# # "
... | null | https://raw.githubusercontent.com/PEZ/pirate-lang/a4c8b3431d2ef98ae386ccde822d3e98c30c297f/src/pez/lab/seven_segmemts.clj | clojure | (ns pez.lab.seven-segments
(:require [clojure.string :as string]))
(defn transpose [v]
(->> v
(remove nil?)
(apply mapv vector)))
(def seven-segment-alphabet
{\a ["#### "
"# # "
"#### "
"# # "
"# # "]
\b ["# "
"# "
"#### "
"# # "
... | |
d8fa5ef9feb40f6bcb18b387651d4f18c515b092f94b0227d1f705807c6a88ae | mbutterick/beautiful-racket | test-sources.rkt | #lang at-exp br
(require br/test rackunit)
(check-equal? (run-source "sample.rkt") "one
three
4
")
(check-equal? (run-source "sample-var.rkt") "15
75
")
(check-equal? (run-source "sample-math.rkt") "1
1
1
1
1
1
1
")
(check-equal? (run-source "sample-gosub.rkt") "hello
world
third
hi
")
(check-equal? (run-source "sam... | null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/basic-demo-2/test-sources.rkt | racket | #lang at-exp br
(require br/test rackunit)
(check-equal? (run-source "sample.rkt") "one
three
4
")
(check-equal? (run-source "sample-var.rkt") "15
75
")
(check-equal? (run-source "sample-math.rkt") "1
1
1
1
1
1
1
")
(check-equal? (run-source "sample-gosub.rkt") "hello
world
third
hi
")
(check-equal? (run-source "sam... | |
55d3dcf77f101c494edcab8670ec7e00d22d771a0605f2ad7a7bddf09a5dbe97 | EveryTian/Haskell-Codewars | playing-with-digits.hs | -- -with-digits
module Codewars.Kata.DigPow where
import Data.Char
digpow :: Integer -> Integer -> Integer
digpow n p = let intList = map (\ x -> ord x - ord '0') $ show n
sumAll s _ [] = s
sumAll s curp (x:xs) = sumAll (s + x ^ curp) (curp + 1) xs
sumOfAll = sumAll 0... | null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/6kyu/playing-with-digits.hs | haskell | -with-digits |
module Codewars.Kata.DigPow where
import Data.Char
digpow :: Integer -> Integer -> Integer
digpow n p = let intList = map (\ x -> ord x - ord '0') $ show n
sumAll s _ [] = s
sumAll s curp (x:xs) = sumAll (s + x ^ curp) (curp + 1) xs
sumOfAll = sumAll 0 p intList
... |
6634c5de2f2a93e28e037ff7e704a06bd94d556bf6c9daccf8ed46e869f728ac | ndmitchell/weeder | Hi.hs | # LANGUAGE DeriveGeneric , RecordWildCards , , OverloadedStrings #
module Hi(
HiKey(), Hi(..), Ident(..),
hiParseDirectory
) where
import qualified Data.HashSet as Set
import qualified Data.HashMap.Lazy as Map
import System.Console.CmdArgs.Verbosity
import System.FilePath
import System.Directory.Extra
im... | null | https://raw.githubusercontent.com/ndmitchell/weeder/3bc7ee09de6faf34cd60a0f4554aa1baf36f25e8/src/Hi.hs | haskell | ^ Module name
^ Packages imported by this module
^ Identifiers exported by this module
^ Identifiers used by this module
^ Modules imported and used by this module
^ Orphans that are in scope in this module
^ Modules imported from other packages
^ Type signatures of functions defined in this module and the type... | # LANGUAGE DeriveGeneric , RecordWildCards , , OverloadedStrings #
module Hi(
HiKey(), Hi(..), Ident(..),
hiParseDirectory
) where
import qualified Data.HashSet as Set
import qualified Data.HashMap.Lazy as Map
import System.Console.CmdArgs.Verbosity
import System.FilePath
import System.Directory.Extra
im... |
fe5bdee83a53ce66184a5996f9764c7aee02cf1784af00a54a0abf522fa5dc9b | samrushing/irken-compiler | t17.scm |
(datatype bool (:true) (:false))
(define (random)
(%%cexp (-> int) "random()"))
;; hmmm... think about defining a *boxed* (rather than tagged) type that will
;; hold a pointer. [or maybe better... consider switching to untagged ints
;; and having something like a 'stack map' for the gc that knows the type
;; ... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t17.scm | scheme | hmmm... think about defining a *boxed* (rather than tagged) type that will
hold a pointer. [or maybe better... consider switching to untagged ints
and having something like a 'stack map' for the gc that knows the type
of everything on the stack] |
(datatype bool (:true) (:false))
(define (random)
(%%cexp (-> int) "random()"))
(define (malloc n)
(%%cexp (int -> int) "(pxll_int)malloc(%0)" n))
(define (free n)
(%%cexp (int -> undefined) "free((void*)%0); IRK_UNDEFINED" n))
(define (write-int p n)
(%%cexp (int int -> undefined) "(*(pxll_int *)(%0)) = ... |
ff3376dfcce4e78ee29e7d23cd659b728081eb8764d9c7282e1eeb608b023c74 | danlentz/cl-wal | package.lisp | (in-package :common-lisp-user)
;;(require :unit-test)
(defpackage wal
(:use :cl) ;;:unit-test
(:shadow #:open #:close #:write)
(:export #:wal
#:open
#:close
#:write
#:commit
#:rollback
#:recover))
| null | https://raw.githubusercontent.com/danlentz/cl-wal/8b577882488daeeb57efee3971bc26ce91744993/package.lisp | lisp | (require :unit-test)
:unit-test | (in-package :common-lisp-user)
(defpackage wal
(:shadow #:open #:close #:write)
(:export #:wal
#:open
#:close
#:write
#:commit
#:rollback
#:recover))
|
513512327b9d3a73d17f3a28cf6df75415b688c943dff4c13ef1ad64c932c1fb | huangz1990/SICP-answers | 47-selector-for-make-frame-using-cons.scm | ;;; 47-selector-for-make-frame-using-cons.scm
(define (origin-frame frame)
(car frame))
(define (edge1-frame frame)
(cadr frame))
(define (edge2-frame frame)
(cddr frame))
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/old_chp2/code/47-selector-for-make-frame-using-cons.scm | scheme | 47-selector-for-make-frame-using-cons.scm |
(define (origin-frame frame)
(car frame))
(define (edge1-frame frame)
(cadr frame))
(define (edge2-frame frame)
(cddr frame))
|
71a7083b8201f136afdf97afef114032f858348656605d768bc45fe29d782ed0 | ucsd-progsys/liquidhaskell | Misc.hs | # LANGUAGE FlexibleContexts #
module Language.Haskell.Liquid.Bare.Misc
( joinVar
, mkVarExpr
, vmap
, runMapTyVars
, matchKindArgs
, symbolRTyVar
, simpleSymbolVar
, hasBoolResult
, isKind
) where
import Prelude hiding (error)
import Liq... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/5e9347ac719e0ca192b05ccde74617d0cbb05a85/src/Language/Haskell/Liquid/Bare/Misc.hs | haskell | (fromMaybe, isNothing)
import Language.Haskell.Liquid.Bare.Env
import Language.Haskell.Liquid.WiredIn (dcPrefix)
TODO: This is where unsorted stuff is for now. Find proper places for what follows.
WTF does this function do ?
arguments should be basic so that autogenerated singleton types... | # LANGUAGE FlexibleContexts #
module Language.Haskell.Liquid.Bare.Misc
( joinVar
, mkVarExpr
, vmap
, runMapTyVars
, matchKindArgs
, symbolRTyVar
, simpleSymbolVar
, hasBoolResult
, isKind
) where
import Prelude hiding (error)
import Liq... |
7122273d38d7f1a2629fb09de6d40e60826dc75cb16e1f2cd08843996f258dc3 | tolysz/ghcjs-stack | HDC.hs | #if __GLASGOW_HASKELL__ >= 701
# LANGUAGE Trustworthy #
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Graphics.Win32.GDI.HDC
Copyright : ( c ) , 1997 - 2003
-- License : BSD-style (see the file libraries/base/LICENSE)
--
Maintainer : Vu... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/Win32/Graphics/Win32/GDI/HDC.hs | haskell | ---------------------------------------------------------------------------
|
Module : Graphics.Win32.GDI.HDC
License : BSD-style (see the file libraries/base/LICENSE)
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
See N... | #if __GLASGOW_HASKELL__ >= 701
# LANGUAGE Trustworthy #
#endif
Copyright : ( c ) , 1997 - 2003
Maintainer : Vuokko < >
A collection of FFI declarations for interfacing with Win32 .
module Graphics.Win32.GDI.HDC
( module Graphics.Win32.GDI.HDC
) where
#ifndef ghcjs_HOST_OS
import System.Win32.Ty... |
0b3d504174c13a4645163f3511b53bf0d5e38b27abfe58442ff36668893daa8f | metabase/metabase | describe_table.clj | (ns metabase.driver.sql-jdbc.sync.describe-table
"SQL JDBC impl for `describe-table`, `describe-table-fks`, and `describe-nested-field-columns`."
(:require
[cheshire.core :as json]
[clojure.java.jdbc :as jdbc]
[clojure.set :as set]
[clojure.string :as str]
[medley.core :as m]
[metabase.db.metadata... | null | https://raw.githubusercontent.com/metabase/metabase/b820fa55df837b14064983ef39f82af39d4db59a/src/metabase/driver/sql_jdbc/sync/describe_table.clj | clojure | Using our SQL compiler here to get portable LIMIT (e.g. `SELECT TOP n ...` for SQL Server/Oracle)
#getColumns(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)
IT'S TIME TO START EVALUATING THAT.
We put top-level array row type semantics on JSON roadmap but skip for now
Losing digits ... | (ns metabase.driver.sql-jdbc.sync.describe-table
"SQL JDBC impl for `describe-table`, `describe-table-fks`, and `describe-nested-field-columns`."
(:require
[cheshire.core :as json]
[clojure.java.jdbc :as jdbc]
[clojure.set :as set]
[clojure.string :as str]
[medley.core :as m]
[metabase.db.metadata... |
809fdb06e9311232aa3c0c389b3f5459e79d45f3481f377ecf53227f2a04e93a | realworldocaml/examples | ext_list.mli | open Core.Std
Include the interface of the list module from Core
include (module type of List)
Signature of function we 're adding
val intersperse : 'a list -> 'a -> 'a list
| null | https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/files-modules-and-programs/ext_list.mli | ocaml | open Core.Std
Include the interface of the list module from Core
include (module type of List)
Signature of function we 're adding
val intersperse : 'a list -> 'a -> 'a list
| |
b66ff2442bf0473b406f649036b455addca198082f2fe7ca59e7b1cc8de9fe7d | javalib-team/sawja | safe.mli |
* This file is part of SAWJA
* Copyright ( c)2009 , 2010 ( CNRS )
*
* This program is free software : you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation , either version 3 of
* the License , or ( at your opti... | null | https://raw.githubusercontent.com/javalib-team/sawja/5b46e4afc024092cdeaf8ba125f0c5ac05cb9137/src/safe.mli | ocaml | * This may be used to combine analyzes.
* Type of combined sub-analyzes domains (eg. D1.t * D2.t).
* Type of combined sub-analyzes IDs (Left of D1.analysisID | Right of
D2.analysisID)
* Type of sub-analyzes domains (eg. Left of D1.analysisDomain | Right of
D2.analysisDomain)
* Standard domain operati... |
* This file is part of SAWJA
* Copyright ( c)2009 , 2010 ( CNRS )
*
* This program is free software : you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation , either version 3 of
* the License , or ( at your opti... |
578ad8fd71fa2e58e79d70041d7a542dad2189f2d7aa980790ba5efe24b98fb2 | art-w/mcavl | mcavl.ml | module type Ordered = S.Ordered
module Set = Mcset.Make
module Map = Mcmap.Make
| null | https://raw.githubusercontent.com/art-w/mcavl/bf7d3414dbb805a61ebbe809cbb3f2a7ec599c42/src/mcavl.ml | ocaml | module type Ordered = S.Ordered
module Set = Mcset.Make
module Map = Mcmap.Make
| |
72d46313029485e53dad2b56053e252f2849b1b49d475d7a1cb4d35241c8224f | zoomhub/zoomhub | Instances.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module Network.HTTP.Client.Instances where
import Data.Aeson (ToJSON, Value (String), object, toJSON, (.=))
import qualified Data.ByteString as BS
import Data.CaseInsensitive (original)
import qualified Data.HashMap.Strict as HM
import Data.Text... | null | https://raw.githubusercontent.com/zoomhub/zoomhub/eb51b6532be53818573237710b29639be6103eb3/src/Network/HTTP/Client/Instances.hs | haskell | # LANGUAGE OverloadedStrings #
Number of bytes we store for responses with exceptions: | # OPTIONS_GHC -fno - warn - orphans #
module Network.HTTP.Client.Instances where
import Data.Aeson (ToJSON, Value (String), object, toJSON, (.=))
import qualified Data.ByteString as BS
import Data.CaseInsensitive (original)
import qualified Data.HashMap.Strict as HM
import Data.Text (Text)
import qualified Data.Text ... |
5fce684007fb6ecd9372d54eec32e0a6cf0b968cce7daabde3a1f67cdda3d022 | Vagabond/erlang-syslog | syslog.erl | Copyright 2009 < > . All rights reserved .
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are met:
%%%
%%% 1. Redistributions of source code must retain the above copyright notice,
%%% this list of conditions ... | null | https://raw.githubusercontent.com/Vagabond/erlang-syslog/2c38c70450f80b44711c7c1702171f32f881d4a6/src/syslog.erl | erlang |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form... | Copyright 2009 < > . All rights reserved .
THIS SOFTWARE IS PROVIDED ` ` AS IS '' AND ANY EXPRESS OR
INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ;
ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STR... |
a9ce35628b87571c8488d95a73cb877f72e12f162498c38aac9d0a356b6a361c | takikawa/racket-ppa | info.rkt | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("base" "plot-lib" "math-lib" ("gui-lib" #:version "1.18") "snip-lib" "typed-racket-lib" "typed-racket-more"))) (define build-deps (quote ())) (define pkg-desc "Plot GUI interface") (define pkg-authors (quote (ntoronto))) (... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/plot-gui-lib/info.rkt | racket | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("base" "plot-lib" "math-lib" ("gui-lib" #:version "1.18") "snip-lib" "typed-racket-lib" "typed-racket-more"))) (define build-deps (quote ())) (define pkg-desc "Plot GUI interface") (define pkg-authors (quote (ntoronto))) (... | |
b08aba2d7020d7a84feb2d8afc536af6bd4561a8f5d1a3839f20157a9e7eaac1 | quil-lang/quilc | python-tests.lisp | ;;;; python-tests.lisp
;;;;
Author :
(in-package #:libquilc-tests)
(deftest test-python-compile-quil ()
"Test compiling Quil from Python."
(uiop:with-current-directory ("lib/")
(let* ((input-source "H 0")
(parsed-program (cl-quil:safely-parse-quil input-source))
(chip-spec (cl-quil::... | null | https://raw.githubusercontent.com/quil-lang/quilc/5f70950681008fd0dc345d574b8d293c5a638d5d/lib/tests/python-tests.lisp | lisp | python-tests.lisp
| Author :
(in-package #:libquilc-tests)
(deftest test-python-compile-quil ()
"Test compiling Quil from Python."
(uiop:with-current-directory ("lib/")
(let* ((input-source "H 0")
(parsed-program (cl-quil:safely-parse-quil input-source))
(chip-spec (cl-quil::build-nq-linear-chip 8))
... |
1efbc7d4e7fe2411cda8ca2e3a0edbb8f6e25838b8a567e15952e2f7145be2de | tolysz/prepare-ghcjs | Data.hs | # LANGUAGE Trustworthy #
# LANGUAGE RankNTypes , ScopedTypeVariables , PolyKinds , StandaloneDeriving ,
TypeOperators , GADTs , FlexibleInstances #
TypeOperators, GADTs, FlexibleInstances #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE BangPatterns #-}
--------... | null | https://raw.githubusercontent.com/tolysz/prepare-ghcjs/8499e14e27854a366e98f89fab0af355056cf055/spec-lts8/base/Data/Data.hs | haskell | # LANGUAGE BangPatterns #
---------------------------------------------------------------------------
|
Module : Data.Data
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable (local universal quantification)
- Generic progr... | # LANGUAGE Trustworthy #
# LANGUAGE RankNTypes , ScopedTypeVariables , PolyKinds , StandaloneDeriving ,
TypeOperators , GADTs , FlexibleInstances #
TypeOperators, GADTs, FlexibleInstances #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
Copyright : ( c ) The Universit... |
5c98db63d0b8a923196a5618b31eebb75275652e7820821ae10307d187f13247 | erlscripten/erlscripten | erlps_parse_transform.erl | -module(erlps_parse_transform).
-author("gorbak25").
-export([parse_transform/2]).
parse_transform(Forms, Options) ->
io:format(user, "~p\n", [Options]),
code:ensure_loaded(erlps_logger),
code:ensure_loaded(erlps_utils),
code:ensure_loaded(erlps_purescript_pretty),
code:ensure_loaded(erlps_transp... | null | https://raw.githubusercontent.com/erlscripten/erlscripten/6b70be39dc51c21388dd7bae1eb46a0d306ecdcc/src/erlps_parse_transform.erl | erlang | -module(erlps_parse_transform).
-author("gorbak25").
-export([parse_transform/2]).
parse_transform(Forms, Options) ->
io:format(user, "~p\n", [Options]),
code:ensure_loaded(erlps_logger),
code:ensure_loaded(erlps_utils),
code:ensure_loaded(erlps_purescript_pretty),
code:ensure_loaded(erlps_transp... | |
9e853904bb65f7e230b76a2868f71454e137b9e130411333319ad58be9a7fbf5 | jordanthayer/ocaml-search | deps.ml | * Handling of ocamldep dependency files .
@author eaburns
@since 2010 - 08 - 24
@author eaburns
@since 2010-08-24
*)
open Printf
open Scanf
* { 1 Parsing dependency files }
let isspace = function
| ' ' | '\t' | '\r' | '\n' -> true
| _ -> false
(** [eat_space_not_newline inch] eats all t... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/ocm2/deps.ml | ocaml | * [eat_space_not_newline inch] eats all the whitespace that is not
a newline.
* [read_depends see_depend src inch] reads the dependency lines
from the file and calls [see_depend] on each dependency.
* [read see_node see_depend inch] reads the dependency file and
calls [see_depend] on each dependency.
* [... | * Handling of ocamldep dependency files .
@author eaburns
@since 2010 - 08 - 24
@author eaburns
@since 2010-08-24
*)
open Printf
open Scanf
* { 1 Parsing dependency files }
let isspace = function
| ' ' | '\t' | '\r' | '\n' -> true
| _ -> false
let eat_space_not_newline inch =
let rec ... |
16e63ab11a6fe4fb38fba2908342b61d883871fe1fc64b9be672a2ce94dbad22 | sim642/odep | dot_graph.ml | open Common
module G =
struct
module VV = V
include G
let graph_attributes _ = [`Compound true]
let vertex_attributes = function
| VV.Executable _ ->
[`Shape `Diamond]
| Library {local = true; _} ->
[]
| Library {local = false; _} ->
[`Style `Filled]
| Module {name; _} ->
... | null | https://raw.githubusercontent.com/sim642/odep/48a98ef26e508510cd25f8fcaabb8f840643bd4e/src/depgraph/dot_graph.ml | ocaml | open Common
module G =
struct
module VV = V
include G
let graph_attributes _ = [`Compound true]
let vertex_attributes = function
| VV.Executable _ ->
[`Shape `Diamond]
| Library {local = true; _} ->
[]
| Library {local = false; _} ->
[`Style `Filled]
| Module {name; _} ->
... | |
50c86cd16ff7ae800297c31125cd7bb6471de3a2653f889d499f075c211a49b0 | robert-strandh/Cluster | operand.lisp | (cl:in-package #:cluster.disassembler)
(declaim (inline %operand-size %operand-name))
(defun %operand-size (operand-descriptor)
(second operand-descriptor))
(defun %operand-name (operand-descriptor)
(first operand-descriptor))
(defgeneric read-operand (interpreter encoding operand-descriptor candidates))
(defme... | null | https://raw.githubusercontent.com/robert-strandh/Cluster/370410b1c685f2afd77f959a46ba49923a31a33c/Disassembler/operand.lisp | lisp | we only know of GPR-A and also we aren't sure of how to represent
the operand position at this point and candidates is only being
passed to this GF for this situtation.
Label does not mean RIP-relative addressing via modrm
it means displacement immediatley following the instruction opcodes | (cl:in-package #:cluster.disassembler)
(declaim (inline %operand-size %operand-name))
(defun %operand-size (operand-descriptor)
(second operand-descriptor))
(defun %operand-name (operand-descriptor)
(first operand-descriptor))
(defgeneric read-operand (interpreter encoding operand-descriptor candidates))
(defme... |
c7917554ab6f83b8a0f0d6eb1b969a06b8660cc31b48a1b7d612a6e45516406c | janestreet/universe | low_level_process.ml | open Core
open Poly
module Sys = Caml.Sys
let rec temp_failure_retry f =
try
f ()
with Unix.Unix_error (EINTR, _, _) -> temp_failure_retry f
let close_non_intr fd =
temp_failure_retry (fun () -> Unix.close fd)
(* Creates a unix pipe with both sides set close on exec *)
let cloexec_pipe () =
let (fd1,fd2)... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/shell/low_level_process/src/low_level_process.ml | ocaml | Creates a unix pipe with both sides set close on exec
*
Remembers the last n-characters appended to it....
* remembers the output in a circular buffer.
looped is used to tell whether we loop around the
boundary of the buffer.
WStopped is impossible
* wait for a given pid to exit;
returns true ... | open Core
open Poly
module Sys = Caml.Sys
let rec temp_failure_retry f =
try
f ()
with Unix.Unix_error (EINTR, _, _) -> temp_failure_retry f
let close_non_intr fd =
temp_failure_retry (fun () -> Unix.close fd)
let cloexec_pipe () =
let (fd1,fd2) as res = Unix.pipe () in
Unix.set_close_on_exec fd1;
Un... |
c54d08d21a6f4674fce531d69aa8bc609aa44471a4604e0e723996445d6ba840 | rixed/ramen | HeavyHitters.ml | Simple implementation of a polymorphic set that keeps only the most
* important entries using the " heavy hitters " selection technique .
* This technique is an approximation . For an item to be guaranteed to be
* featured in the top N , its total contribution must be > = 1 / N of the total .
* Other than... | null | https://raw.githubusercontent.com/rixed/ramen/454b0eb63beab1c4d5aab8e7957623071b35f892/src/HeavyHitters.ml | ocaml | ref so we can downscale
Optionally, select only those outliers above that many sigmas:
Fade off contributors by decaying weights in time (actually, inflating
* new weights as time passes)
decay factor (0 for no decay)
value to weight and overestimation:
max weight to value to overestimation. Since we ne... | Simple implementation of a polymorphic set that keeps only the most
* important entries using the " heavy hitters " selection technique .
* This technique is an approximation . For an item to be guaranteed to be
* featured in the top N , its total contribution must be > = 1 / N of the total .
* Other than... |
5b550f412398b757b6a3f129336822d9971abc3e0a33b240d7c9d4cad6ab163b | clojure/test.check | test_specs.clj | (ns clojure.test.check.test-specs
)
(if (let [{:keys [major minor]} *clojure-version*]
(and (= 1 major) (< minor 9)))
;; don't bother testing this on older clojures
(def valid-reporter-fn-call? (constantly true))
(do
(require '[clojure.spec.alpha :as s])
(eval
'(do
(s/def ::base
... | null | https://raw.githubusercontent.com/clojure/test.check/c05034f911fa140913958b79aa51017d3f2f4426/src/test/clojure/clojure/test/check/test_specs.clj | clojure | don't bother testing this on older clojures | (ns clojure.test.check.test-specs
)
(if (let [{:keys [major minor]} *clojure-version*]
(and (= 1 major) (< minor 9)))
(def valid-reporter-fn-call? (constantly true))
(do
(require '[clojure.spec.alpha :as s])
(eval
'(do
(s/def ::base
(s/keys :req-un [::type ::seed ::num-test... |
3f78ad1eb59448b79e519b9796d2c7845888ebd87d28a4436fbcb9944e39381b | realworldocaml/book | ascii_output.ml | open! Core
open! Import
module Rule = struct
let apply s ~rule ~refined:_ =
Ansi_output.Rule.apply s ~rule:(Format.Rule.strip_styles rule) ~refined:false
;;
end
let print ~print_global_header ~file_names ~rules ~print ~location_style hunks =
let rules = Format.Rules.strip_styles rules in
Ansi_output.prin... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/patdiff/kernel/src/ascii_output.ml | ocaml | open! Core
open! Import
module Rule = struct
let apply s ~rule ~refined:_ =
Ansi_output.Rule.apply s ~rule:(Format.Rule.strip_styles rule) ~refined:false
;;
end
let print ~print_global_header ~file_names ~rules ~print ~location_style hunks =
let rules = Format.Rules.strip_styles rules in
Ansi_output.prin... | |
afb765d9f333f2d3a8f27232008708452469e24c415d7f88a47caf8165223f43 | stabilized/clojurescript | repl.cljs | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; ... | null | https://raw.githubusercontent.com/stabilized/clojurescript/f38f141525576b2a89cde190f25f9cf2fc4c418a/src/cljs/clojure/browser/repl.cljs | 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 ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns ^{:doc "Receive - Eval - Print - Loop
Receive a block of JS (presumably generated by a ClojureScript compiler)
Evaluate it naively
Print the result of evaluation to a string
Send the resulting string back to the server... |
06b04a331d7f42fe546cc6cdf69dcc603ecb27a3d1ce9e41123b82fb4089f8f8 | cl-rabbit/cl-bunny | connection-base.lisp | (in-package :cl-bunny)
(defvar *connection* nil
"Current AMQP connection")
(defparameter *connection-type* 'threaded-iolib-connection)
(defparameter *notification-lambda* nil
"If not NIL expected to be lambda (lambda) -> bb:promise.")
(defparameter *debug-connection* nil)
(defclass connection (connection-in-poo... | null | https://raw.githubusercontent.com/cl-rabbit/cl-bunny/6da7fe161efc8d6bb0b8b09ac8efad03553d765c/src/base/connection-base.lisp | lisp | events | (in-package :cl-bunny)
(defvar *connection* nil
"Current AMQP connection")
(defparameter *connection-type* 'threaded-iolib-connection)
(defparameter *notification-lambda* nil
"If not NIL expected to be lambda (lambda) -> bb:promise.")
(defparameter *debug-connection* nil)
(defclass connection (connection-in-poo... |
771f4c81f44c7937f0b5a0a77cdf84f50108f8860f1bd8029f034b1a2fd3dcf3 | mirage/ocaml-rpc | ppx_deriving_rpc.ml | open Ppxlib
open Ast_builder.Default
open Common
let argn = Printf.sprintf "a%d"
let rpc_of str = "rpc_of_" ^ str
let of_rpc str = str ^ "_of_rpc"
let map_lident f = function
| Lident x -> Lident (f x)
| Ldot (path, lid) -> Ldot (path, f lid)
| Lapply _ -> Location.raise_errorf "rpcty - map_lident: Lapply unhan... | null | https://raw.githubusercontent.com/mirage/ocaml-rpc/fdbf7f5c3e4f0c75837f0a96d5d4d6458805fd57/ppx/ppx_deriving_rpc.ml | ocaml | [is_option typ] returns true if the type 'typ' is an option type.
This is required because of the slightly odd way we serialise records containing optional fields.
When marshalling (foo * bar) lists we check to see whether it can be better represented by a
dictionary - we do this by checking (possibly at run t... | open Ppxlib
open Ast_builder.Default
open Common
let argn = Printf.sprintf "a%d"
let rpc_of str = "rpc_of_" ^ str
let of_rpc str = str ^ "_of_rpc"
let map_lident f = function
| Lident x -> Lident (f x)
| Ldot (path, lid) -> Ldot (path, f lid)
| Lapply _ -> Location.raise_errorf "rpcty - map_lident: Lapply unhan... |
3920bb930995ce53b13af96248827bb0e8c07ffa1921d4af98955248dcc93736 | cxphoe/SICP-solutions | 2.45.rkt | (define (split part-combine subpart-combine)
((lambda (painter n)
(if (< n 0)
painter
(let ((smaller ((split part-combine subpart-combine) painter (- n 1))))
(part-combine painter (subpart-combine painter painter))))))) | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%202-Building%20Abstractions%20with%20Data/2.Hierarchical%20Data%20and%20the%20Closure%20Property/2.45.rkt | racket | (define (split part-combine subpart-combine)
((lambda (painter n)
(if (< n 0)
painter
(let ((smaller ((split part-combine subpart-combine) painter (- n 1))))
(part-combine painter (subpart-combine painter painter))))))) | |
993775d76794b98f03fe9918644e3c705f1a1fd87e0052f560cdda94a58a34d3 | oxidizing/sihl | web_flash.ml | let log_src = Logs.Src.create "sihl.middleware.flash"
module Logs = (val Logs.src_log log_src : Logs.LOG)
module Flash = struct
open Sexplib.Conv
type t =
{ alert : string option
; notice : string option
; custom : (string * string) list
}
[@@deriving yojson, sexp, eq]
let equals f1 f2 =
... | null | https://raw.githubusercontent.com/oxidizing/sihl/1870d7c9fba19a883a9ccc5f07e9f9f76bf22e35/sihl/src/web_flash.ml | ocaml | No flash was set in handler
Remove flash cookie
Flash was set in handler
Same flash value, don't set cookie
Flash was changed and is different than old flash, set cookie
Flash was changed and old flash is empty, set cookie | let log_src = Logs.Src.create "sihl.middleware.flash"
module Logs = (val Logs.src_log log_src : Logs.LOG)
module Flash = struct
open Sexplib.Conv
type t =
{ alert : string option
; notice : string option
; custom : (string * string) list
}
[@@deriving yojson, sexp, eq]
let equals f1 f2 =
... |
0b7b4ed2364b8457e941a9beb746f6ee083a79982bead9b5609954eeb8b08225 | ekasilicon/jade | sumtype-extra.rkt | #lang racket/base
(require (for-syntax racket/base
racket/match
syntax/parse)
racket/match
"sumtype.rkt")
(define-syntax sumtype-name
(syntax-parser
[(_ typename:id)
(match (syntax-local-value #'typename (λ () #f))
[(sumtype-info variants _)... | null | https://raw.githubusercontent.com/ekasilicon/jade/115eb389a20968b3ac90a2deed17016a9d44d174/src/static/sumtype-extra.rkt | racket | #lang racket/base
(require (for-syntax racket/base
racket/match
syntax/parse)
racket/match
"sumtype.rkt")
(define-syntax sumtype-name
(syntax-parser
[(_ typename:id)
(match (syntax-local-value #'typename (λ () #f))
[(sumtype-info variants _)... | |
1ea8e38a6c89fc142f73b5d914938a49ef83cfc5f4690ed210fccc94636382a6 | mbj/stratosphere | DeviceProperty.hs | module Stratosphere.SageMaker.Device.DeviceProperty (
DeviceProperty(..), mkDeviceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DeviceProperty
= Device... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/Device/DeviceProperty.hs | haskell | module Stratosphere.SageMaker.Device.DeviceProperty (
DeviceProperty(..), mkDeviceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DeviceProperty
= Device... | |
b2a67e2a77a782e3f45127fc4b6040b27438c01140a1a065bcbd9c2166d70bd0 | cushon/project-euler | 65.rkt | #lang racket
(require "common.rkt")
Find the sum of digits in the numerator of the 100th convergent of the
; continued fraction for e.
(define (solve)
(define (get-list n)
(cons 2
(map (lambda (x)
(if (= 2 (remainder x 3)) (* 2 (/ (add1 x) 3)) 1))
(build-list n add... | null | https://raw.githubusercontent.com/cushon/project-euler/d7fcbfff0cd59b2c3691293ff35bb2043b409f68/65.rkt | racket | continued fraction for e. | #lang racket
(require "common.rkt")
Find the sum of digits in the numerator of the 100th convergent of the
(define (solve)
(define (get-list n)
(cons 2
(map (lambda (x)
(if (= 2 (remainder x 3)) (* 2 (/ (add1 x) 3)) 1))
(build-list n add1))))
(define (converge... |
767f3911198263c742e6540adea0c8386973cbf23bbd5745937f448c353ddd16 | zk/clojuredocs | core_test.clj | (ns clojuredocs.core-test
(:require [clojure.test :refer :all]
[clojuredocs.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/zk/clojuredocs/28f5ee500f4349039ee81c70d7ac40acbb19e5d8/test/clojuredocs/core_test.clj | clojure | (ns clojuredocs.core-test
(:require [clojure.test :refer :all]
[clojuredocs.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
69fb1c22f39f3fa692b7a8eec65273893efbee8905e102eb7787f128b8d4126c | techascent/tech.ml.dataset | reductions_test.clj | (ns tech.v3.dataset.reductions-test
(:require [tech.v3.dataset.reductions :as ds-reduce]
[tech.v3.dataset :as ds]
[tech.v3.dataset.column :as ds-col]
[tech.v3.datatype.functional :as dfn]
[tech.v3.datatype :as dtype]
[tech.v3.datatype.datetime :as dtype-dt]
... | null | https://raw.githubusercontent.com/techascent/tech.ml.dataset/293c87060eaeab8d6271dd3896cabf8cd91c3b07/test/tech/v3/dataset/reductions_test.clj | clojure | Mainly ensuring that nothing throws.
Make sure we carry the missing set across
Slightly less efficient than implementing an inline IReduceInit impl is to create
a record with a custom IReduceInit implementation.
Using a hash provider with equals semantics allows the hamf hashtable to
compete on equal terms with the jav... | (ns tech.v3.dataset.reductions-test
(:require [tech.v3.dataset.reductions :as ds-reduce]
[tech.v3.dataset :as ds]
[tech.v3.dataset.column :as ds-col]
[tech.v3.datatype.functional :as dfn]
[tech.v3.datatype :as dtype]
[tech.v3.datatype.datetime :as dtype-dt]
... |
4965edc7e9997f319692dd7b4dc05cb15a96c534e01cd118fe03639d68a75551 | ds-wizard/engine-backend | Tag.hs | module Wizard.Service.KnowledgeModel.Squash.Event.Tag where
import Shared.Model.Event.Tag.TagEvent
import Wizard.Service.KnowledgeModel.Squash.Event.Common
instance SimpleEventSquash EditTagEvent where
isSimpleEventSquashApplicable _ = True
isReorderEventSquashApplicable _ _ = False
isTypeChanged _ _ = False
... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/c60bcc649d3d1aefe73d54ba990bcb024c8948eb/engine-wizard/src/Wizard/Service/KnowledgeModel/Squash/Event/Tag.hs | haskell | module Wizard.Service.KnowledgeModel.Squash.Event.Tag where
import Shared.Model.Event.Tag.TagEvent
import Wizard.Service.KnowledgeModel.Squash.Event.Common
instance SimpleEventSquash EditTagEvent where
isSimpleEventSquashApplicable _ = True
isReorderEventSquashApplicable _ _ = False
isTypeChanged _ _ = False
... | |
2048044d1313851fb14672936b3f3a6126b7b1b3720658f39df8c2dd6dcab8bd | aarvid/SmackJack | demo-push.lisp | (in-package :smackjack-demo)
;;; create an ajax-pusher object.
(defparameter *ajax-pusher*
(make-instance 'smackjack:ajax-pusher :server-uri "/ajax-push"))
;;; start hunchentoot server
(defparameter *push-server*
(start (make-instance 'easy-acceptor
:name 'push-server
... | null | https://raw.githubusercontent.com/aarvid/SmackJack/019051e6ba3c5fd1e28bae0d85d53510beb63f2f/demo/demo-push.lisp | lisp | create an ajax-pusher object.
start hunchentoot server
define push function
define a simple web page
this will push the text to all open pages for the *push-server*. | (in-package :smackjack-demo)
(defparameter *ajax-pusher*
(make-instance 'smackjack:ajax-pusher :server-uri "/ajax-push"))
(defparameter *push-server*
(start (make-instance 'easy-acceptor
:name 'push-server
:address "localhost"
:port 8080
... |
7ef143b3f156deb25aca831f6849d980c869e27b7e4b116290066fd97b8cad98 | bvaugon/ocapic | div.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/tests/arith/div.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
let ml_of_int x = ((x lsl 1) lor 1) land 0xFFFF;;
let int_of_ml x = ((x lsl 15) asr 16);;
let div x y = ml_of_int (int_of_ml x / int_of_ml y);;
let op rx ry =
let x = ref (rx lsr ... |
57d8f10949acf951d858172e8923f6af0a1871b35845c1b96512ecc7a2451f86 | xvw/preface | functor.ml | module Core (Req : Preface_specs.Functor.WITH_MAP) = Req
module Operation (Core : Preface_specs.Functor.CORE) = struct
type 'a t = 'a Core.t
include (
Indexed_functor.Operation (struct
type ('a, 'index) t = 'a Core.t
include (Core : Preface_specs.Functor.CORE with type 'a t := 'a Core.t)
end)... | null | https://raw.githubusercontent.com/xvw/preface/51892a7ce2ddfef69de963265da3617968cdb7ad/lib/preface_make/functor.ml | ocaml | module Core (Req : Preface_specs.Functor.WITH_MAP) = Req
module Operation (Core : Preface_specs.Functor.CORE) = struct
type 'a t = 'a Core.t
include (
Indexed_functor.Operation (struct
type ('a, 'index) t = 'a Core.t
include (Core : Preface_specs.Functor.CORE with type 'a t := 'a Core.t)
end)... | |
961a6d1d165e97bc834c0e703e926e42a4d42f55931722bb5be3cc625dc403cf | naoto-ogawa/h-xproto-mysql | CRUD.hs | |
module : Database . MySQLX.CRUD
description : crud interface
copyright : ( c ) , 2017
license : MIT
maintainer :
stability : experimental
portability :
CRUD interface
@
find update insert delete
collection * * * *
data_model ... | null | https://raw.githubusercontent.com/naoto-ogawa/h-xproto-mysql/1eacd6486c99b849016bf088788cb8d8b166f964/src/DataBase/MySQLX/CRUD.hs | haskell | * Setting a field to a CRUD record
collection
data_model
DOCUMENT
DOCUMENT
TABLE
TABLE
projection
projection
projection
criteria
criteria
row
row
args
limit (Limit)
limit (Int)
order
order
grouping
grouping_criteria
operation (Only Update)
* Create a CRUD Object
* CRUD Execution
general, st... | |
module : Database . MySQLX.CRUD
description : crud interface
copyright : ( c ) , 2017
license : MIT
maintainer :
stability : experimental
portability :
CRUD interface
@
find update insert delete
collection * * * *
data_model ... |
f729928473f9919ca25dc5867c6cd34d9c2651e91b10626b204327f92101e608 | janegca/htdp2e | Exercise-275-find-name.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-275-find-name) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t const... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/03-Intermezzo-Scope/Exercise-275-find-name.rkt | racket | about the language level of this file in a form that our tools can easily process.
Define find-name. The function consumes a name and a list of names. It
the former.
Define a function that ensures that no name on some list of names exceeds
String [List-of String] -> Boolean
Number [List-of String] -> Boolean
r... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-275-find-name) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
Exercise 275 .
retrieves the first na... |
3e0545444190665eb4d42160d861425f5398c855fe59ec0309ceba17ce234495 | igorhvr/bedlam | object.scm | " object.scm " Macroless Object System
;;; Author: Wade Humeniuk <>
;;;
;;; This code is in the public domain.
Date : February 15 , 1994
;; Object Construction:
0 1 2 3 4
;; #(object-tag get-method make-method! unmake-method! get-all-methods)
(define object... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/object.scm | scheme | Author: Wade Humeniuk <>
This code is in the public domain.
Object Construction:
#(object-tag get-method make-method! unmake-method! get-all-methods)
This might be better done using COMLIST:DELETE-IF.
@
@
@
@
@
@
@
@ | " object.scm " Macroless Object System
Date : February 15 , 1994
0 1 2 3 4
(define object:tag "object")
(define (object:removeq obj alist)
(if (null? alist)
alist
(if (eq? (caar alist) obj)
(cdr alist)
(cons (car alist) (object:removeq ... |
e7d0bce08897ca0a003932d1a1ee1b99bea86f2b41e0934da549b045d623f528 | uwplse/coq-plugin-lib | modutils.mli | open Names
open Declarations
(* --- Modules --- *)
(*
* Pull any functor parameters off the module signature, returning the list of
* functor parameters and the list of module elements (i.e., fields).
*)
val decompose_module_signature : module_signature -> (Names.MBId.t * module_type_body) list * structure_body
(... | null | https://raw.githubusercontent.com/uwplse/coq-plugin-lib/cbfde621598d26f365d195aa47207d2407ccc263/src/coq/logicutils/contexts/modutils.mli | ocaml | --- Modules ---
* Pull any functor parameters off the module signature, returning the list of
* functor parameters and the list of module elements (i.e., fields).
* Declare an interactive (i.e., elementwise) module structure, with the
* functional argument called to populate the module elements by declaration... | open Names
open Declarations
val decompose_module_signature : module_signature -> (Names.MBId.t * module_type_body) list * structure_body
val declare_module_structure : ?params:(Constrexpr.module_ast Declaremods.module_params) -> Id.t -> (ModPath.t -> unit) -> ModPath.t
val fold_module_structure_by_decl : 'a -> ('a... |
99250a401e7a08d4f53ab73e877d03a445e2aafb1132234e3348fa13aaf1029b | hipsleek/hipsleek | ptranal.ml |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source code must retain the abov... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/cil/src/ext/pta/ptranal.ml | ocaml | *********************************************************************
Global Variables
****************************************... |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source code must retain the abov... |
1f530a13cb40ce8e49a0d3d22b37d3955fd323f081f819d276cdaf0a124a4039 | 97jaz/gregor | symbols.rkt | #lang racket/base
(require racket/match
cldr/core
cldr/dates-modern
cldr/numbers-modern
"../ast.rkt"
"../parse-state.rkt"
"trie.rkt")
(provide (all-defined-out))
(define (l10n-cal loc . path)
(cldr-ref (ca-gregorian loc) path))
(define (str-parse ast trie stat... | null | https://raw.githubusercontent.com/97jaz/gregor/91d71c6082fec4197aaf9ade57aceb148116c11c/gregor-lib/gregor/private/pattern/l10n/symbols.rkt | racket | #lang racket/base
(require racket/match
cldr/core
cldr/dates-modern
cldr/numbers-modern
"../ast.rkt"
"../parse-state.rkt"
"trie.rkt")
(provide (all-defined-out))
(define (l10n-cal loc . path)
(cldr-ref (ca-gregorian loc) path))
(define (str-parse ast trie stat... | |
bd3d616fbc108973ea5b9d56c81c91981e5611279a2d45f06139fb3316831031 | gebi/jungerl | xmerl_validate.erl | The contents of this file are subject to the Erlang Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
%%% compliance with the License. You may obtain a copy of the License at
%%%
%%%
Software distributed under the License is distributed on an " AS IS "
%%% basis, WITHOUT WA... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/xmerl/src/xmerl_validate.erl | erlang | compliance with the License. You may obtain a copy of the License at
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
----------------------------------------------------------------------
-----------... | The contents of this file are subject to the Erlang Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Original Code is xmerl-0.19
The Initial Developer of the Original Code is Ericsson Telecom
AB... |
2d054b0f532218222a47217eec9fb67032e636a0039445f65f8af229e5a7d875 | Perry961002/SICP | exe2.74-company.scm | ; a)
;设立id作为一个员工在整个体系的唯一标识
每个分公司实现get - record过程,并且put进总公司
; (define (get-record branch id)
; ((get 'get-record branch) id))
; b)
设立数据项salary,实现过程get - salary
; c)
;(define (find-employee-record branch-list id)
; (if (null? branch-list)
; (error "Not find" id)
; (let ((record (get-record (car bra... | null | https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap2/exercise/exe2.74-company.scm | scheme | a)
设立id作为一个员工在整个体系的唯一标识
(define (get-record branch id)
((get 'get-record branch) id))
b)
c)
(define (find-employee-record branch-list id)
(if (null? branch-list)
(error "Not find" id)
(let ((record (get-record (car branch-list) id)))
(if (null? record)
record
... |
每个分公司实现get - record过程,并且put进总公司
设立数据项salary,实现过程get - salary
|
3bb7c428b01e44bb9a2025efcbd8e8cf65ec14d1e95ac0bd2d83d0624342a6cc | styx/Raincat | GameState.hs | module Game.GameState
(GameState(GameRunningState,MainMenuState,HowtoMenuState,PostVictoryState)) where
data GameState = GameRunningState | MainMenuState | HowtoMenuState | PostVictoryState
| null | https://raw.githubusercontent.com/styx/Raincat/49b688c73335c9a4090708bc75f6af9575a65670/src/Game/GameState.hs | haskell | module Game.GameState
(GameState(GameRunningState,MainMenuState,HowtoMenuState,PostVictoryState)) where
data GameState = GameRunningState | MainMenuState | HowtoMenuState | PostVictoryState
| |
709f20bc4e8a91e335ca4a115de365b775ea1e7fb28bf6f07c733cd77f078501 | clojure/core.typed | warn_on_unannotated_var.clj | (ns clojure.core.typed.test.warn-on-unannotated-var
(:require [clojure.core.typed :as t :refer [ann check-ns ann-form print-env cf]])
(:import (clojure.lang IPersistentMap IPersistentVector)))
(t/warn-on-unannotated-vars)
(defn foo [a]
(fn [s] (+ s 1)))
(def bar (+ 1 1.2))
| null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/warn_on_unannotated_var.clj | clojure | (ns clojure.core.typed.test.warn-on-unannotated-var
(:require [clojure.core.typed :as t :refer [ann check-ns ann-form print-env cf]])
(:import (clojure.lang IPersistentMap IPersistentVector)))
(t/warn-on-unannotated-vars)
(defn foo [a]
(fn [s] (+ s 1)))
(def bar (+ 1 1.2))
| |
eb45e91e6e53bd38339a7a04701962c3ec1bf7210e9237d8f0974e6204e53d03 | ChrisPenner/comonads-by-example | Zipper.hs | module Comonads.Traced.Zipper where
import Comonads.Zipper
import Comonads.Traced
import Control.Comonad
import Data.Monoid
data Dir = L | R
deriving (Show, Eq)
zipper :: Zipper Int
zipper = fromList [1,2,3,4,5]
Navigate
tZipper :: Zipper a -> Traced (Dual [Dir]) a
tZipper z = traced (extract . follow z . get... | null | https://raw.githubusercontent.com/ChrisPenner/comonads-by-example/1d7626f759e59ac8019322612ed6d7ff00da75c9/src/Comonads/Traced/Zipper.hs | haskell | module Comonads.Traced.Zipper where
import Comonads.Zipper
import Comonads.Traced
import Control.Comonad
import Data.Monoid
data Dir = L | R
deriving (Show, Eq)
zipper :: Zipper Int
zipper = fromList [1,2,3,4,5]
Navigate
tZipper :: Zipper a -> Traced (Dual [Dir]) a
tZipper z = traced (extract . follow z . get... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.