_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 |
|---|---|---|---|---|---|---|---|---|
74dd05ef3c647d2f0590bbeacf9733aaed9973a8793da0ef3a2866cc3b57db64 | seckcoder/course-compiler | r4_12.rkt | (define (triple [x : Integer]) : (Vector Integer Integer Integer)
(vector x x x))
(let ([tr (triple 13)])
(+ (vector-ref tr 0)
(+ (vector-ref tr 1)
(+ (vector-ref tr 2) 3))))
| null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/student-tests/r4_12.rkt | racket | (define (triple [x : Integer]) : (Vector Integer Integer Integer)
(vector x x x))
(let ([tr (triple 13)])
(+ (vector-ref tr 0)
(+ (vector-ref tr 1)
(+ (vector-ref tr 2) 3))))
| |
222af8d548b899e3f5d47db9d1b5feb4ea4341198e311d1e34cb11af43f8269b | rleonid/oml | softmax_numerical_gradient.ml |
open Lacaml.D
open Util
let check_derivative_numerically ~newmethod x y =
let k = Array.fold_left max 1 y in
let gre = Softmax_regression.general_eval_and_grad ~newmethod ~lambda:0.0 k x y in
let n = Mat.dim2 x in
let s = n * k in
(fun ?(d=epsilon_float) () ->
let w = Vec.random s in
let g = Vec.mak... | null | https://raw.githubusercontent.com/rleonid/oml/a857d67708827ed00df3f175a942044601ca50cf/scripts/softmax_numerical_gradient.ml | ocaml | insert the desired derivative into g |
open Lacaml.D
open Util
let check_derivative_numerically ~newmethod x y =
let k = Array.fold_left max 1 y in
let gre = Softmax_regression.general_eval_and_grad ~newmethod ~lambda:0.0 k x y in
let n = Mat.dim2 x in
let s = n * k in
(fun ?(d=epsilon_float) () ->
let w = Vec.random s in
let g = Vec.mak... |
78f521d59f6f6d03be7629fd35897c08610c5d71d0dbaf9af7dd391d4ead3446 | skolemlabs/ppx_expjs | const.ml | let my_str : string = "my_str" [@@expjs]
let two_plus_two : int = 4 [@@expjs]
let none_four : int option = None [@@expjs]
let some_four : int option = Some 4 [@@expjs]
(** Disable the unused variable warning *)
let _dont_export : int = 1 [@@expjs { export = false; name = "dont_export" }]
module Caml_module = struct
... | null | https://raw.githubusercontent.com/skolemlabs/ppx_expjs/ff99d01fa8fb418645eb01db7b32415f54b01a2b/js_test/const.ml | ocaml | * Disable the unused variable warning
* This name is used to make sure the other my_str isn't shadowed | let my_str : string = "my_str" [@@expjs]
let two_plus_two : int = 4 [@@expjs]
let none_four : int option = None [@@expjs]
let some_four : int option = Some 4 [@@expjs]
let _dont_export : int = 1 [@@expjs { export = false; name = "dont_export" }]
module Caml_module = struct
let my_str : string = "Caml_module.my_str"... |
69239a2aee0d8a5bd651e214d6a78a5a2b4f04108762056ae4477f7dcaef7fe5 | pveber/bistro | macs2.mli | open Bistro
open Formats
val pileup :
?extsize:int ->
?both_direction:bool ->
bam file -> Ucsc_gb.bedGraph file
type gsize = [`hs | `mm | `ce | `dm | `gsize of int]
type keep_dup = [ `all | `auto | `int of int ]
type _ format
val sam : sam format
val bam : bam format
val bampe : bam format
val callpeak :
?... | null | https://raw.githubusercontent.com/pveber/bistro/da0ebc969c8c5ca091905366875cbf8366622280/lib/bio/macs2.mli | ocaml | open Bistro
open Formats
val pileup :
?extsize:int ->
?both_direction:bool ->
bam file -> Ucsc_gb.bedGraph file
type gsize = [`hs | `mm | `ce | `dm | `gsize of int]
type keep_dup = [ `all | `auto | `int of int ]
type _ format
val sam : sam format
val bam : bam format
val bampe : bam format
val callpeak :
?... | |
27a7d3c7b87a241fbefce41433d85569bfd963a62e0a1480cb77403313793d54 | huangjs/cl | load-sym-lisp-files.lisp | ;; Load all Lisp files within WITH-COMPILATION-UNIT macro.
This quiets the undefined function warnings from SBCL
;; which are otherwise very voluminous (and this construct
is accepted by other CL implementations ) .
#+gcl (defmacro with-compilation-unit (a &rest b) `(progn ,@b))
(with-compilation-unit nil
($loa... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/sym/load-sym-lisp-files.lisp | lisp | Load all Lisp files within WITH-COMPILATION-UNIT macro.
which are otherwise very voluminous (and this construct | This quiets the undefined function warnings from SBCL
is accepted by other CL implementations ) .
#+gcl (defmacro with-compilation-unit (a &rest b) `(progn ,@b))
(with-compilation-unit nil
($load "macros")
($load "util")
($load "lecteur")
($load "ecrivain")
($load "operations")
($operation)
($load "... |
928ca90c4eaac5016f690f69dec681be4fbc01333a6f8013c944cdfe4adf8ee8 | craigl64/clim-ccl | testdcl.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 ; Lowercase : Yes -*-
(in-package #-ansi-90 :user #+ansi-90 :common-lisp-user)
(defsystem testing
(:default-pathname "clim2:;test;")
(:serial
("test-pkg")
("test-driver" (:load-before-compile "test-pkg"))
("test-clim-... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/test/testdcl.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 ; Lowercase : Yes -*- |
(in-package #-ansi-90 :user #+ansi-90 :common-lisp-user)
(defsystem testing
(:default-pathname "clim2:;test;")
(:serial
("test-pkg")
("test-driver" (:load-before-compile "test-pkg"))
("test-clim-tests" (:load-before-compile "test-driver"))
("test-clim" (:load-before-compile "test-driver"))
("te... |
abbe817cbfe4938c42168f4e371e81cee32555d8a7774b4bec098ba23b139f9f | mokus0/gamma | Lanczos.hs | # LANGUAGE ParallelListComp #
-- |Lanczos' approximation to the gamma function, as described at
-- http:\/\/en.wikipedia.org\/wiki\/Lanczos_approximation
( fetched 11 June 2010 ) .
--
Constants to be supplied by user . There is a file \"extras / LanczosConstants.hs\ "
in the source repository that implements a... | null | https://raw.githubusercontent.com/mokus0/gamma/8c9bb99b9af1d2f3026bb7ed3899fdf2ff0113e7/src/Math/Gamma/Lanczos.hs | haskell | |Lanczos' approximation to the gamma function, as described at
http:\/\/en.wikipedia.org\/wiki\/Lanczos_approximation
calculating the coefficients. It is not included in the distribution yet
because it makes use of a linear algebra library I have not yet released
(though I eventually intend to).
to the whole... | # LANGUAGE ParallelListComp #
( fetched 11 June 2010 ) .
Constants to be supplied by user . There is a file \"extras / LanczosConstants.hs\ "
in the source repository that implements a technique by for
module Math.Gamma.Lanczos
( gammaLanczos, lnGammaLanczos
, reflect, reflectC
, reflectLn, reflec... |
534fe0f8847407b56ad0a1cab6d06285a515df56f5033f3eb22eacdbf3a7b3c6 | haskell/vector | takeWhile.hs | import qualified Data.Vector as U
import Data.Bits
main = print . U.sum . U.takeWhile (< (7::Int)). U.enumFromTo 1 $ 10000000
U.replicate 1000000 $ ( 7 : : Int )
-- gets removed entirely!
| null | https://raw.githubusercontent.com/haskell/vector/4c87e88f07aad166c6ae2ccb94fa539fbdd99a91/old-testsuite/microsuite/takeWhile.hs | haskell | gets removed entirely! | import qualified Data.Vector as U
import Data.Bits
main = print . U.sum . U.takeWhile (< (7::Int)). U.enumFromTo 1 $ 10000000
U.replicate 1000000 $ ( 7 : : Int )
|
851d518f0b79d4e47358461e7b29ed9c517fc7afd03c55177451e35fd623f8d0 | oofp/Beseder | STransIxDo.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeApplic... | null | https://raw.githubusercontent.com/oofp/Beseder/a0f5c5e3138938b6fa18811d646535ee6df1a4f4/src/Beseder/Base/Internal/STransIxDo.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE ConstraintKinds #
, return
, (>>)
, (>>=)
, ' ( rs1,ex1 ) ~ Eval ( f1 sp xs )
, ' ( ) ~ Eval ( f2 sp rs1 )
, ' ( rs1,ex1 ... | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE FunctionalDependencies ... |
a6c690f7a0960216d67ffdb591a0280928ecf7842f8b9635ba326f088821b719 | jyh/metaprl | var.ml | doc <:doc<
@module[Var]
The @tt[Var] module provides utilities to
generate new variables that are guaranteed to be distinct
from all other bound variables in a proof goal.
There are three basic functions implemented here.
@begin[verbatim]
val new_var : string -> string list -> string
v... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/support/tactics/var.ml | ocaml |
* Generate a new variable disjoint from the given vars.
* Symbol generation.
* -*-
* Local Variables:
* End:
* -*-
| doc <:doc<
@module[Var]
The @tt[Var] module provides utilities to
generate new variables that are guaranteed to be distinct
from all other bound variables in a proof goal.
There are three basic functions implemented here.
@begin[verbatim]
val new_var : string -> string list -> string
v... |
d8b656c405428927fff1f36120a2d33521ce12020907288286aec7f71c899ece | haskell-game/sdl2 | Lesson20.hs | # LANGUAGE CPP #
# LANGUAGE LambdaCase #
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module Lazyfoo.Lesson20 (main) where
import Prelude hiding (any, mapM_)
import Control.Monad hiding (mapM_)
import Data.Maybe
import Data.Monoid
import Foreign.C.Types
import SDL.Vect
import SDL (($=))
import SDL.Ha... | null | https://raw.githubusercontent.com/haskell-game/sdl2/a2646ede53d98aebf8f7c49b01f99236701b7e44/examples/lazyfoo/Lesson20.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings # | # LANGUAGE CPP #
# LANGUAGE LambdaCase #
module Lazyfoo.Lesson20 (main) where
import Prelude hiding (any, mapM_)
import Control.Monad hiding (mapM_)
import Data.Maybe
import Data.Monoid
import Foreign.C.Types
import SDL.Vect
import SDL (($=))
import SDL.Haptic
import qualified SDL
import qualified Data.Vector as V
im... |
98a58cef600c5198d3adde9a86ba163d4f2b6b95d5452dffc2ddebeda7f2e2a3 | openlilylib/oll-core | properties.scm | (define-module (oll-core internal properties))
(use-modules
(srfi srfi-1)
(lily)
(oll-core internal logging)
(oll-core internal options)
(oll-core internal named-alists)
(oll-core internal os-path)
)
; TODO:
; once named-alists is merged
; don't store propsets in the option tree anymore
; but create a new alis... | null | https://raw.githubusercontent.com/openlilylib/oll-core/73029ae46f1b870f82d1637ef241fb7c3f35ce6b/internal/properties.scm | scheme | TODO:
once named-alists is merged
don't store propsets in the option tree anymore
but create a new alist and access that
locate the property set
locate the actual property list
locate the property entry
merge global and by-propset *lists*
result is always one out of
- an empty list => nothing is filtered out
... | (define-module (oll-core internal properties))
(use-modules
(srfi srfi-1)
(lily)
(oll-core internal logging)
(oll-core internal options)
(oll-core internal named-alists)
(oll-core internal os-path)
)
(define (get-propset-path propset-path)
"Property sets are stored within the global oll-options data structur... |
e9d2ca433f60e803ac49dc459de3f43286db5c3382dcad4d2f1b9fbddbba7f9a | Chase-C/Flocking-Simulation | Log.hs | module Log where
import System.IO.Unsafe (unsafePerformIO)
import System.IO (putStrLn)
slog :: (Show a) => String -> a -> a
slog s var = unsafePerformIO $ do
putStrLn $ s ++ ": " ++ show var
return var
nlog :: String -> a -> a
nlog s var = unsafePerformIO $ do
putStrLn s
return var
... | null | https://raw.githubusercontent.com/Chase-C/Flocking-Simulation/897ee7adbe2cd7ae27faf37d65c41e6c2d189b0c/src/Log.hs | haskell | module Log where
import System.IO.Unsafe (unsafePerformIO)
import System.IO (putStrLn)
slog :: (Show a) => String -> a -> a
slog s var = unsafePerformIO $ do
putStrLn $ s ++ ": " ++ show var
return var
nlog :: String -> a -> a
nlog s var = unsafePerformIO $ do
putStrLn s
return var
... | |
125e245486cf636fc570ef13e8ddf808bfe10a1029692634f78965ef048b5bad | juspay/atlas | CancellationReason.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/app-backend/src/Domain/Types/CancellationReason.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
d39e0d6d8d0d7b3b0928008fffa8fb0404a5ff2800d99a84e342d4153fe94a49 | AllureOfTheStars/Allure | TieKnot.hs | {-# LANGUAGE PackageImports #-}
Copyright ( c ) 2008 - -2011
Copyright ( c ) 2010 - -2021 and others ( see git history )
This file is a part of the computer game Allure of the Stars
and is released under the terms of the GNU Affero General Public License .
-- For license and copyright information, see the f... | null | https://raw.githubusercontent.com/AllureOfTheStars/Allure/06428874efa50e989f92d0e872e089cbf1de53a6/GameDefinition/game-src/TieKnot.hs | haskell | # LANGUAGE PackageImports #
For license and copyright information, see the file LICENSE.
| Here the knot of engine code pieces, frontend and the game-specific
content definitions is tied, resulting in an executable game.
with the game-specific content definitions, and run the game.
call, which in turn calls @exe... | Copyright ( c ) 2008 - -2011
Copyright ( c ) 2010 - -2021 and others ( see git history )
This file is a part of the computer game Allure of the Stars
and is released under the terms of the GNU Affero General Public License .
module TieKnot
( tieKnotForAsync, tieKnot
) where
import Prelude ()
import Ga... |
8bc9e0d1a4a687269f026f4f29766ced831fb58f2f0dbadda08a545624ab16b4 | aloiscochard/codex | Codex2.hs | # LANGUAGE DeriveGeneric #
module Main.Config.Codex2 where
import Data.Yaml
import GHC.Generics
import qualified Codex as New
data Codex = Codex { currentProjectIncluded :: Bool, hackagePath :: FilePath, tagsCmd :: String, tagsFileHeader :: Bool, tagsFileSorted :: Bool }
deriving Generic
instance ToJSON Codex
ins... | null | https://raw.githubusercontent.com/aloiscochard/codex/6edbdc34357d13e52b434c19665725684cdd2dba/codex/Main/Config/Codex2.hs | haskell | # LANGUAGE DeriveGeneric #
module Main.Config.Codex2 where
import Data.Yaml
import GHC.Generics
import qualified Codex as New
data Codex = Codex { currentProjectIncluded :: Bool, hackagePath :: FilePath, tagsCmd :: String, tagsFileHeader :: Bool, tagsFileSorted :: Bool }
deriving Generic
instance ToJSON Codex
ins... | |
f5d5ed1ad933cb262f42e66088e834143b974ee948c17dfff24225bb45d35d5d | haskellfoundation/error-message-index | DodgyExports.hs | module DodgyExports (TypeWithoutVisibleCtrs, TypeWithNoCtrs) where
import HiddenCtrs
data TypeWithNoCtrs
| null | https://raw.githubusercontent.com/haskellfoundation/error-message-index/6b80c2fe6d8d2941190bda587bcea6f775ded0a4/message-index/messages/GHC-75356/example1/after/DodgyExports.hs | haskell | module DodgyExports (TypeWithoutVisibleCtrs, TypeWithNoCtrs) where
import HiddenCtrs
data TypeWithNoCtrs
| |
51c70432b0e3a309e556a08b42709f6769201b8741632ea778c872344c6ae560 | trentmaetzold/cs61as | hw3.rkt | #lang racket
(require berkeley)
(provide (all-defined-out))
; Exercise 1 - Define fast-expt-iter
(define (fast-expt-iter b n)
(define (iter a b n)
(cond ((= n 0) a)
((even? n) (iter a (square b) (/ n 2)))
(else (iter (* a b) b (- n 1)))))
(iter 1 b n))
phi
(define (phi)
(fixed-p... | null | https://raw.githubusercontent.com/trentmaetzold/cs61as/6e4830786e2c28a26203a4f2046776405af2c10e/homework/hw3.rkt | racket | Exercise 1 - Define fast-expt-iter
Exercise 3 - Define cont-frac
Recursive version
Iterative version
Exercise 4 - Define next-perf
Exercise 5 - Explain what happens when the base cases are interchanged.
Your explanation here
Exercise 6 - Give a formula relating b, n, counter and product in expt-iter.
Formu... | #lang racket
(require berkeley)
(provide (all-defined-out))
(define (fast-expt-iter b n)
(define (iter a b n)
(cond ((= n 0) a)
((even? n) (iter a (square b) (/ n 2)))
(else (iter (* a b) b (- n 1)))))
(iter 1 b n))
phi
(define (phi)
(fixed-point (lambda (x) (+ 1 (/ 1 x)))
... |
857a60c3ddba5b427e21ddbbf3b755f4aa70c0149f3fadfcd163b8c1919d0c07 | ChristopherBiscardi/snap-micro-services | Application.hs | # LANGUAGE TemplateHaskell #
------------------------------------------------------------------------------
-- | This module defines our application's state type and an alias for its
-- handler monad.
module Application where
------------------------------------------------------------------------------
import ... | null | https://raw.githubusercontent.com/ChristopherBiscardi/snap-micro-services/cf7d46c2448872f4e08a6ed04dea1cfa0e9c317f/auth-server/src/Application.hs | haskell | ----------------------------------------------------------------------------
| This module defines our application's state type and an alias for its
handler monad.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
... | # LANGUAGE TemplateHaskell #
module Application where
import Control.Lens
import Snap.Snaplet
import Snap.Snaplet.Auth
import Snap.Snaplet.Heist
import Snap.Snaplet.PostgresqlSimple
import Snap.Snaplet.Session
data App = App
{ _heist :: Snaplet (Heist A... |
5f580083e148c24f6f4ce68ec58d3eb52dab741a2fc61036a3dda3b41399c57a | ocaml/dune | stanza_common.ml | open Import
open Dune_lang.Decoder
Parse and resolve " package " fields
module Pkg = struct
let listing packages =
let longest_pkg =
String.longest_map packages ~f:(fun p ->
let name = Package.name p in
Package.Name.to_string name)
in
Pp.enumerate packages ~f:(fun pkg ->
... | null | https://raw.githubusercontent.com/ocaml/dune/0a6ba087f185cf898ec46f4488e4dcf4a90dda93/src/dune_rules/stanza_common.ml | ocaml | open Import
open Dune_lang.Decoder
Parse and resolve " package " fields
module Pkg = struct
let listing packages =
let longest_pkg =
String.longest_map packages ~f:(fun p ->
let name = Package.name p in
Package.Name.to_string name)
in
Pp.enumerate packages ~f:(fun pkg ->
... | |
cac946e57faed2530c9f83fff9ed86b2dc28bfdc6ae1311aa8583f47fab48f8c | mtesseract/nakadi-client | Test.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Network.Nakadi.Internal.Retry.Test
( testRetry
) where
import ClassyPrelude
import Control.Retry
import qualified Data.ByteString.Lazy as LB
import Data.Function ((&))
import ... | null | https://raw.githubusercontent.com/mtesseract/nakadi-client/f8eef3ac215459081b01b0b48f0b430ae7701f52/tests/Network/Nakadi/Internal/Retry/Test.hs | haskell | # LANGUAGE OverloadedStrings #
^ Fail this many times prior to success
| Tests that the callback is called exactly numFailures times
before the request succeeds — depending on the retry policy. | # LANGUAGE ScopedTypeVariables #
module Network.Nakadi.Internal.Retry.Test
( testRetry
) where
import ClassyPrelude
import Control.Retry
import qualified Data.ByteString.Lazy as LB
import Data.Function ((&))
import Network.HTTP.Client
import ... |
f252290aed37e9f7320b80cdfcde4e8831d11c2a0f0a64d867d6d47340341456 | onyx-platform/onyx | catalog_params_test.clj | (ns onyx.peer.catalog-params-test
(:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
[clojure.test :refer [deftest is testing]]
[onyx.plugin.core-async :refer [take-segments!]]
[onyx.test-helper :refer [load-config with-test-env add-test-env-peers!]]
... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/test/onyx/peer/catalog_params_test.clj | clojure | (ns onyx.peer.catalog-params-test
(:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
[clojure.test :refer [deftest is testing]]
[onyx.plugin.core-async :refer [take-segments!]]
[onyx.test-helper :refer [load-config with-test-env add-test-env-peers!]]
... | |
70f63f5ee00ff3ba23f133032efe0b9443ab861ab91d050cfb9a7cdf6c61d4c5 | wdebeaum/DeepSemLex | understanding.lisp | ;;;;
;;;; W::understanding
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::understanding
(SENSES
((example "our understanding of the problem")
(LF-PARENT ONT::understanding)
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/understanding.lisp | lisp |
W::understanding
|
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::understanding
(SENSES
((example "our understanding of the problem")
(LF-PARENT ONT::understanding)
)
)
)
))
|
004196b4904be7da871f7d1d0ed3e7c04c7c5ad84fd3b75225cfb67ccc01d187 | input-output-hk/cardano-wallet | Util.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE ScopedTypeVariables #
-- |
Copyright : © 2022 IOHK
-- License: Apache-2.0
--
Monadic utility functions .
--
module Control.Monad.Util
( applyNM
) where
import Prelude
| Applies a monadic function @n@ times to an initial value .
--
-- Returns the final result, eq... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/80756f919d7811219e23632bbe59214e0f5e25f5/lib/wallet/src/Control/Monad/Util.hs | haskell | # LANGUAGE BangPatterns #
|
License: Apache-2.0
Returns the final result, equivalent to the nth element of the following
sequence:
@
[ pure a
, f a
, (f <=< f) a
, (f <=< f <=< f) a
, (f <=< f <=< f <=< f) a
, ...
]
@
| # LANGUAGE ScopedTypeVariables #
Copyright : © 2022 IOHK
Monadic utility functions .
module Control.Monad.Util
( applyNM
) where
import Prelude
| Applies a monadic function @n@ times to an initial value .
applyNM :: forall m a. Monad m => Int -> (a -> m a) -> a -> m a
applyNM n next = loop n
where
... |
54dcd0752852b0befee40f3c210bd50d76af574f4f887c0affbf69a5cd2407bc | CryptoKami/cryptokami-core | Trans.hs | -- | ToilT monad transformer. Single-threaded.
module Pos.Txp.Toil.Trans
( ToilT
, runToilTGlobal
, runToilTLocal
, execToilTLocal
, runToilTLocalExtra
, evalToilTEmpty
) where
import Universum
import Control.Lens (at, to, (%=), (+=), (.=))
import ... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/txp/Pos/Txp/Toil/Trans.hs | haskell | | ToilT monad transformer. Single-threaded.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
writable Toil type classes.
single-threaded usage only.
Used for block application now.
---------------------------------... |
module Pos.Txp.Toil.Trans
( ToilT
, runToilTGlobal
, runToilTLocal
, execToilTLocal
, runToilTLocalExtra
, evalToilTEmpty
) where
import Universum
import Control.Lens (at, to, (%=), (+=), (.=))
import Data.Default (Default (def))
import q... |
fccad1fab972b524aba66f1bb980dcf08cf717229c39fd0fc87fe28febe6b94f | FundingCircle/fc4-framework | image_utils.clj | (ns fc4.image-utils
(:require [clojure.string :refer [starts-with?]])
(:import [java.awt Image]
[java.awt.image BufferedImage]
[java.io ByteArrayInputStream ByteArrayOutputStream IOException]
[java.util Base64]
[javax.imageio ImageIO]))
;; Some of the functions include s... | null | https://raw.githubusercontent.com/FundingCircle/fc4-framework/674af39e7edb2cbfd3e1941e6abe80fd87d93bed/src/fc4/image_utils.clj | clojure | Some of the functions include some type hints or type casts. These are to prevent reflection, but
not for the usual reason of improving performance. In this case, some of the reflection violates
stdout (or maybe stderr). | (ns fc4.image-utils
(:require [clojure.string :refer [starts-with?]])
(:import [java.awt Image]
[java.awt.image BufferedImage]
[java.io ByteArrayInputStream ByteArrayOutputStream IOException]
[java.util Base64]
[javax.imageio ImageIO]))
the module boundary rules introd... |
86cd9ed756a5097b40ff99ec8cdfe268bc4be7176d3e1f21b0e68ac811415d1f | 5outh/textlunky | Update.hs |
# LANGUAGE TemplateHaskell
, NoMonomorphismRestriction
, FlexibleContexts #
, NoMonomorphismRestriction
, FlexibleContexts #-}
module Control.Process.Update (
updateP,
stepGame
) where
import Types
import Control.Process.Class
import Control.Lens hiding... | null | https://raw.githubusercontent.com/5outh/textlunky/8dd4d975ed86b761262e3026dd4c22a36b532104/src/Control/Process/Update.hs | haskell | | This is the only way that the game will NOT update
Update round
eventually stepEntities too
Process what happens to player based on
entity he/she sharing space with
| Modify the game based on user command
| TODO: implement
| TODO: Fix "go up" allowance
will want to actually move rooms...
| Move the player ... |
# LANGUAGE TemplateHaskell
, NoMonomorphismRestriction
, FlexibleContexts #
, NoMonomorphismRestriction
, FlexibleContexts #-}
module Control.Process.Update (
updateP,
stepGame
) where
import Types
import Control.Process.Class
import Control.Lens hiding... |
b6d29199ffc090463891bbda68e839c948a8939fa7fa25719e3ff51898ab6533 | richhickey/clojure-contrib | test_prxml.clj | (ns clojure.contrib.test-prxml
(:use clojure.test clojure.contrib.prxml))
(deftest prxml-basic
(is (= "<p>Hello, World!</p>"
(with-out-str (prxml [:p "Hello, World!"])))))
(deftest prxml-escaping
(is (= "<a href=\"foo&bar\">foo<bar</a>"
(with-out-str (prxml [:a {:href "foo&bar"} "foo<ba... | null | https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/test/clojure/clojure/contrib/test_prxml.clj | clojure | bar\">foo<bar</a>" | (ns clojure.contrib.test-prxml
(:use clojure.test clojure.contrib.prxml))
(deftest prxml-basic
(is (= "<p>Hello, World!</p>"
(with-out-str (prxml [:p "Hello, World!"])))))
(deftest prxml-escaping
(with-out-str (prxml [:a {:href "foo&bar"} "foo<bar"])))))
|
cd6034924b056db4ae855ce933c95d5e86815770fd1939b5d4d5f5b7c810411a | bos/llvm | Core.hs | # OPTIONS_GHC -fno - warn - missing - signatures #
module LLVM.Wrapper.Core
( module LLVM.FFI.Core
, Context
, getGlobalContext
, contextCreate
, MemoryBuffer
, createMemoryBufferWithContentsOfFile
, createMemoryBufferWithSTDIN
, createMemoryBufferWithMemoryRange
, createMemoryBuffe... | null | https://raw.githubusercontent.com/bos/llvm/819b94d048c9d7787ce41cd7c71b84424e894f64/base/LLVM/Wrapper/Core.hs | haskell | ** Modules
* Types
** Function types
** Struct types
** Misc
* Values
** Scalar constants
** Globals
** Pass Manager
** Functions
** Metadata
* Basic blocks
* Instruction building
** Control
** Landing pad
** Arithmetic
** Memory
** Casts
** Misc
* Debug
unsafePerformIO just to wrap the non-effecti... | # OPTIONS_GHC -fno - warn - missing - signatures #
module LLVM.Wrapper.Core
( module LLVM.FFI.Core
, Context
, getGlobalContext
, contextCreate
, MemoryBuffer
, createMemoryBufferWithContentsOfFile
, createMemoryBufferWithSTDIN
, createMemoryBufferWithMemoryRange
, createMemoryBuffe... |
9efb1729f87f3d41b56da695a3c2732a5019a835eebbc8a4eb1b48aadeea1a54 | heraldry/heraldicon | helms.cljs | (ns heraldicon.heraldry.helms
(:require
[heraldicon.context :as c]
[heraldicon.heraldry.field.environment :as environment]
[heraldicon.heraldry.shield-separator :as shield-separator]
[heraldicon.interface :as interface]
[heraldicon.math.bounding-box :as bb]
[heraldicon.math.vector :as v]))
(defmeth... | null | https://raw.githubusercontent.com/heraldry/heraldicon/71126cfd7ba342dea0d1bb849be92cbe5290a6fd/src/heraldicon/heraldry/helms.cljs | clojure | TODO: self-below-shield? probably should be a subscription as well,
which can always be checked in the render-component function | (ns heraldicon.heraldry.helms
(:require
[heraldicon.context :as c]
[heraldicon.heraldry.field.environment :as environment]
[heraldicon.heraldry.shield-separator :as shield-separator]
[heraldicon.interface :as interface]
[heraldicon.math.bounding-box :as bb]
[heraldicon.math.vector :as v]))
(defmeth... |
0f7a0fe5d53a8fb1daaff3ca2f1be9924e850e82abe47017f30f2958f83f8a82 | nokijp/pietc | Syntax.hs | | A representation of the syntax of .
module Language.Piet.Syntax
( Block(..)
, SyntaxGraph(..)
, NextBlock(..)
, DirectionPointer(..)
, CodelChooser(..)
, DPCC(..)
, Command(..)
, commandFromTransition
, showCommand
, showDPCC
) where
import Data.IntMap (IntMap)
import Data.Map (Map)
import D... | null | https://raw.githubusercontent.com/nokijp/pietc/da6699c286a7b428b01211c8e467ce4ec1f7967e/src/Language/Piet/Syntax.hs | haskell | This has information how to move into the next codel block.
| A data type which contains information about a move to the next block.
^ The command which will be executed when moving into the next codel block.
^ The index of the next codel block.
| | A representation of the syntax of .
module Language.Piet.Syntax
( Block(..)
, SyntaxGraph(..)
, NextBlock(..)
, DirectionPointer(..)
, CodelChooser(..)
, DPCC(..)
, Command(..)
, commandFromTransition
, showCommand
, showDPCC
) where
import Data.IntMap (IntMap)
import Data.Map (Map)
import D... |
58518b94c95a28bc08cef267e7067c7444dc652dc06a5ff9b112a4f2923ebaad | bjin/dprox | Main.hs | SPDX - License - Identifier : BSD-3 - Clause
--
Copyright ( C ) 2019 . All Rights Reserved .
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
module Main where
import Control.Concurrent (forkIO, threadDelay)
import Control.Exception ... | null | https://raw.githubusercontent.com/bjin/dprox/c7f2e74fab0c7c7fb8f1848d3f938d474dde1d90/src/Main.hs | haskell |
# LANGUAGE OverloadedStrings # | SPDX - License - Identifier : BSD-3 - Clause
Copyright ( C ) 2019 . All Rights Reserved .
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
module Main where
import Control.Concurrent (forkIO, threadDelay)
import Control.Exception (SomeException, handle)
import ... |
4f9f0e95c462542f47a1ed2acddf1cf860f28afa9b9e01dbdc34e17e5eed63de | sdiehl/elliptic-curve | Parameters.hs | module Generate.Montgomery.Parameters
( curves
) where
import Generate.Montgomery.Types
-------------------------------------------------------------------------------
-- Curves
-------------------------------------------------------------------------------
curves :: [Curve]
curves =
[ curve448
, curve25519
... | null | https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/generate/Generate/Montgomery/Parameters.hs | haskell | -----------------------------------------------------------------------------
Curves
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Parameters
------------------------------------------------------------------... | module Generate.Montgomery.Parameters
( curves
) where
import Generate.Montgomery.Types
curves :: [Curve]
curves =
[ curve448
, curve25519
, curve383187
, m221
, m383
, m511
]
curve448 :: Curve
curve448 = Curve
{ name = "Curve448"
, types = Types
{ curve = "Curve448"
, field = Prime "... |
0f91afdeac14bc0dd3cc679247972319adaf7cfe89136e8f6bc9a0d91af702b8 | bmeurer/ocamljit2 | frx_widget.mli | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of Objective Caml
(* *)
, , and ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/otherlibs/labltk/frx/frx_widget.mli | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of Objective Caml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
c5d43c243bea5e777b419094ac740e0bce52507b74fa7843ce5fa122c0f8aca7 | braidchat/braid | subs.cljs | (ns braid.core.client.invites.subs
(:require
[re-frame.core :refer [reg-sub]]))
(reg-sub
:invitations
(fn [state _]
(get-in state [:invitations])))
| null | https://raw.githubusercontent.com/braidchat/braid/2e44eb6e77f1d203115f9b9c529bd865fa3d7302/src/braid/core/client/invites/subs.cljs | clojure | (ns braid.core.client.invites.subs
(:require
[re-frame.core :refer [reg-sub]]))
(reg-sub
:invitations
(fn [state _]
(get-in state [:invitations])))
| |
3f061a11e38cc3a54a704a2e8c2ac2ef14974a66250d6a2de5efee536391a150 | Datomic/day-of-datomic | social_news.clj | Copyright ( c ) Cognitect , Inc. 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... | null | https://raw.githubusercontent.com/Datomic/day-of-datomic/20c02d26fd2a12481903dd5347589456c74f8eeb/tutorial/social_news.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) Cognitect , Inc. All rights reserved .
(require
'[datomic.api :as d]
'[datomic.samples.repl :as repl])
(def conn (repl/scratch-conn))
(repl/transact-all conn (repl/resource "day-of-datomic/social-news.edn"))
(def db (d/db conn))
(def all-stories
(d/q '[:find [?e ...]
:where [?e :sto... |
856cc1e07fc0c8aad7d98aa21d27402965595e3c5f847790521fca7f95e8006a | neeraj9/hello-erlang-rump | uclimate_loader.erl | %%%-------------------------------------------------------------------
@author nsharma
( C ) 2016 ,
%%% @doc
%%%
%%% @end
Copyright ( c ) 2016 , < > .
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the followi... | null | https://raw.githubusercontent.com/neeraj9/hello-erlang-rump/304d2f0faaef64677de22d9a3495297e08d90a3f/apps/uclimate/src/uclimate_loader.erl | erlang | -------------------------------------------------------------------
@doc
@end
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
... | @author nsharma
( C ) 2016 ,
Copyright ( c ) 2016 , < > .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVI... |
a45cfacfccda907566486637415639e141128b928f90b5a5f5ba580a5f9811ec | functional-koans/clojure-koan-engine | core.clj | (ns koan-engine.core
(:require [koan-engine.util :as u]))
(def __ :fill-in-the-blank)
(def ___ (fn [& args] __))
(defn ensure-valid-meditation [doc-expression-pairs]
(doseq [[doc expression] doc-expression-pairs]
(when-not (string? doc)
(throw (ex-info (str "Meditations must be alternating doc/expressio... | null | https://raw.githubusercontent.com/functional-koans/clojure-koan-engine/2ef0699a74a46978305ee116a193d2995038c21f/src/koan_engine/core.clj | clojure | (ns koan-engine.core
(:require [koan-engine.util :as u]))
(def __ :fill-in-the-blank)
(def ___ (fn [& args] __))
(defn ensure-valid-meditation [doc-expression-pairs]
(doseq [[doc expression] doc-expression-pairs]
(when-not (string? doc)
(throw (ex-info (str "Meditations must be alternating doc/expressio... | |
f0e716bfbc4b12393fceea12c96e4158ea48118c5a94fbbf23f237cc181ab1cd | sph-mn/sph-web-app | main.scm | (library (project-name http main)
(export
main-action)
(import
(sph)
(sph alist)
(sph list)
(sph web app)
(sph web app client)
(sph web app http))
(define (main-action request id)
(respond-html request
(alist-q title "test title"
; include the pre-processed css file ... | null | https://raw.githubusercontent.com/sph-mn/sph-web-app/9b803d9b7efc15f157c544c726f1f2c0663de5a9/example/project-example/modules/http/main.scm | scheme | include the pre-processed css file for the bundles default
use the template file layout and insert example content | (library (project-name http main)
(export
main-action)
(import
(sph)
(sph alist)
(sph list)
(sph web app)
(sph web app client)
(sph web app http))
(define (main-action request id)
(respond-html request
(alist-q title "test title"
css
(client-static (swa-http-... |
5e523e694f82cde169d070c1efa2a3826db3a7de61f0dc25e7297a079682460a | Plisp/vico | package.lisp | (in-package :cl-user)
;; this package exports user-facing routines
( defpackage :
;; (:use :cl)
;; (:local-nicknames (:core :vico-core))
# .`(:export
, @(loop : for being each external - symbol of ( find - package : cl )
;; :collect sym)))
| null | https://raw.githubusercontent.com/Plisp/vico/40606aea583ef9db98941ee337feb47f10c9696c/src/package.lisp | lisp | this package exports user-facing routines
(:use :cl)
(:local-nicknames (:core :vico-core))
:collect sym))) | (in-package :cl-user)
( defpackage :
# .`(:export
, @(loop : for being each external - symbol of ( find - package : cl )
|
58a69c3bfaa680e325d3f4c80216d948f1f6d10e25bd19773ab18b5ff0b51017 | camlspotter/ocaml-zippy-tutorial-in-japanese | w39.ml | let rec f x = x
| null | https://raw.githubusercontent.com/camlspotter/ocaml-zippy-tutorial-in-japanese/c6aeabc08b6e2289a0e66c5b94a89c6723d88a6a/t/warnings/w39.ml | ocaml | let rec f x = x
| |
64a0fe3747c0d8fd6fa8b2d9d9526ccdb0414ecfdf1a79d238c2ba92cf9fd09a | cardmagic/lucash | exception.scm | ; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
Copyright ( c ) 1993 - 1999 by and . See file COPYING .
;;;; Raising and handling conditions
; An exception is an unusual situation detected by the virtual machine.
; A condition is a run-time system structure describing unusual situations,
; including e... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scheme/rts/exception.scm | scheme | -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
Raising and handling conditions
An exception is an unusual situation detected by the virtual machine.
A condition is a run-time system structure describing unusual situations,
including exceptions.
Usual exception handler vector.
The time opcode sometimes ne... | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define (define-exception-handler opcode proc)
(vector-set! exception-handlers opcode proc))
(define (signal-exception opcode reason . args)
(really-signal-condition (make-exception opcode
(if reason
(enumerand->name reason exce... |
6644f296410fc818d2dcfa01cb99e935198de07d3112dff227f6eb68cf838833 | GNOME/aisleriot | union-square.scm | ; AisleRiot - union_square.scm
Copyright ( C ) 1999 < >
;
; 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 option) any later version.
;
; Thi... | null | https://raw.githubusercontent.com/GNOME/aisleriot/5b04e58ba5f8df8223a3830d2c61325527d52237/games/union-square.scm | scheme | AisleRiot - union_square.scm
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE... | Copyright ( C ) 1999 < >
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
(use-modules (aisleriot interface) (aisleriot api))
(define stock 0)
(define wa... |
f70ffad7564abcb0a9ddf6bf6c31dee62e91b1cdc78b73c11c9f8a3bd1edc8eb | pashatsyganenko/main | 19042019.ml | let bambuk m = let rec help n = if n<=0 then Leaf else Node (m-n+1, Leaf, help (n-1)) in help m ;;
| null | https://raw.githubusercontent.com/pashatsyganenko/main/de86975f0bb6f87efa394e80d66a4f938de9b530/19042019.ml | ocaml | let bambuk m = let rec help n = if n<=0 then Leaf else Node (m-n+1, Leaf, help (n-1)) in help m ;;
| |
84ae80bc7dea06e134ca259f86d821bf699f73643bc6d2de690a64b94bcd33c2 | riemann/riemann | sns_test.clj | (ns riemann.sns-test
(:require [riemann.common :refer [time-at count-string-bytes]]
[riemann.sns :refer :all]
[riemann.time :refer [unix-time]]
[clojure.test :refer :all])
(:import [com.amazonaws.services.sns.model PublishResult]))
(def env-access-key-id (System/getenv "AWS_... | null | https://raw.githubusercontent.com/riemann/riemann/1649687c0bd913c378701ee0b964a9863bde7c7c/test/riemann/sns_test.clj | clojure | delivers: arn body subject | (ns riemann.sns-test
(:require [riemann.common :refer [time-at count-string-bytes]]
[riemann.sns :refer :all]
[riemann.time :refer [unix-time]]
[clojure.test :refer :all])
(:import [com.amazonaws.services.sns.model PublishResult]))
(def env-access-key-id (System/getenv "AWS_... |
aac75ce6a02367bfb3a2bba76aa37222a81572dae3fdb0cfe04d0165db3ea8cb | silkapp/rest | ShowUrl.hs | # LANGUAGE
FlexibleInstances
, TypeSynonymInstances
#
FlexibleInstances
, TypeSynonymInstances
#-}
module Rest.Types.ShowUrl (ShowUrl(..)) where
import Data.UUID.Types
import qualified Data.Text as ST
import qualified Data.Text.Lazy as LT
class ShowUrl a where
showUrl :: a -> String
inst... | null | https://raw.githubusercontent.com/silkapp/rest/f0462fc36709407f236f57064d8e37c77bdf8a79/rest-types/src/Rest/Types/ShowUrl.hs | haskell | # LANGUAGE
FlexibleInstances
, TypeSynonymInstances
#
FlexibleInstances
, TypeSynonymInstances
#-}
module Rest.Types.ShowUrl (ShowUrl(..)) where
import Data.UUID.Types
import qualified Data.Text as ST
import qualified Data.Text.Lazy as LT
class ShowUrl a where
showUrl :: a -> String
inst... | |
2e48674c800e4c6bc8c7a7482cc9beccf5a7cab75594255beafe6cc3ce137717 | rabbitmq/rabbitmq-management | rabbit_mgmt_headers.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
%% This module contains helper functions that con... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/543906f01ccd0344aff648f21bb6b5156b2a2ca2/src/rabbit_mgmt_headers.erl | erlang |
This module contains helper functions that control
API
| This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
response headers related to CORS , CSP , HSTS and so ... |
e4a1e519c9ed87959f421ae52052f9d5f02012c58330d5ed967313c25466a5e3 | input-output-hk/plutus-apps | RequestHandlers.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE MonoLocalBinds #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications ... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/b80116b9dd97e83b61f016924f83ad4284212796/plutus-pab/src/Plutus/PAB/Core/ContractInstance/RequestHandlers.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
| Request handlers for contract instance runners.
| Log messages about the contract instance
number of requests | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE MonoLocalBinds #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module Plutus.PAB.Core.ContractInstance.RequestHandlers(
ContractInstanc... |
c9b866634bfb3dc619eeb46b2bb49c801b0d0ddb2b05733bf3b92843232d5976 | ajhc/demo-android-ndk | Main.hs | # LANGUAGE ForeignFunctionInterface #
import Control.Monad
import Foreign.Ptr
import Foreign.Storable
import Foreign.Marshal.Alloc
import Foreign.Marshal.Array
import AndroidNdk
-- some magic
androidActs :: AndroidNdkActs
androidActs = AndroidNdkActs { drawFrame = engineDrawFrame
, initDi... | null | https://raw.githubusercontent.com/ajhc/demo-android-ndk/dc54f9d219c9d9ca34afe1efeb2798a8773de68c/native-activity/hs_src/Main.hs | haskell | some magic
Dummy main
True main
Process the next input event.
Process the next main command.
Just the current frame in the display. | # LANGUAGE ForeignFunctionInterface #
import Control.Monad
import Foreign.Ptr
import Foreign.Storable
import Foreign.Marshal.Alloc
import Foreign.Marshal.Array
import AndroidNdk
androidActs :: AndroidNdkActs
androidActs = AndroidNdkActs { drawFrame = engineDrawFrame
, initDisplay = engine... |
183f98242da5ca4d12fea61795c16fca2b66791202e98af9ebe4bce31d05e552 | eslick/cl-stdutils | hashed-table.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : utils -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: hashed-table.lisp
;;;; Purpose: A generic table data structure; hash storage
Programmer :
... | null | https://raw.githubusercontent.com/eslick/cl-stdutils/4a4e5a4036b815318282da5dee2a22825369137b/src/hashed-table.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : utils -*-
*************************************************************************
FILE IDENTIFICATION
Name: hashed-table.lisp
Purpose: A generic table data structure; hash storage
conditions | Programmer :
Date Started : October 2005
(in-package :stdutils.gds)
(defclass-exported hashed-table (table)
((table :accessor hashed-table-ref :initarg :hash :initform (hash))))
(defmethod-exported drop ((table hashed-table) key)
(hash-rem (hashed-table-ref table) key))
(defmethod-exported get-valu... |
3ae9be9b93ac72adcc32f54eba7d1c27917f7cf0dbc75f4d466a2944ae6dfaeb | unison-code/unison | Hoopl.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Hoopl block control - flow graph of a function .
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
Hoopl block control-flow graph ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Graphs/Hoopl.hs | haskell | | Function to Hoopl graph
| This is a work-around to get the facts from the last iteration in
forward analysis.
| Block to Hoopl block
| Function to Hoopl operation graph
| Operation to Hoopl block | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Hoopl block control - flow graph of a function .
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
Hoopl block control-flow graph ... |
b74807341b5d7d202ca523143811af96ccec630b127497ea5bc3e509d838f07c | egobrain/equery | q_tests.erl | -module(q_tests).
-export([schema/0]).
-include_lib("eunit/include/eunit.hrl").
-include_lib("equery/include/equery.hrl").
-define(USER_SCHEMA, #{
fields => #{
id => #{ type => integer, index => true, autoincrement => true },
name => #{type => {varchar, 60}, required => true},
... | null | https://raw.githubusercontent.com/egobrain/equery/7b5e0643ff94745a40c794514430309c7ac406c7/test/q_tests.erl | erlang | =============================================================================
tests
=============================================================================
return nothing
return nothing
Drop distinct
=============================================================================
============================... | -module(q_tests).
-export([schema/0]).
-include_lib("eunit/include/eunit.hrl").
-include_lib("equery/include/equery.hrl").
-define(USER_SCHEMA, #{
fields => #{
id => #{ type => integer, index => true, autoincrement => true },
name => #{type => {varchar, 60}, required => true},
... |
8a7c4f6667997e5ed8e9f343acde68e21b57ceba20dc554e6d8b312daf091700 | tommaisey/aeon | excess.help.scm | ;; (excess a b)
;; clipping residual. Returns the difference of the original signal
;; and its clipped form: (a - clip2(a,b)).
(audition
(out 0 (excess (f-sin-osc ar 1000 0) (line kr 0 1 8 do-nothing))))
(audition
(out 0 (let ((a (f-sin-osc ar 1000 0))
(b (line kr 0 1 8 do-nothing)))
(sub a (clip2 a b... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/binary-ops/excess.help.scm | scheme | (excess a b)
clipping residual. Returns the difference of the original signal
and its clipped form: (a - clip2(a,b)). |
(audition
(out 0 (excess (f-sin-osc ar 1000 0) (line kr 0 1 8 do-nothing))))
(audition
(out 0 (let ((a (f-sin-osc ar 1000 0))
(b (line kr 0 1 8 do-nothing)))
(sub a (clip2 a b)))))
|
5b53fa631f1733e211690fa68982ffc0b5afe4d6b1dea6823bb7d0918824d54a | txkaduo/weixin-mp-sdk | TextParser.hs | module WeiXin.PublicPlatform.Conversation.TextParser where
import ClassyPrelude hiding ((<|>), try, FilePath, (</>))
import qualified Data.Text as T
import Data.Char
import Text.Read (reads)
import Text.Parsec
import Text.Parsec.Error
import Text.Parsec.Pos
import Yesod.He... | null | https://raw.githubusercontent.com/txkaduo/weixin-mp-sdk/77abe31d06ccf266aad358373b9cde34b222b305/WeiXin/PublicPlatform/Conversation/TextParser.hs | haskell | module WeiXin.PublicPlatform.Conversation.TextParser where
import ClassyPrelude hiding ((<|>), try, FilePath, (</>))
import qualified Data.Text as T
import Data.Char
import Text.Read (reads)
import Text.Parsec
import Text.Parsec.Error
import Text.Parsec.Pos
import Yesod.He... | |
0a7db1a233ab378b2b167cd772b51a25edf33e8af5a9a1589ce1c979470ca7fd | dwysocki/mini-java | parser.clj | (ns mini-java.parser
"Uses ANTLR to parse a MiniJava source file into an AST.
ANTLR outputs a data structure which is not ideal, and so it is passed to
mini-java.ast/ast, which transforms it into a more idealized AST."
(:require [mini-java.ast :as ast]
[clojure.pprint :refer [pprint]])
(:import [... | null | https://raw.githubusercontent.com/dwysocki/mini-java/5f20c87fd33c7535b126a0c01bc567489b60cb67/src/mini_java/parser.clj | clojure | create parser with custom error listener and error handler
parse file | (ns mini-java.parser
"Uses ANTLR to parse a MiniJava source file into an AST.
ANTLR outputs a data structure which is not ideal, and so it is passed to
mini-java.ast/ast, which transforms it into a more idealized AST."
(:require [mini-java.ast :as ast]
[clojure.pprint :refer [pprint]])
(:import [... |
c0b0c058200135b5d2d1bfea2c33cd1772551b637dc7838bf9d447f9360d501c | pupeno/carouselapps_isomorphic-clojurescript-projectx | dev.cljs | (ns ^:figwheel-no-load projectx.dev
(:require [projectx.core :as core]
[figwheel.client :as figwheel :include-macros true]))
(enable-console-print!)
(figwheel/watch-and-reload
:websocket-url "ws:3449/figwheel-ws"
:jsload-callback core/mount-root)
(core/init!)
| null | https://raw.githubusercontent.com/pupeno/carouselapps_isomorphic-clojurescript-projectx/3c782f038327b17c49e5946a836ee1668f65c376/env/dev/cljs/projectx/dev.cljs | clojure | (ns ^:figwheel-no-load projectx.dev
(:require [projectx.core :as core]
[figwheel.client :as figwheel :include-macros true]))
(enable-console-print!)
(figwheel/watch-and-reload
:websocket-url "ws:3449/figwheel-ws"
:jsload-callback core/mount-root)
(core/init!)
| |
57d464d65d5ec4c9eaff157b12e8197041a4f98e38b6c406362cc51d48def81e | repl-electric/cassiopeia | ruchbah.clj | (ns cassiopeia.data.ruchbah)
(def flow-f-buf-record [:A3 :E3 :D3 :C4 :D3 :E3 :A3 :C3])
(def flow-buf-record [:A3 :C3 :C3 :C3 :E3 :D3 :E3 :D3 :A3 :A3 :E3 :E3 :D3 :C4 :D3 :A3])
(def high-pinging-record [:E3 :B2 :D3 :A3 :D3 :C4 :B3 :A5 :B4 :C3 :D4 :G4 :D3 :D3 :B3 :A3 :F3])
| null | https://raw.githubusercontent.com/repl-electric/cassiopeia/a42c01752fc8dd04ea5db95c8037f393c29cdb75/src/cassiopeia/data/ruchbah.clj | clojure | (ns cassiopeia.data.ruchbah)
(def flow-f-buf-record [:A3 :E3 :D3 :C4 :D3 :E3 :A3 :C3])
(def flow-buf-record [:A3 :C3 :C3 :C3 :E3 :D3 :E3 :D3 :A3 :A3 :E3 :E3 :D3 :C4 :D3 :A3])
(def high-pinging-record [:E3 :B2 :D3 :A3 :D3 :C4 :B3 :A5 :B4 :C3 :D4 :G4 :D3 :D3 :B3 :A3 :F3])
| |
1906d512e778567ec006a8a9bab719fa72f44c742732182a35a80b7f61581fb0 | myuon/quartz-hs | SpecParser.hs | # LANGUAGE QuasiQuotes #
module Language.Quartz.SpecParser where
import Language.Quartz
import Language.Quartz.AST
import Language.Quartz.Lexer
import Language.Quartz.Parser
import Language.Quartz.Transform
import Test.Tasty.Hspec hiding ( Fa... | null | https://raw.githubusercontent.com/myuon/quartz-hs/998edb502443d80cfe300730885de25bc7d15b08/test/Language/Quartz/SpecParser.hs | haskell | # LANGUAGE QuasiQuotes #
module Language.Quartz.SpecParser where
import Language.Quartz
import Language.Quartz.AST
import Language.Quartz.Lexer
import Language.Quartz.Parser
import Language.Quartz.Transform
import Test.Tasty.Hspec hiding ( Fa... | |
b457cd0186cd5db40d479efceab93dfbc2f9374c002644494003045c2b0555e0 | ocsigen/obrowser | std_exit.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocsigen/obrowser/977c09029ea1e4fde4fb0bf92b4d893835bd9504/rt/caml/std_exit.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : std_exit.ml 4144 2001 - 12 - ... |
b4d43b0566db0257ce730a0307abc6982ad4880896ee0c7ed9425b4c74fd61c5 | CloudI/CloudI | msgpack_term.erl | %%
MessagePack for Erlang
%%
Copyright ( C ) 2009 - 2013 UENISHI Kota
%%
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 appli... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_msgpack/src/msgpack_term.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.
limitations under the License.
@do... | MessagePack for Erlang
Copyright ( C ) 2009 - 2013 UENISHI Kota
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
See the License for the specific language governing permissions and
-module(msgpack_term).
-expor... |
5fd647cd06c59a82adaf27631d030264502103b9555de9956a3876083dc9f965 | avsm/ocaml-ssh | algorithms.mli |
* Copyright ( c ) 2004 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... | null | https://raw.githubusercontent.com/avsm/ocaml-ssh/26577d1501e7a43e4b520239b08da114c542eda4/lib/algorithms.mli | ocaml |
* Copyright ( c ) 2004 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... | |
8360a04082d21385f365074cd6e4b294a740cd4c42b82178588e9b1a3f2ffa9c | tsloughter/kuberl | kuberl_v1_managed_fields_entry.erl | -module(kuberl_v1_managed_fields_entry).
-export([encode/1]).
-export_type([kuberl_v1_managed_fields_entry/0]).
-type kuberl_v1_managed_fields_entry() ::
#{ 'apiVersion' => binary(),
'fieldsType' => binary(),
'fieldsV1' => maps:map(),
'manager' => binary(),
'operation' => binary(),
... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_managed_fields_entry.erl | erlang | -module(kuberl_v1_managed_fields_entry).
-export([encode/1]).
-export_type([kuberl_v1_managed_fields_entry/0]).
-type kuberl_v1_managed_fields_entry() ::
#{ 'apiVersion' => binary(),
'fieldsType' => binary(),
'fieldsV1' => maps:map(),
'manager' => binary(),
'operation' => binary(),
... | |
e68342788332bd37dc09a71d673cb6779dbf27d83eb23f020401c3c3e87c1444 | Deducteam/Logipedia | makefile.ml | (** Define some rule making facilites for export from STTfa. *)
open Core
open Extras
open Build.Classic
open Build_template
let mk_generators : string -> (DkTools.Mident.t -> DkTools.entry list pp) ->
(Key.t, Value.t) generator list = fun ext entries_pp ->
let sysrule = function
| Key.File(p) when Filename.ex... | null | https://raw.githubusercontent.com/Deducteam/Logipedia/09797a35ae36ab671e40e615fcdc09a7bba69134/src/sttfa/makefile.ml | ocaml | * Define some rule making facilites for export from STTfa. | open Core
open Extras
open Build.Classic
open Build_template
let mk_generators : string -> (DkTools.Mident.t -> DkTools.entry list pp) ->
(Key.t, Value.t) generator list = fun ext entries_pp ->
let sysrule = function
| Key.File(p) when Filename.extension p = ext ->
let srcmd = dk_of p |> Api.Env.Default.... |
d5b01dde49d02529e200c5fd31bf100fa984ab1990d6d7fbc8e3c705e04777dc | bufferswap/ViralityEngine | mat4.lisp | (in-package #:vorigin.mat4)
(u:fn-> = (mat mat &key (:rel u:f32) (:abs u:f32)) boolean)
(declaim (inline =))
(defun = (mat1 mat2 &key (rel 1f-7) (abs rel))
(com:cwcmp 16 (mat1 mat2) (com:= mat1 mat2 rel abs)))
(u:fn-> zero! (mat) mat)
(declaim (inline zero!))
(defun zero! (mat)
(declare (optimize speed))
(com:c... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/support/vorigin/src/operations/mat4.lisp | lisp | invert rotation matrix
invert translation
fill in expected constants | (in-package #:vorigin.mat4)
(u:fn-> = (mat mat &key (:rel u:f32) (:abs u:f32)) boolean)
(declaim (inline =))
(defun = (mat1 mat2 &key (rel 1f-7) (abs rel))
(com:cwcmp 16 (mat1 mat2) (com:= mat1 mat2 rel abs)))
(u:fn-> zero! (mat) mat)
(declaim (inline zero!))
(defun zero! (mat)
(declare (optimize speed))
(com:c... |
07cbabb35150ecbe71482433e0f55022ef2418488f5369a0fba0e30a2eff9e04 | vdukhovni/danecheck | Certs.hs | # LANGUAGE RecordWildCards #
module Dane.Scanner.SMTP.Certs
( cnOf
, orgOf
, encodeDER
, genChainInfo
, ChainInfo
, CertInfo(..)
, CertHashes(..)
, HostName
) where
import Crypto.Hash (hashWith)
import Crypto.Hash.Algorithms (SHA25... | null | https://raw.githubusercontent.com/vdukhovni/danecheck/250fb3d8d87bddc5ca2de33b83cb0bdd518b3296/Dane/Scanner/SMTP/Certs.hs | haskell | chain depth
issuer
dates
subject
Constructed chain
Always succeed | # LANGUAGE RecordWildCards #
module Dane.Scanner.SMTP.Certs
( cnOf
, orgOf
, encodeDER
, genChainInfo
, ChainInfo
, CertInfo(..)
, CertHashes(..)
, HostName
) where
import Crypto.Hash (hashWith)
import Crypto.Hash.Algorithms (SHA25... |
848d72013565be465dd229f01c180debcb3e7235dc6568c7079285393c6caf9c | spl/ivy | inliner.ml |
*
* Copyright ( c ) 2007 ,
* < >
* 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/spl/ivy/b1b516484fba637eb24e83d27555d273495e622b/cil/src/ext/inliner.ml | ocaml | * This module provides inlining functions. You can run it from the cilly
* command line by passing the names of the functions to inline:
*
* cilly --save-temps --inline=toinline module.c
*
* This module has not been tested extensively, so you should run it with
* the --check argument to ensure that i... |
*
* Copyright ( c ) 2007 ,
* < >
* 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... |
4c863c6eeee6447941827acf66885c79d205cae97b7da2fc82ef7d18e22f6e15 | gadfly361/reagent-figwheel | project.clj | (defproject {{ns-name}} "0.1.0-SNAPSHOT"
:min-lein-version "2.7.1"
:dependencies [;; clojure(script)
[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.10.238"]
;; react wrapper
[reagent "0.8.1"]
ajax
[cljs-ajax "0.5.3"... | null | https://raw.githubusercontent.com/gadfly361/reagent-figwheel/4c40657b31a2b358be5697add2e96e8cac6f8535/src/leiningen/new/reagent_figwheel/gadfly/project.clj | clojure | clojure(script)
react wrapper
client-side routing
css in clojure
d3 wrapper
notifications
human-readable spec errors
app
devards | (defproject {{ns-name}} "0.1.0-SNAPSHOT"
:min-lein-version "2.7.1"
[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.10.238"]
[reagent "0.8.1"]
ajax
[cljs-ajax "0.5.3"]
[funcool/bide "1.6.0"]
[garden "1.... |
ea9984b7c9977e0cf7caae37a676187deb0f75858b86e78002cd929129cd42e6 | cognitect-labs/onto | labeling.clj | (ns onto.examples.labeling
(:require [onto.core :as o :refer [v]]))
(def generic-display
(o/properties
(o/label :personName)
(o/label :movieTitle)))
(def named-things
(o/nodes
(v "Person1" :personName "James Dean")
(v "Person2" :personName "Elizabeth Taylor")
(v "Person3" :personName "Rock Hudson... | null | https://raw.githubusercontent.com/cognitect-labs/onto/56eee1833254b902ec7bcf6b82d36e611c1ae207/test/onto/examples/labeling.clj | clojure | (ns onto.examples.labeling
(:require [onto.core :as o :refer [v]]))
(def generic-display
(o/properties
(o/label :personName)
(o/label :movieTitle)))
(def named-things
(o/nodes
(v "Person1" :personName "James Dean")
(v "Person2" :personName "Elizabeth Taylor")
(v "Person3" :personName "Rock Hudson... | |
40ad1890d8fdfac49d8f5bdb14a38986a26fca630704b70d32b1185c03cce7cb | decal/pathgro | path-vimswap.scm | (define-module (pathgro base path-vimswap)
#:use-module (srfi srfi-1)
#:export (path-vimswap))
From GitHub 's gitignore file for vim :
; [._]*.s[a-v][a-z]
; [._]*.sw[a-p]
[ ._]s[a - v][a - z ]
; [._]sw[a-p]
(define (path-vimswap apth)
(map (lambda (x) (string-append "/" "." apth ".sw" (list->string (list (i... | null | https://raw.githubusercontent.com/decal/pathgro/48c4007611f9c4ae6ff24e50ae27615c65cad3b2/pathgro/base/path-vimswap.scm | scheme | [._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]sw[a-p] | (define-module (pathgro base path-vimswap)
#:use-module (srfi srfi-1)
#:export (path-vimswap))
From GitHub 's gitignore file for vim :
[ ._]s[a - v][a - z ]
(define (path-vimswap apth)
(map (lambda (x) (string-append "/" "." apth ".sw" (list->string (list (integer->char x))))) (iota 16 97 1)))
|
dc75264ce25ad760343d4b844728a878c2081e11d1d09a76e2792042f6c34c43 | mhuebert/re-db | history.cljc | (ns re-db.history
(:require [re-db.in-memory :as db]
[re-db.read :as read]
[re-db.reactive :as r]))
(defn last-tx [history] (-> history :log first :tx))
(defn current-tx [history] (:tx @(:conn history)))
(defn current? [history] (= (last-tx history) (current-tx history)))
(def traveling? (co... | null | https://raw.githubusercontent.com/mhuebert/re-db/0a1d0ad4557451c8943954b3b92e0cbc1e2fedab/src/main/re_db/history.cljc | clojure | forward
backward
;; no-op | (ns re-db.history
(:require [re-db.in-memory :as db]
[re-db.read :as read]
[re-db.reactive :as r]))
(defn last-tx [history] (-> history :log first :tx))
(defn current-tx [history] (:tx @(:conn history)))
(defn current? [history] (= (last-tx history) (current-tx history)))
(def traveling? (co... |
b822f42c65db5bb6af7e0ad150047fa4c0853de224493dcbfd31bc50aa6697c0 | reborg/reclojure | array_map_test.clj | (ns reclojure.lang.array-map-test
(:require [midje.sweet :refer :all]
[reclojure.lang.protocols.persistent-vector :as pv]
[reclojure.lang.protocols.transient-map :as tm]
[reclojure.lang.protocols.persistent-map :as pm]
[reclojure.lang.array-map :as am]))
(facts "persis... | null | https://raw.githubusercontent.com/reborg/reclojure/c8aae4cc384d59262569cbc9c332e08619f292ef/test/reclojure/lang/array_map_test.clj | clojure | (ns reclojure.lang.array-map-test
(:require [midje.sweet :refer :all]
[reclojure.lang.protocols.persistent-vector :as pv]
[reclojure.lang.protocols.transient-map :as tm]
[reclojure.lang.protocols.persistent-map :as pm]
[reclojure.lang.array-map :as am]))
(facts "persis... | |
e04bbc6b6798cfc1e21373bf64a132c7ce28783e80184a08da39b554d47a531c | michalkonecny/aern2 | Comparison.hs | # LANGUAGE TemplateHaskell #
|
Module : AERN2.Sequence . Comparison
Description : comparison operations on sequences
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Comparison operations on convergent sequences .
M... | null | https://raw.githubusercontent.com/michalkonecny/aern2/7ab41113ca8f73dca70d887d190ddab3b43ef084/aern2-net/src/AERN2/Sequence/Comparison.hs | haskell | equality & order
comparisons of SequenceAtAccuracy
abs
min/max
| # LANGUAGE TemplateHaskell #
|
Module : AERN2.Sequence . Comparison
Description : comparison operations on sequences
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Comparison operations on convergent sequences .
M... |
88b8330265e361a268425ed348a99af5bef010f2d3c849cb961fcee08cfb1b22 | ml4tp/tcoq | goptions.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/library/goptions.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This module manages customization p... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open CErrors
open Ut... |
daf4218525adf02b4ddf7827e3b56d18102413e4473b6fab57afea72715c2aad | racket/typed-racket | unary-fixnum-nested.rkt | #;#;
#<<END
TR opt: unary-fixnum-nested.rkt 2:0 (bitwise-not (bitwise-not (length (quote (1 2 3))))) -- unary fixnum
TR opt: unary-fixnum-nested.rkt 2:13 (bitwise-not (length (quote (1 2 3)))) -- unary fixnum
TR opt: unary-fixnum-nested.rkt 2:26 (length (quote (1 2 3))) -- known-length list length
END
#<<END
3
END
#la... | null | https://raw.githubusercontent.com/racket/typed-racket/0236151e3b95d6d39276353cb5005197843e16e4/typed-racket-test/optimizer/tests/unary-fixnum-nested.rkt | racket | #; | #<<END
TR opt: unary-fixnum-nested.rkt 2:0 (bitwise-not (bitwise-not (length (quote (1 2 3))))) -- unary fixnum
TR opt: unary-fixnum-nested.rkt 2:13 (bitwise-not (length (quote (1 2 3)))) -- unary fixnum
TR opt: unary-fixnum-nested.rkt 2:26 (length (quote (1 2 3))) -- known-length list length
END
#<<END
3
END
#lang ty... |
d50e50e0b52b1df734de4d2b97f0b99359d99121c261bbbb7e48c03dc0a84a7d | xapi-project/xen-api-libs-transitional | gzip.mli |
* 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-transitional/c77ad87cb6f34894f32ccf051e3bf0bc7c12ff45/gzip/gzip.mli | 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... | |
b296d8e3e0b467f39297c3db468c8dd1c9c91e5c8b31460e4f3d4bdff6006363 | anthontaylor/clj-sendgrid | core_test.clj | (ns sendgrid.core-test
(:require [clojure.test :refer :all]
[clj-http.client :as client]
[environ.core :refer [env]]
[clojure.java.io :as io]
[sendgrid.core :refer :all]))
(def params {:limit 1})
(def api-token (env :api-token))
(deftest test-environ
(is (= false (n... | null | https://raw.githubusercontent.com/anthontaylor/clj-sendgrid/ac291ada1356c606baf97d611c65727215711737/test/sendgrid/core_test.clj | clojure | (ns sendgrid.core-test
(:require [clojure.test :refer :all]
[clj-http.client :as client]
[environ.core :refer [env]]
[clojure.java.io :as io]
[sendgrid.core :refer :all]))
(def params {:limit 1})
(def api-token (env :api-token))
(deftest test-environ
(is (= false (n... | |
fbe7fe71eebdd3775ac0b6544dd46ae6a68da511632ce1149183ef3e5a38c204 | roddyyaga/ocoi | ppx_ocoi.ml | open Base
open Ppxlib
module Buildef = Ast_builder.Default
let is_id_field field =
match field with { pld_name = { txt = "id"; _ }; _ } -> true | _ -> false
let is_ocoi_deriver exp =
match exp with
| { pexp_desc = Pexp_ident { txt = Lident s; _ }; _ } -> (
match s with "ocoi" -> true | _ -> false )
| _ ... | null | https://raw.githubusercontent.com/roddyyaga/ocoi/0a07e9457add9890cb507ac8bb4e55044d86a640/ppx/ppx_ocoi.ml | ocaml | open Base
open Ppxlib
module Buildef = Ast_builder.Default
let is_id_field field =
match field with { pld_name = { txt = "id"; _ }; _ } -> true | _ -> false
let is_ocoi_deriver exp =
match exp with
| { pexp_desc = Pexp_ident { txt = Lident s; _ }; _ } -> (
match s with "ocoi" -> true | _ -> false )
| _ ... | |
3cd359b41672048f42c4fef404c19217d212bce2033d642cde2f729c04006721 | fogus/evalive | core.clj | by Fogus - Feb. 9 , 2011
;;
;; <>
Copyright ( c ) , 2010 . 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 COPYING the root of this
; distribution. By using this software in any fashion, you ar... | null | https://raw.githubusercontent.com/fogus/evalive/2fa735e6e35be834228ff3892752c50e409fb8b0/src/main/clojure/evalive/core.clj | clojure |
<>
Public License 1.0 (-1.0.php)
which can be found in the file COPYING 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.
# Public API
facilities. In a nutshell,
... | by Fogus - Feb. 9 , 2011
Copyright ( c ) , 2010 . All rights reserved . The use
and distribution terms for this software are covered by the Eclipse
(ns evalive.core
"Various eval functions and macros."
(:require [fogus.lexical.chocolate :as lexical]))
! [ evalive]( / logos / evalive.png " 0x14 eyes " ... |
8fbfe84c0c790977d14c89fe86de3e3790c26060c8bbad5f5aa7c31f816be815 | ecraven/r7rs-benchmarks | Larceny-postlude.scm | (define (this-scheme-implementation-name)
(string-append "larceny-" (implementation-version)))
| null | https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/cd6ea87a6fa7d20424449b5d08dcd5bf990f26e4/src/Larceny-postlude.scm | scheme | (define (this-scheme-implementation-name)
(string-append "larceny-" (implementation-version)))
| |
c537738cb97088252134b1a0b840a7f7dad71049cca58baf4a1ab8123c62a5d9 | uncomplicate/fluokitten | protocols.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php) or later
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be boun... | null | https://raw.githubusercontent.com/uncomplicate/fluokitten/65dc74881533a202871d9235c52db89c26c0d41d/src/uncomplicate/fluokitten/protocols.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php) or later
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not rem... | Copyright ( c ) . All rights reserved .
(ns ^{:doc "Defines Fluokitten protocols for various categorical concepts.
You need to use or require this namespace and provide your implementations
of these protocols if you want to extend Fluokitten with specific instances
of categorical concepts beyond those from Cloju... |
83743db897241b05b62345c4e7a56c4451f22e2d6a4bc0b9ca47b93685e2e85b | sysbio-bioinf/avatar | import_table_file.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
Eclipse Public License 2.0 ( -v20.html )
; which can be found in the file LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of ... | null | https://raw.githubusercontent.com/sysbio-bioinf/avatar/cbf9968485f96fb61725aaa7381dba53624d6189/src/clojure/avatar/ui/dialogs/import_table_file.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
combobox... | Copyright ( c ) . All rights reserved .
Eclipse Public License 2.0 ( -v20.html )
(ns avatar.ui.dialogs.import-table-file
(:require [avatar.util :as u]
[avatar.data.import :as imp]
[clj-jfx.core :as jfx]
[clj-jfx.properties :as props]
[clj-jfx.table :as table]
... |
e16763af0650fb60bc679096218491e4924997e7d392e14d67d100696056e7de | argp/bap | batOrd.ml | type order = Lt | Eq | Gt
type 'a comp = 'a -> 'a -> int
type 'a ord = 'a -> 'a -> order
module type Comp = sig
type t
val compare : t comp
end
module type Ord = sig
type t
val ord : t ord
end
let ord0 n =
if n < 0 then Lt
else if n > 0 then Gt
else Eq
let ord comp = fun a b -> ord0 (comp a b)
let p... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batOrd.ml | ocaml | eta-expand to avoid value restriction | type order = Lt | Eq | Gt
type 'a comp = 'a -> 'a -> int
type 'a ord = 'a -> 'a -> order
module type Comp = sig
type t
val compare : t comp
end
module type Ord = sig
type t
val ord : t ord
end
let ord0 n =
if n < 0 then Lt
else if n > 0 then Gt
else Eq
let ord comp = fun a b -> ord0 (comp a b)
let p... |
8e311f7032cba2eb1ef96d23658e4a637d70d56095968a5fbf21ae6285c067da | chovencorp/erlangzmq | erlangzmq_acceptance_req_test.erl | @copyright 2016 Choven Corp.
%%
This file is part of erlangzmq .
%%
erlangzmq is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) any later v... | null | https://raw.githubusercontent.com/chovencorp/erlangzmq/2be5c3b36dd78b010d1790a8f74ae2e823f5a424/test/erlangzmq_acceptance_req_test.erl | erlang |
(at your option) any later version.
erlangzmq is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
| @copyright 2016 Choven Corp.
This file is part of erlangzmq .
erlangzmq is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of ... |
b5c68db848752c341b24cae45a35b3da8373d225634ed5dfc9f880c58f03a20b | haskell-servant/servant-swagger | TypeLevel.hs | -- |
-- Module: Servant.Swagger.TypeLevel
License : BSD3
Maintainer : < >
-- Stability: experimental
--
-- Useful type families for servant APIs.
module Servant.Swagger.TypeLevel (
IsSubAPI,
EndpointsList,
BodyTypes,
) where
import Servant.Swagger.Internal.TypeLevel
| null | https://raw.githubusercontent.com/haskell-servant/servant-swagger/1909e44e965dca24cb1f5cee4b08c0781dfdbff6/src/Servant/Swagger/TypeLevel.hs | haskell | |
Module: Servant.Swagger.TypeLevel
Stability: experimental
Useful type families for servant APIs. | License : BSD3
Maintainer : < >
module Servant.Swagger.TypeLevel (
IsSubAPI,
EndpointsList,
BodyTypes,
) where
import Servant.Swagger.Internal.TypeLevel
|
8456110e01f8c62c13d5dd2a2c0898353405a9f13483369a6af097a1a9979298 | anwarmamat/cmsc330spring21 | basics.mli | val rev_tup : 'a * 'b * 'c -> 'c * 'b * 'a
val abs : int -> int
val area : int * int -> int * int -> int
val volume : int * int * int -> int * int * int -> int
val fibonacci : int -> int
val pow : int -> int -> int
val log : int -> int -> int
val is_prime : int -> bool
val next_prime : int -> int
val get : int -> 'a li... | null | https://raw.githubusercontent.com/anwarmamat/cmsc330spring21/071cb1aab3af77e7d103865d05f27f5c78bed6ef/project2a/src/basics.mli | ocaml | val rev_tup : 'a * 'b * 'c -> 'c * 'b * 'a
val abs : int -> int
val area : int * int -> int * int -> int
val volume : int * int * int -> int * int * int -> int
val fibonacci : int -> int
val pow : int -> int -> int
val log : int -> int -> int
val is_prime : int -> bool
val next_prime : int -> int
val get : int -> 'a li... | |
6f58492f9509143a60bacde4f63b71415fc68d31e7eb8900c937b74cf92b500c | braidchat/braid | transit.clj | (ns braid.lib.transit
(:require
[cognitect.transit :as transit])
(:import
(java.io ByteArrayOutputStream ByteArrayInputStream)
(com.cognitect.transit Writer)
(com.cognitect.transit.impl MsgpackEmitter WriteCache WriteHandlerMap)
(org.msgpack MessagePack)))
(defn fake-cache
[]
(proxy [Write... | null | https://raw.githubusercontent.com/braidchat/braid/2e44eb6e77f1d203115f9b9c529bd865fa3d7302/src/braid/lib/transit.clj | clojure | writer (transit/writer out :msgpack) | (ns braid.lib.transit
(:require
[cognitect.transit :as transit])
(:import
(java.io ByteArrayOutputStream ByteArrayInputStream)
(com.cognitect.transit Writer)
(com.cognitect.transit.impl MsgpackEmitter WriteCache WriteHandlerMap)
(org.msgpack MessagePack)))
(defn fake-cache
[]
(proxy [Write... |
d60f316b68cbac94386153ebe5d8309e8232be02b16fb7ab55961d33fff2824b | htm-community/comportex | excitation_breakdowns_test.cljc | (ns org.nfrac.comportex.excitation-breakdowns-test
(:require [org.nfrac.comportex.core :as cx]
[org.nfrac.comportex.layer :as layer]
[org.nfrac.comportex.layer.tools :as layertools]
[org.nfrac.comportex.encoders :as enc]
[org.nfrac.comportex.util :as util]
[... | null | https://raw.githubusercontent.com/htm-community/comportex/cd318492cf2e43cb7f25238b116b90b8195ec5aa/test/org/nfrac/comportex/excitation_breakdowns_test.cljc | clojure | (ns org.nfrac.comportex.excitation-breakdowns-test
(:require [org.nfrac.comportex.core :as cx]
[org.nfrac.comportex.layer :as layer]
[org.nfrac.comportex.layer.tools :as layertools]
[org.nfrac.comportex.encoders :as enc]
[org.nfrac.comportex.util :as util]
[... | |
aa6bad91d7ae323ee591ae1fc61b46f70f622b38796d257a2e7ef15dc65e776f | allison-casey/wavefunctioncollapse-clj | core.clj | (ns wavefunctioncollapse.core
(:require [clojure.spec.alpha :as s]
[clojure.walk :refer [stringify-keys]])
(:import (com.github.sjcasey21.wavefunctioncollapse
OverlappingModel
SimpleTiledModel)
(java.awt.image BufferedImage)))
(s/check-asserts true)
(s/def ::data #(i... | null | https://raw.githubusercontent.com/allison-casey/wavefunctioncollapse-clj/cd113e7c30bd99a11766d44c1ab6d592a1959084/src/wavefunctioncollapse/core.clj | clojure | (ns wavefunctioncollapse.core
(:require [clojure.spec.alpha :as s]
[clojure.walk :refer [stringify-keys]])
(:import (com.github.sjcasey21.wavefunctioncollapse
OverlappingModel
SimpleTiledModel)
(java.awt.image BufferedImage)))
(s/check-asserts true)
(s/def ::data #(i... | |
d5f53c557c48d26406715c734a99d52fe8492ad6b92ed4fc73e92bf6250caa6a | rbkmoney/cds | cds_card_v2_thrift_handler.erl | -module(cds_card_v2_thrift_handler).
-behaviour(woody_server_thrift_handler).
-include_lib("cds_proto/include/cds_proto_storage_thrift.hrl").
-include_lib("cds_proto/include/cds_proto_base_thrift.hrl").
%% woody_server_thrift_handler callbacks
-export([handle_function/4]).
%%
%% woody_server_thrift_handler callback... | null | https://raw.githubusercontent.com/rbkmoney/cds/6e6541c99d34b0633775f0c5304f5008e6b2aaf3/apps/cds/src/cds_card_v2_thrift_handler.erl | erlang | woody_server_thrift_handler callbacks
woody_server_thrift_handler callbacks
Internals
| -module(cds_card_v2_thrift_handler).
-behaviour(woody_server_thrift_handler).
-include_lib("cds_proto/include/cds_proto_storage_thrift.hrl").
-include_lib("cds_proto/include/cds_proto_base_thrift.hrl").
-export([handle_function/4]).
-spec handle_function(woody:func(), woody:args(), woody_context:ctx(), woody:optio... |
c4a48c141a3e3440d241af49e3297f9179cc57f3a69ef6d94aba0933490d1fd5 | debug-ito/net-spider | SpiderSpec.hs | module NetSpider.CLI.SpiderSpec (main,spec) where
import Data.Monoid (mempty)
import NetSpider.Spider.Config (Config(..), LogLevel(..))
import Test.Hspec
import NetSpider.CLI.Spider (parserSpiderConfig)
import NetSpider.CLI.TestCommon (runP)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "parserSpide... | null | https://raw.githubusercontent.com/debug-ito/net-spider/82dfbdca1add1edfd54ef36cb1ca5129d528b814/net-spider-cli/test/NetSpider/CLI/SpiderSpec.hs | haskell | module NetSpider.CLI.SpiderSpec (main,spec) where
import Data.Monoid (mempty)
import NetSpider.Spider.Config (Config(..), LogLevel(..))
import Test.Hspec
import NetSpider.CLI.Spider (parserSpiderConfig)
import NetSpider.CLI.TestCommon (runP)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "parserSpide... | |
e09eb003931c5c66b046a51fdcbb58c5bf0f8590cd2b8c37bb7a00d0894ea7ac | eugeneia/athens | non-cl.lisp | (in-package #:parenscript)
(in-readtable :parenscript)
PS operators and macros that are n't present in the Common Lisp
standard but exported by Parenscript , and their Common Lisp
;;; equivalent definitions
(defmacro define-trivial-special-ops (&rest mappings)
`(progn ,@(loop for (form-name js-primitive) on map... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/Parenscript-2.6/src/non-cl.lisp | lisp | equivalent definitions
maybe rename to slot-boundp?
objects
, ~]~ } . "
var
iteration
misc
(ps (foo (lisp bar))) is like (ps* `(foo ,bar))
When called from inside of ps*, lisp-form has access to the
dynamic environment only, analogous to eval. | (in-package #:parenscript)
(in-readtable :parenscript)
PS operators and macros that are n't present in the Common Lisp
standard but exported by Parenscript , and their Common Lisp
(defmacro define-trivial-special-ops (&rest mappings)
`(progn ,@(loop for (form-name js-primitive) on mappings by #'cddr collect
... |
d90494bf519db0f7034813a9c956f1b4afe35a85ce6e51150363d485a3c68f5a | agrison/raytraclj | core_test.clj | (ns me.grison.raytraclj.core-test
(:require [clojure.test :refer :all]
[me.grison.raytraclj.core :refer :all]))
| null | https://raw.githubusercontent.com/agrison/raytraclj/b2a43a2bca59773038e03b7b5005d775ef5a7715/test/me/grison/raytraclj/core_test.clj | clojure | (ns me.grison.raytraclj.core-test
(:require [clojure.test :refer :all]
[me.grison.raytraclj.core :refer :all]))
| |
99c505c636e76b67b83756fd5bc45de0b708942f07d8ba5e71abc0ef374041a0 | Octachron/codept | v.ml | open E
| null | https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/tests/complex/stops/v.ml | ocaml | open E
| |
7680fc680dbca8d2ab1808cd42789904391640c0ec941433c127ee8f6ce5703d | acieroid/scala-am | pcounter12.scm | (letrec ((counter 0)
(thread (lambda (n)
(letrec ((old counter)
(new (+ old 1)))
(if (cas counter old new)
#t
(thread n)))))
(t1 (fork (thread 1)))
(t2 (fork (thread 2)))
(t3 (fork (thread 3)))... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/threads/variations/pcounter12.scm | scheme | (letrec ((counter 0)
(thread (lambda (n)
(letrec ((old counter)
(new (+ old 1)))
(if (cas counter old new)
#t
(thread n)))))
(t1 (fork (thread 1)))
(t2 (fork (thread 2)))
(t3 (fork (thread 3)))... | |
b09713ab60ead04978cec9cb700d42f3f718073516b6035999178b353d3064c1 | qnikst/sample-site | Server.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module Sample.Server
( server
, run
) where
import qualified Network.Wai.Handler.Warp as Warp
import Network.Wai.Middleware.Prometheus
import Sample.Api
import Servant
import Servant.API.Extended
im... | null | https://raw.githubusercontent.com/qnikst/sample-site/b8b9410fe5377c6c507be86796c8d7bda030c723/sample-site/src/Sample/Server.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module Sample.Server
( server
, run
) where
import qualified Network.Wai.Handler.Warp as Warp
import Network.Wai.Middleware.Prometheus
import Sample.Api
import Servant
import Servant.API.Extended
import Servant.Swagger.UI
type API
... |
39c3b2253d8757243c4f7678110a7065000858c5cfc8fa369a006bc27e4dd28f | herd/herdtools7 | PPCBase.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b22ec02af1300a45e2b646cce4253ecd4fa7f250/lib/PPCBase.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
6a6144d5391346ec658fe4b4101f08cc9e52164c0696c69c11bc7ed897ebc4bd | gtk2hs/gtk2hs | GBMonad.hs | C->Haskell Compiler : monad for the binding generator
--
Author :
Derived : 18 February 2 ( extracted from GenBind.hs )
--
Version $ Revision : 1.1 $ from $ Date : 2004/11/21 21:05:41 $
--
Copyright ( c ) [ 2002 .. 2003 ]
--
-- This file is free software; you can redistribute it and/or modify
... | null | https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/tools/c2hs/gen/GBMonad.hs | haskell |
This file is free software; you can redistribute it and/or modify
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Pub... | C->Haskell Compiler : monad for the binding generator
Author :
Derived : 18 February 2 ( extracted from GenBind.hs )
Version $ Revision : 1.1 $ from $ Date : 2004/11/21 21:05:41 $
Copyright ( c ) [ 2002 .. 2003 ]
it under the terms of the GNU General Public License as published by
the Free ... |
561b7b1667d23e46fb8821a46d21ffaa272baa9c159a6cfc196930cd3c058cd8 | sgbj/MaximaSharp | pade.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/pade.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
not a true app... |
(in-package :maxima)
(macsyma-module pade)
(declare-top (special varlist genvar tlist tpf))
(load-macsyma-macros rzmac mhayat ratmac)
(defmacro red (p) `(cdr ,p))
(defmacro p0? (p) `(null ,p))
(defmacro e0? (expon) `(zerop (car ,expon)))
(defmacro epos? (expon) `(signp g (car ,expon)))
(defmacro eneg? (expon) ... |
22c8e2596390100eeba0bee0feb943be80da375e7172468071fd92c1e412e5e9 | WorksHub/client | subs.cljs | (ns wh.company.edit.subs
(:require [cljs-time.core :as t]
[cljs-time.format :as tf]
[clojure.set :refer [rename-keys]]
[clojure.spec.alpha :as s]
[clojure.string :as str]
[goog.string :as gstring]
[goog.string.format]
[re-frame.core :... | null | https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/company/edit/subs.cljs | clojure | (ns wh.company.edit.subs
(:require [cljs-time.core :as t]
[cljs-time.format :as tf]
[clojure.set :refer [rename-keys]]
[clojure.spec.alpha :as s]
[clojure.string :as str]
[goog.string :as gstring]
[goog.string.format]
[re-frame.core :... | |
459443dc78274ca8a6d4622c3d81a5cc23e38acdf4d1df810f537db69370d978 | metosin/reagent-dev-tools | styles.cljs | (ns reagent-dev-tools.styles
(:require-macros reagent-dev-tools.styles))
| null | https://raw.githubusercontent.com/metosin/reagent-dev-tools/050838a6f62d56cc5704269673b76062c6b94b8d/src/reagent_dev_tools/styles.cljs | clojure | (ns reagent-dev-tools.styles
(:require-macros reagent-dev-tools.styles))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.