_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 |
|---|---|---|---|---|---|---|---|---|
a792ddf05b4d4dfa090a9ca27b68637da31c78f62758b6803ade2cb84b0883e6 | well-typed/optics | At.hs | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - orphans #
-- |
-- Module: Optics.At
Description : Optics for ' Data . Map . Map ' and ' Data . Set . Set'-like containers .
--
-- This module provides optics for 'Data.Map.Map' and 'Data.Set.Set'-like
-- containers, including an 'AffineTraversal' to traverse a key in a map... | null | https://raw.githubusercontent.com/well-typed/optics/7cc3f9c334cdf69feaf10f58b11d3dbe2f98812c/optics-extra/src/Optics/At.hs | haskell | |
Module: Optics.At
This module provides optics for 'Data.Map.Map' and 'Data.Set.Set'-like
containers, including an 'AffineTraversal' to traverse a key in a map or an
element of a sequence:
>>> preview (ix 1) ['a','b','c']
Just 'b'
a 'Lens' to get, set or delete a key in a map:
fromList [(0,'b')]
and a '... | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - orphans #
Description : Optics for ' Data . Map . Map ' and ' Data . Set . Set'-like containers .
> > > set ( at 0 ) ( Just ' b ' ) ( Map.fromList [ ( 0 , ' a ' ) ] )
> > > IntSet.fromList [ 1,2,3,4 ] & contains 3 .~ False
module Optics.At
(
Index
, IxValue
... |
07577d653c230c88337dfb1d51af36b493e10499219b5908bc32b5ebdb8907fd | ReactiveX/RxClojure | future_test.clj | (ns rx.lang.clojure.future-test
(:require [rx.lang.clojure.core :as rx]
[rx.lang.clojure.blocking :as b]
[rx.lang.clojure.future :as f])
(:require [clojure.test :refer [deftest testing is]]))
(deftest test-future-generator
(is (not= [(.getId (Thread/currentThread))]
(b/into []... | null | https://raw.githubusercontent.com/ReactiveX/RxClojure/8f8e454f447ae24549bcf5f001c9d2458af21cac/src/test/clojure/rx/lang/clojure/future_test.clj | clojure | (ns rx.lang.clojure.future-test
(:require [rx.lang.clojure.core :as rx]
[rx.lang.clojure.blocking :as b]
[rx.lang.clojure.future :as f])
(:require [clojure.test :refer [deftest testing is]]))
(deftest test-future-generator
(is (not= [(.getId (Thread/currentThread))]
(b/into []... | |
4a1e5c7fa855fb1cdab97a4e94ba65d538b1d4add2902c8b108a5f3f6c57ac94 | herd/herdtools7 | testInfo.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/6a5b3085a9d2357f98f4d560d7dd12add34edabe/tools/testInfo.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2016 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
0463fa674b7b3f528cda12b2edd338d01a11c2dac0fd2a13f028764e66fca2e2 | squirrel-prover/squirrel-prover | location.mli | --------------------------------------------------------------------
* Copyright ( c ) - 2012 - -2016 - IMDEA Software Institute
* Copyright ( c ) - 2012 - -2018 - Inria
* Copyright ( c ) - 2012 - -2018 - Ecole Polytechnique
*
* Distributed under the terms of the CeCILL - C - V1 license
* ----------... | null | https://raw.githubusercontent.com/squirrel-prover/squirrel-prover/cd0dd445d0e5d739f059730d9f54b7d2c21dc694/src/location.mli | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
-----------------------------------... | --------------------------------------------------------------------
* Copyright ( c ) - 2012 - -2016 - IMDEA Software Institute
* Copyright ( c ) - 2012 - -2018 - Inria
* Copyright ( c ) - 2012 - -2018 - Ecole Polytechnique
*
* Distributed under the terms of the CeCILL - C - V1 license
* ----------... |
178e3f219470c7838e99f38e01bd946b68af4f5452390e92433cd2e847cf42c4 | haskell/cabal | cabal.test.hs | import Test.Cabal.Prelude
main = cabalTest . void $ do
isWin <- isWindows
ghc94 <- isGhcVersion "== 9.4.*"
expectBrokenIf (isWin && ghc94) 8451 $ do
cabal' "v2-build" ["script.hs"]
cabal' "v2-clean" ["script.hs"]
env <- getTestEnv
cacheDir <- getScriptCacheDirectory (testCurrentDir env </> "scri... | null | https://raw.githubusercontent.com/haskell/cabal/410f871df899e5af0847089354e0031fe051551d/cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.test.hs | haskell | import Test.Cabal.Prelude
main = cabalTest . void $ do
isWin <- isWindows
ghc94 <- isGhcVersion "== 9.4.*"
expectBrokenIf (isWin && ghc94) 8451 $ do
cabal' "v2-build" ["script.hs"]
cabal' "v2-clean" ["script.hs"]
env <- getTestEnv
cacheDir <- getScriptCacheDirectory (testCurrentDir env </> "scri... | |
b1a623080fd79832427b7ec8d8a54593d551b006543eb2493a87535ca8326bd1 | backtracking/ocamlgraph | coloring.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/src/coloring.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
module ty... |
ca46e2d93dcb46723940d44b3ec6d777758f7c3c561b27aba66f0e753a9d05fe | plewto/Cadejo | pbank.clj | (println "--> cadejo.midi.pbank")
(ns cadejo.midi.pbank
(:require [cadejo.midi.program])
(:require [cadejo.config :as config])
(:require [cadejo.midi.program])
(:require [cadejo.util.col :as ucol])
(:require [cadejo.util.user-message :as umsg])
(:require [cadejo.util.string])
(:require [overtone.core :as... | null | https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/cadejo/midi/pbank.clj | clojure | synths updated, editor updated
editor is not updated
p false
invalid slot | (println "--> cadejo.midi.pbank")
(ns cadejo.midi.pbank
(:require [cadejo.midi.program])
(:require [cadejo.config :as config])
(:require [cadejo.midi.program])
(:require [cadejo.util.col :as ucol])
(:require [cadejo.util.user-message :as umsg])
(:require [cadejo.util.string])
(:require [overtone.core :as... |
8bf287a3719463c098cec5fe960b003da7671dc1b465708bcbf3e02381c442f7 | w3ntao/sicp-solution | 3-3.rkt | #lang racket
(define (make-account balance password)
(define (withdraw amount)
(if (>= balance amount)
(begin (set! balance
(- balance amount))
balance)
"insufficient funds"))
(define (deposit amount)
(set! balance
(+ balance amount))
balanc... | null | https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/chap-3/3-3.rkt | racket | #lang racket
(define (make-account balance password)
(define (withdraw amount)
(if (>= balance amount)
(begin (set! balance
(- balance amount))
balance)
"insufficient funds"))
(define (deposit amount)
(set! balance
(+ balance amount))
balanc... | |
3e0404bfeece99e9ef00b3beeb8879c9fdd3f2d3f232ca711b2de3a1eddb0980 | janestreet/virtual_dom | grouped_help_text.ml | open Core
open Import
module Group_name = String
module View_spec = struct
type t =
{ core_spec : Help_text.View_spec.t
; group_name : Group_name.t -> Vdom.Node.t
}
let plain = { core_spec = Help_text.View_spec.plain; group_name = Vdom.Node.text }
let with_classes ~group_name_class ~key_class ~plai... | null | https://raw.githubusercontent.com/janestreet/virtual_dom/53466b0f06875cafd30ee2d22536e494e7237b3a/keyboard/src/grouped_help_text.ml | ocaml | open Core
open Import
module Group_name = String
module View_spec = struct
type t =
{ core_spec : Help_text.View_spec.t
; group_name : Group_name.t -> Vdom.Node.t
}
let plain = { core_spec = Help_text.View_spec.plain; group_name = Vdom.Node.text }
let with_classes ~group_name_class ~key_class ~plai... | |
a9841478c70c656579903791ecedf1b147d1244e2f9d4a9685608845fdaf07a8 | odj/Ouch | InChI.hs | -----------------------------------------------------------------------------
-------------------------------------------------------------------------------
InChi - a module to define input from InChI file format
Copyright ( c ) 2010 Orion
This file is part of Ouch , a chemical informat... | null | https://raw.githubusercontent.com/odj/Ouch/ed20599214cf77b0cb81cc7cefb4cd9c35bc7cf7/Ouch/Input/InChI.hs | haskell | ---------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
---------------------------------------------------------------------------
---------... | InChi - a module to define input from InChI file format
Copyright ( c ) 2010 Orion
This file is part of Ouch , a chemical informatics toolkit
written entirely in Haskell .
Ouch is free software : you can redistribute it and/or modify
it under the terms of the GNU General ... |
3efdecde6ac966dfcd2e510133782507fc47031665c80899ebaad5f34ed42fe7 | icicle-lang/zebra-ambiata | Generic.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DoAndIfThenElse #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
module Zebra.X.Vector.Generic (
group
, segmentedGroup
, segmentedGroupOn
, module Generic
) where
import X.Data.Vector.Stream (Stream(..), Step(..)... | null | https://raw.githubusercontent.com/icicle-lang/zebra-ambiata/394ee5f98b4805df2c76abb52cdaad9fd7825f81/zebra-core/src/Zebra/X/Vector/Generic.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DoAndIfThenElse #
| Run-length encode a segmented vector.
| Run-length encode a segmented vector.
| Run-length encode a vector.
# INLINE group #
| Run-length encode a vector.
# INLINE [0] loop #
# INLINE [0] loop # | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
module Zebra.X.Vector.Generic (
group
, segmentedGroup
, segmentedGroupOn
, module Generic
) where
import X.Data.Vector.Stream (Stream(..), Step(..))
import qualified X.Data.Vector.Stream as Stream
import ... |
1e0351b619977609238715e436b7e5e795fbb55ff8d2f6ed2b61cdf57aaa5809 | ice1000/learn | alan-partridge-iii-london.hs | module Codewars.AlanPartridge.London where
alan :: [String] -> String
alan ls = if all (`elem` ls) cities then "Smell my cheese you mother!"
else "No, seriously, run. You will miss it."
where cities = ["Rejection", "Disappointment", "Backstabbing Central", "Shattered Dreams Parkway"]
--
| null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/alan-partridge-iii-london.hs | haskell | module Codewars.AlanPartridge.London where
alan :: [String] -> String
alan ls = if all (`elem` ls) cities then "Smell my cheese you mother!"
else "No, seriously, run. You will miss it."
where cities = ["Rejection", "Disappointment", "Backstabbing Central", "Shattered Dreams Parkway"]
| |
033d6506e2940ec2f14b5b744ab2367a973550cbbe1596f806d1fd7113285240 | rabbitmq/erlando | test_cut.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/rabbitmq/erlando/1c1ef25a9bc228671b32b4a6ee30c7525314b1fd/test/src/test_cut.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
this isn't gett... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is Erlando .
The Initial Developer of the Original Code is VMware , Inc.
Copyright ( c ) 2011 - 2013 VMware , Inc. All rights reserved .
-module(test_c... |
01e18e934bec1a75d94fd85330ef5a058377d813b4c73a8bb566a00f91432626 | philopon/haddocset | Plist.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Documentation.Haddocset.Plist
( Plist(..)
, showPlist
) where
import Data.Monoid
import Data.Text (Text)
import qualified Data.Text as T
data Plist = Plist
{ cfBundleIdentifier :: Text
, cfBundleName :: Text
... | null | https://raw.githubusercontent.com/philopon/haddocset/0e89ffea4f0c375a1eed2493e2a08c3d3953f8b1/Documentation/Haddocset/Plist.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
module Documentation.Haddocset.Plist
( Plist(..)
, showPlist
) where
import Data.Monoid
import Data.Text (Text)
import qualified Data.Text as T
data Plist = Plist
{ cfBundleIdentifier :: Text
, cfBundleName :: Text
, docSetPlatformFamily :: Text
... |
64776d8549cfffdb250fb7b3a66eb84e5f50368cfe593eaada9df132ebb4127f | sdiehl/llvm-tutorial-standalone | JIT.hs | module JIT where
import Data.Int
import Data.Word
import Foreign.Ptr ( FunPtr, castFunPtr )
import Control.Monad.Except
import LLVM.General.Target
import LLVM.General.Context
import LLVM.General.CodeModel
import LLVM.General.Module as Mod
import qualified LLVM.General.AST as AST
import LLVM.General.PassManager
impo... | null | https://raw.githubusercontent.com/sdiehl/llvm-tutorial-standalone/8edcc083c8625c548ea9ce0ae76e5f5c1f13992c/src/JIT.hs | haskell | optimization level
code model ( Default )
frame pointer elimination
fast instruction selection
Optimization Pass
runPassManager pm m
Return the optimized module | module JIT where
import Data.Int
import Data.Word
import Foreign.Ptr ( FunPtr, castFunPtr )
import Control.Monad.Except
import LLVM.General.Target
import LLVM.General.Context
import LLVM.General.CodeModel
import LLVM.General.Module as Mod
import qualified LLVM.General.AST as AST
import LLVM.General.PassManager
impo... |
121ef7e21fbcdc68fc3eceec71c780dec908cd3f8c72c52b3e938315c939a7ed | dawidovsky/IIUWr | Wykład.rkt | #lang racket
;; expressions
(define (const? t)
(number? t))
(define (op? t)
(and (list? t)
(member (car t) '(+ - * / > < >= <= =))))
(define (op-op e)
(car e))
(define (op-args e)
(cdr e))
(define (op-cons op args)
(cons op args))
(define (op->proc op)
(cond [(eq? op '+) +]
[(eq? op '*... | null | https://raw.githubusercontent.com/dawidovsky/IIUWr/73f0f65fb141f82a05dac2573f39f6fa48a81409/MP/Pracownia7/Wyk%C5%82ad.rkt | racket | expressions
set
free-variables
pairs
lambdas
applications
expressions
environments
closures
null
list
bools
and
or
if
evaluator | #lang racket
(define (const? t)
(number? t))
(define (op? t)
(and (list? t)
(member (car t) '(+ - * / > < >= <= =))))
(define (op-op e)
(car e))
(define (op-args e)
(cdr e))
(define (op-cons op args)
(cons op args))
(define (op->proc op)
(cond [(eq? op '+) +]
[(eq? op '*) *]
[(... |
7d99cab67cb9c5c07c45ada37d4d80a2b14d7e66c60be006b244f0c865eb8b43 | PrecursorApp/precursor | permission.cljs | (ns frontend.models.permission
(:require [datascript.core :as d]
[frontend.utils :as utils]))
(defn github-permissions [db doc]
(filter #(= (:db/id doc) (:permission/document %))
(map #(d/entity db (:e %))
(d/datoms db :avet :permission/reason :permission.reason/github-markdown... | null | https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src-cljs/frontend/models/permission.cljs | clojure | (ns frontend.models.permission
(:require [datascript.core :as d]
[frontend.utils :as utils]))
(defn github-permissions [db doc]
(filter #(= (:db/id doc) (:permission/document %))
(map #(d/entity db (:e %))
(d/datoms db :avet :permission/reason :permission.reason/github-markdown... | |
cdcd63d9c1962c8d040502d1fda5bd89d093054b2297599b116548838a9f01be | matsen/pplacer | rarefaction.ml | open Ppatteries
let merge = const incr |> flip
let lmerge = List.fold_left ((!) |- (+) |> flip) 0 |- ref
module I = Mass_map.Indiv
Convenience wrapper around the functions in Kr_distance for specifying just
* a callback with parameters for the count of edge segments below the current
* edge segment and the b... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/rarefaction.ml | ocaml | Compute the rarefaction curve of a placerun, given a placement criterion and
* optionally the highest X value for the curve.
is i proximal to j? | open Ppatteries
let merge = const incr |> flip
let lmerge = List.fold_left ((!) |- (+) |> flip) 0 |- ref
module I = Mass_map.Indiv
Convenience wrapper around the functions in Kr_distance for specifying just
* a callback with parameters for the count of edge segments below the current
* edge segment and the b... |
267b39df99a474d4db04f063658edc8aac68688122ee11c22327f3d070166157 | haskell/cabal | Structured.hs | # LANGUAGE CPP #
module UnitTests.Distribution.Utils.Structured (tests) where
import Data.Proxy (Proxy (..))
import Distribution.Utils.MD5 (md5FromInteger)
import Distribution.Utils.Structured (structureHash, Structured)
import Test.Tasty (TestTree, testGroup)
import Test.T... | null | https://raw.githubusercontent.com/haskell/cabal/ed314bc2e8f7c96929ff362047b4b22a764e48cd/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs | haskell | This test also verifies that structureHash doesn't loop.
The difference is in encoding of newtypes
-------------------------------------------------------------------- --
utils | # LANGUAGE CPP #
module UnitTests.Distribution.Utils.Structured (tests) where
import Data.Proxy (Proxy (..))
import Distribution.Utils.MD5 (md5FromInteger)
import Distribution.Utils.Structured (structureHash, Structured)
import Test.Tasty (TestTree, testGroup)
import Test.T... |
0e6c75e1cdee5ae3510af314ff655c8cc8d0e4fb428fecd39be4ea85f8f14170 | satos---jp/mincaml_self_hosting | knorm.mli | open Syntax
open Debug
open Type
open Type_expr
type name = string * (ty * debug_data)
type kexp =
| KConst of Syntax.const
| KOp of Syntax.optype * (name list)
| KIf of comptype * name * name * kexp * kexp
| KLet of name * kexp * kexp
| KVar of name
| KLetRec of name * (name list)... | null | https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/src/compiler/knorm.mli | ocaml | open Syntax
open Debug
open Type
open Type_expr
type name = string * (ty * debug_data)
type kexp =
| KConst of Syntax.const
| KOp of Syntax.optype * (name list)
| KIf of comptype * name * name * kexp * kexp
| KLet of name * kexp * kexp
| KVar of name
| KLetRec of name * (name list)... | |
95219facb14233e0dc2267c5e79ec7b3d44ae2a7ba3dee7dd0c382891071edb2 | LPCIC/matita | print_grammar.ml | Copyright ( C ) 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of the GNU... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/grafite_parser/print_grammar.ml | ocaml | $Id: print_grammar.ml 11672 2011-11-17 00:00:00Z sacerdot $ | Copyright ( C ) 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of the GNU... |
88bded98f267fa690493781c314f5c47b4449cd33e1c3871f250948e0584a5c1 | jafingerhut/clojure-benchmarks | mandelbrot.clj-8.clj | The Computer Language Benchmarks Game
;; /
contributed by
;; The function 'dot' is based on suggestions and improvements made by
these people posting to the Clojure Google group in April , 2009 :
dmitri.sotnikov , , , michael.messinides
,
change by
reduced code size by removing functio... | null | https://raw.githubusercontent.com/jafingerhut/clojure-benchmarks/474a8a4823727dd371f1baa9809517f9e0b508d4/mandelbrot/mandelbrot.clj-8.clj | clojure | /
The function 'dot' is based on suggestions and improvements made by
Handle slight difference in function name between Clojure 1.2.0 and
then
else | The Computer Language Benchmarks Game
contributed by
these people posting to the Clojure Google group in April , 2009 :
dmitri.sotnikov , , , michael.messinides
,
change by
reduced code size by removing functions already present in Clojure
(ns mandelbrot
(:gen-class)
(:import (java.... |
8b98ab97f9594994d0280d54de0fb5c481da43e56e6cea72a402d39155c7e599 | fieldstrength/aeson-deriving | Utils.hs | {-# LANGUAGE PolyKinds #-}
# LANGUAGE TypeFamilies #
module Data.Aeson.Deriving.Utils
( mapObjects
, mapField
, All
, textVal
) where
import Data.Aeson
import qualified Data.HashMap.Strict as HashMap
import Data.Kind (Constraint)
import Data.Proxy
import ... | null | https://raw.githubusercontent.com/fieldstrength/aeson-deriving/861dc8ebc05792a0924e8fe6aae2ae41a59fc751/src/Data/Aeson/Deriving/Utils.hs | haskell | # LANGUAGE PolyKinds # | # LANGUAGE TypeFamilies #
module Data.Aeson.Deriving.Utils
( mapObjects
, mapField
, All
, textVal
) where
import Data.Aeson
import qualified Data.HashMap.Strict as HashMap
import Data.Kind (Constraint)
import Data.Proxy
import Data.Text
import ... |
48c70ffac9b7c7c01afae1cb0a43d1ba1fb0f8f2d97b725545c190fd1ad9320e | lingnand/VIMonad | Named.hs | # LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses #
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.Named
Copyright : ( c ) < >
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : none
-- Stability : unsta... | null | https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Layout/Named.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Layout.Named
License : BSD3-style (see LICENSE)
Maintainer : none
Stability : unstable
Portability : unportable
A module for assigning a name to a given layout. Deprecated, use
----------------------... | # LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses #
Copyright : ( c ) < >
" XMonad . Layout . Renamed " instead .
module XMonad.Layout.Named
named,
nameTail
) where
import XMonad.Layout.LayoutModifier
import XMonad.Layout.Renamed
> import XMonad . Layout . Named
... |
ce1674dab557f8a37823cd6165131822b7456e6b628ba08cdec6f1dcabfc060d | qiao/sicp-solutions | 2.87.scm | (define (=zero-poly? p)
(define (=zero-terms? terms)
(or (empty-termlist? terms)
(and (=zero? (coeff (first-term terms)))
(=zero-terms? (rest-terms terms)))))
(=zero-termlist? (term-list p)))
(put '=zero? 'polynomial =zero-poly?)
| null | https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter2/2.87.scm | scheme | (define (=zero-poly? p)
(define (=zero-terms? terms)
(or (empty-termlist? terms)
(and (=zero? (coeff (first-term terms)))
(=zero-terms? (rest-terms terms)))))
(=zero-termlist? (term-list p)))
(put '=zero? 'polynomial =zero-poly?)
| |
123d347ab4fba1ae6af21f7e8a94c1f9874f02e593e551c74e335a8280d4e939 | Deducteam/zenon_modulo | main.ml | Copyright 1997 INRIA
Version.add "$Id$";;
open Printf;;
open Globals;;
open Namespace;;
open Expr;;
type proof_level =
| Proof_none
| Proof_h of int
| Proof_m
| Proof_l
| Proof_lx
| Proof_coq
| Proof_coqterm
| Proof_isar
| Proof_dot of bool * int
| Proof_dk
| Proof_dkterm
;;
let proof_lev... | null | https://raw.githubusercontent.com/Deducteam/zenon_modulo/9534fbdca0d009a513cb40d9a5a2a98329835c63/main.ml | ocaml | Gc.print_stat stderr; | Copyright 1997 INRIA
Version.add "$Id$";;
open Printf;;
open Globals;;
open Namespace;;
open Expr;;
type proof_level =
| Proof_none
| Proof_h of int
| Proof_m
| Proof_l
| Proof_lx
| Proof_coq
| Proof_coqterm
| Proof_isar
| Proof_dot of bool * int
| Proof_dk
| Proof_dkterm
;;
let proof_lev... |
e6aaa9396d27b9b0ad8078dbf0dd1947afc309e3e48da88ec7d82140be5f462e | S8A/htdp-exercises | ex374.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex374) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp"))) (htdp... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex374.rkt | racket | about the language level of this file in a form that our tools can easily process.
.: Data definitions :.
An Xexpr is a list:
– (cons Symbol (cons [List-of Attribute] Body))
where Body is short for [List-of Xexpr]
(cons Symbol (cons String '()))
An XItem.v2 is one of:
An XEnum.v2 is one of:
– (cons 'ul [L... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex374) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "image.rkt" "teachpac... |
612d356b6650b121a9b3854dbdbb8c80ba8f31f3bcde090c02dd9b26385b956a | mokus0/shapefile | Shapefile.hs | # LANGUAGE RecordWildCards #
module Database.Shapefile
( module Database.Shapefile
, module Database.Shapefile.ShapeTypes
, module Database.Shapefile.Shp
, module Database.Shapefile.Shx
, module Database.Shapefile.Shp.Handle
, module Database.Shapefile.Shx.Handle
, module Database.XBase.Dbf... | null | https://raw.githubusercontent.com/mokus0/shapefile/9a3821e1c6aef08b9304ed3c79cccbba09970d7d/src/Database/Shapefile.hs | haskell | # LANGUAGE RecordWildCards #
module Database.Shapefile
( module Database.Shapefile
, module Database.Shapefile.ShapeTypes
, module Database.Shapefile.Shp
, module Database.Shapefile.Shx
, module Database.Shapefile.Shp.Handle
, module Database.Shapefile.Shx.Handle
, module Database.XBase.Dbf... | |
54d48a9eb7a840cd4579994f7cc47cc7d0818f149061d0f47ab31374d31f3d3b | mattaudesse/haskell-99-problems | H08.hs | module Problems.H08 where
import Data.List (group)
-- |
Eliminate consecutive duplicates of list elements .
--
-- If a list contains repeated elements they should be replaced with a single
-- copy of the element. The order of the elements should not be changed.
--
-- >>> compress "aaaabccaadeeee"
-- "abcade"
com... | null | https://raw.githubusercontent.com/mattaudesse/haskell-99-problems/f7d57c0bd45c245f10073cf708fbc5e2107e0e23/Problems/H08.hs | haskell | |
If a list contains repeated elements they should be replaced with a single
copy of the element. The order of the elements should not be changed.
>>> compress "aaaabccaadeeee"
"abcade"
|
If a list contains repeated elements they should be replaced with a single
copy of the element. The order of the element... | module Problems.H08 where
import Data.List (group)
Eliminate consecutive duplicates of list elements .
compress :: Eq a => [a] -> [a]
compress [] = []
compress xs = foldr compress' [] xs where
compress' x [] = [x]
compress' x (a:as)
| x == a = a:as
| otherwise ... |
ea53b38f12660845b5f93e376766cec889f87076fdb1047f088b087d79adf1d6 | tommaisey/aeon | round-up.help.scm | ;; (round-up a b)
;; Rounds a up to the nearest multiple of b.
(let* ((x (mouse-x kr 60 4000 0 0.1))
(f (round-up x 100)))
(audition
(out 0 (mul (sin-osc ar f 0) 0.1))))
(let ((n (line kr 24 108 6 remove-synth)))
(audition
(out 0 (mul (saw ar (midi-cps (round-up n 1))) 0.2))))
| null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/binary-ops/round-up.help.scm | scheme | (round-up a b)
Rounds a up to the nearest multiple of b. |
(let* ((x (mouse-x kr 60 4000 0 0.1))
(f (round-up x 100)))
(audition
(out 0 (mul (sin-osc ar f 0) 0.1))))
(let ((n (line kr 24 108 6 remove-synth)))
(audition
(out 0 (mul (saw ar (midi-cps (round-up n 1))) 0.2))))
|
732aae87c32e60f5a32b46d5e8f7497b5e777e3eab4a8b4bc6e105e1f64a0ce1 | goldfirere/singletons | Wrappers.hs | # LANGUAGE DataKinds #
# LANGUAGE NoNamedWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Semigroup.Singletons.Internal.Wrappers
... | null | https://raw.githubusercontent.com/goldfirere/singletons/68ce40b1473a6a65eb550318847b57160c86c284/singletons-base/src/Data/Semigroup/Singletons/Internal/Wrappers.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Semigroup.Singletons.Internal.Wrappers
License : BSD-style (see LICENSE)
Stability : experimental
Portability : non-portable
Defines the promoted and singled versions of the @newtype@ wrappers from
"Data.S... | # LANGUAGE DataKinds #
# LANGUAGE NoNamedWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
Copyright : ( C ) 2018
Maintainer :
" Data . Monoid . Singletons " .
module Data.Semigroup.Singletons.Internal.Wrappers where
... |
397894f612eb7a2a3c0800cac77b873e49e6b7f185fc7f1c0e1f122ec7a6afac | phimuemue/lambdainterpreter_haskell | Settings.hs | needed for
module Settings where
import qualified Data.Map as Map
import System.Console.CmdArgs
import Control.Concurrent.MVar
import Expression
type Environment = Map.Map String Expression
data InteractivityMode = Full | Steps | Interactive
data Arguments = Arguments { filename :: [String]
... | null | https://raw.githubusercontent.com/phimuemue/lambdainterpreter_haskell/1b56487f0bce422cc2a2e448dfef800a4e0a08a4/Settings.hs | haskell | needed for
module Settings where
import qualified Data.Map as Map
import System.Console.CmdArgs
import Control.Concurrent.MVar
import Expression
type Environment = Map.Map String Expression
data InteractivityMode = Full | Steps | Interactive
data Arguments = Arguments { filename :: [String]
... | |
8b94bffe68925ab50eb4a84ff515a3d8aefab9452cf758eec5527ce865c2f2fc | LambdaHack/LambdaHack | Overlay.hs | # LANGUAGE RankNTypes , TupleSections #
-- | Screen overlays.
module Game.LambdaHack.Client.UI.Overlay
( -- * DisplayFont
DisplayFont, isPropFont, isSquareFont, isMonoFont, textSize
, -- * FontSetup
FontSetup(..), multiFontSetup, singleFontSetup
* AttrString
AttrString, blankAttrString, textToAS, text... | null | https://raw.githubusercontent.com/LambdaHack/LambdaHack/e988fafc52a762d5471a133fe9896adf5f277c03/engine-src/Game/LambdaHack/Client/UI/Overlay.hs | haskell | | Screen overlays.
* DisplayFont
* FontSetup
* AttrLine
* Overlay
* Internal operations
* DisplayFont
| Three types of fonts used in the UI. Overlays (layers, more or less)
in proportional font are overwritten by layers in square font,
which are overwritten by layers in mono font.
All overlays overwrite the ... | # LANGUAGE RankNTypes , TupleSections #
module Game.LambdaHack.Client.UI.Overlay
DisplayFont, isPropFont, isSquareFont, isMonoFont, textSize
FontSetup(..), multiFontSetup, singleFontSetup
* AttrString
AttrString, blankAttrString, textToAS, textFgToAS, stringToAS
, attrStringToString
, (<+:>), (<\:>)
... |
90ad26cac30f972b020a4ad57f0e845fefa2810261d2a310ede5abc735598732 | commercialhaskell/path | Posix.hs | # LANGUAGE CPP #
#define PLATFORM_NAME Posix
#define IS_WINDOWS False
#include "Include.hs"
| null | https://raw.githubusercontent.com/commercialhaskell/path/2bec48c17be4b82f7dabc8e2dd167444e558e9a5/src/Path/Posix.hs | haskell | # LANGUAGE CPP #
#define PLATFORM_NAME Posix
#define IS_WINDOWS False
#include "Include.hs"
| |
8fe8547d73950b1df1ee6534e63667535f5d68ce4c3762c21ea4a20c211fd5b4 | dmitryvk/sbcl-win32-threads | vm.lisp | ;;;; miscellaneous VM definition noise for HPPA
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public ... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/hppa/vm.lisp | lisp | miscellaneous VM definition noise for HPPA
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
Registers
Wired-zero
This gets trashed by the C call convention.
and saved by lisp before callin... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!VM")
(eval-when (:compile-toplevel :load-toplevel :execute)
(defvar *register-names* (make-array 32 :in... |
11baee7bf5eb334e048c34d53d6652f9635eb3627d921ac27c1a51f77c413d89 | jmorag/mcc | Error.hs | module Microc.Semant.Error where
import Microc.Ast
import Data.Text ( Text )
import Data.Text.Prettyprint.Doc
type Name = Text
data BindingLoc = F Function | S Struct | Toplevel deriving Show
data SemantError =
IllegalBinding Name BindingKind VarKind BindingLoc
... | null | https://raw.githubusercontent.com/jmorag/mcc/d412eec5e3783873ad42b74b837ed0f1047c2fde/src/Microc/Semant/Error.hs | haskell | ^ For statements in a block following a return | module Microc.Semant.Error where
import Microc.Ast
import Data.Text ( Text )
import Data.Text.Prettyprint.Doc
type Name = Text
data BindingLoc = F Function | S Struct | Toplevel deriving Show
data SemantError =
IllegalBinding Name BindingKind VarKind BindingLoc
... |
dd01c74db0d0009e9c847b0a397009b24b58688352e21f5f3e7f9a02ea7dc831 | morphismtech/free-categories | Functor.hs | |
Module : Data . Quiver . Functor
Description : free categories
Copyright : ( c ) , 2019
Maintainer :
Stability : experimental
Consider the category of Haskell quivers with
* objects are types of higher kind
* @p : : k - > k - > Type@
* morphisms are terms of @RankNType@ ,
* @forall x y. p... | null | https://raw.githubusercontent.com/morphismtech/free-categories/d63837e43d5358fcfb2f7afc6b3a32a7f500912b/src/Data/Quiver/Functor.hs | haskell | | Map each element of the structure to a `Category`,
and combine the results.
| Combine the elements of a structure using a `Category`.
| Map each element of the structure to a `Monoid`,
and combine the results.
| Map each element of the structure, and combine the results in a list.
| Map each element of a str... | |
Module : Data . Quiver . Functor
Description : free categories
Copyright : ( c ) , 2019
Maintainer :
Stability : experimental
Consider the category of Haskell quivers with
* objects are types of higher kind
* @p : : k - > k - > Type@
* morphisms are terms of @RankNType@ ,
* @forall x y. p... |
b1f0e845571c2dccd6801b06562889e6fe1d4a825ed495fabedfd8a0803dca23 | Leystryku/mpbomberman_racket | bomberman_server.rkt | #lang racket
;; import
(require 2htdp/universe)
(require "game/sv_network_waiting.rkt")
(require "game/sv_network_ingame.rkt")
(require "game/sv_connect.rkt")
(require "game/sv_disconnect.rkt")
(require "game/sh_structs.rkt")
(require "game/sv_tick.rkt")
(require "game/sh_config.rkt")
;; exports
(provide launch-serve... | null | https://raw.githubusercontent.com/Leystryku/mpbomberman_racket/059d95040cfad2e27237f8dd41fc32a4fc698afe/bomberman_server.rkt | racket | import
exports
[message] is called whenever we receive a message f rom a client
[launch-server] calls universe to create the server
[launch-server] calls universe to create the server with port
(launch-server-cmdline) | #lang racket
(require 2htdp/universe)
(require "game/sv_network_waiting.rkt")
(require "game/sv_network_ingame.rkt")
(require "game/sv_connect.rkt")
(require "game/sv_disconnect.rkt")
(require "game/sh_structs.rkt")
(require "game/sv_tick.rkt")
(require "game/sh_config.rkt")
(provide launch-server)
(define (message ... |
1499b34e17dca2c5bda425da982ad92e1f04637c83136ac5f501f7239232c7a3 | mstksg/advent-of-code-2017 | Day22.hs | module AOC2017.Day22 (day22a, day22b) where
import AOC2017.Types (Challenge)
import Control.Lens (makeClassy, use, at, non, zoom, (+=), (<<>=))
import Control.Monad (replicateM)
import Control.Monad.Trans.State (State, state, evalState)
impor... | null | https://raw.githubusercontent.com/mstksg/advent-of-code-2017/f9e97680726e87be175cf423241da3048ef6564d/src/AOC2017/Day22.hs | haskell | | Lift a 'State Flag Dir' (modify a Flag and produce a direction change)
to a 'State St Flag' (modify the simulation state and produce the
updated Flag)
^ Modify a Flag and produce a direction change
^ Modify the state and produce the updated Flag
turn left, become Infected
turn right, become Clean
turn left, b... | module AOC2017.Day22 (day22a, day22b) where
import AOC2017.Types (Challenge)
import Control.Lens (makeClassy, use, at, non, zoom, (+=), (<<>=))
import Control.Monad (replicateM)
import Control.Monad.Trans.State (State, state, evalState)
impor... |
a28bf26d0a1b551aac1fe10df754ca43cca85c4262970c0f8b91f3ea245a2706 | svobot/janus | Evaluation.hs | -- | Implements the algorithm for evaluation of terms and defines a data type
-- ('Value') for representing an evaluated term using a higher-order syntax.
module Janus.Evaluation
( Type
, ValueEnv
, Value
( VAPair
, VAPairType
, VAUnit
, VAUnitType
, VLam
, VMPair
, VMPairType
, VM... | null | https://raw.githubusercontent.com/svobot/janus/68391b160903e967aa9c88d6b2f16b446fc7abee/src/Janus/Evaluation.hs | haskell | | Implements the algorithm for evaluation of terms and defines a data type
('Value') for representing an evaluated term using a higher-order syntax.
* Utils
| A term that has been beta-reduced to its normal form.
| A term whose further beta-reduction depends on a variable.
| List of values defined by the /let/ st... | module Janus.Evaluation
( Type
, ValueEnv
, Value
( VAPair
, VAPairType
, VAUnit
, VAUnitType
, VLam
, VMPair
, VMPairType
, VMUnit
, VMUnitType
, VPi
, VSumL
, VSumR
, VSumType
, VUniverse
)
, cEval
, iEval
, vfree
, quote0
BoundEnv
) wher... |
c56f8328d1a2f816a2bdb68e680326cc1442be659cce2f892f4b896cf8c0ef58 | blockmason/lndr | Docs.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE TypeOperators #-}
# OPTIONS_GHC -fno - warn - orphans #
module Lndr.Docs where
import Data.Default
import Data.Maybe ... | null | https://raw.githubusercontent.com/blockmason/lndr/58fe5f82d5d057e463be23821454e3a0515ef9b9/lndr-backend/src/Lndr/Docs.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators # | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -fno - warn - orphans #
module Lndr.Docs where
import Data.Default
import Data.Maybe (fromJust)
import qualified Data.Map as M
import ... |
b06416e6ddb71bef60f009244dad55118377994df3b67337b2f7bce960214c73 | plum-umd/c-strider | escape.ml |
*
* Copyright ( c ) 2003 ,
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source code must retain the above cop... | null | https://raw.githubusercontent.com/plum-umd/c-strider/3d3a3743bc28456eb6d50e01805ce484ab3c04e6/tools/cil-1.3.7/src/escape.ml | ocaml | * OCaml types used to represent wide characters and strings
limit checks whether upper > probe
a wide string represented as a list of int64s |
*
* Copyright ( c ) 2003 ,
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source code must retain the above cop... |
315f842beb4010352869e962c465fe5011fad9f3702da4b23d41814c2d08cb94 | malcolmreynolds/GSLL | gaussian.lisp | Gaussian distribution
, Sun Jul 16 2006 - 22:09
Time - stamp : < 2009 - 05 - 24 16:42:13EDT gaussian.lisp >
$ Id$
(in-package :gsl)
;;; /usr/include/gsl/gsl_randist.h
;;; /usr/include/gsl/gsl_cdf.h
(defmfun sample
((generator random-number-generator) (type (eql 'gaussian))
&key sigma)
"gsl_ran_g... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/random/gaussian.lisp | lisp | /usr/include/gsl/gsl_randist.h
/usr/include/gsl/gsl_cdf.h
Examples and unit test | Gaussian distribution
, Sun Jul 16 2006 - 22:09
Time - stamp : < 2009 - 05 - 24 16:42:13EDT gaussian.lisp >
$ Id$
(in-package :gsl)
(defmfun sample
((generator random-number-generator) (type (eql 'gaussian))
&key sigma)
"gsl_ran_gaussian"
(((mpointer generator) :pointer) (sigma :double))
:de... |
0e74fb23e1c288a9dd3d83069c0b09836269726b1d7437a79cc78b85f242364e | vivid-inc/ash-ra-template | project.clj | ; Run either with
; $ lein ring server
; or in a REPL:
; $ lein repl
hello.core= > ( ring.adapter.jetty/run-jetty app - handler { : port 3000 } )
;
; and then visit
; :3000/?nickname=beatrix
(defproject ring-server "1.0.0-SNAPSHOT"
:description "Minimal demonstration rendering responses i... | null | https://raw.githubusercontent.com/vivid-inc/ash-ra-template/f64be7efd6f52ccd451cddb851f02511d1665b11/examples/ring-server/project.clj | clojure | Run either with
$ lein ring server
or in a REPL:
$ lein repl
and then visit
:3000/?nickname=beatrix | hello.core= > ( ring.adapter.jetty/run-jetty app - handler { : port 3000 } )
(defproject ring-server "1.0.0-SNAPSHOT"
:description "Minimal demonstration rendering responses in Ring handlers using ART templates."
:dependencies [[org.clojure/clojure "1.10.0"]
... |
733d6d87b4ae9f4c7c7275d108797e66d03a156b7a4b112667529231fe5b3e34 | UU-ComputerScience/uhc | ForeignPtr.hs | # LANGUAGE NoImplicitPrelude , CPP #
# OPTIONS_GHC -XNoImplicitPrelude #
# EXCLUDE_IF_TARGET js #
{-# EXCLUDE_IF_TARGET cr #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.ForeignPtr
Copyright : ( c ) The University of Glasgow 2001
-- License :... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/ehclib/uhcbase/Foreign/ForeignPtr.hs | haskell | # EXCLUDE_IF_TARGET cr #
---------------------------------------------------------------------------
|
Module : Foreign.ForeignPtr
License : BSD-style (see the file libraries/base/LICENSE)
Stability : provisional
Portability : portable
The 'ForeignPtr' type and operations. This module is part o... | # LANGUAGE NoImplicitPrelude , CPP #
# OPTIONS_GHC -XNoImplicitPrelude #
# EXCLUDE_IF_TARGET js #
Copyright : ( c ) The University of Glasgow 2001
Maintainer :
Foreign Function Interface ( FFI ) and will usually be imported via
module Foreign.ForeignPtr
(
ForeignPtr
, Finali... |
92520f33afee680a0f2326fbb2c230dc39ace950b4ca5d4e429f96903a0e928b | pierric/neural-network | Gen.hs | # LANGUAGE FlexibleInstances , FlexibleContexts #
module Test.Gen where
import Test.Utils
import Test.QuickCheck
import Control.Monad
import qualified Numeric.LinearAlgebra as L
import Numeric.LinearAlgebra.Devel
import qualified Data.Vector.Storable as V
squared_real_matrices :: Int -> Gen (L.Matrix Float)
squared_re... | null | https://raw.githubusercontent.com/pierric/neural-network/406ecaf334cde9b10c9324e1f6c4b8663eae58d7/Backend-blashs/Test/Gen.hs | haskell | # LANGUAGE FlexibleInstances , FlexibleContexts #
module Test.Gen where
import Test.Utils
import Test.QuickCheck
import Control.Monad
import qualified Numeric.LinearAlgebra as L
import Numeric.LinearAlgebra.Devel
import qualified Data.Vector.Storable as V
squared_real_matrices :: Int -> Gen (L.Matrix Float)
squared_re... | |
6a53191bea3eea52c2ffcccb6b85ef79bc615bebc043dfed13cb00782f777d19 | facebookarchive/pfff | xdebug.ml | (*s: xdebug.ml *)
(*s: Facebook copyright *)
*
* Copyright ( C ) 2009 , 2010 , 2011 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_php/analyze/tools/xdebug.ml | ocaml | s: xdebug.ml
s: Facebook copyright
e: Facebook copyright
***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Wrappers
***********... |
*
* Copyright ( C ) 2009 , 2010 , 2011 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described ... |
be391ef555d66fd20c919b89ff89599ffe26f1f076779ab859df0777269783be | replikativ/replikativ | connect.cljc | (ns replikativ.connect
"Connection management middleware."
(:require [replikativ.environ :refer [*id-fn*]]
[replikativ.core :refer [wire]]
[kabel.peer :refer [drain]]
[konserve.core :as k]
#?(:clj [kabel.platform-log :refer [debug info warn error]])
[cloju... | null | https://raw.githubusercontent.com/replikativ/replikativ/1533a7e43e46bfb70e8c8eb34dc5708e611a478d/src/replikativ/connect.cljc | clojure | we intercept and track the subscription process
pass through
start handshake
wait for ack on backsubscription
notify initiator of the connection
keep connection scope for reconnects
build middleware pipeline with channel pair
from client-connect | (ns replikativ.connect
"Connection management middleware."
(:require [replikativ.environ :refer [*id-fn*]]
[replikativ.core :refer [wire]]
[kabel.peer :refer [drain]]
[konserve.core :as k]
#?(:clj [kabel.platform-log :refer [debug info warn error]])
[cloju... |
98816140bdb3216245ceeed2da5e548287dbe0198877fb114aeb240a86d59183 | f-f/markiki | db.cljs | (ns markiki.db)
;; -- Default app-db Value ---------------------------------------------------
;;
When the application first starts , this will be the value put in app - db
;; Look in core.cljs for "(dispatch-sync [:initialise-db])"
;;
(def default-value
{:articles [] ;; Vector containing all the ... | null | https://raw.githubusercontent.com/f-f/markiki/7a4fc37068c08e9f5566294af7b47339604886d5/src/markiki/db.cljs | clojure | -- Default app-db Value ---------------------------------------------------
Look in core.cljs for "(dispatch-sync [:initialise-db])"
Vector containing all the articles.
Each article has the following properties:
:title :text :last-modified :path
matched the last search query, ordered by score (DESC)
A single ... | (ns markiki.db)
When the application first starts , this will be the value put in app - db
(def default-value
Vector containing the 10 articles that better
|
4bdb83d1caba0873af15f731a26aee2c68b408b17af53b46fe4d510e27f7b3fa | shenxs/about-scheme | operator.rkt | #lang racket
(require "tensor.rkt")
(provide (all-defined-out))
;; in 输入 list of tensor 例如 (list x y)
op 计算函数 function 参数对应计算的数量 参数为 tensor中的值
gradient 梯度下降函数
(define (make-operator in op gradient)
(define (abstract-op) (apply op (map tensor-get in)) )
(define result (make-tensor (abstract-op)))
(d... | null | https://raw.githubusercontent.com/shenxs/about-scheme/d458776a62cb0bbcbfbb2a044ed18b849f26fd0f/bp/operator.rkt | racket | in 输入 list of tensor 例如 (list x y) | #lang racket
(require "tensor.rkt")
(provide (all-defined-out))
op 计算函数 function 参数对应计算的数量 参数为 tensor中的值
gradient 梯度下降函数
(define (make-operator in op gradient)
(define (abstract-op) (apply op (map tensor-get in)) )
(define result (make-tensor (abstract-op)))
(define (abstract-gradient) (apply gradi... |
2fc80e919b5a0d1960a8590e7ae5be209d3b4d1d2d637032358a7cda73fdd422 | brandonchinn178/advent-of-code | Day01.hs | import Data.List (groupBy, sort)
import Data.Ord (Down (..))
import Data.Time
main :: IO ()
main = withTimer $ do
input <- lines <$> readFile "2022/data/Day01.txt"
let elves = filter (/= [""]) $ groupBy (\a b -> not (null a || null b)) input
case map getDown $ sort $ map (Down . sum . map read) elves of
a:b... | null | https://raw.githubusercontent.com/brandonchinn178/advent-of-code/025cbb91bd4cd257be2dd49b50f8bf4414e5d05e/2022/Day01.hs | haskell | import Data.List (groupBy, sort)
import Data.Ord (Down (..))
import Data.Time
main :: IO ()
main = withTimer $ do
input <- lines <$> readFile "2022/data/Day01.txt"
let elves = filter (/= [""]) $ groupBy (\a b -> not (null a || null b)) input
case map getDown $ sort $ map (Down . sum . map read) elves of
a:b... | |
60d5c5e8c5789d48c221e7db7f62fcb07f9629584c5576d716655d278e24a133 | suvash/one-time | hotp.clj | (ns one-time.hotp
(:import java.nio.ByteBuffer
javax.crypto.spec.SecretKeySpec
javax.crypto.Mac)
(:require [one-time.codec :as codec]))
(declare hmac-sha-digest)
(declare get-hmac-sha-type-string)
(defn get-token
"Return a HOTP token (HMAC-Based One-Time Password Algorithm)
based on a s... | null | https://raw.githubusercontent.com/suvash/one-time/63981bbe1a27eaac80a2bda1b1887c4262c2a61f/src/one_time/hotp.clj | clojure | mutating api
mutating api | (ns one-time.hotp
(:import java.nio.ByteBuffer
javax.crypto.spec.SecretKeySpec
javax.crypto.Mac)
(:require [one-time.codec :as codec]))
(declare hmac-sha-digest)
(declare get-hmac-sha-type-string)
(defn get-token
"Return a HOTP token (HMAC-Based One-Time Password Algorithm)
based on a s... |
ac1a5191ffe5161ad3e2759da0feb2a450cc1e4e22ab5b0b83b3ece695aa9204 | janestreet/base_quickcheck | shrinker_example.ml | open Core
module Shrinker = Quickcheck.Shrinker
module Generator = Quickcheck.Generator
module Sorted_list = struct
type t = int list [@@deriving sexp]
let of_list list = List.stable_sort ~compare:Int.compare list
let to_list t = t
let quickcheck_generator elt =
let open Generator.Monad_infix in
List... | null | https://raw.githubusercontent.com/janestreet/base_quickcheck/b3dc5bda5084253f62362293977e451a6c4257de/examples/shrinker_example.ml | ocaml | Swap which line is commented below to see error message with shrinking.
run ()
Swap which line is commented below to see error message with shrinking.
run () | open Core
module Shrinker = Quickcheck.Shrinker
module Generator = Quickcheck.Generator
module Sorted_list = struct
type t = int list [@@deriving sexp]
let of_list list = List.stable_sort ~compare:Int.compare list
let to_list t = t
let quickcheck_generator elt =
let open Generator.Monad_infix in
List... |
9381f36f55cc8a63f588aada526e30dd6b78df410e228569033dbbffb0fea2b9 | haskell-works/avro | Schema.hs | module Avro.Gen.Schema
where
import Data.Avro.Schema.Schema
import Hedgehog
import qualified Hedgehog.Gen as Gen
import Hedgehog.Range (Range)
import qualified Hedgehog.Range as Range
null :: MonadGen m => m Schema
null = pure Null
boolean :: MonadGen m => m Schema
boolean = pure Boolean
deci... | null | https://raw.githubusercontent.com/haskell-works/avro/cee0869ce9e52db8942deb86aa66dd7355508d3c/test/Avro/Gen/Schema.hs | haskell | module Avro.Gen.Schema
where
import Data.Avro.Schema.Schema
import Hedgehog
import qualified Hedgehog.Gen as Gen
import Hedgehog.Range (Range)
import qualified Hedgehog.Range as Range
null :: MonadGen m => m Schema
null = pure Null
boolean :: MonadGen m => m Schema
boolean = pure Boolean
deci... | |
500db36dcecf35dfcc01ff02193ce53d44b919c6bd54337d27b8c600df2348d9 | JohnnyJayJay/slash | gateway_test.clj | (ns slash.gateway-test
(:require [slash.gateway :refer :all]
[clojure.test :refer :all]))
(deftest nop-test
(is (nil? (nop :arg))))
(def handler (constantly "foo"))
(def respond-fn (partial str "bar"))
(deftest return-mw-test
(is (= "barfoo" ((wrap-response-return handler respond-fn) :any))))
| null | https://raw.githubusercontent.com/JohnnyJayJay/slash/b62f3dbca65b37d31ac78a30611027cd4177267b/test/slash/gateway_test.clj | clojure | (ns slash.gateway-test
(:require [slash.gateway :refer :all]
[clojure.test :refer :all]))
(deftest nop-test
(is (nil? (nop :arg))))
(def handler (constantly "foo"))
(def respond-fn (partial str "bar"))
(deftest return-mw-test
(is (= "barfoo" ((wrap-response-return handler respond-fn) :any))))
| |
72c3aeb4649f512d4eeaecdf3bf501592212269dd37e2bfaef07fd3a147c5ec7 | prikhi/bodyweight-server | Main.hs | module Main where
import Network.Wai.Handler.Warp (run)
import System.Environment (lookupEnv)
import Database.Persist.Postgresql (runSqlPool)
import Config (defaultConfig, Config(..), Environment(..), setLogger, makePool)
import Api (app)
import Models (doMigrations)
| Grab Settings ... | null | https://raw.githubusercontent.com/prikhi/bodyweight-server/4c5bc92d3c35db676c94b6f32d3245231f97eb66/app/Main.hs | haskell | & Launch the Web Server. | module Main where
import Network.Wai.Handler.Warp (run)
import System.Environment (lookupEnv)
import Database.Persist.Postgresql (runSqlPool)
import Config (defaultConfig, Config(..), Environment(..), setLogger, makePool)
import Api (app)
import Models (doMigrations)
| Grab Settings ... |
f825b4243a852e1561eb1ae440edb0d960ed21b61ad3ea7327a8d7fd19576c0e | intermine/bluegenes | bootstrap.cljs | (ns bluegenes.components.bootstrap
(:require [reagent.core :as reagent]
[reagent.dom :as dom]
[reagent.dom.server :refer [render-to-static-markup]]
[oops.core :refer [ocall oapply oget oset!]]))
; TODO - Retire this version and use poppable instead
(defn popover
"Reagent wrap... | null | https://raw.githubusercontent.com/intermine/bluegenes/417ea23b2d00fdca20ce4810bb2838326a09010e/src/cljs/bluegenes/components/bootstrap.cljs | clojure | TODO - Retire this version and use poppable instead
svg below is the clickable content - e.g. an icon and/or words to go
along with it. Implemented as the 'remaining' arg below. | (ns bluegenes.components.bootstrap
(:require [reagent.core :as reagent]
[reagent.dom :as dom]
[reagent.dom.server :refer [render-to-static-markup]]
[oops.core :refer [ocall oapply oget oset!]]))
(defn popover
"Reagent wrapper for bootstrap's popover component. It accepts
hi... |
5d49836613b592d767bade40737211fb6002d41e7fa0ea07d370e3b65d072fa5 | rroohhh/guix_packages | horizon.scm | (define-module (vup horizon)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system glib-or-gtk)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages linux)
#:use-module (gnu packages serialization)
#:use-module (gnu packages gcc)
#:use-module (gnu pac... | null | https://raw.githubusercontent.com/rroohhh/guix_packages/117480ede867def846fa3120766864ed634e9321/vup/horizon.scm | scheme | (define-public opencascade-occt-fixed
no tests? | (define-module (vup horizon)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system glib-or-gtk)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages linux)
#:use-module (gnu packages serialization)
#:use-module (gnu packages gcc)
#:use-module (gnu pac... |
a1df826b4141795eb9c78ab74d66625106682fa0dd497570250c46a9023f9bb4 | picty/concerto | writeLine.ml | open FileOps
let _ =
if Array.length Sys.argv < 5 then exit 1;
let ops = prepare_data_dir Sys.argv.(1) in
ops.write_line Sys.argv.(2) Sys.argv.(3) (Array.to_list (Array.sub Sys.argv 4 ((Array.length Sys.argv) - 4)))
| null | https://raw.githubusercontent.com/picty/concerto/fac5dd04a5a3dcd91782e17b7bd3e0f4a9ddd2e0/writeLine.ml | ocaml | open FileOps
let _ =
if Array.length Sys.argv < 5 then exit 1;
let ops = prepare_data_dir Sys.argv.(1) in
ops.write_line Sys.argv.(2) Sys.argv.(3) (Array.to_list (Array.sub Sys.argv 4 ((Array.length Sys.argv) - 4)))
| |
5436ed4136be958900cc169ab50b6d11b38e25376acd5e94afdc6dc289892531 | tweag/ormolu | super-classes.hs | class () => Foo a
class Foo a => Bar a
class (Foo a,Bar a) =>
Baz a
class (
Foo a, -- Foo?
Bar a, -- Bar?
) => BarBar a
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/class/super-classes.hs | haskell | Foo?
Bar? | class () => Foo a
class Foo a => Bar a
class (Foo a,Bar a) =>
Baz a
class (
) => BarBar a
|
ab2d3087796d0466f153bbc8514b4b6045809e8f4d2241bdf5702021650d4bc8 | weblocks-framework/weblocks | presentation.lisp |
(in-package :weblocks)
(export '(presentation))
(eval-when (:compile-toplevel :load-toplevel :execute)
(defmethod view-argument-quoting-strategy ((arg-name (eql :present-as)))
:list)
(setf (gethash :present-as *custom-view-field-argument-compilers*)
(lambda (slot-name presentation)
(le... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/src/views/view/presentation.lisp | lisp | by default presentations have no dependencies, so the primary method
returns nil |
(in-package :weblocks)
(export '(presentation))
(eval-when (:compile-toplevel :load-toplevel :execute)
(defmethod view-argument-quoting-strategy ((arg-name (eql :present-as)))
:list)
(setf (gethash :present-as *custom-view-field-argument-compilers*)
(lambda (slot-name presentation)
(le... |
f9f0723dbe9f1be0e9d183b420c56390441aac1257be0fa1ee6226c5fcac1569 | gowthamk/ocaml-irmin | test_merge4.ml | original = | |
q1 =
q2 = |5||6|
q1 = |5|
q2 = |5||6| *)
module U = struct
let string_of_list f l = "[ " ^ List.fold_left (fun a b -> a ^ (f b) ^ "; ") "" l ^ "]"
let print_header h = Printf.printf "%s" ("\n" ^ h ^ "\n")
end
(* Queue *)
let _ =
U.print_header "Heap4";
let module Atom = stru... | null | https://raw.githubusercontent.com/gowthamk/ocaml-irmin/54775f6c3012e87d2d0308f37a2ec7b27477e887/heap_leftist/mem/test_merge4.ml | ocaml | Queue | original = | |
q1 =
q2 = |5||6|
q1 = |5|
q2 = |5||6| *)
module U = struct
let string_of_list f l = "[ " ^ List.fold_left (fun a b -> a ^ (f b) ^ "; ") "" l ^ "]"
let print_header h = Printf.printf "%s" ("\n" ^ h ^ "\n")
end
let _ =
U.print_header "Heap4";
let module Atom = struct
type t ... |
630e29b931974770702b4874718592d97150476ea1c4c671e4daf933a02b3f84 | spechub/Hets | HasCASL2THF0Buildins.hs | |
Module : ./THF / HasCASL2THF0Buildins.hs
Description : create legal THF mixfix identifier
Copyright : ( c ) , DFKI Bremen 2011
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
translations for the buildins o... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/THF/HasCASL2THF0Buildins.hs | haskell | ---------------------------------------------------------------------------
--------------------------------------------------------------------------- -}
, (whenElse, "hcc" ++ show whenElse)
---------------------------------------------------------------------------
----------------------------------------------... | |
Module : ./THF / HasCASL2THF0Buildins.hs
Description : create legal THF mixfix identifier
Copyright : ( c ) , DFKI Bremen 2011
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
translations for the buildins o... |
6533259ef3d7d716e84fc4e2a3c3dc626c37f15b56add39d83134ad4c3baa9ca | input-output-hk/hydra | Main.hs | module Main where
import Hydra.Prelude
import qualified HydraTestUtilsSpec
import Test.Hspec.Runner
import Test.Hydra.Prelude (combinedHspecFormatter)
main :: IO ()
main = hspecWith defaultConfig{configFormat = Just (combinedHspecFormatter "hydra-test-utils")} HydraTestUtilsSpec.spec
| null | https://raw.githubusercontent.com/input-output-hk/hydra/2e01e0422d0d0fe08fb2c5437678ea4f5087faec/hydra-test-utils/test/Main.hs | haskell | module Main where
import Hydra.Prelude
import qualified HydraTestUtilsSpec
import Test.Hspec.Runner
import Test.Hydra.Prelude (combinedHspecFormatter)
main :: IO ()
main = hspecWith defaultConfig{configFormat = Just (combinedHspecFormatter "hydra-test-utils")} HydraTestUtilsSpec.spec
| |
70b25ac8a85ffc0276a56f6427fa6436357c573a26843b2db0fd93d899cb62eb | w3ntao/sicp-solution | 3-33.rkt | #lang racket
(require (combine-in (only-in "../ToolBox/ConstraintSystem/connector.rkt"
make-connector
set-value!
constant
probe)
(only-in "../ToolBox/ConstraintSystem/constraint.... | null | https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/chap-3/3-33.rkt | racket | #lang racket
(require (combine-in (only-in "../ToolBox/ConstraintSystem/connector.rkt"
make-connector
set-value!
constant
probe)
(only-in "../ToolBox/ConstraintSystem/constraint.... | |
105f98ef58f5b51ea1c364d698446178667355d5866c8fc89b128db1ee781c68 | onedata/op-worker | monitoring_event_handler.erl | %%%-------------------------------------------------------------------
@author
( C ) 2016 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc Module containing functions used to ha... | null | https://raw.githubusercontent.com/onedata/op-worker/b09f05b6928121cec4d6b41ce8037fe056e6b4b3/src/modules/monitoring/event/monitoring_event_handler.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc Module containing functions used to handle monitoring events.
@end
-------------------------------------------------------------------
API Handling
API Aggregation
=====... | @author
( C ) 2016 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(monitoring_event_handler).
-author("Michal Wrona").
-include("modules/events/definitions.hrl").
-include("modules/monitoring/events.hrl").
-include("modules/fslogic/fslogic_common.hrl").
-i... |
79a1e738f26bab02e996c2968571efc26f49d10b31f27d99b11edcee7b6ed4be | informatimago/commands | insulte.lisp | -*- mode : lisp ; coding : utf-8 -*-
(defparameter insults
'(
("accapareur" (nm))
("aérolithe" (nm))
("amiral de bateaulavoir" (gnm))
("amphitryon" (nm))
("anacoluthe" (nf))
("analphabète" (n a))
("anthracite" (nm))
("anthropophage" (nm a))
("anthropopithèque" (nm))
("apach... | null | https://raw.githubusercontent.com/informatimago/commands/65d0d6385269f3e210aed4943aefdbb5372706b9/sources/commands/insulte.lisp | lisp | coding : utf-8 -*-
insults
THE END ;;;; |
(defparameter insults
'(
("accapareur" (nm))
("aérolithe" (nm))
("amiral de bateaulavoir" (gnm))
("amphitryon" (nm))
("anacoluthe" (nf))
("analphabète" (n a))
("anthracite" (nm))
("anthropophage" (nm a))
("anthropopithèque" (nm))
("apache" (nm))
("apprenti dictateur à la ... |
d27a9cb047ea9fa766aca33b06d00ec59ee5b8e8fffece435b486c471930dcba | mhuebert/yawn | hooks.cljs | (ns yawn.hooks
(:require ["react" :as react]
["use-sync-external-store/shim" :refer [useSyncExternalStore]]
[applied-science.js-interop :as j]))
;; a type for wrapping react/useState to support reset! and swap!
(deftype AtomLike [st]
IIndexed
(-nth [coll i] (aget st i))
(-nth [coll i nf... | null | https://raw.githubusercontent.com/mhuebert/yawn/ec725be4808dd08f60ec8770a02f19df5ae3af43/src/main/yawn/hooks.cljs | clojure | a type for wrapping react/useState to support reset! and swap!
`constantly` allows functions to be passed as `new-value`
(use `swap!` to pass a function that should be applied to prev value)
utility for wrapping function to return `js/undefined` for non-functions
we must use the (.-current ^js this) form here to e... | (ns yawn.hooks
(:require ["react" :as react]
["use-sync-external-store/shim" :refer [useSyncExternalStore]]
[applied-science.js-interop :as j]))
(deftype AtomLike [st]
IIndexed
(-nth [coll i] (aget st i))
(-nth [coll i nf] (or (aget st i) nf))
IDeref
(-deref [^js this] (aget st 0))
... |
76d366bf0aa8c350f2b717872e554356344a01a6cdb28fc8939740fdef48afff | lispbuilder/lispbuilder | rwops.lisp |
(in-package #:lispbuilder-sdl-cffi)
(cffi:defcstruct SDL-RWops
(seek :pointer)
(read :pointer)
(write :pointer)
(close :pointer)
(type :unsigned-int)
(hidden :pointer))
(cffi:defcunion SDL_RWops_hidden
#+win32(SDL_RWops_win32io :pointer)
#-win32(SDL_RWops_have_stdio_h :pointer)
(mem :pointer)
(unknown :poi... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl/cffi/rwops.lisp | lisp |
(in-package #:lispbuilder-sdl-cffi)
(cffi:defcstruct SDL-RWops
(seek :pointer)
(read :pointer)
(write :pointer)
(close :pointer)
(type :unsigned-int)
(hidden :pointer))
(cffi:defcunion SDL_RWops_hidden
#+win32(SDL_RWops_win32io :pointer)
#-win32(SDL_RWops_have_stdio_h :pointer)
(mem :pointer)
(unknown :poi... | |
4da2715b7adf575693943a0cf421dde472291349d663163666d1f6dbde55fda0 | vikram/lisplibraries | request-handler-utils.lisp |
(in-package :weblocks-test)
(defun with-request-template (body &key
(title "Hello")
render-debug-toolbar-p widget-stylesheets)
(format nil "~
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" ~
\"-strict.dtd\">~%~
<html xmlns=''>~
<head>~
<title>~A</title>~
charset = utf-8 ' />~
<link r... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/test/request-handler-utils.lisp | lisp | </div>~ |
(in-package :weblocks-test)
(defun with-request-template (body &key
(title "Hello")
render-debug-toolbar-p widget-stylesheets)
(format nil "~
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" ~
\"-strict.dtd\">~%~
<html xmlns=''>~
<head>~
<title>~A</title>~
charset = utf-8 ' />~
<link r... |
0854507628a813a392d96478d85b5634d9a26e67dacd8d09cc1e6bb0fda57781 | openeuler-mirror/secGear | Edger8r.ml |
* Copyright ( C ) 2011 - 2021 Intel Corporation . All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions
* are met :
*
* * Redistributions of source code must retain the above copyright
... | null | https://raw.githubusercontent.com/openeuler-mirror/secGear/23fc7f043ba8c6a5114c6dc79261b3d7bad1bd98/tools/codegener/intel/Edger8r.ml | ocaml |
* Copyright ( C ) 2011 - 2021 Intel Corporation . All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions
* are met :
*
* * Redistributions of source code must retain the above copyright
... | |
e1103b5e28e2b60f5266e5143af22ab81af2a46a2436533db33bc0a15d16f3fa | eslick/cl-stdutils | plotutils.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : utils -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: plotutils.lisp
Purpose : Extensions to 's interface
Programmer :
Date Started : Janu... | null | https://raw.githubusercontent.com/eslick/cl-stdutils/4a4e5a4036b815318282da5dee2a22825369137b/src/plotutils.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : utils -*-
*************************************************************************
FILE IDENTIFICATION
Name: plotutils.lisp
-------------------
General plot utils
-------------------
----------------------------
Data manipulation utilities
-----... | Purpose : Extensions to 's interface
Programmer :
Date Started : January 2005
(in-package :utils)
(defun-exported add-titles-to-data (titles datums)
(assert (>= (length titles) (length datums)))
(mapcar (lambda (title dlist)
(cons title dlist))
titles
datums))
(defun find-all... |
1324c0be6b827ca603d013faa6f00edd5c30622dac01153acd054a2f5c473eee | Andromedans/andromeda | nucleus_json.ml | (** Conversion to JSON *)
open Nucleus_types
let assumptions { free_var ; free_meta ; bound_var ; bound_meta } =
let free_var =
if Nonce.map_is_empty free_var
then []
else [("free_var", Nonce.Json.map free_var)]
and free_meta =
if Nonce.map_is_empty free_meta
then []
else [("free_meta", No... | null | https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/src/nucleus/nucleus_json.ml | ocaml | * Conversion to JSON |
open Nucleus_types
let assumptions { free_var ; free_meta ; bound_var ; bound_meta } =
let free_var =
if Nonce.map_is_empty free_var
then []
else [("free_var", Nonce.Json.map free_var)]
and free_meta =
if Nonce.map_is_empty free_meta
then []
else [("free_meta", Nonce.Json.map free_meta)]
... |
48ad60230f69f3eac454395e8e1828f93c2078e2ae796de590c6da9cc76f422f | purebred-mua/purebred | Client.hs | -- This file is part of purebred
Copyright ( C ) 2022 and
--
-- purebred is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any later version... | null | https://raw.githubusercontent.com/purebred-mua/purebred/5240c08a3ca1555d9e18635e54520a2dfa6d21d4/src/Purebred/Storage/Client.hs | haskell | This file is part of purebred
purebred is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ... | Copyright ( C ) 2022 and
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Affero General Public License
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
module Pure... |
dcbc77337137b13fc7311cc754ecc5a05b272f281e9a4e8d3a6e62d47a06e325 | kelsey-sorrels/robinson | inventory_test.clj | (ns robinson.inventory-test
(:require [robinson.common :as rc]
[robinson.inventory :as ri]
[robinson.monstergen :as mg]
[robinson.itemgen :as ig]
[clojure.test :as t
:refer (is are deftest with-test run-tests testing)]))
(deftest test-add-items
(let [st... | null | https://raw.githubusercontent.com/kelsey-sorrels/robinson/337fd2646882708331257d1f3db78a3074ccc67a/test/clj/robinson/inventory_test.clj | clojure | expected = actual
items
inventory
expected = actual
items
expected = actual
items
inventory | (ns robinson.inventory-test
(:require [robinson.common :as rc]
[robinson.inventory :as ri]
[robinson.monstergen :as mg]
[robinson.itemgen :as ig]
[clojure.test :as t
:refer (is are deftest with-test run-tests testing)]))
(deftest test-add-items
(let [st... |
086773cfbb6647ed1b6f8e1a81963f5143e19b0fda7c25c0d8a35b0ad44d4f16 | Armael/conch | types.ml | open Common
type tybase = Tvoid | Tint8 | Tint16
type ty =
| Tbase of tybase
| Tptr of ty
(* in bytes *)
let sizeof = function
| Tbase Tvoid -> 0
| Tbase Tint8 -> 1
| Tbase Tint16 | Tptr _ -> 2
let type_of_const = function
| C8 _ -> Tbase Tint8
| C16 _ -> Tbase Tint16
(* printing *)
let pp_tybase fmt... | null | https://raw.githubusercontent.com/Armael/conch/8a72f98a8d29cb8f678a69db95d5b68964304053/lib/types.ml | ocaml | in bytes
printing | open Common
type tybase = Tvoid | Tint8 | Tint16
type ty =
| Tbase of tybase
| Tptr of ty
let sizeof = function
| Tbase Tvoid -> 0
| Tbase Tint8 -> 1
| Tbase Tint16 | Tptr _ -> 2
let type_of_const = function
| C8 _ -> Tbase Tint8
| C16 _ -> Tbase Tint16
let pp_tybase fmt = function
| Tvoid -> Forma... |
c96982ed66a77bb1479c03001d933d2fdac64f8f2e87c6289afc763da244c72d | ollef/sixty | Telescope.hs | {-# LANGUAGE OverloadedStrings #-}
module Core.Domain.Telescope where
import Core.Binding (Binding)
import qualified Core.Domain as Domain
import Monad
import Plicity
import Protolude
data Telescope base
= Empty !base
| Extend !Binding !Domain.Type !Plicity (Domain.Value -> M (Telescope base))
apply :: Telescop... | null | https://raw.githubusercontent.com/ollef/sixty/2582551f3c12f84489afb961b800f0d7cfa74844/src/Core/Domain/Telescope.hs | haskell | # LANGUAGE OverloadedStrings # |
module Core.Domain.Telescope where
import Core.Binding (Binding)
import qualified Core.Domain as Domain
import Monad
import Plicity
import Protolude
data Telescope base
= Empty !base
| Extend !Binding !Domain.Type !Plicity (Domain.Value -> M (Telescope base))
apply :: Telescope k -> [(Plicity, Domain.Value)] ->... |
bd90e5aac278e5b0c14172089defcb9a9ecbda8303a7891c4d848e0a1361d1e1 | returntocorp/semgrep | Test_dataflow_tainting.ml | open Common
module G = AST_generic
module RM = Range_with_metavars
module DataflowX = Dataflow_core.Make (struct
type node = IL.node
type edge = IL.edge
type flow = (node, edge) CFG.t
let short_string_of_node n = Display_IL.short_string_of_node_kind n.IL.n
end)
let pr2_ranges file rwms =
rwms
|> List.ite... | null | https://raw.githubusercontent.com/returntocorp/semgrep/ab09346ea6471a5c7f4db0791657d35d6de61817/src/engine/Test_dataflow_tainting.ml | ocaml | go into nested functions
Check each function definition. | open Common
module G = AST_generic
module RM = Range_with_metavars
module DataflowX = Dataflow_core.Make (struct
type node = IL.node
type edge = IL.edge
type flow = (node, edge) CFG.t
let short_string_of_node n = Display_IL.short_string_of_node_kind n.IL.n
end)
let pr2_ranges file rwms =
rwms
|> List.ite... |
8aa0825b1e664aaecc6a7d42fb555c80776178c9beb1a6e78ec7a9a4c8538d9b | alexpeits/harg | Subcommands.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE UndecidableInstances #
module Options.Harg.Subcommands
( Subcommands (..),
)
where
import qualified Barbies as B
import Data.Functor.Compose (Compose (..))
import Data.Kind (Type)
import Data.Proxy (Proxy (..))
import GHC.TypeLits (KnownSymbol, Symbol, symbolVal)
import... | null | https://raw.githubusercontent.com/alexpeits/harg/a5a684ba974a788f97836888e8631199c550a73f/src/Options/Harg/Subcommands.hs | haskell | Given the sources to use and the association list between the command string
and the command type, it returns the list of command field modifiers and a
list of errors.
The result can be used as follows:
@
...
(errs, commands) = 'mapSubcommand' sources opts
parser = 'Optparse.subparser' ('mconcat' comman... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE UndecidableInstances #
module Options.Harg.Subcommands
( Subcommands (..),
)
where
import qualified Barbies as B
import Data.Functor.Compose (Compose (..))
import Data.Kind (Type)
import Data.Proxy (Proxy (..))
import GHC.TypeLits (KnownSymbol, Symbol, symbolVal)
import... |
610140f0ad4315c4b69f7d854e06a75cca4e6d3b0a1019ee0434cca18437fcf3 | pixlsus/registry.gimp.org_static | resize-match-dpi_0.scm | ; Resize-match-dpi - Scales an image and its DPI
Copyright ( C ) 2010
; This software is released under the terms of the
GNU General Public License version 3.0 or later
(define (resize-match-dpi image drawable newwidth newheight)
(let* (
(oldwidth (car (gimp-image-width image)))
(oldheight (car (g... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/resize-match-dpi_0.scm | scheme | Resize-match-dpi - Scales an image and its DPI
This software is released under the terms of the
| Copyright ( C ) 2010
GNU General Public License version 3.0 or later
(define (resize-match-dpi image drawable newwidth newheight)
(let* (
(oldwidth (car (gimp-image-width image)))
(oldheight (car (gimp-image-height image)))
(newdpi 0)
)
(if (= newheight 0)
(set! newheight (... |
bd9d46453d29f0056e59beba2d30d51be775ec0ade00d2e7ed996cd4e090fbef | gsakkas/rite | 2492.ml |
type expr =
| VarX
| VarY
| Sine of expr
| Cosine of expr
| Average of expr* expr
| Times of expr* expr
| Thresh of expr* expr* expr* expr
| Thresh2 of expr* expr
| Thresh3 of expr* expr;;
let pi = 4.0 *. (atan 1.0);;
let rec eval (e,x,y) =
let rec evalhelper e x y =
match e with
| VarX ... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/2492.ml | ocaml |
type expr =
| VarX
| VarY
| Sine of expr
| Cosine of expr
| Average of expr* expr
| Times of expr* expr
| Thresh of expr* expr* expr* expr
| Thresh2 of expr* expr
| Thresh3 of expr* expr;;
let pi = 4.0 *. (atan 1.0);;
let rec eval (e,x,y) =
let rec evalhelper e x y =
match e with
| VarX ... | |
a8c7271e8418eed61d79b7088b79b9a5720bffbb9c2cba3822d71a72a9ee42a4 | kazzmir/master-of-magic | option.ml |
* Option - functions for the option type
* Copyright ( C ) 2003
*
* 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 2.1 of the License , or ... | null | https://raw.githubusercontent.com/kazzmir/master-of-magic/830bfd1c549a5ac7370fa6a72bb06be5d3435fa0/lib/extlib-1.5/option.ml | ocaml |
* Option - functions for the option type
* Copyright ( C ) 2003
*
* 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 2.1 of the License , or ... | |
6561b7910364f99a7651da68d24650bfa8f3c82f13c2e9de812daf57da5d492e | bcc32/projecteuler-ocaml | euler_solutions.mli | open! Core
open! Import
val all : (string, (module Solution.S)) List.Assoc.t
| null | https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/sol/euler_solutions.mli | ocaml | open! Core
open! Import
val all : (string, (module Solution.S)) List.Assoc.t
| |
389b5738311590a7e4dc4147fdd91a31ea2486395d8b4566396a2ff7122fc34b | polysemy-research/polysemy | PluginSpec.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
module PluginSpec where
import Data.Functor.Identity
import GHC.Exts
import Polysemy
import Polysemy.Error
import Polysemy.State
import Polysemy.Output
import Test.Hspec
import Unsafe.Coerce
... | null | https://raw.githubusercontent.com/polysemy-research/polysemy/43a67061fb2a6cd2f545c5bd5e8320f2a228fb6b/polysemy-plugin/test/PluginSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE GeneralizedNewtypeDeriving #
module PluginSpec where
import Data.Functor.Identity
import GHC.Exts
import Polysemy
import Polysemy.Error
import Polysemy.State
import Polysemy.Output
import Test.Hspec
import Unsafe.Coerce
idState :: Member (State s) r => Sem r ()
i... |
37ef8806b619050feb245696ee62899519cb3625be29b2e454895c1893f14dc1 | dyzsr/ocaml-selectml | pr6651_ok.ml | (* TEST
flags = " -w -a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
module type S = sig
module type T
module X : T
end
module F (X : S) = X.X
module M = struct
module type T = sig type t end
module X = struct type t = int end
end
type t = F(M).t
| null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-modules-bugs/pr6651_ok.ml | ocaml | TEST
flags = " -w -a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
|
module type S = sig
module type T
module X : T
end
module F (X : S) = X.X
module M = struct
module type T = sig type t end
module X = struct type t = int end
end
type t = F(M).t
|
ec31dd9a8130a35736b189d6db907ac7d911b395298edda60b401cbf468aef89 | patricoferris/ocaml-multicore-monorepo | log.ml | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
(* Among other things, this module wraps the Logs library so as to prepend
request ids to log messages.
However, in... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/src/server/log.ml | ocaml | Among other things, this module wraps the Logs library so as to prepend
request ids to log messages.
However, instead of prepending the id at the front end of Logs, in the
wrappers, we prepend the id at the back end instead - in the reporter. The
rationale for this is that we want to (try to) prepend the ... | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
module Message = Dream_pure.Message
module Method = Dream_pure.Method
module Status = Dream_pure.Status
type log_level... |
6b05337be8e15011c10d423ca657c9da7648213e5c2e01e02ec13ac6d5bf8cf8 | tommaisey/aeon | sweep.help.scm | ;; Using sweep to modulate sine frequency
(let* ((t (impulse kr (mouse-x kr 0.5 20 1 0.1) 0))
(f (add (sweep t 700) 500)))
(audition (out 0 (mul (sin-osc ar f 0) 0.2))))
;; Using sweep to index into a buffer
(with-sc3
(lambda (fd)
(async fd (b-alloc-read 0 "/home/rohan/audio/metal.wav" 0 0))))
(let* ((... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/triggers/sweep.help.scm | scheme | Using sweep to modulate sine frequency
Using sweep to index into a buffer
Backwards, variable offset
Raising rate |
(let* ((t (impulse kr (mouse-x kr 0.5 20 1 0.1) 0))
(f (add (sweep t 700) 500)))
(audition (out 0 (mul (sin-osc ar f 0) 0.2))))
(with-sc3
(lambda (fd)
(async fd (b-alloc-read 0 "/home/rohan/audio/metal.wav" 0 0))))
(let* ((t (impulse ar (mouse-x kr 0.5 20 1 0.1) 0))
(i (sweep t (buf-sample-rate ... |
2e9478c99f8d45499b58625a02134c00931182879ede51dd04aa7690b7222ac8 | geophf/1HaskellADay | Solution.hs | module Y2018.M10.D08.Solution where
-
Happy Columbus Day and Indiginous People 's Day !
Today , we are given a set of ids for today and we will generate a subset of
those ids , given a set of indices . You can look at this as a random draw for
screening , perhaps . Or something else , if you 'd like .
-
Hap... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M10/D08/Solution.hs | haskell | }
We convert the list to an array to eliminate multiple linear traversals
while indexing into the ids to get the selected members.
} | module Y2018.M10.D08.Solution where
-
Happy Columbus Day and Indiginous People 's Day !
Today , we are given a set of ids for today and we will generate a subset of
those ids , given a set of indices . You can look at this as a random draw for
screening , perhaps . Or something else , if you 'd like .
-
Hap... |
2c96b6baff71efe131ed124bf8107e6620d205be9cdc9551858b4a820c7ce2a0 | yminsky/experiment-with-ocaml-5 | fib.mli | open! Base
module Seq : sig
val fib : int -> int
end
module Par : sig
val fib : num_domains:int -> int -> int
end
| null | https://raw.githubusercontent.com/yminsky/experiment-with-ocaml-5/47e609688c9381479326d73b7eede5003747f434/bench/fib.mli | ocaml | open! Base
module Seq : sig
val fib : int -> int
end
module Par : sig
val fib : num_domains:int -> int -> int
end
| |
df6395591338bacb50374f79e5c13a6e45678357410a75413d0d5639174021b5 | Ericson2314/lighthouse | BlockTable.hs | -- #hide
-----------------------------------------------------------------------------
-- |
Module : Text . .
Copyright : ( c ) , and the Oregon Graduate Institute of
Science and Technology , 1999 - 2001
-- License : BSD-style (see the file LICENSE)
Maintainer : <... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/xhtml/Text/XHtml/BlockTable.hs | haskell | #hide
---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : portable
An XHTML combinator library
These combinators can be used to build formated 2D tables.
The specific target usage is for HTML t... |
Module : Text . .
Copyright : ( c ) , and the Oregon Graduate Institute of
Science and Technology , 1999 - 2001
Maintainer : < >
Examples of use :
|Hello|
Note : single has type
single : : a - > BlockTable a
So the cells can contain an... |
a03eb6d93abefec0cd0a364b11772a7a0db3390d6186d563b20d339e5224144a | wulczer/tsung_ws | ts_config_websocket.erl | -module(ts_config_websocket).
-export([parse_config/2]).
-include("ts_profile.hrl").
-include("ts_websocket.hrl").
-include("ts_config.hrl").
-include("xmerl.hrl").
% parse dynamic variables
parse_config(Element = #xmlElement{name=dyn_variable}, Conf = #config{}) ->
ts_config:parse(Element,Conf);
% parse webso... | null | https://raw.githubusercontent.com/wulczer/tsung_ws/4395d4e84a4f763da427d41ed9552a552f3f0fa7/src/tsung_controller/ts_config_websocket.erl | erlang | parse dynamic variables
parse websocket tags
send messages can be no_ack, the rest is always ack = parse
connect message can have a origin attribute
parse other tags | -module(ts_config_websocket).
-export([parse_config/2]).
-include("ts_profile.hrl").
-include("ts_websocket.hrl").
-include("ts_config.hrl").
-include("xmerl.hrl").
parse_config(Element = #xmlElement{name=dyn_variable}, Conf = #config{}) ->
ts_config:parse(Element,Conf);
parse_config(Element = #xmlElement{name... |
0ff396ae38ea6c26d1901f5a8995082c48dad834606f4473e443bbf02af1da5e | facebook/duckling | Corpus.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Time.EN.Corpus
( corpus
, defaultCorpus
, negative... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Time/EN/Corpus.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE OverloadedStrings #
yes, the result is in the past, we may need to revisit | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Time.EN.Corpus
( corpus
, defaultCorpus
, negativeCorpus
, latentCorpus
, diffCorpus
) where
import Data.String
import Prelude
import Duckling.Core
import Duckling.Testing.Types hiding (examples)
import Duckling.Time.Corpus
import Duckl... |
f1161b7ea5646a5e36d3b981cb0331d9d24c98ef17b9f47726ab9ed919e57756 | tmattio/js-bindings | vscode_languageclient_linked_editing_range.mli | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]]
open Es5
(* import * as code from 'vscode'; *)
(* import * as proto from 'vscode-languageserver-protocol'; *)
(* import { TextDocumentFeature, BaseLanguageClient } from './client'; *)
module ProvideLinkedEditingRangeSignature : si... | null | https://raw.githubusercontent.com/tmattio/js-bindings/ca3bd6a12db519c8de7f41b303f14cf70cfd4c5f/lib/vscode-languageclient/vscode_languageclient_linked_editing_range.mli | ocaml | import * as code from 'vscode';
import * as proto from 'vscode-languageserver-protocol';
import { TextDocumentFeature, BaseLanguageClient } from './client'; | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]]
open Es5
module ProvideLinkedEditingRangeSignature : sig
type t
val t_to_js : t -> Ojs.t
val t_of_js : Ojs.t -> t
val apply
: t
-> this:unit
-> document:Code.TextDocument.t
-> position:Code.Position.t
... |
d4615fe80afb474eecaf32e5e16d7b05a757f8907eb3d33a2f626a9144653376 | bhaskara/programmable-reinforcement-learning | maxq0.lisp | (defpackage maxq0
(:documentation
"Package for the MAXQ0 algorithm and associated feature templates for concurrent ALisp programs.
")
(:use common-lisp
utils
policy
calisp-obs)
(:export
<maxq0>))
(in-package maxq0)
(defclass <maxq0> (<calisp-learning-algorithm> <q-learning-algorithm>)
((prev-o... | null | https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/envs/stratagus/resource/maxq0.lisp | lisp | inform-end-choice-block | (defpackage maxq0
(:documentation
"Package for the MAXQ0 algorithm and associated feature templates for concurrent ALisp programs.
")
(:use common-lisp
utils
policy
calisp-obs)
(:export
<maxq0>))
(in-package maxq0)
(defclass <maxq0> (<calisp-learning-algorithm> <q-learning-algorithm>)
((prev-o... |
6ac0fd228e614f9b703d8e856c2d065e843e11239811e83d771f3248e113845e | Funky-Punky/FPV_SS22_Repetitorium | assignment.mli | module type Queue = sig
type 'a t
exception NoElementLeft
val create_queue : unit -> 'a t
val enqueue : 'a t -> 'a -> unit
val dequeue_opt : 'a t -> 'a option
val dequeue : 'a t -> 'a
val empty : 'a t -> unit
val reverse : 'a t -> unit
val discard_queue : 'a t -> unit
end
module MyQueue : Queue
| null | https://raw.githubusercontent.com/Funky-Punky/FPV_SS22_Repetitorium/99e0d0f63513d3b809d7b26bb1a511f28d1d71c3/solutions/queue/src/assignment.mli | ocaml | module type Queue = sig
type 'a t
exception NoElementLeft
val create_queue : unit -> 'a t
val enqueue : 'a t -> 'a -> unit
val dequeue_opt : 'a t -> 'a option
val dequeue : 'a t -> 'a
val empty : 'a t -> unit
val reverse : 'a t -> unit
val discard_queue : 'a t -> unit
end
module MyQueue : Queue
| |
efaec2ef18befa58e685ddeea4166ff6f6af760f00c906c799b4f4c0cb0a680e | ryanpbrewster/haskell | number_pairs.hs | -- number_pairs.hs
- You are given a sorted array of positive integers and a number ' X ' . Print
- out all pairs of numbers whose sum is equal to X. Print out only unique
- pairs and the pairs should be in ascending order
- Input sample :
-
- Your program should accept as its first argument a filenam... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/CodeEval/number_pairs.hs | haskell | number_pairs.hs |
- You are given a sorted array of positive integers and a number ' X ' . Print
- out all pairs of numbers whose sum is equal to X. Print out only unique
- pairs and the pairs should be in ascending order
- Input sample :
-
- Your program should accept as its first argument a filename . This file will ... |
abf3f13cd44cd742e49448717088ed7c15e21a12d824c67fe5383b254a965aac | picty/parsifal | libntp.ml | open Parsifal
open BasePTypes
open PTypes
alias association_id = uint16
alias keyid = uint32
alias reference_clock_code [novalueof] = string(4)
let value_of_reference_clock_code refcode =
let value =
match refcode with
| "GOES" -> "GEOS Geosynchroneous Orbit Environment Satellite"
| "GPS\... | null | https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/net/libntp.ml | ocaml | RFC1305 %B.1
RFC1305 %B.2.3
RFC1305 %B.2.1
RFC1305 %B.2.1
RFC1305 %B.2.2
RFC1305 %B.2.2
RFC1305 %B.2.2
RFC1305 %B.2.2
RFC1305 %B.2.3
RFC1305 %B.2.3
RFC1305 %B.2.4
RFC1305 %B.2.4
RFC1305 %B.2
XXX FM: Do we really want to accept that the len is nonesense and still parse it?
RFC1305 %B.3 Read ... | open Parsifal
open BasePTypes
open PTypes
alias association_id = uint16
alias keyid = uint32
alias reference_clock_code [novalueof] = string(4)
let value_of_reference_clock_code refcode =
let value =
match refcode with
| "GOES" -> "GEOS Geosynchroneous Orbit Environment Satellite"
| "GPS\... |
f113241d7cf56b19a5289e24a0c072f82874df2a8d8d98614a1d33d63f883a34 | namin/staged-miniKanren | staged-regexp.scm | inspired by -parsing-with-derivatives
(define regexp-NULL #f) ; -- the empty set
(define regexp-BLANK #t) ; -- the empty string
(define (valid-seqo exp)
(fresh (pat1 pat2)
(== `(seq ,pat1 ,pat2) exp)
(=/= regexp-NULL pat1)
(=/= regexp-BLANK pat1)
(=/= regexp-NULL pat2)
(=/= regexp-BLANK p... | null | https://raw.githubusercontent.com/namin/staged-miniKanren/f5b665170000720f5d499ab03f31b5c55871ec4f/staged-regexp.scm | scheme | -- the empty set
-- the empty string
remove nested reps | inspired by -parsing-with-derivatives
(define (valid-seqo exp)
(fresh (pat1 pat2)
(== `(seq ,pat1 ,pat2) exp)
(=/= regexp-NULL pat1)
(=/= regexp-BLANK pat1)
(=/= regexp-NULL pat2)
(=/= regexp-BLANK pat2)))
(define (seqo pat1 pat2 out)
(conde
[(== regexp-NULL pat1) (== regexp-NULL out)]
... |
601cbeada668406e3ced009d80f243be2b15440082db07f288d7308ffe05e189 | l29ah/hatexmpp3 | GTK.hs | module GTK.GTK where
import Control.Concurrent
import Graphics.UI.Gtk
initGTK :: IO ()
initGTK = do
forkIO $ do
unsafeInitGUIForThreadedRTS
mainGUI
return ()
| null | https://raw.githubusercontent.com/l29ah/hatexmpp3/9d3e25c6acf4c0978a2c1d88b3572ad20b1c228d/GTK/GTK.hs | haskell | module GTK.GTK where
import Control.Concurrent
import Graphics.UI.Gtk
initGTK :: IO ()
initGTK = do
forkIO $ do
unsafeInitGUIForThreadedRTS
mainGUI
return ()
| |
96593ccb225642ea9b18227882d27afb00441006214cf99f0963572ff1b6815b | calyau/maxima | numericalio.lisp | Copyright 2005 by
;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License .
;; This program has NO WARRANTY, not even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(in-package :maxima)
;; Read functions... | null | https://raw.githubusercontent.com/calyau/maxima/9352a3f5c22b9b5d0b367fddeb0185c53d7f4d02/share/numericalio/numericalio.lisp | lisp | This program is free software; you can redistribute it and/or
This program has NO WARRANTY, not even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Read functions:
read_binary_matrix (source, M)
A : read_binary_array (source)
read_binary_array (source, A)
L: read_binar... | Copyright 2005 by
modify it under the terms of the GNU General Public License .
(in-package :maxima)
M : read_matrix ( source , sep_ch_flag )
read_matrix ( source , M , sep_ch_flag )
A : read_array ( source , sep_ch_flag )
read_array ( source , A , sep_ch_flag )
read_hashed_array ( sourc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.