_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 |
|---|---|---|---|---|---|---|---|---|
98e920b38d9ffda29b7166f6676b392e6d9f2de301120f2cc7642f77180c48f0 | footprintanalytics/footprint-web | specs.clj | (ns metabase.transforms.specs
(:require [medley.core :as m]
[metabase.domain-entities.specs :refer [FieldType MBQL]]
[metabase.mbql.normalize :as mbql.normalize]
[metabase.mbql.schema :as mbql.s]
[metabase.mbql.util :as mbql.u]
[metabase.util :as u]
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/transforms/specs.clj | clojure | Since `Aggregation` and `Expressions` are structurally the same, we can't use them directly
Some map keys are names (ie. strings) while the rest are keywords, a distinction lost in YAML | (ns metabase.transforms.specs
(:require [medley.core :as m]
[metabase.domain-entities.specs :refer [FieldType MBQL]]
[metabase.mbql.normalize :as mbql.normalize]
[metabase.mbql.schema :as mbql.s]
[metabase.mbql.util :as mbql.u]
[metabase.util :as u]
... |
4d87939b19eab52928cef88b43b9919b5a7efc603a405c3df6d61814f3e0db3e | ocsigen/eliom | eliom_lib.client.ml | Ocsigen
* Copyright ( C ) 2005 - 2008 ,
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at ... | null | https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/eliom_lib.client.ml | ocaml | ***************************************************************************
assuming relative URL and improvising
Deprecated ON
Deprecated OFF
***************************************************************************
let () =
(Js.Unsafe.coerce Dom_html.window)##set_tracing <-
Js.wrap_callback (fun v -> s... | Ocsigen
* Copyright ( C ) 2005 - 2008 ,
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at ... |
a0d3a8320b160db480cc23861a423e0e6876d36ea3f3805860dd477ab3cb023e | macchiato-framework/macchiato-template | middleware.cljs | (ns {{project-ns}}.middleware
(:require
[macchiato.middleware.defaults :as defaults]))
(defn wrap-defaults [handler]
(defaults/wrap-defaults handler defaults/site-defaults))
| null | https://raw.githubusercontent.com/macchiato-framework/macchiato-template/fff6f0cc640b43933d1e94c85a0b393e89cbe14d/resources/leiningen/new/macchiato/src/server/middleware.cljs | clojure | (ns {{project-ns}}.middleware
(:require
[macchiato.middleware.defaults :as defaults]))
(defn wrap-defaults [handler]
(defaults/wrap-defaults handler defaults/site-defaults))
| |
4282f0e87a44c84ce980c8a98fb6f64c57f99fbcaa580107b8dec992b1beda12 | ronwalf/HTN-Translation | htnunlift.hs | {-# OPTIONS_GHC
-freduction-depth=30
-Wall
#-}
{-# LANGUAGE
FlexibleContexts,
FlexibleInstances,
OverloadedStrings,
RankNTypes,
ScopedTypeVariables,
TypeOperators,
UndecidableInstances
#-}
module Main where
import Control.Monad (liftM)
import Data.Function (on)
import Data.List
... | null | https://raw.githubusercontent.com/ronwalf/HTN-Translation/dfe39a9444c944e2efd48306e122a17d6c0f2d89/src-cmdline/htnunlift.hs | haskell | # OPTIONS_GHC
-freduction-depth=30
-Wall
#
# LANGUAGE
FlexibleContexts,
FlexibleInstances,
OverloadedStrings,
RankNTypes,
ScopedTypeVariables,
TypeOperators,
UndecidableInstances
#
import Debug.Trace
Actually quite wrong if functions are allowed.
Copy a problem without its init... | module Main where
import Control.Monad (liftM)
import Data.Function (on)
import Data.List
import Data.Maybe
import Data.Text (Text, append, pack)
import qualified Data.Text as DT
import System.Environment
import System.Exit
import System.FilePath
import System.IO
import Text.ParserCombinators.Parsec hiding (space)
imp... |
21033e865909cb00ac3842e007831493155f53255abd57d9bcdd4fb54bd5e4f8 | inconvergent/weird | ortho.lisp |
(in-package :ortho)
"
Simple orthographic projection with camera position (cam), view vector (vpn)
view plane offset (xy) and scaling (s).
"
(declaim (inline 3identity))
(veq:fvdef 3identity ((:va 3 x)) (values x))
(declaim (inline zero))
(veq:fvdef zero () (veq:f3$point 0f0 0f0 0f0))
(defstruct (ortho)
away fr... | null | https://raw.githubusercontent.com/inconvergent/weird/106d154ec2cd0e4ec977c3672ba717d6305c1056/src/draw/ortho.lisp | lisp | cam up
cam position
view plane horizontal
view plane vertical
u scaled by s
v scaled by s
view plane offset
scale
TODO: there appears to be a bug where u,v is not updated if cam is changed?? |
(in-package :ortho)
"
Simple orthographic projection with camera position (cam), view vector (vpn)
view plane offset (xy) and scaling (s).
"
(declaim (inline 3identity))
(veq:fvdef 3identity ((:va 3 x)) (values x))
(declaim (inline zero))
(veq:fvdef zero () (veq:f3$point 0f0 0f0 0f0))
(defstruct (ortho)
away fr... |
46d57b4a4a8ca2d409c1969402900661961554e356978c44f3402d5f08e39239 | odis-labs/options | Options.ml |
type nonrec 'a option = 'a option =
| None
| Some of 'a
module Option = struct
type nonrec 'a t = 'a option =
| None
| Some of 'a
exception No_value
let case ~some ~none self =
match self with
| Some x -> some x
| None -> none ()
module Prelude = struct
let some x = Some x
... | null | https://raw.githubusercontent.com/odis-labs/options/5b1165d99aba112d550ddc3133a8eb1d174441ec/src/Options.ml | ocaml | let dump pp1 fmt self =
match self with
| None ->
Format.pp_print_string fmt "None"
| Some x ->
Format.pp_print_string fmt "(Some ";
(pp1 fmt) x;
Format.pp_print_string fmt ")"
Unsafe |
type nonrec 'a option = 'a option =
| None
| Some of 'a
module Option = struct
type nonrec 'a t = 'a option =
| None
| Some of 'a
exception No_value
let case ~some ~none self =
match self with
| Some x -> some x
| None -> none ()
module Prelude = struct
let some x = Some x
... |
be534ecae601264b81827b97a8808b6f5fbb634ba21057a9dc9418c62a85c392 | tweag/smtlib-backends | EdgeCases.hs | {-# LANGUAGE OverloadedStrings #-}
module EdgeCases (edgeCases) where
import Data.ByteString.Builder (Builder)
import SMTLIB.Backends as SMT
import qualified SMTLIB.Backends.Z3 as Z3
import Test.Tasty
import Test.Tasty.HUnit
edgeCases :: [TestTree]
edgeCases =
[ testCase "Sending an empty command" emptyCommand,
... | null | https://raw.githubusercontent.com/tweag/smtlib-backends/366d2f404af52135273c45b6a0d7d6d8fe4ec974/smtlib-backends-z3/tests/EdgeCases.hs | haskell | # LANGUAGE OverloadedStrings #
| Upon processing an empty command, the backend will respond with an empty output.
| Upon processing a command producing no output, the backend will respond
with an empty output. |
module EdgeCases (edgeCases) where
import Data.ByteString.Builder (Builder)
import SMTLIB.Backends as SMT
import qualified SMTLIB.Backends.Z3 as Z3
import Test.Tasty
import Test.Tasty.HUnit
edgeCases :: [TestTree]
edgeCases =
[ testCase "Sending an empty command" emptyCommand,
testCase "Sending a command expec... |
87fa78a67ca59a5dfd6a7b1c5aacc7039112aeff8d864597a14fefc755ae7174 | conal/Fran | SoundB.hs | -- "Sound behaviors"
module SoundB where
import qualified HSpriteLib
import BaseTypes (Time)
import Behavior
import Event
import GBehavior
data SoundB = SilentS
| BufferS (HSpriteLib.HDSBuffer) Bool -- buffer, whether repeats
| MixS SoundB SoundB
scale ( only < 1 , sorry ... | null | https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/src/SoundB.hs | haskell | "Sound behaviors"
buffer, whether repeats
units?, combines?
multiplies
| ImageS ImageB -- listen to an image
Primitives
multiplies (intensity, not dB)
multiplies
In dB, and so combines additively. What's best??
tweak volume's and mix
## This guy is wrong!!
|
module SoundB where
import qualified HSpriteLib
import BaseTypes (Time)
import Behavior
import Event
import GBehavior
data SoundB = SilentS
| MixS SoundB SoundB
scale ( only < 1 , sorry ! )
| UntilS SoundB (Event SoundB)
timeTransform on SoundB
deriving Show
... |
18d5cb86ef9a12beed5d8cf03dc75077bcba3a634f3f1371078fa4b63edd45e6 | AshleyYakeley/Truth | Model.hs | module Changes.Core.Model
( module I
) where
import Changes.Core.Model.AutoClose as I
import Changes.Core.Model.Cache as I
import Changes.Core.Model.DeferActionT as I
import Changes.Core.Model.EditContext as I
import Changes.Core.Model.MemoryCell as I
import Changes.Core.Model.Model as I
import Changes.Core.Mo... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/32d5f7ac9fe38331bd137e722b7780ca45a04ca9/Changes/changes-core/lib/Changes/Core/Model.hs | haskell | module Changes.Core.Model
( module I
) where
import Changes.Core.Model.AutoClose as I
import Changes.Core.Model.Cache as I
import Changes.Core.Model.DeferActionT as I
import Changes.Core.Model.EditContext as I
import Changes.Core.Model.MemoryCell as I
import Changes.Core.Model.Model as I
import Changes.Core.Mo... | |
5cd67ec020cd6059dae2bed0796db9050286b2cfb129f0bce1ca3a92c4c41c90 | FranklinChen/hugs98-plus-Sep2006 | Convolution.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.PixelRectangles.Convolution
Copyright : ( c ) 2002 - 2005
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer :
-- Stability : provisional... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/OpenGL/Graphics/Rendering/OpenGL/GL/PixelRectangles/Convolution.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.Rendering.OpenGL.GL.PixelRectangles.Convolution
License : BSD-style (see the file libraries/OpenGL/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
-------------------------... | Copyright : ( c ) 2002 - 2005
This module corresponds to a part of section 3.6.1 ( Pixel Storage Modes ) of
the OpenGL 1.5 specs .
module Graphics.Rendering.OpenGL.GL.PixelRectangles.Convolution (
ConvolutionTarget(..), convolution,
convolutionFilter1D, getConvolutionFilter1D,
convolutionFilter2D... |
cb9929ef854adb55387a3f2d55088e16b54f97196a60c168d85d052c4c46a7b8 | CryptoKami/cryptokami-core | Update.hs | | ' Bi ' instances for various types from cryptokami - sl - update .
# OPTIONS_GHC -F -pgmF autoexporter #
{-# OPTIONS_GHC -Wno-unused-imports #-}
# OPTIONS_GHC -Wno - dodgy - exports #
| null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/update/Pos/Binary/Update.hs | haskell | # OPTIONS_GHC -Wno-unused-imports # | | ' Bi ' instances for various types from cryptokami - sl - update .
# OPTIONS_GHC -F -pgmF autoexporter #
# OPTIONS_GHC -Wno - dodgy - exports #
|
660dd1eb670cc621a6619bcc4f20b2a083fd022d9763afad2c95f29a40d887ad | g000001/tagger | lexicon-protocol.lisp | -*- Package : TDB ; Syntax : Common - Lisp ; Mode : Lisp ; Base : 10 -*-
Copyright ( c ) 1992 by Xerox Corporation .
(cl:in-package :tdb)
(eval-when (compile eval load)
(use-package :sv-resource)
(export '(lexicon
lexicon-tags lexicon-classes lexicon-open-class
lexicon-lookup class-order
lexicon... | null | https://raw.githubusercontent.com/g000001/tagger/a4e0650c55aba44250871b96e2220e1b4953c6ab/orig/src/analysis/lexicon-protocol.lisp | lisp | Syntax : Common - Lisp ; Mode : Lisp ; Base : 10 -*-
and ( 2 ) a parallel sorted vector of tags ( keywords ) .
All vectors and strings are from resources.
Returns a vector of classes. Each class is a sorted vector of tags.
Returns a vector of open class tags (from the vector resource).
Returns a vector of tags.
... |
Copyright ( c ) 1992 by Xerox Corporation .
(cl:in-package :tdb)
(eval-when (compile eval load)
(use-package :sv-resource)
(export '(lexicon
lexicon-tags lexicon-classes lexicon-open-class
lexicon-lookup class-order
lexicon-filter ts-lexicon
*the-keyword-package*
*tokenizer-class* re-r... |
1027328a52a80528dc3ff5c7c09f14fce345cd5a97561b571abc180e99bdf774 | bobzhang/fan | pr4452.ml | open Camlp4.PreCast
let _loc = Loc.mk "?"
let base base fields ty =
let fields = List.fold_right (fun field acc ->
let c = <:ctyp< $lid:field$ : $uid:field$.record >> in
<:ctyp< $c$ ; $acc$ >>) fields <:ctyp< >>
in
<:module_binding< $uid:base$ :
sig type record = {
key : $ty$;
$field... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/fixtures/pr4452.ml | ocaml | open Camlp4.PreCast
let _loc = Loc.mk "?"
let base base fields ty =
let fields = List.fold_right (fun field acc ->
let c = <:ctyp< $lid:field$ : $uid:field$.record >> in
<:ctyp< $c$ ; $acc$ >>) fields <:ctyp< >>
in
<:module_binding< $uid:base$ :
sig type record = {
key : $ty$;
$field... | |
165b68daf354d795500c20987f08a634dbb3756423b7ce55781baa15146c34fa | D4ryus/cl-netstat | cl-netstat.lisp | ;;;; cl-stats.lisp
(in-package #:cl-netstat)
;;; "cl-stats" goes here. Hacks and glory await!
(defparameter *max* (* 1024 1024))
(defparameter *refresh-time* 0.25)
(defparameter *print-time-p* nil)
(defparameter *color-mode* :256)
(defparameter *unicode-mode* t)
(defparameter *icons* (list #\Space #\▁ #\▂ #\▃ #\▄ #\... | null | https://raw.githubusercontent.com/D4ryus/cl-netstat/e7187a4bec2f23b08c7a236f0c52503a444b941d/cl-netstat.lisp | lisp | cl-stats.lisp
"cl-stats" goes here. Hacks and glory await!
add new interfaces
update length
update data |
(in-package #:cl-netstat)
(defparameter *max* (* 1024 1024))
(defparameter *refresh-time* 0.25)
(defparameter *print-time-p* nil)
(defparameter *color-mode* :256)
(defparameter *unicode-mode* t)
(defparameter *icons* (list #\Space #\▁ #\▂ #\▃ #\▄ #\▅ #\▆ #\▇ #\█))
(defparameter *rgy-percentage*
over 90 % - > red
... |
ff5f1c12305afb0ee88509b4bcba60c5586e6726845c5c010134b4963daff935 | ygmpkk/house | IOState.hs | -- #hide
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.IOState
Copyright : ( c ) 2003
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : ... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/OpenGL/Graphics/Rendering/OpenGL/GL/IOState.hs | haskell | #hide
------------------------------------------------------------------------------
|
Module : Graphics.Rendering.OpenGL.GL.IOState
License : BSD-style (see the file libraries/OpenGL/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
This is a purely internal module for a... | Copyright : ( c ) 2003
module Graphics.Rendering.OpenGL.GL.IOState (
IOState(..), getIOState, peekIOState, evalIOState, nTimes
) where
import Foreign.Ptr ( Ptr, plusPtr )
import Foreign.Storable ( Storable(sizeOf,peek) )
newtype IOState s a = IOState { runIOState :: Ptr s -> IO (a, Ptr s) }
instance Fu... |
ef5a38f2f4192b1543cfa2ad222fc6bbbb31804bb50a37466ec4433d30d4d6fd | tonyg/udp-exchange | udp_exchange_relay.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
-module(udp_exchange_relay).
-include_lib("rabbit_common/include/rabbit.hrl").
-include("udp_exchange.hrl").
-behaviour(gen_server).
-e... | null | https://raw.githubusercontent.com/tonyg/udp-exchange/99ee53ffe6f34130920ae3a741ecf6d43955681b/src/udp_exchange_relay.erl | erlang |
----------------------------------------------------------------------------
----------------------------------------------------------------------------
re:split(X,Y) can be replaced with binary:split(X,Y,[global]) once we
mandatory?
should confirm message? | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(udp_exchange_relay).
-include_lib("rabbit_common/include/rabbit.hrl").
-include("udp_exchange.hrl").
-behaviour(gen_server).
-expo... |
844ddc30cb895d71186a820bf4e039f98ed14a1ac6df9e0b21e37cfaacf2e51f | abeniaminov/transaction | tgen_sampl.erl | % -*- coding: utf8 -*-
%%%-------------------------------------------------------------------
@author
( C ) 2015 , < COMPANY >
%%% @doc
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(tgen_sampl).
-author("Alexander").
-behaviour(tgen_server).
%% API
-export([start_l... | null | https://raw.githubusercontent.com/abeniaminov/transaction/bdf3dbf352f8d13286bcf85428938a5f0fbb432f/test/tgen_sampl.erl | erlang | -*- coding: utf8 -*-
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
===================================================================
API
=================================================... | @author
( C ) 2015 , < COMPANY >
-module(tgen_sampl).
-author("Alexander").
-behaviour(tgen_server).
-export([start_link/3, start_link/2]).
-export([set_value/3, get_value/2, stop/2, start_from/3]).
-export([init/2,
handle_call/4,
handle_cast/3,
handle_info/3,
terminate/3,
code_change/3])... |
ca4ccc51872d46ce08f9d526c19c4f0b1739ef22599f79a864cd3531a02b50e3 | 40ants/40ants-critic | ci.lisp | (uiop:define-package #:40ants-critic/ci
(:use #:cl)
(:import-from #:40ants-ci/jobs/linter
#:linter)
(:import-from #:40ants-ci/jobs/critic
#:critic)
(:import-from #:40ants-ci/jobs/run-tests
#:run-tests)
(:import-from #:40ants-ci/jobs/docs
#:build-... | null | https://raw.githubusercontent.com/40ants/40ants-critic/912a23ac5f55ae47c03c0889376e54273adbfb50/src/ci.lisp | lisp | (run-tests :coverage t) | (uiop:define-package #:40ants-critic/ci
(:use #:cl)
(:import-from #:40ants-ci/jobs/linter
#:linter)
(:import-from #:40ants-ci/jobs/critic
#:critic)
(:import-from #:40ants-ci/jobs/run-tests
#:run-tests)
(:import-from #:40ants-ci/jobs/docs
#:build-... |
11b8621fd764e9bbafe34f5d84ce9c8cf494d56be37323b1452618c3f0be57a9 | gas2serra/mcclim-desktop | config.lisp | (in-package :desktop-user)
(find-applications)
(configure-application (find-application :listener))
(configure-application (find-application :climacs))
(use-application-as-external-debugger "swank-debugger")
(use-application-as-debugger "swank-debugger")
;;(use-application-as-debugger "desktop-debugger")
| null | https://raw.githubusercontent.com/gas2serra/mcclim-desktop/f85d19c57d76322ae3c05f98ae43bfc8c0d0a554/dot-mcclim-desktop/config.lisp | lisp | (use-application-as-debugger "desktop-debugger") | (in-package :desktop-user)
(find-applications)
(configure-application (find-application :listener))
(configure-application (find-application :climacs))
(use-application-as-external-debugger "swank-debugger")
(use-application-as-debugger "swank-debugger")
|
65beb7ed04a60b1f790e250428aa2365b77d5d7878519a75206c4afe5fa44e21 | andreas/ocaml-graphql-tutorial | github.ml | github_request : token : string - >
* query : string - >
* variables : Yojson . Basic.json - >
* ( Yojson.Basic.json ,
* [ ` JSON of string | ` HTTP of Cohttp . Response.t * string ]
* ) result
* ... | null | https://raw.githubusercontent.com/andreas/ocaml-graphql-tutorial/b8ec76b8b2f5a3abc5ad229cbc43587dc652f854/github.ml | ocaml | executable_query : (string *
* ((Yojson.Basic.json -> 'a) -> 'a) *
* (Yojson.Basic.json -> 'b)
* ) ->
* token:string -> 'a
| github_request : token : string - >
* query : string - >
* variables : Yojson . Basic.json - >
* ( Yojson.Basic.json ,
* [ ` JSON of string | ` HTTP of Cohttp . Response.t * string ]
* ) result
* ... |
d4130be728179ddfc823311c1cf9eeffcf8996ffd67f774031afbe6f977741e3 | gowthamk/ocaml-irmin | msigs.ml | module type PATCHABLE = sig
type t
type edit
type patch = edit list
val op_diff: t -> t -> patch
val op_transform: patch -> patch -> patch * patch
end
module type MERGEABLE = sig
type t
val merge3: ancestor:t -> t -> t -> t
end
module type RESOLVEABLE = sig
type t
val resolve: t -> t -> t
include... | null | https://raw.githubusercontent.com/gowthamk/ocaml-irmin/54775f6c3012e87d2d0308f37a2ec7b27477e887/queue/msigs.ml | ocaml | module type PATCHABLE = sig
type t
type edit
type patch = edit list
val op_diff: t -> t -> patch
val op_transform: patch -> patch -> patch * patch
end
module type MERGEABLE = sig
type t
val merge3: ancestor:t -> t -> t -> t
end
module type RESOLVEABLE = sig
type t
val resolve: t -> t -> t
include... | |
48ce2c2509128727074b26e3dd01b5f924d343659e982c25304a776587c4112d | ThoughtWorksInc/stonecutter | profile.clj | (ns stonecutter.test.view.profile
(:require [midje.sweet :refer :all]
[net.cgrand.enlive-html :as html]
[stonecutter.routes :as r]
[stonecutter.test.view.test-helpers :as th]
[stonecutter.translation :as t]
[stonecutter.view.profile :refer [profile]]
... | null | https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/test/stonecutter/test/view/profile.clj | clojure | (ns stonecutter.test.view.profile
(:require [midje.sweet :refer :all]
[net.cgrand.enlive-html :as html]
[stonecutter.routes :as r]
[stonecutter.test.view.test-helpers :as th]
[stonecutter.translation :as t]
[stonecutter.view.profile :refer [profile]]
... | |
df11067347c9b206ec0251cf243628b7f73eb3ac8c99c785fb3b7380d05761aa | mk270/archipelago | game.mli |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2013
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... | null | https://raw.githubusercontent.com/mk270/archipelago/4241bdc994da6d846637bcc079051405ee905c9b/src/game/game.mli | ocaml | wrapper for reset |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2013
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... |
88253cd9b1406bd99557d4d24dadbe74716c410ab37cf2fba54ca46faf2f743b | privet-kitty/dufy | spectrum.lisp | ;;;
Spectrum , Observer , and
;;;
(in-package :dufy/core)
FIXME : ABCL signals an error and claims that FUNCTION types are not
a legal argument to TYPEP .
(deftype spectrum-function ()
#-abcl '(function * (values double-float &optional))
#+abcl t)
(define-colorspace spectrum (spectrum)
:arg-types (spect... | null | https://raw.githubusercontent.com/privet-kitty/dufy/c6ad03a9fca16a759c1c52449ac88420a536feca/src/core/spectrum.lisp | lisp |
function can be simpler and more efficient:
FIXME: verbose, almost equivalent code to GEN-SPECTRUM
s0, s1, s2 for illuminant series D
See
Illuminant, White Point
used in xyz-to-spectrum conversion | Spectrum , Observer , and
(in-package :dufy/core)
FIXME : ABCL signals an error and claims that FUNCTION types are not
a legal argument to TYPEP .
(deftype spectrum-function ()
#-abcl '(function * (values double-float &optional))
#+abcl t)
(define-colorspace spectrum (spectrum)
:arg-types (spectrum-func... |
ed0d84c32060b71873ce72bb5a8e3f13969e2c5e7905745da6f199ce933ed236 | gigasquid/clj-drone | at.clj | (ns clj-drone.at
(:import (java.util BitSet)
(java.nio ByteBuffer))
(:require [clj-drone.commands :refer :all]))
(defn build-command-int [command-bit-vec]
(reduce #(bit-set %1 %2) 0 command-bit-vec))
(defn cast-float-to-int [f]
(let [bbuffer (ByteBuffer/allocate 4)]
(.put (.asFloatBuffer bbuffe... | null | https://raw.githubusercontent.com/gigasquid/clj-drone/b85320a0ab5e4d8589aaf77a0bd57e8a46e2905b/src/clj_drone/at.clj | clojure | (ns clj-drone.at
(:import (java.util BitSet)
(java.nio ByteBuffer))
(:require [clj-drone.commands :refer :all]))
(defn build-command-int [command-bit-vec]
(reduce #(bit-set %1 %2) 0 command-bit-vec))
(defn cast-float-to-int [f]
(let [bbuffer (ByteBuffer/allocate 4)]
(.put (.asFloatBuffer bbuffe... | |
629a9e1254c9cf244e66cbc1469bdb3dc55688bf12bd5e45e359ed5adcee18c6 | drathier/elm-offline | Error.hs | # OPTIONS_GHC -Wall #
{-# LANGUAGE OverloadedStrings #-}
module Type.Error
( Type(..)
, Super(..)
, Extension(..)
, iteratedDealias
, toDoc
, Problem(..)
, Direction(..)
, toComparison
, isInt
, isFloat
, isString
, isChar
, isList
)
where
import qualified Data.Map as Map
import qualifie... | null | https://raw.githubusercontent.com/drathier/elm-offline/f562198cac29f4cda15b69fde7e66edde89b34fa/compiler/src/Type/Error.hs | haskell | # LANGUAGE OverloadedStrings #
ERROR TYPES
start trying to find specific problems
IS TYPE?
IS SUPER?
INVARIANTS:
length cs1 /= length cs2
INVARIANTS:
GREEDY ARG MATCHER
INVARIANTS:
length shorterArgs < length longerArgs
RECORD DIFFS | # OPTIONS_GHC -Wall #
module Type.Error
( Type(..)
, Super(..)
, Extension(..)
, iteratedDealias
, toDoc
, Problem(..)
, Direction(..)
, toComparison
, isInt
, isFloat
, isString
, isChar
, isList
)
where
import qualified Data.Map as Map
import qualified Data.Maybe as Maybe
import Data.M... |
34f47542610ea16e149b45337f97b7edd183b36c6aa118819714454e8e5ed780 | syucream/hastodon | Streaming.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
module Web.Hastodon.Streaming
( StreamingPayload(..)
, StreamingResponse
, streamUser
, streamPublic
, streamLocal
, streamHashtag
, streamList
) where
import Prelude hiding (takeWhile)
import Control.Applicative ((<|>)... | null | https://raw.githubusercontent.com/syucream/hastodon/70227686d9f7f3b3950fc689e1fbcb66dc9f15a8/Web/Hastodon/Streaming.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
--
Public API
--
--
Private stuff
-- |
module Web.Hastodon.Streaming
( StreamingPayload(..)
, StreamingResponse
, streamUser
, streamPublic
, streamLocal
, streamHashtag
, streamList
) where
import Prelude hiding (takeWhile)
import Control.Applicative ((<|>), many, some)
import Data.Aeson
import Data... |
5107985b04a22c2b04d4229c62c82eab3a1235c9d6294ad35ca3f1296535f239 | pkamenarsky/concur-replica | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Applicative
import Control.Monad.IO.Class (liftIO)
import Concur.Core.Types (Widget)
import Concur.Replica (HTML, runDefault)
import Concur.Replica.DOM (button... | null | https://raw.githubusercontent.com/pkamenarsky/concur-replica/e15785b3b09e97790ae23c8ae8671c191d039a2c/examples/Chat/Main.hs | haskell | # LANGUAGE OverloadedStrings #
another client to alert a new message. When a client sends a message
The message the user is currently typing
The message the user sends to other users
Render messageList and messageEditor and wait for user to send
Wait for a message from other user
Add this message to the messageHi... |
module Main where
import Control.Applicative
import Control.Monad.IO.Class (liftIO)
import Concur.Core.Types (Widget)
import Concur.Replica (HTML, runDefault)
import Concur.Replica.DOM (button, input, li, text, ul)
import ... |
d6c77165b12fd206a42a7d987ed65e5640e0ae7c79e02c70336a5a2cdf36959e | fulcrologic/guardrails | core_spec.cljc | (ns com.fulcrologic.guardrails.core-spec
(:require
[com.fulcrologic.guardrails.core :as gr :refer [>defn =>]]
[com.fulcrologic.guardrails.config :as config]
[clojure.spec.alpha :as s]
[fulcro-spec.core :refer [specification assertions component when-mocking provided]]
[clojure.test :refer [deftest... | null | https://raw.githubusercontent.com/fulcrologic/guardrails/17b47a7869314efbffe5dbe0c0daea7c30ed9006/src/test/com/fulcrologic/guardrails/core_spec.cljc | clojure | (ns com.fulcrologic.guardrails.core-spec
(:require
[com.fulcrologic.guardrails.core :as gr :refer [>defn =>]]
[com.fulcrologic.guardrails.config :as config]
[clojure.spec.alpha :as s]
[fulcro-spec.core :refer [specification assertions component when-mocking provided]]
[clojure.test :refer [deftest... | |
d20156b2056eb228424d82885e3a91e32e8ae05d5f1abe0eb430ac4d495c2472 | AbstractMachinesLab/caramel | range.ml | open Import
include Lsp.Types.Range
(* Compares ranges by their lengths*)
let compare_size (x : t) (y : t) =
let dx = Position.(x.end_ - x.start) in
let dy = Position.(y.end_ - y.start) in
Stdune.Tuple.T2.compare Int.compare Int.compare (dx.line, dy.line)
(dx.character, dy.character)
let first_line =
let ... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/src/range.ml | ocaml | Compares ranges by their lengths | open Import
include Lsp.Types.Range
let compare_size (x : t) (y : t) =
let dx = Position.(x.end_ - x.start) in
let dy = Position.(y.end_ - y.start) in
Stdune.Tuple.T2.compare Int.compare Int.compare (dx.line, dy.line)
(dx.character, dy.character)
let first_line =
let start = { Position.line = 1; character... |
0cbe657f67f30c170aed7d60c8593846354cb73c8a1cfcb1b0e32efaa79d3aa2 | whitequark/pry.ml | pry_instruct.ml | let pp_ident_tbl pp fmt tbl =
Format.fprintf fmt "{@[<hov> ";
tbl |> Ident.iter (fun id x ->
Format.fprintf fmt "%s.%d => %a;@ " id.Ident.name id.Ident.stamp pp x);
Format.fprintf fmt " @]}"
type compilation_env = Instruct.compilation_env =
{ ce_stack: int Ident.tbl [@polyprinter pp_ident_tbl];
ce_heap... | null | https://raw.githubusercontent.com/whitequark/pry.ml/ff8d8e9861ddd67f68994c468f199643416c5f42/src/pry_instruct.ml | ocaml | let pp_ident_tbl pp fmt tbl =
Format.fprintf fmt "{@[<hov> ";
tbl |> Ident.iter (fun id x ->
Format.fprintf fmt "%s.%d => %a;@ " id.Ident.name id.Ident.stamp pp x);
Format.fprintf fmt " @]}"
type compilation_env = Instruct.compilation_env =
{ ce_stack: int Ident.tbl [@polyprinter pp_ident_tbl];
ce_heap... | |
53faf34854862465fd751882af1609984f3bc71374fcc87544c5ba8b93e6d399 | hunt-framework/hunt | Command.hs | module Hunt.CLI.Command
( Command (..)
, run
, parser
) where
import Data.Monoid ((<>))
import qualified Hunt.CLI.Command.Client as Client
import qualified Hunt.CLI.Command.Server as Server
import Options.Applicative
-- COMMAND
data Command
= Client Client.Command
| Se... | null | https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-cli/src/Hunt/CLI/Command.hs | haskell | COMMAND
PARSER
RUN | module Hunt.CLI.Command
( Command (..)
, run
, parser
) where
import Data.Monoid ((<>))
import qualified Hunt.CLI.Command.Client as Client
import qualified Hunt.CLI.Command.Server as Server
import Options.Applicative
data Command
= Client Client.Command
| Server Server... |
a9953ec071e6e508e0d5720a02293a60085e78eb7b26ebae57f73b349aef9c46 | c4-project/c4f | reify.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/litmus_c/src/reify.mli | ocaml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | |
3fe3a91137fbd5c29c0412ea00d795183ed64989abce707b8ae1b7b841be5890 | fission-codes/fission | Prefix.hs | module Fission.Unit.Prefix
( convert
, module Fission.Unit.Prefix.Class
, module Fission.Unit.Prefix.Types
) where
import RIO
import Fission.Unit.Prefix.Class
import Fission.Unit.Prefix.Types
convert :: (FromPrefixed n a, ToPrefixed m a) => n a -> m a
convert = toPrefixed . from... | null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-core/library/Fission/Unit/Prefix.hs | haskell | module Fission.Unit.Prefix
( convert
, module Fission.Unit.Prefix.Class
, module Fission.Unit.Prefix.Types
) where
import RIO
import Fission.Unit.Prefix.Class
import Fission.Unit.Prefix.Types
convert :: (FromPrefixed n a, ToPrefixed m a) => n a -> m a
convert = toPrefixed . from... | |
d3b54ccf087db20342b14878c9e20b59b64ea2f4176a13bdda6257f7f4949659 | arachne-framework/aristotle | validation_test.clj | (ns arachne.aristotle.validation-test
(:require [clojure.test :refer :all]
[arachne.aristotle :as aa]
[arachne.aristotle.registry :as reg]
[arachne.aristotle.validation :as v]
[clojure.java.io :as io]))
(reg/prefix 'daml "+oil#")
(reg/prefix 'wo.tf "#")
(reg/prefix 'ar... | null | https://raw.githubusercontent.com/arachne-framework/aristotle/86f3ace210318bd9820322da45e627cec9cfba48/test/arachne/aristotle/validation_test.clj | clojure | The reasoner doesn't support this currently and there isn't a
great way to write a query, so we'll do without | (ns arachne.aristotle.validation-test
(:require [clojure.test :refer :all]
[arachne.aristotle :as aa]
[arachne.aristotle.registry :as reg]
[arachne.aristotle.validation :as v]
[clojure.java.io :as io]))
(reg/prefix 'daml "+oil#")
(reg/prefix 'wo.tf "#")
(reg/prefix 'ar... |
b6d50729a8e8ecf3097edde8c6dde35f4dce7d41b35625954503a94af0f7da0e | rtoy/ansi-cl-tests | import.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu Feb 19 07:06:48 2004
;;;; Contains: Tests of IMPORT
(in-package :cl-test)
(compile-and-load "package-aux.lsp")
;;; Create a package name that does not collide with an existing package
;;; name or nickname
(defvar *import-package-test-name*
(loop for i from ... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/import.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of IMPORT
Create a package name that does not collide with an existing package
name or nickname
Error tests
associated with this condition that was
not a preexisting restart
(unintern isym pkg)
(when (find 'continue my-restarts :key #'restart-name) (continue c))
shadow in... | Author :
Created : Thu Feb 19 07:06:48 2004
(in-package :cl-test)
(compile-and-load "package-aux.lsp")
(defvar *import-package-test-name*
(loop for i from 1
for name = (format nil "ITP-~A" i)
unless (find-package name) return name))
(deftest import.1
(let ((pkg-name *import-package-te... |
67b7f10490726fe150413d2c05fcd36f50954cd92a0b751cbf9bfbc85a7ff597 | ekmett/contravariant | Divisible.hs | # LANGUAGE CPP #
# LANGUAGE TypeOperators #
# LANGUAGE BlockArguments #
{-# LANGUAGE Safe #-}
-- |
Copyright : ( C ) 2014 - 2021
License : BSD-2 - Clause OR Apache-2.0
Maintainer : < >
-- Stability : provisional
-- Portability : portable
--
-- This module supplies contravariant analogues... | null | https://raw.githubusercontent.com/ekmett/contravariant/a5817556ab184bc2de0f44e163b98f336bba3226/src/Data/Functor/Contravariant/Divisible.hs | haskell | # LANGUAGE Safe #
|
Stability : provisional
Portability : portable
This module supplies contravariant analogues to the 'Applicative' and 'Alternative' classes.
* Mathematical definitions
** Divisible
$divisible
*** A note on 'conquer'
$conquer
$decidable
--------------------------------------------------... | # LANGUAGE CPP #
# LANGUAGE TypeOperators #
# LANGUAGE BlockArguments #
Copyright : ( C ) 2014 - 2021
License : BSD-2 - Clause OR Apache-2.0
Maintainer : < >
module Data.Functor.Contravariant.Divisible
(
*
Divisible(..), divided, conquered, liftD
*
, Decidable(..), chosen, lost, (... |
630013d11ff1ab34b9f08d83242d8ffbfb01685fcfa733c83f4db5bd3e72c3f3 | sellout/haskerwaul | NonInvolutive.hs | # language UndecidableSuperClasses #
module Haskerwaul.Meadow.NonInvolutive
( module Haskerwaul.Meadow.NonInvolutive
-- * extended modules
, module Haskerwaul.Meadow
) where
import Haskerwaul.Meadow
| [ Division by zero in non - involutive meadows]( / science / article / pii / S1570868314000652 )
class Mea... | null | https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Meadow/NonInvolutive.hs | haskell | * extended modules | # language UndecidableSuperClasses #
module Haskerwaul.Meadow.NonInvolutive
( module Haskerwaul.Meadow.NonInvolutive
, module Haskerwaul.Meadow
) where
import Haskerwaul.Meadow
| [ Division by zero in non - involutive meadows]( / science / article / pii / S1570868314000652 )
class Meadow c t a => NonInvoluti... |
41eafc8778981f17bfb2da9d443d97ce1bb64fc68d14838590de424ee85cd57a | sealchain-project/sealchain | IntTrans.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE UndecidableInstances #-}
-- | A common interpretation for the UTxO DSL and abstract chain into Cardano
module UTxO.IntTrans
(
-- * Interpretation errors
IntException(..... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/utxo/src/UTxO/IntTrans.hs | haskell | # LANGUAGE UndecidableInstances #
| A common interpretation for the UTxO DSL and abstract chain into Cardano
* Interpretation errors
* Interpretation context
* Interpretation monad transformer
* Interpretation type classes and a rollback
* Translation context
------------------------------------------------... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
module UTxO.IntTrans
(
IntException(..)
, IntCheckpoint(..)
, mkCheckpoint
, createEpochBoundary
, ConIntT(..)
, Interpretation(..)
, Interpret(..)
, IntRollback(..)
, constan... |
f7ab69469ce43c95a06ec15ae5240276d2b27d108dc4ba6420952a611088f9bc | fpco/schoolofhaskell.com | GroupDesc.hs | module Import.GroupDesc
( externalDesc
, internalDesc
) where
import ClassyPrelude.Yesod
import Data.Text (breakOn)
externalDesc :: Text -> Text
externalDesc x = maybe x fst $ splitter x
internalDesc :: Text -> Text
internalDesc x = maybe x snd $ splitter x
splitter :: Text -> Maybe (Text, Text)
splitte... | null | https://raw.githubusercontent.com/fpco/schoolofhaskell.com/15ec1a03cb9d593ee9c0d167dc522afe45ba4f8e/src/Import/GroupDesc.hs | haskell | module Import.GroupDesc
( externalDesc
, internalDesc
) where
import ClassyPrelude.Yesod
import Data.Text (breakOn)
externalDesc :: Text -> Text
externalDesc x = maybe x fst $ splitter x
internalDesc :: Text -> Text
internalDesc x = maybe x snd $ splitter x
splitter :: Text -> Maybe (Text, Text)
splitte... | |
09e3b49d3391a96f741a09d7726c71f6b2629cceeaaee3a1b64842e0d78f44c5 | xh4/web-toolkit | serpent.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
;;;; serpent.lisp -- implementation of the Serpent block cipher
(in-package :crypto)
S - Boxes
(defmacro serpent-sbox0 (r0 r1 r2 r3 o0 o1 o2 o3 t0)
`(setf ,r3 (logxor ,r3 ,r0)
,t0 ,r1
,r1 (logand ,r1 ,r3)
,t0 (logxor ,t0 ,r2)
,r1... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/ironclad-v0.47/src/ciphers/serpent.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*-
serpent.lisp -- implementation of the Serpent block cipher
Key schedule
Rounds
Regular rounds
Last round
Regular inverse rounds |
(in-package :crypto)
S - Boxes
(defmacro serpent-sbox0 (r0 r1 r2 r3 o0 o1 o2 o3 t0)
`(setf ,r3 (logxor ,r3 ,r0)
,t0 ,r1
,r1 (logand ,r1 ,r3)
,t0 (logxor ,t0 ,r2)
,r1 (logxor ,r1 ,r0)
,r0 (logior ,r0 ,r3)
,r0 (logxor ,r0 ,t0)
,t0 (logxor ,t0 ,r3)
... |
a34bdc1a1f5baacb1a023c02cb8c63773bce3eb71b06911f1fbbdd6c0aca9c38 | gas2serra/cldk | prim-text.lisp | (in-package :cldk-render-internals)
;;;
;;; Converting string into paths
;;;
;;; Font's utilities
(defparameter *text-sizes* '(:normal 14
:tiny 8
:very-small 10
:small 12
:large 18
:very-large 20
:huge 24))
(defun... | null | https://raw.githubusercontent.com/gas2serra/cldk/63c8322aedac44249ff8f28cd4f5f59a48ab1441/mcclim/render/cl-vectors/prim-text.lisp | lisp |
Converting string into paths
Font's utilities | (in-package :cldk-render-internals)
(defparameter *text-sizes* '(:normal 14
:tiny 8
:very-small 10
:small 12
:large 18
:very-large 20
:huge 24))
(defun string-primitive-paths (x y string font size fn)
(declare (... |
da46bbc5d60ad505cebf3a37fd83258e6654750d48da7186d3c587286238fe46 | lemonidas/Alan-Compiler | Semantic.ml | open Types
open Identifier
open Symbol
open Printing
open Error
open Lexing
open QuadTypes
(* Semantic checking of values in binary expressions *)
let check_types op_name type_1 type_2 sp ep=
match (type_1, type_2) with
(* Same kind of types in expression are correct *)
|(TYPE_int, TYPE_int)
|(TYPE_byte, TYPE... | null | https://raw.githubusercontent.com/lemonidas/Alan-Compiler/bbedcbf91028d45a2e26839790df2a1347e8bc52/Semantic.ml | ocaml | Semantic checking of values in binary expressions
Same kind of types in expression are correct
Default is to expect Int in expressions
Semantic checking of entries
Yield an error in case of anything else
Semantic check for L-Values
Extract entry from id
If the lvalue corresponds to an array then extract ... | open Types
open Identifier
open Symbol
open Printing
open Error
open Lexing
open QuadTypes
let check_types op_name type_1 type_2 sp ep=
match (type_1, type_2) with
|(TYPE_int, TYPE_int)
|(TYPE_byte, TYPE_byte)
-> true
If anything is Type_none a message has allready been created
|(TYPE_int, TYPE_none)
... |
42b1de43a2fe2c72485eda07a3ff97e7f1343df94e0b1ab93f1d9e758515d59d | Chris00/ocaml-interval | precision.ml | (* Ill conditioned function *)
open Interval_base
let f_I x y =
I.(333.75 *. y**6
+ x**2 * (11. *. x**2 * y**2 - y**6 - 121. *. y**4 -. 2.0)
+ 5.5 *. y**8
+ x / (2. *. y))
let f x y =
333.75 *. y**6.
+. x**2. *. (11.0 *. x**2. *. y**2. -. y**6. -. 121. *. y**4. -. 2.0)
+. 5.5 *. y**8.0
+. x ... | null | https://raw.githubusercontent.com/Chris00/ocaml-interval/69a8587bc98070bf27bd6d2d2d82457829fc7b0d/examples/precision.ml | ocaml | Ill conditioned function |
open Interval_base
let f_I x y =
I.(333.75 *. y**6
+ x**2 * (11. *. x**2 * y**2 - y**6 - 121. *. y**4 -. 2.0)
+ 5.5 *. y**8
+ x / (2. *. y))
let f x y =
333.75 *. y**6.
+. x**2. *. (11.0 *. x**2. *. y**2. -. y**6. -. 121. *. y**4. -. 2.0)
+. 5.5 *. y**8.0
+. x /. (2. *. y)
let g u v =
Pri... |
f11dfc287d8eef271799b94da63c2b2e427753fff0b2b57607181d09d5ad2726 | choener/ADPfusion | Common.hs |
module BenchFun.Common where
import Data.Vector.Fusion.Stream.Monadic as S
import Data.Vector.Fusion.Util
import Data.Vector.Unboxed as VU
import Debug.Trace
import Data.Char (ord)
import ADP.Fusion.Point
import Data.PrimitiveArray hiding (map, unsafeIndex)
-- * * Epsilon
stream_Epsilon_S : : Int - > Int
s... | null | https://raw.githubusercontent.com/choener/ADPfusion/fcbbf05d0f438883928077e3d8a7f1cbf8c2e58d/tests/BenchFun/Common.hs | haskell | * * Epsilon
** Epsilon
# NoInline stream_Epsilon_S #
# NoInline stream_Chr_S #
** |
module BenchFun.Common where
import Data.Vector.Fusion.Stream.Monadic as S
import Data.Vector.Fusion.Util
import Data.Vector.Unboxed as VU
import Debug.Trace
import Data.Char (ord)
import ADP.Fusion.Point
import Data.PrimitiveArray hiding (map, unsafeIndex)
stream_Epsilon_S : : Int - > Int
stream_Epsilon_S k... |
0398996f26f8e2fef74606de207386db929ef8f24dd43ae3c523862556b06131 | serokell/qtah | QMenuBar.hs | This file is part of Qtah .
--
Copyright 2015 - 2018 The Qtah Authors .
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) ... | null | https://raw.githubusercontent.com/serokell/qtah/abb4932248c82dc5c662a20d8f177acbc7cfa722/qtah-generator/src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMenuBar.hs | haskell |
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
(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
MER... | This file is part of Qtah .
Copyright 2015 - 2018 The Qtah Authors .
the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
module Graphics.UI.Qtah.Generator.Interface.Wi... |
558ddba7d50c66748e84b25923b34dcfd9ba85a9ae828e57bea567a75cf53e1f | JacquesCarette/Drasil | HelloWorld.hs | # LANGUAGE PostfixOperators #
| GOOL test program for various OO program functionality .
-- Should run print statements, basic loops, math, and create a helper module without errors.
module HelloWorld (helloWorld) where
import GOOL.Drasil (GSProgram, MSBody, MSBlock, MSStatement, SMethod, OOProg,
ProgramSym(..), F... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/adfc15f13c7cf81101c1dbab97a6aa61f10a4ec6/code/drasil-code/test/HelloWorld.hs | haskell | Should run print statements, basic loops, math, and create a helper module without errors.
| Description of program.
| Main function. Initializes variables and combines all the helper functions defined below.
| Initialize variables used in the generated program.
| Initialize and assign a value to a new variable @m... | # LANGUAGE PostfixOperators #
| GOOL test program for various OO program functionality .
module HelloWorld (helloWorld) where
import GOOL.Drasil (GSProgram, MSBody, MSBlock, MSStatement, SMethod, OOProg,
ProgramSym(..), FileSym(..), BodySym(..), bodyStatements, oneLiner,
BlockSym(..), listSlice, TypeSym(..), St... |
0a4f75c8544438b33728016776a8d02dfa1b10ee1ae93b39d337c95aef1266fa | facebook/duckling | Corpus.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Volume.DE.Corpus
( corpus ) where
import Data.String
... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Volume/DE/Corpus.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE OverloadedStrings #
, "ein liter" | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Volume.DE.Corpus
( corpus ) where
import Data.String
import Prelude
import Duckling.Locale
import Duckling.Resolve
import Duckling.Testing.Types
import Duckling.Volume.Types
corpus :: Corpus
corpus = (testContext {locale = makeLocale DE Nothing}... |
9621762b8f44e5f07f9d06c88d472195b06a156a8520d1b2a7018a22a6bb291e | expipiplus1/vulkan | VK_EXT_shader_viewport_index_layer.hs | {-# language CPP #-}
-- | = Name
--
-- VK_EXT_shader_viewport_index_layer - device extension
--
-- == VK_EXT_shader_viewport_index_layer
--
-- [__Name String__]
-- @VK_EXT_shader_viewport_index_layer@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
163
--
-- [__Revis... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_EXT_shader_viewport_index_layer.hs | haskell | # language CPP #
| = Name
VK_EXT_shader_viewport_index_layer - device extension
== VK_EXT_shader_viewport_index_layer
[__Name String__]
@VK_EXT_shader_viewport_index_layer@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependenci... | 163
1
- Requires support for Vulkan 1.0
-
2017 - 08 - 08
- Promoted to Vulkan 1.2 Core
< > ,
- , NVIDIA
- , NVIDIA
- Jan - , ARM
- , AMD
- , Intel
This extension adds support for the @ShaderViewportIndexL... |
da928e4b8dd1841e269690b6b67be9ea1dd0dd745228879f64abcf6ecc1d0ce1 | solita/mnt-teet | vektorio_core.clj | (ns teet.integration.vektorio.vektorio-core
(:require [teet.integration.vektorio.vektorio-client :as vektorio-client]
[teet.integration.vektorio.vektorio-db :as vektorio-db]
[datomic.client.api :as d]
[teet.project.project-db :as project-db]
[teet.log :as log]
... | null | https://raw.githubusercontent.com/solita/mnt-teet/8d518c283452cee3346ab03d7f730914c24c53e2/app/backend/src/clj/teet/integration/vektorio/vektorio_core.clj | clojure | ; wo n't need if we rely on the file entity being deleted immediately after | (ns teet.integration.vektorio.vektorio-core
(:require [teet.integration.vektorio.vektorio-client :as vektorio-client]
[teet.integration.vektorio.vektorio-db :as vektorio-db]
[datomic.client.api :as d]
[teet.project.project-db :as project-db]
[teet.log :as log]
... |
18e6a25b182c2ac181d1b82f129efb4d84d4fde424b810f607724fbd26b967a3 | ayato-p/mokuhan | mokuhan.cljc | (ns org.panchromatic.mokuhan
(:require [org.panchromatic.mokuhan.parser :as parser]
[org.panchromatic.mokuhan.renderer :as renderer]))
(defn render
([mustache data]
(render mustache data {}))
([mustache data opts]
(let [render' (fn [& [opts']] #(render % data (merge opts opts')))]
(-> (pa... | null | https://raw.githubusercontent.com/ayato-p/mokuhan/8f6de17b5c4a3712aa83ba4f37234de86f3c630b/src/org/panchromatic/mokuhan.cljc | clojure | (ns org.panchromatic.mokuhan
(:require [org.panchromatic.mokuhan.parser :as parser]
[org.panchromatic.mokuhan.renderer :as renderer]))
(defn render
([mustache data]
(render mustache data {}))
([mustache data opts]
(let [render' (fn [& [opts']] #(render % data (merge opts opts')))]
(-> (pa... | |
c0f8d9bb730236ebf3d095f04cd157cf2f9a6171266b194cd5968fd6e96b7c3a | ghc/testsuite | TcRun038_B.hs | # LANGUAGE FlexibleContexts #
module TcRun038_B where
class Foo a where
op :: a -> Int
-- Note the (Foo Int) constraint here; and the fact
that there is no ( ) instance in this module
-- It's in the importing module!
bar :: Foo Int => Int -> Int
bar x = op x + 7
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_run/TcRun038_B.hs | haskell | Note the (Foo Int) constraint here; and the fact
It's in the importing module!
| # LANGUAGE FlexibleContexts #
module TcRun038_B where
class Foo a where
op :: a -> Int
that there is no ( ) instance in this module
bar :: Foo Int => Int -> Int
bar x = op x + 7
|
44e0b131b02efc1e45a8598ad9d87acbfbbc658e323ef90534a09f71048357cb | kronusaturn/lw2-viewer | hash-utils.lisp | (uiop:define-package #:lw2.hash-utils
(:use #:cl #:iter)
(:import-from #:flexi-streams #:string-to-octets #:octets-to-string #:with-output-to-sequence)
(:export #:city-hash-128-vector #:hash-string #:hash-printable-object #:hash-file-list)
(:recycle #:lw2.lmdb))
(in-package #:lw2.hash-utils)
(defun city-hash-... | null | https://raw.githubusercontent.com/kronusaturn/lw2-viewer/f328105e9640be1314d166203c8706f9470054fa/src/hash-utils.lisp | lisp | (uiop:define-package #:lw2.hash-utils
(:use #:cl #:iter)
(:import-from #:flexi-streams #:string-to-octets #:octets-to-string #:with-output-to-sequence)
(:export #:city-hash-128-vector #:hash-string #:hash-printable-object #:hash-file-list)
(:recycle #:lw2.lmdb))
(in-package #:lw2.hash-utils)
(defun city-hash-... | |
dee287b93fc09930ce6655ec743a165180fb31c2bd39c27a5daa7d68832fd9e4 | ghl3/dataframe | profiles.clj | {:dev {:dependencies [[expectations "2.1.9"]]
:plugins [[jonase/eastwood "0.2.3"]
[lein-cljfmt "0.5.6" :exclusions [org.clojure/clojure]]
[lein-expectations "0.0.8" :exclusions [org.clojure/clojure]]]
; Generate docs
:codox {:output-path "resources/codox"
... | null | https://raw.githubusercontent.com/ghl3/dataframe/31212c14669e31797ec13cde650a61fd97dbe6d2/profiles.clj | clojure | Generate docs
Format code | {:dev {:dependencies [[expectations "2.1.9"]]
:plugins [[jonase/eastwood "0.2.3"]
[lein-cljfmt "0.5.6" :exclusions [org.clojure/clojure]]
[lein-expectations "0.0.8" :exclusions [org.clojure/clojure]]]
:codox {:output-path "resources/codox"
:metadata {:doc... |
d802cdc1b97b4dd0ecc337881b10254cd6c3e7df66303ef61eaa8d68443f2b77 | Smart-Sql/smart-sql | my_ml_train_data.clj | (ns org.gridgain.plus.ml.my-ml-train-data
(:require
[org.gridgain.plus.dml.select-lexical :as my-lexical]
[clojure.core.reducers :as r]
[clojure.string :as str]
[clojure.walk :as w])
(:import (org.apache.ignite Ignite)
(org.gridgain.smart MyVar MyLetLayer)
... | null | https://raw.githubusercontent.com/Smart-Sql/smart-sql/d2f237f935472942a143816925221cdcf8246aff/src/main/clojure/org/gridgain/plus/ml/my_ml_train_data.clj | clojure | 生成 class 的类名
:methods [^:static [myDoubleTest [Object Object] Object]]
定一个分布式的矩阵
是否有个叫 "训练数据集" 的矩阵
删除有个叫 "训练数据集" 的矩阵
测试 double-array
(double-array (cons (to-double item) (map to-double lst))))) | (ns org.gridgain.plus.ml.my-ml-train-data
(:require
[org.gridgain.plus.dml.select-lexical :as my-lexical]
[clojure.core.reducers :as r]
[clojure.string :as str]
[clojure.walk :as w])
(:import (org.apache.ignite Ignite)
(org.gridgain.smart MyVar MyLetLayer)
... |
e118572ba614b3d63f14347f62ce3ec69b0e53e2a83d7f0d9c844460cc398708 | 2600hz-archive/whistle | erlydtl_dateformat.erl | -module(erlydtl_dateformat).
-export([format/1, format/2]).
-define(TAG_SUPPORTED(C),
C =:= $a orelse
C =:= $A orelse
C =:= $b orelse
C =:= $B orelse
C =:= $c orelse
C =:= $d orelse
C =:= $D orelse
C =:= $f orelse
C =:= $F orelse
C =:= $g orelse
C =:= $G orelse
C =:= $h ... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/erlydtl-0.7.0/src/filter_lib/erlydtl_dateformat.erl | erlang |
Format the current date/time
Format a tuple of the form {{Y,M,D},{H,M,S}}
and other standard date/time BIFs
Format a tuple of the form {Y,M,D}
-----------------------------------------------------------
-----------------------------------------------------------
'a.m.' or 'p.m.'
'AM' or 'PM'
ISO 8601 Forma... | -module(erlydtl_dateformat).
-export([format/1, format/2]).
-define(TAG_SUPPORTED(C),
C =:= $a orelse
C =:= $A orelse
C =:= $b orelse
C =:= $B orelse
C =:= $c orelse
C =:= $d orelse
C =:= $D orelse
C =:= $f orelse
C =:= $F orelse
C =:= $g orelse
C =:= $G orelse
C =:= $h ... |
8a3e0e2e0ab2be5fbd28bfe44e36d3d79d680cb6eb28f1609f8769e58c1cfab5 | Lambda-X/re-console | parinfer.cljs | (ns re-console.parinfer
"Glues Parinfer's formatter to a CodeMirror editor"
(:require [clojure.string :refer [join]]
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
[parinfer.indent-mode :as indent-mode]
[parinfer.paren-mode :as paren-mode]
[re-console.commo... | null | https://raw.githubusercontent.com/Lambda-X/re-console/a7a31046ba5066163d46ac586072c92b7414c52b/src/re_console/parinfer.cljs | clojure | Editor support
something is selected, don't touch the cursor
pressing return, keep current position then.
only move the semicolon ahead since it can be pushed forward by
commenting out inferred parens meaning they are immediately
reinserted behind it.
typed character not found where expected it, we probably prev... | (ns re-console.parinfer
"Glues Parinfer's formatter to a CodeMirror editor"
(:require [clojure.string :refer [join]]
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
[parinfer.indent-mode :as indent-mode]
[parinfer.paren-mode :as paren-mode]
[re-console.commo... |
e2ad9c706b477be3ce657b93ef87bd439b21bc04e47ccf3258c29938f74e2db8 | fission-codes/fission | Types.hs | -- | App configuration for AWS
module Fission.Web.Server.Environment.AWS.Types (Environment (..)) where
import qualified Network.AWS.Auth as AWS
import Fission.Prelude
import qualified Fission.Web.Server.AWS.Types as AWS
data Environment
= Environment
{ accessKey :: AWS.AccessKey -- ... | null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-web-server/library/Fission/Web/Server/Environment/AWS/Types.hs | haskell | | App configuration for AWS
^ Access Key
^ Secret Key
^ Hosted Zone of | module Fission.Web.Server.Environment.AWS.Types (Environment (..)) where
import qualified Network.AWS.Auth as AWS
import Fission.Prelude
import qualified Fission.Web.Server.AWS.Types as AWS
data Environment
= Environment
, mockRoute53 :: AWS.MockRoute53
}
deriving Eq
instance ... |
c3bbceb749d669ce26a0d067055f9ed1d89afa115edf06bb080769fa81ac4e73 | yallop/ocaml-ctypes | driver.ml |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
(* Stub generation driver for... | null | https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/tests/test-value_printing/stub-generator/driver.ml | ocaml | Stub generation driver for the value printing tests. |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
let () = Tests_common.run Sy... |
0a345d165045a8e1ee2f439c5a7c4ca20042bc44316fcf6915ba68f19bbcbc09 | aumouvantsillage/Virgule-CPU | register_unit.rkt | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
rackunit
(except-in hydromel/support zero)
"../cpu/common.mel"
"../cpu/decoder.mel"
"../cpu/register_unit.mel"... | null | https://raw.githubusercontent.com/aumouvantsillage/Virgule-CPU/1be168c9740795e6f0bdac23d23dc26250e8a7d3/virgule/tests/register_unit.rkt | racket | src-instr dest-instr enable xd xs1 xs2
src-instr dest-instr enable xd xs1 xs2 | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
rackunit
(except-in hydromel/support zero)
"../cpu/common.mel"
"../cpu/decoder.mel"
"../cpu/register_unit.mel"... |
369b4c3cea7fbf5dab6e09da5528c69c5985d1ab6d22af10a00a31107e245c71 | modular-macros/ocaml-macros | pr6690.ml | type 'a visit_action
type insert
type 'a local_visit_action
type ('a, 'result, 'visit_action) context =
| Local : ('a, ('a * insert) as 'result, 'a local_visit_action) context
| Global : ('a, 'a, 'a visit_action) context
;;
let vexpr (type visit_action)
: (_, _, visit_action) context -> _ -> visit_action =
... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/typing-gadts/pr6690.ml | ocaml | type 'a visit_action
type insert
type 'a local_visit_action
type ('a, 'result, 'visit_action) context =
| Local : ('a, ('a * insert) as 'result, 'a local_visit_action) context
| Global : ('a, 'a, 'a visit_action) context
;;
let vexpr (type visit_action)
: (_, _, visit_action) context -> _ -> visit_action =
... | |
b3cb8bbd1d31ff3a07512467b0c47f7a2d671448a9de0fa7adc4b1124fa47ac8 | apibot-org/apibot | mixpanel.cljs | (ns apibot.mixpanel
(:require
[apibot.env :as env]))
(def mixpanel js/mixpanel)
(.init mixpanel env/mixpanel-token)
(defn track
"Tracks the given event with the given data.
Example:
(track :ev-registration-click {:email \"foo\"})"
([event-name data]
(.track mixpanel
(name event-name)
... | null | https://raw.githubusercontent.com/apibot-org/apibot/26c77c688980549a8deceeeb39f01108be016435/src/cljs/apibot/mixpanel.cljs | clojure | (ns apibot.mixpanel
(:require
[apibot.env :as env]))
(def mixpanel js/mixpanel)
(.init mixpanel env/mixpanel-token)
(defn track
"Tracks the given event with the given data.
Example:
(track :ev-registration-click {:email \"foo\"})"
([event-name data]
(.track mixpanel
(name event-name)
... | |
6bdea3e2b1b13ecc4876f8086b03465d5a26b1de4ef081ad83bfa6b7379d723b | returntocorp/sexp-fmt | Print.mli | (*
S-expression pretty-printer.
*)
(* Pretty-print an S-expression into a string. *)
val to_string : AST.t -> string
(* Write a pretty-printed S-expression to a channel. *)
val to_channel : out_channel -> AST.t -> unit
| null | https://raw.githubusercontent.com/returntocorp/sexp-fmt/1ea0b84693a26a7ca2c36ea9b424fbf51d0133c5/src/lib/Print.mli | ocaml |
S-expression pretty-printer.
Pretty-print an S-expression into a string.
Write a pretty-printed S-expression to a channel. |
val to_string : AST.t -> string
val to_channel : out_channel -> AST.t -> unit
|
721908f2ba075efb4787c187007ba2dfdb1347764a22e047666145b02fd8232a | vaibhavsagar/experiments | Compiler.hs | # OPTIONS_GHC -cpp #
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Compiler
Copyright : 2003 - 2004
--
Maintainer : < >
-- Stability : alpha
-- Portability : portable
--
Haskell implementations .
All rights reserved .
Red... | null | https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/packages/Cabal/Distribution/Compiler.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Compiler
Stability : alpha
Portability : portable
* Support for language extensions
------------------------------------------------------------
* Command Line Types and Exports
---------------------... | # OPTIONS_GHC -cpp #
Copyright : 2003 - 2004
Maintainer : < >
Haskell implementations .
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are
met :
* Redistributions of source... |
f95b445217e161b21eb5d0a733b01500b1635eeff577a54b68ea8b0e06d5d1a4 | binghe/PCL | fast-init.lisp | -*-Mode : LISP ; Package:(PCL LISP 1000 ) ; ; Syntax : Common - lisp -*-
;;;
;;; *************************************************************************
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
;;; All rights reserved.
;;;
;;; Use and copying of this software and preparation of d... | null | https://raw.githubusercontent.com/binghe/PCL/7021c061c5eef1466e563c4abb664ab468ee0d80/pcl/fast-init.lisp | lisp | Package:(PCL LISP 1000 ) ; ; Syntax : Common - lisp -*-
*************************************************************************
All rights reserved.
Use and copying of this software and preparation of derivative works
based upon this software are permitted. Any distribution of this
States export control law... | Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
software or derivative works must comply with all applicable United
This software is made available AS IS , and Xerox Corporation makes no
CommonLoops Coordinator
Xerox PARC
3333 Coyote Hill Rd .
Palo Alto , CA 94304
( o... |
3e66f7f52523cdf5da9091cff5e135a5f770f1f6418307e006b0592ccdb73dd7 | melange-re/melange | leaf.ml | (* module Other = Other *)
let x = Other.t
let t = 1
| null | https://raw.githubusercontent.com/melange-re/melange/0d838a0c3bdac37a23bb558a29e66e2eee3eed8a/test/shadow-internal-lib.t/node/leaf.ml | ocaml | module Other = Other |
let x = Other.t
let t = 1
|
df3ce58ba3a5c5a4b305b2fd1c56f19a48331e12b2381f791c130e783d102580 | cl-axon/shop2 | problem-converter.lisp | (in-package :common-lisp-user)
(defun parse-object-list (object-list)
(unless (null object-list)
(cons (list (third object-list) (first object-list)) (parse-object-list (cdr (cdr (cdr object-list)))))))
(setq problems '(
"pfile1"
"pfile2"
"pfile3"
... | null | https://raw.githubusercontent.com/cl-axon/shop2/9136e51f7845b46232cc17ca3618f515ddcf2787/examples/IPC-2002/ZenoTravel/SimpleTime/easy_probs/problem-converter.lisp | lisp | getting the objects
getting the initial state
getting the goals
getting the metric
(format outstr "(:task !!preprocessing ~s) ~%" shop-file) | (in-package :common-lisp-user)
(defun parse-object-list (object-list)
(unless (null object-list)
(cons (list (third object-list) (first object-list)) (parse-object-list (cdr (cdr (cdr object-list)))))))
(setq problems '(
"pfile1"
"pfile2"
"pfile3"
... |
d1596bef36a32b3b00ef5109ca961715a27b3fe95c8277a33888efdd690d7842 | jimcrayne/jhc | Property.hs | module Info.Property where
import Data.Dynamic
import Data.Monoid
import Info.Properties
import Util.BitSet
import Util.HasSize
import Util.SetLike
instance Show Properties where
showsPrec _ props = shows (toList props)
-- | list of properties of a function, such as specified by use pragmas or options
newtype Pr... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/src/Info/Property.hs | haskell | | list of properties of a function, such as specified by use pragmas or options | module Info.Property where
import Data.Dynamic
import Data.Monoid
import Info.Properties
import Util.BitSet
import Util.HasSize
import Util.SetLike
instance Show Properties where
showsPrec _ props = shows (toList props)
newtype Properties = Properties (EnumBitSet Property)
deriving(Eq,Collection,SetLike,HasS... |
c492928fb65b51c645bd56e7e68ad1442aaaad451db1ab552f936c5e494ea63a | Tyruiop/syncretism | state.cljs | (ns synfron.state
(:require
[cljs.reader :refer [read-string]]
[reagent.core :as r]
["idb-keyval" :as idb]
[synfron.time :refer [cur-local-time]]))
(def worker (js/Worker. "/js/worker.js"))
(def app-state
(r/atom
{;; :home | :options | :search
:cur-view :home
;; Whether the sidebar is visi... | null | https://raw.githubusercontent.com/Tyruiop/syncretism/0b6152ac87be35b7edbd0f282c6580befce19290/syncretism-frontend/src/main/synfron/state.cljs | clojure | :home | :options | :search
Whether the sidebar is visible
Which options are being tracked + their data
Store historical data
User spreads, relie on the data in `:options :ladder`
Current values of different filters
Are we searching for a specific filter
Window to load/delete existing filter
List of saved filte... | (ns synfron.state
(:require
[cljs.reader :refer [read-string]]
[reagent.core :as r]
["idb-keyval" :as idb]
[synfron.time :refer [cur-local-time]]))
(def worker (js/Worker. "/js/worker.js"))
(def app-state
(r/atom
:cur-view :home
:sidebar true
:home
:tracked-options {}
:columns ... |
8bfc1a3faf3831d5db02ff9d17ebb7d3dd35bcdce3438e51bff50678b47d462f | NetComposer/nkmedia | nkmedia_room_api.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/NetComposer/nkmedia/24480866a523bfd6490abfe90ea46c6130ffe51f/src/plugins/nkmedia_room_api.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(nkmedia_room_api).
-... |
cd1a184ffef5afc7e9081f3b18429dd2bbcb92f1e33467d449eb50167560a36d | K1D77A/validate-list | tests.lisp | (in-package #:validate-list/tests)
;;;these should go in another file
(defparameter *test-list1*
'("key" "abcdeegadfgfsdf"))
(defparameter *test-template1*
'((:equal "key") (:type string :maxlen 40)))
(defparameter *test-list2*
'("year" 2020 ("country" "USA")))
(defparameter *test-template2*
'((:equal "year")... | null | https://raw.githubusercontent.com/K1D77A/validate-list/223b89469c49b382cfabf2add9c27951728c81c0/tests/tests.lisp | lisp | these should go in another file
broken intentionally
broken intentionally
broken intentionally
broken intentionally
broken intentionally
broken intentionally
this is an example of messing up ,@
fixing this template would be easy with ,@ here instead of ,
validation
bad :type string when number
broken structures
because... | (in-package #:validate-list/tests)
(defparameter *test-list1*
'("key" "abcdeegadfgfsdf"))
(defparameter *test-template1*
'((:equal "key") (:type string :maxlen 40)))
(defparameter *test-list2*
'("year" 2020 ("country" "USA")))
(defparameter *test-template2*
'((:equal "year")(:type integer :between (2100 1900)... |
17bf83f1493e730fc8916596373d050c315c0ecbd8a11cca9e33f56d986c2139 | conreality/conreality | devices.ml | (* This is free and unencumbered software released into the public domain. *)
open Prelude
open Lua_api
open Lwt.Infix
open Machinery
open Scripting
type t = {
classes: (string, unit) Hashtbl.t; (* FIXME: figure out the hashtbl value *)
instances: (string, Device.t) Hashtbl.t;
}
let create () = {
classes =... | null | https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/consensus/config/devices.ml | ocaml | This is free and unencumbered software released into the public domain.
FIXME: figure out the hashtbl value |
open Prelude
open Lua_api
open Lwt.Infix
open Machinery
open Scripting
type t = {
instances: (string, Device.t) Hashtbl.t;
}
let create () = {
classes = Hashtbl.create 0;
instances = Hashtbl.create 0;
}
let is_registered devices device_name =
Hashtbl.mem devices.instances device_name
let register devices... |
40bea74fb10d4ac3f40e7176cc2d3ec1fb3cade00c9dc68d2e1bac49e284f28e | ghc/packages-dph | DphOps.hs | | DPH operations : how long they took , totals , etc
module DphOps
( dphOpsMachine
, dphOpsSumMachine
, DphTrace(..)
, ParseComp(..)
, parseComp
, getGangEvents
, pprGangEvents
, clearJoinComp
, clearJoinWhat)
where
import qualified Data.Array.P... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-event-seer/src/DphOps.hs | haskell | ^ valid event and its time
^ looks like a comp, but invalid
^ not a comp at all, just ignore
| Attempt to get a Comp
prefix is there, but the rest didn't parse properly
"Issuing par Map (Join ...)"
prefix is there, but the rest didn't parse properly
prefix isn't there, so just ignore it
and our comps are ... | | DPH operations : how long they took , totals , etc
module DphOps
( dphOpsMachine
, dphOpsSumMachine
, DphTrace(..)
, ParseComp(..)
, parseComp
, getGangEvents
, pprGangEvents
, clearJoinComp
, clearJoinWhat)
where
import qualified Data.Array.P... |
387b6e2bd08aeb8348f25fdb90343f329d99a80e087c7393b4a28839085619af | adityaathalye/sicp | ex1-05-normal-or-applicative.scm | (define (p) (p))
(define (test x y)
(if (= x 0)
0
y)) | null | https://raw.githubusercontent.com/adityaathalye/sicp/c8b62c366dade1d5101238a32267dab177808105/ex1-05-normal-or-applicative.scm | scheme | (define (p) (p))
(define (test x y)
(if (= x 0)
0
y)) | |
7310752bcf8f815606cc6d727931e9188564b75b75582a227a3248fcbeaa79b3 | space-lang/space | type_env.ml | let check_identifier_assignable class_defns identifier env loc =
let open Result in
match identifier with
| Parsed_ast.Variable x ->
if x = Var_nameof_string "this" then
Error
(Error.of_string
(Fmt.str "%s Type error - Assigning ex... | null | https://raw.githubusercontent.com/space-lang/space/23b03f71ea57486171bbf22ed2a7a42486fb4124/src/frontend/typing/type_env.ml | ocaml | let check_identifier_assignable class_defns identifier env loc =
let open Result in
match identifier with
| Parsed_ast.Variable x ->
if x = Var_nameof_string "this" then
Error
(Error.of_string
(Fmt.str "%s Type error - Assigning ex... | |
f920a35b8e06760410392c12ad38c2f2b4ddc3ba6574f98716a09f4d5d3e002a | eval/deps-try | main.clj | (ns rebel-readline.clojure.main
(:require
[rebel-readline.core :as core]
[rebel-readline.clojure.line-reader :as clj-line-reader]
[rebel-readline.jline-api :as api]
[rebel-readline.tools :as tools]
[rebel-readline.clojure.service.local :as clj-service]
[clojure.main]))
(defn syntax-highlight-prn
... | null | https://raw.githubusercontent.com/eval/deps-try/da691c68b527ad5f9e770dbad82cce6cbbe16fb4/vendor/rebel-readline/rebel-readline/src/rebel_readline/clojure/main.clj | clojure | this is intended to only be used with clojure repls
prompt is handled by line-reader
still debating about wether to include the following line in
`with-line-reader`. I am thinking that taking over out should
be opt in when using the lib taking over out provides
on different platforms, this particular writer also ... | (ns rebel-readline.clojure.main
(:require
[rebel-readline.core :as core]
[rebel-readline.clojure.line-reader :as clj-line-reader]
[rebel-readline.jline-api :as api]
[rebel-readline.tools :as tools]
[rebel-readline.clojure.service.local :as clj-service]
[clojure.main]))
(defn syntax-highlight-prn
... |
c051607f3a9847f12f0d3baed68df9dc3a4202b72b23ce92a76e59a5b950b653 | SquidDev/illuaminate | lint.mli | open IlluaminateCore
open Lsp.Types
(** All notes for a given program. *)
val notes : IlluaminateLint.Driver.Note.any array IlluaminateData.Programs.key
* a program and export any diagnostics .
val diagnostics : Store.t -> Store.document -> Diagnostic.t list
(** Get any code actions for a given range. *)
val code_a... | null | https://raw.githubusercontent.com/SquidDev/illuaminate/7a6e4bf56f01e81a47c743cb452791c2168ccbda/src/bin/lsp/lint.mli | ocaml | * All notes for a given program.
* Get any code actions for a given range.
* Fix a program given a specific id, or fail. | open IlluaminateCore
open Lsp.Types
val notes : IlluaminateLint.Driver.Note.any array IlluaminateData.Programs.key
* a program and export any diagnostics .
val diagnostics : Store.t -> Store.document -> Diagnostic.t list
val code_actions : Store.t -> Span.filename -> Syntax.program -> Range.t -> CodeActionResult.t
... |
7b3492161e020f4d5bd0102533917b2e47b8d84659294ab898c4faa69517cfc6 | Fresheyeball/Shpadoinkle | Form.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE CPP #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE Deriv... | null | https://raw.githubusercontent.com/Fresheyeball/Shpadoinkle/8e0efbb11857a1af47038dae07b8140291c251ed/widgets/Shpadoinkle/Widgets/Types/Form.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE DeriveTraversable #
# LANGUAGE DerivingStrategies #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE RankNTypes #
... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications ... |
1ab28d789abe97087ff3e0d89c6032e6b5104d16829881bdd37017277ebfd023 | gdevanla/haskell-lox | main.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
import Import
import Run
import RIO.Process
import Options.Applicative.Simple
import qualified Paths_haskell_lox
main :: IO ()
main = do
(options, ()) <- simpleOptions
$(simpleVersion Paths_haskell_lox.version)
"Header for command line arguments"
... | null | https://raw.githubusercontent.com/gdevanla/haskell-lox/43fe7155b50a5f4eaaad75e7cb4e6e5aed58701f/app/main.hs | haskell | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
import Import
import Run
import RIO.Process
import Options.Applicative.Simple
import qualified Paths_haskell_lox
main :: IO ()
main = do
(options, ()) <- simpleOptions
$(simpleVersion Paths_haskell_lox.version)
"Header for command line arguments"
... | |
ee3ad967786c4db9ffbc89741ba7c3542b1b09543794ff63285f5ea6a495916d | edbutler/nonograms-rule-synthesis | test-parallel.rkt | #lang racket
; testing the thread parallelism
(require
rackunit
rackunit/text-ui
"util.rkt"
"../core/core.rkt")
(define (test-parmap f lst)
(check-set=? (parallel-map/thread f lst) (map f lst)))
(void (run-tests (test-suite
"parallel"
(test-case "simple"
(let ([lst '(1 2 3 4 5 6 7 8 9)])
(t... | null | https://raw.githubusercontent.com/edbutler/nonograms-rule-synthesis/16f8dacb17bd77c9d927ab9fa0b8c1678dc68088/src/test/test-parallel.rkt | racket | testing the thread parallelism | #lang racket
(require
rackunit
rackunit/text-ui
"util.rkt"
"../core/core.rkt")
(define (test-parmap f lst)
(check-set=? (parallel-map/thread f lst) (map f lst)))
(void (run-tests (test-suite
"parallel"
(test-case "simple"
(let ([lst '(1 2 3 4 5 6 7 8 9)])
(test-parmap identity lst)
(t... |
9b00fb18d61603c786a87b902637a4fac88dbcb62f5f048d1f7ae07cb19260fa | sternenseemann/spacecookie | Socket.hs | -- | Internal socket utilities implementing missing
-- features of 'System.Socket' which are yet to be
-- upstreamed.
module Network.Gopher.Util.Socket
( gracefulClose
) where
import Control.Concurrent.MVar (withMVar)
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async (race)
import Control... | null | https://raw.githubusercontent.com/sternenseemann/spacecookie/687bc78c1e9355468bf4eb480750b819e520f20e/src/Network/Gopher/Util/Socket.hs | haskell | | Internal socket utilities implementing missing
features of 'System.Socket' which are yet to be
upstreamed.
Until -socket/pull/67 gets
merged, we have to implement shutdown ourselves.
| Disallow Reading (calls to 'receive' are empty).
| Disallow Writing (calls to 'send' throw).
| Disallow both.
| Shutdown... | module Network.Gopher.Util.Socket
( gracefulClose
) where
import Control.Concurrent.MVar (withMVar)
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async (race)
import Control.Exception.Base (throwIO)
import Control.Monad (void, when)
import Data.Functor ((<&>))
import Foreign.C.Error (Errno (..)... |
fb7e1c159f5813c89d5f921d4963e12a6588dbb7a4cd4b5eabbc1152fac10211 | bakyeono/bitmap-font | color.clj | ;; bitmap-font.color
;; 자주 사용되는 색상을 정의
(ns bitmap-font.color)
(def ^:const absolute-zero [(/ 0 255.0) (/ 72 255.0) (/ 186 255.0)])
(def ^:const alien-armpit [(/ 132 255.0) (/ 222 255.0) (/ 2 255.0)])
(def ^:const alloy-orange [(/ 196 255.0) (/ 98 255.0) (/ 16 255.0)])
(def ^:const almond [(/ 239 255.0) (/ 222 255.0) (... | null | https://raw.githubusercontent.com/bakyeono/bitmap-font/2422bc748006f599ef4b42f5ce5cdfba9ff980e9/src/bitmap_font/color.clj | clojure | bitmap-font.color
자주 사용되는 색상을 정의 | (ns bitmap-font.color)
(def ^:const absolute-zero [(/ 0 255.0) (/ 72 255.0) (/ 186 255.0)])
(def ^:const alien-armpit [(/ 132 255.0) (/ 222 255.0) (/ 2 255.0)])
(def ^:const alloy-orange [(/ 196 255.0) (/ 98 255.0) (/ 16 255.0)])
(def ^:const almond [(/ 239 255.0) (/ 222 255.0) (/ 205 255.0)])
(def ^:const amethyst [(... |
57f1a829d8c70189e98bc85a0fd7c8642441bcabc1d89e47ca5035d481c5e52c | emina/rosette | polymorphic.rkt | #lang racket
(require "term.rkt" "union.rkt" "bool.rkt")
(provide
ite ite* ⊢ guarded guarded-test guarded-value =?
generic-merge generic-merge*
T*->T T*->boolean?
sort/expression
simplify*)
; A generic typing procedure for a lifted operator that takes N > 0 arguments of type T
and returns a value of typ... | null | https://raw.githubusercontent.com/emina/rosette/9d14d447d01013ddffde182cbe82dd79fecdc398/rosette/base/core/polymorphic.rkt | racket | A generic typing procedure for a lifted operator that takes N > 0 arguments of type T
Polymorphic operators and procedures that are shared by
multiple primitive types.
primitive type T. That is, (type-of v1 v2) = T for some pritimive
type T. This operator is intended only for internal use and should not
be ca... | #lang racket
(require "term.rkt" "union.rkt" "bool.rkt")
(provide
ite ite* ⊢ guarded guarded-test guarded-value =?
generic-merge generic-merge*
T*->T T*->boolean?
sort/expression
simplify*)
and returns a value of type T. Specifically , it assumes that at least one value passed
to it is typed , and it ... |
45b45b644cac284edc5c09a4ae5fb1518409bd2b5cb8a6b5f7257e9ecce53bc3 | Gbury/dolmen | logic.ml |
(* This file is free software, part of Dolmen. See file "LICENSE" for more details. *)
(* The Main Dolmen library is used to parse input languages *)
(* ************************************************************************ *)
module P = Dolmen.Class.Logic.Make
(Dolmen.Std.Loc)
(Dolmen.Std.Id)
(Dolmen.... | null | https://raw.githubusercontent.com/Gbury/dolmen/55566c8db8a9c7636743b49a8c0bfaa061bbeb0c/src/loop/logic.ml | ocaml | This file is free software, part of Dolmen. See file "LICENSE" for more details.
The Main Dolmen library is used to parse input languages
************************************************************************ |
module P = Dolmen.Class.Logic.Make
(Dolmen.Std.Loc)
(Dolmen.Std.Id)
(Dolmen.Std.Term)
(Dolmen.Std.Statement)
include (P : Dolmen.Class.Logic.S with type statement := Dolmen.Std.Statement.t
and type file := Dolmen.Std.Loc.file)
|
1ac8e3ee4bcbb67a38fae1b387f7b94ded7ec190c3fb0359d8254a553c7945fb | webyrd/cool-relational-interpreter-examples | error-interp-specific-all.scm | (load "../mk/mk.scm")
;; error-handling Scheme interpreter
;;
two types of error ( referencing unbound variable , or taking car / cdr of a non - pair ( really a closure ) )
;;
;; errors are now represented as tagged lists, with specific messages
;;
;; this version of the interpreter uses *every* legal Scheme
;; eval... | null | https://raw.githubusercontent.com/webyrd/cool-relational-interpreter-examples/c68d261279a301d6dae11ac1e2827a3a619af017/explicit-errors/error-interp-specific-all.scm | scheme | error-handling Scheme interpreter
errors are now represented as tagged lists, with specific messages
this version of the interpreter uses *every* legal Scheme
evaluation order for programs that generate errors (rather than
left-to-right order, for example)
must be careful here!
we can't depend on the evaluat... | (load "../mk/mk.scm")
two types of error ( referencing unbound variable , or taking car / cdr of a non - pair ( really a closure ) )
(define eval-expo
(lambda (exp env val)
(fresh ()
(absento 'ERROR exp)
(absento 'ERROR env)
(absento 'closure exp)
(conde
((== `(quote ,val) exp)... |
87ff0b960a68c2ce7e007826e54cf62eb8659b59d33747f0b1d41f9ce06dfa73 | shayne-fletcher/zen | extensible.ml | (*Basic language containing only variables*)
type var = [`Var of string]
let string_of_var : var -> 'a = function
| `Var s -> s
Evaluation of a variable means looking in an environment for a
binding and leaving it " as is " if there is n't one
binding and leaving it "as is" if there isn't one*)
let eval_var ... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/extensible/extensible.ml | ocaml | Basic language containing only variables
Extended language for lambda calculus
The language is defined as an open recursive type (subterms are of
type ['a])
module Detail
Factory functions
Evaluation of lambda expressions
Evaluate the operand
Next evaluate the operator
If it's an abstraction, evaluate the body in an ... | type var = [`Var of string]
let string_of_var : var -> 'a = function
| `Var s -> s
Evaluation of a variable means looking in an environment for a
binding and leaving it " as is " if there is n't one
binding and leaving it "as is" if there isn't one*)
let eval_var
(env : (string * ([> `Var of string ] as... |
6408c77fe1656f7f905f5c355b9accafb76695866f61f3cc0708fa25f6b1e718 | hkuplg/fcore | SpecHelper.hs | module SpecHelper
(discoverTestCases
,parseExpectedOutput
) where
import System.Directory (getDirectoryContents)
import System.FilePath (dropExtension)
import Data.Char (isSpace)
import Data.List (isSuffixOf)
type Name = String
type Source = String
type ExpectedOutput = String
discoverTestCases :: FilePath... | null | https://raw.githubusercontent.com/hkuplg/fcore/e27b6dec5bfd319edb8c3e90d94a993bcc7b4c95/testsuite/SpecHelper.hs | haskell | module SpecHelper
(discoverTestCases
,parseExpectedOutput
) where
import System.Directory (getDirectoryContents)
import System.FilePath (dropExtension)
import Data.Char (isSpace)
import Data.List (isSuffixOf)
type Name = String
type Source = String
type ExpectedOutput = String
discoverTestCases :: FilePath... | |
e8a1c8655a47ef1db17db0c81f2626be19cb6787f0d8b6ca8a7c8101fea9ac03 | mitchellwrosen/planet-mitchell | Builder.hs | module ByteString.Lazy.Builder
( module Data.ByteString.Builder
) where
import Data.ByteString.Builder
| null | https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/ByteString/Lazy/Builder.hs | haskell | module ByteString.Lazy.Builder
( module Data.ByteString.Builder
) where
import Data.ByteString.Builder
| |
04e992ff6849c1e163f2cee222fadaa23cbe0d38e07eef726d79d2239e4f8e71 | mitchellwrosen/riak2 | Handle.hs | module Riak.Handle
( Handle
, HandleConfig(..)
, HandleError(..)
, DecodeError(..)
, DisconnectReason(..)
, EventHandlers(..)
, createHandle
) where
import Libriak.Response (DecodeError(..))
import RiakHandle
import RiakHandleError (HandleError(..))
| null | https://raw.githubusercontent.com/mitchellwrosen/riak2/d3c4ef4389012c70e72623cdf9a4caec0a07e568/riak2/public/Riak/Handle.hs | haskell | module Riak.Handle
( Handle
, HandleConfig(..)
, HandleError(..)
, DecodeError(..)
, DisconnectReason(..)
, EventHandlers(..)
, createHandle
) where
import Libriak.Response (DecodeError(..))
import RiakHandle
import RiakHandleError (HandleError(..))
| |
36ac86ca32fb8dc378429293c954604cd84da8967c77fbe9529ed595fffcdcb6 | frenetic-lang/ocaml-openflow | Bits.ml | let test_bit n x =
Int32.logand (Int32.shift_right_logical x n) Int32.one = Int32.one
let clear_bit n x =
Int32.logand x (Int32.lognot (Int32.shift_left Int32.one n))
let set_bit n x =
Int32.logor x (Int32.shift_left Int32.one n)
let bit (x : int32) (n : int) (v : bool) : int32 =
if v then set_bit n x else clea... | null | https://raw.githubusercontent.com/frenetic-lang/ocaml-openflow/289ffb8a692cf32b8413cc58044aae9c151ddd44/lib/Bits.ml | ocaml | let test_bit n x =
Int32.logand (Int32.shift_right_logical x n) Int32.one = Int32.one
let clear_bit n x =
Int32.logand x (Int32.lognot (Int32.shift_left Int32.one n))
let set_bit n x =
Int32.logor x (Int32.shift_left Int32.one n)
let bit (x : int32) (n : int) (v : bool) : int32 =
if v then set_bit n x else clea... | |
494087cde183e5113b01a303fae179ba52015bdee392bf43314a97ec0fb04469 | grayswandyr/electrod | Raw_ident.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* electrod - a model finder for relational first - order linear temporal logic
*
* Copyright ( C ) 2016 - 2020 ONERA
* Authors : ( ONERA ) , ( ONERA... | null | https://raw.githubusercontent.com/grayswandyr/electrod/eb0b02eafb34b6c921f99716cb5e90c946aae51b/src/Raw_ident.mli | ocaml | * Identifiers in "raw" ASTs.
* Any form of identifier for constants (atoms, relations) in the source
code.
* {1 Constructor}
* {1 Accessors} | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* electrod - a model finder for relational first - order linear temporal logic
*
* Copyright ( C ) 2016 - 2020 ONERA
* Authors : ( ONERA ) , ( ONERA... |
804e890e472198de77e523b6929e605a6ce89969c415c00ff1b7dfdc2e959cc0 | hasktorch/ffi-experimental | GC.hs | {-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeSynonymInstances #-}
module ATen.GC where
im... | null | https://raw.githubusercontent.com/hasktorch/ffi-experimental/54192297742221c4d50398586ba8d187451f9ee0/ffi/src/ATen/GC.hs | haskell | # LANGUAGE EmptyDataDecls #
# LANGUAGE GADTs #
# LANGUAGE TypeSynonymInstances # | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module ATen.GC where
import Control.Exception.Safe (catch,throwIO)
import Data.List (isPrefixOf)
import Language.C.I... |
8ae3d8b979d0e584ba9c583e0c892fdcf268d98949d71dfde802027cd4ce4cd9 | DanielG/ghc-mod | Main.hs | import Bar (bar)
main = putStrLn bar
| null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/test/data/cabal-project/Main.hs | haskell | import Bar (bar)
main = putStrLn bar
| |
89dd5a9317df79ea93128e5224b2658cbd7860e884e145da816e5d258b1f0c36 | monky-hs/monky | Blkid.hs |
Copyright 2015 ,
This file is part of .
is free software : you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later versio... | null | https://raw.githubusercontent.com/monky-hs/monky/5430352258622bdb0a54f6a197090cc4ef03102f/Monky/Blkid.hs | haskell | # LANGUAGE EmptyDataDecls #
|Evaluate a tag
|Evaluate a spec |
Copyright 2015 ,
This file is part of .
is free software : you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later versio... |
18aeecdcf4e7ce8e481751656c71aaed8dbae5c282a172d959367566bc75faa6 | 2600hz-archive/whistle | proper_tests.erl | Copyright 2010 - 2011 < > ,
< >
and < >
%%%
This file is part of PropEr .
%%%
%%% PropEr is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 o... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/proper-1.0/test/proper_tests.erl | erlang |
PropEr is free software: you can redistribute it and/or modify
(at your option) any later version.
PropEr is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License fo... | Copyright 2010 - 2011 < > ,
< >
and < >
This file is part of PropEr .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Pub... |
475122724c18cf4ef296d7991c0d079f15d21b38a275d00e35a6500a687bd976 | avsm/mirage-duniverse | config_client.ml | open Mirage
let main = foreign ~packages:[package "vchan-xen"; package "duration"] "Unikernel.Client" (console @-> job)
let () =
register "vchan_client" [ main $ default_console ]
| null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/vchan/lib_test/mirage/config_client.ml | ocaml | open Mirage
let main = foreign ~packages:[package "vchan-xen"; package "duration"] "Unikernel.Client" (console @-> job)
let () =
register "vchan_client" [ main $ default_console ]
| |
bdf21c89497ac2c2dc4e519144c07b73a5bd986ed3245d850fc8e3979e11db72 | sansarip/owlbear | utilities.cljs | (ns owlbear.utilities
"Utility functions not specific to the domain of Owlbear grammar")
(defn str-insert
"Insert c in string s at the given offset"
[s c offset]
(str (subs s 0 offset) c (subs s offset)))
(defn str-remove
"Remove the string in between the given start and end offsets"
([s start-offset]
... | null | https://raw.githubusercontent.com/sansarip/owlbear/b25d46e3f401f5fee739889e5bc604f6b9c00c41/src/cljs/owlbear/utilities.cljs | clojure | (ns owlbear.utilities
"Utility functions not specific to the domain of Owlbear grammar")
(defn str-insert
"Insert c in string s at the given offset"
[s c offset]
(str (subs s 0 offset) c (subs s offset)))
(defn str-remove
"Remove the string in between the given start and end offsets"
([s start-offset]
... | |
04d1b0fef948eade3fbb9131536ef7fb0b163da1ffa02df1dcd6198c127b586d | jaspervdj/patat | Tests.hs | {-# LANGUAGE OverloadedStrings #-}
module Patat.Presentation.Read.Tests
( tests
) where
import qualified Data.Text as T
import Patat.Presentation.Read
import qualified Test.Tasty as Tasty
import qualified Test.Tasty.HUnit as Tasty
tests :: Tasty.TestTree
tests = Tas... | null | https://raw.githubusercontent.com/jaspervdj/patat/9e0d0ccde9afee07ea23521546c406033afeb4f9/tests/haskell/Patat/Presentation/Read/Tests.hs | haskell | # LANGUAGE OverloadedStrings #
-\n\ | module Patat.Presentation.Read.Tests
( tests
) where
import qualified Data.Text as T
import Patat.Presentation.Read
import qualified Test.Tasty as Tasty
import qualified Test.Tasty.HUnit as Tasty
tests :: Tasty.TestTree
tests = Tasty.testGroup "Patat.Presentation.Re... |
cc87e43478a1bb8be6886ceac563c0dcbafbefe0d567d9716f3f05675ccfb326 | JacquesCarette/Drasil | CSharpRenderer.hs | # LANGUAGE TypeFamilies #
# LANGUAGE PostfixOperators #
-- | The logic to render C# code is contained in this module
module GOOL.Drasil.LanguageRenderer.CSharpRenderer (
-- * C# Code Configuration -- defines syntax of all C# code
CSharpCode(..), csName, csVersion
) where
import Utils.Drasil (indent)
import GOOL.... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/c7c57e77e0de03158e7c4db6e74e13898a889764/code/drasil-gool/lib/GOOL/Drasil/LanguageRenderer/CSharpRenderer.hs | haskell | | The logic to render C# code is contained in this module
* C# Code Configuration -- defines syntax of all C# code
) = C.decrement1
This implementation generates a statement lambda to define the function.
If support for local functions is added to mcs in the future, this
should be re-written to generate a local f... | # LANGUAGE TypeFamilies #
# LANGUAGE PostfixOperators #
module GOOL.Drasil.LanguageRenderer.CSharpRenderer (
CSharpCode(..), csName, csVersion
) where
import Utils.Drasil (indent)
import GOOL.Drasil.CodeType (CodeType(..))
import GOOL.Drasil.ClassInterface (Label, MSBody, VSType, SVariable, SValue,
VSFunction, ... |
7462f3e3a97ff3409badafa8d1118a92ad28404a6843645baa5fc3950d607aca | qingliangcn/mgee | mgee_unittest_packet.erl | %%%----------------------------------------------------------------------
2010 mgee ( Ming Game Engine Erlang )
%%%
@author odinxu
@date 2010 - 2 - 21
%%% @doc Unit Test for mgee_packet
%%% @end
%%%----------------------------------------------------------------------
-module(mgee_unittest_packet).... | null | https://raw.githubusercontent.com/qingliangcn/mgee/b65babc3a34ef678ae2b25ce1a8fdd06b2707bb8/unittest/mgee_unittest_packet.erl | erlang | ----------------------------------------------------------------------
@doc Unit Test for mgee_packet
@end
----------------------------------------------------------------------
| 2010 mgee ( Ming Game Engine Erlang )
@author odinxu
@date 2010 - 2 - 21
-module(mgee_unittest_packet).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
test() -> ok.
packet_encode_test() ->
Module = <<"role">>,
Method = <<"add">>,
?assertEqual(encode_m_role_add_toc, mgee... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.