_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 |
|---|---|---|---|---|---|---|---|---|
30fae2ac30aac6fa6c299b2305734dbbd70d0682e8fbca9fa6f2f390d7e33cc2 | c-cube/ocaml-containers | CCImmutArray.mli | (* This file is free software, part of containers. See file "license" for more details. *)
* Immutable Arrays
Purely functional use of arrays . Update is costly , but reads are very fast .
Sadly , it is not possible to make this type covariant without using black
magic .
@since 0.17
Pure... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/data/CCImmutArray.mli | ocaml | This file is free software, part of containers. See file "license" for more details.
* Array of values of type 'a. The underlying type really is
an array, but it will never be modified.
It should be covariant but OCaml will not accept it.
* [make n x] makes an array of [n] times [x].
* Access the element. ... |
* Immutable Arrays
Purely functional use of arrays . Update is costly , but reads are very fast .
Sadly , it is not possible to make this type covariant without using black
magic .
@since 0.17
Purely functional use of arrays. Update is costly, but reads are very fast.
Sadly, it is no... |
9f39bab6ca169643955bf316def447377845cd3623838d87007c02ec3f232235 | hjwylde/werewolf | Role.hs | |
Module : Game . Werewolf . Role
Description : Simplistic role data structure with lenses and instances .
Copyright : ( c ) , 2016
License : :
Roles are split into four categories :
* The Ambiguous .
* The Loners .
* The Villagers .
* The Werewolves .
Module : Game.We... | null | https://raw.githubusercontent.com/hjwylde/werewolf/d22a941120a282127fc3e2db52e7c86b5d238344/src/Game/Werewolf/Role.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
* Role
** Instances
*** The Ambiguous
| No-one knows the true nature of the Ambiguous, sometimes not even the Ambiguous themselves!
The Ambiguous are able to change allegiance throughout the game.
*** The Villagers
*** The Werewolves
| Role defini... | |
Module : Game . Werewolf . Role
Description : Simplistic role data structure with lenses and instances .
Copyright : ( c ) , 2016
License : :
Roles are split into four categories :
* The Ambiguous .
* The Loners .
* The Villagers .
* The Werewolves .
Module : Game.We... |
6bcb75efe7189a9ff714818a7d97190fc38e9696fcb22fc58f154d65aeae0fd7 | ulrikstrid/ocaml-jose | JWKTest.ml | open Helpers
let get_string_alg jwk : string =
let alg = Jose.Jwk.get_alg jwk |> Option.get in
Jose.Jwa.alg_to_string alg
let jwk_suite, _ =
Junit_alcotest.run_and_report ~package:"jose" "JWK"
[
( "JWK",
[
Alcotest.test_case "pub - Creates a correct JWK from pem" `Quick
(... | null | https://raw.githubusercontent.com/ulrikstrid/ocaml-jose/8959edd949fb96586325b6b53e316b75e4581d20/test/JWKTest.ml | ocaml | open Helpers
let get_string_alg jwk : string =
let alg = Jose.Jwk.get_alg jwk |> Option.get in
Jose.Jwa.alg_to_string alg
let jwk_suite, _ =
Junit_alcotest.run_and_report ~package:"jose" "JWK"
[
( "JWK",
[
Alcotest.test_case "pub - Creates a correct JWK from pem" `Quick
(... | |
02cd95261e306411d567c74bf9d21c99c6a718aeb2cae589327963d1ab986ebd | tonsky/bloknote | sheet.cljs | (ns bloknote.sheet
(:require [jayq.core :as jq]
[clojure.string :as str]
[bloknote.utils :as u]
[bloknote.cursor :as cur]
[bloknote.edit :as edit]
[cljs.reader :as reader])
(:use [jayq.util :only [log clj->js js->clj]]))
(def undo_limit 50)
(d... | null | https://raw.githubusercontent.com/tonsky/bloknote/e18e2c85e4bcd4a56ed605e24cbfa12c90b1b5e2/src/bloknote/sheet.cljs | clojure | (log "loaded " text)
(jq/bind (jq/$ :body) :keyup on-type)
| (ns bloknote.sheet
(:require [jayq.core :as jq]
[clojure.string :as str]
[bloknote.utils :as u]
[bloknote.cursor :as cur]
[bloknote.edit :as edit]
[cljs.reader :as reader])
(:use [jayq.util :only [log clj->js js->clj]]))
(def undo_limit 50)
(d... |
b07753d8d010c92f7bb2477501ed499c1bc72abf78afa5279eaf1745629906ee | vmchale/hgis | PlotSVG.hs | {-# LANGUAGE RankNTypes #-}
-- | Module to generate SVGs from shapefiles.
module GIS.Graphics.PlotSVG where
import Graphics.Rendering.Chart.Easy
import Graphics.Rendering.Chart.Backend.Diagrams
import Control.Monad
import GIS.Hylo
import GIS.Types
import Data.Monoid
import GIS.Math.Projections
import GIS.Graphics.Pl... | null | https://raw.githubusercontent.com/vmchale/hgis/5bd38f150a8d237dc78501859352bf1cf734f92b/src/GIS/Graphics/PlotSVG.hs | haskell | # LANGUAGE RankNTypes #
| Module to generate SVGs from shapefiles.
you can do e.g.
| Given a `Map`, write it to file as an SVG. |
module GIS.Graphics.PlotSVG where
import Graphics.Rendering.Chart.Easy
import Graphics.Rendering.Chart.Backend.Diagrams
import Control.Monad
import GIS.Hylo
import GIS.Types
import Data.Monoid
import GIS.Math.Projections
import GIS.Graphics.Plot
import GIS.Graphics.Types
| Default file options : PNG output and 19... |
36342e78b9efcdaf2bcb240e257a15c2db7daa03283fdb3d4397e5a3c6d96784 | manuel-serrano/hop | loopcnst.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / js2scheme / loopcnst.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/cbb98da5c9ea8e6e3836f0a5908e5bf782419683/js2scheme/loopcnst.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Loop constant lifting */
* -----------------------... | * serrano / prgm / project / hop / hop / js2scheme / loopcnst.scm * /
* Author : * /
* Creation : Mon Sep 20 07:58:36 2021 * /
* Last change : Fri Feb 4 08:18:02 2022 ( serrano ) * /
* Cop... |
89715c15812b7041674a8dc9c48fb91f7445c921324dfbb01053e4bb9fde074f | diagrams/diagrams-lib | SplitAttr.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
import Control.Ap... | null | https://raw.githubusercontent.com/diagrams/diagrams-lib/6f66ce6bd5aed81d8a1330c143ea012724dbac3c/test/SplitAttr.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE GADTs #
----------------------------------------------------------
Properties!
should preserve semantics
should result in attributes in question only being over OK nodes
should not move other attributes
Should preserve tree shape ?
Actually ... | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
import Control.Applicative
import Control.Lens ((%~), (&), _Wrapping')
import ... |
71e046c78f02f3dee927fc0792037b6c2e34e499c1c955dd693cfa31a5eeedb8 | blindglobe/clocc | run.lisp | (proclaim '(optimize (safety 2) (space 1) (speed 1) (debug 2)))
(defconstant *base-char* 'character)
#+CLISP
(setf *default-file-encoding* (make-encoding :charset charset:iso-8859-1))
(mapcar #'(lambda (x)
(load (compile-file (truename x))))
'("clex.lisp"
"lalr.lisp"
"dtd.lisp"
"sgml-lex.lisp"
"sgml... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/gui/clx/docs/run.lisp | lisp | (run) | (proclaim '(optimize (safety 2) (space 1) (speed 1) (debug 2)))
(defconstant *base-char* 'character)
#+CLISP
(setf *default-file-encoding* (make-encoding :charset charset:iso-8859-1))
(mapcar #'(lambda (x)
(load (compile-file (truename x))))
'("clex.lisp"
"lalr.lisp"
"dtd.lisp"
"sgml-lex.lisp"
"sgml... |
a02171f2ca5e89afaf06f1f3eda96f47398bec87d88b96d8956f501c2499f09e | AlexanderMann/conj-2016 | graph.clj | (ns conj-2016.util.graph
"A simple namespace which produces svg/png renderings of coords
and titles."
(:require [dali.io :as d.io]
[taoensso.timbre :as log]))
(def label-font-size 10)
(def min-page-dimension 100)
(def label-percentage-size 0.07)
(def page-border 10)
(def min-opacity 0.0)
(defn- labe... | null | https://raw.githubusercontent.com/AlexanderMann/conj-2016/00b07f654f83ca1da7af4486d58b7d0add880544/src/conj_2016/util/graph.clj | clojure | (ns conj-2016.util.graph
"A simple namespace which produces svg/png renderings of coords
and titles."
(:require [dali.io :as d.io]
[taoensso.timbre :as log]))
(def label-font-size 10)
(def min-page-dimension 100)
(def label-percentage-size 0.07)
(def page-border 10)
(def min-opacity 0.0)
(defn- labe... | |
83d1d42430c1813fc17e0b58c70c93bbefccc1f7513aa64335715067181da105 | draperlaboratory/cbat_tools | precondition.ml | (***************************************************************************)
(* *)
Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc.
(* *)
(* This... | null | https://raw.githubusercontent.com/draperlaboratory/cbat_tools/36496cbab9e04eb2cbfd46f8740f029b9ac2996a/wp/lib/bap_wp/src/precondition.ml | ocaml | *************************************************************************
This file is provided under the license found in the LICENSE file in
the top-level director... | Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc.
This work is funded in part by ONR / NAWC Contract N6833518C0107 . Its
content does not necessarily reflect the position or policy of the US
open !Core
open Bap.Std
open Graphlib.Std
open Bap_core_theory
open Utils.Option_let
i... |
05085930d3c4364d4b2dc673a61deb048c77b7faf228f6c7fbb065c5105eed79 | jordanthayer/ocaml-search | machine_usage.ml | (**
Checks to see if a machine is idle by looking for process that look
like they might be a solver binary executing.
*)
open Printf
open Fn
(** looks for processes whose name includes the word solver *)
let is_idle () =
let nl = Str.regexp "\n" in
let solver_regexp = Str.regexp ".*solve.*" in
try
... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/wrutils/machine_usage.ml | ocaml | *
Checks to see if a machine is idle by looking for process that look
like they might be a solver binary executing.
* looks for processes whose name includes the word solver |
open Printf
open Fn
let is_idle () =
let nl = Str.regexp "\n" in
let solver_regexp = Str.regexp ".*solve.*" in
try
Wrsys.shell_output "ps -ef | awk '{ print $8 \" by user \" $1 }'"
|> Str.split nl
|> List.find (fun s -> Str.string_match solver_regexp s 0)
|> fprintf stderr "\n%s appear... |
d0847db70680adafe40c1eedf4c2960f4695ebfb8b60ac99af7330a497b84eee | igorhvr/bedlam | xhtml.scm | 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 WAR... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/siscweb/siscweb-src-0.5/opt/sxml/scm/siscweb/xhtml.scm | scheme | you may not use this file except in compliance with
the License. You may obtain a copy of the License at
/
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
Contributor(s):
Alternatively, the contents of th... | The contents of this file are subject to the Mozilla Public License Version
Software distributed under the License is distributed on an " AS IS " basis ,
The Original Code is SISCweb .
The Initial Developer of the Original Code is .
Portions created by the Initial Developer are Copyright ( C ) 2005 - 2006
... |
2845aef6664822672e4d89fa2e1d44d6e4413b2695ffed12553d815b6a6f6c5a | bobjflong/stellar-haskell | MoneyConversionSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module MoneyConversionSpec (spec) where
import Control.Lens hiding (elements)
import Data.Text
import Test.Hspec
import Test.QuickCheck
import Web.Stellar.AccountLine
import Web.Stellar.Types
spec = do
describ... | null | https://raw.githubusercontent.com/bobjflong/stellar-haskell/b7beac482b0a78869de6090d5c13cda5d9601268/test/MoneyConversionSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module MoneyConversionSpec (spec) where
import Control.Lens hiding (elements)
import Data.Text
import Test.Hspec
import Test.QuickCheck
import Web.Stellar.AccountLine
import Web.Stellar.Types
spec = do
describe "MoneyLens laws" $ do
it "set... |
e00a8a21a45c76cfda73ae4944921455468ea9d6bd1c6e52e7d2fbc164e1904c | snawaz/ray-tracers | Hittable.hs | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
{-# OPTIONS -Wno-unused-top-binds #-}
module Hittable(
HitRecord (HitRecord),
Hittable(hit),
HittableList (HittableList),
toHittableList,
Sphere (Sphere),
Material (Material),
Lambertian (Lambertian), Metal (Meta... | null | https://raw.githubusercontent.com/snawaz/ray-tracers/87165274003925a7f135e4e228cfa5da734690ce/src/Hittable.hs | haskell | # OPTIONS -Wno-unused-top-binds #
# INLINE hit # | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
module Hittable(
HitRecord (HitRecord),
Hittable(hit),
HittableList (HittableList),
toHittableList,
Sphere (Sphere),
Material (Material),
Lambertian (Lambertian), Metal (Metal), Dielectric (Dielectric),
Scatt... |
f535db775e1b7343a215bb97a497677e542d81793bab96050ea7cf6fc1f6a376 | parof/wstat | State.hs | # LANGUAGE MultiParamTypeClasses #
module Interfaces.State where
--------------------------------------------------------------------------------
-- Generic State Class
--------------------------------------------------------------------------------
-- s is the state, or the map
-- k is the... | null | https://raw.githubusercontent.com/parof/wstat/369cf5d1d92ef235049c29ad2f1cc6fd53747754/src/Interfaces/State.hs | haskell | ------------------------------------------------------------------------------
Generic State Class
------------------------------------------------------------------------------
s is the state, or the map
k is the type of the keys
v is the type for the values
usefull extra methods | # LANGUAGE MultiParamTypeClasses #
module Interfaces.State where
class State s k v where
lookup :: k -> s k v -> v
update :: k -> v -> s k v -> s k v
getVars :: s k v -> [k]
fromList :: [(k, v)] -> s k v
empty :: s k v
empty = fromList [] |
35a29e7b8710d49106279d36ee203a7dffa6c0b0af526d026cc4fba7927c8369 | beijaflor-io/haskell-libui | Types.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE OverloadedStrings #
{ - # LANGUAGE DeriveDataTypeable # - }
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE DeriveFunctor #-}
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWi... | null | https://raw.githubusercontent.com/beijaflor-io/haskell-libui/4d1fad25e220071c4c977f79f05b482c2c36af84/src/Graphics/LibUI/Types.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE DeriveFunctor #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
ctrl' <- toCUIControl <$> case ctrl of
UIControlBox c -> toCUIIO c :: IO CUIBox
UIControlEntry c -> toCUIIO c :: IO CUIEntry
UIControlGroup ... | # LANGUAGE OverloadedStrings #
{ - # LANGUAGE DeriveDataTypeable # - }
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamili... |
5dfc4c217bef632ab69ff1c94d068449a163908ebe497a612379e1118636e01d | vaclavsvejcar/headroom | Types.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
{-# LAN... | null | https://raw.githubusercontent.com/vaclavsvejcar/headroom/3b20a89568248259d59f83f274f60f6e13d16f93/src/Headroom/Config/Types.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Headroom.Config.Types
Description : Data types for /Headroom/ configuration
License : BSD-3-Clause
Maintainer :
Stability : experimental
Portability : POSIX
This module contains data types representing /H... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE Undecidabl... |
61536ca66ae52c548e26da2218182a3503e015bb1634f88e9fb4e71d6f499618 | qitab/pyjure | core.clj | ;; pyjure.core: this file just combines together all the compilation passes.
(ns pyjure.core
(:use
[pyjure.debug]
[pyjure.passes]
[pyjure.utilities]
[pyjure.parsing])
(:require
;; Our passes, in order:
[leijure.delta-position]
[pyjure.lexer]
[pyjure.parser]
[pyjure.desugar]
[pyjure.cla... | null | https://raw.githubusercontent.com/qitab/pyjure/b9aa49b4f74c85f2b617e924f61eaddb194119bf/src/pyjure/core.clj | clojure | pyjure.core: this file just combines together all the compilation passes.
Our passes, in order: | (ns pyjure.core
(:use
[pyjure.debug]
[pyjure.passes]
[pyjure.utilities]
[pyjure.parsing])
(:require
[leijure.delta-position]
[pyjure.lexer]
[pyjure.parser]
[pyjure.desugar]
[pyjure.clarification]
[pyjure.cleanup]
[pyjure.anormalization]
[pyjure.continuation-analysis]
[pyjure.e... |
0d481a2802591637ce71b9e0fe14cb375f982694520691ce92a2a453e4b4f924 | seckcoder/course-compiler | r1_9.rkt | (read)
| null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/student-tests/r1_9.rkt | racket | (read)
| |
e57ba2cd7cc50e3f8d4a4610a771780cfc8aed39fa6fe1abf949af54d52661b0 | bcc32/advent-of-code | main.ml | open! Core
open! Async
open! Import
type dir =
| L
| R
| U
| D
let dir_of_char = function
| '<' -> L
| '>' -> R
| '^' -> U
| 'v' -> D
| _ -> failwith "invalid dir"
;;
let move (x, y) dir =
match dir with
| U -> x, y + 1
| D -> x, y - 1
| L -> x - 1, y
| R -> x + 1, y
;;
let input () =
... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/86a9387c3d6be2afe07d2657a0607749217b1b77/2015/day_3/main.ml | ocaml | open! Core
open! Async
open! Import
type dir =
| L
| R
| U
| D
let dir_of_char = function
| '<' -> L
| '>' -> R
| '^' -> U
| 'v' -> D
| _ -> failwith "invalid dir"
;;
let move (x, y) dir =
match dir with
| U -> x, y + 1
| D -> x, y - 1
| L -> x - 1, y
| R -> x + 1, y
;;
let input () =
... | |
8aab1bbfa120b221b8f6b8a6dfa28718bddb7ed29c181df5ea19a6eca43da75d | jakemcc/sicp-study | ex3_12.clj | Exercise 3.12
First response is ' b
;
Second response is ' ( b c d )
| null | https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section3.3/src/ex3_12.clj | clojure | Exercise 3.12
First response is ' b
Second response is ' ( b c d )
| |
c8e98f6ad672a069b44d7be781c5511ff2f225727a88e8d214c69b6f180cc8a4 | neongreen/haskell-ex | Scary.hs | Scary.hs
-- Assume "words.txt" exists alongside this file
module Scary (scaryWords, isScary) where
import Data.Char (ord, toLower)
-- Find all *scary* words in the given list xs
scaryWords :: [String] -> [String]
scaryWords xs = filter isScary xs
isScary :: String -> Bool
isScary s = total == scaryNumber
where t... | null | https://raw.githubusercontent.com/neongreen/haskell-ex/345115444fdf370a43390fd942e2851b9b1963ad/week1/scary/knikel/Scary.hs | haskell | Assume "words.txt" exists alongside this file
Find all *scary* words in the given list xs | Scary.hs
module Scary (scaryWords, isScary) where
import Data.Char (ord, toLower)
scaryWords :: [String] -> [String]
scaryWords xs = filter isScary xs
isScary :: String -> Bool
isScary s = total == scaryNumber
where total = sum $ map charToNumber s
scaryNumber = 13
charToNumber :: Char -> Int
charToNumb... |
0de0498cb99aec6472c953c67d3a18d93b2eb52dd1fffedc337fc2c6c0ae142e | kostmo/circleci-failure-tracker | Main.hs | {-# LANGUAGE OverloadedStrings #-}
import Control.Monad (void, when)
import Control.Monad.Trans.Reader (runReaderT)
import Data.Either (fromRight)
import qualified Data.Text.Lazy as LT
import Options.Applicative
import System.IO... | null | https://raw.githubusercontent.com/kostmo/circleci-failure-tracker/393d10a72080bd527fdb159da6ebfea23fcd52d1/app/oneoff/app/Main.hs | haskell | # LANGUAGE OverloadedStrings #
Note: this is not the production password; this default is only for local testing |
import Control.Monad (void, when)
import Control.Monad.Trans.Reader (runReaderT)
import Data.Either (fromRight)
import qualified Data.Text.Lazy as LT
import Options.Applicative
import System.IO
import qualified Builds
import qu... |
35cc79d3af9fdd8f2e3ff1759a727f34f5c3a30fdf5560b5839a38d43056bb59 | cronburg/antlr-haskell | G4.hs | # LANGUAGE QuasiQuotes , , DeriveGeneric , TypeFamilies
, DataKinds , ScopedTypeVariables , OverloadedStrings , TypeSynonymInstances
, FlexibleInstances , UndecidableInstances , FlexibleContexts , DeriveDataTypeable #
, DataKinds, ScopedTypeVariables, OverloadedStrings, TypeSynonymInstances
, Flexi... | null | https://raw.githubusercontent.com/cronburg/antlr-haskell/7a9367038eaa58f9764f2ff694269245fbebc155/test/coreg4/G4.hs | haskell | # LANGUAGE QuasiQuotes , , DeriveGeneric , TypeFamilies
, DataKinds , ScopedTypeVariables , OverloadedStrings , TypeSynonymInstances
, FlexibleInstances , UndecidableInstances , FlexibleContexts , DeriveDataTypeable #
, DataKinds, ScopedTypeVariables, OverloadedStrings, TypeSynonymInstances
, Flexi... | |
ba42a7af6e2861551f774f84cd49b60cb6196a3eab7b66c62aab180f3909d776 | pjones/xmonadrc | Stack.hs | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
-- |
--
-- Copyright:
-- This file is part of the package xmonadrc. It is subject to the
-- license terms in the LICENSE file found in the top-level
-- directory of this distribution and at:
--
--
-- No part of this package, including this file, m... | null | https://raw.githubusercontent.com/pjones/xmonadrc/c19f77f3a2625a24d1b7fb623bcdde3a241bc508/src/XMonad/Local/Stack.hs | haskell | |
Copyright:
This file is part of the package xmonadrc. It is subject to the
license terms in the LICENSE file found in the top-level
directory of this distribution and at:
No part of this package, including this file, may be copied,
modified, propagated, or distributed except according to the
te... | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module XMonad.Local.Stack
( refocus,
focusIndex,
overFocus,
toStack,
stackSize,
zipStacks,
zipStacksWith,
cullStack,
TraverseStyle (..),
StackF (..),
stackF,
setTraverseStyle,
)
where
import Data.Maybe
impo... |
4348eb95326c8041e8152fe6167aed004463e8b61128613453ed2aa9927bafb1 | sdiehl/pairing | Hash.hs | module Bench.Hash where
import Protolude
import Criterion.Main
import Data.Pairing
import qualified Data.Pairing.BLS12381 as BLS12381
import qualified Data.Pairing.BN254 as BN254
import qualified Data.Pairing.BN254A as BN254A
import qualified Data.Pairing.BN254B as BN254B
import qualified Data.Pairing.BN254C as BN254... | null | https://raw.githubusercontent.com/sdiehl/pairing/9e3fd026fb43fd64917a3b267d0d8d351eba77cc/bench/Bench/Hash.hs | haskell | module Bench.Hash where
import Protolude
import Criterion.Main
import Data.Pairing
import qualified Data.Pairing.BLS12381 as BLS12381
import qualified Data.Pairing.BN254 as BN254
import qualified Data.Pairing.BN254A as BN254A
import qualified Data.Pairing.BN254B as BN254B
import qualified Data.Pairing.BN254C as BN254... | |
46bda645e77c71906ce8a3ab21c6ce6a5c6674144aa97d2a51dcaabd55c73d0b | stylewarning/cl-algebraic-data-type | defdata.lisp | ;;;; cl-algebraic-data-type.lisp
;;;;
Copyright ( c ) 2012 - 2018
(in-package #:cl-algebraic-data-type)
(defvar *print-adt-readably* t
"Print preceding #. when printing ADT values.")
(defmacro defdata (adt-name &body constructors)
"Define a new ADT. ADT-name has the following grammar:
ADT-NAME := <symbol>
... | null | https://raw.githubusercontent.com/stylewarning/cl-algebraic-data-type/b2568428193a512d141d6b615772d50ceb5f9bca/defdata.lisp | lisp | cl-algebraic-data-type.lisp
Do some extreme sanity checking.
Must be a symbol, or...
a list that is...
non-empty
and the rest is a property list
Sanity check that INCLUDE is a proper algebraic data type.
Add constructors and their arity to the database.
We don't check *PRINT-READABLY* because these can
be re... | Copyright ( c ) 2012 - 2018
(in-package #:cl-algebraic-data-type)
(defvar *print-adt-readably* t
"Print preceding #. when printing ADT values.")
(defmacro defdata (adt-name &body constructors)
"Define a new ADT. ADT-name has the following grammar:
ADT-NAME := <symbol>
| (<symbol> <options>*)
Ther... |
6e1b220abae90b138d7ab0e3ee38a4e3781403167a34bd3ee94c2f964e0a4b38 | jayunit100/RudolF | readpdb.clj | (ns ConnjurRV.readpdb
(import org.biojava.bio.structure.StructureTools))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; module interface
; load-local-struct
; load-pdb-struct
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn load-local-struct
"Filepath -> Biojava.Structure"
[filename]
(.getStructure (new org.biojava.b... | null | https://raw.githubusercontent.com/jayunit100/RudolF/8936bafbb30c65c78b820062dec550ceeea4b3a4/bioclojure/src/ConnjurRV/readpdb.clj | clojure |
module interface
load-local-struct
load-pdb-struct
| (ns ConnjurRV.readpdb
(import org.biojava.bio.structure.StructureTools))
(defn load-local-struct
"Filepath -> Biojava.Structure"
[filename]
(.getStructure (new org.biojava.bio.structure.io.PDBFileReader) filename))
(defn load-pdb-struct
"PDBID -> org.biojava.bio.structure.Structure"
[pdbid]
(.getStru... |
29ab6006f80a1d75a168fd6874f986d59d2f9522fe9979e8e196eab14aa7363a | LuxMiranda/herms | UnitConversions.hs | module UnitConversions where
import Data.Maybe (mapMaybe)
import Data.Text (pack, replace, unpack)
import Text.Read (readMaybe)
import Text.Regex.TDFA ((=~))
import Types
NOTE : Here , " imperial " means " U.S. Customary " . Conversion to British ,
Australian , Canadian , etc . imperial units is not yet implement... | null | https://raw.githubusercontent.com/LuxMiranda/herms/cb2bf5be31090300cfd9cae5d5cbf1b1f13c65c4/src/UnitConversions.hs | haskell | These cases are here so that if we add other units, the compiler will force us
to add appropriate cases here.
These cases are here so that if we add other units, the compiler will force us
to add appropriate cases here.
returns a list of matches, where every match is a list of the regex groups | module UnitConversions where
import Data.Maybe (mapMaybe)
import Data.Text (pack, replace, unpack)
import Text.Read (readMaybe)
import Text.Regex.TDFA ((=~))
import Types
NOTE : Here , " imperial " means " U.S. Customary " . Conversion to British ,
Australian , Canadian , etc . imperial units is not yet implement... |
543cafc112f75f049f0bd3ee4937c0e4b81e824f0e07b370f3e4dc31b90ec2a7 | janestreet/vcaml | color.mli | open Core
module True_color : sig
type t =
{ red : char
; green : char
; blue : char
}
[@@deriving sexp_of]
val to_string : t -> string
val of_24bit_int : int -> t Or_error.t
end
module Color256 : sig
type t [@@deriving sexp_of]
val to_string : t -> string
val of_8bit_int : int -> t Or... | null | https://raw.githubusercontent.com/janestreet/vcaml/60e2e8216d0b5cfe80b6e5c397ca790d01e576f9/src/color.mli | ocaml | open Core
module True_color : sig
type t =
{ red : char
; green : char
; blue : char
}
[@@deriving sexp_of]
val to_string : t -> string
val of_24bit_int : int -> t Or_error.t
end
module Color256 : sig
type t [@@deriving sexp_of]
val to_string : t -> string
val of_8bit_int : int -> t Or... | |
2f0cdf1089d00e6ff33d303bdae10d149dc244d14534811f1640a4d8f2767ca5 | jfacorro/klarna-loves-erlang-meetup-2020 | bank_auth.erl | -module(bank_auth).
-export([authorize_api_key/5]).
-spec authorize_api_key(
LogicHandler :: atom(),
OperationID :: bank_api:operation_id(),
From :: header | qs_val,
KeyParam :: iodata() | atom(),
Req ::cowboy_req:req()
)-> {true, Context :: #{binary() => any()}, Req ::cowboy_req:req()} |
{fal... | null | https://raw.githubusercontent.com/jfacorro/klarna-loves-erlang-meetup-2020/61795af0ac80ac7afa4a00a215342988e5aac45f/apps/bank/src/bank_auth.erl | erlang | -module(bank_auth).
-export([authorize_api_key/5]).
-spec authorize_api_key(
LogicHandler :: atom(),
OperationID :: bank_api:operation_id(),
From :: header | qs_val,
KeyParam :: iodata() | atom(),
Req ::cowboy_req:req()
)-> {true, Context :: #{binary() => any()}, Req ::cowboy_req:req()} |
{fal... | |
0b119638d8a54c4c5f4a5358d29f904d8550949e839cccc5ff471664e89f1518 | tezos-commons/baseDAO | Type.hs | SPDX - FileCopyrightText : 2021 Tezos Commons
SPDX - License - Identifier : LicenseRef - MIT - TC
module Test.Plist.Type
( PlistParameter (..)
, PlistStorage (..)
) where
import Universum hiding (drop, swap)
import Fmt (Buildable, build, genericF)
import Lorentz hiding (and, div, now, (>>))
import Ligo.B... | null | https://raw.githubusercontent.com/tezos-commons/baseDAO/55c168a09d507795af1b4fe4361c1243ebdb84f8/haskell/test/Test/Plist/Type.hs | haskell | SPDX - FileCopyrightText : 2021 Tezos Commons
SPDX - License - Identifier : LicenseRef - MIT - TC
module Test.Plist.Type
( PlistParameter (..)
, PlistStorage (..)
) where
import Universum hiding (drop, swap)
import Fmt (Buildable, build, genericF)
import Lorentz hiding (and, div, now, (>>))
import Ligo.B... | |
12d532a5eb55314a5f311050e76365cbe2eca453c5742ac0a338efb0a5078a35 | zotonic/zotonic | z_sites_config.erl | @author < >
2019
%% @doc Load and manage site configuration files.
Copyright 2019
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required ... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_core/src/support/z_sites_config.erl | erlang | @doc Load and manage site configuration files.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the ... | @author < >
2019
Copyright 2019
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(z_sites_config).
-export([
app_is_site/1,
config_files/1,
config_files/2,
read_configs/1,
merge_glob... |
610c405746dd2618b55a60c758837d93e23549c05b807f70ea7b9a9017569895 | kana-sama/sicp | 1.24 - fast prime bench.scm | (define (pow-mod base exp m)
(cond ((zero? exp) 1)
((even? exp)
(remainder (square (pow-mod base (half exp) m)) m))
(else
(remainder (* base (pow-mod base (dec exp) m)) m))))
(define (fermat-test n)
(define (try a)
(= (pow-mod a n n) a))
(try (inc (random (dec n)))))
(defin... | null | https://raw.githubusercontent.com/kana-sama/sicp/fc637d4b057cfcae1bae3d72ebc08e1af52e619d/1/1.24%20-%20fast%20prime%20bench.scm | scheme | (define (pow-mod base exp m)
(cond ((zero? exp) 1)
((even? exp)
(remainder (square (pow-mod base (half exp) m)) m))
(else
(remainder (* base (pow-mod base (dec exp) m)) m))))
(define (fermat-test n)
(define (try a)
(= (pow-mod a n n) a))
(try (inc (random (dec n)))))
(defin... | |
06e766ff3c720c224152d72f895ae924f642518b5409bbec4295e45338f50f6e | haskell-numerics/hmatrix | minimize.hs | the multidimensional minimization example in the GSL manual
import Numeric.GSL
import Numeric.LinearAlgebra
import Graphics.Plot
import Text.Printf(printf)
-- the function to be minimized
f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30
-- exact gradient
df [x,y] = [20*(x-1), 40*(y-2)]
-- a minimization algorithm which does... | null | https://raw.githubusercontent.com/haskell-numerics/hmatrix/2694f776c7b5034d239acb5d984c489417739225/examples/minimize.hs | haskell | the function to be minimized
exact gradient
a minimization algorithm which does not require the gradient
Numerical estimation of the gradient | the multidimensional minimization example in the GSL manual
import Numeric.GSL
import Numeric.LinearAlgebra
import Graphics.Plot
import Text.Printf(printf)
f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30
df [x,y] = [20*(x-1), 40*(y-2)]
minimizeS f xi = minimize NMSimplex2 1E-2 100 (replicate (length xi) 1) f xi
gradient f... |
93b60390febfb71b13d5bd649c3cab5552bb831727aacd27493edf0e22f9979d | huangjs/cl | dgehrd.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l ,... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/lapack/lapack/dgehrd.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rt... |
88a3022538f3f9b4c36a32f099f7d100ff32b56768194a1a83492a92e58abe90 | ghcjs/ghcjs-boot | Maybe.hs | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Maybe
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stab... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/Data/Maybe.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Maybe
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : stable
Portability : portable
The Maybe type, and associated operations.
--------------------------------------... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
Copyright : ( c ) The University of Glasgow 2001
module Data.Maybe
(
Maybe(Nothing,Just)
, maybe
, isJust
, isNothing
, fromJust
, fromMaybe
, listToMaybe
, maybeToList
, catMaybes
, mapMaybe
) where
import GHC.Bas... |
7a4038e972eba48475c0ed6f697e4f39d962f8ba185066ca47f4750d583cfde4 | gator1/jepsen | perf_test.clj | (ns jepsen.perf-test
(:use jepsen.core
clojure.test
clojure.pprint)
(:require [jepsen.os :as os]
[jepsen.db :as db]
[jepsen.client :as client]
[jepsen.generator :as gen]
[jepsen.model :as model]
[jepsen.checker :as che... | null | https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/jepsen/test/jepsen/perf_test.clj | clojure | (ns jepsen.perf-test
(:use jepsen.core
clojure.test
clojure.pprint)
(:require [jepsen.os :as os]
[jepsen.db :as db]
[jepsen.client :as client]
[jepsen.generator :as gen]
[jepsen.model :as model]
[jepsen.checker :as che... | |
56215ec3ffb5edd572988073bf71445e37b8a7c450030957e9861aac341ad86d | bmourad01/ocamlchess | zobrist.ml | open Core_kernel [@@warning "-D"]
type key = int64 [@@deriving equal, compare, sexp]
let piece = [|
0x9D39247E33776D41L;
0x2AF7398005AAA5C7L;
0x44DB015024623547L;
0x9C15F73E62A76AE2L;
0x75834465489C0C89L;
0x3290AC3A203001BFL;
0x0FBBAD1F61042279L;
0xE83A908FF2FB60CAL;
0x0D7E765D58755C10L;
0x1A08382... | null | https://raw.githubusercontent.com/bmourad01/ocamlchess/6c7214f5b709d9b1327b384a057fbdb2b5a9c3db/chess/src/zobrist.ml | ocaml | open Core_kernel [@@warning "-D"]
type key = int64 [@@deriving equal, compare, sexp]
let piece = [|
0x9D39247E33776D41L;
0x2AF7398005AAA5C7L;
0x44DB015024623547L;
0x9C15F73E62A76AE2L;
0x75834465489C0C89L;
0x3290AC3A203001BFL;
0x0FBBAD1F61042279L;
0xE83A908FF2FB60CAL;
0x0D7E765D58755C10L;
0x1A08382... | |
084e853d5514b07565268ad53bf960bb8f7b6d333ecbd9c5855b377e2862df3e | adetokunbo/tmp-proc | Taste.hs | module Main (main) where
import System.IO
import qualified TmpProc.Example1.IntegrationTaste as Ex1
main :: IO ()
main = do
hSetBuffering stdin NoBuffering
hSetBuffering stdout NoBuffering
Ex1.main
| null | https://raw.githubusercontent.com/adetokunbo/tmp-proc/de5ea3b56a28833e93ec89fce1665fae69904ca2/tmp-proc-example/test/Taste.hs | haskell | module Main (main) where
import System.IO
import qualified TmpProc.Example1.IntegrationTaste as Ex1
main :: IO ()
main = do
hSetBuffering stdin NoBuffering
hSetBuffering stdout NoBuffering
Ex1.main
| |
8a55f7323751f6517298983d5034cb58083b46a4363847baf384d57e81d05148 | matsen/pplacer | algMap.ml | (* A map equipped with algebraic operations.
*
* not super-high performance because of map and boxing.
*
*)
module AlgMap (N: Number.NUMBER) (M: MapsSets.M) =
struct
include M
let soft_find k m =
try find k m with
| Not_found -> N.zero
sets k to ( soft value of k ) op v
let soft_op_ad... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/common_src/algMap.ml | ocaml | A map equipped with algebraic operations.
*
* not super-high performance because of map and boxing.
*
|
module AlgMap (N: Number.NUMBER) (M: MapsSets.M) =
struct
include M
let soft_find k m =
try find k m with
| Not_found -> N.zero
sets k to ( soft value of k ) op v
let soft_op_add op k v m =
add k (op (soft_find k m) v) m
let add_by = soft_op_add (N.add)
let sub_by = soft_op... |
82e3f5706789cbe320760bb60e123da95892b7abc526e05d4f493266991099b4 | metabase/throttle | project.clj | (defproject metabase/throttle "1.0.2"
:description "Simple tools for throttling API endpoints and other code."
:url ""
:min-lein-version "2.5.0"
:license {:name "Lesser GPL"
:url ""}
:aliases
{"test" ["with-profile" "+expectations" "expectations"]
"bikeshed" ... | null | https://raw.githubusercontent.com/metabase/throttle/75dce37020c1a8a288315bba3a2e29d00b52edd9/project.clj | clojure | `lein lint` will run all linters | (defproject metabase/throttle "1.0.2"
:description "Simple tools for throttling API endpoints and other code."
:url ""
:min-lein-version "2.5.0"
:license {:name "Lesser GPL"
:url ""}
:aliases
{"test" ["with-profile" "+expectations" "expectations"]
"bikeshed" ... |
9a896339bc1423f64fe16c63485b9741e8f4e2604efd1a8f36a5ae677c307332 | georgefst/monpad | Evdev.hs | # OPTIONS_GHC -Wno - orphans #
module Orphans.Evdev where
import Dhall (FromDhall)
import Evdev.Codes (AbsoluteAxis (..), Key (..), RelativeAxis (..))
import GHC.Generics (Generic)
deriving instance Generic Key
deriving instance FromDhall Key
deriving instance Generic AbsoluteAxis
deriving instance FromDhall Absolut... | null | https://raw.githubusercontent.com/georgefst/monpad/800e61001fbecfa82b53ab66bc59a20c463df9a5/haskell/linux/Orphans/Evdev.hs | haskell | # OPTIONS_GHC -Wno - orphans #
module Orphans.Evdev where
import Dhall (FromDhall)
import Evdev.Codes (AbsoluteAxis (..), Key (..), RelativeAxis (..))
import GHC.Generics (Generic)
deriving instance Generic Key
deriving instance FromDhall Key
deriving instance Generic AbsoluteAxis
deriving instance FromDhall Absolut... | |
4d5d7abdff6ff4d475c1ce478db099c67eb9954dfc760ad3a971bbc4ce407abd | tristanstraub/garden-mower | transformer.clj | (ns garden-mower.impl.transformer)
(defn walk
[node {:keys [style-rule-fn]
:or {style-rule-fn identity}
:as options}]
(if (map? node)
(case (:type node)
:style-rule (style-rule-fn node)
:media-rule (let [media-rule (update node :rules #(walk % options))]
(w... | null | https://raw.githubusercontent.com/tristanstraub/garden-mower/4d3acd744d33ea281560c7e42713f9ca7c01376d/src/garden_mower/impl/transformer.clj | clojure | (ns garden-mower.impl.transformer)
(defn walk
[node {:keys [style-rule-fn]
:or {style-rule-fn identity}
:as options}]
(if (map? node)
(case (:type node)
:style-rule (style-rule-fn node)
:media-rule (let [media-rule (update node :rules #(walk % options))]
(w... | |
4c566b5b5f95bca973adc0e44cdf58f6113456be0d4f042c013c6e57cf63a951 | chapmanb/bcbio.variation | intervals.clj | (ns bcbio.variation.filter.intervals
"Combined interval lists from filtered variants prepared via multiple calls.
Multiple call approaches and technologies result in reduced call regions due
to coverage. These functions manage creation of reduced BED files."
(:import [org.broadinstitute.gatk.utils.interval Inte... | null | https://raw.githubusercontent.com/chapmanb/bcbio.variation/c48834a6819e63dcccb5bc51540c7e19b212a019/src/bcbio/variation/filter/intervals.clj | clojure | "ALLOW_SEQ_DICT_INCOMPATIBILITY"
## BED manipulation | (ns bcbio.variation.filter.intervals
"Combined interval lists from filtered variants prepared via multiple calls.
Multiple call approaches and technologies result in reduced call regions due
to coverage. These functions manage creation of reduced BED files."
(:import [org.broadinstitute.gatk.utils.interval Inte... |
09243ef2870ff946296906584a4dde2cd8642f4383bbb22141a46e15973140ac | AdaCore/why3 | trans.mli | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/be1023970d48869285e68f12d32858c3383958e0/src/core/trans.mli | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
open Ty
open Term
open Decl
open Theory
open Task
open Wstdlib
* { 2 Transformations }
type 'a trans
typ... |
0322d1df1105879b644dc5f9975cc56179e2ecb1d3e02700a5d22acdb54d7783 | paroda/trade | backtest.clj | (ns bindi.backtest
(:require [clojure.core.async :as a]
[bindi.config :as cfg]
[bindi.analysis :as ana]
[bindi.fx-broker :as fxb]
[bindi.indicator :as ind])
(:import java.util.Date))
(defonce instruments (atom {}))
(defn update-instrument [ikey attr value]
{:pre [... | null | https://raw.githubusercontent.com/paroda/trade/c7d717ce04f506c821fedb2fd09c8c877ee5176a/src/bindi/backtest.clj | clojure | return new trade
this check is needed if stop-min is not specified
return closed-trade
update trade/closed-trades and balance
no action
no action
candles for analysis
1m candles for actual trade simulation | (ns bindi.backtest
(:require [clojure.core.async :as a]
[bindi.config :as cfg]
[bindi.analysis :as ana]
[bindi.fx-broker :as fxb]
[bindi.indicator :as ind])
(:import java.util.Date))
(defonce instruments (atom {}))
(defn update-instrument [ikey attr value]
{:pre [... |
91602b5a7b546ca04e2208c5c9d8e61267ecf78d8a297e7bd97e3b52c4df4409 | stjahns/ripple | core.clj | (ns ripple.core
(:use [pallet.thread-expr])
(:import [com.badlogic.gdx ApplicationListener])
(:require [ripple.components :as c]
[ripple.assets :as a]
[ripple.subsystem :as subsystem]
[brute.entity :as e]))
(def sys (atom 0))
(defn initialize
"Initialize the ES system and a... | null | https://raw.githubusercontent.com/stjahns/ripple/fdb4a8a29141ad5b46ec0560c329033b893eb319/src/ripple/core.clj | clojure | (ns ripple.core
(:use [pallet.thread-expr])
(:import [com.badlogic.gdx ApplicationListener])
(:require [ripple.components :as c]
[ripple.assets :as a]
[ripple.subsystem :as subsystem]
[brute.entity :as e]))
(def sys (atom 0))
(defn initialize
"Initialize the ES system and a... | |
fe5ce54e222d269058a246136adf9d73fab4bb0621cb98a571d57eb5129e43f0 | exercism/common-lisp | binary-test.lisp | ;; Ensures that binary.lisp and the testing library are always loaded
(eval-when (:compile-toplevel :load-toplevel :execute)
(load "binary")
(quicklisp-client:quickload :fiveam))
;; Defines the testing package with symbols from binary and FiveAM in scope
;; The `run-tests` function is exported for use by both the ... | null | https://raw.githubusercontent.com/exercism/common-lisp/f3cdf6cf7e607138d1bb4d26c57999d4364af243/exercises/practice/binary/binary-test.lisp | lisp | Ensures that binary.lisp and the testing library are always loaded
Defines the testing package with symbols from binary and FiveAM in scope
The `run-tests` function is exported for use by both the user and test-runner
Enter the testing package
Define and enter a new FiveAM test-suite | (eval-when (:compile-toplevel :load-toplevel :execute)
(load "binary")
(quicklisp-client:quickload :fiveam))
(defpackage :binary-test
(:use :cl :fiveam)
(:export :run-tests))
(in-package :binary-test)
(def-suite* binary-suite)
(test binary-1-is-decimal-1 (is (equal 1 (binary:to-decimal "1"))))
(test binary... |
fed0ff6b12ec6abb6a71f2e42bb5f6af970d3ec8c5301ca8c75c46d3d9db4958 | cnuernber/libjulia-clj | ffi.clj | (ns libjulia-clj.impl.ffi
"Low level raw JNA bindings and some basic initialization facilities"
(:require [tech.v3.datatype.pprint :as dtype-pp]
[tech.v3.datatype.ffi :as dt-ffi]
[tech.v3.datatype.ffi.size-t :as ffi-size-t]
[tech.v3.datatype.ffi.ptr-value :as ffi-ptr-value]
... | null | https://raw.githubusercontent.com/cnuernber/libjulia-clj/07ea4cb6885df5ec45429fa779abc2e0b2dc6c93/src/libjulia_clj/impl/ffi.clj | clojure | The symbols we need from the shared library
all operating systems. | (ns libjulia-clj.impl.ffi
"Low level raw JNA bindings and some basic initialization facilities"
(:require [tech.v3.datatype.pprint :as dtype-pp]
[tech.v3.datatype.ffi :as dt-ffi]
[tech.v3.datatype.ffi.size-t :as ffi-size-t]
[tech.v3.datatype.ffi.ptr-value :as ffi-ptr-value]
... |
8eed694c92eeaa50caea07d26d549130c6d56375e5fa7fce5f0ab2f366ba03c9 | CmdrDats/igoki | crypto.clj | (ns igoki.util.crypto
(:import
[javax.crypto Cipher]
[javax.crypto.spec SecretKeySpec]
[java.security MessageDigest]
[java.util Base64 Base64$Encoder Base64$Decoder]))
;; This is just meant to do basic crypto over your local settings file so that it's not just plaintext.
;; If you're not comfortable ... | null | https://raw.githubusercontent.com/CmdrDats/igoki/1002080c63372ee5fc6ce5ab2013f0ee01fe71ad/src/igoki/util/crypto.clj | clojure | This is just meant to do basic crypto over your local settings file so that it's not just plaintext.
If you're not comfortable with that, simply don't 'remember me'.
PR's welcome if you have a better idea? | (ns igoki.util.crypto
(:import
[javax.crypto Cipher]
[javax.crypto.spec SecretKeySpec]
[java.security MessageDigest]
[java.util Base64 Base64$Encoder Base64$Decoder]))
(def SECRET
"igoki-not-that-secure")
(def ^SecretKeySpec KEY
(let [sha (MessageDigest/getInstance "SHA-1")
ba (->> (.... |
0f68779d46d1943734604474252f64e003f22d0ac601b49f8fc5da37ce392d67 | racket/racket7 | splicing.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse
racket/lazy-require
"../private/kws.rkt")
syntax/parse/private/residual) ;; keep abs. path
(provide define-primitive-splicing-syntax-class)
(begin-for-syntax
(lazy-require
[syntax/... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/syntax/parse/experimental/splicing.rkt | racket | keep abs. path
FIXME: workaround for phase>0 bug in racket/runtime-path (and thus lazy-require)
Without this, dependencies don't get collected.
Compute rest-x & rest-cx from skip | #lang racket/base
(require (for-syntax racket/base
syntax/parse
racket/lazy-require
"../private/kws.rkt")
(provide define-primitive-splicing-syntax-class)
(begin-for-syntax
(lazy-require
[syntax/parse/private/rep-attrs
(sort-sattrs)]))
(require racke... |
90e1f20e36b4cba4abd3a182140f327c19ec9ad6e252e137852f844125ae13de | unclebob/AdventOfCode2021 | core.clj | (ns day19.core
(:require [clojure.string :as string]
[clojure.set :as set]
[clojure.math.combinatorics :as combo])
(:use flatland.ordered.set))
(defn parse-line [s]
(let [ns (re-seq #"-?\d+" s)]
(condp = (count ns)
3
(map #(Integer/parseInt %) ns)
1
(Integer/p... | null | https://raw.githubusercontent.com/unclebob/AdventOfCode2021/897b078146a80cc477a8a22b0af722a878f2aef3/day19/src/day19/core.clj | clojure | (ns day19.core
(:require [clojure.string :as string]
[clojure.set :as set]
[clojure.math.combinatorics :as combo])
(:use flatland.ordered.set))
(defn parse-line [s]
(let [ns (re-seq #"-?\d+" s)]
(condp = (count ns)
3
(map #(Integer/parseInt %) ns)
1
(Integer/p... | |
168a0e0c6beb220948e59d8d15335f3d4c031531870f8d7081843a9812434c0f | privet-kitty/cl-competitive | multi-slope-trick.lisp | (defpackage :cp/multi-slope-trick
(:use :cl)
(:export #:make-multi-slope-trick #:mstrick-add+ #:mstrick-add- #:mstrick-add
#:mstrick-min #:mstrick-argmin #:mstrick-shift
#:mstrick-left-cum #:mstrick-right-cum)
(:documentation "Provides slope trick with multiset."))
(in-package :cp/multi-slop... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/657b6a1919ab83adb2dae5001732fbb151ce0e2c/module/multi-slope-trick.lisp | lisp | (defpackage :cp/multi-slope-trick
(:use :cl)
(:export #:make-multi-slope-trick #:mstrick-add+ #:mstrick-add- #:mstrick-add
#:mstrick-min #:mstrick-argmin #:mstrick-shift
#:mstrick-left-cum #:mstrick-right-cum)
(:documentation "Provides slope trick with multiset."))
(in-package :cp/multi-slop... | |
96576697deb455b96b329ba6e7b79a7fbb5f34f1bb239d2383c1b383dbaa73b8 | ocsigen/js_of_ocaml | intersectionObserver.ml | class type intersectionObserverEntry =
object
method target : Dom.node Js.t Js.readonly_prop
method boundingClientRect : Dom_html.clientRect Js.t Js.readonly_prop
method rootBounds : Dom_html.clientRect Js.t Js.opt Js.readonly_prop
method intersectionRect : Dom_html.clientRect Js.t Js.readonly_prop... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/lib/js_of_ocaml/intersectionObserver.ml | ocaml | class type intersectionObserverEntry =
object
method target : Dom.node Js.t Js.readonly_prop
method boundingClientRect : Dom_html.clientRect Js.t Js.readonly_prop
method rootBounds : Dom_html.clientRect Js.t Js.opt Js.readonly_prop
method intersectionRect : Dom_html.clientRect Js.t Js.readonly_prop... | |
0cc7600a7ee9a8ae79ae7b66204f5b4103a108c18b8f103da6e83340da61f558 | racket/racket7 | bootstrap-rktio.rkt | #lang racket/base
(require racket/include
(only-in '#%linklet primitive-table)
ffi/unsafe
ffi/unsafe/atomic
(for-syntax racket/base)
(only-in racket/base
[void racket:void]))
(define librktio (ffi-lib "librktio"))
(define << arithmetic-shift)
(define voi... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/host/bootstrap-rktio.rkt | racket | Unlike `rktio_to_bytes`, frees the array and strings
(begin) | #lang racket/base
(require racket/include
(only-in '#%linklet primitive-table)
ffi/unsafe
ffi/unsafe/atomic
(for-syntax racket/base)
(only-in racket/base
[void racket:void]))
(define librktio (ffi-lib "librktio"))
(define << arithmetic-shift)
(define voi... |
14f8adaf5570074efa433a6210355bc7ebc11670c01527a8044759a8b070b1c1 | lanl/APPFL | list1.hs | # LANGUAGE MagicHash , UnboxedTuples #
module Test where
import AppflPrelude
import APPFL.Prim
list = [True, False, True, False] ++ [True, False]
result1 = length $ (init . tail) list == I# 4#
result2 = length $ filter (==True) list == I# 3#
result3 = length $ filter (/=False) (map not list) == I# 3#
result4 = not... | null | https://raw.githubusercontent.com/lanl/APPFL/0f29f390d4735e863904348711a48b8f38ca5d03/test/hs/list1.hs | haskell | # LANGUAGE MagicHash , UnboxedTuples #
module Test where
import AppflPrelude
import APPFL.Prim
list = [True, False, True, False] ++ [True, False]
result1 = length $ (init . tail) list == I# 4#
result2 = length $ filter (==True) list == I# 3#
result3 = length $ filter (/=False) (map not list) == I# 3#
result4 = not... | |
ebcac2b55079c5178a4323a9f9a0c9d09f565b15749f6f149fef739e02ccfbb2 | hellonico/origami-fun | dip.clj | (ns opencv4.dip
(:require
[opencv4.utils :as u]
[opencv4.core :refer :all]))
; ENHANCE CONTRAST
(->
(imread "resources/images/cat.jpg" CV_8U)
(equalize-hist!)
(imwrite "output/cat.png"))
; ENHANCE BRIGHTNESS
(->
(imread "resources/images/cat.jpg")
; rtype (-1 to match src) alpha (multiply by) beta... | null | https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/dip.clj | clojure | ENHANCE CONTRAST
ENHANCE BRIGHTNESS
rtype (-1 to match src) alpha (multiply by) beta (then add)
ENHANCE SHARPNESS
gamma(here 0) is then added
ADD BORDER_REFLECT
DILATE | (ns opencv4.dip
(:require
[opencv4.utils :as u]
[opencv4.core :refer :all]))
(->
(imread "resources/images/cat.jpg" CV_8U)
(equalize-hist!)
(imwrite "output/cat.png"))
(->
(imread "resources/images/cat.jpg")
(convert-to! -1 2 0)
(imwrite "output/cat.png"))
(def neko (imread "resources/images/ca... |
72d6f01e30b9dd4fde3e91b14326c2d4da88710cf52df7f82b9ed6d7222dba93 | AndreaCrotti/elo | project.clj | (defproject byf "0.1.0-SNAPSHOT"
:description "Manage leagues of players uisng the Elo algorithm"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/tools.reader "1.3.2"]
[org.clojure/spec.a... | null | https://raw.githubusercontent.com/AndreaCrotti/elo/98c4b13b2c4e0605015d5d17a8be6cbb78c3f3f6/project.clj | clojure | TODO: move these to the test profile
[org.clojure/clojurescript "1.10.439"]
:pedantic? :warn
:main ^:skip-aot datomic-app.core
can use environ here?? | (defproject byf "0.1.0-SNAPSHOT"
:description "Manage leagues of players uisng the Elo algorithm"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/tools.reader "1.3.2"]
[org.clojure/spec.a... |
41aa20ba986fae3a32bf9a316e185278b13dd121def1ce71f703d1ea75885ff3 | basho/riak_test | verify_search.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2012 Basho Technologies , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/verify_search.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2012 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(verify_search).
-inclu... |
c39bf8a9755c01c0fb2cd8f1452c9bb03bb77e2ae716a964027bab7a3aa112b6 | Bleuje/ocaml-mesh-plot | mesh3dtools.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mesh processing / plot in OCaml
2016
= = = = = = = = = = = = = = = = = = = = = = = = = =... | null | https://raw.githubusercontent.com/Bleuje/ocaml-mesh-plot/86195b1b92b51df7fa26c6da54a2fe95c5c2414a/mesh3dtools.ml | ocaml | ***********************************************************
** SIMPLE FUNCTIONS ****************************************
** copy **
** mesh concatenation **
** Same mesh translated by a 3d vector **
** new mesh with a function applied to vertex positions **
***********************************************************
**... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mesh processing / plot in OCaml
2016
= = = = = = = = = = = = = = = = = = = = = = = = = =... |
6c228954a3815c3917f9aa7884455f041e6eb2db9e1b27e494f409f6e4942d48 | JHU-PL-Lab/jaylang | hrec.ml |
USED : PLDI2011 as
USED: PLDI2011 as hrec
*)
let rec f g x = if x>=0 then g x else f (f g) (g x)
let succ x = x+1
let main n = assert (f succ n >= 0)
| null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/mochi/hrec.ml | ocaml |
USED : PLDI2011 as
USED: PLDI2011 as hrec
*)
let rec f g x = if x>=0 then g x else f (f g) (g x)
let succ x = x+1
let main n = assert (f succ n >= 0)
| |
f8cfe548eadff81db8b4c6450ce35d20b46f70a0e90b2ee4d81489b3add928a6 | np/ling | Migrate.hs | # LANGUAGE LambdaCase #
module Ling.Fmt.Albert.Migrate where
import Ling.Fmt.Albert.Abs
import qualified Ling.Fmt.Benjamin.Abs as L
transName :: Name -> L.Name
transName = \case
Name string -> L.Name string
transProgram :: Program -> L.Program
transProgram = \case
Prg decs -> L.Prg (transDec <$> decs)... | null | https://raw.githubusercontent.com/np/ling/5a49fb5fdaef04b56e26c3ff1cd613e2800b4c23/Ling/Fmt/Albert/Migrate.hs | haskell | # LANGUAGE LambdaCase #
module Ling.Fmt.Albert.Migrate where
import Ling.Fmt.Albert.Abs
import qualified Ling.Fmt.Benjamin.Abs as L
transName :: Name -> L.Name
transName = \case
Name string -> L.Name string
transProgram :: Program -> L.Program
transProgram = \case
Prg decs -> L.Prg (transDec <$> decs)... | |
da8f93c7a4b7bbdb1e88944c3b815a24aa8e39d7e4466bad1d1264ebce0d4269 | ferd/recon | records1.erl | -module(records1).
-author("").
%% API
-export([state/3, another/3]).
-record(state, {aaa, bbb, ccc}).
-record(another, {ddd, eee, fff}).
state(A, B, C) ->
#state{aaa = A, bbb = B, ccc = C}.
another(D, E, F) ->
#another{ddd = D, eee = E, fff = F}. | null | https://raw.githubusercontent.com/ferd/recon/0f416e066a1f1ab1b0781c9b433455f0dcb4fed4/test/records1.erl | erlang | API | -module(records1).
-author("").
-export([state/3, another/3]).
-record(state, {aaa, bbb, ccc}).
-record(another, {ddd, eee, fff}).
state(A, B, C) ->
#state{aaa = A, bbb = B, ccc = C}.
another(D, E, F) ->
#another{ddd = D, eee = E, fff = F}. |
92882e43288c403372220ff0b5c7b5a5aac5ec558776bf4f46e1aebab625b83f | travelping/capwap | eapol.erl | Copyright ( C ) 2013 - 2023 , Travelping GmbH < >
%% This program 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.
%% Thi... | null | https://raw.githubusercontent.com/travelping/capwap/c2e503c5ad7d6b4c0ff3df2a4d5deed73d5f7c51/src/eapol.erl | erlang | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General P... | Copyright ( C ) 2013 - 2023 , Travelping GmbH < >
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
-module(eapol).
-export([encode_802_11/... |
f95bc14218e5dc4363a55b59d18867c8986272d09e0fc5c700b17aa0bc304c16 | clojurecup2014/parade-route | rt.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Internal/Plugins/clojure/test_clojure/rt.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
Author :
(ns clojure.test-clojure.rt
(:require clojure.set)
(:use clojure.test clojure.test-helper))
(defn bare-rt-print
"Return string RT would print prior to print-initialize"
[x]
(with-out-str
(try
(push-thread-bindings {#'clojure.core/print-ini... |
057c8acc85b37ecd62562715322f95851b25a860589a5d250082ae2a93cab174 | gigasquid/speech-acts-classifier | repl.clj | (ns speech-acts-classifier.repl
(:gen-class)
(:require [speech-acts-classifier.core :as c]))
(defn repl []
(do
(print ">> ")
(flush))
(let [input (read-line)]
(if-not (= input "quit")
(do
(println (try (c/respond input)
(catch Exception e (str "Sorry: " e " - " (.ge... | null | https://raw.githubusercontent.com/gigasquid/speech-acts-classifier/4052f3b20a5fbbcacb298005fcaedf6f7df9b731/src/speech_acts_classifier/repl.clj | clojure | (ns speech-acts-classifier.repl
(:gen-class)
(:require [speech-acts-classifier.core :as c]))
(defn repl []
(do
(print ">> ")
(flush))
(let [input (read-line)]
(if-not (= input "quit")
(do
(println (try (c/respond input)
(catch Exception e (str "Sorry: " e " - " (.ge... | |
4cdbc0d9951d9d4dabc0459719194d0853d3b51f4dc6415e76bdb4a5a9e78844 | Helium4Haskell/Top | Information.hs | {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
-----------------------------------------------------------------------------
-- | License : GPL
--
-- Maintainer :
-- Stability : provisional
-- Portability : non-portable (requires extensions)
---------------------------------------------... | null | https://raw.githubusercontent.com/Helium4Haskell/Top/5e900184d6b2ab6d7ce69945287d782252e5ea68/src/Top/Constraint/Information.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances #
---------------------------------------------------------------------------
| License : GPL
Maintainer :
Stability : provisional
Portability : non-portable (requires extensions)
-------------------------------------------------------------... |
module Top.Constraint.Information where
import Top.Types
instance TypeConstraintInfo ()
instance PolyTypeConstraintInfo ()
instance TypeConstraintInfo String
instance PolyTypeConstraintInfo String
class Show info => TypeConstraintInfo info where
equalityTypePair :: (Tp, Tp) -> info -> info
ambiguousPred... |
a4595fb469a5cba0c74e26482b95d9d9bb93551cfbe8e385fd75c20961b1ac4d | racket/drracket | stack-checkpoint.rkt | #lang racket/base
(require "drracket-errortrace-key.rkt"
racket/class
racket/contract
racket/gui/base
racket/math
racket/match
framework
"interface.rkt")
(module+ test (require (rename-in rackunit [check r:check]) racket/list racket/bool))
(define oprintf
... | null | https://raw.githubusercontent.com/racket/drracket/ca56ca84f174af316a68850e4fa589870573c47b/drracket/drracket/private/stack-checkpoint.rkt | racket | current plan: keep interesting editors in viewable stacks and
add the ability to, given a srcloc, return an editor plus the
edition it was on. --- beware that looking at the normalize path'd
version is expensive ... so cache the mapping (for a given stack, not
across multiple stacks)
todo:
actually still work?... | #lang racket/base
(require "drracket-errortrace-key.rkt"
racket/class
racket/contract
racket/gui/base
racket/math
racket/match
framework
"interface.rkt")
(module+ test (require (rename-in rackunit [check r:check]) racket/list racket/bool))
(define oprintf
... |
519aee3f15c02222a19c9115c3160208d453d9dfa529a91db44229620d499fff | brendanhay/semver | Constraint.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
-- |
-- Module : Data.SemVer.Constraint
Copyright : ( c ) 2020 < > , < >
License : This Source Code Form is subject to the terms of
the Mozilla Public License , v. 2.0 .
A copy... | null | https://raw.githubusercontent.com/brendanhay/semver/78b04983f02a7b0d4ad76115c2c9a74bc38c2883/lib/Data/SemVer/Constraint.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Data.SemVer.Constraint
you can obtain it at /.
Stability : experimental
In the absence of a standard or specification for versioning constraints, the
behavior of node-semver is closely followed. This behavior is outlined <-semver#ranges here>.
Not... | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
Copyright : ( c ) 2020 < > , < >
License : This Source Code Form is subject to the terms of
the Mozilla Public License , v. 2.0 .
A copy of the MPL can be found in the LICENSE file or
Maintainer : < >
Portab... |
f90abf5a6670b46df1c9424f06f464113c91cc9ec04573523155517276cccbd0 | xvw/preface | divisible.mli | (** Functor that generate a suite for a [Divisible]. *)
module Suite
(R : Model.CONTRAVARIANT_1)
(F : Preface_specs.DIVISIBLE with type 'a t = 'a R.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0) : Model.SUITE
| null | https://raw.githubusercontent.com/xvw/preface/84a297e1ee2967ad4341dca875da8d2dc6d7638c/lib/preface_qcheck/divisible.mli | ocaml | * Functor that generate a suite for a [Divisible]. |
module Suite
(R : Model.CONTRAVARIANT_1)
(F : Preface_specs.DIVISIBLE with type 'a t = 'a R.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0) : Model.SUITE
|
282dc698399490f92a8204669139262c5ab014ed0ab67eda0474690813ed4a4f | chris-taylor/Classical-Mechanics | VectorSpace.hs | # LANGUAGE TypeFamilies , FlexibleContexts #
module VectorSpace
( module AdditiveGroup
, VectorSpace(..)
, (</)
, lerp
, linearCombo ) where
import AdditiveGroup
infixl 7 *>
infixr 7 </
|This class describes vector spaces . A vector space V over a field F is a pair ( V , F ) where V is
--an ad... | null | https://raw.githubusercontent.com/chris-taylor/Classical-Mechanics/a3f085733181833ccba3cf8d1985929e762a9bec/VectorSpace.hs | haskell | an additive group, and there is an operation (A x V) -> V which is linear in the sense that
a *> (u <+> v) === a *> u <+> a *> v
for all a, u and v.
| Multiplication by a scalar on the left.
|Division by a scalar.
|Linear combination of vectors.
Primitive instances
Function instance
Tuple instances | # LANGUAGE TypeFamilies , FlexibleContexts #
module VectorSpace
( module AdditiveGroup
, VectorSpace(..)
, (</)
, lerp
, linearCombo ) where
import AdditiveGroup
infixl 7 *>
infixr 7 </
|This class describes vector spaces . A vector space V over a field F is a pair ( V , F ) where V is
class A... |
892b9ed332c12234d3b48de7a206a868b0ad8325917960f3091554b56829dd71 | binsec/haunted | path_predicate_optim.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/dynamic/base/path_predicate_optim.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
fe289b6a8dc2f47bb479f49d6d56d55c0cec6b7a067c7433ef73ba256d7fa0ca | hbr/fmlib | print.mli | (** Pretty Printer: Generate nicely formatted ascii text. *)
(** {1 Documentation}
{{!page-pretty} Pretty Printing Overview}
*)
(** {1 API} *)
(** {2 Types} *)
type doc
(** A document which can be pretty printed. *)
type t
(** A pretty printed document as a readable character stream. *)
type item = ch... | null | https://raw.githubusercontent.com/hbr/fmlib/0c7b923605a211e9c706d427fb33c5ba40248321/src/pretty/print.mli | ocaml | * Pretty Printer: Generate nicely formatted ascii text.
* {1 Documentation}
{{!page-pretty} Pretty Printing Overview}
* {1 API}
* {2 Types}
* A document which can be pretty printed.
* A pretty printed document as a readable character stream.
* The item type in the readable stream is [char].
* [layout width ... |
type doc
type t
type item = char
* { 2 Layout a Document }
val layout: int -> doc -> t
val layout_with_ribbon: int -> int -> doc -> t
* { 2 Character Stream }
val has_more: t -> bool
val peek: t -> char
val advance: t -> t
* [ advance s ] The character stream [ s ] advanced by one positi... |
b2f92b0da50c1c77b9e7552fe0ae466bbe08f34b612c47983b4958cef49b32b9 | seckcoder/course-compiler | s0_7.rkt | (let ([x (let ([z 22]) z)])
(let ([y 20])
(+ x y)))
| null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s0_7.rkt | racket | (let ([x (let ([z 22]) z)])
(let ([y 20])
(+ x y)))
| |
31325624557dc6a319ea2248d061cba1bc9aed098003848dad6a3966770a268b | atgreen/lisp-openshift | digest.lisp | ;;;; digest.lisp -- common functions for hashing
(in-package :crypto)
;;; defining digest (hash) functions
(eval-when (:compile-toplevel :load-toplevel)
(defconstant +buffer-size+ (* 128 1024))
EVAL - WHEN
(deftype buffer-index () `(integer 0 (,+buffer-size+)))
(defun update-digest-from-stream (digest stream &... | null | https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/ironclad_0.30/src/digests/digest.lisp | lisp | digest.lisp -- common functions for hashing
defining digest (hash) functions
Storing a length at the end of the hashed data is very common and
can be a small bottleneck when generating lots of hashes over small
quantities of data. We assume that the appropriate locations have
already been zeroed if necessary. L... |
(in-package :crypto)
(eval-when (:compile-toplevel :load-toplevel)
(defconstant +buffer-size+ (* 128 1024))
EVAL - WHEN
(deftype buffer-index () `(integer 0 (,+buffer-size+)))
(defun update-digest-from-stream (digest stream &key buffer (start 0) end)
(cond
((let ((element-type (stream-element-type stream... |
5fb3e70f7ddefa523a3d276c38e7a3093c0e2793330dd9e042ae3e968a31b845 | bennn/iPoe | such.rkt | #lang ipoe/rondelet
Such happiness
Has crept up on me without a sound
Such happiness
Has touched my heart with soft ambience;
All life sharp corner have gone round,
Since I've have met you, my friend, I've found
Such happiness.
| null | https://raw.githubusercontent.com/bennn/iPoe/4a988f6537fb738b4fe842c404f9d78f658ab76f/examples/rondelet/such.rkt | racket | #lang ipoe/rondelet
Such happiness
Has crept up on me without a sound
Such happiness
All life sharp corner have gone round,
Since I've have met you, my friend, I've found
Such happiness.
| |
6052dc519249bae44bc91b761a2d86fb39ca67be0cf7883ca61026f78e251043 | discord-haskell/discord-haskell | Interactions.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Discord.Internal.Rest.Interactions (InteractionResponseRequest(..)) where
import Data.Aeson (encode)
import qualified Data.ByteString.Lazy as BL
import Discord.Internal.Rest.Prelude
( RestIO,
... | null | https://raw.githubusercontent.com/discord-haskell/discord-haskell/98c74aff4a87aa1bef08559a7c1533b0d2ba2da9/src/Discord/Internal/Rest/Interactions.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
| Data constructor for Interaction response requests
| Create a response to an Interaction from the gateway.
This endpoint also supports file attachments similar to the webhook endpoints.
Refer to [Uploading files](#uploading-files)
for details on uploading files ... | # LANGUAGE DataKinds #
# LANGUAGE RecordWildCards #
module Discord.Internal.Rest.Interactions (InteractionResponseRequest(..)) where
import Data.Aeson (encode)
import qualified Data.ByteString.Lazy as BL
import Discord.Internal.Rest.Prelude
( RestIO,
Request(..),
JsonRequest(Delete, Post, Get, Patch),... |
34a68d3c61fe929877973960ec4b8fca089e0047398f9b7cac6c6bff92c887ba | haskell-game/sdl2 | GameController.hs | # LANGUAGE CPP #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
module SDL.Input.GameController
( ControllerDevice (..)
, availableControllers
, openController
, closeController
, controllerAtt... | null | https://raw.githubusercontent.com/haskell-game/sdl2/21519b516cd12095783c9d3fc5fadbfd8e29e3b5/src/SDL/Input/GameController.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
| A description of game controller that can be opened using 'openController'.
To retrieve a list of connected game controllers, use 'availableControllers'.
| Enumerate all connected Controllers, retrieving a description of each.
| Open a controller so ... | # LANGUAGE CPP #
# LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternSynonyms #
module SDL.Input.GameController
( ControllerDevice (..)
, availableControllers
, openController
, closeController
, controllerAttached
, getControllerID
, controllerMapping
, addControllerMapp... |
9ded0457667a1ead18165d2f82242bb4c6d680b31b5ad73b3910a948ac60228a | d-plaindoux/transept | lexer.ml | module Make (Parser : Transept_specs.PARSER with type e = char) = struct
open Transept_utils.Fun
open Lexeme
open Transept_extension.Literals.Make (Parser)
let tokenizer l =
let open Parser in
let keywords =
List.fold_left (fun p e -> p <|> atoms e) fail
@@ List.map chars_of_string l
... | null | https://raw.githubusercontent.com/d-plaindoux/transept/8567803721f6c3f5d876131b15cb301cb5b084a4/lib/transept_genlex/lexer.ml | ocaml | module Make (Parser : Transept_specs.PARSER with type e = char) = struct
open Transept_utils.Fun
open Lexeme
open Transept_extension.Literals.Make (Parser)
let tokenizer l =
let open Parser in
let keywords =
List.fold_left (fun p e -> p <|> atoms e) fail
@@ List.map chars_of_string l
... | |
6a5b0abe9c88eecbf333bf3460649423da785de3c074da10e9ba2c37558c2598 | microsoft/SLAyer | NSHashMap.mli | Copyright ( c ) Microsoft Corporation . All rights reserved .
open NSLib
(** Imperative maps from hashed keys to single values. *)
module HashMap : sig
module type S = sig
type key
type 'a t
val create : int -> 'a t
val clear : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key... | null | https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/Library/NSHashMap.mli | ocaml | * Imperative maps from hashed keys to single values. | Copyright ( c ) Microsoft Corporation . All rights reserved .
open NSLib
module HashMap : sig
module type S = sig
type key
type 'a t
val create : int -> 'a t
val clear : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
v... |
bf51fb7387e434cd16a57d1f77b0fad4bb53da4982e7049ba25751e24d1d8f71 | cyverse-archive/DiscoveryEnvironmentBackend | jobs.clj | (ns metadactyl.service.apps.jobs
(:use [korma.db :only [transaction]]
[slingshot.slingshot :only [try+]])
(:require [clojure.tools.logging :as log]
[clojure.string :as string]
[kameleon.db :as db]
[metadactyl.clients.notifications :as cn]
[metadactyl.persisten... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadactyl-clj/src/metadactyl/service/apps/jobs.clj | clojure | (ns metadactyl.service.apps.jobs
(:use [korma.db :only [transaction]]
[slingshot.slingshot :only [try+]])
(:require [clojure.tools.logging :as log]
[clojure.string :as string]
[kameleon.db :as db]
[metadactyl.clients.notifications :as cn]
[metadactyl.persisten... | |
a48cee274a4dcab1ef5cd258dce0b9a527a84366b2701cceaa5ffbe462a1b921 | williamleferrand/accretio | children_schoolbus_transportation.ml | (*
* children_schoolbus_transporation
*
* this playbook figures out the transportation solution. it currently manually
* asks for a quote, but later it could figure out the bus availability, etc
*
*
*
*
*)
open Lwt
open Printf
open CalendarLib
open Api
open Eliom_content.Html5
open Eliom_content.Html5.D
... | null | https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/playbooks/children_schoolbus_transportation.ml | ocaml |
* children_schoolbus_transporation
*
* this playbook figures out the transportation solution. it currently manually
* asks for a quote, but later it could figure out the bus availability, etc
*
*
*
*
some keys *****************************************************************
the stages *******************... |
open Lwt
open Printf
open CalendarLib
open Api
open Eliom_content.Html5
open Eliom_content.Html5.D
open Message_parsers
open Toolbox
open Ys_uid
open Children_schoolbus_types
let author = ""
let name = "Children schoolbus transportation"
let description = "this playbook figures out the transporation solution"
... |
ea493cbd10643b05765fb4b14a5323d8d2d1916f593fc7ff3f869174af04d651 | xclerc/ocamljava | javalink_servlet.mli |
* This file is part of compiler .
* Copyright ( C ) 2007 - 2015 .
*
* compiler is free software ; you can redistribute it and/or modify
* it under the terms of the Q Public License as published by
* ( with a change to choice of law ) .
*
* compiler is distributed in the hope that it ... | null | https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/compiler/javacomp/javalink_servlet.mli | ocaml | * Compiles the class responsible for initialization, returning class
name and contents of class file.
* Compiles the auxiliary for package whose name is passed (redirecting
to the class responsible for initialization), returning class name
and contents of class file. |
* This file is part of compiler .
* Copyright ( C ) 2007 - 2015 .
*
* compiler is free software ; you can redistribute it and/or modify
* it under the terms of the Q Public License as published by
* ( with a change to choice of law ) .
*
* compiler is distributed in the hope that it ... |
453d07be8c5471d63f7cd5412fea068718fb20a36e88e737bbb41aae6ae29833 | RichiH/git-annex | SanityChecker.hs | git - annex assistant sanity checker
-
- Copyright 2012 , 2013 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012, 2013 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Assistant.Threads.SanityChecker (
sanityCheckerStartupT... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Assistant/Threads/SanityChecker.hs | haskell | This thread runs once at startup, and most other threads wait for it
- to finish. (However, the webapp thread does not, to prevent the UI
- being nonresponsive.)
A corrupt index file can prevent the assistant from working at
- all, so detect and repair.
Normally the startup scan avoids re-staging files,
- ... | git - annex assistant sanity checker
-
- Copyright 2012 , 2013 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012, 2013 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Assistant.Threads.SanityChecker (
sanityCheckerStartupT... |
81f94103c20e655424e70424a72b80f196cf8da89e3a78cdd2c367a4ac13fc3d | ivarref/clj-paginate | or_filter_test.clj | (ns com.github.ivarref.clj-paginate.or-filter-test
(:require [clojure.test :refer [deftest is]]
[com.github.ivarref.clj-paginate :as cp]))
(def data
(group-by :status
[{:inst 0 :status :init}
{:inst 1 :status :pending}
{:inst 2 :status :done}
{:inst 3... | null | https://raw.githubusercontent.com/ivarref/clj-paginate/ad9954fcdbdb5402da30fcf8350eba3a712250ac/test/com/github/ivarref/clj_paginate/or_filter_test.clj | clojure | (ns com.github.ivarref.clj-paginate.or-filter-test
(:require [clojure.test :refer [deftest is]]
[com.github.ivarref.clj-paginate :as cp]))
(def data
(group-by :status
[{:inst 0 :status :init}
{:inst 1 :status :pending}
{:inst 2 :status :done}
{:inst 3... | |
b2ad7faf29da7077ade055baf449547cdb802c07ea184f9484288ef3be9e34d1 | dym/movitz | common-lisp.lisp | ;;;;------------------------------------------------------------------
;;;;
Copyright ( C ) 20012000 , 2004 ,
Department of Computer Science , University of Tromso , Norway
;;;;
;;;; Filename: common-lisp.lisp
;;;; Description:
Author : < >
Created at : Tue Dec 5 18:33:01 2000
... | null | https://raw.githubusercontent.com/dym/movitz/56176e1ebe3eabc15c768df92eca7df3c197cb3d/losp/common-lisp.lisp | lisp | ------------------------------------------------------------------
Filename: common-lisp.lisp
Description:
Distribution: See the accompanying file COPYING.
------------------------------------------------------------------ | Copyright ( C ) 20012000 , 2004 ,
Department of Computer Science , University of Tromso , Norway
Author : < >
Created at : Tue Dec 5 18:33:01 2000
$ I d : common - lisp.lisp , v 1.2 2004/01/19 11:23:43 Exp $
(require :muerte/common-lisp)
(provide :common-lisp)
|
79d02f5b563802e6f124d2b1183c7c69cd0c0d0767d20baf6adf60904183b2ca | smuenzel/opile | debuginfo.ml | open! Core
include Compiler_without_sexp.Debuginfo
let sexp_of_t _ = Sexp.List [ ]
| null | https://raw.githubusercontent.com/smuenzel/opile/190ca86df6440550d0fddf0222e16ba2e52bca64/compiler-with-sexp/debuginfo.ml | ocaml | open! Core
include Compiler_without_sexp.Debuginfo
let sexp_of_t _ = Sexp.List [ ]
| |
af3be02b5688e873ea637de911f0ce262387f9a54ac279afaccbd6b4ca548c70 | AdRoll/rebar3_format | rebar3_format_prv.erl | %%% @doc Plugin provider for rebar3
-module(rebar3_format_prv).
-export([init/1, do/1, format_error/1]).
@private
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
init(State) ->
Provider =
providers:create([{name, format},
{module, rebar3_format_prv},
... | null | https://raw.githubusercontent.com/AdRoll/rebar3_format/2c241119cc24a964ecc08bfcecde30f7e755b17e/src/rebar3_format_prv.erl | erlang | @doc Plugin provider for rebar3
Special handling needed for "" (current directory)
so that ignore-lists work in an expected way.
@doc Process ignored files | -module(rebar3_format_prv).
-export([init/1, do/1, format_error/1]).
@private
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
init(State) ->
Provider =
providers:create([{name, format},
{module, rebar3_format_prv},
{bare, true},
... |
5f67b7727530bc867ea90235397f605f3402815106ef56e76a073deda1b9675b | cloojure/tupelo | set.cljc | Copyright ( c ) . All rights reserved .
The use and distribution terms for this software are covered by the Eclipse Public License 1.0
; (-1.0.php) which can be found in the file epl-v10.html at
; the root of this distribution. By using this software in any fashion, you are agreeing to be
; bound by th... | null | https://raw.githubusercontent.com/cloojure/tupelo/4105fefbb1c4d1b2f06fa4993f9dd007e5e41e00/test/cljc/tst/tupelo/set.cljc | clojure | (-1.0.php) which can be found in the file epl-v10.html at
the root of this distribution. By using this software in any fashion, you are agreeing to be
bound by the terms of this license. You must not remove this notice, or any other, from this
software.
----------------------------------------------------... | Copyright ( c ) . All rights reserved .
The use and distribution terms for this software are covered by the Eclipse Public License 1.0
(ns tst.tupelo.set
#?(:cljs (:require-macros
[tupelo.misc]
[tupelo.testy]
))
(:require
[tupelo.set :as set]
[tupelo.core :as... |
3d9257dfb0fdbb310ab9232e1ede1eaa5933b266196a364de4eab454071b1a4a | phlummox/hup | Spec.hs | # LANGUAGE CPP #
# OPTIONS_GHC -F #
#if __GLASGOW_HASKELL__ >= 801
# OPTIONS_GHC -Wno - missing - export - lists #
#endif
| null | https://raw.githubusercontent.com/phlummox/hup/059c3cb4e15f846fbffb35f937293f367bcc966d/test-hspec/Spec.hs | haskell | # LANGUAGE CPP #
# OPTIONS_GHC -F #
#if __GLASGOW_HASKELL__ >= 801
# OPTIONS_GHC -Wno - missing - export - lists #
#endif
| |
c5d44a8dbbadd97812057699ca4db59c738a6308843fb11a649ef114e562b46d | expipiplus1/vulkan | VK_AMD_shader_core_properties2.hs | {-# language CPP #-}
-- | = Name
--
-- VK_AMD_shader_core_properties2 - device extension
--
-- == VK_AMD_shader_core_properties2
--
-- [__Name String__]
-- @VK_AMD_shader_core_properties2@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
228
--
-- [__Revision__]
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/70d8cca16893f8de76c0eb89e79e73f5a455db76/src/Vulkan/Extensions/VK_AMD_shader_core_properties2.hs | haskell | # language CPP #
| = Name
VK_AMD_shader_core_properties2 - device extension
== VK_AMD_shader_core_properties2
[__Name String__]
@VK_AMD_shader_core_properties2@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
... | 228
1
- Requires support for Vulkan 1.0
-
2019 - 07 - 26
- , AMD
- , AMD
' Vulkan . ' :
- ' PhysicalDeviceShaderCoreProperties2AMD '
- ' ShaderCorePropertiesFlagBitsAMD '
- Extending ' Vulkan . Core10.Enums . StructureType . Structu... |
519b21595eb513485bc90bef47210303787af2934a1fc576db464f0918282ca7 | DavidAlphaFox/RabbitMQ | rest_forbidden_resource.erl | -module(rest_forbidden_resource).
-export([init/3, rest_init/2, allowed_methods/2, forbidden/2,
content_types_provided/2, content_types_accepted/2,
post_is_create/2, create_path/2, to_text/2, from_text/2]).
init(_Transport, _Req, _Opts) ->
{upgrade, protocol, cowboy_http_rest}.
rest_init(Req, [Forbidden]) ->
{o... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/cowboy-wrapper/cowboy-git/test/rest_forbidden_resource.erl | erlang | -module(rest_forbidden_resource).
-export([init/3, rest_init/2, allowed_methods/2, forbidden/2,
content_types_provided/2, content_types_accepted/2,
post_is_create/2, create_path/2, to_text/2, from_text/2]).
init(_Transport, _Req, _Opts) ->
{upgrade, protocol, cowboy_http_rest}.
rest_init(Req, [Forbidden]) ->
{o... | |
566111fc326b83413aa48986ab1508177163327ab79c5227e0547a35a8b2ed36 | njordhov/droidbox | project.clj | (defproject droidbox "0.1.0-SNAPSHOT"
:description "FIXME Pallet project for droidbox"
:dependencies [[org.clojure/clojure "1.4.0"]
[com.palletops/pallet "0.8.0-RC.9"]
[com.palletops/pallet-jclouds "1.7.3"]
;; To get started we include all jclouds compute providers... | null | https://raw.githubusercontent.com/njordhov/droidbox/1fd77998a38fb6e4063bd2f1429f2af7666f44cb/project.clj | clojure | To get started we include all jclouds compute providers.
You may wish to replace this with the specific jclouds
providers you use, to reduce dependency sizes.
the declared version is old and can overrule the
resolved version | (defproject droidbox "0.1.0-SNAPSHOT"
:description "FIXME Pallet project for droidbox"
:dependencies [[org.clojure/clojure "1.4.0"]
[com.palletops/pallet "0.8.0-RC.9"]
[com.palletops/pallet-jclouds "1.7.3"]
[org.apache.jclouds/jclouds-allblobstore "1.7.2"]
... |
4f02c606523351a961f64289cbdcc3d08c22b8bc8acbdaa6846c0fb1aa13465b | slegrand45/mysql_protocol | test_reset_session.ml | open OUnit
open Mysql_protocol
let test1 connection =
let () =
assert_equal ~msg:"Reset session"
(())
(Mp_client.reset_session ~connection:connection)
in
()
let test connection _ =
try
test1 connection
with
| Mp_client.Error err as e -> (
let () = prerr_endline (Mp_client.erro... | null | https://raw.githubusercontent.com/slegrand45/mysql_protocol/eb28d33dfbee7b12f88a7f798c2dbb40e1fb1bb0/test/test_reset_session.ml | ocaml | open OUnit
open Mysql_protocol
let test1 connection =
let () =
assert_equal ~msg:"Reset session"
(())
(Mp_client.reset_session ~connection:connection)
in
()
let test connection _ =
try
test1 connection
with
| Mp_client.Error err as e -> (
let () = prerr_endline (Mp_client.erro... | |
c05cfcfdf725ef511c93c9f61368ca5854b36c340461ff3630defe6461db9dd8 | spell-music/csound-expression | Harmonics.hs | -- Experiments with harmonics.
module Harmonics where
import Csound.Base
a sum of pure tones that form a hormanic series .
harms :: [Sig] -> Sig -> Sig
harms ks cps = sum $ zipWith f ks (fmap (sig . double) [1 .. ])
where f k n = k * osc (n * cps)
main = dac $ do
-- Let's create a list of coefficients.
... | null | https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-expression/examples/Gui/Harmonics.hs | haskell | Experiments with harmonics.
Let's create a list of coefficients.
A simple instrument that plays a harmonic series
with the given coefficients.
Places elements on window with vertical alignment.
Let's trigger the instrument with midi controller. | module Harmonics where
import Csound.Base
a sum of pure tones that form a hormanic series .
harms :: [Sig] -> Sig -> Sig
harms ks cps = sum $ zipWith f ks (fmap (sig . double) [1 .. ])
where f k n = k * osc (n * cps)
main = dac $ do
(g, ks) <- sliderBank "Harmonics" (1 : replicate 13 0)
(gv, v) <- mas... |
7a40e9a337d956a63d08baf2183da7578651b236f1a0cb6d845350cd56d9e10c | richhickey/clojure-contrib | accumulators.clj | ;; Accumulators
by
last updated May 19 , 2009
;; This module defines various accumulators (list, vector, map,
;; sum, product, counter, and combinations thereof) with a common
interface defined by the multimethods add and combine .
;; For each accumulator type, its empty value is defined in this module.
;; Ap... | null | https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/main/clojure/clojure/contrib/accumulators.clj | clojure | Accumulators
This module defines various accumulators (list, vector, map,
sum, product, counter, and combinations thereof) with a common
For each accumulator type, its empty value is defined in this module.
Applications typically use this as a starting value and add data
using the add multimethod.
Public License... |
by
last updated May 19 , 2009
interface defined by the multimethods add and combine .
Copyright ( c ) , 2009 . All rights reserved . The use
and distribution terms for this software are covered by the Eclipse
(ns
#^{:author "Konrad Hinsen"
:doc "A generic accumulator interface and implementat... |
7509dfdb249afe95bd83e50329ac2611b9283721a7ee259e176b915c19f25a3a | gcv/dgraph | dgraph.clj | (ns test.dgraph
(:require [dgraph :as dg])
(:use clojure.test))
(deftest internal-details
;; XXX: This is a slightly incorrect test, in that it looks at the correctness
;; of some the data structures representing dgraphs. It helps catch some
;; binding bugs.
(let [graph1 (dg/make-dgraph :a 1 :b 2)
... | null | https://raw.githubusercontent.com/gcv/dgraph/ef110bfafc7d9d1dc228a256508348819355822b/test/test/dgraph.clj | clojure | XXX: This is a slightly incorrect test, in that it looks at the correctness
of some the data structures representing dgraphs. It helps catch some
binding bugs.
original graph1
add a new value
add a new value which forces :c to invalidate
not yet
now the lazy function defining :c ran
now it should have updated
... | (ns test.dgraph
(:require [dgraph :as dg])
(:use clojure.test))
(deftest internal-details
(let [graph1 (dg/make-dgraph :a 1 :b 2)
graph2 (graph1 :c 3 :d 4 :e 5)
node-name-extractor (fn [graph]
(set (map (fn [node-fn] (@(node-fn) :name))
... |
80dd600174677556ca4c963bd179bf470dd115246f0766f0f164e5c71ffce0e9 | michiakig/sicp | ex-4.15-halting.scm | ;;;; Structure and Interpretation of Computer Programs
Chapter 4 Section 1 The Metacircular Evaluator
Exercise 4.15 An old friend .
Assume that we do have a procedure halts? which determines if a procedure halts on a given input.
Let:
(define (run-forever) (run-forever))
(define (try p)
(if (halts? p p)
... | null | https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch4/ex-4.15-halting.scm | scheme | Structure and Interpretation of Computer Programs | Chapter 4 Section 1 The Metacircular Evaluator
Exercise 4.15 An old friend .
Assume that we do have a procedure halts? which determines if a procedure halts on a given input.
Let:
(define (run-forever) (run-forever))
(define (try p)
(if (halts? p p)
(run-forever)
'halted))
If (p p) halts, then (... |
8c950a6d11b7d164590a9fdcd37d2b4bdd03f8861f1843a49bb28db5f2789b01 | acieroid/scala-am | rotateB-1.scm | (letrec ((rotate (lambda (n x y z)
(if (= n 0)
y
(rotate (- n 1) y z x)))))
(rotate 41 5 #t "hallo"))
| null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/changesBenevolPaper/rotateB-1.scm | scheme | (letrec ((rotate (lambda (n x y z)
(if (= n 0)
y
(rotate (- n 1) y z x)))))
(rotate 41 5 #t "hallo"))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.