_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 |
|---|---|---|---|---|---|---|---|---|
c8d502984d7d84342f29cf21b6a378664582353c365fba97ede397cf33a5e247 | discus-lang/ddc | Prim.hs |
module DDC.Llvm.Syntax.Prim
( Op (..)
, Cond (..), ICond (..), FCond (..)
, Conv (..))
where
-- | Binary arithmetic operators.
data Op
^ add two integers , floating point or vector values .
^ subtract two ...
| OpMul -- ^ multiply ..
| OpUDiv -- ^ unsigne... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core-llvm/DDC/Llvm/Syntax/Prim.hs | haskell | | Binary arithmetic operators.
^ multiply ..
^ unsigned integer or vector division.
^ signed integer ..
^ unsigned integer or vector remainder
^ signed ...
^ multiply ...
^ divide ...
^ remainder ...
^ Left shift.
^ Logical shift right
^ Arithmetic shift right.
The most significant bits of the result wil... |
module DDC.Llvm.Syntax.Prim
( Op (..)
, Cond (..), ICond (..), FCond (..)
, Conv (..))
where
data Op
^ add two integers , floating point or vector values .
^ subtract two ...
^ add two floating point or vector values .
^ subtract two ...
deriving (Eq, Show)
dat... |
af0bdd5c467cd21a84867c64a12ae57e33bef06d70fc3d9d3543f7656c27487e | haroldcarr/learn-haskell-coq-ml-etc | hw02.hs |
Created : 2014 Oct 26 ( Sun ) 09:22:44 by .
Last Modified : 2014 Oct 26 ( Sun ) 09:22:44 by .
Created : 2014 Oct 26 (Sun) 09:22:44 by Harold Carr.
Last Modified : 2014 Oct 26 (Sun) 09:22:44 by Harold Carr.
-}
import Prelude hiding ((||))
import Test.HUnit as T
i... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2014-10-edx-delft-fp101x-intro-to-fp-erik-meijer/hw02.hs | haskell | HOMEWORK 2
----------------------------------------------------------------------------
EXERCISE 0
No instance for ( Fractional Int ) arising from a use of ` / '
No instance for (Fractional Int) arising from a use of `/'
Could n't match expected type ` ( [ a ] , [ a ] ) '
Couldn't match expected type `... |
Created : 2014 Oct 26 ( Sun ) 09:22:44 by .
Last Modified : 2014 Oct 26 ( Sun ) 09:22:44 by .
Created : 2014 Oct 26 (Sun) 09:22:44 by Harold Carr.
Last Modified : 2014 Oct 26 (Sun) 09:22:44 by Harold Carr.
-}
import Prelude hiding ((||))
import Test.HUnit as T
i... |
09e15a16a50bfeab9cf6bf6e20120ca2e9fdff6110139e31822f0e0380dfb70c | ijvcms/chuanqi_dev | pt_ex.erl | %%%-------------------------------------------------------------------
@author zhengsiying
( C ) 2015 , < COMPANY >
%%% @doc
%%% 协议编解码扩展
%%% @end
Created : 25 . 三月 2015 20:31
%%%-------------------------------------------------------------------
-module(pt_ex).
-include("common.hrl").
-include("util_json.hrl")... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/system/pt/pt_ex.erl | erlang | -------------------------------------------------------------------
@doc
协议编解码扩展
@end
-------------------------------------------------------------------
API
====================================================================
API functions
====================================================================
-... | @author zhengsiying
( C ) 2015 , < COMPANY >
Created : 25 . 三月 2015 20:31
-module(pt_ex).
-include("common.hrl").
-include("util_json.hrl").
-include("proto_back.hrl").
-export([
read_cmd/1,
write_cmd/2
]).
read_cmd(Bin) ->
try
#back_req{cmd = Cmd, data = Data} = ?JSON_TO_RECORD(back_req, Bin),
{Cmd, r... |
e53b824cbf5025b4d124887515154aa9443c997e04fa34c0c375e784b13af554 | janestreet/ppx_here | ppx_here_lib.ml | type position = Lexing.position = {
pos_fname : string;
pos_lnum : int;
pos_bol : int;
pos_cnum : int;
}
| null | https://raw.githubusercontent.com/janestreet/ppx_here/3dc2a41c80950375582241d1c99ca383b4fbda44/runtime-lib/ppx_here_lib.ml | ocaml | type position = Lexing.position = {
pos_fname : string;
pos_lnum : int;
pos_bol : int;
pos_cnum : int;
}
| |
c263721746ea10f1187fced9a20a9ffb4b4e82d3a2ae95bcc863d3f4217f4ba9 | mbutterick/pollen | test-poly-output-path.rkt | #lang at-exp racket/base
(require rackunit racket/runtime-path pollen/render racket/file pollen/setup txexpr xml)
;; define-runtime-path only allowed at top level
(define-runtime-path poly-output-path-dir "data/poly-output-path")
(define-runtime-path pollen.rkt "data/poly-output-path/pollen.rkt")
(define-runtime-path ... | null | https://raw.githubusercontent.com/mbutterick/pollen/a4910a86dc62d1147f3aad94b56cecd6499d7aa6/pollen/test/test-poly-output-path.rkt | racket | define-runtime-path only allowed at top level
passing "text.txt" as argument should force use of `txt` rendering
passing poly source as argument should result in default (html) rendering | #lang at-exp racket/base
(require rackunit racket/runtime-path pollen/render racket/file pollen/setup txexpr xml)
(define-runtime-path poly-output-path-dir "data/poly-output-path")
(define-runtime-path pollen.rkt "data/poly-output-path/pollen.rkt")
(define-runtime-path test.poly.pm "data/poly-output-path/test.poly.pm"... |
7341ce68145a93df8c7ab865511a22c3ebcc47e6eb4b6942381f82e5e13fbcaf | StarGazerM/ppa-in-code | live-variable.rkt | ;; live variable analysis
;; For each program point, which variable may be live at the exit from the point
;; apparently, this can be used in dead code elimination
2020 Syracuse
#lang racket
(require "tiny-lang.rkt"
"flow.rkt")
(provide (all-defined-out))
;; left hand var will will kill a var
;; ki... | null | https://raw.githubusercontent.com/StarGazerM/ppa-in-code/0c04c50e64118a9468f24427bca11280775c9d74/dataflow/live-variable.rkt | racket | live variable analysis
For each program point, which variable may be live at the exit from the point
apparently, this can be used in dead code elimination
left hand var will will kill a var
kill-LV : Blocks* → P(Var*)
gen all varible in right
entry and exit
live-variable.rkt> (LV-chaos example2-11)
(hash
(s... |
2020 Syracuse
#lang racket
(require "tiny-lang.rkt"
"flow.rkt")
(provide (all-defined-out))
(define (kill-LV b)
(match b
[`(,label = ,(? variable? x) ,(? aexpr? a)) (set x)]
[`(,label ,(? bexpr? b)) (set)]
[`(,label SKIP) (set)]))
gen - LV : Blocks * → P(Var * )
(define (gen-LV b)
... |
78e0372689429dc8bd021eaaa66bdff2a7a772f0187b7419d7d99c4ce16f9991 | cbiffle/ruckus | part-b.rkt | #lang ruckus
This is one of the two parts in the multi - file design .
; Expose part-b to the rest of the design (it is not merely internal).
(provide part-b)
(define (part-b size)
(sphere size))
| null | https://raw.githubusercontent.com/cbiffle/ruckus/62cd4a00837783a88a007c2d5979909a4e86ca0f/ex/multi/part-b.rkt | racket | Expose part-b to the rest of the design (it is not merely internal). | #lang ruckus
This is one of the two parts in the multi - file design .
(provide part-b)
(define (part-b size)
(sphere size))
|
a96d679b945632ddf971c2f999eb1004b55192005fa27980ff93a9599e7add52 | futurice/haskell-mega-repo | Validation.hs | # LANGUAGE DataKinds #
# LANGUAGE DerivingVia #
# LANGUAGE DeriveGeneric #
# LANGUAGE InstanceSigs #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/fa6013588932e68098f67894fe63182d19c1e165/personio-client/src/Personio/Types/Validation.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
| SEPensionInvalid Scientific
| All fields except 'evMessages' are to help connect the data.
| Validate collection of employees.
otherwise, everything seems to be ok.
TODO?
, attributeMissing "gender" GenderMissing
, att... | # LANGUAGE DataKinds #
# LANGUAGE DerivingVia #
# LANGUAGE DeriveGeneric #
# LANGUAGE InstanceSigs #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
module Personio.Types.Validation where
import Control.Monad.Writer (WriterT, execWriterT)
impor... |
a76d6da074bafde604c7aa0a0dc4bba34ac6c568a4b6350befb22f0d190e1053 | triffon/fp-2021-22 | 10.maximum-digit-sum.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
(require "common.03.rkt")
# # # Зад 10
Най - голямата сума на цифрите на цяло число от интервала [ a , b ] .
(define (max x y)
'тук)
(define (maximum-digit-sum a b)
'тук)
(run-tests
(test-suite "maximum-digit-sum tests"
(check = (maximum-digit... | null | https://raw.githubusercontent.com/triffon/fp-2021-22/b6b30cb50c09512956f66cec6a63bace2b82c3bc/exercises/6/03-higher-order--accumulate/10.maximum-digit-sum.rkt | racket | #lang racket
(require rackunit)
(require rackunit/text-ui)
(require "common.03.rkt")
# # # Зад 10
Най - голямата сума на цифрите на цяло число от интервала [ a , b ] .
(define (max x y)
'тук)
(define (maximum-digit-sum a b)
'тук)
(run-tests
(test-suite "maximum-digit-sum tests"
(check = (maximum-digit... | |
9de4ff784b6872813249e5d9c0e4fd26511ff1148b019478a3cec809f83b5424 | ghc/packages-Cabal | cabal.test.hs | import Test.Cabal.Prelude
main = cabalTest $ do
withSourceCopy . withDelay $ do
copySourceFileTo "q/q-broken.cabal.in" "q/q.cabal"
fails $ cabal "v2-build" ["q"]
delay
copySourceFileTo "q/q-fixed.cabal.in" "q/q.cabal"
cabal "v2-build" ["q"]
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/NewBuild/MonitorCabalFiles/cabal.test.hs | haskell | import Test.Cabal.Prelude
main = cabalTest $ do
withSourceCopy . withDelay $ do
copySourceFileTo "q/q-broken.cabal.in" "q/q.cabal"
fails $ cabal "v2-build" ["q"]
delay
copySourceFileTo "q/q-fixed.cabal.in" "q/q.cabal"
cabal "v2-build" ["q"]
| |
a3abf91764d1b3a32c98fa40933cfa55aa96584c65bc61be542983edd1ce2d0d | nasa/Common-Metadata-Repository | data.clj | (ns cmr.nlp.tests.data
(:require
[cmr.nlp.core :as nlp]))
(def spatio-temporal-sentence-1
"What was the average surface temperature of Lake Superior last week?")
(def spatio-temporal-tokens-1
(nlp/tokenize spatio-temporal-sentence-1))
(def spatio-temporal-sentence-2
"What was the average annual snowfall ... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/nlp/test/cmr/nlp/tests/data.clj | clojure | (ns cmr.nlp.tests.data
(:require
[cmr.nlp.core :as nlp]))
(def spatio-temporal-sentence-1
"What was the average surface temperature of Lake Superior last week?")
(def spatio-temporal-tokens-1
(nlp/tokenize spatio-temporal-sentence-1))
(def spatio-temporal-sentence-2
"What was the average annual snowfall ... | |
012631e06c7b2281fbde3a1f24a328073f526425dc5d5342d0ef335a09a9fdfe | huangz1990/SICP-answers | 83-install-complex-package.scm | 83-install-complex-package.scm
(load "p123-put-and-get.scm")
(load "p119-attach-tag-and-type-tag-and-contents.scm")
(define (install-complex-package)
(define (tag x)
(attach-tag 'complex x))
(put 'make 'complex
(lambda (x y)
(tag (make-rectangular x y))))
'done)
(define (... | null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/old_chp2/code/83-install-complex-package.scm | scheme | 83-install-complex-package.scm
(load "p123-put-and-get.scm")
(load "p119-attach-tag-and-type-tag-and-contents.scm")
(define (install-complex-package)
(define (tag x)
(attach-tag 'complex x))
(put 'make 'complex
(lambda (x y)
(tag (make-rectangular x y))))
'done)
(define (... | |
f7fa251bac3d9b8943a92b686b1e66e4513032347cd116495f40916f1a36c85b | TiltMeSenpai/Discord.hs | Framework.hs | | Provides a convenience framework for writing Discord bots without dealing with Pipes
module Network.Discord.Framework where
import Control.Concurrent
import Control.Monad.Writer
import Data.Proxy
import Control.Concurrent.STM
import Control.Monad.State (get)
import Data.Aeson (Object)
import Pipes ((... | null | https://raw.githubusercontent.com/TiltMeSenpai/Discord.hs/91f688f03813982bbf7c37d048bd7bcc08671d8e/src/Network/Discord/Framework.hs | haskell | | Isolated state representation for use with async event handling
| Basic client implementation. Most likely suitable for most bots.
| A variant of 'runBot' which allows the user to specify a custom client implementation.
| Utility function to split event handlers into a seperate thread
| Monad to compose event ha... | | Provides a convenience framework for writing Discord bots without dealing with Pipes
module Network.Discord.Framework where
import Control.Concurrent
import Control.Monad.Writer
import Data.Proxy
import Control.Concurrent.STM
import Control.Monad.State (get)
import Data.Aeson (Object)
import Pipes ((... |
2f09f0484c336f8b6b547ff7a8bb1bc8d43136b677b8cec7bfe9f5135340d01e | gregr/ina | vector.scm | (define (list->vector x*) (apply vector x*))
(define (vector->list x)
(let ((len (vector-length x)))
(let loop ((i 0))
(cond ((= i len) '())
(else (cons (vector-ref x i) (loop (+ i 1))))))))
(define (vector-append . x*) (list->vector (apply append (map vector->list x*))))
(define (vector... | null | https://raw.githubusercontent.com/gregr/ina/8f73d50c516da3d6d54218be53b2436a7d59ad7d/nscheme/include/base/vector.scm | scheme | (define (list->vector x*) (apply vector x*))
(define (vector->list x)
(let ((len (vector-length x)))
(let loop ((i 0))
(cond ((= i len) '())
(else (cons (vector-ref x i) (loop (+ i 1))))))))
(define (vector-append . x*) (list->vector (apply append (map vector->list x*))))
(define (vector... | |
239b8d7bab65381da33c3ddc2590130460a7f21295e67e41904364533dc7a952 | yesodweb/wai | ReadIntSpec.hs | module ReadIntSpec (main, spec) where
import Data.ByteString (ByteString)
import Test.Hspec
import Network.Wai.Handler.Warp.ReadInt
import qualified Data.ByteString.Char8 as B
import qualified Test.QuickCheck as QC
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "readInt64" $ do
it "converts ByteStr... | null | https://raw.githubusercontent.com/yesodweb/wai/f59e577f865d017b4726826ac5586bb916cf315b/warp/test/ReadIntSpec.hs | haskell | A QuickCheck property. Test that for a number >= 0, converting it to
a string using show and then reading the value back with the function
under test returns the original value.
field in a HTTP header is always >= 0) so we check the absolute value of | module ReadIntSpec (main, spec) where
import Data.ByteString (ByteString)
import Test.Hspec
import Network.Wai.Handler.Warp.ReadInt
import qualified Data.ByteString.Char8 as B
import qualified Test.QuickCheck as QC
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "readInt64" $ do
it "converts ByteStr... |
7c26e71dd3d09b1b953e24a07f69b10c5a4442010bdf00610183bbbaa5ce92e9 | gator1/jepsen | cockroach.clj | (ns jepsen.cockroach
"Tests for CockroachDB"
(:require [clojure.tools.logging :refer :all]
[clojure.java.jdbc :as j]
[clojure.core.reducers :as r]
[clojure.java.io :as io]
[clojure.java.shell :refer [sh]]
[clojure.string :as str]
[clojure.pprin... | null | https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/cockroachdb/src/jepsen/cockroach.clj | clojure | number of simultaneous clients
Give it time to join
Restart cluster to work around balancing bug
Give it time to join
Common test definitions ;;;;;;;;;;;;;;;;;;;;;;;;;;;
Final client | (ns jepsen.cockroach
"Tests for CockroachDB"
(:require [clojure.tools.logging :refer :all]
[clojure.java.jdbc :as j]
[clojure.core.reducers :as r]
[clojure.java.io :as io]
[clojure.java.shell :refer [sh]]
[clojure.string :as str]
[clojure.pprin... |
9323469c1a521fab37442db50f72c17d15e0dcd5e710c29d75f535409d6a5649 | illiichi/orenolisp | flow_layout_test.clj | (ns view.flow-layout-test
(:require [clojure.test :refer [deftest testing is] :as t]
[orenolisp.view.layout.layout :as l]
[orenolisp.view.layout.flow-layout :as fl]))
(defn- arrange-lines [lines]
(->> lines
(map :elements)
(sort-by :x)
(map keys)))
(def elements [["... | null | https://raw.githubusercontent.com/illiichi/orenolisp/7b085fb687dbe16b5cbe8c739238bbaf79156814/test/view/flow_layout_test.clj | clojure | (ns view.flow-layout-test
(:require [clojure.test :refer [deftest testing is] :as t]
[orenolisp.view.layout.layout :as l]
[orenolisp.view.layout.flow-layout :as fl]))
(defn- arrange-lines [lines]
(->> lines
(map :elements)
(sort-by :x)
(map keys)))
(def elements [["... | |
f3d6d168f7528d8ee40b4f3a00a9281d8d48e47e0bac70e7325ac9b8608b74c8 | konsumlamm/rrb-vector | Arbitrary.hs | # LANGUAGE FlexibleInstances #
module Arbitrary where
import Control.Applicative (liftA2)
import Data.Foldable (toList)
import Test.Tasty.QuickCheck
import qualified Data.RRBVector as V
import Data.RRBVector.Internal.Debug
builders :: [[a] -> V.Vector a]
builders = [V.fromList, fromListUnbalanced]
instance (Arbit... | null | https://raw.githubusercontent.com/konsumlamm/rrb-vector/599b894ebb5e85e02261fa0b6d984e023ae87253/test/Arbitrary.hs | haskell | TODO: improve instance
# OVERLAPPING # | # LANGUAGE FlexibleInstances #
module Arbitrary where
import Control.Applicative (liftA2)
import Data.Foldable (toList)
import Test.Tasty.QuickCheck
import qualified Data.RRBVector as V
import Data.RRBVector.Internal.Debug
builders :: [[a] -> V.Vector a]
builders = [V.fromList, fromListUnbalanced]
instance (Arbit... |
b6c2fed18e6db52fd3436397816668bdc43186085b143a4eb118e1646276577d | xh4/web-toolkit | filesystem.lisp | ;;;; -------------------------------------------------------------------------
;;;; Portability layer around Common Lisp filesystem access
(uiop/package:define-package :uiop/filesystem
(:use :uiop/common-lisp :uiop/package :uiop/utility :uiop/os :uiop/pathname)
(:export
Native namestrings
#:native-namestring ... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/uiop-3.3.3/filesystem.lisp | lisp | -------------------------------------------------------------------------
Portability layer around Common Lisp filesystem access
Probing the filesystem
Resolving symlinks somewhat
Environment pathnames
Simple filesystem operations
Probing the filesystem
this is here because trying to find the truename of a dire... |
(uiop/package:define-package :uiop/filesystem
(:use :uiop/common-lisp :uiop/package :uiop/utility :uiop/os :uiop/pathname)
(:export
Native namestrings
#:native-namestring #:parse-native-namestring
#:truename* #:safe-file-write-date #:probe-file* #:directory-exists-p #:file-exists-p
#:directory* #:filter... |
93ab06b63ffddbfbbf54fbf5637f96866c9e1e901dada184ad4a5f1392b45fd2 | mzp/scheme-abc | cmdOpt.ml | open Base
open OptParse
type output_type =
Ho | Abc | Swf
type scm = {
scm_cmd: string;
includes: string;
link_std: bool
}
type link = {
link_cmd: string;
size: int * int;
bg_color: Color.t;
libs: string list;
use_network: bool;
}
type general = {
verbose: bool;
just_print: bool;
keep_... | null | https://raw.githubusercontent.com/mzp/scheme-abc/2cb541159bcc32ae4d033793dea6e6828566d503/driver/cmdOpt.ml | ocaml | convert pixel to twips | open Base
open OptParse
type output_type =
Ho | Abc | Swf
type scm = {
scm_cmd: string;
includes: string;
link_std: bool
}
type link = {
link_cmd: string;
size: int * int;
bg_color: Color.t;
libs: string list;
use_network: bool;
}
type general = {
verbose: bool;
just_print: bool;
keep_... |
a2b6cacc2642d347919d161e7e61ea990a005e323d78b686361088234723b075 | DaMSL/K3 | RemoveROBinds.hs | # LANGUAGE ViewPatterns #
# LANGUAGE TupleSections #
-- Remove read only binds from the code
module Language.K3.Transform.RemoveROBinds (
transform
) where
import Control.Monad.Identity
import Data.Tree
import qualified Data.Map as Map
import Data.Map(Map)
import qualified Data.Set as Set
import Data.Set(Set)
impor... | null | https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Transform/RemoveROBinds.hs | haskell | Remove read only binds from the code
Entry point for the module
Transform all functions and triggers:
Stage 1
Annotate read-only binds in the tree
Accumulate the tags that have a write (assignment) bottom-up
Remove ids as we encounter binds.
Lets, cases and lambdas don't support assign anyway so ignore them
un... | # LANGUAGE ViewPatterns #
# LANGUAGE TupleSections #
module Language.K3.Transform.RemoveROBinds (
transform
) where
import Control.Monad.Identity
import Data.Tree
import qualified Data.Map as Map
import Data.Map(Map)
import qualified Data.Set as Set
import Data.Set(Set)
import Data.Maybe(isJust, fromMaybe)
import C... |
25fbb047261de8d3d948447516c076cd6669a96debc8867852c6f467bf79c459 | RutledgePaulV/piped | utils_test.clj | (ns piped.utils-test
(:require [piped.utils :refer :all]
[clojure.core.async :as async]
[clojure.test :refer :all]))
(deftest deadline-batching-test
(let [received (atom [])
msg1 (with-meta {:data 1} {:deadline (async/timeout 3500)})
msg2 (with-meta {:data 2} {:deadl... | null | https://raw.githubusercontent.com/RutledgePaulV/piped/1e5f756b1b36af149082f2a9c96a4dd2c35c83ec/test/piped/utils_test.clj | clojure | (ns piped.utils-test
(:require [piped.utils :refer :all]
[clojure.core.async :as async]
[clojure.test :refer :all]))
(deftest deadline-batching-test
(let [received (atom [])
msg1 (with-meta {:data 1} {:deadline (async/timeout 3500)})
msg2 (with-meta {:data 2} {:deadl... | |
a2980b67eb5e8bbd272021472ef7011fa14925c6a5cf96a37ba5f25a791a65ca | kindista/kindista | feedback-reply-notification.lisp | Copyright 2017 CommonGoods Network , Inc.
;;;
This file is part of Kindista .
;;;
Kindista 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 optio... | null | https://raw.githubusercontent.com/kindista/kindista/60da1325e628841721200aa00e4de5f9687c0adb/src/email/feedback-reply-notification.lisp | lisp |
(at your option) any later version.
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
License for more details.
| Copyright 2017 CommonGoods Network , Inc.
This file is part of Kindista .
Kindista 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
Kindista is distributed ... |
4e235bfe9b086aabb593c483f9af2b9add9959c9937f509d35fc37469f9ebe25 | hedgehogqa/haskell-hedgehog-classes | Alternative.hs | {-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE QuantifiedConstraints #
{-# LANGUAGE RankNTypes #-}
module Hedgehog.Classes.Alternative (alternativeLaws) where
import Control.Applicative (Alternative(..))
import Hedgehog
import Hedgehog.Classes.Common
-- | Tests the following 'Alternative' laws:
--
--... | null | https://raw.githubusercontent.com/hedgehogqa/haskell-hedgehog-classes/4d97b000e915de8ba590818f551bce7bd862e7d4/src/Hedgehog/Classes/Alternative.hs | haskell | # LANGUAGE ScopedTypeVariables #
# LANGUAGE RankNTypes #
| Tests the following 'Alternative' laws:
[__Left Identity__]: @'empty' '<|>' a@ ≡ @a@
[__Right Identity__]: @a '<|>' 'empty'@ ≡ @a@ | # LANGUAGE QuantifiedConstraints #
module Hedgehog.Classes.Alternative (alternativeLaws) where
import Control.Applicative (Alternative(..))
import Hedgehog
import Hedgehog.Classes.Common
[ _ _ Associativity _ _ ] : @a ' < | > ' ( b ' < | > ' ≡ @(a ' < | > ' b ) ' < | > ' c@
alternativeLaws ::
( Alternative f
... |
5068f359682dd40cfdad7253883f5d038f8062191723706adab372c393b9edf2 | camlp5/camlp5 | eprinter.ml | (* camlp5r *)
(* eprinter.ml,v *)
Copyright ( c ) INRIA 2007 - 2017
(* #load "pa_macro.cmo" *)
type 'a t =
{ pr_name : string;
pr_fail : 'a -> string;
mutable pr_fun : string -> 'a pr_fun;
mutable pr_levels : 'a pr_level list }
and 'a pr_level = { pr_label : string; mutable pr_rules : 'a pr_rule }
and... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_src/lib/eprinter.ml | ocaml | camlp5r
eprinter.ml,v
#load "pa_macro.cmo" | Copyright ( c ) INRIA 2007 - 2017
type 'a t =
{ pr_name : string;
pr_fail : 'a -> string;
mutable pr_fun : string -> 'a pr_fun;
mutable pr_levels : 'a pr_level list }
and 'a pr_level = { pr_label : string; mutable pr_rules : 'a pr_rule }
and 'a pr_rule =
('a, 'a pr_fun -> 'a pr_fun -> 'a pr_fun -> (... |
65a8c7b1b01a31b9f341189c2f54047234550ac32695fa0149f467fea3a3d851 | goldfirere/cs380 | ClassOrdList.hs | # LANGUAGE GADTs , TypeInType , TypeOperators , StandaloneDeriving ,
ScopedTypeVariables , TypeFamilies , AllowAmbiguousTypes #
ScopedTypeVariables, TypeFamilies, AllowAmbiguousTypes #-}
module ClassOrdList where
import Data.Kind ( Type )
import Data.Type.Equality
data Nat where
Zero ::... | null | https://raw.githubusercontent.com/goldfirere/cs380/a9e2d2e610eb4e9e082cef0559b6e29a6d82a253/21_practical/ClassOrdList.hs | haskell | ExOrdList = Ex OrdList | # LANGUAGE GADTs , TypeInType , TypeOperators , StandaloneDeriving ,
ScopedTypeVariables , TypeFamilies , AllowAmbiguousTypes #
ScopedTypeVariables, TypeFamilies, AllowAmbiguousTypes #-}
module ClassOrdList where
import Data.Kind ( Type )
import Data.Type.Equality
data Nat where
Zero ::... |
5af65ce2feee6358ada164da668a2083cfd74b2f32d4f5a90ba10700c01b60a0 | cffi/cffi | cffi-allegro.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
cffi-allegro.lisp --- CFFI - SYS implementation for Allegro CL .
;;;
Copyright ( C ) 2005 - 2009 , loliveira(@)common - lisp.net >
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documenta... | null | https://raw.githubusercontent.com/cffi/cffi/8629618e9bb0dfc750d01fc4990404c78ab41705/src/cffi-allegro.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to... | cffi-allegro.lisp --- CFFI - SYS implementation for Allegro CL .
Copyright ( C ) 2005 - 2009 , loliveira(@)common - lisp.net >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the ... |
fd2d92c9fe44c5834b024c4bb896bb1886da62824f80959231003c98a76d6a39 | amosr/folderol | test.hs | # LANGUAGE NoImplicitPrelude #
import qualified Test.Folderol.Kernel
import qualified Test.Folderol.MaximumProcessCount
import qualified Test.Folderol.Spawn
import qualified Test.Folderol.TradeExample
import System.IO
import System.Exit
import P
main :: IO ()
main = do
hSetBuffering stdout LineBuffering
hSetBuf... | null | https://raw.githubusercontent.com/amosr/folderol/9b8c0cd30cfb798dadaa404cc66404765b1fc4fe/test/test.hs | haskell | # LANGUAGE NoImplicitPrelude #
import qualified Test.Folderol.Kernel
import qualified Test.Folderol.MaximumProcessCount
import qualified Test.Folderol.Spawn
import qualified Test.Folderol.TradeExample
import System.IO
import System.Exit
import P
main :: IO ()
main = do
hSetBuffering stdout LineBuffering
hSetBuf... | |
4271dd597f7b040ec3db726fe39b59f99fbb05a2c4d70390340d9a66ec9a93cf | clj-easy/graalvm-clojure | main.clj | (ns simple.main
(:require [org.httpkit.server :as server]
[org.httpkit.client :as client])
(:gen-class))
(defn handler
[_]
{:status 200
:headers {"Content-Type" "text/html"}
:body "Hello GraalVM"})
(defn -main
"I don't do a whole lot ... yet."
[& args]
(println "server started on: :30... | null | https://raw.githubusercontent.com/clj-easy/graalvm-clojure/5de155ad4f95d5dac97aac1ab3d118400e7d186f/http-kit/src/simple/main.clj | clojure | (ns simple.main
(:require [org.httpkit.server :as server]
[org.httpkit.client :as client])
(:gen-class))
(defn handler
[_]
{:status 200
:headers {"Content-Type" "text/html"}
:body "Hello GraalVM"})
(defn -main
"I don't do a whole lot ... yet."
[& args]
(println "server started on: :30... | |
50f778529dab71dea8a73bbb3c727f3ba1d86b96225e8d74acee56e044240cf2 | tiancaiamao/yasfs | fronter.scm | (define *env* '())
(define env-init-compiletime '())
(define env-global-compiletime '())
(define env-global-runtime (make-vector 200 '()))
(define (init-core-form)
(define (add-syntax name)
(let ((value `(,name predefined syntax . ,name)))
(set! env-init-compiletime (cons value env-init-compiletime))))
(... | null | https://raw.githubusercontent.com/tiancaiamao/yasfs/c138b7bf9a16ee70b90e5d18bdd45c60cd8e2f44/fronter.scm | scheme | 函数调用规则:由调用者准备好参数。由被调函数切换环境绑定。由调用者恢复环境
((define) (compile-define other))))
((and (pair? op) (eq? (car op) 'lambda))
(compile-closed-application op arg env tail?)) | (define *env* '())
(define env-init-compiletime '())
(define env-global-compiletime '())
(define env-global-runtime (make-vector 200 '()))
(define (init-core-form)
(define (add-syntax name)
(let ((value `(,name predefined syntax . ,name)))
(set! env-init-compiletime (cons value env-init-compiletime))))
(... |
a00b35883369b5a629ca2f8bce4a1f1a738aa89309464d49662b4d7c24634ab0 | mitchellwrosen/dohaskell | User.hs | module Handler.User where
import Import
import Handler.Utils (denyPermissionIfDifferentUser)
import Model.List
import Model.ResourceEdit (fetchNumRequestedEditsDB)
import Model.User
import Model.Utils
import View.Browse
import View.User
impor... | null | https://raw.githubusercontent.com/mitchellwrosen/dohaskell/69aea7a42112557ac3e835b9dbdb9bf60a81f780/src/Handler/User.hs | haskell | bogus val, not used in html | module Handler.User where
import Import
import Handler.Utils (denyPermissionIfDifferentUser)
import Model.List
import Model.ResourceEdit (fetchNumRequestedEditsDB)
import Model.User
import Model.Utils
import View.Browse
import View.User
impor... |
62eea558ead8a3ea93f7e059deba6b61fc290fe83526d722c9bd7f28d0c78fa3 | bos/rwh | divby6.hs | {-- snippet all --}
divBy :: Integral a => a -> [a] -> Either String [a]
divBy _ [] = Right []
divBy _ (0:_) = Left "divBy: division by 0"
divBy numerator (denom:xs) =
case divBy numerator xs of
Left x -> Left x
Right results -> Right ((numerator `div` denom) : results)
{-- /snippet all --}
| null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch19/divby6.hs | haskell | - snippet all -
- /snippet all - | divBy :: Integral a => a -> [a] -> Either String [a]
divBy _ [] = Right []
divBy _ (0:_) = Left "divBy: division by 0"
divBy numerator (denom:xs) =
case divBy numerator xs of
Left x -> Left x
Right results -> Right ((numerator `div` denom) : results)
|
e10c08a8513d8d715b9dc2b6c24e1f3101273b8324a97a1f6cb861ce81b5f275 | jnoll/gantt | FormatPGF.hs | -- following for 'here' docs
# LANGUAGE QuasiQuotes #
module FormatPGF (formatPGF) where
import Parse
import DateRange
import Control.Monad.Reader
import Data.List (intercalate)
import Data.Time.Calendar (toGregorian)
import Data.String.Here (i)
import Data.Time.Calendar.WeekDate (toWeekDate)
import Data.Time.Format (... | null | https://raw.githubusercontent.com/jnoll/gantt/e7099e1786177580526d8da43d62e0182f00e681/FormatPGF.hs | haskell | following for 'here' docs
both in range
new out of range
new in range
both out of range
This is a hack to get different color diamonds.
actual chart elements
$ (ST.setAttribute "vgrid" $ formatGrid g)
$ (ST.setAttribute "numPeriods" $ runReader (calcPeriods $ windowDur g) g)
end ... | # LANGUAGE QuasiQuotes #
module FormatPGF (formatPGF) where
import Parse
import DateRange
import Control.Monad.Reader
import Data.List (intercalate)
import Data.Time.Calendar (toGregorian)
import Data.String.Here (i)
import Data.Time.Calendar.WeekDate (toWeekDate)
import Data.Time.Format (formatTime)
import Data.Time.... |
ea5482bb897f7bdf27fafb10488b07ee14ee58e41257c099dd6dc747ca56ac69 | shentufoundation/deepsea | Gen9.mli | open AST
open Ascii
open Cop
open Datatypes
open Globalenvs
open Integers
open Language
open List0
open LowValues
open Maps0
open Monad
open OptErrMonad
open Options
open Semantics3
open StackEnv
open StmtExpressionless
open String0
open Zpower
val methodical_fundefs : coq_function PTree.t -> code
val methodical_opt_... | null | https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/backend/extraction/Gen9.mli | ocaml | open AST
open Ascii
open Cop
open Datatypes
open Globalenvs
open Integers
open Language
open List0
open LowValues
open Maps0
open Monad
open OptErrMonad
open Options
open Semantics3
open StackEnv
open StmtExpressionless
open String0
open Zpower
val methodical_fundefs : coq_function PTree.t -> code
val methodical_opt_... | |
7c3a660c059c067e1abf4497c63f9eac9ddce10260e0e3f03a780677c7ecdff3 | lem-project/lem | sexp-command.lisp | (in-package :lem)
(define-command (forward-sexp (:advice-classes movable-advice)) (&optional (n 1) no-errors) ("p")
(with-point ((prev (current-point)))
(let ((point (form-offset (current-point) n)))
(or point
(progn
(move-point (current-point) prev)
(if no-errors
... | null | https://raw.githubusercontent.com/lem-project/lem/35189dc6d9008cf43568df124d85bc3c61fb85af/src/sexp-command.lisp | lisp | (in-package :lem)
(define-command (forward-sexp (:advice-classes movable-advice)) (&optional (n 1) no-errors) ("p")
(with-point ((prev (current-point)))
(let ((point (form-offset (current-point) n)))
(or point
(progn
(move-point (current-point) prev)
(if no-errors
... | |
3e868de030e934d300499851d278bd72b0fe08f2fcbba8db62752c466d6122a0 | orbitz/ocaml-riakc | request.ml | open Core.Std
module B = Protobuf.Builder
let wrap_request mc s =
Add 1 for the mc
let l = String.length s + 1 in
let preamble_mc = String.create 5 in
preamble_mc.[0] <- Char.of_int_exn ((l lsr 24) land 0xff);
preamble_mc.[1] <- Char.of_int_exn ((l lsr 16) land 0xff);
preamble_mc.[2] <- Char.of_int_exn ((... | null | https://raw.githubusercontent.com/orbitz/ocaml-riakc/507241edbdb26d65961e5a90d69c219b2674db9d/src/lib/request.ml | ocaml | open Core.Std
module B = Protobuf.Builder
let wrap_request mc s =
Add 1 for the mc
let l = String.length s + 1 in
let preamble_mc = String.create 5 in
preamble_mc.[0] <- Char.of_int_exn ((l lsr 24) land 0xff);
preamble_mc.[1] <- Char.of_int_exn ((l lsr 16) land 0xff);
preamble_mc.[2] <- Char.of_int_exn ((... | |
eacb64248dde5127349e274647a64fb95cc71a7b9ffc00add6947fe8b91895fd | TaylanUB/scheme-bytestructures | string.scm | string.scm --- Strings in encodings supported by ( ) .
Copyright © 2017 < >
;; 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) ... | null | https://raw.githubusercontent.com/TaylanUB/scheme-bytestructures/50697c55129be90cce6df1adf02228c4d4c42b0e/bytestructures/body/string.scm | scheme | 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. See the
GNU General Public L... | string.scm --- Strings in encodings supported by ( ) .
Copyright © 2017 < >
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
supported by ( )... |
4093bef968543bf7af38358ea13970734ba0d2775ca12668ad6d291462e3ed00 | HeinrichApfelmus/reactive-banana | Tidings.hs | {-----------------------------------------------------------------------------
reactive-banana
------------------------------------------------------------------------------}
module Tidings (
-- * Synopsis
-- The 'Tidings' data type for composing user events.
--
-- See <-frp-three-principles-bidirec... | null | https://raw.githubusercontent.com/HeinrichApfelmus/reactive-banana/79482f3e9bfab493e2d2197f70cdb11787b33a03/reactive-banana-wx/src/Tidings.hs | haskell | ----------------------------------------------------------------------------
reactive-banana
-----------------------------------------------------------------------------
* Synopsis
The 'Tidings' data type for composing user events.
See <-frp-three-principles-bidirectional-gui.html>
for more information.
* Do... | module Tidings (
Tidings, tidings, facts, rumors,
) where
import Reactive.Banana.Combinators
data Tidings a = T { facts :: Behavior a, rumors :: Event a }
tidings :: Behavior a -> Event a -> Tidings a
tidings b e = T b e
instance Functor Tidings where
fmap f (T b e) = T (fmap f b) (fmap f e)
insta... |
93a652fbed9bebd68525337a8bcf07d8c73532b666d02bb2bc07477c78d4c54a | lisp/de.setf.resource | vocabulary.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*-
(common-lisp:in-package :common-lisp-user)
(common-lisp:defpackage "#"
(:use)
(:export
"ContactLocation"
"Person"
)
(:documentation nil))
(common-lisp:in-package "#")
(rdfs:defvocabulary "contac... | null | https://raw.githubusercontent.com/lisp/de.setf.resource/27bf6dfb3b3ca99cfd5a6feaa5839d99bfb4d29e/namespaces/www-w3-org/2000/10/swap/pim/contact/vocabulary.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*- |
(common-lisp:in-package :common-lisp-user)
(common-lisp:defpackage "#"
(:use)
(:export
"ContactLocation"
"Person"
)
(:documentation nil))
(common-lisp:in-package "#")
(rdfs:defvocabulary "contact"
:uri "#"
:definitions
((de.setf.resource.schema:defclass |Address| nil nil)
(de.setf.resour... |
0b752151752784db6e74614674967b5a348e983000dc43e936a0887090b56aa3 | BioHaskell/hPDB | StructurePrinter.hs | # LANGUAGE NamedFieldPuns , DisambiguateRecordFields , OverloadedStrings #
-- | High-level output routines for 'Structure'.
module Bio.PDB.StructurePrinter(write, PDBWritable()) where
import Prelude hiding(print)
import Control.Monad(mapM_)
import System.IO(Handle)
import Data.ByteString.Char8 as BS
import Bio.PDB.St... | null | https://raw.githubusercontent.com/BioHaskell/hPDB/5be747e2f2c57370b498f4c11f9f1887fdab0418/Bio/PDB/StructurePrinter.hs | haskell | | High-level output routines for 'Structure'.
| ShowS like type for a list of `PDBEvent`s.
| Helper: blank chain in case we don't know which chain residue belongs to.
| Helper blank residue in case we don't know which residue the atom belongs to.
* Routines for writing event list for fragments of the structure.
|... | # LANGUAGE NamedFieldPuns , DisambiguateRecordFields , OverloadedStrings #
module Bio.PDB.StructurePrinter(write, PDBWritable()) where
import Prelude hiding(print)
import Control.Monad(mapM_)
import System.IO(Handle)
import Data.ByteString.Char8 as BS
import Bio.PDB.Structure
import Bio.PDB.Iterable
import Bio.PDB.St... |
c33c0a7a34c63cd53c68f330dd2cbcd4df1d0e1b6a6276717d4a3a95407f31a0 | pgj/mirage-kfreebsd | nativeint.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-stdlib/src/nativeint.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
* Processor - native integers .
... |
2529c7090d75590b3280e99c6790f968749244b30c4cffb24c6f1fa98fbd4c28 | ethereum/act | Untyped.hs | -- data types for the parsed syntax.
-- Has the correct basic structure, but doesn't necessarily type check
-- It is also equipped with position information for extra debugging xp
{-# LANGUAGE OverloadedStrings #-}
module Syntax.Untyped (module Syntax.Untyped) where
import Data.Aeson
import Data.List (intercalate)
im... | null | https://raw.githubusercontent.com/ethereum/act/36b65b71eea22ebe4287f066190ecf47f4394fa3/src/Syntax/Untyped.hs | haskell | data types for the parsed syntax.
Has the correct basic structure, but doesn't necessarily type check
It is also equipped with position information for extra debugging xp
# LANGUAGE OverloadedStrings #
| Look Pn Id [Expr] |
module Syntax.Untyped (module Syntax.Untyped) where
import Data.Aeson
import Data.List (intercalate)
import Data.List.NonEmpty (toList)
import EVM.ABI (AbiType)
import EVM.Solidity (SlotType(..))
import Lex
type Pn = AlexPosn
type Id = String
newtype Act = Main [RawBehaviour]
deriving (Eq, Show)
data RawBehav... |
3b98e84d0560208ce8991257c776400910ec660533d3aa1f8cc13c01c8df1353 | russelldb/rabl | rabl_mock.erl | @author < >
( C ) 2017 ,
%%% @doc
%%% reused functions for testing without a real rabbitmq
%%% @end
Created : 4 Jul 2017 by < >
-module(rabl_mock).
-ifdef(TEST).
-compile(export_all).
-include_lib("amqp_client/include/amqp_client.hrl").
-include_lib("eunit/include/eunit.hrl").
mock_rabl_con(Caller) ... | null | https://raw.githubusercontent.com/russelldb/rabl/9aa140ef5ec09959393adba5a98321b6df8323e1/test/rabl_mock.erl | erlang | @doc
reused functions for testing without a real rabbitmq
@end
the mock connection is a process (just like the real connection)
and the meck expect fun sends the pid to the test process. We block
to receive it.
the mock channel is a process, and the meck expect function sends
the pid to the test process
genera... | @author < >
( C ) 2017 ,
Created : 4 Jul 2017 by < >
-module(rabl_mock).
-ifdef(TEST).
-compile(export_all).
-include_lib("amqp_client/include/amqp_client.hrl").
-include_lib("eunit/include/eunit.hrl").
mock_rabl_con(Caller) ->
Pid = spawn(fun mock_rabl_loop/0),
Caller ! {Caller, {opened_con... |
e8bb3214808ccb00e0fdafd48371641d6fad98e8917ccdf92538e91af2687591 | exercism/clojurescript | leap_test.cljs | (ns leap-test
(:require leap
[cljs.test :refer [deftest testing is] :as t :include-macros true]))
(deftest year-not-divisible-by-4
(testing "Testing, year not divisible by four..."
(is (not (leap/leap-year? 2999)))))
(deftest year-divisible-by-2-but-not-4
(testing "Testing, year divisible by two... | null | https://raw.githubusercontent.com/exercism/clojurescript/7700a33e17a798f6320aad01fb59a637bd21e12b/exercises/practice/leap/test/leap_test.cljs | clojure | (ns leap-test
(:require leap
[cljs.test :refer [deftest testing is] :as t :include-macros true]))
(deftest year-not-divisible-by-4
(testing "Testing, year not divisible by four..."
(is (not (leap/leap-year? 2999)))))
(deftest year-divisible-by-2-but-not-4
(testing "Testing, year divisible by two... | |
2e584802ffb37cbc1638232abd541da324a07d5755d220242e732f7839dd31c1 | cbaggers/play-with-verts | render.lisp | (in-package #:play-with-verts)
;;------------------------------------------------------------
;; We will use this function as our vertex shader
(defun-g some-vert-stage ((vert g-pnt)
&uniform (now :float)
(scale :float)
(model->world :mat4)... | null | https://raw.githubusercontent.com/cbaggers/play-with-verts/23585da47d5412f0b421e1e4685dc5bf43558e4c/render.lisp | lisp | ------------------------------------------------------------
We will use this function as our vertex shader
model space to world space.
We don't want to translate the normal, so we
turn the mat4 to a mat3
world space to view space
view space to clip space
that will be passed to the fragment shader
We will use t... | (in-package #:play-with-verts)
(defun-g some-vert-stage ((vert g-pnt)
&uniform (now :float)
(scale :float)
(model->world :mat4)
(world->view :mat4)
(view->clip :mat4))
Unpack the data fr... |
5016be6c01c149725b8090c3fe8753a0974a62943bdc91808ed3e9a0b070b151 | alex-gutev/cl-environments | define-declaration.lisp | ;;;; define-declaration
;;;;
Copyright 2021
;;;;
;;;; Permission is hereby granted, free of charge, to any person
;;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;;; restriction, including without limitation the rights to use,
;;;; ... | null | https://raw.githubusercontent.com/alex-gutev/cl-environments/ee12e66d44ee6d0ab66e84237e759258768b20f3/test/cltl2/define-declaration.lisp | lisp | define-declaration
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to ... | Copyright 2021
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(defpackage :cl-environments.test.cltl... |
834625e68199da501ca1f3c65dde2dd086596bf91cc3014044ab1547b1e8c163 | antoniogarrote/jobim | actors.clj | (ns jobim.examples.actors
(:use [jobim]
[clojure.contrib.logging :only [log]]
[matchure]))
(defn ping
([]
(loop [continue true
msg (receive)]
(when continue
(cond-match
[#"exit" msg] (recur false msg)
[#"exception" msg] (throw (Exception. ... | null | https://raw.githubusercontent.com/antoniogarrote/jobim/f041331d2c02cf38741e8604263bd08a3a1f11a5/jobim-core/src/jobim/examples/actors.clj | clojure | benchmark actors | (ns jobim.examples.actors
(:use [jobim]
[clojure.contrib.logging :only [log]]
[matchure]))
(defn ping
([]
(loop [continue true
msg (receive)]
(when continue
(cond-match
[#"exit" msg] (recur false msg)
[#"exception" msg] (throw (Exception. ... |
e40152d93073437552d37b42f34a0d56d96cf694d6bb25370ac4d506de6f62d6 | Zulu-Inuoe/clution | list.lisp | ;;;enumerable-tests - tests for the enumerable library
Written in 2018 by < >
;;;
;;;To the extent possible under law, the author(s) have dedicated all copyright
;;;and related and neighboring rights to this software to the public domain
;;;worldwide. This software is distributed without any warranty.
You s... | null | https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/enumerable-master/t/list/list.lisp | lisp | enumerable-tests - tests for the enumerable library
To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.
with this software. If not, see
</>.
No observab... | Written in 2018 by < >
You should have received a copy of the CC0 Public Domain Dedication along
(in-package #:enumerable-tests.list)
(5am:def-suite expressions.list
:description "Tests the enumerable expressions with lists."
:in expressions)
(5am:in-suite expressions.list)
(5am:test aggregate... |
023ec42a858ac4b4fa5552ece8f8cce4a6998b75c22ab52c9bee8ed1bc1062ab | NorfairKing/smos | Foundation.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -fno ... | null | https://raw.githubusercontent.com/NorfairKing/smos/f0d76460eff4c1270fd0ddd5ac6face76f6342b1/smos-docs-site/src/Smos/Docs/Site/Foundation.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -fno - warn - orphans #
module Smos.Doc... |
e82c2e8f32f2beeb45d9024508b48615b388b2fc8f3291885eea2a14446c6ad7 | iokasimov/pandora | Construction.hs | # LANGUAGE UndecidableInstances #
module Pandora.Paradigm.Primary.Transformer.Construction where
import Pandora.Core.Functor (type (:.), type (>>>), type (:=>), type (~>))
import Pandora.Core.Interpreted (Interpreted (Primary, run, unite, (<~), (<~~~), (<~~~~)))
import Pandora.Pattern.Morphism.Flip (Flip (Flip))
impor... | null | https://raw.githubusercontent.com/iokasimov/pandora/68662a508749f1cf02d0178679435a24f07dcaf2/Pandora/Paradigm/Primary/Transformer/Construction.hs | haskell | ), (<---), (<----), (<-----), (<------))
), (<-|------), (<-|-|-)))
<), type (-->))
----), extract, type (<:*:>), (<:*:>))
---- f x <------ f <-|-|- xs
>) (:*:) (:*:) t) => Semimonoidal (-->) (:*:) (:*:) (Construction t) where
\(Construct x xs :*: Construct y ys) -> Construct <----- x :*: y
- ( mult @(-- > ) < ~ ) < -... | # LANGUAGE UndecidableInstances #
module Pandora.Paradigm.Primary.Transformer.Construction where
import Pandora.Core.Functor (type (:.), type (>>>), type (:=>), type (~>))
import Pandora.Core.Interpreted (Interpreted (Primary, run, unite, (<~), (<~~~), (<~~~~)))
import Pandora.Pattern.Morphism.Flip (Flip (Flip))
impor... |
cee82375de89f5e3543a05558c966e9175086a38f4cdf7d6eadfa17169ca4499 | brendanhay/gogol | Patch.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-dialogflow/gen/Gogol/DialogFlow/Projects/Locations/Agents/Flows/TransitionRouteGroups/Patch.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Updates the specified TransitionRouteGroup. Note: You should always train a flow prior to sending it queries. See the < training documentation>.
/See:/ </ Dialogflow API Reference> for @dialogflow.projects.locations.agents.flows... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
8ccaefe8bd1d9d118e56734157c303e3f30d994d1e412f91929571e7ef318490 | mput/sicp-solutions | 2_79.rkt | #lang racket
Solution for exercise 2_79 .
(require "./2_78.rkt")
(require (only-in "../solutions/2_78.rkt" install-scheme-number-package install-rational-package install-complex-package))
(require (only-in "../solutions/dispatch-table.rkt" put get apply-generic))
(provide install-equ?-package)
(define (install-equ... | null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/2_79.rkt | racket | #lang racket
Solution for exercise 2_79 .
(require "./2_78.rkt")
(require (only-in "../solutions/2_78.rkt" install-scheme-number-package install-rational-package install-complex-package))
(require (only-in "../solutions/dispatch-table.rkt" put get apply-generic))
(provide install-equ?-package)
(define (install-equ... | |
e3f60b8d6938c0343e27601c85c6cef219c1deef897ba1a320d63c2e289f70e2 | OCamlPro/typerex-lint | plugin_parsetree.check_constr_args.1.ml | type t = A of (int * int) | B of int
| null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/tools/ocp-lint-doc/examples/plugin_parsetree.check_constr_args.1.ml | ocaml | type t = A of (int * int) | B of int
| |
4839387b2949f503e878dfcc34352b118671e001dd04c212550b13d21cead1fa | mvdcamme/meta-tracing-JIT | cesk-interpreter.scm | (module cesk-interpreter racket
(provide step)
(require "closures.scm"
"continuations.scm"
"instruction-set.scm"
"interaction.scm"
"output.scm")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ... | null | https://raw.githubusercontent.com/mvdcamme/meta-tracing-JIT/640af917e473f3793ab12791dcb2c80f617b8a0d/cesk-interpreter.scm | scheme |
;
Running evaluator ;
;
Spec... | (module cesk-interpreter racket
(provide step)
(require "closures.scm"
"continuations.scm"
"instruction-set.scm"
"interaction.scm"
"output.scm")
(define (return-annotation program-state new-c annotation-signal)
(cesk-normal-return (program-state-copy ... |
8aad6d405377decd699538c73633f621a5e3875bad05b92a785dd6636a7361c4 | dhall-lang/dhall-to-cabal | Main.hs | # language NamedFieldPuns #
{-# language OverloadedStrings #-}
module Main ( main ) where
import Control.Applicative ( (<**>), optional )
import Data.Foldable ( asum )
import Data.Version ( showVersion )
import qualified Data.ByteString as ByteString
import qualified Data.Text.Prettyprint.Doc as Pretty
import qualif... | null | https://raw.githubusercontent.com/dhall-lang/dhall-to-cabal/d16c510b87e966c3031e07b1810d152b051bc0d8/cabal-to-dhall/Main.hs | haskell | # language OverloadedStrings #
Shamelessly taken from dhall-format
Note: must remain in sync with the layout options in
golden-tests/GoldenTests.hs, so that test output is easy to generate
at the command line. | # language NamedFieldPuns #
module Main ( main ) where
import Control.Applicative ( (<**>), optional )
import Data.Foldable ( asum )
import Data.Version ( showVersion )
import qualified Data.ByteString as ByteString
import qualified Data.Text.Prettyprint.Doc as Pretty
import qualified Data.Text.Prettyprint.Doc.Rende... |
457cff56e1880bd4349f8f2591938c11975486b9b43c0bf234157493dd001d48 | broadinstitute/wfl | staged_test.clj | (ns wfl.integration.modules.staged-test
(:require [clojure.test :refer [deftest is testing
use-fixtures]]
[clojure.set :as set]
[clojure.spec.alpha :as s]
[clojure.string ... | null | https://raw.githubusercontent.com/broadinstitute/wfl/ca30908a6b62aa3ea8e5e15c3b410263d0173ee9/api/test/wfl/integration/modules/staged_test.clj | clojure | Snapshot creation mock
Mocks
Snapshot and snapshot reference mocks
when we create submissions, workflows have been queued for execution
when we get the submission later, the workflows may have a uuid assigned
Workflow fetch mocks within update-workflow-statuses! | (ns wfl.integration.modules.staged-test
(:require [clojure.test :refer [deftest is testing
use-fixtures]]
[clojure.set :as set]
[clojure.spec.alpha :as s]
[clojure.string ... |
9a50d3600201f963e10a2b2d086a35c49518a8b459baf9bba4b178b992910583 | Bogdanp/koyo | util.rkt | #lang racket/base
(require racket/contract)
;; Boxes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(provide
box-swap!)
(define/contract (box-swap! b f)
(-> box? (-> any/c any/c) void?)
(let loop ([v (unbox b)])
(unless (box-cas! b v (f v))
(loop (unbox b)))))
;; Threads ;;;;;;;;;;... | null | https://raw.githubusercontent.com/Bogdanp/koyo/9fac1c0430e34030b430b82b2e6228819642b448/koyo-lib/koyo/util.rkt | racket | Boxes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Threads ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | #lang racket/base
(require racket/contract)
(provide
box-swap!)
(define/contract (box-swap! b f)
(-> box? (-> any/c any/c) void?)
(let loop ([v (unbox b)])
(unless (box-cas! b v (f v))
(loop (unbox b)))))
(provide
call-with-timeout)
(define/contract (call-with-timeout f #:timeout [timeout 5000])... |
f3427f5d47c4bc8bba7739ead4d0bd971eb76df06c479f0dcc56fcb6966d8bcf | rmculpepper/crypto | interfaces.rkt | Copyright 2012 - 2018
;;
;; This library 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 , either version 3 of the License , or
;; (at your option) any later version.
;;
;; This library is distrib... | null | https://raw.githubusercontent.com/rmculpepper/crypto/4ddb88a84bdc2f79025d10c8757412c56a9ddd6c/crypto-lib/private/common/interfaces.rkt | racket |
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
(at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCH... | Copyright 2012 - 2018
by the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
#lang racket/base
(require racket/class
racket/contract/base
(only-in ra... |
53f813817b97c7f266568bb7402c0c7547ffd2ccb587462191ffe3afc79c219a | schell/ixshader | Function.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes ... | null | https://raw.githubusercontent.com/schell/ixshader/66e5302fa24bbdc7c948a79ee2422cae688b982f/src/Graphics/IxShader/Function.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeInType #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -fprint-explicit-kinds #
------------------------------------... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE RebindableSyntax #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances ... |
41bd78977fee2f2f9f7a72a0671187b68e97b152ed33cc4afb3e477cb0f5ab53 | victornicolet/parsynt | SketchJoin.ml | open Beta
*
This file is part of Parsynt .
Author : < >
Parsynt 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 ... | null | https://raw.githubusercontent.com/victornicolet/parsynt/d3f530923c0c75537b92c2930eb882921f38268c/src/singleloop/SketchJoin.ml | ocaml | *
Solutions of inner loops are stored for inlining.
Check that the solution is not empty
Some transformations need to be wrapped in a recursive function
At this point, a variable of record type (not a record expression!)
should be the summarized input from the inner loop.
At this point, a variable o... | open Beta
*
This file is part of Parsynt .
Author : < >
Parsynt 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 ... |
b3da78d596607678c847ea58566f4d67d5ff0ab264d79eec792830e1893ee6f1 | spawnfest/eep49ers | crypt.erl | -module(crypt).
-export([f/0]).
f() ->
ok.
| null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/tools/test/cover_SUITE_data/compile_beam/crypt.erl | erlang | -module(crypt).
-export([f/0]).
f() ->
ok.
| |
0df05f8d5dd6356f12d5d1f062d5ef666f3cd60abeadcb65a0bd7a8a6c734c0d | mathematical-systems/clml | package.lisp | ;;;
(defpackage :f2cl-lib
(:use :cl)
(:documentation "The package holding all symbols used by the Fortran to Lisp library")
(:nicknames :fortran-to-lisp-library)
(:export
;; Constants
#:%false% #:%true%
;; User-settable runtime options
#:*check-array-bounds*
;; Types
#:integer4 #:integer2 #:i... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/blas/package.lisp | lisp |
Constants
User-settable runtime options
Types
Intrinsic functions
other functions |
(defpackage :f2cl-lib
(:use :cl)
(:documentation "The package holding all symbols used by the Fortran to Lisp library")
(:nicknames :fortran-to-lisp-library)
(:export
#:%false% #:%true%
#:*check-array-bounds*
#:integer4 #:integer2 #:integer1 #:real8 #:real4 #:complex8 #:complex16
#:array-double-flo... |
7fa76a9cd412c8f31e553a35c9b44b6a7cc432c89863c003352b61dea6e092d6 | janestreet/base | field.ml | The type [ t ] should be abstract to make the fset and set functions unavailable
for private types at the level of types ( and not by putting None in the field ) .
Unfortunately , making the type abstract means that when creating fields ( through
a [ create ] function ) value restriction kicks in . Thi... | null | https://raw.githubusercontent.com/janestreet/base/221b085f3fcd77597f8245b4d73de3970b238e71/src/field.ml | ocaml | force [t] to be contravariant in ['perm], because phantom type variables on
concrete types don't work that well otherwise (using :> can remove them easily) | The type [ t ] should be abstract to make the fset and set functions unavailable
for private types at the level of types ( and not by putting None in the field ) .
Unfortunately , making the type abstract means that when creating fields ( through
a [ create ] function ) value restriction kicks in . Thi... |
ab169c0a4cb41042a993b938b722a2eb0fa6e35b4e3d59f251e339daeb651f60 | haskell-hvr/paths | Native.hs | # LANGUAGE CPP #
module System.Path.Internal.Native
( posixToNative
, posixFromNative
) where
import qualified System.FilePath as FP.Native
import qualified System.FilePath.Posix as FP.Posix
# INLINE isPosix #
isPosix :: Bool
#if defined(mingw32_HOST_OS) || defined(__MINGW32__)
isPosix = False
#els... | null | https://raw.githubusercontent.com/haskell-hvr/paths/2d29fd546ae122b4c027c75fa85313244c2e1f77/src/System/Path/Internal/Native.hs | haskell | # LANGUAGE CPP #
module System.Path.Internal.Native
( posixToNative
, posixFromNative
) where
import qualified System.FilePath as FP.Native
import qualified System.FilePath.Posix as FP.Posix
# INLINE isPosix #
isPosix :: Bool
#if defined(mingw32_HOST_OS) || defined(__MINGW32__)
isPosix = False
#els... | |
df91730e0bed8d6886a7f9a8137ef83eb494fb6a561cb23821d51512e384f8ac | stuartsierra/mapgraph | mapgraph_test.clj | (ns com.stuartsierra.mapgraph-test
(:require [clojure.spec :as s]
[clojure.spec.gen :as gen]
[clojure.test :refer [deftest is]]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.properties :as prop]
[com.stuartsierra.mapgraph :as mg]
... | null | https://raw.githubusercontent.com/stuartsierra/mapgraph/15886ad6f2f5b1c49df0970c9cccc9e72f2afe6e/test/com/stuartsierra/mapgraph_test.clj | clojure | Example tests
star in pull expression should not replace nested entities joined
elsewhere in the pull expression.
Generative tests
An entity map with no nested entities, pulled with [*], should
equal the original map.
Entity maps with the same ID should be merged in order.
entity specs used for the following te... | (ns com.stuartsierra.mapgraph-test
(:require [clojure.spec :as s]
[clojure.spec.gen :as gen]
[clojure.test :refer [deftest is]]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.properties :as prop]
[com.stuartsierra.mapgraph :as mg]
... |
a358168e6f5ed37b100c3bc06659cdacf029400ecdd537d6a15226be603abd61 | gelisam/frp-zoo | Main.hs | {-# LANGUAGE Arrows #-}
# LANGUAGE LambdaCase #
module
Main
where
import Prelude hiding (id, (.))
import Control.Applicative
import Control.Category
import Control.Arrow
import Graphics.Gloss
import qualified Graphics.Gloss.Interface.IO.Game as G
import Control.Wire
import Buttons
import GlossInterface
-- Ut... | null | https://raw.githubusercontent.com/gelisam/frp-zoo/1a1704e4294b17a1c6e4b417a73e61216bad2321/netwire-example/Main.hs | haskell | # LANGUAGE Arrows #
Utility
Main body
Part 1: static version
Every toggle event causes switch of counters,
with every counter is newly created.
`modes` can switch multiple state with inactive one suspended. | # LANGUAGE LambdaCase #
module
Main
where
import Prelude hiding (id, (.))
import Control.Applicative
import Control.Category
import Control.Arrow
import Graphics.Gloss
import qualified Graphics.Gloss.Interface.IO.Game as G
import Control.Wire
import Buttons
import GlossInterface
accumHold ::
(Monoid e, ... |
4836c562afa81d5476cebda1be082c186145c1357ff1d7c11a3244e9f83187fd | ekmett/distributive | Moore.hs | {-# Language CPP #-}
{-# Language DerivingVia #-}
{-# Language Trustworthy #-}
-- |
Copyright : ( C ) 2012 - 2021
License : BSD-2 - Style OR Apache-2.0
Maintainer : < >
-- Stability : provisional
-- Portability : non-portable
--
-- <>
module Data.Machine.Moore
( Moore(..)
, logMoore
, u... | null | https://raw.githubusercontent.com/ekmett/distributive/7f25d1013403d1c5d507cfbeaab75c0ae188918d/src/Data/Machine/Moore.hs | haskell | # Language CPP #
# Language DerivingVia #
# Language Trustworthy #
|
Stability : provisional
Portability : non-portable
<>
# inline index #
# inline tabulate #
| Accumulate the input as a sequence.
# INLINE (.#) #
# INLINE closed # |
Copyright : ( C ) 2012 - 2021
License : BSD-2 - Style OR Apache-2.0
Maintainer : < >
module Data.Machine.Moore
( Moore(..)
, logMoore
, unfoldMoore
) where
import Control.Applicative
#ifdef MIN_VERSION_comonad
import Control.Comonad
#endif
import Control.Monad.Fix
import Control.Monad.Zip
... |
9e74ad7245b336b598023a6164ef4db8ab83330ce9b2edb4abc2b68607dc20b6 | WhatsApp/waraft | wa_raft_acceptor.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.
%%%
%%% This module implements the front-end process for accepting commits / reads
-module(wa_raft_acce... | null | https://raw.githubusercontent.com/WhatsApp/waraft/25cfab1834da60c4d2a62df9e16530bd66ed0022/src/wa_raft_acceptor.erl | erlang |
the LICENSE file in the root directory of this source tree.
This module implements the front-end process for accepting commits / reads
Client API - data access
Internal API
gen_server callbacks
Acceptor state
Service name
Table name
Partition
Server service name
Storage service name
Public API
Commit a c... | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
This source code is licensed under the Apache 2.0 license found in
-module(wa_raft_acceptor).
-compile(warn_missing_spec).
-behaviour(gen_server).
OTP supervisor
-export([
child_spec/1,
start_link/1
]).
-export([
commit/2,... |
4e9cdf96dd02bdbdfd1473bb779bee052d52366db18ee17e80fbe95b8edc01a3 | philnguyen/soft-contract | main.rkt | #lang racket/base
Copyright 2014 ( )
;; Code licensed under the Mozilla Public License 2.0
;; -----------------------------------------------------------------------------
(require
#;require-typed-check
(only-in racket/file file->value))
(require (only-in "morse-code-strings.rkt"
string->morse))
(requi... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/gradual-typing-benchmarks/morsecode/main.rkt | racket | Code licensed under the Mozilla Public License 2.0
-----------------------------------------------------------------------------
require-typed-check
(define word-frequency-list-small "./../base/frequency-small.rktd")
(define allwords (file->words word-frequency-list))
(define words-small (file->words word-frequency-l... | #lang racket/base
Copyright 2014 ( )
(require
(only-in racket/file file->value))
(require (only-in "morse-code-strings.rkt"
string->morse))
(require (only-in "levenshtein.rkt"
string-levenshtein))
( define - runtime - path common - words - list " ./ .. /base / Lemmatized - NGSL - ezi1.txt... |
dca895366c7d3597070440ed07d0ab7248ab49b56e52a8359a13a97f301f1076 | PacktWorkshops/The-Clojure-Workshop | crowdspell_test.clj | (ns packt-clj.crowdspell-test
(:require [clojure.test :refer :all]
[packt-clj.crowdspell :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter12/Exercise12.02/packt-clj.crowdspell/test/packt_clj/crowdspell_test.clj | clojure | (ns packt-clj.crowdspell-test
(:require [clojure.test :refer :all]
[packt-clj.crowdspell :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
cc331210e74beaeaa6e0b869fd735f8d1f51a18a0889b45aa05fb3e8e9004c36 | vbrankov/hdf5-ocaml | check_and_read_example.ml | open Bigarray
open Hdf5_raw
let _FILE = "SDS.h5"
let _DATASETNAME = "IntArray"
let _NX_SUB = 3
let _NY_SUB = 4
let _NX = 7
let _NY = 7
let _NZ = 3
let () =
let data_out = Array3.create int32 c_layout _NX _NY _NZ in
for j = 0 to _NX - 1 do
for i = 0 to _NY - 1 do
... | null | https://raw.githubusercontent.com/vbrankov/hdf5-ocaml/7abc763189767cd6c92620f29ce98f6ee23ba88f/examples/h5_intro/check_and_read_example.ml | ocaml | open Bigarray
open Hdf5_raw
let _FILE = "SDS.h5"
let _DATASETNAME = "IntArray"
let _NX_SUB = 3
let _NY_SUB = 4
let _NX = 7
let _NY = 7
let _NZ = 3
let () =
let data_out = Array3.create int32 c_layout _NX _NY _NZ in
for j = 0 to _NX - 1 do
for i = 0 to _NY - 1 do
... | |
67b2ad696afef4e69ebc3672b9e8645390c7ba2839cea179036809becfc5d63b | triffon/fp-2022-23 | 22.remove-repeats.rkt | #lang racket
(require rackunit rackunit/text-ui)
# # # Задача 22
Напишете функция ` ( remove - repeats L ) ` ,
която премахва последователните и също число от списъка ` L ` .
срещания на ` x ` в началото ` L ` .
Ако срещне x ` , спира работа .
(define (remove-from-beginning x L)
(cond ((null? L) ... | null | https://raw.githubusercontent.com/triffon/fp-2022-23/b6991b5be25fb65d1e44b49ff612eb4e63f7caae/exercises/cs2/04.scheme.lists/solutions/22.remove-repeats.rkt | racket | #lang racket
(require rackunit rackunit/text-ui)
# # # Задача 22
Напишете функция ` ( remove - repeats L ) ` ,
която премахва последователните и също число от списъка ` L ` .
срещания на ` x ` в началото ` L ` .
Ако срещне x ` , спира работа .
(define (remove-from-beginning x L)
(cond ((null? L) ... | |
0cbc323cd4b9eb7231af78c570256815f0ebb730ca5a1dfd0472abed3a7f558f | shop-planner/shop3 | package.lisp | (in-package :common-lisp-user)
(defpackage shop3-minimal-subtree
(:nicknames #:shop-minimal-subtree #:subtree #:shop2-minimal-subtree)
(:shadowing-import-from #:plan-tree #:tree-node-task #:tree-node #:copy-plan-tree)
(:export #:find-failed-task)
(:use common-lisp iterate shop plan-tree))
| null | https://raw.githubusercontent.com/shop-planner/shop3/b04d12bdf83e40590fe44bb5c68952f3fd0b5b1d/shop3/minimal-subtree/package.lisp | lisp | (in-package :common-lisp-user)
(defpackage shop3-minimal-subtree
(:nicknames #:shop-minimal-subtree #:subtree #:shop2-minimal-subtree)
(:shadowing-import-from #:plan-tree #:tree-node-task #:tree-node #:copy-plan-tree)
(:export #:find-failed-task)
(:use common-lisp iterate shop plan-tree))
| |
cd1fc3ca896d9a24b78b95e2988a7fd4212e9c9d7baaaa4f9f1d0f40e74dad0d | achirkin/qua-view | MapTiles.hs | # LANGUAGE TypeFamilies #
# LANGUAGE JavaScriptFFI #
# LANGUAGE DataKinds #
# LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleContexts #
module Program.MapTiles
( downloadMapTiles
) where
import Commons
import Numeric.DataFrame
import Control.Lens
import JavaScript.WebGL
impo... | null | https://raw.githubusercontent.com/achirkin/qua-view/62626ead828889a1c7ef1fdba4d84324eb5420b3/src/Program/MapTiles.hs | haskell | # LANGUAGE OverloadedStrings #
set new opacity levels if needed
set up the center point to real center of the tile
a transform from WGS'84 to our local coordinates
get center positions in local metric system
^ tile x and y
^ tile x and y | # LANGUAGE TypeFamilies #
# LANGUAGE JavaScriptFFI #
# LANGUAGE DataKinds #
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleContexts #
module Program.MapTiles
( downloadMapTiles
) where
import Commons
import Numeric.DataFrame
import Control.Lens
import JavaScript.WebGL
import qualified Data.JSString as JSStr... |
ce798defc512e07d8b9b37b6c2f2e1447f8f3e6a27e9909d4233b7dc836f40e6 | grayswandyr/electrod | Main.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* electrod - a model finder for relational first - order linear temporal logic
*
* Copyright ( C ) 2016 - 2020 ONERA
* Authors : ( ONERA ) , ( ONERA... | null | https://raw.githubusercontent.com/grayswandyr/electrod/eb0b02eafb34b6c921f99716cb5e90c946aae51b/src/Main.ml | ocaml | * {b Actual main function.}
inspired by Logs_fmt code
Taken from nunchaku-inria/logitest/src/Misc.ml (BSD licence).
Make sure that we are a session leader; that is, our children die if we die
Debug ==> long names
begin work
store the trace | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* electrod - a model finder for relational first - order linear temporal logic
*
* Copyright ( C ) 2016 - 2020 ONERA
* Authors : ( ONERA ) , ( ONERA... |
18daf9bb811823da6157281f19805a289592d54d53c6de3d6770e6f07d7e1ffd | morpheusgraphql/morpheus-graphql | ApolloRequest.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
module Subscription.Case.ApolloRequest
( testApolloRequest,
SubM,
)
where
import Data.ByteString.Lazy.Char8 (ByteString)
import Data.Morpheus (App)
import Data.Morpheus.Subscriptions
(... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/f9684d1451fd4ee3aabdb821424fd352003a3982/morpheus-graphql/test/Subscription/Case/ApolloRequest.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NoImplicitPrelude #
module Subscription.Case.ApolloRequest
( testApolloRequest,
SubM,
)
where
import Data.ByteString.Lazy.Char8 (ByteString)
import Data.Morpheus (App)
import Data.Morpheus.Subscriptions
( Event,
)
import Relude hiding (B... |
bdc8cca1cda0e593e5a69615e4c3fde7aca6ba95baf6dcfc852ff0011fbaf9eb | huangjs/cl | complex_dynamics.lisp | complex_dynamics.lisp - functions to plot and mandelbrot sets
;;
Copyright ( C ) 2006 < >
;;
;; 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 2 of the License , or
;;... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/dynamics/complex_dynamics.lisp | lisp |
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(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 PARTIC... | complex_dynamics.lisp - functions to plot and mandelbrot sets
Copyright ( C ) 2006 < >
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston ,
MA 02110 - 1301 ,... |
18337f3697af08e51cf6e103dc9716ccedf8148c129825936d106b87739e5849 | seltzer1717/just-maven-clojure-archetype | compile.clj | ;; Import Java classes
(import (java.nio.file SimpleFileVisitor FileVisitResult Files)
(java.io File))
Target folder
(def output-dir-file
"File representing target (or output) folder."
(-> (System/getProperties)
(get "clojure.compile.path")
(File.)))
;; Source directory
(def source-path
"P... | null | https://raw.githubusercontent.com/seltzer1717/just-maven-clojure-archetype/bd6b5b0dd8617e80c27ccd4c84cc7badc70861da/src/main/resources/archetype-resources/.clojure/scripts/compile.clj | clojure | Import Java classes
Source directory
standardizing windows systems
Create target/classes folders if missing. | (import (java.nio.file SimpleFileVisitor FileVisitResult Files)
(java.io File))
Target folder
(def output-dir-file
"File representing target (or output) folder."
(-> (System/getProperties)
(get "clojure.compile.path")
(File.)))
(def source-path
"Path representing source directory"
(-> (S... |
4f68a22f0318d0976b92c114574091142fabc95e01f59bc5e86f9db65f027909 | gedge-platform/gedge-platform | amqqueue_v1.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 ) 2018 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(amqqueue_v1).
-include_lib("rabbit_commo... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/amqqueue_v1.erl | erlang |
arguments
decorators
exclusive_owner
gm_pids
name (#resource)
operator_policy
pid
policy
policy_version
type_state
recoverable_slaves
slave_pids
slave_pids_pending_shutdown
state
sync_slave_pids
immutable
immutable
immutable
immutable
immutable
durable (just so we
know home node)
transient
tra... | 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 ) 2018 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(amqqueue_v1).
-include_lib("rabbit_common/incl... |
f26bc2912295ae622a7835a9eb470487727053aca91ab39d51e9eb5bef308a5c | timjs/tophat-haskell | Parser.hs | module Task.Script.Parser where
| null | https://raw.githubusercontent.com/timjs/tophat-haskell/665d620ded5b61c454b6c50b8590f0d3f21c055f/src/Task/Script/Parser.hs | haskell | module Task.Script.Parser where
| |
51cc2e98df196dabbc16dc1415144e50c8263226ba509acff0c0fb4d4a0a96a1 | tolbrino/hotwheels | bot.erl | Copyright ( c ) 2009 Oortle , Inc
%%% Permission is hereby granted, free of charge, to any person
%%% obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without restriction ,
%%% including without limitation the rights to use, copy, modify, merge, ... | null | https://raw.githubusercontent.com/tolbrino/hotwheels/8dca95a1f8e80e9d09c39158577588b40663a313/src/bot.erl | erlang | Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission notice shall be included
OR IMPLIE... | Copyright ( c ) 2009 Oortle , Inc
files ( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
in all copies or substantial portions of the Software .
... |
76823a47cdfcaaa5a9a1c898346e784a90670b9080c5688741cafb3afdc910f3 | appleshan/cl-http | http-client-substrate-4-22.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*-
Patch file for HTTP - CLIENT - SUBSTRATE version 4.22
;;; Reason: Function HTTP::SET-STANDARD-PROXY: -
Written by JCMa , 8/25/03 19:36:01
while running on FUJI - VLM from FUJI:/usr / lib / symbolics / ComLink-39 - 8 - ... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/client/patch/http-client-substrate-4/http-client-substrate-4-22.lisp | lisp | Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*-
Reason: Function HTTP::SET-STANDARD-PROXY: -
DOMAIN - FIXES.LISP.33 ) ,
MAILBOX - FORMAT.LISP.24 ) ,
MAILER - FIXES.LISP.15 ) ,
Patch TCP hang on close when client drops connection. (from HTTP:LISPM;SERVER;TCP-PATCH-HANG-ON-CLOSE.LISP.10),
F... | Patch file for HTTP - CLIENT - SUBSTRATE version 4.22
Written by JCMa , 8/25/03 19:36:01
while running on FUJI - VLM from FUJI:/usr / lib / symbolics / ComLink-39 - 8 - F - MIT-8 - 5 - inc1.vlod
with Open Genera 2.0 , Genera 8.5 , Lock Simple 437.0 , Version Control 405.0 ,
Compare Merge 404.0 , VC Documentat... |
1fc68f4142981e41052c88a3fedf81c599b72ed25ee849cd13f5676cbcc034ca | clojure/tools.namespace | find.clj | Copyright ( c ) , 2012 . All rights reserved . The use and
distribution terms for this software are covered by the Eclipse
;; Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this
;; distribution. By using this software in any fashion, you are
;; agreeing to be bound by ... | null | https://raw.githubusercontent.com/clojure/tools.namespace/d82b53802ea9691fef9e210027250fb0d2b9d1c5/src/main/clojure/clojure/tools/namespace/find.clj | clojure | 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 this notice, or any other, from this software.
Finding namespaces in a directory tree
r... | Copyright ( c ) , 2012 . All rights reserved . The use and
distribution terms for this software are covered by the Eclipse
(ns
^{:author "Stuart Sierra",
:doc "Search for namespace declarations in directories and JAR files."}
clojure.tools.namespace.find
(:require [clojure.java.classpath :as classpa... |
4fec6308d346a25fffc405e2d452d4cab278325365410002ce2bc22a2286b563 | hannesm/logs-syslog | config.ml | open Mirage
let packages = [
package "duration";
package ~sublibs:["mirage"] "logs-syslog";
package ~sublibs:["lwt"] "logs"
]
let handler =
foreign ~packages "Unikernel.Main"
(console @-> pclock @-> time @-> stackv4v6 @-> job)
let stack = generic_stackv4v6 default_network
let () =
register "syslog" [h... | null | https://raw.githubusercontent.com/hannesm/logs-syslog/3988a4be9bae5f4487c84769f6b456857a698d39/example/config.ml | ocaml | open Mirage
let packages = [
package "duration";
package ~sublibs:["mirage"] "logs-syslog";
package ~sublibs:["lwt"] "logs"
]
let handler =
foreign ~packages "Unikernel.Main"
(console @-> pclock @-> time @-> stackv4v6 @-> job)
let stack = generic_stackv4v6 default_network
let () =
register "syslog" [h... | |
bedae0577932d253c85187254559dbe4c3fa3a0acd44518faa6c06bc42d70a15 | vraid/earthgen | grid-search.rkt | #lang typed/racket
(require vraid/math
"grid-structs.rkt"
"grid-functions.rkt")
(provide grid-closest-tile)
(: grid-tile-distance (grid FlVector -> (Integer -> Float)))
(define ((grid-tile-distance grid v) n)
(flvector3-distance-squared v (tile-coordinates grid n)))
(: grid-closest-tile-of (grid... | null | https://raw.githubusercontent.com/vraid/earthgen/208ac834c02208ddc16a31aa9e7ff7f91c18e046/planet/grid/grid-search.rkt | racket | #lang typed/racket
(require vraid/math
"grid-structs.rkt"
"grid-functions.rkt")
(provide grid-closest-tile)
(: grid-tile-distance (grid FlVector -> (Integer -> Float)))
(define ((grid-tile-distance grid v) n)
(flvector3-distance-squared v (tile-coordinates grid n)))
(: grid-closest-tile-of (grid... | |
e44e35c5997b7155b9498b12bfc1cc7997622f45913dc147250cbcc5d0298e38 | fpco/ide-backend | IORef.hs | IORefs that always evaluate their contents to WHNF
module IdeSession.Strict.IORef (
StrictIORef -- Abstract
, newIORef
, readIORef
, writeIORef
, modifyIORef
) where
import Control.Applicative ((<$>))
import Control.Exception (evaluate)
import Data.IORef (IORef)
import qualified Data.IORef as IORef
ne... | null | https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend-common/IdeSession/Strict/IORef.hs | haskell | Abstract | IORefs that always evaluate their contents to WHNF
module IdeSession.Strict.IORef (
, newIORef
, readIORef
, writeIORef
, modifyIORef
) where
import Control.Applicative ((<$>))
import Control.Exception (evaluate)
import Data.IORef (IORef)
import qualified Data.IORef as IORef
newtype StrictIORef a = Strict... |
25ad7bd596908012de3c9542897d363cb4968fae9d58eceaf8f9dfe8d76a4fb6 | fare/xcvb | func-2.lisp | #+xcvb (module (:depends-on ("package")))
(in-package :lib-b)
(defun lib-b/func-2 ()
(format t "This function 2 from lib-b!~%"))
| null | https://raw.githubusercontent.com/fare/xcvb/460e27bd4cbd4db5e7ddf5b22c2ee455df445258/examples/example-2/lib-b/func-2.lisp | lisp | #+xcvb (module (:depends-on ("package")))
(in-package :lib-b)
(defun lib-b/func-2 ()
(format t "This function 2 from lib-b!~%"))
| |
cfff7855efd37f6a9b1af838804f2a18ecaa6e96cee41d0190841cad2c2cc138 | screenshotbot/screenshotbot-oss | test-migrations.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
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 /.
(defpackage :util/test-migrations
(:use #:cl
#:fiveam)
(:import-from #:ut... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/ad2a3b8ea3d0f61b314bac4ac1b3d547456e242a/src/util/tests/test-migrations.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
| 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 /.
(defpackage :util/test-migrations
(:use #:cl
#:fiveam)
(:import-from #:util/migrations
#:clone-slot
... |
ed870489a2387d67b6664a50a579fcb81d0648362793b93258236701a8dbc3e3 | lispbuilder/lispbuilder | light.lisp |
(in-package #:rm)
(defvar *default-spot-cutoff* 45.0)
(defclass light (foreign-object)
((source
:accessor light-source
:initform :rm-light-0
:initarg :light-source))
(:default-initargs
:fp (rm-cffi::rm-light-new)
:gc t
:free (simple-free #'rm-cffi::rm-Light-Delete 'light)))
(defclass lig... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-openrm/openrm/light.lisp | lisp | Configure the light-model
Ambient Color
Reset the light ambient color. The ambient color is only applied to the
light-model for the ARENA-LIGHT
Reset the light ambient color. The ambient color is only applied to the
light-model for the ARENA-LIGHT
Diffuse Color
Specular Color
A single vertex
xyz
xy |
(in-package #:rm)
(defvar *default-spot-cutoff* 45.0)
(defclass light (foreign-object)
((source
:accessor light-source
:initform :rm-light-0
:initarg :light-source))
(:default-initargs
:fp (rm-cffi::rm-light-new)
:gc t
:free (simple-free #'rm-cffi::rm-Light-Delete 'light)))
(defclass lig... |
fae00e41dc2eda993889bc90880e7df1c3a823509601bcd99f0df3a006591971 | hellonico/origami-fun | colormaps.clj | (ns opencv4.colormaps
(:require
[opencv4.core :refer :all]
[opencv4.utils :as u]))
;
; Taken from the following tutorial
-for-pseudocoloring-in-opencv-c-python/#download
;
;
Have fun with one color maps
;
(->
"resources/images/planets/kepler.jpg"
imread
(apply-color-map! COLORMAP_HOT)
(imwrite "outp... | null | https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/colormaps.clj | clojure |
Taken from the following tutorial
Apply all color maps to a single source
| (ns opencv4.colormaps
(:require
[opencv4.core :refer :all]
[opencv4.utils :as u]))
-for-pseudocoloring-in-opencv-c-python/#download
Have fun with one color maps
(->
"resources/images/planets/kepler.jpg"
imread
(apply-color-map! COLORMAP_HOT)
(imwrite "output/planet.jpg"))
And display then all in ... |
3423608398e8cea005f89c1f23485cb97c418907eb9baff591ce03b58b560110 | SimulaVR/godot-haskell | StreamPeerGDNative.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.StreamPeerGDNative () where
import Data.Coerce
import Forei... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/StreamPeerGDNative.hs | haskell | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.StreamPeerGDNative () where
import Data.Coerce
import Forei... | |
25a21318ff247d1ebd5e93f737f7f8a7bd0b77234dd0ee259d95e21db1ac2d2b | slagyr/gaeshi | spec_helper.clj | (ns gaeshi.kuzushi.spec-helper
(:use [speclj.core]
[joodo.kuzushi.common :only (exit *lib-name* *summary*)])
(:import [java.io ByteArrayOutputStream OutputStreamWriter]))
(defn to-s [output]
(String. (.toByteArray output)))
(defn with-command-help []
[(with output (ByteArrayOutputStream.))
(with wr... | null | https://raw.githubusercontent.com/slagyr/gaeshi/a5677ed1c8d9269d412f07a7ab33bbc40aa7011a/lein-gaeshi/spec/gaeshi/kuzushi/spec_helper.clj | clojure | (ns gaeshi.kuzushi.spec-helper
(:use [speclj.core]
[joodo.kuzushi.common :only (exit *lib-name* *summary*)])
(:import [java.io ByteArrayOutputStream OutputStreamWriter]))
(defn to-s [output]
(String. (.toByteArray output)))
(defn with-command-help []
[(with output (ByteArrayOutputStream.))
(with wr... | |
1172d5075a4a844dabc95795b3d0af996d463c2dcf41e2907b8b1c19761d706e | htmfilho/minimily | document.clj | (ns minimily.documents.model.document
(:require [hugsql.core :as hugsql]
[minimily.utils.database :as db]
[minimily.documents.model.folder :as folder-model]
[amazonica.aws.s3 :as s3]
[config.core :refer [env... | null | https://raw.githubusercontent.com/htmfilho/minimily/b317b6b67bc79773163f1a6f7c3b46db795ef979/src/minimily/documents/model/document.clj | clojure | Datastore definitions
Filestore definitions | (ns minimily.documents.model.document
(:require [hugsql.core :as hugsql]
[minimily.utils.database :as db]
[minimily.documents.model.folder :as folder-model]
[amazonica.aws.s3 :as s3]
[config.core :refer [env... |
9c5cfcf32232cda9db4dff7164637a6e9d92f3cd9473d510a309a8df2c748fda | acieroid/scala-am | abp.scm | ;; Inspired from -alternating-bit-socket.html
(define (build-vector n init f)
(letrec ((v (make-vector n init))
(loop (lambda (i)
(if (< i n)
(begin
(vector-set! v i (f i))
(loop (+ i 1)))
v))... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/threads/abp.scm | scheme | Inspired from -alternating-bit-socket.html
received something
expecting what we were
Not expecting
not received anything
received something
not received anything
(printf "data to send: ~a~n" data-to-send) | (define (build-vector n init f)
(letrec ((v (make-vector n init))
(loop (lambda (i)
(if (< i n)
(begin
(vector-set! v i (f i))
(loop (+ i 1)))
v))))
(loop 0)))
(define CLOSING -1)
(define... |
264483264d951a94a0dd712eb3eb72037fe225aec949f3df141c53c59e87abbf | jaspervdj/hakyll | File.hs | --------------------------------------------------------------------------------
-- | Exports simple compilers to just copy files
# LANGUAGE CPP #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE GeneralizedNewtypeDeriving #
module Hakyll.Core.File
( CopyFile (..)
, copyFileCompile... | null | https://raw.githubusercontent.com/jaspervdj/hakyll/af9e29b5456c105dc948bc46c93e989a650b5ed1/lib/Hakyll/Core/File.hs | haskell | ------------------------------------------------------------------------------
| Exports simple compilers to just copy files
# LANGUAGE DeriveDataTypeable #
------------------------------------------------------------------------------
---------------------------------------------------------------------------... | # LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
module Hakyll.Core.File
( CopyFile (..)
, copyFileCompiler
, TmpFile (..)
, newTmpFile
) where
import Data.Binary (Binary (..))
import Data.Typeable (Typeable)
#if... |
60586645795d546e68b511cdd439c49c5814877563078f66f9d19289d778bc52 | ocsigen/ocsigenserver | ocsigen_charset_mime.ml | Ocsigen
*
* ocsigen_charset_mime.ml Copyright ( C ) 2008
*
* Laboratoire PPS - CNRS Université Paris Diderot
*
* 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... | null | https://raw.githubusercontent.com/ocsigen/ocsigenserver/d468cf464dcc9f05f820c35f346ffdbe6b9c7931/src/http/ocsigen_charset_mime.ml | ocaml | Handling of charset and mime ; specific values and declarations
Specific handling of content-type
No extension on this line | Ocsigen
*
* ocsigen_charset_mime.ml Copyright ( C ) 2008
*
* Laboratoire PPS - CNRS Université Paris Diderot
*
* 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... |
f25dfefe29cfd22d425bba4060e93eeb6c1719e7950467f65a3a23fe84279640 | joelkuiper/yesparql | sparql.clj | (ns yesparql.sparql
(:import
[java.lang IllegalArgumentException]
[java.net URL URI]
[org.apache.jena.graph Node]
[org.apache.jena.update
Update UpdateAction
UpdateFactory UpdateProcessor
UpdateRequest UpdateExecutionFactory]
[org.apache.jena.rdf.model Model
StmtIterator Statement Resou... | null | https://raw.githubusercontent.com/joelkuiper/yesparql/bd5a1bc221fcd6826daebd7aaf18c04d1cc4e60b/src/yesparql/sparql.clj | clojure | Default, uses reflection | (ns yesparql.sparql
(:import
[java.lang IllegalArgumentException]
[java.net URL URI]
[org.apache.jena.graph Node]
[org.apache.jena.update
Update UpdateAction
UpdateFactory UpdateProcessor
UpdateRequest UpdateExecutionFactory]
[org.apache.jena.rdf.model Model
StmtIterator Statement Resou... |
9457afaa0ddfc302cb871a59aaeb72b6674a9d92d226d61919c3459ea3e2c1c1 | janestreet/bonsai | test_computation_shape.ml | open! Core
open! Bonsai.Let_syntax
open! Import
open! Bonsai_web_test
module Private = Bonsai.Private
module Auto_generated = Bonsai_web_ui_auto_generated
let pre_process computation =
computation
|> Private.reveal_computation
|> Private.pre_process
|> Private.conceal_computation
;;
let count_computation_node... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/web_ui/auto_generated/test/test_computation_shape.ml | ocaml | open! Core
open! Bonsai.Let_syntax
open! Import
open! Bonsai_web_test
module Private = Bonsai.Private
module Auto_generated = Bonsai_web_ui_auto_generated
let pre_process computation =
computation
|> Private.reveal_computation
|> Private.pre_process
|> Private.conceal_computation
;;
let count_computation_node... | |
d152779410f99a0bd574db1afb9a3c97f35d669c08281e5d67e4900f95a3687e | WorksHub/client | core.cljs | ;; This is our version of pushy
( -australia/pushy ) , heavily modified to
;; support our use-case of remembering scroll positions on navigation
;; and scrolling back to proper positions when the back button is
;; pressed.
;; TODO: Update this documentation accordingly to reflect new changes.
;; Here's an overview o... | null | https://raw.githubusercontent.com/WorksHub/client/77e4212a69dad049a9e784143915058acd918982/client/src/pushy/core.cljs | clojure | This is our version of pushy
support our use-case of remembering scroll positions on navigation
and scrolling back to proper positions when the back button is
pressed.
TODO: Update this documentation accordingly to reflect new changes.
Here's an overview of how we achieve that and differences from
upstream pushy... | ( -australia/pushy ) , heavily modified to
1 . Upstream pushy uses Google Closure Library 's wrappers around the
2 . We modify pushy to take a function that generates the history
is passed as a second argument to dispatch - fn .
3 . Our history state is a JS object of the form { " scroll - position " :... |
39b2dfadd57ea15286bc9a31177af9ad6b304dd9e59fca50ebbe0a2f902926f4 | svatasoiu/algorithmic-trader | analyze_companies.ml | open Core.Std;;
open Async.Std;;
open Analyzer;;
module Mov = MovingAverageAnalyzer(Scraper.BasicScraper)
let print_res year comp p inv =
print_string ((Int.to_string year) ^ "["^comp^"]: $" ^ (Float.to_string p) ^ " on " ^ (Float.to_string inv) ^ " @ " ^ (Printf.sprintf "%.2f" (100. *. p /. inv)) ^ "% return\n")
l... | null | https://raw.githubusercontent.com/svatasoiu/algorithmic-trader/a65ab9cdf079a7a4940f0cd7670042e46b0e0348/src/analyze_companies.ml | ocaml | open Core.Std;;
open Async.Std;;
open Analyzer;;
module Mov = MovingAverageAnalyzer(Scraper.BasicScraper)
let print_res year comp p inv =
print_string ((Int.to_string year) ^ "["^comp^"]: $" ^ (Float.to_string p) ^ " on " ^ (Float.to_string inv) ^ " @ " ^ (Printf.sprintf "%.2f" (100. *. p /. inv)) ^ "% return\n")
l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.