_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 |
|---|---|---|---|---|---|---|---|---|
1bae1944f60382ddf45b36a213c14fb11eab4a6b300bf430b9beeea2b737fde6 | niconaus/pcode-interpreter | Types.hs | |
Module : PCode
Description : language definitions
Copyright : ( c ) , 2022
Maintainer :
Stability : experimental
This module defines the datatypes and translation of
Module : PCode
Description : Ghidra P-Code language definitions
Copyright : (c) Nico Naus, 2022
Maintainer... | null | https://raw.githubusercontent.com/niconaus/pcode-interpreter/1e8053226e658b4c609470836b867c231f8c756d/Types.hs | haskell | Memory types
Block address
functions are identified by the starting address, since that is how they are called
EXTCALL is an artifical instruction, to encode which external function is called from this point
FLOATING POINT NUMBER OPERATIONS
OTHER OPERATIONS
UNDOCUMENTED INSTRUCTIONS
I have no idea what this ins... | |
Module : PCode
Description : language definitions
Copyright : ( c ) , 2022
Maintainer :
Stability : experimental
This module defines the datatypes and translation of
Module : PCode
Description : Ghidra P-Code language definitions
Copyright : (c) Nico Naus, 2022
Maintainer... |
5a547f426396ad3c342a7363dc1cfd4be0b1cce557a2e2e2a7f5bd9acb882e1a | ghc/packages-dph | Split.hs | {-# OPTIONS -Wall -fno-warn-orphans -fno-warn-missing-signatures #-}
# LANGUAGE CPP #
#include "fusion-phases.h"
-- | Operations on Distributed Segment Descriptors
module Data.Array.Parallel.Unlifted.Distributed.Data.USSegd.Split
(splitSSegdOnElemsD)
where
import Data.Array.Parallel.Unlifted.Distributed.Array... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Data/USSegd/Split.hs | haskell | # OPTIONS -Wall -fno-warn-orphans -fno-warn-missing-signatures #
| Operations on Distributed Segment Descriptors
-----------------------------------------------------------------------------
| Split a segment descriptor across the gang, element wise.
We try to put the same number of elements on each thread, which ... | # LANGUAGE CPP #
#include "fusion-phases.h"
module Data.Array.Parallel.Unlifted.Distributed.Data.USSegd.Split
(splitSSegdOnElemsD)
where
import Data.Array.Parallel.Unlifted.Distributed.Arrays
import Data.Array.Parallel.Unlifted.Distributed.Combinators
import Data.Array.Parallel.Unlifted.Distributed.Primitive
... |
5dcb11a8edc3f00617bc167e785146570e8b258210e619a81cb015966e57bb3b | haroldcarr/learn-haskell-coq-ml-etc | EntityTagCache.hs | # OPTIONS_GHC -fno - warn - missing - signatures -fno - warn - unused - binds #
{-# LANGUAGE OverloadedStrings #-}
module EntityTagCache where
import Control.Monad ((>=>))
import Data.List (isPrefixOf)
import Data.Map.Strict as M
import Data.Maybe as MB (mapMaybe)
... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/playpen/interview/api-catalog/src/EntityTagCache.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
next tag number
tag to tag number
tag number to tag
entity id to tag numbers
input to DD
output of DD
----------------------------------------------------------------------------
Use cache
impure
pure
... | # OPTIONS_GHC -fno - warn - missing - signatures -fno - warn - unused - binds #
module EntityTagCache where
import Control.Monad ((>=>))
import Data.List (isPrefixOf)
import Data.Map.Strict as M
import Data.Maybe as MB (mapMaybe)
import Prelude as... |
e2958b0c48acd4a940bab36816cc592eeb9e94551443068d90f2820e48183112 | vikram/lisplibraries | compile.lisp | ;;;; -*- lisp -*-
(in-package :it.bese.yaclml)
* TAL - Dynamic HTML Templating
TAL is an HTML templating mechanism designed to provide enough
;;;; power to create any possible HTML output from a template yet at
;;;; the same time maintain the distinction between presentation logic
;;;; and program logic.
TAL ... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/ucw-boxset/dependencies/yaclml/src/tal/compile.lisp | lisp | -*- lisp -*-
power to create any possible HTML output from a template yet at
the same time maintain the distinction between presentation logic
and program logic.
graphic designers, who can't be bothered, and really shouldn't be
bothered, to learn a new syntax, and the most common design
tools, which work best wi... |
(in-package :it.bese.yaclml)
* TAL - Dynamic HTML Templating
TAL is an HTML templating mechanism designed to provide enough
TAL 's syntax tries to be as as possible , this is to help
A TAL template is an object ( represented internally as a function
Given a TAL template ( either an in - memory string ... |
366ac10fd1cc86318332d0626142c75b0094461463e747962bdc86bf566880d0 | proper-testing/proper | rec_test2.erl | -*- coding : utf-8 -*-
-*- erlang - indent - level : 2 -*-
%%% -------------------------------------------------------------------
Copyright 2010 - 2022 < > ,
< >
and < >
%%%
This file is part of PropEr .
%%%
%%% PropEr is free software: you can redistribute it a... | null | https://raw.githubusercontent.com/proper-testing/proper/9f9f18a3e5a7dc3e07c54b0af5fbbdb4c65897d1/test/rec_test2.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 FITN... | -*- coding : utf-8 -*-
-*- erlang - indent - level : 2 -*-
Copyright 2010 - 2022 < > ,
< >
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 Licens... |
eeb08b721a0891875af6933642caed44cba42325f0ed1a0cd8ca08f1bf1741e6 | magnars/confair | config_admin_test.clj | (ns confair.config-admin-test
(:require [clojure.test :refer [deftest is testing]]
[confair.config-admin :as sut]
[confair.config :as config]
[test-with-files.tools :refer [with-files]]))
(deftest conceal-reveal-test
(with-files tmp-dir ["config.edn" (str
... | null | https://raw.githubusercontent.com/magnars/confair/60332690d639d40c4f57b96c7d09e31b9606d6a2/test/confair/config_admin_test.clj | clojure | conceal
reveal | (ns confair.config-admin-test
(:require [clojure.test :refer [deftest is testing]]
[confair.config-admin :as sut]
[confair.config :as config]
[test-with-files.tools :refer [with-files]]))
(deftest conceal-reveal-test
(with-files tmp-dir ["config.edn" (str
... |
18cd7f720dd8ebd08047de0ba561795d49fb698942299b5a2f88a7ecc6bd37df | ff-notes/ron | Main.hs | # LANGUAGE DisambiguateRecordFields #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
import Brick (App (App), BrickEvent (AppEvent, VtyEvent), EventM,
Next, Widget, attrMap, continue, customMain, halt,
showFirstCursor, tx... | null | https://raw.githubusercontent.com/ff-notes/ron/0df2b7985996ecc498808ea7247d0d8de471da4f/demo/text-editor-brick/Main.hs | haskell | # LANGUAGE OverloadedStrings #
| Replace content in zipper keeping cursor | # LANGUAGE DisambiguateRecordFields #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
import Brick (App (App), BrickEvent (AppEvent, VtyEvent), EventM,
Next, Widget, attrMap, continue, customMain, halt,
showFirstCursor, txt, (<=>))
import qualified Brick
im... |
ec796833bfeb3b4b5d09602d2f4ee941601f11bfd8b656ca1b90030c9c6a5241 | paulbutcher/electron-app | config.cljs | (ns {{name}}.config)
(def index-html "resources/index-dev.html")
(def test-html "resources/test.html")
| null | https://raw.githubusercontent.com/paulbutcher/electron-app/2b67a893b7dba60bf91d504a2daa009149c6fc9b/resources/clj/new/electron_app/src/config/dev/config.cljs | clojure | (ns {{name}}.config)
(def index-html "resources/index-dev.html")
(def test-html "resources/test.html")
| |
0c6f3e7df4fd5041a423fb65afe2fbc5e991a9b38276b1b2f5989fc3a51ce391 | scrintal/heroicons-reagent | rectangle_group.cljs | (ns com.scrintal.heroicons.solid.rectangle-group)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M1.5 7.125c0-1.036.84-1.875 1.875-1.875h6c1.036 0 1.875.84 1.875 1.875v3.7... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/rectangle_group.cljs | clojure | (ns com.scrintal.heroicons.solid.rectangle-group)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M1.5 7.125c0-1.036.84-1.875 1.875-1.875h6c1.036 0 1.875.84 1.875 1.875v3.7... | |
771f4892f311865ff5d2a92b9aa20d8a5cb0f92315bde2d7f0b5681d275155d0 | NorfairKing/habitscipline | OptParse.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Habitscipline.TUI.OptParse where
import Autodocodec
import Autodocodec.Yaml
import Control.Applicative
import Control.Monad.Logger
import Da... | null | https://raw.githubusercontent.com/NorfairKing/habitscipline/ce85ce69889c1a6607875a8ecf1c14cfaabfa83d/habitscipline-tui/src/Habitscipline/TUI/OptParse.hs | haskell | # LANGUAGE OverloadedStrings #
| The 'envparse' parser for the 'Environment' | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Habitscipline.TUI.OptParse where
import Autodocodec
import Autodocodec.Yaml
import Control.Applicative
import Control.Monad.Logger
import Data.Maybe
import qualified Data.Text... |
200dc728da28f5d901aacb3c1c19daf01bd8dfd281dc5a397b2594853e218c50 | psholtz/MIT-SICP | exercise-03.scm | ;;
;; Working definitions
;;
(define (variable? exp)
(symbol? exp))
(define (make-variable var)
var)
(define (variable-name exp)
exp)
(define (or? exp)
(and (pair? exp) (eq? (car exp) 'or)))
(define (make-or exp1 exp2)
(list 'or exp1 exp2))
(define (or-first exp)
(cadr exp))
(define (or-second exp)
(cad... | null | https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Recitations-F2007/Recitation-08/mit-scheme/exercise-03.scm | scheme |
Working definitions
Previous exercises
Given a boolean expression and a set of variable assignments, evaluate the expression to
name environment), which takes a variable and and a list of values and returns the value
assigned to the variable, if a binding for it exists, or throws an error if no binding is
... | (define (variable? exp)
(symbol? exp))
(define (make-variable var)
var)
(define (variable-name exp)
exp)
(define (or? exp)
(and (pair? exp) (eq? (car exp) 'or)))
(define (make-or exp1 exp2)
(list 'or exp1 exp2))
(define (or-first exp)
(cadr exp))
(define (or-second exp)
(caddr exp))
(define (and? exp)
... |
dc11b5436be52747eae18518a5486f9a0d712c7e041e6b33203ed3be03da13f4 | davexunit/guile-2d | actions.scm | ;;; guile-2d
Copyright ( C ) 2013 >
;;;
;;; Guile-2d is free software: you can redistribute it and/or modify it
;;; under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation , either version 3 of the
;;; License, or (at your option) any later version.
;;;
;;; Guile-2d... | null | https://raw.githubusercontent.com/davexunit/guile-2d/83d9dfab5b04a337565cb2798847b15e4fbd7786/2d/actions.scm | scheme | guile-2d
Guile-2d is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
License, or (at your option) any later version.
Guile-2d is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | Copyright ( C ) 2013 >
published by the Free Software Foundation , either version 3 of the
You should have received a copy of the GNU Lesser General Public
(define-module (2d actions)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-1)
#:use-module (2d agenda)
#:use-module (2d coroutine)
#:expor... |
a9b2a4d4de2eecb15187e844fe540ef6df7831c238abc6d8634a32bac65b2ab6 | NorfairKing/hastory | Utils.hs | {-# LANGUAGE OverloadedStrings #-}
module Hastory.API.Utils
( doCountsWith,
dataBaseSpec,
runDb,
)
where
import Conduit (MonadUnliftIO)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Logger (runNoLoggingT)
import Control.Monad.Reader (ReaderT)
import Data.HashMap.Lazy (HashMap)
import qualifi... | null | https://raw.githubusercontent.com/NorfairKing/hastory/35abbc79155bc7c5a0f6e0f3618c8b8bcd3889a1/hastory-api/src/Hastory/API/Utils.hs | haskell | # LANGUAGE OverloadedStrings # |
module Hastory.API.Utils
( doCountsWith,
dataBaseSpec,
runDb,
)
where
import Conduit (MonadUnliftIO)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Logger (runNoLoggingT)
import Control.Monad.Reader (ReaderT)
import Data.HashMap.Lazy (HashMap)
import qualified Data.HashMap.Lazy as HM
import D... |
dec0be09e93356c8844473927c21fb8d33b2e351250a2502c7193ad27adc6eec | RefactoringTools/HaRe | TiPretty.hs | module TiPretty where
import TiTypes hiding (forall')
import TiNames
import TiKinds
import PrettyPrint
import SpecialNames
import PrettySymbols(forall',imp,el)
import Syntax(hsTyVar)
import HsDeclPretty(ppFunDeps,ppContext)
import MUtils(( # ),ifM)
instance (TypeId i,ValueId i)
=> Printable (Scheme i) where
pp... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/base/TI/TiPretty.hs | haskell | hmm
<+> o
<+> o | module TiPretty where
import TiTypes hiding (forall')
import TiNames
import TiKinds
import PrettyPrint
import SpecialNames
import PrettySymbols(forall',imp,el)
import Syntax(hsTyVar)
import HsDeclPretty(ppFunDeps,ppContext)
import MUtils(( # ),ifM)
instance (TypeId i,ValueId i)
=> Printable (Scheme i) where
pp... |
7268c2cb27267c67d873341a735b66d823c20b9164cd02f3cd9c84be98a3184b | fyquah/hardcaml_zprize | bls12_377_util.ml | open Core
module Extended_euclidean = Field_ops_lib.Extended_euclidean
type z = Z.t [@@deriving equal]
let sexp_of_z z = Sexp.Atom ("0x" ^ Z.format "x" z)
let half x = Z.div x (Z.of_int 2)
let p = Field_ops_model.Modulus.m
let modulo_mult a b = Z.(a * b mod p)
let modulo_neg a = Z.((neg a + p) mod p)
let modulo_inve... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/7eb1bd214908fa801781db33287eaf12691715f8/libs/twisted_edwards/model/bls12_377_util.ml | ocaml | open Core
module Extended_euclidean = Field_ops_lib.Extended_euclidean
type z = Z.t [@@deriving equal]
let sexp_of_z z = Sexp.Atom ("0x" ^ Z.format "x" z)
let half x = Z.div x (Z.of_int 2)
let p = Field_ops_model.Modulus.m
let modulo_mult a b = Z.(a * b mod p)
let modulo_neg a = Z.((neg a + p) mod p)
let modulo_inve... | |
e60c8e2bf8ddacf4932642ed7cbafc136061720bc58cef5f0b959fe81dec86fb | commercialhaskell/stack | Main.hs | import StackTest
main :: IO ()
main = do
stack ["clean"]
stack ["build"]
| null | https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/3787-internal-libs-with-no-main-lib/Main.hs | haskell | import StackTest
main :: IO ()
main = do
stack ["clean"]
stack ["build"]
| |
6f7b41d428fcc7c96ed6c1f0c0ac39459dcbf3be1e73173ab5d285556e56ba31 | circuithub/nix-buildkite | Main.hs | # language BlockArguments #
# language LambdaCase #
# language NamedFieldPuns #
{-# language OverloadedStrings #-}
module Main ( main ) where
-- algebraic-graphs
import Algebra.Graph.AdjacencyMap ( AdjacencyMap, edge, empty, hasVertex, overlay, overlays )
import Algebra.Graph.AdjacencyMap.Algorithm ( reachable )
-- ... | null | https://raw.githubusercontent.com/circuithub/nix-buildkite/aa2a2a38acfa6ff9319825e92cd73284e7ea4d95/exe-nix-buildkite/Main.hs | haskell | # language OverloadedStrings #
algebraic-graphs
aeson
base
bytestring
containers
filepath
nix-derivation
process
text
unordered-containers
Run nix-instantiate on the jobs expression to instantiate .drvs for all
things that may need to be built.
Build a 'Map StorePath DrvPath'. This will serve the role of
q... | # language BlockArguments #
# language LambdaCase #
# language NamedFieldPuns #
module Main ( main ) where
import Algebra.Graph.AdjacencyMap ( AdjacencyMap, edge, empty, hasVertex, overlay, overlays )
import Algebra.Graph.AdjacencyMap.Algorithm ( reachable )
import Data.Aeson ( Value(..), (.=), decodeStrict, encode,... |
3c8d48988a5fccb008d384d317004248eb9a01d3155fe83834abdcf168c9d1ea | tweag/ormolu | Annotation.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Ormolu.Printer.Meat.Declaration.Annotation
( p_annDecl,
)
where
import GHC.Hs
import Ormolu.Printer.Combinators
import Ormolu.Printer.Meat.Common
import Ormolu.Printer.Meat.Declaration.Value
p_annDecl :: AnnDecl GhcPs -> R ()
p_annDecl (HsAnnotati... | null | https://raw.githubusercontent.com/tweag/ormolu/11cda4c653bc67a6ff579531a441410626ab3bbd/src/Ormolu/Printer/Meat/Declaration/Annotation.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
module Ormolu.Printer.Meat.Declaration.Annotation
( p_annDecl,
)
where
import GHC.Hs
import Ormolu.Printer.Combinators
import Ormolu.Printer.Meat.Common
import Ormolu.Printer.Meat.Declaration.Value
p_annDecl :: AnnDecl GhcPs -> R ()
p_annDecl (HsAnnotation _ _ annProv expr) =
pragma "AN... |
8ef5d4615b68da5bbae116112850dfaa7b4188141be02d054c2f6607d8f25b21 | hexlet-basics/exercises-racket | index.rkt | #lang racket
#| BEGIN |#
(displayln (- 128 37))
#| END |#
| null | https://raw.githubusercontent.com/hexlet-basics/exercises-racket/ae3a45453584de1e5082c841178d4e43dd47e08a/modules/10-basics/18-lists-as-a-tree/index.rkt | racket | BEGIN
END | #lang racket
(displayln (- 128 37))
|
6afe875cefb01261f53035e0f709cfb5c500ba018a04656c8c0401696b606986 | tommaisey/aeon | ugen.scm | (define a2k
(lambda (input)
(mk-ugen (list "A2K" kr (list input) nil 1 nil nil))))
(define apf
(lambda (input freq radius)
(mk-ugen (list "APF" (list 0) (list input freq radius) nil 1 nil nil))))
(define allpass-c
(lambda (input maxdelaytime delaytime decaytime)
(mk-ugen (list "AllpassC" (list 0) (l... | null | https://raw.githubusercontent.com/tommaisey/aeon/ecfe0b16432a836368188876abeba513dab18820/libs/third-party/sc3/rsc3/src/ugen.scm | scheme | (define a2k
(lambda (input)
(mk-ugen (list "A2K" kr (list input) nil 1 nil nil))))
(define apf
(lambda (input freq radius)
(mk-ugen (list "APF" (list 0) (list input freq radius) nil 1 nil nil))))
(define allpass-c
(lambda (input maxdelaytime delaytime decaytime)
(mk-ugen (list "AllpassC" (list 0) (l... | |
e22e071fd0598b1ae07546b2a58ae1e2b90a3a947c077d34658161553a662d56 | mfoemmel/erlang-otp | wxMDIClientWindow.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxMDIClientWindow.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxMDIClientWindow).
-include("wxe... |
15e97ad7469430d400a69a09b269f5e5c3fa0858810d2c231537b375ec8332cb | ashleylwatson/HaskellsCastle | GameRules.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE FlexibleContexts #
module GameRules (
Game(..)
,play
,getSaveData
,selectSave
) where
import CharacUtil
import SelectSystem
import Battle
import Rooms
import Player
import Control.Concurrent
import Control.Exception (evaluate)
import Control.Lens
import Control.Monad
imp... | null | https://raw.githubusercontent.com/ashleylwatson/HaskellsCastle/26e35a2beacfb317733900946572111d6feac0a7/src/GameRules.hs | haskell | go to menu
You need to grab the bow in the house before fighting
Select A Utility
exit menu
go to save menu
exit menu
After selecting a utility, choose what to do with it
Choose LVLup, Heal, Order, or Drop
If the utility is Heal, give an option to Heal
Otherwise, don't give that option
Left is for if the sel... | # LANGUAGE TemplateHaskell #
# LANGUAGE FlexibleContexts #
module GameRules (
Game(..)
,play
,getSaveData
,selectSave
) where
import CharacUtil
import SelectSystem
import Battle
import Rooms
import Player
import Control.Concurrent
import Control.Exception (evaluate)
import Control.Lens
import Control.Monad
imp... |
76865d6feacd000be43620b7a50bf642db67e5ee3507c96914b32856d3d33628 | hopv/MoCHi | undefHCCSSolver.ml | open Util
open Combinator
let solve solver hcs : PredSubst.t =
let tenv = HCCS.tenv hcs in
hcs
|> HCCS.undefined_pvs
|> List.unique
|> List.map (fun p -> p, List.assoc_fail p tenv)
|> PredSubst.bot_of_tenv
|> HCCS.of_psub
|> (@) hcs
|> solver
let solve = Logger.log_block2 "UndefHCCSSolver.solve" solv... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/undefHCCSSolver.ml | ocaml | open Util
open Combinator
let solve solver hcs : PredSubst.t =
let tenv = HCCS.tenv hcs in
hcs
|> HCCS.undefined_pvs
|> List.unique
|> List.map (fun p -> p, List.assoc_fail p tenv)
|> PredSubst.bot_of_tenv
|> HCCS.of_psub
|> (@) hcs
|> solver
let solve = Logger.log_block2 "UndefHCCSSolver.solve" solv... | |
633a0e43a310f824c6151914e7f78a77538bbd977e62d469f6a884362cc8d854 | aeyakovenko/rbm | Matrix.hs | |
Module : Data . Matrix
Description : Typesafe matrix operations .
Copyright : ( c ) , 2015 - 2016
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
This module implements some matrix operations using the package that track the symbolic shape of the matrix ... | null | https://raw.githubusercontent.com/aeyakovenko/rbm/e1767257ba7499e09b31b34b1ec76c14272ba127/Data/Matrix.hs | haskell | # LANGUAGE EmptyDataDecls #
| num hidden nodes
| num input nodes
| num inputs in batch
| wraps the Repa Array types so we can typecheck the results of
| the matrix operations
# INLINE (*^) #
# INLINE (+^) #
# INLINE (-^) #
# INLINE transpose #
# INLINE traverse # | |
Module : Data . Matrix
Description : Typesafe matrix operations .
Copyright : ( c ) , 2015 - 2016
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
This module implements some matrix operations using the package that track the symbolic shape of the matrix ... |
12352f1f8650f27cb1da5fee2ef78b44cfc65cdc90920c36583ea5da8be75edc | emina/rosette | host.rkt | #lang s-exp "../../../lang/main.rkt"
; Given a src array of length SIZE, returns a new array dst of
; the same size, such that dst[i] = src[i] + offset, for all
0 < = i < SIZE . The SIZE parameter must be evenly divisible by 4 .
(procedure int* (host [int* src] [int SIZE] [int offset])
(: cl_context context)
... | null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/sdsl/synthcl/examples/toy/verify/host.rkt | racket | Given a src array of length SIZE, returns a new array dst of
the same size, such that dst[i] = src[i] + offset, for all
The reference implementation for the host procedure.
Given a src array of length SIZE, returns a new array dst of
the same size, such that dst[i] = src[i] + offset, for all
... | #lang s-exp "../../../lang/main.rkt"
0 < = i < SIZE . The SIZE parameter must be evenly divisible by 4 .
(procedure int* (host [int* src] [int SIZE] [int offset])
(: cl_context context)
(: cl_command_queue command_queue)
(: cl_program program)
(: cl_kernel kernel)
(: cl_mem buffer_src buffer_dst)
(: in... |
c69217b14ae6abd7f6f5880ea64219d19620513ca9ed58a0785bb9dbf94edc08 | franburstall/nyxt-init | buffer-tags.lisp | ;; quick and dirty tags for buffers
;;
;; Usage: enable buffer-tag-mode and then, for 0<=n<=9, hit
C - M - n to give the current - buffer tag n ( removing it from any
;; previous owner)
;; C-n to switch to the buffer with tag n.
;; TODO:
;; - next/prev tagged buffer? Not sure if this is really necessary.
;; - seria... | null | https://raw.githubusercontent.com/franburstall/nyxt-init/383aecb3b65dec7e16968ad6344030ba9ae09ea6/buffer-tags.lisp | lisp | quick and dirty tags for buffers
Usage: enable buffer-tag-mode and then, for 0<=n<=9, hit
previous owner)
C-n to switch to the buffer with tag n.
TODO:
- next/prev tagged buffer? Not sure if this is really necessary.
- serialise on exit? Would need to store buffer ids rather than buffers.
empty the tag | C - M - n to give the current - buffer tag n ( removing it from any
(in-package #:nyxt-user)
(defparameter *tagged-buffers* (make-array 10 :initial-element nil))
(defun switch-buffer-by-tag (tag)
"Switch to buffer with tag TAG, if it exists."
(let* ((buf (elt *tagged-buffers* tag))
(live-p (member buf (buff... |
3ed254037de6e3e58ef2db6838980e17bebc3e5c3abd7dcbf6fceebfe37bb397 | Feldspar/feldspar-language | FFT.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE FlexibleContexts #
module Main where
import Feldspar (Length, Complex)
import Feldspar.Algorithm.FFT
import Feldspar.Compiler
import Feldspar.Compiler.Plugin
import Feldspar.Compiler.Marshal
import Foreign.Ptr
import Foreign.Marshal (new)
import C... | null | https://raw.githubusercontent.com/Feldspar/feldspar-language/499e4e42d462f436a5267ddf0c2f73d5741a8248/benchs/FFT.hs | haskell | # LANGUAGE BangPatterns # | # LANGUAGE TemplateHaskell #
# LANGUAGE FlexibleContexts #
module Main where
import Feldspar (Length, Complex)
import Feldspar.Algorithm.FFT
import Feldspar.Compiler
import Feldspar.Compiler.Plugin
import Feldspar.Compiler.Marshal
import Foreign.Ptr
import Foreign.Marshal (new)
import Control.DeepSeq (NFData(..))
im... |
2e7304e26036b341b041a71ecd805b0a6d6ed0441f25caecc67974d24eed4f08 | maurer/symfuzz | analysis.mli | (* SymFuzz *)
* analyzer main
@author < sangkil.cha\@gmail.com >
@since 2014 - 03 - 19
@author Sang Kil Cha <sangkil.cha\@gmail.com>
@since 2014-03-19
*)
Copyright ( c ) 2014 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modif... | null | https://raw.githubusercontent.com/maurer/symfuzz/ea6298746a23b6d266d28d27c6ff952a7bd14885/src/analyzer/analysis.mli | ocaml | SymFuzz
log director
current analysis id
local socket name
debug flag
tid
argvp
envc
envp |
* analyzer main
@author < sangkil.cha\@gmail.com >
@since 2014 - 03 - 19
@author Sang Kil Cha <sangkil.cha\@gmail.com>
@since 2014-03-19
*)
Copyright ( c ) 2014 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are ... |
6906bf52c5ed53237ddb815e6de649e6074d8000cd2ad65cf7d89a17837f4dde | typelead/eta | tc240.hs | -- Checks that the types of the old binder and the binder implicitly introduced by grouping are linked
{-# OPTIONS_GHC -XTransformListComp #-}
module ShouldCompile where
import Data.List(inits)
foo :: [[[Int]]]
foo = [ x
| x <- [1..10]
, then group using inits
, then group using inits
]
| null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/tc240.hs | haskell | Checks that the types of the old binder and the binder implicitly introduced by grouping are linked
# OPTIONS_GHC -XTransformListComp # |
module ShouldCompile where
import Data.List(inits)
foo :: [[[Int]]]
foo = [ x
| x <- [1..10]
, then group using inits
, then group using inits
]
|
eabe0f7bf7909bd9b02e91b4bb66b506ff8169bcd8468544ae329f1c36767d5c | soenkehahn/generics-eot | ToString.hs | # LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE MonoLocalBinds #
# LANGUAGE ScopedTypeVariables #
module ToString (ToString(..)) where
import Data.List
import Generics.Eot
class ToString a where
toString :: a -> String
default toString :: (HasEot a, ToStringG (Eot a)) ... | null | https://raw.githubusercontent.com/soenkehahn/generics-eot/cb001556d716deab72472f8c82f1b0eae326c25b/examples/ToString.hs | haskell | # LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE MonoLocalBinds #
# LANGUAGE ScopedTypeVariables #
module ToString (ToString(..)) where
import Data.List
import Generics.Eot
class ToString a where
toString :: a -> String
default toString :: (HasEot a, ToStringG (Eot a)) ... | |
1d173e4423e5b57d957adef8e112db2a5260128924b46c44d1ffd19863321434 | adaliu-gh/htdp | 363-369.rkt | ;;====================
363
an Xexpr.v2 is a list :
;; - (cons Symbol XL)
an XL is one of :
;; - '()
;; - Xexpr.v2
;; - (cons Xexpr.v2 XL)
- ( cons AL ( cons Xexpr.v2 XL ) )
;; an Attribute is:
;; (cons Symbol (cons String '()))
an AL is one of :
;; - '()
;; - (cons Attribute AL)
;;========================... | null | https://raw.githubusercontent.com/adaliu-gh/htdp/a0fca8af2ae8bdcef40d56f6f45021dd92df2995/19-24%20Intertwined%20Data/363-369.rkt | racket | ====================
- (cons Symbol XL)
- '()
- Xexpr.v2
- (cons Xexpr.v2 XL)
an Attribute is:
(cons Symbol (cons String '()))
- '()
- (cons Attribute AL)
========================
==========================
365
===========================
Xexpr.v2 -> Symbol
[List-of Attribute] or Xexpr.v2 -> Boolean
is the g... | 363
an Xexpr.v2 is a list :
an XL is one of :
- ( cons AL ( cons Xexpr.v2 XL ) )
an AL is one of :
364
(define xexpr1 '(transition ((from "seen-e") (to "seen-f")) (l)))
(define xexpr2 '(ul (li (word) (word)) (li (word))))
1 . < server name="example.org"/ >
2 . < carcas><board><grass/><board/><playe... |
842352194520dd2681add793c768c7524ac3a54e5bd0018c28a9fd831fff6a91 | trebb/phoros | util.lisp | PHOROS -- Photogrammetric Road Survey
Copyright ( C ) 2011 , 2012 , 2017
;;;
;;; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
;;; (at your option) an... | null | https://raw.githubusercontent.com/trebb/phoros/c589381e3f4a729c5602c5870a61f1c847edf201/util.lisp | lisp |
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR... | PHOROS -- Photogrammetric Road Survey
Copyright ( C ) 2011 , 2012 , 2017
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License along
51 Franklin Street , Fifth Floor , Boston , USA .
(in-package :phoros)
(defun unqualifi... |
75b7fe0a4a9e11829b44730faae8456a58c05b497dcdf9be48ef441ab5d5e706 | skanev/playground | 34-tests.scm | (require rackunit rackunit/text-ui)
(load "../34.scm")
(define (run exp)
(actual-value exp (setup-environment)))
(define (to-s exp)
(with-output-to-string (lambda () (run `(begin (define result ,exp)
(print result))))))
(define sicp-4.34-tests
(test-suite
"T... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/04/tests/34-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "../34.scm")
(define (run exp)
(actual-value exp (setup-environment)))
(define (to-s exp)
(with-output-to-string (lambda () (run `(begin (define result ,exp)
(print result))))))
(define sicp-4.34-tests
(test-suite
"T... | |
6ca719ef97c1f319c89d98a365d2ee02f30ca01c8852a10a6407f511fd5fe9ba | gethop-dev/stork | project.clj | (defproject dev.gethop/stork "0.1.8-SNAPSHOT"
:description "Idempotent and atomic datom transacting for Datomic. Heavily inspired on avescodes/conformity."
:url "-dev/stork"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.9.8"
:plugins [[jonase/eastwood "1.2.3"]
... | null | https://raw.githubusercontent.com/gethop-dev/stork/57f422fe74f5d5d3b677327c0348deb59b816b8f/project.clj | clojure | (defproject dev.gethop/stork "0.1.8-SNAPSHOT"
:description "Idempotent and atomic datom transacting for Datomic. Heavily inspired on avescodes/conformity."
:url "-dev/stork"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.9.8"
:plugins [[jonase/eastwood "1.2.3"]
... | |
5e1a058b522c00b7681b419698a7c0bfb29e43313981a76606306ad628d31f69 | javalib-team/javalib | jParse.ml |
* This file is part of Javalib
* Copyright ( c)2004
* Copyright ( c)2007 ( Université de Rennes 1 )
* Copyright ( c)2007 , 2008 ( CNRS )
* Copyright ( c)2009 , ( INRIA )
*
* This software is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser Gene... | null | https://raw.githubusercontent.com/javalib-team/javalib/807881077342a1a22650e6a9906ae5c2743a9940/src/jParse.ml | ocaml | *************************************************************************
*************************************************************************
Annotation parsing
constants
string
enum constant
class constant
annotation type
array |
* This file is part of Javalib
* Copyright ( c)2004
* Copyright ( c)2007 ( Université de Rennes 1 )
* Copyright ( c)2007 , 2008 ( CNRS )
* Copyright ( c)2009 , ( INRIA )
*
* This software is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser Gene... |
37de478f99ac38c5519dd132a80401b1ebdcf8adc64b8ad9273a896e952c9df9 | mcandre/ocaml-getopt | sample.ml | Demonstration of the module
open Getopt
let archive = ref false
and update = ref false
and verbose = ref 0
and includ = ref []
and output = ref ""
let bip () = Printf.printf "\007"; flush stdout
let wait () = Unix.sleep 1
let specs =
[
( 'x', "execute", None, Some (fun x -> Printf.printf "execute %s\n" x... | null | https://raw.githubusercontent.com/mcandre/ocaml-getopt/9d36081db01008c15a4a0044b4c1cbdf8d3f3492/sample.ml | ocaml | Demonstration of the module
open Getopt
let archive = ref false
and update = ref false
and verbose = ref 0
and includ = ref []
and output = ref ""
let bip () = Printf.printf "\007"; flush stdout
let wait () = Unix.sleep 1
let specs =
[
( 'x', "execute", None, Some (fun x -> Printf.printf "execute %s\n" x... | |
5c1f5c69297b954d416a550628e3f59691d93e291d426f9416ffb896a0b4709d | gsakkas/rite | 20060405-20:41:02-03a9838eef87a5baf5d05bd769e72274.seminal.ml | * * * * * Note : Problem 1 does not use ; see the assignment * * * *
exception Unimplemented
exception RuntimeTypeError
exception BadSourceProgram
exception BadPrecomputation
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # ... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060405-20%3A41%3A02-03a9838eef87a5baf5d05bd769e72274.seminal.ml | ocaml | store env!
############################################
##################################
#####################
################################
######################################################################
###
################################
#################
###################################... | * * * * * Note : Problem 1 does not use ; see the assignment * * * *
exception Unimplemented
exception RuntimeTypeError
exception BadSourceProgram
exception BadPrecomputation
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # ... |
583adba27592045eaa203399199d2ae585ea727675cae9a64e0895284944ff23 | kztk-m/sparcl | Spec.hs | # LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE QuasiQuotes #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - defer - out - of - scope - variables -fno - defer - type - errors #
import Language.Sparcl.Base
import Language.Spar... | null | https://raw.githubusercontent.com/kztk-m/sparcl/f52d333ce50e0aa6cb307da08811719f8c684f7d/test/Spec.hs | haskell | # LANGUAGE QuasiQuotes #
[sparcl| def f = 1 |]
[sparclf|./examples/t1.sparcl|]
[sparclf|./examples/s2l.sparcl|] | # LANGUAGE NoMonomorphismRestriction #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - defer - out - of - scope - variables -fno - defer - type - errors #
import Language.Sparcl.Base
import Language.Sparcl.Runtime
import Language.Sparc... |
e2dea3d827fce17b2f6e450d9325ff8626e84840fc8e34efc46cb1ece1675fac | McMasterU/HashedExpression | Utils.hs | module HashedExpression.Utils where
import Data.Array
import Data.Complex (Complex (..))
import qualified Data.Complex as Complex
import Data.Function ((&))
import qualified Data.IntMap.Strict as IM
import Data.List (foldl')
import Data.List.Split (splitOn)
import Data.Map (Map, fromList)
import qualified Data.Map as ... | null | https://raw.githubusercontent.com/McMasterU/HashedExpression/cfe9f21165f1f3fc6d59ec27fb962c29e67a9bbb/src/HashedExpression/Utils.hs | haskell | | Forward pipe operator
|
| Check if all elements of the list is equal
|
|
|
|
|
|
|
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
---------------------------------------------------------------------... | module HashedExpression.Utils where
import Data.Array
import Data.Complex (Complex (..))
import qualified Data.Complex as Complex
import Data.Function ((&))
import qualified Data.IntMap.Strict as IM
import Data.List (foldl')
import Data.List.Split (splitOn)
import Data.Map (Map, fromList)
import qualified Data.Map as ... |
7f257a870c8e383c6f233e9dd98801c36f35a21908433368d5d3d645fb3d98b0 | duncanatt/detecter | ranch_acceptors_sup.erl | Copyright ( c ) 2011 - 2018 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/duncanatt/detecter/95b6a758ce6c60f3b7377c07607f24d126cbdacf/experiments/coordination_2022/src/ranch/ranch_acceptors_sup.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2011 - 2018 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(ranch_acceptors_sup).
-behaviour(supervisor).... |
b1d1d46eb11d724deb36dcc5f780c7645a85d4ed6431eaa11efbb96294693662 | haas/harmtrace | Sim.hs | # OPTIONS_GHC -Wall #
module HarmTrace.Matching.Sim where
import HarmTrace.HAnTree.HAn
import HarmTrace.HAnTree.Tree
import HarmTrace.Base.MusicRep
import HarmTrace.Models.ChordTokens (ChordToken)
--------------------------------------------------------------------------------
-- A class for representing numerical s... | null | https://raw.githubusercontent.com/haas/harmtrace/e250855a3bb6e5b28fe538c728f707cf82ca9fd3/src/HarmTrace/Matching/Sim.hs | haskell | ------------------------------------------------------------------------------
A class for representing numerical similarity between datatypes
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Some utility f... | # OPTIONS_GHC -Wall #
module HarmTrace.Matching.Sim where
import HarmTrace.HAnTree.HAn
import HarmTrace.HAnTree.Tree
import HarmTrace.Base.MusicRep
import HarmTrace.Models.ChordTokens (ChordToken)
class Sim a where
sim :: a -> a -> Int
instance Sim a => Sim (Tree a) where
sim (Node l _ _) (Node l' _ _) = sim ... |
f413d543a9f581ff40031c846c275a6d33f5cf8e2a8890556e985fc804dd0397 | ocaml-community/lambda-term | lTerm_history.mli |
* lTerm_history.mli
* -----------------
* Copyright : ( c ) 2012 , < >
* Licence : BSD3
*
* This file is a part of Lambda - Term .
* lTerm_history.mli
* -----------------
* Copyright : (c) 2012, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of Lambda-Term.
*)
(** Histor... | null | https://raw.githubusercontent.com/ocaml-community/lambda-term/f6b1940863e94d437a0578e19076a342bc9b5a70/src/lTerm_history.mli | ocaml | * History management
* Type of a history.
* [add history ?skip_empty ?skip_dup entry] adds [entry] to the
top of the history. If [skip_empty] is [true] (the default) and
[entry] contains only spaces, it is not added. If [skip_dup] is
[true] (the default) and [entry] is equal to the top of the
... |
* lTerm_history.mli
* -----------------
* Copyright : ( c ) 2012 , < >
* Licence : BSD3
*
* This file is a part of Lambda - Term .
* lTerm_history.mli
* -----------------
* Copyright : (c) 2012, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of Lambda-Term.
*)
type t
v... |
a73c132373fe45b59a97fe7d1872999f6a5be68c7d1222efda529fece73a26b1 | replikativ/datahike | lru.cljc | (ns ^:no-doc datahike.lru
(:require [clojure.core.cache :refer [defcache CacheProtocol]]
clojure.data.priority-map))
(declare assoc-lru cleanup-lru)
#?(:cljs
(deftype LRU [key-value gen-key key-gen gen limit]
IAssociative
(-assoc [this k v] (assoc-lru this k v))
(-contains-key? [_ k] (... | null | https://raw.githubusercontent.com/replikativ/datahike/7e60af807dd4db1d0eb73b75ac2f010e31361a3a/src/datahike/lru.cljc | clojure | (ns ^:no-doc datahike.lru
(:require [clojure.core.cache :refer [defcache CacheProtocol]]
clojure.data.priority-map))
(declare assoc-lru cleanup-lru)
#?(:cljs
(deftype LRU [key-value gen-key key-gen gen limit]
IAssociative
(-assoc [this k v] (assoc-lru this k v))
(-contains-key? [_ k] (... | |
76c20e4fad80c7e9766678ce928381b563470f99f51a90c4d05495028a1da33a | Appliscale/xprof | xprof_core_app.erl | @doc XProf Core application callback
%% @end
-module(xprof_core_app).
-behaviour(application).
%% Application callbacks
-export([start/2,
stop/1]).
%% Application callbacks
start(_StartType, _StartArgs) ->
xprof_core_sup:start_link().
stop(_State) ->
ok.
| null | https://raw.githubusercontent.com/Appliscale/xprof/198e5451db429cdb7bf6b4640ec932c425b635ae/apps/xprof_core/src/xprof_core_app.erl | erlang | @end
Application callbacks
Application callbacks | @doc XProf Core application callback
-module(xprof_core_app).
-behaviour(application).
-export([start/2,
stop/1]).
start(_StartType, _StartArgs) ->
xprof_core_sup:start_link().
stop(_State) ->
ok.
|
43da276b7d30998b299ce5f6535474698361a8c71b3e19022af55f8f84c38277 | redstarssystems/rssyslib | libtemplate.clj | (ns clj.new.org.rssys.libtemplate
(:require
[clj.new.templates :refer [renderer project-data ->files]]))
(defn libtemplate
"entry point to run template."
[name]
(let [render (renderer "rssyslib")
data (project-data name)]
(println "Generating project from library template ")
(println "Se... | null | https://raw.githubusercontent.com/redstarssystems/rssyslib/68a9232fa620541cc4657bbd507313974158f92e/src/clj/new/org/rssys/libtemplate.clj | clojure | (ns clj.new.org.rssys.libtemplate
(:require
[clj.new.templates :refer [renderer project-data ->files]]))
(defn libtemplate
"entry point to run template."
[name]
(let [render (renderer "rssyslib")
data (project-data name)]
(println "Generating project from library template ")
(println "Se... | |
129a7ef2196c9a1d627ef4dabdde78a8faf55ac28005c084a329649342db2649 | valderman/haste-compiler | DataToTag.hs | Test case constributed by
module Tests.DataToTag where
import Control.Monad
import System.IO.Unsafe
import Control.Applicative (Applicative (..))
trace :: Show a => a -> b -> b
trace msg = seq $! unsafePerformIO (putStrLn $ show msg)
runTest :: IO String
runTest = return . show $ parse "a"
-- | Parse a string in... | null | https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/Tests/DataToTag.hs | haskell | | Parse a string into the token list [Tok1] and return True if the parser
(token Tok1) can verify that.
together with the not yet consumed input. | Test case constributed by
module Tests.DataToTag where
import Control.Monad
import System.IO.Unsafe
import Control.Applicative (Applicative (..))
trace :: Show a => a -> b -> b
trace msg = seq $! unsafePerformIO (putStrLn $ show msg)
runTest :: IO String
runTest = return . show $ parse "a"
parse :: String -> Boo... |
6fb49c41f13a9179db32f832445172a7255364a9522a53db634434714a87c4ad | tomjaguarpaw/haskell-opaleye | Label.hs | {-# LANGUAGE Arrows #-}
module Opaleye.Label (
label',
-- * Deprecated
label
) where
import qualified Opaleye.Internal.PrimQuery as PQ
import qualified Opaleye.Internal.QueryArr as Q
import qualified Opaleye.Select as S
import Control.Arrow (returnA)
-- | Add a commented label to the ge... | null | https://raw.githubusercontent.com/tomjaguarpaw/haskell-opaleye/41b0f82d965edbde6a704911c7097600b8c26211/src/Opaleye/Label.hs | haskell | # LANGUAGE Arrows #
* Deprecated
| Add a commented label to the generated SQL. |
module Opaleye.Label (
label',
label
) where
import qualified Opaleye.Internal.PrimQuery as PQ
import qualified Opaleye.Internal.QueryArr as Q
import qualified Opaleye.Select as S
import Control.Arrow (returnA)
label' :: String -> S.Select ()
label' l = Q.selectArr f where
f = pure (\()... |
ae55dea52b0f6416985a9fcb19dc0494dc2abda39998bfbec2ccbda498606dd0 | tcoram/maunder | maunder_app.erl | %%%-------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License
%% Version 2.0 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under th... | null | https://raw.githubusercontent.com/tcoram/maunder/ae8f8f286d51841087f7df79a37b6f3d882a19c2/src/maunder_app.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language gove... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
@author < >
( C ) 2012,2013 Todd Coram
Created : 27 Jul 2012 by < ) >
-module(maunder_app).
-author('').
-blocking_TCP_server_using_OTP_principles
-behaviour(app... |
154ba6843b06df03ce18f8235795b3ba3f7475e9b12bb0129141de127f5df4a6 | lemmaandrew/CodingBatHaskell | fix45.hs | From
( This is a slightly harder version of the fix34 problem . ) Return an array that contains
exactly the same numbers as the given array , but rearranged so that every 4 is immediately
followed by a 5 . Do not move the 4 's , but every other number may move . The array contains
the same number of 4 's and... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Array-3/fix45.hs | haskell | From
( This is a slightly harder version of the fix34 problem . ) Return an array that contains
exactly the same numbers as the given array , but rearranged so that every 4 is immediately
followed by a 5 . Do not move the 4 's , but every other number may move . The array contains
the same number of 4 's and... | |
05b61733411fdbeddae886e37c2b5412ec07f173de579c82594b2f9c5ecc619c | johnlawrenceaspden/hobby-code | gamma-table.clj | (defn table [g]
(let [g2 (/ 1 (- 1 (* g g)))]
[ g2 (* 2 g g2)
(* g g2) (* 2 g g g2)
(+ 2 (* g g2)) (* 2 g2)]))
[ [ 1.3333333333333333 1.3333333333333333 0.6666666666666666 0.6666666666666666 2.6666666666666665 2.6666666666666665 ] ]
[ [ 1.1904761904761905 0.9523809523809524 0.4761904761904762 0... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/reinforcement-learning/gamma-table.clj | clojure | (false false false false false false)
(true true true true true true)
(:> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :> :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< :< ... | (defn table [g]
(let [g2 (/ 1 (- 1 (* g g)))]
[ g2 (* 2 g g2)
(* g g2) (* 2 g g g2)
(+ 2 (* g g2)) (* 2 g2)]))
[ [ 1.3333333333333333 1.3333333333333333 0.6666666666666666 0.6666666666666666 2.6666666666666665 2.6666666666666665 ] ]
[ [ 1.1904761904761905 0.9523809523809524 0.4761904761904762 0... |
2a3aa378ea404896faf44eeaccc07b87a1884ceb085d53a6e631d012a5379bf9 | agda/agda | SplitTree.hs |
ASR ( 2017 - 07 - 08 ) . Since that this module was not used and it was
causing a build problem with GHC 8.2.1 RC 3 , I removed it ( see
-- Issue #2540).
module Internal . TypeChecking . Coverage . SplitTree ( ) where
import Agda . TypeChecking . Coverage . SplitTree
-- import Test.QuickCheck
-- ----------... | null | https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/test/Internal/TypeChecking/Coverage/SplitTree.hs | haskell | Issue #2540).
import Test.QuickCheck
------------------------------------------------------------------------------
-- * Generating random split trees for testing
instance Arbitrary a => Arbitrary (SplitTree' a) where
arbitrary = frequency
]
-- * Testing the printer
newtype CName = CName String
instance... |
ASR ( 2017 - 07 - 08 ) . Since that this module was not used and it was
causing a build problem with GHC 8.2.1 RC 3 , I removed it ( see
module Internal . TypeChecking . Coverage . SplitTree ( ) where
import Agda . TypeChecking . Coverage . SplitTree
[ ( 5 , return $ SplittingDone 0 )
, ( 3 , ... |
1f85695e6d820045ec4cef132a22939f9f18dcd552a99ffbceeeb88db73f7973 | TyOverby/mono | transfer_io.mli | { { { Copyright ( c ) 2012 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " A... | null | https://raw.githubusercontent.com/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/mirage-ocaml-cohttp/cohttp/src/transfer_io.mli | ocaml | { { { Copyright ( c ) 2012 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " A... | |
5ccaf67f5499e4381659066302e330badd9116b28d2ba5b0e5c1e2a6c85fe359 | pveber/bistro | macs.ml | open Core
open Bistro
open Bistro.Shell_dsl
open Formats
let img = [ docker_image ~account:"pveber" ~name:"macs" ~tag:"1.4.2" () ]
type _ format =
| Sam
| Bam
let sam = Sam
let bam = Bam
let opt_of_format = function
| Sam -> "SAM"
| Bam -> "BAM"
type gsize = [ `hs | `mm | `ce | `dm | `gsize of int ]
let g... | null | https://raw.githubusercontent.com/pveber/bistro/d363bd2d8257babbcb6db15bd83fd6465df7c268/lib/bio/macs.ml | ocaml | open Core
open Bistro
open Bistro.Shell_dsl
open Formats
let img = [ docker_image ~account:"pveber" ~name:"macs" ~tag:"1.4.2" () ]
type _ format =
| Sam
| Bam
let sam = Sam
let bam = Bam
let opt_of_format = function
| Sam -> "SAM"
| Bam -> "BAM"
type gsize = [ `hs | `mm | `ce | `dm | `gsize of int ]
let g... | |
338ae199df56335b2a56adf424e1ea479811b42d602e786d532e0e8f1f24c971 | monadbobo/ocaml-core | block_group.mli | open Core.Std
open Import
type t = Async_core.Block_group.t
val create :
?min_reserved_threads:int
-> ?max_reserved_threads:int
-> unit
-> [ `Ok of t
| `Out_of_threads
]
| null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/async/unix/lib/block_group.mli | ocaml | open Core.Std
open Import
type t = Async_core.Block_group.t
val create :
?min_reserved_threads:int
-> ?max_reserved_threads:int
-> unit
-> [ `Ok of t
| `Out_of_threads
]
| |
a3ef4087ed911a7c8fe0c2f4fd4f04cf4db35bca5efb6cd91f5fe7b77acd4f43 | synduce/Synduce | min.ml | * @synduce -s 2 -NB
type 'a clist =
| Single of 'a
| Concat of 'a clist * 'a clist
type 'a list =
| Elt of 'a
| Cons of 'a * 'a list
let rec spec = function
| Elt a -> a
| Cons (hd, tl) -> min hd (spec tl)
;;
let rec repr = function
| Single a -> Elt a
| Concat (x, y) -> dec y x
and dec l1 = functi... | null | https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/incomplete/list/min.ml | ocaml | * @synduce -s 2 -NB
type 'a clist =
| Single of 'a
| Concat of 'a clist * 'a clist
type 'a list =
| Elt of 'a
| Cons of 'a * 'a list
let rec spec = function
| Elt a -> a
| Cons (hd, tl) -> min hd (spec tl)
;;
let rec repr = function
| Single a -> Elt a
| Concat (x, y) -> dec y x
and dec l1 = functi... | |
ce660e69add194a00cb0d122e5f38c90a1155fdd262ca0e6b5f872ce63352ecb | id774-2/maeve | normalize.scm | (use srfi-1)
(use util.match)
(use maeve.lib.gauche.pp)
(define (update-elements! proc xs)
(pair-fold
(lambda (xs _)
(update! (car xs) proc)
xs)
#f xs)
xs)
(use gauche.sequence)
(define-macro (debug-print x)
(let1 results (gensym)
`(begin
(format/ss (current-error-port) "#?= ~s\n" ',x)... | null | https://raw.githubusercontent.com/id774-2/maeve/a9442c3479b0d575f896b898eb889297f30e1a96/prototype/normalize.scm | scheme | ** syntax tree normalize problem
>||
(set! foo (block x y z))
;; =>
(block x y (set! foo z))
||<
>||
(block a b c)
(block d e f))
;; =>
(block
a b
(opr2 c (block d e f)))
;; =>
(block
a b
(block
d e (opr2 c f)))
||<
>||
(set! foo
(block
x y
(opr2
(block a b c)
(b... | (use srfi-1)
(use util.match)
(use maeve.lib.gauche.pp)
(define (update-elements! proc xs)
(pair-fold
(lambda (xs _)
(update! (car xs) proc)
xs)
#f xs)
xs)
(use gauche.sequence)
(define-macro (debug-print x)
(let1 results (gensym)
`(begin
(format/ss (current-error-port) "#?= ~s\n" ',x)... |
25c0f350056137a3baa792fdc240c721d77a60eaf5e421f41f22e6486ad7dd32 | mistupv/cauder | cauder_scheduler_tests.erl | -module(cauder_scheduler_tests).
-import(cauder_scheduler, [scheduler_round_robin/2, scheduler_fcfs/2]).
-elvis([{elvis_style, dont_repeat_yourself, disable}]).
-include_lib("eunit/include/eunit.hrl").
scheduler_round_robin_test_() ->
Q0 = queue:new(),
Q1 = queue:from_list([a, b, c, d]),
[
asser... | null | https://raw.githubusercontent.com/mistupv/cauder/ff4955cca4b0aa6ae9d682e9f0532be188a5cc16/test/cauder_scheduler_tests.erl | erlang | -module(cauder_scheduler_tests).
-import(cauder_scheduler, [scheduler_round_robin/2, scheduler_fcfs/2]).
-elvis([{elvis_style, dont_repeat_yourself, disable}]).
-include_lib("eunit/include/eunit.hrl").
scheduler_round_robin_test_() ->
Q0 = queue:new(),
Q1 = queue:from_list([a, b, c, d]),
[
asser... | |
d7bfa85a24509c9308b447de25fa22574783b12f7c04c7bd4b5648afaf7d48b7 | agentm/project-m36 | DatabaseContextFunctionError.hs | # LANGUAGE DeriveGeneric , DeriveAnyClass #
module ProjectM36.DatabaseContextFunctionError where
import GHC.Generics
import Control.DeepSeq
# ANN module ( " HLint : ignore Use newtype instead of data " : : String ) #
data DatabaseContextFunctionError = DatabaseContextFunctionUserError String
... | null | https://raw.githubusercontent.com/agentm/project-m36/57a75b35e84bebf0945db6dae53350fda83f24b6/src/lib/ProjectM36/DatabaseContextFunctionError.hs | haskell | # LANGUAGE DeriveGeneric , DeriveAnyClass #
module ProjectM36.DatabaseContextFunctionError where
import GHC.Generics
import Control.DeepSeq
# ANN module ( " HLint : ignore Use newtype instead of data " : : String ) #
data DatabaseContextFunctionError = DatabaseContextFunctionUserError String
... | |
8cff9e8d02da99ae817ed9cf794920d7c971a589db6a97d8283600f13d6886b4 | facebook/flow | semver_parser_test.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/725e6301246685c9832a62b83a49c75c7be3b7b0/src/common/semver/__tests__/semver_parser_test.ml | ocaml | fixes ounit error reporting
fixes ounit error reporting
fixes ounit error reporting |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
18bedd470ee5f03a757072a566cb2949ae28f5310aa213f040319e866f8b0851 | JoelSanchez/ventas | description.clj | (ns ventas.server.api.description
(:require
[clojure.set :as set]
[clojure.spec.alpha :as spec]
[clojure.test.check.generators :as gen]
[spec-tools.core :as st]
[spec-tools.data-spec :as data-spec]
[spec-tools.impl :as impl]
[spec-tools.parse :as parse]
[spec-tools.visitor :as visitor]
[ven... | null | https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/clj/ventas/server/api/description.clj | clojure | some? (such-that some? (any-printable))
integer? (large-integer)
int? (large-integer)
pos-int? (large-integer* {:min 1})
nat-int? (large-integer* {:min 0})
float? (double)
double? (double)
boolean? (boolean)
string? (string-alphanumeric)
keyword? (keyword-ns)
simple-keyword? (keyword)
qualified-keyword? (su... | (ns ventas.server.api.description
(:require
[clojure.set :as set]
[clojure.spec.alpha :as spec]
[clojure.test.check.generators :as gen]
[spec-tools.core :as st]
[spec-tools.data-spec :as data-spec]
[spec-tools.impl :as impl]
[spec-tools.parse :as parse]
[spec-tools.visitor :as visitor]
[ven... |
4df042c76ff49215a40a6b28bcaa12759b1b501c3163e8e82987d7f50eb3d922 | alura-cursos/datomic-identidades-e-queries | aula3.clj | (ns ecommerce.aula3
(:use clojure.pprint)
(:require [datomic.api :as d]
[ecommerce.db :as db]
[ecommerce.model :as model]))
(def conn (db/abre-conexao))
(db/cria-schema conn)
(let [computador (model/novo-produto "Computador Novo", "/computador-novo", 2500.10M)
celular (model/novo-p... | null | https://raw.githubusercontent.com/alura-cursos/datomic-identidades-e-queries/2c14e40f02ae3ac2ebd39d2a1d07fbdc87526052/aula0/ecommerce/src/ecommerce/aula3.clj | clojure | (ns ecommerce.aula3
(:use clojure.pprint)
(:require [datomic.api :as d]
[ecommerce.db :as db]
[ecommerce.model :as model]))
(def conn (db/abre-conexao))
(db/cria-schema conn)
(let [computador (model/novo-produto "Computador Novo", "/computador-novo", 2500.10M)
celular (model/novo-p... | |
690364ebf189d1d9e8b2e63b131b79e412f62125c9f7f634d1e75b065ea16614 | dreixel/syb | Schemes.hs | # LANGUAGE RankNTypes , ScopedTypeVariables , CPP #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Generics.Schemes
Copyright : ( c ) The University of Glasgow , CWI 2001 - -2003
-- License : BSD-style (see the LICENSE file)
--
Maintainer :
-... | null | https://raw.githubusercontent.com/dreixel/syb/f741a437f18768f71586eeb47ffb43c0915f331b/src/Data/Generics/Schemes.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Generics.Schemes
License : BSD-style (see the LICENSE file)
Stability : experimental
Portability : non-portable (local universal quantification)
- Generic programming in Haskell
See <>. The present module
... | # LANGUAGE RankNTypes , ScopedTypeVariables , CPP #
Copyright : ( c ) The University of Glasgow , CWI 2001 - -2003
Maintainer :
module Data.Generics.Schemes (
everywhere,
everywhere',
everywhereBut,
everywhereM,
somewhere,
everything,
everythingBut... |
9b9005c858353b2b4e837d28e7bb80facca00c05b949e4cb2152a03237cc136d | jkvor/redo | redo_uri.erl | Copyright ( c ) 2011 < >
%%
%% Permission is hereby granted, free of charge, to any person
%% obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
%% restriction, including without limitation the rights to use,
%% copy, modify, merge, publis... | null | https://raw.githubusercontent.com/jkvor/redo/7c7eaef4cd65271e2fc4ea88587e848407cf0762/src/redo_uri.erl | erlang |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the following
condi... | Copyright ( c ) 2011 < >
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
-module(redo_uri).
-export([p... |
468ad1214eceb833555c065d09987d3232dd22cfbec8636f83235cc2637a938e | AppMini/todoMini | dev.cljs | (ns ^:figwheel-no-load omgnata.dev
(:require [omgnata.core :as core]
[figwheel.client :as figwheel :include-macros true]))
(enable-console-print!)
(figwheel/watch-and-reload
:websocket-url "ws:3449/figwheel-ws"
:jsload-callback core/mount-root)
(core/init!)
| null | https://raw.githubusercontent.com/AppMini/todoMini/0c0d67b4f9ed173e6c1a5c68ca7f9fb7a570a162/env/dev/cljs/omgnata/dev.cljs | clojure | (ns ^:figwheel-no-load omgnata.dev
(:require [omgnata.core :as core]
[figwheel.client :as figwheel :include-macros true]))
(enable-console-print!)
(figwheel/watch-and-reload
:websocket-url "ws:3449/figwheel-ws"
:jsload-callback core/mount-root)
(core/init!)
| |
37a6a5db7b82e989e789fd0b4689f66596fccf55ed25c39e9e993aae64d01469 | charlieg/Sparser | menu-data.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1994 - 1996 -- all rights reserved
;;;
;;; File: "menu data"
;;; Module: "interface;corpus:"
Version : 0.4 January 1996
initiated 1/25/94 v2.3 . 3/10 added Earnings reports , Tipster test articles
;; product anno... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/interface/corpus/menu-data.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "menu data"
Module: "interface;corpus:"
product announcements.
We spell out here which document streams should go onto the corpus menu
and in what order.
read by Create-the-corpus-menu. The organization is a hierarchy
where only t... | copyright ( c ) 1994 - 1996 -- all rights reserved
Version : 0.4 January 1996
initiated 1/25/94 v2.3 . 3/10 added Earnings reports , Tipster test articles
0.1 ( 5/10 ) put in feature test to ensure a fit to what 's available
0.2 ( 9/12 ) fixed the use of the feature
( 8/9/95 ) removed the ' 1... |
3fba54aed0dab0e8a96d2f8f3feacf85076717e4b67525582d67e25490219015 | fujita-y/digamma | apropos.scm | #!nobacktrace
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
;;; See LICENSE file for terms and conditions of use.
(library (digamma apropos)
(export apropos)
(import (core) (digamma pregexp))
(define parse-library-name
(lambda (name)
(define infix #\.)
(let ((i... | null | https://raw.githubusercontent.com/fujita-y/digamma/58cccd77bd2c208ec58d3cd634cbe65e32b3c7ec/sitelib/digamma/apropos.scm | scheme | See LICENSE file for terms and conditions of use.
[end] | #!nobacktrace
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
(library (digamma apropos)
(export apropos)
(import (core) (digamma pregexp))
(define parse-library-name
(lambda (name)
(define infix #\.)
(let ((in (make-string-input-port (symbol->string name)))
... |
81914c1822b516c1b407057a8f7e2e9611096e94f94955715e44ff9aebb8ff40 | ocaml-flambda/ocaml-jst | locations_test.ml | (* TEST
flags = "-dparsetree"
* toplevel *)
(* Using a toplevel test and not an expect test, because the locs get shifted
by the expect blocks and the output is therefore not stable. *)
(* Attributes *)
module type S = sig end [@attr payload];;
module M = struct end [@attr payload];;
type t = int [@attr ... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/testsuite/tests/parsetree/locations_test.ml | ocaml | TEST
flags = "-dparsetree"
* toplevel
Using a toplevel test and not an expect test, because the locs get shifted
by the expect blocks and the output is therefore not stable.
Attributes
with type
Constrained bindings
Punning.
Local open
Indexing operators
some prerequisites.
the actual issue ... |
module type S = sig end [@attr payload];;
module M = struct end [@attr payload];;
type t = int [@attr payload];;
3 [@attr payload];;
exception Exn [@@attr payload];;
Functors
module type F = functor (A : S) (B : S) -> sig end;;
module F = functor (A : S) (B : S) -> struct end;;
module type S1 = sig type ... |
176d89dbe9a57dcbd792ece9372fb251a4cccf37cfcff78b4e7a25a81f9c48f1 | cl-axon/shop2 | decls.lisp | -*- Mode : common - lisp ; package : shop2 ; -*-
;;;
Version : MPL 1.1 / GPL 2.0 / LGPL 2.1
;;;
The contents of this file are subject to the Mozilla Public License
;;; Version 1.1 (the "License"); you may not use this file except in
;;; compliance with the License. You may obtain a copy of the License at
;;; /
;;... | null | https://raw.githubusercontent.com/cl-axon/shop2/9136e51f7845b46232cc17ca3618f515ddcf2787/decls.lisp | lisp | package : shop2 ; -*-
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations under
the Lic... | Version : MPL 1.1 / GPL 2.0 / LGPL 2.1
The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is SHOP2 .
The Initial Developer of the Original Code is the University of
Maryland . Portions created by the Ini... |
8aebfd64812d9b7807a07e0c56c5cdf4fd435b8def3e12637ea19f2869c5aff3 | daveyarwood/alda-clj | shell.clj | (ns ^:no-doc alda.shell
(:require [me.raynes.conch.low-level :as conch])
(:import [java.io ByteArrayOutputStream PrintWriter Writer]))
(defn multi-writer-with-autoflush
"Given a seq of Writers, returns a single Writer that writes the same output
to all of them. Output is flushed automatically on every write.
... | null | https://raw.githubusercontent.com/daveyarwood/alda-clj/25b0d21affc0ded046af80b8f0324de875bacfcf/src/alda/shell.clj | clojure | do multiple overloads of the same arity. This isn't great, but I guess it's
alright because you can still accomplish whatever you need to do by using
the overloads I kept.
(append [^char c]
(run! #(.append % c)))
([^char c]
(run! #(.write % c) writers)))))
Ensure that all of the output is written to `out-cop... | (ns ^:no-doc alda.shell
(:require [me.raynes.conch.low-level :as conch])
(:import [java.io ByteArrayOutputStream PrintWriter Writer]))
(defn multi-writer-with-autoflush
"Given a seq of Writers, returns a single Writer that writes the same output
to all of them. Output is flushed automatically on every write.
... |
fa5169fd2fa0b50f032f035b15a7cc91b247000bcad91bd3d9a7ae45514ec1a7 | Eduap-com/WordMat | ddot.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/odepack/src/ddot.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl6.l , v 1d5cbacbb9... |
4b347eec17a91339e5ab29ddc4cb268cf9290255fa3bf5f85a31d4990b736dc6 | facebook/pyre-check | indexTracker.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/98b8362ffa5c715c708676c1a37a52647ce79fe0/source/analysis/indexTracker.ml | ocaml | TODO(T132410158) Add a module-level doc comment.
Successfully claimed the id
Because we seal the type, we can be sure this will always succeed |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
8a73ea76bf69a34a6b2e291a0f68d838046900a90dd6e75004e646e3ea84c9e2 | UCSD-PL/refscript | Module.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFoldable #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances... | null | https://raw.githubusercontent.com/UCSD-PL/refscript/884306fef72248ac41ecdbb928bbd7b06ca71bd4/src/Language/Rsc/Pretty/Module.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveTraversable #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE UndecidableInstances # | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE IncoherentInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE TupleSections #
... |
cd2b45294bbd9db5fe9b8e1924dcd1116cf806dac97f324d9ce7baac4d50587c | kmonad/kmonad | Button.hs | |
Module : KMonad . Model . Button
Description : How buttons work
Copyright : ( c ) , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : portable
A button contains 2 actions , one to perform on press , and another to perform on
release . This module contains ... | null | https://raw.githubusercontent.com/kmonad/kmonad/3413f1be996142c8ef4f36e246776a6df7175979/src/KMonad/Model/Button.hs | haskell | * Button basics
$but
* Simple buttons
$simple
* Button combinators
$combinators
------------------------------------------------------------------------------
$but
'Press' and another on 'Release'.
registered from the OS, and another when a release is registered.
^ Action to take when pressed
^ Action to ta... | |
Module : KMonad . Model . Button
Description : How buttons work
Copyright : ( c ) , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : portable
A button contains 2 actions , one to perform on press , and another to perform on
release . This module contains ... |
a9c1c05ec536e2f0c021b60bfa5fd4448d36b39e5578c45aec33036939082826 | furkan3ayraktar/clojure-polylith-realworld-example-app | interface.clj | (ns clojure.realworld.comment.interface
(:require [clojure.realworld.comment.core :as core]))
(defn article-comments [auth-user slug]
(core/article-comments auth-user slug))
(defn add-comment! [auth-user slug comment]
(core/add-comment! auth-user slug comment))
(defn delete-comment! [auth-user id]
(core/dele... | null | https://raw.githubusercontent.com/furkan3ayraktar/clojure-polylith-realworld-example-app/2f16552fb4e9a56e24e21795cbb038433085453c/components/comment/src/clojure/realworld/comment/interface.clj | clojure | (ns clojure.realworld.comment.interface
(:require [clojure.realworld.comment.core :as core]))
(defn article-comments [auth-user slug]
(core/article-comments auth-user slug))
(defn add-comment! [auth-user slug comment]
(core/add-comment! auth-user slug comment))
(defn delete-comment! [auth-user id]
(core/dele... | |
6ee11560d9c37331208e8473aeea46f036c554f00bbcd7f9e42f4e23227ff479 | jacius/lispbuilder | gfx-library.lisp | ;;; -*- lisp -*-
(in-package #:lispbuilder-sdl-cffi)
cffi : foreign - library - loaded - p is not yet in the released version of CFFI
;;(defparameter *image-loaded-p* (cffi:foreign-library-loaded-p 'sdl-image))
(defparameter *gfx-loaded-p* nil)
(cffi:define-foreign-library sdl-gfx
(:darwin (:or "libSDL_gfx.dyli... | null | https://raw.githubusercontent.com/jacius/lispbuilder/e693651b95f6818e3cab70f0074af9f9511584c3/lispbuilder-sdl/sdl-gfx/gfx-library.lisp | lisp | -*- lisp -*-
(defparameter *image-loaded-p* (cffi:foreign-library-loaded-p 'sdl-image)) |
(in-package #:lispbuilder-sdl-cffi)
cffi : foreign - library - loaded - p is not yet in the released version of CFFI
(defparameter *gfx-loaded-p* nil)
(cffi:define-foreign-library sdl-gfx
(:darwin (:or "libSDL_gfx.dylib" (:framework "SDL_gfx")))
(:windows "SDL_gfx.dll")
(:unix (:or "libSDL_gfx"
"libS... |
594c9a8dd2fd676618b0babce840190a420632b01436a0d256030d321f8af3d2 | eliaslfox/language-elm | Declaration.hs | {-# OPTIONS_HADDOCK prune #-}
{-# OPTIONS_GHC -Wall -Werror #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Safe #-}
-- | Top level declerations
module Elm.Declaration where
import Elm.Classes
import Elm.Expression
import Elm.Type
import Text.PrettyPrint
-- | ... | null | https://raw.githubusercontent.com/eliaslfox/language-elm/df39d2fc4d14f3d4431411ca5eb030a887c4eb6b/src/Elm/Declaration.hs | haskell | # OPTIONS_HADDOCK prune #
# OPTIONS_GHC -Wall -Werror #
# LANGUAGE OverloadedStrings #
# LANGUAGE Safe #
| Top level declerations
| Used to declare functions, variables, and types
| Declare a function
| Declare a type
| Declare a type alias |
module Elm.Declaration where
import Elm.Classes
import Elm.Expression
import Elm.Type
import Text.PrettyPrint
data Dec
= Dec String TypeDec [Expr] Expr
| DecType String [String] [(String, [TypeDec])]
| DecTypeAlias String [String] TypeDec
instance Generate Dec whe... |
ccabae07f0295bf3f1eafda5fec3c5e49cec1b32fa65f5de07f5576bff093019 | jguhlin/ODG | annotation.clj | (ns odg.annotation
(:import (org.neo4j.graphdb Transaction)
(org.neo4j.unsafe.batchinsert BatchInserterIndex))
(:require clojure.java.io
clojure.string
[clojure.core.reducers :as r]
[odg.util :as util]
[odg.db :as db]
[biotools.gff :as gff]
... | null | https://raw.githubusercontent.com/jguhlin/ODG/c8a09f273c278ba7b3acbd37155477979f8b4851/src/odg/annotation.clj | clojure | Need to make individual get-gene-node type fn's return a promise and be put into a fiber
so that nothing gets held up and no fiber is allowed to go for too long..
reminder for debugging
Should always be overwritten by passed arguments
Create the gene entry
(batch/create-rel transcript exon (:PARENT_OF db/rels))
U... | (ns odg.annotation
(:import (org.neo4j.graphdb Transaction)
(org.neo4j.unsafe.batchinsert BatchInserterIndex))
(:require clojure.java.io
clojure.string
[clojure.core.reducers :as r]
[odg.util :as util]
[odg.db :as db]
[biotools.gff :as gff]
... |
fbd9f8df493c6fdff036b4dde1b322bf57b4e28aa3718deec98405add972d75f | aggelgian/erlang-algorithms | a_star_demo.erl | -module(a_star_demo).
-export([b1/0, dump_vertex/1]).
%% The representation of a vertex.
-type my_vertex() :: {integer(), integer()}.
-spec b1() -> ok.
b1() ->
File = ?DEMO_DATA ++ "/board1.txt",
Heurestic underestimate function
F = fun({X1, Y1}, {X2, Y2}) -> abs(X1 - X2) + abs(Y1 - Y2) end,
G = graph:import(... | null | https://raw.githubusercontent.com/aggelgian/erlang-algorithms/8ceee72146f2a6eff70a16e3e9a74d2ed072fa0a/demo/src/a_star_demo.erl | erlang | The representation of a vertex.
Parses the string that holds a vertex.
Dumps a vertex to a string. | -module(a_star_demo).
-export([b1/0, dump_vertex/1]).
-type my_vertex() :: {integer(), integer()}.
-spec b1() -> ok.
b1() ->
File = ?DEMO_DATA ++ "/board1.txt",
Heurestic underestimate function
F = fun({X1, Y1}, {X2, Y2}) -> abs(X1 - X2) + abs(Y1 - Y2) end,
G = graph:import(File, fun parse_vertex/1),
{Cost,... |
de72437c0bb8d205f305910871b5146627c86b565e1790b1b0f8170846796b2c | binsec/binsec | simplification_dba_prog.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/22ee39aad58219e8837b6ba15f150ba04a498b63/src/disasm/simplify/simplification_dba_prog.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
5c3c81f81c94473804fe334bb06593ea197bcba50e1f6cf823d0ef62d3cf12a1 | francescoc/scalabilitywitherlangotp | mutex.erl | -module(mutex).
-export([start_link/1, start_link/2, init/3, stop/1]).
-export([wait/1, signal/1]).
-export([system_continue/3, system_terminate/4]).
wait(Name) ->
Name ! {wait,self()},
Mutex = whereis(Name),
receive
{Mutex,ok} -> ok
end.
signal(Name) ->
Name ! {signal,self()},
ok.
star... | null | https://raw.githubusercontent.com/francescoc/scalabilitywitherlangotp/961de968f034e55eba22eea9a368fe9f47c608cc/ch10/mutex.erl | erlang | The user requests.
The system messages.
The system messages. | -module(mutex).
-export([start_link/1, start_link/2, init/3, stop/1]).
-export([wait/1, signal/1]).
-export([system_continue/3, system_terminate/4]).
wait(Name) ->
Name ! {wait,self()},
Mutex = whereis(Name),
receive
{Mutex,ok} -> ok
end.
signal(Name) ->
Name ! {signal,self()},
ok.
star... |
7030955cb365353c48d2af6126a746ca766e59e875f95fbcc129fa06c2d7d2c1 | BartoszMilewski/AoC2021 | Day5.hs | module Day5 where
import Data.List
import Data.Tuple
import Data.List.Split
import qualified Data.Set as S
type Point = (Int, Int)
type Segment = (Point, Point)
type Vector = (Int, Int)
start, end :: Segment -> Point
start = fst
end = snd
minus :: Point -> Point -> Vector
minus pend pbeg = (fst pend - fst pbeg, s... | null | https://raw.githubusercontent.com/BartoszMilewski/AoC2021/3065f8b34110c417c646d6116ac20b3ef4e077c0/Day5.hs | haskell | Assume all segments
are either horizontal, vertical, or diagonal
Line is: starting point, direction, steps | module Day5 where
import Data.List
import Data.Tuple
import Data.List.Split
import qualified Data.Set as S
type Point = (Int, Int)
type Segment = (Point, Point)
type Vector = (Int, Int)
start, end :: Segment -> Point
start = fst
end = snd
minus :: Point -> Point -> Vector
minus pend pbeg = (fst pend - fst pbeg, s... |
63285facb58fb5ce132f8f16c771f60b6ce2ab23af6b0ccf7099ef54bfa8dd26 | clojure-lsp/clojure-lsp | a.clj | (ns sample-test.api.diagnostics.a)
some-unknown-var
| null | https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/fe232a719707258ee53d72bf44166d5149e6ee0b/cli/integration-test/sample-test/src/sample_test/api/diagnostics/a.clj | clojure | (ns sample-test.api.diagnostics.a)
some-unknown-var
| |
116603bea20a2d553b37e8e8298d298689730326c16e4db4ee5a219dce5b52b8 | ChrisPenner/grids | Coord.hs | # LANGUAGE DataKinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilyDependencies #
# LANGUAGE UndecidableInstances #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE AllowAmbiguo... | null | https://raw.githubusercontent.com/ChrisPenner/grids/619c72b1e51f96377845c2a15eb100d8f4185fa1/src/Data/Grid/Internal/Coord.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
| The index type for 'Grid's.
| Safely construct a 'Coord' for a given grid size, checking that all
indexes are in range
>
> Nothing
>
> Nothing
| Append two 'Coord's | # LANGUAGE DataKinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilyDependencies #
# LANGUAGE UndecidableInstances #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE Pat... |
d561595b23bab492ea6c9f4187ed33b7dd7d203a08062868c088d5cdf234a17b | ayazhafiz/plts | lib_fx_cap.ml | include Surface
open Util
type file = NoFile | Base of string
let make_file_from ext = function
| NoFile -> Filename.temp_file "asti" ("." ^ ext)
| Base s -> s ^ "." ^ ext
(* Driver *)
type phase = Parse | Solve | Ir | Eval
type emit = Print | Elab
let assoc_flip l = List.map (fun (a, b) -> (b, a)) l
let phase... | null | https://raw.githubusercontent.com/ayazhafiz/plts/6dfa9340457ec897ddf40a87feee44dd6200921a/fx_cap/lib_fx_cap.ml | ocaml | Driver
commands in the header
raw user input including commands and queries but before the output; we
need this for printing back
parse N queries on a single line
program ignoring commands and removing query lines
no queries, include this line
queries - return them and throw away the line
- 1 to mak... | include Surface
open Util
type file = NoFile | Base of string
let make_file_from ext = function
| NoFile -> Filename.temp_file "asti" ("." ^ ext)
| Base s -> s ^ "." ^ ext
type phase = Parse | Solve | Ir | Eval
type emit = Print | Elab
let assoc_flip l = List.map (fun (a, b) -> (b, a)) l
let phase_list =
[ (... |
5cc0ac91f1a85a1dd011012b605ea812d892e145c4acfa43df7bb54a1a4cb74d | aufishgrp/cowpaths | cowpaths.erl | %%%-------------------------------------------------------------------
%% @doc cowpaths API module.
%% @end
%%%-------------------------------------------------------------------
-module(cowpaths).
-include("cowpaths.hrl").
-include_lib("eunit/include/eunit.hrl").
%% API
-export([attach/1, attach/2, detach/1, get_path... | null | https://raw.githubusercontent.com/aufishgrp/cowpaths/04d2639eccd66183dccd45a457a4b69dc18acb56/src/cowpaths.erl | erlang | -------------------------------------------------------------------
@doc cowpaths API module.
@end
-------------------------------------------------------------------
API
If the app has previously attached the existing rules are overwritten.
@end
If the app has previously attached the existing rules are... | -module(cowpaths).
-include("cowpaths.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([attach/1, attach/2, detach/1, get_paths/0]).
-spec attach(Cowpaths :: cowpaths_types:cowpaths()) -> ok.
@doc Updates the routes tables with the specified Routes for App .
attach(Cowpaths) ->
attach(application:get_applic... |
a0b402362f2e5e22ee23953a16b08747f65c95661db7f55bff09cc6967076a0b | status-im/status-electron | storage.cljs | (ns status-desktop-front.storage
(:require [alandipert.storage-atom :refer [local-storage]]
[status-im.data-store.messages :as data-store.messages]
[status-im.utils.random :as random]
[status-im.constants :as constants]))
;;;; ACCOUNTS
;; I would love to have something similar in ... | null | https://raw.githubusercontent.com/status-im/status-electron/aad18c34c0ee0304071e984f21d5622735ec5bef/src_front/status_desktop_front/storage.cljs | clojure | ACCOUNTS
I would love to have something similar in status-react instead realm
CONTACTS
CHAT
MESSAGE
TODO yeah i know i know | (ns status-desktop-front.storage
(:require [alandipert.storage-atom :refer [local-storage]]
[status-im.data-store.messages :as data-store.messages]
[status-im.utils.random :as random]
[status-im.constants :as constants]))
(def accounts (local-storage (atom []) :accounts))
(def acc... |
22aff5b069ee4b8876a50121918f6174811b10d2f3cee94e12622adc0a4dce16 | marinacavalari/databricks-sdk-clojure | core_test.clj | (ns databricks-sdk-clojure.core-test
(:require
[clojure.test :refer :all]
[databricks-sdk.core :as sdk]
[org.httpkit.client :as http]))
(defn success-clusters-list-response [test-function]
(future
{:body "{\"clusters\":[{\"cluster_id\":\"123\"}]}"
:status 200}))
(defn success-cluster-response [t... | null | https://raw.githubusercontent.com/marinacavalari/databricks-sdk-clojure/dc78733a1bf2388888840f0b3f5617042666ee67/test/databricks_sdk_clojure/core_test.clj | clojure | (ns databricks-sdk-clojure.core-test
(:require
[clojure.test :refer :all]
[databricks-sdk.core :as sdk]
[org.httpkit.client :as http]))
(defn success-clusters-list-response [test-function]
(future
{:body "{\"clusters\":[{\"cluster_id\":\"123\"}]}"
:status 200}))
(defn success-cluster-response [t... | |
6e5ef4f11a1ebeb898ae03894bc620116341a3c5b1a84ea247c352f6b35c0175 | herd/herdtools7 | KBarrier.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/67dcc89f3df8692158869b64868cf847bdd764da/litmus/KBarrier.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2017 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
c5fccd852e501e04261e0f332171f5b6701191d15e41fa8244b93ea3036bf52e | google/ormolu | Preprocess.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
-- | Preprocessing for input source code.
module Ormolu.Processing.Preprocess
( preprocess,
)
where
import Control.Monad
import Data.Char (isSpace)
import qualified Data.List as L
import Data.Maybe (isJust, maybeToList)
import Fast... | null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/src/Ormolu/Processing/Preprocess.hs | haskell | # LANGUAGE BangPatterns #
| Preprocessing for input source code.
| Transform given input possibly returning comments extracted from it.
| File name, just to use in the spans
| Input to process
| Region deltas
| Literal prefix, pre-processed input, literal suffix, extra comments
| Transform a given line possibly ... | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
module Ormolu.Processing.Preprocess
( preprocess,
)
where
import Control.Monad
import Data.Char (isSpace)
import qualified Data.List as L
import Data.Maybe (isJust, maybeToList)
import FastString
import Ormolu.Config (RegionDeltas (..))
import Ormolu.Parser.She... |
61f6ba36651ce7724bf52b3ecaad5741e3c678b4e0a3a3c398875ff7ab57e2ea | Hazelfire/pedant | TypeCheck.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
| TypeChecker for .
module Pedant.TypeCheck
( TypeEnv (..),
typeCheck,
TypeError (..),
emptyTypeCheckState,
TypeCheckState (..),
VariableName (..),
)
where
import Control.Monad.Except
import Control.Monad.State hiding (state)... | null | https://raw.githubusercontent.com/Hazelfire/pedant/3c23572731a069691409da1264042664f6969349/src/Pedant/TypeCheck.hs | haskell | # LANGUAGE OverloadedStrings #
| The state of the type checker
| The environment of the checker. This contains references to all the variables and schemes of those variables currently declared.
| Substitutions, the current substitutions that are required for the expression to unify
| Units, the units currently decl... | # LANGUAGE FlexibleInstances #
| TypeChecker for .
module Pedant.TypeCheck
( TypeEnv (..),
typeCheck,
TypeError (..),
emptyTypeCheckState,
TypeCheckState (..),
VariableName (..),
)
where
import Control.Monad.Except
import Control.Monad.State hiding (state)
import qualified Data.Bifunctor
im... |
9076d787eca6e687dd9f5c616baeb0e1507ad3ccaecf280d59ecb735140b5864 | lmj/lparallel | cons-queue.lisp | Copyright ( c ) 2011 - 2013 , . All rights reserved .
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this li... | null | https://raw.githubusercontent.com/lmj/lparallel/9c11f40018155a472c540b63684049acc9b36e15/src/cons-queue.lisp | lisp |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary... | Copyright ( c ) 2011 - 2013 , . All rights reserved .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY... |
8fb310c455e2aaa9542b2b6755aa8013ef8505784a17f4d530834840607f44b3 | alura-cursos/datomic-introducao | project.clj | (defproject ecommerce "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.0"]
[com.datomic/datomic-pro "0.9.5951"]]
:repl-options {:init... | null | https://raw.githubusercontent.com/alura-cursos/datomic-introducao/cfb214135fed0670ee90090b63a38d8287673ac6/aula1.2/ecommerce/project.clj | clojure | (defproject ecommerce "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.0"]
[com.datomic/datomic-pro "0.9.5951"]]
:repl-options {:init... | |
ab6d7e513d7a2234aa18334313845fc0a1c272e68609a33ef8652939d535ccc2 | RedPRL/algaett | EmojiToken.ml | [@@@warning "-39"] (* the preprocessor sometimes generates useless 'rec' *)
open Earley_core
module StringSet = Set.Make (String)
module EmojiSet =
struct
let all = StringSet.of_list Emoji.all_emojis
let question_mark = StringSet.of_list Emoji.[
exclamation_question_mark;
red_question_mark;
wh... | null | https://raw.githubusercontent.com/RedPRL/algaett/5685e49608aaf230f5691f3e339cd2bd3acb6ec9/src/parser/EmojiToken.ml | ocaml | the preprocessor sometimes generates useless 'rec'
Keycap Asterisk
to_rev_seq is used so that skin tones will definitely be consumed |
open Earley_core
module StringSet = Set.Make (String)
module EmojiSet =
struct
let all = StringSet.of_list Emoji.all_emojis
let question_mark = StringSet.of_list Emoji.[
exclamation_question_mark;
red_question_mark;
white_question_mark;
]
let sep = StringSet.of_list Emoji.[
small_o... |
e9972488a7e8d2e489cf4ae09f85362fa0198870eb170d522523a492a1616d13 | crategus/cl-cffi-gtk | gio.permission.lisp | ;;; ----------------------------------------------------------------------------
gio.permission.lisp
;;;
;;; The documentation of this file is taken from the GIO Reference Manual
Version 2.68 and modified to document the Lisp binding to the GIO library .
;;; See <>. The API documentation of the Lisp binding is
av... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/gio/gio.permission.lisp | lisp | ----------------------------------------------------------------------------
The documentation of this file is taken from the GIO Reference Manual
See <>. The API documentation of the Lisp binding is
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser Genera... | gio.permission.lisp
Version 2.68 and modified to document the Lisp binding to the GIO library .
available from < -cffi-gtk/ > .
Copyright ( C ) 2021
as published by the Free Software Foundation , either version 3 of the
the GNU Lesser General Public License that clarifies the terms for use
GNU Lesser Ge... |
655a43f89a43dd30e8f3ff034d09f2f073404c2ad10847d77427fe69bf4ed353 | OCamlPro/ez_api | test_cookie_client.ml | open Test_session_lib
open Types
open EzAPI.TYPES
module Service = Services
(* Request implementation that REQUIRES with_crefentials to be always true
(to use cookies, that is necessarily)*)
module Client = Cohttp_lwt_jsoo.Make_client_async (struct
let chunked_response = true
let chunk_size = 128 * 1024
let... | null | https://raw.githubusercontent.com/OCamlPro/ez_api/c2a11a6cc250e82738939ce55ae76503a9299198/test/session/test_cookie_client.ml | ocaml | Request implementation that REQUIRES with_crefentials to be always true
(to use cookies, that is necessarily) | open Test_session_lib
open Types
open EzAPI.TYPES
module Service = Services
module Client = Cohttp_lwt_jsoo.Make_client_async (struct
let chunked_response = true
let chunk_size = 128 * 1024
let convert_body_string = Js_of_ocaml.Js.to_bytestring
let with_credentials = true
end)
module Base = EzCohttp_base.M... |
70ac18414fa6da937e3856c69886cfffc44f0e0c35fb83e1e35c42ab92fccd6e | fizruk/rzk | TypeError.hs | {-# LANGUAGE DeriveFunctor #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Rzk.Free.TypeCheck.TypeError where
import Bound
import Data.String
import Data.Text.Prettyprint.Doc
import Rzk.Free.Bound.Name
import Rzk.Free.Pretty
import ... | null | https://raw.githubusercontent.com/fizruk/rzk/502eb7655655d8fe1be8f4fa2561464141b01e2e/rzk/src/Rzk/Free/TypeCheck/TypeError.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE OverloadedStrings #
instance (Pretty b, Pretty a, IsString b) => Pretty (TypeError b a) where
ppTypeError = \case
[ "Can't construct infinite type " <> pretty x <> " ~ " <> ppTerm t ]
[ "Expected type"
, " " <> ppTerm expected
, "but inferred"
, " ... | # LANGUAGE LambdaCase #
module Rzk.Free.TypeCheck.TypeError where
import Bound
import Data.String
import Data.Text.Prettyprint.Doc
import Rzk.Free.Bound.Name
import Rzk.Free.Pretty
import Rzk.Free.Syntax.Term
data TypeError b a
= TypeErrorUnexpect... |
485ffe16e007d99029b9e3a378259a1bd34aae827061bf949e3b3d61e55471fb | jbclements/molis-hai | extract-crime-and-punishment-text.rkt | #lang racket
(require (planet neil/html-parsing)
racket/runtime-path
sxml/sxpath
rackunit)
(define-runtime-path here ".")
(define cp-sxml
(call-with-input-file (build-path here "crime-and-punishment.html")
(lambda (port)
(html->xexp
(reencode-input-port port "windows-125... | null | https://raw.githubusercontent.com/jbclements/molis-hai/6a335ec73c144f9d8ac538752ca8e6fd0b3b3cce/molis-hai/experimental/extract-crime-and-punishment-text.rkt | racket | truncate after n elements (calling to-dotted on each one),
inserting '... , otherwise leave alone
remove elements after the nth of each list
flatten a 'dd'. Return a list of hopefully-strings
problematic paragraphs contain these search strings:
flatten certain HTML forms into a list of strings OR the symbol
'thi... | #lang racket
(require (planet neil/html-parsing)
racket/runtime-path
sxml/sxpath
rackunit)
(define-runtime-path here ".")
(define cp-sxml
(call-with-input-file (build-path here "crime-and-punishment.html")
(lambda (port)
(html->xexp
(reencode-input-port port "windows-125... |
a68a08d6b4c4bdf8e36b505ede603cdd7266f0c3acc5f6e34b704bed5df26818 | solita/solita-rooms | chrome_test.clj | (ns rooms.chrome-test
(:require [clojure.test :refer [deftest]]
[clj-chrome-devtools.cljs.test :refer [build-and-test]]))
(deftest chrome-test
(build-and-test "test"
'[rooms.domain.room-test])) | null | https://raw.githubusercontent.com/solita/solita-rooms/39eec90790a3fba36dbbccb3b3e86394a987a840/frontend/test/clj/rooms/chrome_test.clj | clojure | (ns rooms.chrome-test
(:require [clojure.test :refer [deftest]]
[clj-chrome-devtools.cljs.test :refer [build-and-test]]))
(deftest chrome-test
(build-and-test "test"
'[rooms.domain.room-test])) | |
cb19b1b36b0157cc3aadddf8579ac4dc8790fe30657a48de34efb81ecc972748 | e-bigmoon/haskell-blog | Sharing_the_Manager_concurrently.hs | #!/usr/bin/env stack
-- stack script --resolver lts-17.3
{-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent.Async (Concurrently (..))
import Data.Foldable (sequenceA_)
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import qualified Data.Conduit... | null | https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/appendix/ap4/Sharing_the_Manager_concurrently.hs | haskell | stack script --resolver lts-17.3
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
import Control.Concurrent.Async (Concurrently (..))
import Data.Foldable (sequenceA_)
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import qualified Data.Conduit.List as CL
import Text.HTML.DOM
import Data.... |
75e561202be3e1225ba45dee8c5d3d557678315f800a33af88bdc533c71269df | lem-project/lem | socket.lisp | (defpackage :lem-socket-utils
(:use :cl)
(:import-from :usocket)
(:export :port-available-p
:random-available-port)
#+sbcl
(:lock t))
(in-package :lem-socket-utils)
(defconstant +private-port-min+ 49152)
(defconstant +private-port-max+ 65535)
(defun port-available-p (port)
(let (socket)
(un... | null | https://raw.githubusercontent.com/lem-project/lem/00fca190625bab602e9dd85bc23b9a2c6fb2e541/lib/socket-utils/socket.lisp | lisp | (defpackage :lem-socket-utils
(:use :cl)
(:import-from :usocket)
(:export :port-available-p
:random-available-port)
#+sbcl
(:lock t))
(in-package :lem-socket-utils)
(defconstant +private-port-min+ 49152)
(defconstant +private-port-max+ 65535)
(defun port-available-p (port)
(let (socket)
(un... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.