_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 |
|---|---|---|---|---|---|---|---|---|
dafda446e7d4414bc126d56c4e9956b69834f5179a1da36134fff25144de15c7 | rd--/hsc3 | varSaw.help.hs | -- varSaw
let x = mouseX kr 0 1 Linear 0.2 in varSaw ar 220 0 x * 0.1
-- varSaw
let f = lfPulse kr (mce2 3 3.03) 0 0.3 * 200 + 200
w = linLin (lfTri kr 1 0) (-1) 1 0 1
in varSaw ar f 0 w * 0.1
-- varSaw ; compare with lfPulse at ar
let f = lfPulse kr 3 0 0.3 * 200 + 200
in mce [varSaw ar f 0 0.2
,lfPulse a... | null | https://raw.githubusercontent.com/rd--/hsc3/bb12d02f09481e7cb59ae2e9e5119d1f7c4c98c9/Help/Ugen/varSaw.help.hs | haskell | varSaw
varSaw
varSaw ; compare with lfPulse at ar
varSaw ; per-note width modulation
varSaw ; -users.bham.ac.narkive.com/sj4Tw3ub/sync-osc#post6
varSaw ; slow indeterminate modulation of width, -5as | let x = mouseX kr 0 1 Linear 0.2 in varSaw ar 220 0 x * 0.1
let f = lfPulse kr (mce2 3 3.03) 0 0.3 * 200 + 200
w = linLin (lfTri kr 1 0) (-1) 1 0 1
in varSaw ar f 0 w * 0.1
let f = lfPulse kr 3 0 0.3 * 200 + 200
in mce [varSaw ar f 0 0.2
,lfPulse ar f 0 0.2] * 0.1
let d = linLin (lfNoise2Id 'α' kr 0.1) (-... |
1a1a1a350e14d49f6d52655771eb5ca540b656f24cb77b317efa43dda8c56f56 | Relph1119/sicp-solutions-manual | p1-45-average-damp-n-times.scm | (load "src/practices/ch01/p1-43-rec-compose-repeated.scm")
(load "src/examples/ch01/p48-average-damp.scm")
(define (average-damp-n-times f n)
((repeated average-damp n) f)) | null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/practices/ch01/p1-45-average-damp-n-times.scm | scheme | (load "src/practices/ch01/p1-43-rec-compose-repeated.scm")
(load "src/examples/ch01/p48-average-damp.scm")
(define (average-damp-n-times f n)
((repeated average-damp n) f)) | |
50ebcb4326fbe9dab7e6d625477e48f138b60b0694ee97f06f73b3cf946a29d2 | agrafix/highjson | Swagger.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE OverloadedLists #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - redundant - constraints #
module Data.HighJson.Swagger
( m... | null | https://raw.githubusercontent.com/agrafix/highjson/2a07567e54bfccc679d92fcd804c20da5275d0c9/highjson-swagger/Data/HighJson/Swagger.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
are fine, but sum types should be either "real" Enums or every option must
contain a value. For more information see the swagger2 haskell package.
providing an example value
^ example value | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE OverloadedLists #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - redundant - constraints #
module Data.HighJson.Swagger
( makeDeclareNamedSchema, makeDeclareNamedSchema', DeclM
... |
43a42cbc4fe36dcb3daa3139c87344c68668761274ec7f825d503d82bf5b0d12 | BinaryAnalysisPlatform/bap | thumb_bits.mli | open Bap_core_theory
open Thumb_core
open Thumb_opcodes
module Make(_ : Theory.Core) : sig
open Theory
val sx : 'a Bitv.t Value.sort -> r32 reg -> _ reg -> cond -> unit eff
val ux : 'a Bitv.t Value.sort -> r32 reg -> _ reg -> cond -> unit eff
end
| null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/43b0dcf473d71b9dc8c343493cf1a6f8d0db086c/plugins/thumb/thumb_bits.mli | ocaml | open Bap_core_theory
open Thumb_core
open Thumb_opcodes
module Make(_ : Theory.Core) : sig
open Theory
val sx : 'a Bitv.t Value.sort -> r32 reg -> _ reg -> cond -> unit eff
val ux : 'a Bitv.t Value.sort -> r32 reg -> _ reg -> cond -> unit eff
end
| |
dcc4698389f41c27b40cb786c7506ad40a8bea5d15dd021e042ccf3006ef9647 | adamliesko/dynamo | storage_sup.erl | %% Description %%
%% Implements a storage engine and watches over actual storage module.
-module(storage_sup).
-behaviour(supervisor).
-export([init/1]).
-export([start_link/1]).
-define(SERVER, ?MODULE).
start_link(_Args) ->
supervisor:start_link(storage_sup, _Args).
% intializes the storage supervisor - It gets... | null | https://raw.githubusercontent.com/adamliesko/dynamo/cd97a96d1ce250e93f39cd16f9a3ef6c7030678d/src/storage_sup.erl | erlang | Description %%
Implements a storage engine and watches over actual storage module.
intializes the storage supervisor - It gets partitions for current node from ring module, gets existing partitions
from the ring. Then we build up the hash key range using ring:get_range for each partition and initialize our
storage... | -module(storage_sup).
-behaviour(supervisor).
-export([init/1]).
-export([start_link/1]).
-define(SERVER, ?MODULE).
start_link(_Args) ->
supervisor:start_link(storage_sup, _Args).
init(_Args) ->
Parts = ring:parts_for_node(node(), all),
OldParts = ring:get_oldies_parts(),
Setup = lists:map(fun(P) ->
Tit... |
145ffb85524c3a148daeb30c2a491073879e809cffd883acf4266b5cdec7bfb5 | clojure-interop/java-jdk | NamespaceContext.clj | (ns javax.xml.namespace.NamespaceContext
"Interface for read only XML Namespace context processing.
An XML Namespace has the properties:
Namespace URI:
Namespace name expressed as a URI to which the prefix is bound
prefix: syntactically, this is the part of the attribute name
following the... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/namespace/NamespaceContext.clj | clojure | (ns javax.xml.namespace.NamespaceContext
"Interface for read only XML Namespace context processing.
An XML Namespace has the properties:
Namespace URI:
Namespace name expressed as a URI to which the prefix is bound
prefix: syntactically, this is the part of the attribute name
following the... | |
d58dd13cae467a7719af8940413de8fe928e850a5efd427dd65de58ace9cc4d4 | staples-sparx/clj-schema | example.clj | (ns ^{:doc "Ways to create example test data that must matches a given schema"}
clj-schema.example
(:require [clj-schema.internal.utils :as u]
[clj-schema.validation :as v]
[clojure.pprint :as pprint]))
(defn example
"Takes a map and a schema, if it fails validation it throws an
exceptio... | null | https://raw.githubusercontent.com/staples-sparx/clj-schema/398cd9cbd40f6bdcf3304ebf471e989497541471/src/clj_schema/example.clj | clojure | last arg is a map
turns single-arity into multi-arity | (ns ^{:doc "Ways to create example test data that must matches a given schema"}
clj-schema.example
(:require [clj-schema.internal.utils :as u]
[clj-schema.validation :as v]
[clojure.pprint :as pprint]))
(defn example
"Takes a map and a schema, if it fails validation it throws an
exceptio... |
402ac89ca35eb249bcb048bb66360db398767748362cc4c009db33288dc38c05 | OCamlPro/liquidity | liquidUntype.ml | (****************************************************************************)
(* Liquidity *)
(* *)
Copyright ( C ) 2017 - 2020 OCamlPro SAS
(* ... | null | https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/liquidity/liquidUntype.ml | ocaml | **************************************************************************
Liquidity
... | Copyright ( C ) 2017 - 2020 OCamlPro SAS
it under the terms of the GNU General Public License as published by
... |
beb48d095ac0622ecd3751348ae8f4c184894720a201fbadce6d3dbe883b388f | 3b/ps-webgl | package.lisp | (defpackage #:webgl-bindings
(:use :cl :ps)
#-package-local-nicknames
(:nicknames #:%webgl #:%gl)
(:export
#:active-texture
#:attach-shader
#:bind-attrib-location
#:bind-buffer
#:bind-framebuffer
#:bind-renderbuffer
#:bind-texture
#:blend-color
#:blend-equation
#:blend-equation-sep... | null | https://raw.githubusercontent.com/3b/ps-webgl/cf2832d2e814ac0b733d1914985aeadefdcc2a1c/package.lisp | lisp | fixme: delete
todo:
that should be scoped to the object? since we don't want local name
in the implementation to have the prefix, just the public api...
---- actually, possibly want implementation package as separate one,
gets unqualified names unless it explicitly qualifies them...
------ actually^2, i guess t... | (defpackage #:webgl-bindings
(:use :cl :ps)
#-package-local-nicknames
(:nicknames #:%webgl #:%gl)
(:export
#:active-texture
#:attach-shader
#:bind-attrib-location
#:bind-buffer
#:bind-framebuffer
#:bind-renderbuffer
#:bind-texture
#:blend-color
#:blend-equation
#:blend-equation-sep... |
273ca76c35d95c394cb065299131bd8ba2dd2611124870ccfd4cc06971fc4a60 | RyanGlScott/ghc-software-foundations | Poly.hs | # LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module SF.LF.Poly where
import Data.Nat
import Data.List.Singletons hiding
( Length, LengthSym0, LengthSym1, sLength )
import Data.Singletons.TH
import Prelude hiding (length)
import Prelude.Singleton... | null | https://raw.githubusercontent.com/RyanGlScott/ghc-software-foundations/ce7b8958e0aed4fb2c8611d71e7e0f1a2ef83222/logical-foundations/src/SF/LF/Poly.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module SF.LF.Poly where
import Data.Nat
import Data.List.Singletons hiding
( Length, LengthSym0, LengthSym1, sLength )
import Data.Singletons.TH
import Prelude hiding (length)
import Prelude.Singleton... | |
f8ac81c89615623428c37ee53fc67f58150e309e98b19e35b42abb3c90c849fd | mpickering/apply-refact | Monad15.hs | yes = do if a then forM x y else sequence z q; return () | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Monad15.hs | haskell | yes = do if a then forM x y else sequence z q; return () | |
ca5b3892769c4373925efe0b1e34ab29086848e248cfc733da889b87e4bb6e07 | mitchellwrosen/planet-mitchell | Semigroup.hs | module Alg.Semigroup
( -- * Semigroup
Semigroup(..)
, gmappend
-- * Newtypes
, First(..)
, Last(..)
, Dual(..)
, diff
, cycle1
) where
import Data.Semigroup
import Data.Semigroup.Generic
| null | https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Alg/Semigroup.hs | haskell | * Semigroup
* Newtypes | module Alg.Semigroup
Semigroup(..)
, gmappend
, First(..)
, Last(..)
, Dual(..)
, diff
, cycle1
) where
import Data.Semigroup
import Data.Semigroup.Generic
|
584d2d6efc32920fdc29a5c5c55f1542381ac8469cf99c4469e7dfea05f17c44 | janestreet/virtual_dom | css_tokenizer.ml | open Core
open! Int.Replace_polymorphic_compare
module Token = struct
type t =
| Ident
| Function
| Atkeyword
| Hash
| String
| Uri
| Delim
| Number
| Percentage
| Dimension
| White_space
| Colon
| Semi_colon
| Comma
| Lbracket
| Rbracket
| Lparen
... | null | https://raw.githubusercontent.com/janestreet/virtual_dom/756eafc44873737352ff35d1c13d6dc1e0eb24fb/css_gen/src/css_tokenizer.ml | ocaml | start of the current token
length of the current token
this is weird but the spec is weird
Make sure we are idempotent when we get into the error state
current is dummy and will be set by call to next | open Core
open! Int.Replace_polymorphic_compare
module Token = struct
type t =
| Ident
| Function
| Atkeyword
| Hash
| String
| Uri
| Delim
| Number
| Percentage
| Dimension
| White_space
| Colon
| Semi_colon
| Comma
| Lbracket
| Rbracket
| Lparen
... |
4198ab49ad49b0692f34d8c16c7956753833458344d52f34507a56b788cf10e7 | aiya000/haskell-examples | catch.hs | import Control.Exception
catch needs ( function : : FooException e = > e - > IO a ) in second argument
printException :: SomeException -> IO ()
printException e = putStrLn $ "Exception: " ++ show e
main :: IO ()
main = putStrLn undefined `catch` printException
| null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Control/Exception/catch.hs | haskell | import Control.Exception
catch needs ( function : : FooException e = > e - > IO a ) in second argument
printException :: SomeException -> IO ()
printException e = putStrLn $ "Exception: " ++ show e
main :: IO ()
main = putStrLn undefined `catch` printException
| |
68e6e58fc0f83b2af4d7d83d4ff492731df5002710f1e0b0a8fca0694ab9f579 | xach/zpb-ttf | maxp.lisp | Copyright ( c ) 2006 , All Rights Reserved
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list of conditions... | null | https://raw.githubusercontent.com/xach/zpb-ttf/d1cb862af9fe27559ef18a3f0e91511e837a72f3/maxp.lisp | lisp |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form ... | Copyright ( c ) 2006 , All Rights Reserved
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
$ I d : maxp.lisp , v 1.3 2006/02/18 23:13:43 xach Exp $
(in-package #:zpb-ttf)
(defmethod load-maxp-info ((font-loader font-l... |
a93d0a97b15e9c42f19dd7b68fcf853a0dcb58af787c16d10d28e7e65cbb95ad | tarides/opam-monorepo | test_dune_file.ml | module Lang = struct
let from_content =
let make_test ~name ~content ~expected () =
let test_name = Printf.sprintf "Lang.from_content: %s" name in
let test_fun () =
let actual = Duniverse_lib.Dune_file.Lang.from_content content in
Alcotest.(check (result (pair int int) Testable.r_msg))... | null | https://raw.githubusercontent.com/tarides/opam-monorepo/9262e7f71d749520b7e046fbd90a4732a43866e9/test/lib/test_dune_file.ml | ocaml | module Lang = struct
let from_content =
let make_test ~name ~content ~expected () =
let test_name = Printf.sprintf "Lang.from_content: %s" name in
let test_fun () =
let actual = Duniverse_lib.Dune_file.Lang.from_content content in
Alcotest.(check (result (pair int int) Testable.r_msg))... | |
0ea482b93063fd80b3c20df604403e53ac5e0639e1309331c2b4474d571788bb | clojure-emacs/refactor-nrepl | prune_dependencies_test.clj | (ns refactor-nrepl.ns.prune-dependencies-test
(:require
[clojure.test :refer [are is deftest]]
[refactor-nrepl.ns.prune-dependencies :as sut]))
(deftest libspec-in-use-without-refer-all?
(is (@#'sut/libspec-in-use-without-refer-all? '{:as-alias foo} "foo/bar"))
(is (not (@#'sut/libspec-in-use-without... | null | https://raw.githubusercontent.com/clojure-emacs/refactor-nrepl/45db05176a70199cee509ace8d6f7f5c6ec18e38/test/refactor_nrepl/ns/prune_dependencies_test.clj | clojure | (ns refactor-nrepl.ns.prune-dependencies-test
(:require
[clojure.test :refer [are is deftest]]
[refactor-nrepl.ns.prune-dependencies :as sut]))
(deftest libspec-in-use-without-refer-all?
(is (@#'sut/libspec-in-use-without-refer-all? '{:as-alias foo} "foo/bar"))
(is (not (@#'sut/libspec-in-use-without... | |
5fc9615170a9244dc1ad386d3a0efeb23910f6a12d6f00309be4e0e5ecd818eb | rudymatela/conjure | derive.hs | Copyright ( c ) 2019 - 2021 .
-- Distributed under the 3-Clause BSD licence (see the file LICENSE).
# LANGUAGE TemplateHaskell #
{-# LANGUAGE DeriveDataTypeable #-}
-- uncomment to debug derivation:
{ - # OPTIONS_GHC -ddump - splices # - }
import Test hiding ((-:), (->:))
-- -: and ->: should be generated by de... | null | https://raw.githubusercontent.com/rudymatela/conjure/df382dc680a7bd560731a2b59d0539f2dac33d9e/test/derive.hs | haskell | Distributed under the 3-Clause BSD licence (see the file LICENSE).
# LANGUAGE DeriveDataTypeable #
uncomment to debug derivation:
-: and ->: should be generated by deriveConjurable
Nested datatype cascade
Recursive nested datatype cascade
beware: values of the above type are always infinite!
derivation w... | Copyright ( c ) 2019 - 2021 .
# LANGUAGE TemplateHaskell #
{ - # OPTIONS_GHC -ddump - splices # - }
import Test hiding ((-:), (->:))
data Choice = Ae | Bee | Cee deriving (Show, Eq, Typeable)
data Peano = Zero | Succ Peano deriving (Show, Eq, Typeable)
data List a = a :- List a | Nil deriving (Show, Eq, ... |
77f90a50fd667bae2a06826f82ab447c5380609daa294f56096f021a5563b4f7 | danr/hipspec | Count.hs | # LANGUAGE FlexibleInstances , ScopedTypeVariables , TypeFamilies , DeriveDataTypeable #
count needs inddepth 2
module Main where
import Prelude (Bool(..),error,toEnum,fromEnum,pred,succ,sqrt,round
,Enum,Eq,Ord,Show,return,(.),undefined)
import Hip.HipSpec
import Test.QuickCheck hiding (Prop)
import... | null | https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/examples/old-examples/quickspec/Count.hs | haskell |
Boolean functions
Natural numbers
Z + y = y
(S x) + y = S (x + y)
count x [] = Z
count x (y:ys) =
case x == y of
True -> S (count x ys)
False -> count x ys
height :: Tree a -> Nat
height Leaf = Z
height (Node l x r) = S (max (height l) (height r))
mirror :: Tree a -> Tree a
mirror (Node l... | # LANGUAGE FlexibleInstances , ScopedTypeVariables , TypeFamilies , DeriveDataTypeable #
count needs inddepth 2
module Main where
import Prelude (Bool(..),error,toEnum,fromEnum,pred,succ,sqrt,round
,Enum,Eq,Ord,Show,return,(.),undefined)
import Hip.HipSpec
import Test.QuickCheck hiding (Prop)
import... |
4523ae426ebc75f826b47a658b622d65b852a9c8782dbd60a39f7a0e3ea4f141 | ndmitchell/cmdargs | GetOpt.hs | {-# LANGUAGE DeriveDataTypeable #-}
module System.Console.CmdArgs.Test.GetOpt where
import Data.Data
import System.Console.CmdArgs.GetOpt
import qualified System.Console.CmdArgs.Explicit as Explicit
import System.Console.CmdArgs.Test.Util
data Flag = Verbose | Version | Name String | Output String | Arg String deri... | null | https://raw.githubusercontent.com/ndmitchell/cmdargs/7c206f464fa666b2654ae9da59cdff44e310de66/System/Console/CmdArgs/Test/GetOpt.hs | haskell | # LANGUAGE DeriveDataTypeable # |
module System.Console.CmdArgs.Test.GetOpt where
import Data.Data
import System.Console.CmdArgs.GetOpt
import qualified System.Console.CmdArgs.Explicit as Explicit
import System.Console.CmdArgs.Test.Util
data Flag = Verbose | Version | Name String | Output String | Arg String deriving (Show,Data,Typeable)
options :... |
ea5a1e15952d10dd2b16cd886cc56a2feaa855422122af381b8e21eab8f60873 | andrewthad/impure-containers | Lib.hs | module Lib
( someFunc
) where
import Control.Monad.Primitive
import Data.Vector.Mutable
(IOVector, MVector, unsafeNew, unsafeWrite)
import qualified Data.Vector.Mutable as MV
@ measure mvlen : : Data . Vector . MVector s a - > Int @
@ invariant { v : Data . ... | null | https://raw.githubusercontent.com/andrewthad/impure-containers/20f14e3c671543cbb5af142767188e5111bebc65/src/Lib.hs | haskell | @
data Tuple a b <p :: a -> b -> Prop> = Tuple (x::a) (b<p x>)
@
@ test :: (List Int)<{\x y -> x < y}> @
This line fails as expected:
This line succeeds as expected:
This line fails, and I think it's understandable why:
return myVec | module Lib
( someFunc
) where
import Control.Monad.Primitive
import Data.Vector.Mutable
(IOVector, MVector, unsafeNew, unsafeWrite)
import qualified Data.Vector.Mutable as MV
@ measure mvlen : : Data . Vector . MVector s a - > Int @
@ invariant { v : Data . ... |
2fedccd9550e2072f8e10a26b7b165e96ae051695b2ec107e2ab38ed6574eb84 | grin-compiler/ghc-whole-program-compiler-project | WordSpec.hs | # LANGUAGE OverloadedStrings , PatternSynonyms , MagicHash , UnboxedTuples , BangPatterns , CPP , ScopedTypeVariables #
module PrimOp.WordSpec where
import Control.Monad.State.Strict
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Modifiers
import Test.QuickCheck.Monadic
import Stg.Syntax (Name, Typ... | null | https://raw.githubusercontent.com/grin-compiler/ghc-whole-program-compiler-project/3fe5fb0aaebfe8005d44d29357dc53156c8b6537/external-stg-interpreter/test/PrimOp/WordSpec.hs | haskell | # LANGUAGE OverloadedStrings , PatternSynonyms , MagicHash , UnboxedTuples , BangPatterns , CPP , ScopedTypeVariables #
module PrimOp.WordSpec where
import Control.Monad.State.Strict
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Modifiers
import Test.QuickCheck.Monadic
import Stg.Syntax (Name, Typ... | |
4009aed3ede9ec35d4348f686bccf2bf761c87ce13ad8ef78ef30cf657ea8f52 | OCamlPro/alt-ergo | psmt2_to_alt_ergo.ml | (******************************************************************************)
(* *)
Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2013 - 2018
(* ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/384906b514c71ee45a9de7310cee6ef2199a0f78/src/parsers/psmt2_to_alt_ergo.ml | ocaml | ****************************************************************************
License version 2.0
... | Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2013 - 2018
This file is distributed under the terms of the Apache Software
open AltErgoLib
module Smtlib_error = Psmt2Frontend.Smtlib_error
module Smtlib_options = Ps... |
573007b47cb1e3c18d0e7e23ccaa4a745daacb41298677751dc6cea5f8a417b3 | lrascao/raterl | raterl_app.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the ... | null | https://raw.githubusercontent.com/lrascao/raterl/9c1dddda346a190aa19b6299778479a891a17a9c/src/raterl_app.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(raterl_app).
-behavi... |
96de278585048e95718020a15438c7b80dc5b34fc11c45418f05413b182b3e73 | stritzinger/opcua | opcua_server_session_pool_sup.erl | -module(opcua_server_session_pool_sup).
-behaviour(supervisor).
%%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% API functions
-export([start_link/0]).
-export([start_session/2]).
%% Behaviour supervisor callback functions
-export([init/1]).
MACROS % % % % % % % % % % % % % %... | null | https://raw.githubusercontent.com/stritzinger/opcua/a9802f829f80e6961871653f4d3c932f9496ba99/src/opcua_server_session_pool_sup.erl | erlang | EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
API functions
Behaviour supervisor callback functions
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
API FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... | -module(opcua_server_session_pool_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([start_session/2]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
start_session(SessId, AuthToken) ->
supervisor:start_child(?SERVER, ... |
f0ededf146e0924da7d6218d22c9bc19026e4f0829973d887fa1d882b08a1a24 | ndmitchell/supero | Prims.hs |
module Main where
root x y z = if z == 0 then x * y else (x+y) * z
(==) x y = primEqInt'2 x y
(*) = primMulInt'2
(+) = primAddInt'2
| null | https://raw.githubusercontent.com/ndmitchell/supero/a8b16ea90862e2c021bb139d7a7e9a83700b43b2/supero3/samples/simple/Prims.hs | haskell |
module Main where
root x y z = if z == 0 then x * y else (x+y) * z
(==) x y = primEqInt'2 x y
(*) = primMulInt'2
(+) = primAddInt'2
| |
fb242b3f92927cf3da6dedd7d04f96545501ace752ef18f4fbedda617413a0ca | WhatsApp/eqwalizer | my_gradual_behaviour.erl | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
%%%
This source code is licensed under the Apache 2.0 license found in
%%% the LICENSE file in the root directory of this source tree.
-module(my_gradual_behaviour).
-callback init(atom()) -> ok.
-callback stop(a | eqwalizer:dynamic()) ... | null | https://raw.githubusercontent.com/WhatsApp/eqwalizer/3bd0ab4952717b9527b71eb389c103224ab3a0b8/eqwalizer/test_projects/check_gradual/src/my_gradual_behaviour.erl | erlang |
the LICENSE file in the root directory of this source tree. | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
This source code is licensed under the Apache 2.0 license found in
-module(my_gradual_behaviour).
-callback init(atom()) -> ok.
-callback stop(a | eqwalizer:dynamic()) -> ok.
|
5549f16deaf53f03b1d289e1e076f5a766223766e2f297ec4de9f16c2b4c1332 | fragnix/fragnix | Data.IP.Addr.hs | {-# LANGUAGE Haskell2010 #-}
{-# LINE 1 "Data/IP/Addr.hs" #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
module Data.IP.Addr where
import Control.Monad
import Data.Bits
import Data.Char
import Data.Data (Data)
import Data.List (foldl', intersperse)
import Data.String
import Data.Typeable (Typ... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Data.IP.Addr.hs | haskell | # LANGUAGE Haskell2010 #
# LINE 1 "Data/IP/Addr.hs" #
# LANGUAGE DeriveDataTypeable #
--------------------------------------------------------------
--------------------------------------------------------------
This is host byte order
--------------------------------------------------------------
fromEnum and toEn... | # LANGUAGE DeriveGeneric #
module Data.IP.Addr where
import Control.Monad
import Data.Bits
import Data.Char
import Data.Data (Data)
import Data.List (foldl', intersperse)
import Data.String
import Data.Typeable (Typeable)
import Data.Word
import Network.Socket
import Numeric (showHex, showInt)
import System.Byte... |
cd6a9528bdd000470f78f90d95e18879f73b830c6775f643f596149be57923af | jimrthy/frereth | cards.cljs | (ns frereth.apps.roadblocks.cards
"This namespace contains devcards and tests, and is the entrypoint for
both 'yarn cards' and 'yarn test'."
(:require ["jsdom-global" :as jsdom-global]
;; Import all namespaces with cards here to load them.
#_[frereth.apps.roadblocks.hello-cards]
... | null | https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/racing/roadblocks/src/cljs/frereth/apps/roadblocks/cards.cljs | clojure | Import all namespaces with cards here to load them.
Set jsdom to mock a dom environment for node testing.
Q: Is this appropriate?
We want to mostly use the same styles as the app, but might need to make
some exceptions. | (ns frereth.apps.roadblocks.cards
"This namespace contains devcards and tests, and is the entrypoint for
both 'yarn cards' and 'yarn test'."
(:require ["jsdom-global" :as jsdom-global]
#_[frereth.apps.roadblocks.hello-cards]
[frereth.utils.previews.frame :as previews]))
(jsdom-global)
(d... |
207406fad4520692ae864276aa7a1e9609d3a3c07a527d6d5dd287f94afb3982 | RDTK/generator | conditions.lisp | ;;;; conditions.lisp --- Conditions used in the recipe concrete syntax.
;;;;
Copyright ( C ) 2016 - 2019 Jan Moringen
;;;;
Author : < >
(cl:in-package #:build-generator.model.project)
;;; Source location conditions
(define-condition annotation-condition ()
((annotations :initarg :annotations
... | null | https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/model/project/concrete-syntax/conditions.lisp | lisp | conditions.lisp --- Conditions used in the recipe concrete syntax.
Source location conditions
YAML syntax | Copyright ( C ) 2016 - 2019 Jan Moringen
Author : < >
(cl:in-package #:build-generator.model.project)
(define-condition annotation-condition ()
((annotations :initarg :annotations
:accessor annotations
:initform '())))
(defmethod print-object :around ((object annotation-con... |
ee9b2661f483ed9368d71f31075980ce77643a20b0b490ae342cb9d570160c1f | haskell-opengl/OpenGLRaw | FramebufferMultisample.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
Module : Graphics . GL.EXT.FramebufferMultisample
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/EXT/FramebufferMultisample.hs | haskell | ------------------------------------------------------------------------------
|
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Functions | # LANGUAGE PatternSynonyms #
Module : Graphics . GL.EXT.FramebufferMultisample
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.EXT.FramebufferMultisample (
glGetEXTFramebufferMultisample,
gl_EXT_framebuffer_multisample,
pattern GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT,
p... |
932da34cea42bc2cc36f883403d2398cdb37a02897143b7396847ba47a79c669 | nathell/summhn | core.clj | (ns summhn.core
(:require [summhn.scrape :as scrape]
[summhn.output :as output])
(:import java.time.Instant))
(defn run [_opts]
(let [timestamp (str (Instant/now))
content (output/generate (scrape/get-articles))]
(output/save! "index.html" content)
(output/save! (str "previously/" tim... | null | https://raw.githubusercontent.com/nathell/summhn/ab83b3857c0218327e2d502f8f1f7e0adb82608c/src/summhn/core.clj | clojure | (ns summhn.core
(:require [summhn.scrape :as scrape]
[summhn.output :as output])
(:import java.time.Instant))
(defn run [_opts]
(let [timestamp (str (Instant/now))
content (output/generate (scrape/get-articles))]
(output/save! "index.html" content)
(output/save! (str "previously/" tim... | |
899ddda82f77c60bc06fed767b8c1f0ab2f0a0fcdd443f37048819f712c3c4b4 | reborg/clojure-essential-reference | 3.clj | < 1 >
;; CompilerException java.lang.RuntimeException: No such namespace: ns1
< 2 >
;; false
(create-ns 'ns1) ; <3>
< 4 >
< 5 >
;; true
< 6 >
;; "now it's working"
< 7 >
;; true | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OtherFunctions/VarsandNamespaces/ns%2Cin-ns%2Ccreate-nsandremove-ns/3.clj | clojure | CompilerException java.lang.RuntimeException: No such namespace: ns1
false
<3>
true
"now it's working"
true | < 1 >
< 2 >
< 4 >
< 5 >
< 6 >
< 7 > |
4de767cd9d62df407c9a15f525f2fa60087e48887ba904692f88bb4748a355f3 | argp/bap | ssa_visitor.ml | Visitor for SSA
open Type
open Ssa
open Var
class type t = object
(** Called when visiting an expression *)
method visit_exp: exp -> exp visit_action
(** Called when visiting a statement *)
method visit_stmt : stmt -> stmt visit_action
(** Called when visiting a referenced variable. See also {!visit_a... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/ssa_visitor.ml | ocaml | * Called when visiting an expression
* Called when visiting a statement
* Called when visiting a referenced variable. See also {!visit_avar}.
FIXME: warn if x = node
TODO: attributes? | Visitor for SSA
open Type
open Ssa
open Var
class type t = object
method visit_exp: exp -> exp visit_action
method visit_stmt : stmt -> stmt visit_action
method visit_rvar : var -> var visit_action
* Called when visiting an assigned variable .
Note that in a Move ( ) , referenced variables will b... |
f8f5245a1628710ca7dd0fa671571d1dadc445aca1a900ff7623b725415ed12e | zaxtax/hakaru-old | Sampler.hs | {-# LANGUAGE RankNTypes #-}
{-# OPTIONS -W #-}
module Language.Hakaru.Sampler (Sampler, deterministic, sbind, smap) where
import Language.Hakaru.Mixture (Mixture, mnull, empty, scale, point)
import Language.Hakaru.Distribution (choose)
import System.Random (RandomGen)
Sampling procedures that produce one sample
t... | null | https://raw.githubusercontent.com/zaxtax/hakaru-old/edac4bca19a2b7b9257e584529cde5e7242e9695/Language/Hakaru/Sampler.hs | haskell | # LANGUAGE RankNTypes #
# OPTIONS -W # |
module Language.Hakaru.Sampler (Sampler, deterministic, sbind, smap) where
import Language.Hakaru.Mixture (Mixture, mnull, empty, scale, point)
import Language.Hakaru.Distribution (choose)
import System.Random (RandomGen)
Sampling procedures that produce one sample
type Sampler a = forall g. (RandomGen g) => g ->... |
6813fce19411eaf7dc66ec9cb209dfd4d0a7a9c465ae5bf2f198f73bd7c789c3 | LPCIC/matita | virtuals.ml | type symbol = Glib.unichar
type tag = string
let virtual_to_symbol = Hashtbl.create 503;;
let tag_to_data = Hashtbl.create 503;;
let add_virtual names symbol tags =
List.iter
(fun name ->
if Hashtbl.mem virtual_to_symbol name then
HLog.error
(Printf.sprintf "name %s already used for... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/matita/virtuals.ml | ocaml | type symbol = Glib.unichar
type tag = string
let virtual_to_symbol = Hashtbl.create 503;;
let tag_to_data = Hashtbl.create 503;;
let add_virtual names symbol tags =
List.iter
(fun name ->
if Hashtbl.mem virtual_to_symbol name then
HLog.error
(Printf.sprintf "name %s already used for... | |
25fc4360fe86337f6104fbdbedd5ac110a39f3613f27bee963169e9d5a2ae497 | fukamachi/dexador | decoding-stream.lisp | (in-package :cl-user)
(defpackage dexador.decoding-stream
(:use :cl)
(:import-from :trivial-gray-streams
:fundamental-character-input-stream
:stream-read-char
:stream-unread-char
:stream-read-byte
:stream-read-sequence)
(:import-from ... | null | https://raw.githubusercontent.com/fukamachi/dexador/82722c725357a5b5fbecba604576584c0fc7f7f0/src/decoding-stream.lisp | lisp | (in-package :cl-user)
(defpackage dexador.decoding-stream
(:use :cl)
(:import-from :trivial-gray-streams
:fundamental-character-input-stream
:stream-read-char
:stream-unread-char
:stream-read-byte
:stream-read-sequence)
(:import-from ... | |
69f675513eceb2e10a1e36c6286c937286e5ad357aed3f74632cc5808fab9296 | bsless/clj-fast | core.clj | (ns clj-fast.core
(:require
[clj-fast.util :refer [as]]
[clojure.core.protocols :as p])
(:import
(clojure.lang Box)))
(set! *warn-on-reflection* true)
(defn entry-at
"Returns the map-entry mapped to key or nil if key not present."
{:inline
(fn entry-at [m k]
(if (symbol? m)
`(.entryAt ... | null | https://raw.githubusercontent.com/bsless/clj-fast/de24d4d429bddb60f1473632716b39dba38dd5c7/src/clj_fast/core.clj | clojure | -core/src/reitit/impl.cljc#L136
-api/blob/master/src/compojure/api/common.clj#L46
Credit github.com/joinr: github.com/bsless/clj-fast/issues/1 | (ns clj-fast.core
(:require
[clj-fast.util :refer [as]]
[clojure.core.protocols :as p])
(:import
(clojure.lang Box)))
(set! *warn-on-reflection* true)
(defn entry-at
"Returns the map-entry mapped to key or nil if key not present."
{:inline
(fn entry-at [m k]
(if (symbol? m)
`(.entryAt ... |
9c5774b448fe725b43c0345bf13d3f879ca29ec82c200694baa3f29e672adb91 | scrintal/heroicons-reagent | globe_europe_africa.cljs | (ns com.scrintal.heroicons.solid.globe-europe-africa)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/globe_europe_africa.cljs | clojure | (ns com.scrintal.heroicons.solid.globe-europe-africa)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365... | |
77b4ca9350a719f86f74fa58b1f826d8775a6d17f36a84456216fa1493d79476 | llelf/prose | LVT.hs | -- generated by derive.hs
module Prose.Internal.LVT where
lvt = [
['\xAC01'..'\xAC1B'],
['\xAC1D'..'\xAC37'],
['\xAC39'..'\xAC53'],
['\xAC55'..'\xAC6F'],
['\xAC71'..'\xAC8B'],
['\xAC8D'..'\xACA7'],
['\xACA9'..'\xACC3'],
['\xACC5'..'\xACDF'],
['\xACE1'..'\xACFB'],
['\xACFD'..'\xAD... | null | https://raw.githubusercontent.com/llelf/prose/ee32bef5cc7af41265ede92406943a5e2a60d530/Prose/Internal/LVT.hs | haskell | generated by derive.hs | module Prose.Internal.LVT where
lvt = [
['\xAC01'..'\xAC1B'],
['\xAC1D'..'\xAC37'],
['\xAC39'..'\xAC53'],
['\xAC55'..'\xAC6F'],
['\xAC71'..'\xAC8B'],
['\xAC8D'..'\xACA7'],
['\xACA9'..'\xACC3'],
['\xACC5'..'\xACDF'],
['\xACE1'..'\xACFB'],
['\xACFD'..'\xAD17'],
['\xAD19'..'\xAD... |
58c393ce91d2f3f23da47818f3e245414f68367f3f54e2c438d19356feadff96 | mtesseract/nakadi-client | Lenses.hs | |
Module : Network . . Lenses
Description : Nakadi Client Library Lenses
Copyright : ( c ) 2017
License : :
Stability : experimental
Portability : POSIX
This module exports lenses for the data types contained in this
package .
Module : Network.Nakadi.Lenses
Description ... | null | https://raw.githubusercontent.com/mtesseract/nakadi-client/f8eef3ac215459081b01b0b48f0b430ae7701f52/src/Network/Nakadi/Lenses.hs | haskell | |
Module : Network . . Lenses
Description : Nakadi Client Library Lenses
Copyright : ( c ) 2017
License : :
Stability : experimental
Portability : POSIX
This module exports lenses for the data types contained in this
package .
Module : Network.Nakadi.Lenses
Description ... | |
090d989783c01d11dd6bee779ec6ab47d2e9f49bebc2b38d5731f68522827a6a | Smoltbob/Caml-Est-Belle | cls-rec.ml | let x = 10 in
let rec f y =
if y = 0 then 0 else
x + f (y - 1) in
print_int (f 123)
| null | https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/mincaml/cls-rec.ml | ocaml | let x = 10 in
let rec f y =
if y = 0 then 0 else
x + f (y - 1) in
print_int (f 123)
| |
3a638da7b6b775b190dc6e8594576be45fcec65c73fdc6d54c8a61854628d4d2 | reborg/clojure-essential-reference | 3.clj | ;; export CLOJURE_JAR=~/.m2/repository/org/clojure/clojure/1.8.0/clojure-1.8.0.jar
java -cp $ { ; < 1 >
;; user=>
(require '[clojure.java.io :as io])
(def source-file (str *compile-path* "/assertion.clj"))
< 2 >
(spit source-file
"(ns assertion)
(defn select [n] ; <3>
(case (rem n 3)
0 :ok
... | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/9a3eb82024c8e5fbe17412af541c2cd30820c92e/DynamicVariablesintheStandardLibrary/*assert*/3.clj | clojure | export CLOJURE_JAR=~/.m2/repository/org/clojure/clojure/1.8.0/clojure-1.8.0.jar
< 1 >
user=>
<3>
assertion
:reject |
(require '[clojure.java.io :as io])
(def source-file (str *compile-path* "/assertion.clj"))
< 2 >
(spit source-file
"(ns assertion)
(case (rem n 3)
0 :ok
1 :possible
2 :reject
(assert false \"Should never happen\")))")
< 4 >
(assertion/select 5)
< 5 >
AssertionError Asser... |
0d57cc8814c035aad5545de4ba3dd87d6d54d7aebdd69675ffa2fddf87d535e0 | duanebester/clunk | byte_buffer_socket.clj | (ns com.clunk.byte-buffer-socket
(:require
[clojure.core.async :as async]
[clojure.tools.logging :as log])
(:import
(java.nio ByteBuffer)
(java.nio.channels SocketChannel)
(java.net InetSocketAddress)))
(defrecord ByteBufferSocket [^SocketChannel client in-ch out-ch])
(defn connected? [^SocketChann... | null | https://raw.githubusercontent.com/duanebester/clunk/86c50a32230e055ba3b0dd1e34f31e05a32cab20/src/com/clunk/byte_buffer_socket.clj | clojure | Allocate for full message
Add back tag
Add back length
Read rest of message
Read header
Send to downstream listeners
Receive buffer
Example usage
Utility fn
Startup message for user: "jimmy", and database: "world"
Send ByteBuffer message
Print received Message
Close | (ns com.clunk.byte-buffer-socket
(:require
[clojure.core.async :as async]
[clojure.tools.logging :as log])
(:import
(java.nio ByteBuffer)
(java.nio.channels SocketChannel)
(java.net InetSocketAddress)))
(defrecord ByteBufferSocket [^SocketChannel client in-ch out-ch])
(defn connected? [^SocketChann... |
666140d0cc6d839c76661869de32f73756d55253ca846951701ecc69ab6d2eed | toschoo/mom | parse.hs | module Main
where
import System.Environment
import System.Exit
import Network.Mom.Stompl.Parser
import Network.Mom.Stompl.Frame
import qualified Data.ByteString as B
import Data .
-- import Data.Word
main :: IO ()
main = do
as <- getArgs
case as of
[f] -> runTe... | null | https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/stompl/test/smoke/parse.hs | haskell | import Data.Word | module Main
where
import System.Environment
import System.Exit
import Network.Mom.Stompl.Parser
import Network.Mom.Stompl.Frame
import qualified Data.ByteString as B
import Data .
main :: IO ()
main = do
as <- getArgs
case as of
[f] -> runTest f
_ -> putStrLn "I ju... |
f008c9e65b68cbcebde496512dde176f489b6f90d768218495dad29b7c1c2f8d | Dasudian/DSDIN | dsdhttp_app.erl | %%%-------------------------------------------------------------------
%% @doc dsdhttp public API
%% @end
%%%-------------------------------------------------------------------
-module(dsdhttp_app).
-behaviour(application).
-define(DEFAULT_SWAGGER_EXTERNAL_PORT, 8043).
-define(DEFAULT_SWAGGER_EXTERNAL_LISTEN_ADDRES... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdhttp/src/dsdhttp_app.erl | erlang | -------------------------------------------------------------------
@doc dsdhttp public API
@end
-------------------------------------------------------------------
Application callbacks
Tests only
====================================================================
API
============================================... |
-module(dsdhttp_app).
-behaviour(application).
-define(DEFAULT_SWAGGER_EXTERNAL_PORT, 8043).
-define(DEFAULT_SWAGGER_EXTERNAL_LISTEN_ADDRESS, <<"0.0.0.0">>).
-define(DEFAULT_SWAGGER_INTERNAL_PORT, 8143).
-define(DEFAULT_SWAGGER_INTERNAL_LISTEN_ADDRESS, <<"127.0.0.1">>).
-define(DEFAULT_WEBSOCKET_INTERNAL_PORT, 814... |
9f8569894e0890c457c6dac373d595cc2a510b270ca48c1bbf5340d7a17e97b3 | anmolsahoo25/ocaml-scylla | protocol.mli | type bigstring = Bigstringaf.t
type value =
| Null
| Ascii of bigstring
| Bigint of int64
| Blob of bigstring
| Boolean of bool
| Counter of int64
(* | Decimal of *)
| Double of float
| Float of float
| Int of int32
| Timestamp of int64
(* | Uuid of *)
| Varchar of bigstring
| Varint of big... | null | https://raw.githubusercontent.com/anmolsahoo25/ocaml-scylla/054428cf7dc96a23b9f8a85623eed7844c0f49b3/src/protocol.mli | ocaml | | Decimal of
| Uuid of | type bigstring = Bigstringaf.t
type value =
| Null
| Ascii of bigstring
| Bigint of int64
| Blob of bigstring
| Boolean of bool
| Counter of int64
| Double of float
| Float of float
| Int of int32
| Timestamp of int64
| Varchar of bigstring
| Varint of bigstring
| Timeuuid
| Inet
| Date
... |
f117f38a1cfad0e772e05fdbe5d757f8b932bf8c55eaf40b626e32a0fe79d59d | erlang/otp | diameter_pool_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2015 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/66dd3c397b5dd68cb087a1a830f25c62c5d1d2ad/lib/diameter/test/diameter_pool_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2015 - 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 ,
-module(diameter_pool_SUITE).
-export([run/0,
run/1]).
-export([suite/0,
all/0,
tcp/1,... |
c96adf680ec43b1463ca3bc62e880bdd394e4b96eb99a8e4275ba1884b7e469b | nikita-volkov/rerebase | State.hs | module Control.Monad.State
(
module Rebase.Control.Monad.State
)
where
import Rebase.Control.Monad.State
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Control/Monad/State.hs | haskell | module Control.Monad.State
(
module Rebase.Control.Monad.State
)
where
import Rebase.Control.Monad.State
| |
fc7d712fe02180b3a93ab8b463b903c0df1f9bdc40a2faa7fe10f1bd9b17664f | synduce/Synduce | pareto.ml | type 'a tree = Leaf of 'a * 'a | Node of 'a * 'a tree * 'a tree
let rec tree_min = function
| Leaf (x, y) -> x + y
| Node (a, l, r) -> min a (min (tree_min l) (tree_min r))
let rec tree_max = function
| Leaf (x, y) -> x + y
| Node (a, l, r) -> max a (max (tree_max l) (tree_max r))
let rec is_bst = function
... | null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/constraints/bst/pareto.ml | ocaml | type 'a tree = Leaf of 'a * 'a | Node of 'a * 'a tree * 'a tree
let rec tree_min = function
| Leaf (x, y) -> x + y
| Node (a, l, r) -> min a (min (tree_min l) (tree_min r))
let rec tree_max = function
| Leaf (x, y) -> x + y
| Node (a, l, r) -> max a (max (tree_max l) (tree_max r))
let rec is_bst = function
... | |
69e6c571f6efed6d2a6bf71c57c38db9e515f5cc897e340425cceb014d1f6744 | athensresearch/athens | kanban.cljs | (ns athens.types.query.kanban
"Views for Athens Tasks"
(:require
["/components/Block/BlockFormInput" :refer [BlockFormInput]]
["/components/DnD/DndContext" :refer [DragAndDropContext]]
["/components/DnD/Droppable" :refer [Droppable]]
["/components/DnD/Sortable" :refer [Sortable]]
["/components/I... | null | https://raw.githubusercontent.com/athensresearch/athens/cd394dc99468e5f744324bef3e39db05feaced47/src/cljs/athens/types/query/kanban.cljs | clojure | UPDATE
could use swimlane and column data for uniqueness
TODO show something if empty title
TODO: should context metadata be stored at the card level or the container level?
All commented out for when we modify kanban columns
update all blocks that match key:value to key:new-value | (ns athens.types.query.kanban
"Views for Athens Tasks"
(:require
["/components/Block/BlockFormInput" :refer [BlockFormInput]]
["/components/DnD/DndContext" :refer [DragAndDropContext]]
["/components/DnD/Droppable" :refer [Droppable]]
["/components/DnD/Sortable" :refer [Sortable]]
["/components/I... |
58b7ce517f553aeb231013f7b170bd081c8f404939bc4ccc569483f7f6c60758 | pierric/neural-network | SIMD.hs | ------------------------------------------------------------
-- |
Module : Data . NeuralNetwork . Backend .
-- Description : SIMD based calculations
Copyright : ( c ) 2016
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
-- Stability : experimental
-- Portability : p... | null | https://raw.githubusercontent.com/pierric/neural-network/406ecaf334cde9b10c9324e1f6c4b8663eae58d7/Backend-blashs/novec/Data/NeuralNetwork/Backend/BLASHS/SIMD.hs | haskell | ----------------------------------------------------------
|
Description : SIMD based calculations
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : portable
This module supplies a collection of calculations that
could be implemented on top of SIMD.
-------------------... | Module : Data . NeuralNetwork . Backend .
Copyright : ( c ) 2016
Maintainer : < >
module Data.NeuralNetwork.Backend.BLASHS.SIMD (
SIMDable(..),
cost', relu, relu', tanh, tanh'
) where
import Data.Vector.Storable.Mutable as MV
import Control.Exception
import qualified Data.NeuralNetwor... |
82f46a4901a1cb7ace129f4d24e35e9f17353044050346d7350b5899f07f3f20 | supki/envparse | CustomInfoWidth.hs | # LANGUAGE ApplicativeDo #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
-- | Custom info width example.
module Main (main) where
import Env
import System.Environment (getArgs)
import Text.Read (readMaybe)
main :: IO ()
main = do
(readMaybe -> Just widthMax) : _ <- getArgs
_ <- hello widthMax
error "... | null | https://raw.githubusercontent.com/supki/envparse/59601499efb9df9ef694d8dfb6cc045662fe0ed5/example/CustomInfoWidth.hs | haskell | | Custom info width example. | # LANGUAGE ApplicativeDo #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
module Main (main) where
import Env
import System.Environment (getArgs)
import Text.Read (readMaybe)
main :: IO ()
main = do
(readMaybe -> Just widthMax) : _ <- getArgs
_ <- hello widthMax
error "impossible"
hello :: Int -> IO ... |
0b4b80c4359de82155e2468fcd38c4f1bda23791f8eedbe9bec0d9e3a395a583 | ijvcms/chuanqi_dev | hook_star_reward_config.erl | %%%-------------------------------------------------------------------
@author zhengsiying
%%% @doc
%%% 自动生成文件,不要手动修改
%%% @end
Created : 2016/10/12
%%%-------------------------------------------------------------------
-module(hook_star_reward_config).
-include("common.hrl").
-include("config.hrl").
-compile([e... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/config/hook_star_reward_config.erl | erlang | -------------------------------------------------------------------
@doc
自动生成文件,不要手动修改
@end
------------------------------------------------------------------- | @author zhengsiying
Created : 2016/10/12
-module(hook_star_reward_config).
-include("common.hrl").
-include("config.hrl").
-compile([export_all]).
get_list_conf() ->
[ hook_star_reward_config:get(X) || X <- get_list() ].
get_list() ->
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20].
... |
2a43ef6462817c76769771821af7734b36e93c32ec798d0aa5f3ee1546ce365d | nuvla/api-server | base_uri.clj | (ns sixsq.nuvla.server.middleware.base-uri
"middleware to add the :base-uri key and value to the request"
(:require
[sixsq.nuvla.server.app.params :as p]))
(defn get-host-port
"Gets the originating host and port, preferring the 'forwarded'
headers, if they exist. If neither the x-forwarded-host or host
... | null | https://raw.githubusercontent.com/nuvla/api-server/e62da2468ccda8f4a08d7b5b358ceef70a36b542/code/src/sixsq/nuvla/server/middleware/base_uri.clj | clojure | (ns sixsq.nuvla.server.middleware.base-uri
"middleware to add the :base-uri key and value to the request"
(:require
[sixsq.nuvla.server.app.params :as p]))
(defn get-host-port
"Gets the originating host and port, preferring the 'forwarded'
headers, if they exist. If neither the x-forwarded-host or host
... | |
35ece0b6008586d2237056178e00ebabe806fb82625f7d2e83fae66977440311 | capnproto/capnp-ocaml | genSignatures.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* capnp - ocaml
*
* Copyright ( c ) 2013 - 2014 ,
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without ... | null | https://raw.githubusercontent.com/capnproto/capnp-ocaml/dda3d811aa7734110d7af051465011f1f823ffb9/src/compiler/genSignatures.ml | ocaml | Generate a function for unpacking a capnp union type as an OCaml variant.
If there are no union fields, then suppress the union type
For void types, we suppress extra the setter argument
FIXME: should allow setting from a Reader
Generate accessors for getting or setting the selected fields. The specified
f... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* capnp - ocaml
*
* Copyright ( c ) 2013 - 2014 ,
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without ... |
b6a761eb6f4b57c3fb7250ae9e0aed47868249284baecb6a2ed80ab5e0e059bf | plewto/Cadejo | constants.clj | (println "--> alias constants")
(ns cadejo.instruments.alias.constants)
(def alias-parameters
'[:a-depth1 :a-depth2 :amp :a-source1 :a-source2 :b-depth1 :b-depth2
:b-source1 :b-source2 :cc7->volume :c-depth1 :c-depth2 :c-source1
:c-source2 :d-depth1 :d-depth2 :distortion1-mix :distortion1-param
:dist... | null | https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/cadejo/instruments/alias/constants.clj | clojure | ENV 1
sample and Hold
MIDI CC B
Velocity
MIDI CC A | (println "--> alias constants")
(ns cadejo.instruments.alias.constants)
(def alias-parameters
'[:a-depth1 :a-depth2 :amp :a-source1 :a-source2 :b-depth1 :b-depth2
:b-source1 :b-source2 :cc7->volume :c-depth1 :c-depth2 :c-source1
:c-source2 :d-depth1 :d-depth2 :distortion1-mix :distortion1-param
:dist... |
14d7e0c70013bf84dfa896345c7501e2e8074bc3c4a94b4cfc19409633bb4c7c | inaka/elvis | xref_SUITE.erl | -module(xref_SUITE).
-type config() :: proplists:proplist().
-export(
[
all/0,
xref/1
]
).
-spec all() -> [atom()].
all() ->
ExcludedFuns = [all, module_info],
Exports = ?MODULE:module_info(exports),
[F || {F, 1} <- Exports, not lists:member(F, ExcludedFuns)].
-spec xref(config()) -> {comment,... | null | https://raw.githubusercontent.com/inaka/elvis/8b81ef98f7337a936d899061160a35bc292a5cf5/test/xref_SUITE.erl | erlang | -module(xref_SUITE).
-type config() :: proplists:proplist().
-export(
[
all/0,
xref/1
]
).
-spec all() -> [atom()].
all() ->
ExcludedFuns = [all, module_info],
Exports = ?MODULE:module_info(exports),
[F || {F, 1} <- Exports, not lists:member(F, ExcludedFuns)].
-spec xref(config()) -> {comment,... | |
3686a6bed931f58274195d37007efd67f0724da2afde8144d23e340146eb4184 | florence/cover | arrow.rkt | #lang racket
;; Don't forget to require this at the template level! Otherwise, Racket will
complain that two instances of racket / gui are started .
(module m-browse-syntax typed/racket
(require/typed macro-debugger/syntax-browser
[browse-syntax (→ Syntax Any)]
[browse-syntaxes (... | null | https://raw.githubusercontent.com/florence/cover/bc17e4e22d47b1da91ddaa5eafefe28f4675e85c/cover-test/cover/tests/multibyte-coverage/arrow.rkt | racket | Don't forget to require this at the template level! Otherwise, Racket will
display :0 otherwise) | #lang racket
complain that two instances of racket / gui are started .
(module m-browse-syntax typed/racket
(require/typed macro-debugger/syntax-browser
[browse-syntax (→ Syntax Any)]
[browse-syntaxes (→ (Listof Syntax) Any)])
(provide browse-syntax
browse-syntaxes)... |
665bbacc9cacf78cde8c475ea55082b5f2905ec4b0a391e426a496e36da200ed | kupl/LearnML | original.ml | let rec iter ((n : int), (f : int -> int)) (x : int) : int =
if n = 1 then f x
else if n < 1 then raise Failure "ERROR"
else f (iter (n - 1, f) x)
| null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/iter/sub25/original.ml | ocaml | let rec iter ((n : int), (f : int -> int)) (x : int) : int =
if n = 1 then f x
else if n < 1 then raise Failure "ERROR"
else f (iter (n - 1, f) x)
| |
beece1d2c48906473bafd6a6e40f887802a7807921ff0498d3a1893764d2f637 | roelvandijk/numerals | TestData.hs | |
[ @ISO639 - 1@ ] hr
[ @ISO639 - 2@ ] hrv
[ @ISO639 - 3@ ] hrv
[ @Native name@ ] Hrvatski
[ @English name@ ] Croatian
[@ISO639-1@] hr
[@ISO639-2@] hrv
[@ISO639-3@] hrv
[@Native name@] Hrvatski
[@English name@] Croatian
-}
module Text.Num... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/HRV/TestData.hs | haskell | ------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
--------------------------------------------------------------------------... | |
[ @ISO639 - 1@ ] hr
[ @ISO639 - 2@ ] hrv
[ @ISO639 - 3@ ] hrv
[ @Native name@ ] Hrvatski
[ @English name@ ] Croatian
[@ISO639-1@] hr
[@ISO639-2@] hrv
[@ISO639-3@] hrv
[@Native name@] Hrvatski
[@English name@] Croatian
-}
module Text.Num... |
8ac61e0a991cbcde5e0dddabc21d42709beeb70c0ae16047afbceb2d974dacda | mirage/mirage-kv-mem | test_pure.ml |
module Pure = Mirage_kv_mem.Pure
let compare_t =
let module M = Pure in (module M: Alcotest.TESTABLE with type t = Pure.t)
let we =
let module M = struct
type t = Mirage_kv_mem.write_error
let pp = Mirage_kv_mem.pp_write_error
let equal a b = compare a b = 0
end in
(module M: Alcotest.TESTABLE wi... | null | https://raw.githubusercontent.com/mirage/mirage-kv-mem/2645ad85da63d446d2b9929759da3789d05b92e7/test/test_pure.ml | ocaml |
module Pure = Mirage_kv_mem.Pure
let compare_t =
let module M = Pure in (module M: Alcotest.TESTABLE with type t = Pure.t)
let we =
let module M = struct
type t = Mirage_kv_mem.write_error
let pp = Mirage_kv_mem.pp_write_error
let equal a b = compare a b = 0
end in
(module M: Alcotest.TESTABLE wi... | |
a69138107be139ce5b54aaaa3a7eafc3364a883ce459cdc03a884b795d2a1194 | dongcarl/guix | connman.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2016 , 2017 , 2019 , 2021 < >
Copyright © 2017 < >
Copyright © 2017 Clément < >
Copyright © 2017 < >
Copyright © 2017 , 2018 , 2019 , 2020 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistr... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/connman.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 © 2016 , 2017 , 2019 , 2021 < >
Copyright © 2017 < >
Copyright © 2017 Clément < >
Copyright © 2017 < >
Copyright © 2017 , 2018 , 2019 , 2020 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
a... |
b6115bcbb5aed353fca238a7597ef1531d4418972b17c8314d682ff2942d964c | brownplt/pyret-docs | ebnf.rkt | #lang at-exp racket/base
(require scribble/base scribble/core scribble/decode scribble/basic scribble/html-properties
racket/list "ragged.rkt" racket/string)
(provide bnf prod-link prod-ref)
(define (prod-tag grammar prod-name) (list 'bnf-prod (list grammar prod-name)))
(define (prod-ref name) (string-appen... | null | https://raw.githubusercontent.com/brownplt/pyret-docs/a7aad4c6432e6863b3a3a7a6adb4aedfc6c7ca0d/ebnf.rkt | racket | #lang at-exp racket/base
(require scribble/base scribble/core scribble/decode scribble/basic scribble/html-properties
racket/list "ragged.rkt" racket/string)
(provide bnf prod-link prod-ref)
(define (prod-tag grammar prod-name) (list 'bnf-prod (list grammar prod-name)))
(define (prod-ref name) (string-appen... | |
a457e4622e6f144a3c6080325a50195e00d4f0a94a8aa4e70d89b4560c9c9b51 | camlp5/camlp5 | q_ast_base.ml | (* camlp5r *)
q_ast_base.ml , v
Copyright ( c ) INRIA 2007 - 2017
(* #load "pa_macro.cmo" *)
(* #load "pa_extend.cmo" *)
(* #load "q_MLast.cmo" *)
AST quotations that works by running the language parser ( and its possible
extensions ) and meta - ifying the nodes . Works completely only in " strict "
... | null | https://raw.githubusercontent.com/camlp5/camlp5/467c1f97c5fa8aba343a4a15ffa24ad3cd55e4aa/ocaml_src/meta/q_ast_base.ml | ocaml | camlp5r
#load "pa_macro.cmo"
#load "pa_extend.cmo"
#load "q_MLast.cmo" | q_ast_base.ml , v
Copyright ( c ) INRIA 2007 - 2017
AST quotations that works by running the language parser ( and its possible
extensions ) and meta - ifying the nodes . Works completely only in " strict "
mode . In " transitional " mode , not all antiquotations are available .
extensions) and met... |
8998f9d973da6a538946525ea64aa1f5c47bd77f1af0d07671f6da4fdf5927cf | 0xYUANTI/stdlib2 | s2_time.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@doc Time .
%%% @end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%_* Module declaration ===============================================
-module(s2_time).
%%%_* Exports ==============================... | null | https://raw.githubusercontent.com/0xYUANTI/stdlib2/0c334200fd9c7ddd79f6dcc3a63c0aa5de5d3a33/src/s2_time.erl | erlang |
@end
_* Module declaration ===============================================
_* Exports ==========================================================
_* Includes =========================================================
_* Code =============================================================
@doc datetime() is the current ... | @doc Time .
-module(s2_time).
-export([ datetime/0
, stamp/0
, stamp/1
]).
-include_lib("eunit/include/eunit.hrl").
-include_lib("stdlib2/include/prelude.hrl").
-spec datetime() -> tuple().
datetime() -> calendar:now_to_datetime(os:timestamp()).
datetime_test() -> {{_Ye, _Mo, _Da},... |
e760db8fbfc3091ac41af657d14dbe1abaa936daf16251b9c4c8d274e0300854 | gusenov/stepik-functional-programming-hs | Demo.hs | module Demo where
doItYourself = f . g . h
f = logBase 2
g = (^3)
h = max 42 | null | https://raw.githubusercontent.com/gusenov/stepik-functional-programming-hs/904164012b9b842a15d5ba3af05cfe589295fa5c/Compose/Demo.hs | haskell | module Demo where
doItYourself = f . g . h
f = logBase 2
g = (^3)
h = max 42 | |
31b1baed63dba1bd4298e01e6d010929374b3267c6624437d2ab2c2c8a41ed51 | iokasimov/pandora | Zero.hs | # LANGUAGE EmptyCase #
module Pandora.Pattern.Operation.Zero where
data Zero
absurd :: Zero -> a
absurd x = case x of {}
| null | https://raw.githubusercontent.com/iokasimov/pandora/68662a508749f1cf02d0178679435a24f07dcaf2/Pandora/Pattern/Operation/Zero.hs | haskell | # LANGUAGE EmptyCase #
module Pandora.Pattern.Operation.Zero where
data Zero
absurd :: Zero -> a
absurd x = case x of {}
| |
686f873d7c28485738c59dba937594837aaaf1f85fde954cf2b8aef12d84c856 | ocaml-sf/learn-ocaml-corpus | peek_consumes.ml | (* The data values carried by the leaves of a tree. *)
let rec elements t xs =
match t with
| Leaf x ->
x :: xs
| Fork (t, u) ->
elements t (elements u xs)
let elements (t : 'a tree) : 'a list =
elements t []
(* The depths of the leaves of a tree. *)
let rec depths d t ds =
match t with
| Le... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/spectre/wrong/peek_consumes.ml | ocaml | The data values carried by the leaves of a tree.
The depths of the leaves of a tree.
The elements and depths, combined.
A direct definition can also be given.
A facility for reading and consuming the elements of a list.
wrong |
let rec elements t xs =
match t with
| Leaf x ->
x :: xs
| Fork (t, u) ->
elements t (elements u xs)
let elements (t : 'a tree) : 'a list =
elements t []
let rec depths d t ds =
match t with
| Leaf _ ->
d :: ds
| Fork (t, u) ->
depths (d + 1) t (depths (d + 1) u ds)
let depths... |
2579d92e07ab228c9776a523705abb4d89846a4337d94b1b5c1eac2dfcaaa291 | kudu-dynamics/blaze | Function.hs | module Blaze.Pil.Function where
import Blaze.Prelude
import Blaze.Types.Pil (
CallOp,
CallTarget (CallTarget, dest, numArgs),
FuncRef (FuncRef, name, hasResult, params, start, varparam),
FunctionInfo,
)
funcRefFromFunc :: FunctionInfo -> FuncRef
funcRefFromFunc func =
FuncRef
{ name = func ^. #name
... | null | https://raw.githubusercontent.com/kudu-dynamics/blaze/a385bb3b37a0a0e061217ebdd70dd0eecbb20332/src/Blaze/Pil/Function.hs | haskell | module Blaze.Pil.Function where
import Blaze.Prelude
import Blaze.Types.Pil (
CallOp,
CallTarget (CallTarget, dest, numArgs),
FuncRef (FuncRef, name, hasResult, params, start, varparam),
FunctionInfo,
)
funcRefFromFunc :: FunctionInfo -> FuncRef
funcRefFromFunc func =
FuncRef
{ name = func ^. #name
... | |
96b9a4dd87a9b79b19c3f370af4c9481207399e6b72fd6220670a6f520b42ad2 | agda/agda | Helpers.hs | {-# LANGUAGE CPP #-}
-- | Some functions, generators and instances suitable for writing
-- QuickCheck properties.
module Internal.Helpers
( module Internal.Helpers
, module Test.QuickCheck
-- * Tasty framework functions
, testGroup
, testProperties
, testProperty
, TestTree
) where
impo... | null | https://raw.githubusercontent.com/agda/agda/48fcdd5c5fbbc4c25ff9d066445fcb9c419c51e6/test/Internal/Helpers.hs | haskell | # LANGUAGE CPP #
| Some functions, generators and instances suitable for writing
QuickCheck properties.
* Tasty framework functions
----------------------------------------------------------------------
----------------------------------------------------------------------
Helpers for type signatures of... |
module Internal.Helpers
( module Internal.Helpers
, module Test.QuickCheck
, testGroup
, testProperties
, testProperty
, TestTree
) where
import Control.Monad
import qualified Control.Monad.Fail as Fail
import Data.Functor
import Data.Semigroup ( (<>), Semigroup )
import Test.QuickCheck
import... |
b666360831750e78eb98c83625f5d3a791277eace2e2419b47930d48478f21fa | agentm/project-m36 | Sorting.hs | module ProjectM36.DataTypes.Sorting where
import ProjectM36.Base
compareAtoms :: Atom -> Atom -> Ordering
compareAtoms (IntegerAtom i1) (IntegerAtom i2) = compare i1 i2
compareAtoms (IntAtom i1) (IntAtom i2) = compare i1 i2
compareAtoms (DoubleAtom d1) (DoubleAtom d2) = compare d1 d2
compareAtoms (ScientificAtom s1) (... | null | https://raw.githubusercontent.com/agentm/project-m36/6b4adc2b227fab2ea3b62e75da824b7f5becccc3/src/lib/ProjectM36/DataTypes/Sorting.hs | haskell | module ProjectM36.DataTypes.Sorting where
import ProjectM36.Base
compareAtoms :: Atom -> Atom -> Ordering
compareAtoms (IntegerAtom i1) (IntegerAtom i2) = compare i1 i2
compareAtoms (IntAtom i1) (IntAtom i2) = compare i1 i2
compareAtoms (DoubleAtom d1) (DoubleAtom d2) = compare d1 d2
compareAtoms (ScientificAtom s1) (... | |
a53b68ab8cb69ee39196df1c276fdf5972e4d8750498cf4b03c12a00a4ecfce7 | tfausak/exercism-solutions | Roman.hs | module Roman
( numerals
) where
import Data.Map (fromList, lookupLE)
import Data.Maybe (maybe)
numerals :: Int -> String
numerals n = maybe "" numerals' pair where
numerals' (value, symbol) = symbol ++ numerals (n - value)
pair = lookupLE n values
values = fromList
[ (1000, "M")
, ( 900, ... | null | https://raw.githubusercontent.com/tfausak/exercism-solutions/5e6f93979cc61ef5e3b48a09ca316dfd7fcd319c/haskell/roman-numerals/Roman.hs | haskell | module Roman
( numerals
) where
import Data.Map (fromList, lookupLE)
import Data.Maybe (maybe)
numerals :: Int -> String
numerals n = maybe "" numerals' pair where
numerals' (value, symbol) = symbol ++ numerals (n - value)
pair = lookupLE n values
values = fromList
[ (1000, "M")
, ( 900, ... | |
132049daa507bdc0101330c883ac59c720f29d92ef34f6ed8cbfdc00f98724f9 | tonyrog/chine | chine.erl | @author < >
( C ) 2016 ,
%%% @doc
Compile & Assemble chine code
%%% @end
Created : 25 Dec 2016 by < >
-module(chine).
-export([start/0, start/1]).
-export([effect/1, minmax_depth/1]).
-export([print_stack_effect/2]).
-export([opcodes/0, syscalls/0]).
-include("../include/chine.hrl").
this imp... | null | https://raw.githubusercontent.com/tonyrog/chine/9ac2a1ec4dba9b215cb7e5335a10135d940fa9e9/src/chine.erl | erlang | @doc
@end
binary or c
io:format("SymTab = ~p\n", [SymTab]),
io:format("Symbols = ~p, labels = ~p\n",[Symbols, Labels]),
where K=0,1,2,4
opcode1
op6
not real opcodes, they are expanded like macros
some may be expanded like calls instead?!
utils
TIMERS
CAN
FILE
just a comment ignore it
Replace branch lab... | @author < >
( C ) 2016 ,
Compile & Assemble chine code
Created : 25 Dec 2016 by < >
-module(chine).
-export([start/0, start/1]).
-export([effect/1, minmax_depth/1]).
-export([print_stack_effect/2]).
-export([opcodes/0, syscalls/0]).
-include("../include/chine.hrl").
this implies 21 or higher
... |
4bd1de106b86ae9d7b628fe153a0e63ce2b0202dd7699bc223108952649a6974 | zlatozar/study-paip | buggy-example.lisp |
(defun make-position (line column)
(list line colunm)) ; <-- typo
(defun position-line (position)
(caar position)) ; <-- should use 'car'
(defun position-column (position)
< -- should use ' cadr '
(defun make-positions ()
(list)) ; <-- should be (list 'end)
(defun join-position (position positions)
(... | null | https://raw.githubusercontent.com/zlatozar/study-paip/dfa1ca6118f718f5d47d8c63cbb7b4cad23671e1/debug/buggy-example.lisp | lisp | <-- typo
<-- should use 'car'
<-- should be (list 'end)
<-- should use 'attacked-queen-p' |
(defun make-position (line column)
(defun position-line (position)
(defun position-column (position)
< -- should use ' cadr '
(defun make-positions ()
(defun join-position (position positions)
(cons position positions))
(defun make-board ()
(list (list) (list) (list)))
(defun join-queen (position board)
... |
9bbeb0caa04b0a5dcd23a0d157af6e4a7633cd131847f33a3688d43814dabe02 | AshleyYakeley/Truth | Dynamic.hs | module Changes.Core.UI.Dynamic
( replaceDynamicView
, viewDynamic
, viewInnerWholeView
) where
import Changes.Core.Edit
import Changes.Core.Import
import Changes.Core.Model
import Changes.Core.Types
import Changes.Core.UI.Selection
import Changes.Core.UI.View.View
replaceDynamicView :: MonadIO m => m ... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/7b22fdc3e003241fd246c6989ee2aa162060466e/Changes/changes-core/lib/Changes/Core/UI/Dynamic.hs | haskell | module Changes.Core.UI.Dynamic
( replaceDynamicView
, viewDynamic
, viewInnerWholeView
) where
import Changes.Core.Edit
import Changes.Core.Import
import Changes.Core.Model
import Changes.Core.Types
import Changes.Core.UI.Selection
import Changes.Core.UI.View.View
replaceDynamicView :: MonadIO m => m ... | |
e3dcc475127d3e004947e2ec2d881841fcedf895c5a5803f27ae8531d77c98f2 | acieroid/scala-am | example.scm | (define (map f lst)
(if (null? lst)
'()
(cons (f (car lst)) (map f (cdr lst)))))
(define (inc n) (+ n 1))
(map inc '(1 2 3)) | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/example.scm | scheme | (define (map f lst)
(if (null? lst)
'()
(cons (f (car lst)) (map f (cdr lst)))))
(define (inc n) (+ n 1))
(map inc '(1 2 3)) | |
414c99fe4d245888b30803edf84a393fd0ad780c65af739bdec4723867e259f0 | davelambert/porky | index-and-match.lisp | -*- package : ; Syntax : Common - lisp ; Base : 10 -*-
;;;
;;;; index-and-match.lisp
;;;
;;;
;;; --------------------------------------------------------------------------------------
;;;
;;; The contents of this file are subject to the NOKOS License Version 1.0a (the
;;; "License"); you may not use this file ... | null | https://raw.githubusercontent.com/davelambert/porky/44a4ff0e791de23f723bfd93072fcef5f8523c8a/src/goodies/index-and-match.lisp | lisp | Syntax : Common - lisp ; Base : 10 -*-
index-and-match.lisp
--------------------------------------------------------------------------------------
The contents of this file are subject to the NOKOS License Version 1.0a (the
"License"); you may not use this file except in compliance with the License.
... |
Software distributed under the License is distributed on an " AS IS " basis , WITHOUT
The Original Software is
WILBUR2 : Nokia Semantic Web Toolkit for CLOS
Copyright ( c ) 2001 - 2005 Nokia and others . All Rights Reserved .
Portions Copyright ( c ) 1989 - 1992 . All Rights Reserved .
Cont... |
4263d0ebd2b48324a654e7a5623b82166f08c1a7d836300c79c1e707d9a89fbd | clj-commons/claypoole | project.clj | The Climate Corporation licenses this file to you under 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
;;
;; See the NOTICE file distributed with this work for additional information
;... | null | https://raw.githubusercontent.com/clj-commons/claypoole/d5cabec92393a6aa49779e6dea5d9325bc325f81/project.clj | clojure | License, Version 2.0 (the "License"); you may not use this file except in
-2.0
See the NOTICE file distributed with this work for additional information
regarding copyright ownership. Unless required by applicable law or agreed
or implied. See the License for the specific language governing permissions
and ... | The Climate Corporation licenses this file to you under under the Apache
compliance with the License . You may obtain a copy of the License at
to in writing , software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express
(defprojec... |
ec48108b7298fd802fba3e86681b4954f3e8ca9437b4ce9a4a96e3931cbd2fd4 | DavidAlphaFox/RabbitMQ | cowboy_tcp_transport.erl | Copyright ( c ) 2011 , < >
%%
%% Permission to use, copy, modify, and/or 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 " AND THE AUTHOR DISCLAIMS A... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/cowboy-wrapper/cowboy-git/src/cowboy_tcp_transport.erl | erlang |
Permission to use, copy, modify, and/or 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.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2011 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
Wrapper around < em > gen_tcp</em > implementing the Cowbo... |
57c85fe156b95a1dde654e79784b3a9ff1fc58df5982642356eb46efb5548f3c | xapi-project/xen-api-libs | rpc.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-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/rpc-light/rpc.ml | ocaml |
* 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... | |
9324a437d86089ee7009b4728779b92764ba6431c85d52207cb042a29acd1321 | coccinelle/coccinelle | set.mli | module type OrderedType = sig type t val compare : t -> t -> int end
module type S =
sig
type elt
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val i... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.11/set.mli | ocaml | module type OrderedType = sig type t val compare : t -> t -> int end
module type S =
sig
type elt
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val i... | |
8ba1ea0afd8e9734f8a032d549517d80602a6d6da7481977094299f2f72307a4 | jimrthy/frereth | client.cljs | (ns tracker.client
(:require
[tracker.application :refer [SPA]]
[com.fulcrologic.fulcro.application :as app]
[tracker.ui.root :as root]
[com.fulcrologic.fulcro.networking.http-remote :as net]
[com.fulcrologic.fulcro.data-fetch :as df]
[com.fulcrologic.fulcro.ui-state-machines :as uism]
[co... | null | https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/racing/sonic-forces/tracker/src/main/tracker/client.cljs | clojure | TODO: What does this do? | (ns tracker.client
(:require
[tracker.application :refer [SPA]]
[com.fulcrologic.fulcro.application :as app]
[tracker.ui.root :as root]
[com.fulcrologic.fulcro.networking.http-remote :as net]
[com.fulcrologic.fulcro.data-fetch :as df]
[com.fulcrologic.fulcro.ui-state-machines :as uism]
[co... |
0d7031b5622fa30e4be3772c90649b8008a4a91ddb727a774cfd975d6d5ba079 | ocaml-multicore/tezos | script_string_repr.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_protocol/script_string_repr.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
58338c9b700c27f7645ada5afc7cc2f113a853c20fb4e2b590fb2beced8dca57 | status-im/clj-rn | main.clj | (ns clj-rn.main
(:require [clj-rn.core :as core]
[clj-rn.shell :as shell]
[clj-rn.utils :as utils]
[clojure.string :as str]
[clojure.tools.cli :as cli]))
;;; Helper functions.
(def cli-tasks-info
{:enable-source-maps {:desc "Patches RN packager to server *.map files... | null | https://raw.githubusercontent.com/status-im/clj-rn/db8b76c02af8fbec70a22130cc8c47c120858dd1/src/clj_rn/main.clj | clojure | Helper functions.
:enable-source-maps task
:rebuild-index task
:watch task
:help task | (ns clj-rn.main
(:require [clj-rn.core :as core]
[clj-rn.shell :as shell]
[clj-rn.utils :as utils]
[clojure.string :as str]
[clojure.tools.cli :as cli]))
(def cli-tasks-info
{:enable-source-maps {:desc "Patches RN packager to server *.map files from filesystem, so t... |
ab3a2c1f8683ceb8a09e695d2f62af4cefe1bc92193b0ef4569b30ee0ddb1b41 | blindglobe/lisp-matrix | unittests-matrix.lisp | ;;; -*- mode: lisp -*-
;;;
Copyright ( c ) 2007 - -2008 , by < >
;;; See COPYRIGHT file for any additional restrictions (BSD license).
Since 1991 , ANSI was finally finished . Edited for ANSI Common Lisp .
;;; This is part of the unittests package. See unittests.lisp for
;;; general philosophy.
(in-packag... | null | https://raw.githubusercontent.com/blindglobe/lisp-matrix/f9c88dae132baf52884dd54612581d1331b82b40/src/unittests/unittests-matrix.lisp | lisp | -*- mode: lisp -*-
See COPYRIGHT file for any additional restrictions (BSD license).
This is part of the unittests package. See unittests.lisp for
general philosophy.
TEST SUITES
SUPPORT FUNCTIONS
TESTS: MATRICES toplevel/general
because data is integer, not double-float!
combinations...
because data is i... | Copyright ( c ) 2007 - -2008 , by < >
Since 1991 , ANSI was finally finished . Edited for ANSI Common Lisp .
(in-package :lisp-matrix-unittests)
See file : test.lisp in this directory for debugging with LIFT .
(deftestsuite lisp-matrix-ut-matrix (lisp-matrix-ut) ())
FIXME
(addtest (lisp-matrix-ut... |
d69d333fc5b508f2a4cda3f67435115957261abd5e7adf8acd980d9ae802c0ba | mauricioszabo/duck-repled | tests.cljs | (ns duck-repled.tests
(:require [duck-repled.editor-test]
[duck-repled.repl-test]
[duck-repled.definition-test]
[duck-repled.core-test]
[clojure.test :as test]
[promesa.core :as p]
[duck-repled.repl-helpers :as helpers]))
(defn- connect-socket! ... | null | https://raw.githubusercontent.com/mauricioszabo/duck-repled/1bc24511ba5abf42e4303f647eb91c8873449bd3/test/duck_repled/tests.cljs | clojure | (def repl repl))) | (ns duck-repled.tests
(:require [duck-repled.editor-test]
[duck-repled.repl-test]
[duck-repled.definition-test]
[duck-repled.core-test]
[clojure.test :as test]
[promesa.core :as p]
[duck-repled.repl-helpers :as helpers]))
(defn- connect-socket! ... |
d41a02f400ed0de097f91d8074b30763feae7eee1316ad449a5a9bc2dfdc1564 | bsaleil/lc | perm9.scm.scm | ;;------------------------------------------------------------------------------
Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->vector lst))
(def-macro (FLOATvector? x) `(vector? ,x))
(def-macro (FLOATvector . lst... | null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultbak/m5eponly/perm9.scm.scm | scheme | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Gabriel benchmarks
C benchmarks
Other benchmarks
File: perm9.sch
Crea... | Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->vector lst))
(def-macro (FLOATvector? x) `(vector? ,x))
(def-macro (FLOATvector . lst) `(vector ,@lst))
(def-macro (FLOATmake-vector n . init) `(make-vector ,... |
f100ab4a268e73c8a8bd6056d4cf6b49aa4a6f9a9ccd0b801ea11004ca52d86f | pink-gorilla/goldly | system_list.cljs | (ns goldly-server.pages.system-list
(:require
[reagent.core :as r]
[re-frame.core :as rf]
[bidi.bidi :as bidi]
[frontend.page :refer [reagent-page]]
[goldly.system.ws :refer [request-systems]]
[goldly-server.helper.site :refer [header]]))
(defn visible? [system]
(not (:hidden system)))
(defn hre... | null | https://raw.githubusercontent.com/pink-gorilla/goldly/c65f789671cedfc5f115191a2a4b51d787492ae5/src-unused/system/goldly/pages/system_list.cljs | clojure | [:div.bg-blue-200.h-screen.w-screen
(request-systems)
tailwind containers are not centered by default; mx-auto does this | (ns goldly-server.pages.system-list
(:require
[reagent.core :as r]
[re-frame.core :as rf]
[bidi.bidi :as bidi]
[frontend.page :refer [reagent-page]]
[goldly.system.ws :refer [request-systems]]
[goldly-server.helper.site :refer [header]]))
(defn visible? [system]
(not (:hidden system)))
(defn hre... |
303d225b6f654dd2f6ee1e92eb8e46d3da22990a8d04e539c2d15f112f8a9134 | bobbae/gosling-emacs | mark-ring.ml | (declare-global mark-number top-mark mark-ring-size
Mark-0 Mark-1 Mark-2 Mark-3 Mark-4 Mark-5 Mark-6 Mark-7 Mark-8 Mark-9)
(setq mark-number 0)
(setq top-mark "Mark-0")
(setq mark-ring-size 10)
(defun
(mark-cycle-ring
(setq top-mark
(concat "Mark-"
(setq mark-number
(% (+ mark-number (arg 1)) mar... | null | https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/lib/maclib/utah/std/mark-ring.ml | ocaml | (declare-global mark-number top-mark mark-ring-size
Mark-0 Mark-1 Mark-2 Mark-3 Mark-4 Mark-5 Mark-6 Mark-7 Mark-8 Mark-9)
(setq mark-number 0)
(setq top-mark "Mark-0")
(setq mark-ring-size 10)
(defun
(mark-cycle-ring
(setq top-mark
(concat "Mark-"
(setq mark-number
(% (+ mark-number (arg 1)) mar... | |
30ca144c75d7a79f51b657244e7639e25abb1e8f1fc57eded6172b96ee076068 | elastic/eui-cljs | eui_image_button_icon_styles.cljs | (ns eui.eui-image-button-icon-styles
(:require ["@elastic/eui/lib/components/image/image_button.styles.js" :as eui]))
(def euiImageButtonIconStyles eui/euiImageButtonIconStyles)
(def euiImageButtonStyles eui/euiImageButtonStyles)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/eui_image_button_icon_styles.cljs | clojure | (ns eui.eui-image-button-icon-styles
(:require ["@elastic/eui/lib/components/image/image_button.styles.js" :as eui]))
(def euiImageButtonIconStyles eui/euiImageButtonIconStyles)
(def euiImageButtonStyles eui/euiImageButtonStyles)
| |
c7947ef5534e39629778e24764896e8d7cc2de634cd2d493e5a2c15847eb4cce | igorhvr/bedlam | peanosfc.scm | " peanosfc.scm " : space filling mapping
Copyright ( C ) 2005 , 2006
;
;Permission to copy this software, to modify it, to redistribute it,
;to distribute modified versions, and to use it for any purpose is
;granted, subject to the following restrictions and understandings.
;
1 . Any copy made of this software... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/peanosfc.scm | scheme |
Permission to copy this software, to modify it, to redistribute it,
to distribute modified versions, and to use it for any purpose is
granted, subject to the following restrictions and understandings.
in full.
this software will be error-free, and I am under no obligation to
provide any services, by way of maintenan... | " peanosfc.scm " : space filling mapping
Copyright ( C ) 2005 , 2006
1 . Any copy made of this software must include this copyright notice
2 . I have made no warranty or representation that the operation of
3 . In conjunction with products arising from the use of this
(require 'array)
A. R. Butz .
I... |
6bf64b99ed6ca7794e0ec67134ac3da7c37cc51d27d2c1c2b73926d8f4c06021 | fyquah/hardcaml_zprize | for_vitis.mli | * Top - level wrapper with port naming to suit the Vivido Vitis infrastructure .
Directly used as a Vitis RTL kernel .
Instantiates the top level NTT design , plus the transposer unit used in the 2nd pass .
Directly used as a Vitis RTL kernel.
Instantiates the top level NTT design, plus the tr... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/zprize/ntt/hardcaml/src/for_vitis.mli | ocaml | * Active low reset
* Data streamed out. | * Top - level wrapper with port naming to suit the Vivido Vitis infrastructure .
Directly used as a Vitis RTL kernel .
Instantiates the top level NTT design , plus the transposer unit used in the 2nd pass .
Directly used as a Vitis RTL kernel.
Instantiates the top level NTT design, plus the tr... |
87909c8279a66d4c72e0605989d3672da8f981caf5db43eb53126782f0becb89 | DSiSc/why3 | pqueue.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/util/pqueue.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
* This is a contribution by .
module Make(X: sig type t
val dummy : t
val compare : t -> t -> int ... |
3ee342ab7a4277472f6f2b0801cbc06d5d0cf062309f47d28a644af594397dae | hkuplg/fcore | ModuleSpec.hs | module ModuleSpec where
import BackEnd
import JavaUtils (getClassPath)
import SpecHelper
import StringPrefixes (namespace)
import TransCFSpec
import Control.Monad (forM_)
import System.Directory
import System.FilePath
import System.IO
import System.Process
import Test.Tasty.Hspec
testCasesPath = "testsuite/tests/sh... | null | https://raw.githubusercontent.com/hkuplg/fcore/e27b6dec5bfd319edb8c3e90d94a993bcc7b4c95/testsuite/ModuleSpec.hs | haskell | module ModuleSpec where
import BackEnd
import JavaUtils (getClassPath)
import SpecHelper
import StringPrefixes (namespace)
import TransCFSpec
import Control.Monad (forM_)
import System.Directory
import System.FilePath
import System.IO
import System.Process
import Test.Tasty.Hspec
testCasesPath = "testsuite/tests/sh... | |
3358229299067c362f4749a0ac8fe960edc64178bbb12fe5c82aff905c282bf5 | elastic/apm-agent-ocaml | error.mli | type t [@@deriving yojson_of]
val make :
?random_state:Random.State.t ->
?trace_id:Id.Trace_id.t ->
?transaction_id:Id.Span_id.t ->
?parent_id:Id.Span_id.t ->
exn:exn ->
backtrace:Printexc.raw_backtrace ->
timestamp:Timestamp.t ->
unit ->
t
| null | https://raw.githubusercontent.com/elastic/apm-agent-ocaml/6eb74081abedc949cfe0fa548ca4396e76540f63/core/error.mli | ocaml | type t [@@deriving yojson_of]
val make :
?random_state:Random.State.t ->
?trace_id:Id.Trace_id.t ->
?transaction_id:Id.Span_id.t ->
?parent_id:Id.Span_id.t ->
exn:exn ->
backtrace:Printexc.raw_backtrace ->
timestamp:Timestamp.t ->
unit ->
t
| |
fb608e9137fb5dc62adc41b8ba7c11df56622e034b816ccc287144583aef9d07 | emil0r/reverie | i18n.clj | (ns reverie.test.i18n
(:require [com.stuartsierra.component :as component]
[reverie.i18n :as i18n]
[midje.sweet :refer :all]))
(fact
"start component"
(let [i18n-component (->> {:dictionary {:en {:foo "bar"
:bar "baz is %d"}}}
... | null | https://raw.githubusercontent.com/emil0r/reverie/a29c223b7326e6d5a5e0874d33c37ff2fa0dfd4d/reverie-test/test/reverie/test/i18n.clj | clojure | (ns reverie.test.i18n
(:require [com.stuartsierra.component :as component]
[reverie.i18n :as i18n]
[midje.sweet :refer :all]))
(fact
"start component"
(let [i18n-component (->> {:dictionary {:en {:foo "bar"
:bar "baz is %d"}}}
... | |
99b35f186e8dfc6cd572d623824368c828d631755d43e0f78d3c91c06c1cf780 | dylex/haskell-nfs | Client.hs | module Network.NFS.V4.Client
( Client(..)
, openClientServer
, openClient
, closeClient
, setClientAuth
, nfsNullCall
, nfsCall
) where
import Control.Exception (throwIO)
import Control.Monad (unless)
import qualified Data.Vector as V
import qualified Network.ONCRPC as RPC
import ... | null | https://raw.githubusercontent.com/dylex/haskell-nfs/07d213e09f7bf9e6fe3200aca3de494c3dcd54f7/nfs/Network/NFS/V4/Client.hs | haskell | |See 'RPC.openClient'.
In addition, this negotiates a minor version and other client information with the server.
|Call 'openClientServer' with the default nfs port.
|See 'RPC.closeClient'.
|Generalize the various @res'status@ methods to 'NFS.Nfs_resop4'.
This perhaps should be somewhere else more general. | module Network.NFS.V4.Client
( Client(..)
, openClientServer
, openClient
, closeClient
, setClientAuth
, nfsNullCall
, nfsCall
) where
import Control.Exception (throwIO)
import Control.Monad (unless)
import qualified Data.Vector as V
import qualified Network.ONCRPC as RPC
import ... |
f2a879427fe62c5bfcc6e0c72a3b0d48e9f3fd2ad6eebd65ac27926449f3533c | mcorbin/tour-of-clojure | filter.clj | ;; keep only even numbers
(println (filter even? [1 2 3]) "\n")
;; keep only maps with a :b key
(println (filter :b [{:a 1} {:b 2} {:b 1}]) "\n")
keep all numbers > 10
(println (filter (fn [elem] (> elem 10)) [2 5 11 9 81]) "\n")
| null | https://raw.githubusercontent.com/mcorbin/tour-of-clojure/57f97b68ca1a8c96904bfb960f515217eeda24a6/resources/public/pages/code/filter.clj | clojure | keep only even numbers
keep only maps with a :b key | (println (filter even? [1 2 3]) "\n")
(println (filter :b [{:a 1} {:b 2} {:b 1}]) "\n")
keep all numbers > 10
(println (filter (fn [elem] (> elem 10)) [2 5 11 9 81]) "\n")
|
49a8a7ff716a2deec097e6a53c9dffad6a148a484f6d5462b94382ad0701123c | inhabitedtype/ocaml-aws | deregisterTargetFromMaintenanceWindow.ml | open Types
open Aws
type input = DeregisterTargetFromMaintenanceWindowRequest.t
type output = DeregisterTargetFromMaintenanceWindowResult.t
type error = Errors_internal.t
let service = "ssm"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_stri... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/deregisterTargetFromMaintenanceWindow.ml | ocaml | open Types
open Aws
type input = DeregisterTargetFromMaintenanceWindowRequest.t
type output = DeregisterTargetFromMaintenanceWindowResult.t
type error = Errors_internal.t
let service = "ssm"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_stri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.