_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 |
|---|---|---|---|---|---|---|---|---|
c96221a948ba7d401fb137727c24c3bae1b74e58cf056df22bdd87818418b9a4 | screenshotbot/screenshotbot-oss | http-cache.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(defpackage :util/http-cache
(:use #:cl)
(:export
#:http-cache
#:parse-max-... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/89d5988bce9bf6610a429a50d205d07d6f66545c/src/util/http-cache.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
Sometimes you'll see things like 30s | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(defpackage :util/http-cache
(:use #:cl)
(:export
#:http-cache
#:parse-max-age))
(in-package :util/http-cache)
(defclass http-cache ... |
0c7e75da7932152f917efa935f0cfa5460c2c12cbee54fce61ec6054b04d6bfb | futurice/haskell-mega-repo | Timereport.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeFamilies #
-- |
Copyright : ( c ) 2015 Futurice Oy
-- License : BSD3
Maintainer : < >
module PlanMill... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/e301c08c8dfdcca048fe82fecce6bb2d02e9558a/planmill-client/src/PlanMill/Types/Timereport.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
|
License : BSD3
TODO: can this be not Maybe?
^ The ''UTCTime' would be more precise, but we care about day more
sometimes amount can be Null :/
| Type used to create new timereports
, ntrDutyType :: !Int
, "dutyType" .= ntrDutyType
| Type... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
Copyright : ( c ) 2015 Futurice Oy
Maintainer : < >
module PlanMill.Types.Timereport (
Timereport(..),
Timereports,
TimereportId,
NewTimereport(..),
E... |
574d6ebd9594b87d44f7cf3b6eef6a57ebbe5ee8ee15bdd46bd19a72f9ec6ed0 | oreillymedia/etudes-for-erlang | dijkstra.erl | %% @author J D Eisenberg <>
@doc Recursive function for calculating GCD
of two numbers using Dijkstra 's algorithm .
2013 J D Eisenberg
%% @version 0.1
-module(dijkstra).
-export([gcd/2]).
@doc Calculates the greatest common divisor of two
integers . Uses Dijkstra 's algorithm , which does not
%% require a... | null | https://raw.githubusercontent.com/oreillymedia/etudes-for-erlang/07200372503a8819f9fcc2856f8cb82451be7b48/code/ch04-02/dijkstra.erl | erlang | @author J D Eisenberg <>
@version 0.1
require any division. | @doc Recursive function for calculating GCD
of two numbers using Dijkstra 's algorithm .
2013 J D Eisenberg
-module(dijkstra).
-export([gcd/2]).
@doc Calculates the greatest common divisor of two
integers . Uses Dijkstra 's algorithm , which does not
-spec(gcd(number(), number()) -> number()).
gcd(M, N) ... |
17c9b3282f4e797772189f8130008073dcc49211444f09cd55417e8ae0457379 | giorgidze/Hydra | BreakingPendulum.hs | {-# LANGUAGE QuasiQuotes, GADTs #-}
module Main where
import Hydra
import Hydra.Solver.Sundials
type Coordinate = (Double,Double)
type Velocity = (Double,Double)
type Body = (Coordinate,Velocity)
g :: Double
g = 9.81
freeFall :: Body -> SR Body
freeFall ((x0,y0),(vx0,vy0)) = [rel| ((x,y),(vx,vy)) ->
init (x,y)... | null | https://raw.githubusercontent.com/giorgidze/Hydra/e5b59d0baff27f06368caeb1e9860f1395913ca5/examples/BreakingPendulum.hs | haskell | # LANGUAGE QuasiQuotes, GADTs # |
module Main where
import Hydra
import Hydra.Solver.Sundials
type Coordinate = (Double,Double)
type Velocity = (Double,Double)
type Body = (Coordinate,Velocity)
g :: Double
g = 9.81
freeFall :: Body -> SR Body
freeFall ((x0,y0),(vx0,vy0)) = [rel| ((x,y),(vx,vy)) ->
init (x,y) = ($x0$,$y0$)
init (vx,vy) = (... |
589a691ed5f332e1bb5fff29ecbfa40e834598d214ff665cda90fab9f5a008dd | HaskellCNOrg/snap-web | Topic.hs | # LANGUAGE ExtendedDefaultRules #
{-# LANGUAGE OverloadedStrings #-}
module Controllers.Topic
( routes
, renderTopicDetailPage
, redirectTopicDetailPage ) where
import Control.Monad
import Control.Monad.CatchIO (throw, try)
import Control.Monad.Trans
import qualif... | null | https://raw.githubusercontent.com/HaskellCNOrg/snap-web/f104fd9b8fc5ae74fc7b8002f0eb3f182a61529e/src/Controllers/Topic.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
| READ: the similarity is a little bit trick because of
therefore it could be /topic or /topicput/topic base last URL.
save new topic
view a topic
show detail for editing
save editing chan... | # LANGUAGE ExtendedDefaultRules #
module Controllers.Topic
( routes
, renderTopicDetailPage
, redirectTopicDetailPage ) where
import Control.Monad
import Control.Monad.CatchIO (throw, try)
import Control.Monad.Trans
import qualified Data.ByteString as BS
import... |
928b6c331756c0893faab40e483496a8df62c7be332d008e8f49750b0b08a2f3 | lspector/Clojush | pagie_hogeweg_with_erc.clj | ;; pagie_hogeweg.clj
;;
Pagie and Hogeweg 1997 : , : Evolutionary Consequences of Coevolving Targets .
Evolutionary Computation 5(4 ): 401 - 418 ( 1997 ) .
;;
, , 2011
(ns clojush.problems.regression.pagie-hogeweg-with-erc
(:use [clojush.pushgp.pushgp]
[clojush pushstate random interpreter])
... | null | https://raw.githubusercontent.com/lspector/Clojush/685b991535607cf942ae1500557171a0739982c3/src/clojush/problems/regression/pagie_hogeweg_with_erc.clj | clojure | pagie_hogeweg.clj
Range is exclusive on the end
Use all samples
If a sample set is used, then error reuse must be disabled | Pagie and Hogeweg 1997 : , : Evolutionary Consequences of Coevolving Targets .
Evolutionary Computation 5(4 ): 401 - 418 ( 1997 ) .
, , 2011
(ns clojush.problems.regression.pagie-hogeweg-with-erc
(:use [clojush.pushgp.pushgp]
[clojush pushstate random interpreter])
(:require [clojure.math.nume... |
9ed5fd48f3e2dea7c78f043622a460fd165d4e8a3bb76b01e43256c2bfed997b | fluentpython/lispy | chap8a.scm | $ I d : chap8a.scm , v 4.3 2006/11/24 18:41:17 queinnec Exp $
;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is part of the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
;;; Newest ve... | null | https://raw.githubusercontent.com/fluentpython/lispy/6b995c398e2d100fc3fc292e34ba1a00c0ae9b5a/references/LiSP-2ndEdition-2006Dec11/src/chap8a.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is part of the files that accompany the book:
Newest version may be retrieved from:
Check the README file before using this file.
(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
Modification of chap1.scm, i... | $ I d : chap8a.scm , v 4.3 2006/11/24 18:41:17 queinnec Exp $
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz
Programs of chapter 8 evaluation and reflection
(define (eva... |
d65ce4b60237d6f2ebf8d45c76f24c7ecb1cb841f7f02c5ce7c740bc82a44f76 | ofmooseandmen/jord | Length.hs | -- |
Module : Data . Geo . . Length
Copyright : ( c ) 2020
License : BSD3
Maintainer : < >
-- Stability: experimental
-- Portability: portable
--
-- Types and functions for working with (signed) lengths in metres, kilometres, nautical miles or feet.
--
-- In order to use this module you ... | null | https://raw.githubusercontent.com/ofmooseandmen/jord/9acd8d9aec817ce05de6ed1d78e025437e1193bf/src/Data/Geo/Jord/Length.hs | haskell | |
Stability: experimental
Portability: portable
Types and functions for working with (signed) lengths in metres, kilometres, nautical miles or feet.
In order to use this module you should start with the following imports:
@
@
* The 'Length' type
* Smart constructors
* Read
* Conversions
* Misc
| See ... | Module : Data . Geo . . Length
Copyright : ( c ) 2020
License : BSD3
Maintainer : < >
import Data . Geo . . Length ( Length )
import qualified Data . Geo . . Length as Length
module Data.Geo.Jord.Length
(
Length
, feet
, kilometres
, metres
, nauticalMiles
... |
adb6c7042a6d040c139a49d0c7326c448c1a8e66515e995cedb3c9ba424ea000 | lanl/APPFL | Fac.hs | module Fac where
fac :: Int -> Int
fac 0 = 1
fac n = n * fac (n-1)
| null | https://raw.githubusercontent.com/lanl/APPFL/0f29f390d4735e863904348711a48b8f38ca5d03/pubs/talks/stg/Fac.hs | haskell | module Fac where
fac :: Int -> Int
fac 0 = 1
fac n = n * fac (n-1)
| |
064bca80cd519ecf24b3a249cebb0dceab527a37c11e997263a141f009a252fb | sig-gis/gridfire | monte_carlo.clj | [ [ file: .. / .. /org / ] ]
(ns gridfire.monte-carlo
(:require [clojure.java.io :as io]
[clojure.data.csv :as csv]
[clojure.java.jdbc :as jdbc]
[clojure.core.matrix :as m]
[clojure.core.matrix.operators :as mop]
[clojure.core.reducers :as r]
... | null | https://raw.githubusercontent.com/sig-gis/gridfire/44aeaf56fceb01f61b21db6220d2cb562a92570b/src/gridfire/monte_carlo.clj | clojure | "flame_length_stddev" "fire_volume" "fire_shape"]
flame-length-stddev fire-volume fire-shape]}]
flame-length-stddev
mph
flame-length-stddev (->> flame-lengths
(m/emap #(Math/pow (- flame-length-mean %) 2.0))
(m/esum)
(#(/ % burned-cells)... | [ [ file: .. / .. /org / ] ]
(ns gridfire.monte-carlo
(:require [clojure.java.io :as io]
[clojure.data.csv :as csv]
[clojure.java.jdbc :as jdbc]
[clojure.core.matrix :as m]
[clojure.core.matrix.operators :as mop]
[clojure.core.reducers :as r]
... |
a174d2670117a9f5ea1b5b00b697dcae7a59acd7503bc713cce1911a116c4253 | Mesabloo/nihil | Pattern.hs | # LANGUAGE BlockArguments #
{-# LANGUAGE OverloadedStrings #-}
module Nihil.Syntax.Concrete.Parser.Pattern where
import Nihil.Syntax.Common (Parser)
import Nihil.Syntax.Concrete.Core
import Nihil.Utils.Source
import Nihil.Syntax.Concrete.Parser
import Nihil.Syntax.Concrete.Parser.Pattern.Operator
import Nihil.Syntax.... | null | https://raw.githubusercontent.com/Mesabloo/nihil/3821052ca5691a6492b23bd8a46bfe70567d374f/src/parser/Nihil/Syntax/Concrete/Parser/Pattern.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE BlockArguments #
module Nihil.Syntax.Concrete.Parser.Pattern where
import Nihil.Syntax.Common (Parser)
import Nihil.Syntax.Concrete.Core
import Nihil.Utils.Source
import Nihil.Syntax.Concrete.Parser
import Nihil.Syntax.Concrete.Parser.Pattern.Operator
import Nihil.Syntax.Concrete.Parser.Pattern.Atom
import... |
52dde76f5f0fed9a75832ba06af04325a621b8cd20fb5e2b95e57a6d60d42529 | cedlemo/OCaml-GLib2 | GCallback.ml |
* Copyright 2018 ,
* This file is part of .
*
* OCaml - GLib2 is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* any later version .
*
* ... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GLib2/084a148faa4f18d0ddf78315d57c1d623aa9522c/lib/GCallback.ml | ocaml |
* Copyright 2018 ,
* This file is part of .
*
* OCaml - GLib2 is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* any later version .
*
* ... | |
a6004cfeacc63c2896c4ffd0b8fb9ae418b959c5a3237a5b85a4d6897dd1878d | pascal-knodel/haskell-craft | E'6'43.hs | --
--
--
-----------------
Exercise 6.43 .
-----------------
--
--
--
module E'6'43 where
import B'C'6 ( Price )
import E'6'40 ( formatLine )
formatTotal :: Price -> String
formatTotal price
= "\n" ++ ( formatLine ( "Total" , price ) )
| null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/Chapter%206/E'6'43.hs | haskell |
---------------
---------------
| Exercise 6.43 .
module E'6'43 where
import B'C'6 ( Price )
import E'6'40 ( formatLine )
formatTotal :: Price -> String
formatTotal price
= "\n" ++ ( formatLine ( "Total" , price ) )
|
9cfa15d021e950d9c7f1397b57b7f932384ed5608d8f8cbcaa8da96ba1040845 | bitemyapp/esqueleto | MigrateJSON.hs | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedT... | null | https://raw.githubusercontent.com/bitemyapp/esqueleto/34047e1f5f7c06c0aa09f1c3069dffc9b4faffff/test/PostgreSQL/MigrateJSON.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
JSON Table for PostgreSQL | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE... |
f80a0bdc64f7b1c9b18db6d6a7b31f96aa61caf25605607cee22e7b1d7b32e9c | liqula/react-hs | View.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE MagicHash #
# LANGUA... | null | https://raw.githubusercontent.com/liqula/react-hs/204c96ee3514b5ddec65378d37872266b05e8954/react-hs/src/React/Flux/View.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE EmptyDataDecls #
# LANGUAGE OverloadedStrings #
| Internal module containing the view definitions
-------------------------------------------------------------------------------
Public API
-------------------------------------------------------------------------------
| A view is... | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE MagicHash #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE S... |
77e312ca072402fbae0b8792c9c04f3780c3a589a9a17d1bfa6b225ca0f9f913 | NorfairKing/dekking | OptParse.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Dekking.OptParse
( getSettings,
Settings (..),
)
where
import Control.Applicative
import Data.Set (Set)
import qualified Data.Set as S
import GHC.Generics (Generic)
import Options.Applicative as OptParse
import P... | null | https://raw.githubusercontent.com/NorfairKing/dekking/e03a8680c137ac2916e29908c81ef2a37314bbce/dekking-report/src/Dekking/OptParse.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
module Dekking.OptParse
( getSettings,
Settings (..),
)
where
import Control.Applicative
import Data.Set (Set)
import qualified Data.Set as S
import GHC.Generics (Generic)
import Options.Applicative as OptParse
import Path
import Path.IO
getSettings :: ... |
2d9d8007dbd49aab1d45674438040b2b7ba0c7a9ab1e07a771897e579efa0767 | reynir/qubes-mirage-ssh-agent | config.ml | open Mirage
let main =
let packages = [
package ~build:true ~min:"3.7.5" "mirage";
package "mirage-qubes";
package "mirage-xen";
package ~min:"0.4.0" "ssh-agent";
package "angstrom";
package "mirage-crypto-pk";
] in
foreign ~packages
"Unikernel.Main" (random @-> qubesdb @-> job)
let ... | null | https://raw.githubusercontent.com/reynir/qubes-mirage-ssh-agent/3504cc16021a4f3f6b2b5375496156f110814ee1/config.ml | ocaml | open Mirage
let main =
let packages = [
package ~build:true ~min:"3.7.5" "mirage";
package "mirage-qubes";
package "mirage-xen";
package ~min:"0.4.0" "ssh-agent";
package "angstrom";
package "mirage-crypto-pk";
] in
foreign ~packages
"Unikernel.Main" (random @-> qubesdb @-> job)
let ... | |
d80067cc92e8879b4aa65efc59d770b1d2dd780ac7a9d5e2292ac480adaf3e5d | hoytech/antiweb | cffi-lispworks.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; cffi-lispworks.lisp --- Lispworks CFFI-SYS implementation.
;;;
Copyright ( C ) 2005 - 2006 , < >
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software "... | null | https://raw.githubusercontent.com/hoytech/antiweb/53c38f78ea01f04f6d1a1ecdca5c012e7a9ae4bb/bundled/cffi/cffi-lispworks.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
cffi-lispworks.lisp --- Lispworks CFFI-SYS implementation.
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, publi... | Copyright ( C ) 2005 - 2006 , < >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
# Administri... |
72313da9df96f3dc0494536f74dc9acdba1acf9eb0b188da61a089662e8ae30b | mauny/the-functional-approach-to-programming | inttree.mli | #open "lexer";;
(*+inttree+*)
type inttree = Leaf of int | Node of inttree * inttree;;
(*+inttree+*)
value inttree_parser : token stream -> inttree;;
value inttree_of_string : string -> inttree;;
| null | https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/Struct/inttree.mli | ocaml | +inttree+
+inttree+ | #open "lexer";;
type inttree = Leaf of int | Node of inttree * inttree;;
value inttree_parser : token stream -> inttree;;
value inttree_of_string : string -> inttree;;
|
44d85dc72c3404f352f03eb9d001840b792143408c53854d6a6e7b53c4361749 | Helium4Haskell/Top | Schemes.hs | {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
-----------------------------------------------------------------------------
-- | License : GPL
--
-- Maintainer :
-- Stability : provisional
-- Portability : non-portable (requires extensions)
--
-- A representation of type schemes. A typ... | null | https://raw.githubusercontent.com/Helium4Haskell/Top/5e900184d6b2ab6d7ce69945287d782252e5ea68/src/Top/Types/Schemes.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances #
---------------------------------------------------------------------------
| License : GPL
Maintainer :
Stability : provisional
Portability : non-portable (requires extensions)
A representation of type schemes. A type scheme is a (quali... |
module Top.Types.Schemes where
import Top.Types.Primitive
import Top.Types.Quantification
import Top.Types.Qualification
import Top.Types.Substitution
import Top.Types.Synonym
import Top.Types.Unification
import Top.Types.Classes
import Data.List
import qualified Data.Map as M
type TpScheme = Forall QType
type QTyp... |
5c92caca41f8a3ac2c556fee2c6e8c43e469978a642effc51b46909d0b3e6607 | racket/typed-racket | deep.rkt | #lang typed-racket/minimal
(require typed/racket/base/deep racket/require
(subtract-in racket typed/racket/base/deep racket/contract
typed/racket/class
typed/racket/unit)
typed/racket/class
typed/racket/unit
(for-syntax racket/base))
(provide (al... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-lib/typed/racket/deep.rkt | racket | #lang typed-racket/minimal
(require typed/racket/base/deep racket/require
(subtract-in racket typed/racket/base/deep racket/contract
typed/racket/class
typed/racket/unit)
typed/racket/class
typed/racket/unit
(for-syntax racket/base))
(provide (al... | |
81b2a572d8f7b8bbaa56d376d07b29fd9eb60a463b951d5e711e4c439189f123 | 6502/JSLisp | simpledb.lisp | (defvar *transaction* (list))
(defvar *changelog* (list))
(defvar *tables* (list))
(defvar *no-transactions* false)
(defvar *logwrite* null)
(defun commit ()
(when *logwrite*
(funcall *logwrite* (str-value `(progn ,@*changelog*) false)))
(setf *changelog* (list))
(setf *transaction* (list)))
(defun rollbac... | null | https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/simpledb.lisp | lisp | (defvar *transaction* (list))
(defvar *changelog* (list))
(defvar *tables* (list))
(defvar *no-transactions* false)
(defvar *logwrite* null)
(defun commit ()
(when *logwrite*
(funcall *logwrite* (str-value `(progn ,@*changelog*) false)))
(setf *changelog* (list))
(setf *transaction* (list)))
(defun rollbac... | |
52f1b8cb9eae4805d9e0bef023c3b17c5028a3394ff3d3d6a8a25c5438233400 | VERIMAG-Polyhedra/VPL | BinNat.ml | open BinNums
open BinPos
open Datatypes
module N =
struct
* : coq_N - > coq_N - > coq_N *
let mul n m =
match n with
| N0 -> N0
| Npos p -> (match m with
| N0 -> N0
| Npos q -> Npos (Pos.mul p q))
* val of_nat : nat - > coq_N *
let of_nat = function
| O -> N0
... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/extracted/BinNat.ml | ocaml | open BinNums
open BinPos
open Datatypes
module N =
struct
* : coq_N - > coq_N - > coq_N *
let mul n m =
match n with
| N0 -> N0
| Npos p -> (match m with
| N0 -> N0
| Npos q -> Npos (Pos.mul p q))
* val of_nat : nat - > coq_N *
let of_nat = function
| O -> N0
... | |
b2f5d1728e2be53ec604373e314674f8b7ba6db2d1d9f2aebb86f3a46f5c6dbf | tonsky/grumpy | telegram.clj | (ns grumpy.telegram
(:require
[clj-http.client :as http]
[clojure.string :as str]
[grumpy.core.coll :as coll]
[grumpy.core.config :as config]
[grumpy.core.fragments :as fragments]
[grumpy.core.log :as log]
[grumpy.core.mime :as mime]))
(def ^:dynamic token
(config/get-optional ::token))
(de... | null | https://raw.githubusercontent.com/tonsky/grumpy/0a76a9a25a1e09780fdd80c2d6e6ab8178040444/src/grumpy/telegram.clj | clojure | (ns grumpy.telegram
(:require
[clj-http.client :as http]
[clojure.string :as str]
[grumpy.core.coll :as coll]
[grumpy.core.config :as config]
[grumpy.core.fragments :as fragments]
[grumpy.core.log :as log]
[grumpy.core.mime :as mime]))
(def ^:dynamic token
(config/get-optional ::token))
(de... | |
22b17160d2e11705cef16c5a4b647a6987c471b6b064a4aaa265ce7c7b50d34a | valerauko/kitsune-alpha | user.clj | (ns kitsune.fixtures.user)
(defn dummy-user
[& {:as override}]
(merge
{:id 1
:name "foo"
:acct "foo"
:uri ":3000/foo"
:email ""
:local true
:pass-hash "foo"
:display-name "foo"
:created-at (java.util.Date.)
:last-login (java.util.Date.)}
override))
| null | https://raw.githubusercontent.com/valerauko/kitsune-alpha/34ca08e4013541aeaf1a5a5786f3189ff17c1a58/test/kitsune/fixtures/user.clj | clojure | (ns kitsune.fixtures.user)
(defn dummy-user
[& {:as override}]
(merge
{:id 1
:name "foo"
:acct "foo"
:uri ":3000/foo"
:email ""
:local true
:pass-hash "foo"
:display-name "foo"
:created-at (java.util.Date.)
:last-login (java.util.Date.)}
override))
| |
8f8d2aa4649fa8dc329f2b235f20bc21c07ae389b1289318466c36103e38498c | sgimenez/laby | version.ml |
* Copyright ( C ) 2007 - 2014 The laby team
* You have permission to copy , modify , and redistribute under the
* terms of the GPL-3.0 . For full license terms , see gpl-3.0.txt .
* Copyright (C) 2007-2014 The laby team
* You have permission to copy, modify, and redistribute under the
* terms of the GPL... | null | https://raw.githubusercontent.com/sgimenez/laby/47f9560eb827790d26900bb553719afb4b0554ea/src/version.ml | ocaml |
* Copyright ( C ) 2007 - 2014 The laby team
* You have permission to copy , modify , and redistribute under the
* terms of the GPL-3.0 . For full license terms , see gpl-3.0.txt .
* Copyright (C) 2007-2014 The laby team
* You have permission to copy, modify, and redistribute under the
* terms of the GPL... | |
385f599d57f7689918edb6e123906769fa47a6dbe9308ef6c451bbd9e1779fb9 | emedia-project/paris | my_route.erl | -module(my_route).
-export([
get/1,
post/1,
put/1,
head/1,
delete/1
]).
get(_Request) ->
paris_response:render(html, [{template, my_route}]).
post(_Request) ->
paris_response:render(html, [{template, my_route}]).
put(_Request) ->
paris_response:render(html, [{template, my_route}]).
head(_Request) -... | null | https://raw.githubusercontent.com/emedia-project/paris/7ba24bcb76f8ab31b78d49e1a9f9c7643bfca80c/examples/custom_route/apps/custom_route/src/controllers/my_route.erl | erlang | -module(my_route).
-export([
get/1,
post/1,
put/1,
head/1,
delete/1
]).
get(_Request) ->
paris_response:render(html, [{template, my_route}]).
post(_Request) ->
paris_response:render(html, [{template, my_route}]).
put(_Request) ->
paris_response:render(html, [{template, my_route}]).
head(_Request) -... | |
5aa4be5acc30c997a98548a960870092006b16a0a4b41ab7a44ea643bfc22159 | facebookarchive/pfff | gtkText.ml | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/external/ocamlgtk/src/gtkText.ml | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
dd68da797f1ae54cd1016290a36bfd96e38baadcbfde91a0f64de93e84b724ac | BinaryAnalysisPlatform/bap | x86_mov.ml | open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_opcode_mov
open X86_asm.Reg
module Make (Tools : X86_tools.S) (Backend : X86_backend.S) = struct
open Tools
let mov_rr (op:mov_rr) =
X86_operands.rr ~f:(fun _mem dst src ->
let dst = RR.of_mc_exn dst in
let src = RR.of_mc_exn src in
... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/plugins/x86/x86_mov.ml | ocaml | open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_opcode_mov
open X86_asm.Reg
module Make (Tools : X86_tools.S) (Backend : X86_backend.S) = struct
open Tools
let mov_rr (op:mov_rr) =
X86_operands.rr ~f:(fun _mem dst src ->
let dst = RR.of_mc_exn dst in
let src = RR.of_mc_exn src in
... | |
74eb4d5446e9701ae84ff8e38711e7923a03e525ca409ef43bac969777c320be | reasonml/reason | migrate_parsetree_410_411_migrate.ml | open Stdlib0
module From = Ast_410
module To = Ast_411
let rec copy_out_type_extension :
Ast_410.Outcometree.out_type_extension ->
Ast_411.Outcometree.out_type_extension
=
fun
{ Ast_410.Outcometree.otyext_name = otyext_name;
Ast_410.Outcometree.otyext_params = otyext_params;
Ast_410.Outcometre... | null | https://raw.githubusercontent.com/reasonml/reason/4f6ff7616bfa699059d642a3d16d8905d83555f6/src/vendored-omp/src/migrate_parsetree_410_411_migrate.ml | ocaml | open Stdlib0
module From = Ast_410
module To = Ast_411
let rec copy_out_type_extension :
Ast_410.Outcometree.out_type_extension ->
Ast_411.Outcometree.out_type_extension
=
fun
{ Ast_410.Outcometree.otyext_name = otyext_name;
Ast_410.Outcometree.otyext_params = otyext_params;
Ast_410.Outcometre... | |
76244862a35c0234c35d6e4c8b01c5453f61e253088b617eb1d1d64b60d611d4 | smimram/saml | lang_types.ml | (** Operation on types. *)
open Stdlib
open Common
module B = Backend
(** A type. *)
type t =
{
desc : desc; (** The type. *)
}
and desc =
| Ident of string
(** A variable identifier. *)
| Var of var
(** A type variable. *)
| EVar of t option ref
(** An existential type variable: this is an opaque type whose... | null | https://raw.githubusercontent.com/smimram/saml/02de9b7e90e34d19aeafa4b680e7777636355fa7/old/lang_types.ml | ocaml | * Operation on types.
* A type.
* The type.
* A variable identifier.
* A type variable.
* An existential type variable: this is an opaque type whose contents will be
revealed later (it is used only for states at the moment because they are
not known at typing time). They cannot be substituted by types with... |
open Stdlib
open Common
module B = Backend
type t =
{
}
and desc =
| Ident of string
| Var of var
| EVar of t option ref
| Int
| Float
| String
| Bool
| Arr of (string * (t * bool)) list * t
| Ref of t
| Array of t
| Variant
| Record of ((string * (t * bool)) list * var option)
and var = var_contents ref
and var... |
35e9092f4f90e5536eaaff26c0b8d7b186953898ce48d56239f5664a81d74ab6 | r-willis/biten | biten_app.erl | -module(biten_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% API for easy startup
-export([start/0]).
%% ===================================================================
%% API
%% ===================================================================
start() ->
applicati... | null | https://raw.githubusercontent.com/r-willis/biten/75b13ea296992f8fa749646b9d7c15c5ef23d94d/apps/biten/src/biten_app.erl | erlang | Application callbacks
API for easy startup
===================================================================
API
===================================================================
===================================================================
Application callbacks
=======================================... | -module(biten_app).
-behaviour(application).
-export([start/2, stop/1]).
-export([start/0]).
start() ->
application:start(biten).
start(_StartType, _StartArgs) ->
biten_sup:start_link().
stop(_State) ->
ok.
|
78eb7d296e99edb7b815694c2d1f49f306bd27d5fae1dcf7dd9f0daabc225a5a | ruhatch/mirage-oram | myocamlbuild.ml | OASIS_START
DO NOT EDIT ( digest : 584412166a18b77c4ede7105487b76ac )
module OASISGettext = struct
# 22 " src / oasis / OASISGettext.ml "
let ns_ str =
str
let s_ str =
str
let f_ (str: ('a, 'b, 'c, 'd) format4) =
str
let fn_ fmt1 fmt2 n =
if n = 1 then
fmt1^^""
else
... | null | https://raw.githubusercontent.com/ruhatch/mirage-oram/533a7f7726c4a499b60c71ed627b730349a3816b/myocamlbuild.ml | ocaml | these functions are not really officially exported
ocamlfind command
This lists all supported packages.
Mock to list available syntaxes.
By using Before_options one let command line options have an higher
* priority on the contrary using After_options will guarantee to have
* the higher p... | OASIS_START
DO NOT EDIT ( digest : 584412166a18b77c4ede7105487b76ac )
module OASISGettext = struct
# 22 " src / oasis / OASISGettext.ml "
let ns_ str =
str
let s_ str =
str
let f_ (str: ('a, 'b, 'c, 'd) format4) =
str
let fn_ fmt1 fmt2 n =
if n = 1 then
fmt1^^""
else
... |
1ae7fc6178cef0d7d3470b5f0174b4c27f0ee648d146dfc26f1a09fd935f20d0 | viercc/kitchen-sink-hs | uni_typed.hs | #!/usr/bin/env cabal
{- cabal:
build-depends: base
-}
# LANGUAGE PatternSynonyms #
# LANGUAGE StandaloneDeriving #
# LANGUAGE UndecidableInstances #
# LANGUAGE QuantifiedConstraints #
{-# LANGUAGE RankNTypes #-}
import Data.Word
import Data.Functor.Identity
data Value' f = W32' (f Word32)
| W64' (f Word... | null | https://raw.githubusercontent.com/viercc/kitchen-sink-hs/5038b17a39e4e6f19e6fb4779a7c8aaddf64d922/scripts/uni_typed.hs | haskell | cabal:
build-depends: base
# LANGUAGE RankNTypes #
-------------------------------------------- | #!/usr/bin/env cabal
# LANGUAGE PatternSynonyms #
# LANGUAGE StandaloneDeriving #
# LANGUAGE UndecidableInstances #
# LANGUAGE QuantifiedConstraints #
import Data.Word
import Data.Functor.Identity
data Value' f = W32' (f Word32)
| W64' (f Word64)
| F32' (f Float)
| F64' (f Do... |
18737f519b2597c870ace7965eb874af9d9b05ef2c63751d4398f7dac4b2ed1c | mbutterick/beautiful-racket | sample-def.rkt | #lang basic-demo-3
10 x = 2 : y = 3 : z = 5
20 print f(3, 4)
30 print f(f(3, g(2)), 2)
40 def f(x, y) = x * y * z
50 def g(i) = i + i
60 print y | null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/basic-demo-3/sample-def.rkt | racket | #lang basic-demo-3
10 x = 2 : y = 3 : z = 5
20 print f(3, 4)
30 print f(f(3, g(2)), 2)
40 def f(x, y) = x * y * z
50 def g(i) = i + i
60 print y | |
0ca10eb88f892b24ab01597a2f20295452ac3a13d665eff203511d4c05d9830b | exercism/ocaml | test.ml | open OUnit2
open Difference_of_squares
let ae exp got _test_ctxt = assert_equal exp got
let square_of_sum_tests = [
"square of sum 1" >::
ae 1 (square_of_sum 1);
"square of sum 5" >::
ae 225 (square_of_sum 5);
"square of sum 100" >::
ae 25502500 (square_of_sum 100);
]
let sum_of_squares_tests = [
"sum o... | null | https://raw.githubusercontent.com/exercism/ocaml/bfd6121f757817865a34db06c3188b5e0ccab518/exercises/practice/difference-of-squares/test.ml | ocaml | open OUnit2
open Difference_of_squares
let ae exp got _test_ctxt = assert_equal exp got
let square_of_sum_tests = [
"square of sum 1" >::
ae 1 (square_of_sum 1);
"square of sum 5" >::
ae 225 (square_of_sum 5);
"square of sum 100" >::
ae 25502500 (square_of_sum 100);
]
let sum_of_squares_tests = [
"sum o... | |
c3c985c7b8b495fb4cdb60161e7d9aae345537215ebd6dd945bc2b6f1d08cb73 | input-output-hk/ouroboros-network | Types.hs | # LANGUAGE FlexibleContexts #
# DEPRECATED " Use Ouroboros . Consensus . instead " #
-- * Internal State
InternalState (..)
, initInternalState
, isMempoolSize
-- * Validation result
, ValidationResult (..)
, extendVRNew
, extendVRPrevApplied
, revalidateTxsFor
, validateIS
, validateStateF... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/d64a5d253b751d465c5c48799dea6b234c2a329a/ouroboros-consensus/src/Ouroboros/Consensus/Mempool/Impl/Types.hs | haskell | * Internal State
* Validation result
* Tick ledger state
* Conversions
# DEPRECATED validateIS "This function should not be used (it will throw an error), it was internal no longer exists" # | # LANGUAGE FlexibleContexts #
# DEPRECATED " Use Ouroboros . Consensus . instead " #
InternalState (..)
, initInternalState
, isMempoolSize
, ValidationResult (..)
, extendVRNew
, extendVRPrevApplied
, revalidateTxsFor
, validateIS
, validateStateFor
, tickLedgerState
, internalStateFromVR
, ... |
12c299c28f16008a43359c71be225249aafc32d4b0d6f892c85d2e815031ed94 | metaocaml/ber-metaocaml | pr7798.ml | (* TEST
* bytecode
* native
* native
ocamlopt_flags = "-compact"
*)
type mut2 = { mutable p: int; mutable q:int }
type mut3 = { mutable s: int; mutable t:int; mutable u:int }
type mut_record =
{ mutable a : int;
mutable b : int;
mutable c : int;
mutable d : int;
mutable e : int;
mu... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/regression/pr7798/pr7798.ml | ocaml | TEST
* bytecode
* native
* native
ocamlopt_flags = "-compact"
|
type mut2 = { mutable p: int; mutable q:int }
type mut3 = { mutable s: int; mutable t:int; mutable u:int }
type mut_record =
{ mutable a : int;
mutable b : int;
mutable c : int;
mutable d : int;
mutable e : int;
mutable f : int; }
let go () =
let pre_before = Gc.minor_words () in
let before... |
babfbaac9592cd0eb93765983b02df6acad252b49cf37700a753e83a893aa01d | haskell-distributed/distributed-process-platform | Server.hs | # LANGUAGE ExistentialQuantification #
# LANGUAGE ScopedTypeVariables #
-----------------------------------------------------------------------------
-- |
-- Module : Control.Distributed.Process.Platform.ManagedProcess.Server
Copyright : ( c ) 2012 - 2013
-- License : BSD3 (see the file L... | null | https://raw.githubusercontent.com/haskell-distributed/distributed-process-platform/46d63f81910e7dd527fb1d41e654a5cfb0dbfdba/src/Control/Distributed/Process/Platform/ManagedProcess/Server.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Distributed.Process.Platform.ManagedProcess.Server
License : BSD3 (see the file LICENSE)
Stability : experimental
Portability : non-portable (requires concurrency)
---------------------------------------... | # LANGUAGE ExistentialQuantification #
# LANGUAGE ScopedTypeVariables #
Copyright : ( c ) 2012 - 2013
Maintainer : < >
The Server Portion of the /Managed Process/ API .
module Control.Distributed.Process.Platform.ManagedProcess.Server
condition
, state
, input
, reply
, reply... |
d40e3250ba5c5a531d03962ab20d0fc931897a792386d8f49bfcbb35af518268 | DavidAlphaFox/ailib | ai_mq_sup.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2018 ,
%%% @doc
%%%
%%% @end
Created : 15 Oct 2018 by < >
%%%-------------------------------------------------------------------
-module(ai_mq_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Super... | null | https://raw.githubusercontent.com/DavidAlphaFox/ailib/1f5bd561d9ecd977d4c169c8edde99cbc727873d/src/mq/ai_mq_sup.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
Supervisor callbacks
===================================================================
API functions
=============================================================... | @author < >
( C ) 2018 ,
Created : 15 Oct 2018 by < >
-module(ai_mq_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-export([new/1]).
-define(SERVER, ?MODULE).
new(Opts)->
supervisor:start_child(?SERVER,[Opts]).
-spec start_link() -> {ok, Pid :: pid()} |
{error, {... |
e0933f533b327ec09428a045e968f6dcaf9c619e4395d1b2b74f9ae08236add5 | threatgrid/ctia | sightings_indicators_test.clj | (ns ctia.http.routes.observable.sightings-indicators-test
(:require [clojure.test :refer [deftest is join-fixtures testing use-fixtures]]
[ctia.test-helpers.auth :refer [all-capabilities]]
[ctia.test-helpers.core :as helpers :refer [GET make-id POST]]
[ctia.test-helpers.fake-whoami... | null | https://raw.githubusercontent.com/threatgrid/ctia/b3950c0109c8fb26ac5a68e5a141c6e427e828de/test/ctia/http/routes/observable/sightings_indicators_test.clj | clojure | This sighting should be matched
This sighting should not be matched (no indicator relationship)
This sighting should not be matched (different observable)
This judgement should not be matched (it isn't an incident)
This indicator should be found based on the observable/relationship
This indicator should not be fo... | (ns ctia.http.routes.observable.sightings-indicators-test
(:require [clojure.test :refer [deftest is join-fixtures testing use-fixtures]]
[ctia.test-helpers.auth :refer [all-capabilities]]
[ctia.test-helpers.core :as helpers :refer [GET make-id POST]]
[ctia.test-helpers.fake-whoami... |
86cee019bedefcebe0ddeb829c0b3b69242b47fa6d9544ba2b843eb5caa1732f | Convex-Dev/convex.cljc | ctx.clj | (ns convex.shell.ctx
"Preparing the genesis context used by the Shell.
The Shell CVX library is executed in the core account so that all those functions
are accessible from any account."
{:author "Adam Helinski"}
(:import (convex.core.init Init)
(java.io InputStreamReader)
(java.... | null | https://raw.githubusercontent.com/Convex-Dev/convex.cljc/15af6c035384f0e8d56a3488065e0bd869ebea0c/module/shell/src/main/clj/convex/shell/ctx.clj | clojure | Private
Public
Throw on purpose. | (ns convex.shell.ctx
"Preparing the genesis context used by the Shell.
The Shell CVX library is executed in the core account so that all those functions
are accessible from any account."
{:author "Adam Helinski"}
(:import (convex.core.init Init)
(java.io InputStreamReader)
(java.... |
3cb85d6e382c97ccba1a689e74e35614543cf299b37272dfcde89c3eb5271051 | clj-kondo/clj-kondo | cljs_ns_as_as_object.cljs | (ns foo
(:require [reagent.core :as r]
["apsl-react-native-button" :as NativeButton]
["constructor-export" :as ConstructorExport]))
(def button (r/adapt-react-class NativeButton))
(def obj (ConstructorExport.))
| null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/corpus/cljs_ns_as_as_object.cljs | clojure | (ns foo
(:require [reagent.core :as r]
["apsl-react-native-button" :as NativeButton]
["constructor-export" :as ConstructorExport]))
(def button (r/adapt-react-class NativeButton))
(def obj (ConstructorExport.))
| |
c36871ec937bf448fc125b03041a37f0beff46cc489a5f8237c058b0d9b4e7ee | LexiFi/dead_code_analyzer | bar.ml | let x = Foo.x
| null | https://raw.githubusercontent.com/LexiFi/dead_code_analyzer/c44dc2ea5ccb13df2145e9316e21c39f09dad506/examples/bar.ml | ocaml | let x = Foo.x
| |
811c589e4dcc98a4f71305fdf8d523d27515fac3562b381e6682e4ebc530e8b7 | zotonic/zotonic | zotonic_cmd_siteconfig.erl | @author < >
2019 - 2020
%% @doc Print the site configuration
Copyright 2019 - 2020
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_launcher/src/command/zotonic_cmd_siteconfig.erl | erlang | @doc Print the site configuration
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for t... | @author < >
2019 - 2020
Copyright 2019 - 2020
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(zotonic_cmd_siteconfig).
-author("Blaise").
-export([info/0, run/1]).
info() ->
"Show the configurati... |
d0e698f9ed696b808f36b73f18e50a9d54cf52ee3a58e35e02f22d400271eb3c | arttuka/reagent-material-ui | desk_two_tone.cljs | (ns reagent-mui.icons.desk-two-tone
"Imports @mui/icons-material/DeskTwoTone as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def desk-two-tone (create-svg-icon ... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/desk_two_tone.cljs | clojure | (ns reagent-mui.icons.desk-two-tone
"Imports @mui/icons-material/DeskTwoTone as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def desk-two-tone (create-svg-icon ... | |
89b8c847cf502f45771f6fb2439979bf35600aaeed9af09870e07e35b9db5fa9 | VisionsGlobalEmpowerment/webchange | kaldi.clj | (ns webchange.voice-recognizer.recognizers.kaldi
(:require
[clojure.data.json :as json]
[clojure.string :as str]
[clojure.tools.logging :as log]
[config.core :refer [env]]))
(defn- read-result
[result]
(-> result
(str/replace #"([0-9]+),([0-9]+)" (fn [[_all number decimal]] (str number "." ... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/bceda8ea1c42425fdba88b8eb171ba8f4a5a55ea/src/clj/webchange/voice_recognizer/recognizers/kaldi.clj | clojure | (ns webchange.voice-recognizer.recognizers.kaldi
(:require
[clojure.data.json :as json]
[clojure.string :as str]
[clojure.tools.logging :as log]
[config.core :refer [env]]))
(defn- read-result
[result]
(-> result
(str/replace #"([0-9]+),([0-9]+)" (fn [[_all number decimal]] (str number "." ... | |
df69777717c6ecebf13c8493497a8cc970302e59f84833b77e049757ef07a517 | dktr0/Punctual | GLSLExpr.hs | {-# LANGUAGE OverloadedStrings #-}
module Sound.Punctual.GLSLExpr where
-- This module provides types and functions to represent and manipulate the text of
GLSL expressions .
import TextShow
GLSL is a strongly - typed language , so we 'll need a type to represent types :
data GLSLType = Vec4 | Vec3 | Vec2 | G... | null | https://raw.githubusercontent.com/dktr0/Punctual/b141d11472de5c53400f1883bd5465042f6997e0/library-src/Sound/Punctual/GLSLExpr.hs | haskell | # LANGUAGE OverloadedStrings #
This module provides types and functions to represent and manipulate the text of
together with a representation of its dependencies.
True if expr is just name of an assigned variable
a convenience function for making a no-dependency GLFloat
and the result type matches the type of the... | module Sound.Punctual.GLSLExpr where
GLSL expressions .
import TextShow
GLSL is a strongly - typed language , so we 'll need a type to represent types :
data GLSLType = Vec4 | Vec3 | Vec2 | GLFloat deriving (Eq, Show)
instance TextShow GLSLType where
showb Vec4 = "vec4"
showb Vec3 = "vec3"
showb Vec2 =... |
fdb209fa9beed30d9057aaa3c33c7533d3c8ab409071a66bd907c912bacfafa9 | thiago-negri/DuDuHoX | Data.hs | module DuDuHoX.OpenGL.Data where
import Data.IORef
import qualified Graphics.Rendering.OpenGL as GL
import DuDuHoX.Game
import DuDuHoX.OpenGL.Animation
import DuDuHoX.World.Types
data FPSCounter = FPSCounter {
currentFPS :: Double -- ^ Current FPS counter
^ Time elapsed... | null | https://raw.githubusercontent.com/thiago-negri/DuDuHoX/34942751c807ce69cd20d1a1a6fde4d6520460a4/src/DuDuHoX/OpenGL/Data.hs | haskell | ^ Current FPS counter
^ Player delta
^ Texture used for background
^ Should repaint the screen?
^ User input
^ Should quit the game?
^ The current state of the game
^ Textures used in game | module DuDuHoX.OpenGL.Data where
import Data.IORef
import qualified Graphics.Rendering.OpenGL as GL
import DuDuHoX.Game
import DuDuHoX.OpenGL.Animation
import DuDuHoX.World.Types
data FPSCounter = FPSCounter {
^ Time elapsed since last FPS counter update in seconds
}
data ... |
87f0c4ad6059cd76d6dab2ec90ff39d6c096be9e3ffe273c075dc25485a0460f | p2k/ecoinpool | ebitcoin_cfg_monitor.erl |
%%
Copyright ( C ) 2011 Patrick " p2k " < >
%%
This file is part of ebitcoin .
%%
%% ebitcoin is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) ... | null | https://raw.githubusercontent.com/p2k/ecoinpool/01ba76a7ab4b17b60cb0c525786fddef43ea80e1/apps/ebitcoin/src/ebitcoin_cfg_monitor.erl | erlang |
ebitcoin is free software: you can redistribute it and/or modify
(at your option) any later version.
ebitcoin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public Licen... |
Copyright ( C ) 2011 Patrick " p2k " < >
This file is part of ebitcoin .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
along with ebitcoin . If ... |
1e2391b5f8e6aadee053533bb73e1ea4b166f030b19b67c624c4057b229f98d0 | erlang-ls/erlang_ls | els_proper_gen.erl | %%==============================================================================
%% PropEr Custom Generators
%%==============================================================================
-module(els_proper_gen).
%%==============================================================================
%% Includes
%%=========... | null | https://raw.githubusercontent.com/erlang-ls/erlang_ls/2dfb48aca3879e5b44f6fd676f8349525262779f/apps/els_lsp/test/els_proper_gen.erl | erlang | ==============================================================================
PropEr Custom Generators
==============================================================================
==============================================================================
Includes
===============================================... | -module(els_proper_gen).
-include_lib("proper/include/proper.hrl").
-compile(export_all).
uri() ->
?LET(
B,
document(),
els_uri:uri(filename:join([system_tmp_dir(), B ++ ".erl"]))
).
root_uri() ->
els_uri:uri(system_tmp_dir()).
init_options() ->
#{<<"indexingEnabled">> => fa... |
b441250f486df71039c2067a09e83b905b031bacaff9e7f664ac5a13ea68c979 | appleshan/cl-http | cl-http-70-103.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : T -*-
Patch file for CL - HTTP version 70.103
;;; Reason: Function WWW-UTILS:DOMAIN-NAME-FOR-IP-ADDRESS: use STRING-EQUAL
;;; Function WWW-UTILS::%HOST-DOMAIN-NAME: use STRING-EQUAL
Written by Joswig , 12/16/00 04:28:15
whi... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/server/patch/cl-http-70/cl-http-70-103.lisp | lisp | Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : T -*-
Reason: Function WWW-UTILS:DOMAIN-NAME-FOR-IP-ADDRESS: use STRING-EQUAL
Function WWW-UTILS::%HOST-DOMAIN-NAME: use STRING-EQUAL
Vlm lmfs patch (from W:>Reti>vlm-lmfs-patch.lisp.12),
Patch TCP hang on close when client drops connection. (f... | Patch file for CL - HTTP version 70.103
Written by Joswig , 12/16/00 04:28:15
while running on from FUJI:/usr / lib / symbolics / Inc - CL - HTTP-70 - 90 - LMFS.vlod
with Open Genera 2.0 , Genera 8.5 , Logical Pathnames Translation Files NEWEST ,
442.1 , Color 427.1 , Graphics Support 431.0 , Genera Extensi... |
7ce1bfbf83f32070257f04bb58af9c36425ace46ca75d031e6ba1b83d013e593 | onedata/op-worker | acl_tests.erl | %%%--------------------------------------------------------------------
@author
( C ) 2015 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%--------------------------------------------------------------------
%%% @doc
%%% Unit tests for acl module.
%%% @... | null | https://raw.githubusercontent.com/onedata/op-worker/b0e4045090b180f28c79d40b9b334d7411ec3ca5/test/acl_tests.erl | erlang | --------------------------------------------------------------------
@end
--------------------------------------------------------------------
@doc
Unit tests for acl module.
@end
--------------------------------------------------------------------
when
then
when
then | @author
( C ) 2015 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(acl_tests).
-ifdef(TEST).
-include("modules/fslogic/data_access_control.hrl").
-include("modules/fslogic/fslogic_common.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("ctool/... |
c29a677fa7148db5c30c3aa7c3425f0741a4a7f47af40620af35cf9b45ddfe66 | danr/hipspec | ListFunctions.hs | module Main where
import Test.QuickSpec
-- This finds the weirdest properties, like
-- zipWith k xs ys = zipWith k ys xs
listFunctions = describe "ListFunctions"
[ var "xs" listType
, var "ys" listType
, var "zs" listType
, con "[]" ([] :: [Int... | null | https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/examples/old-examples/quickspec/ListFunctions.hs | haskell | This finds the weirdest properties, like
zipWith k xs ys = zipWith k ys xs | module Main where
import Test.QuickSpec
listFunctions = describe "ListFunctions"
[ var "xs" listType
, var "ys" listType
, var "zs" listType
, con "[]" ([] :: [Int])
, con ":" ((:) :: Int -> [Int] -> [Int])
... |
acb860c54d7d7e8dec4e1f86e275ce0b6ae1c12e7bb4bcd4af1e1ac6152f2699 | input-output-hk/plutus-apps | SimpleEscrow.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE NamedFieldPuns #-}
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings ... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/79a5ff180a5c52da743ef8a21612c2f9ba2f7f6e/plutus-use-cases/src/Plutus/Contracts/SimpleEscrow.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
| This simple escrow contract facilitiates and exchange of currencies.
^ The entity that needs to be paid the 'exp... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# OPTIONS -fplugin - opt Language . Plutu... |
d0d07efbc3f2f4d3f49f95b013b4ede1646b647c3bfdc097d00e61fea3bcf176 | hipsleek/hipsleek | fact.ml | #include "xdebug.cppo"
let rec fact n =
if (n==0) then 1
else n * (fact (n-1)) ;;
print_endline (string_of_int (fact 10));;
| null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/fact.ml | ocaml | #include "xdebug.cppo"
let rec fact n =
if (n==0) then 1
else n * (fact (n-1)) ;;
print_endline (string_of_int (fact 10));;
| |
118111bb6d4ce7f8168458eebe76c6aa319cdfeb196d970b77b5588442b85cb5 | careercup/CtCI-6th-Edition-Clojure | chapter_5_q1_test.clj | (ns chapter-5.chapter-5-q1-test
(:require [clojure.test :refer :all]
[chapter-5.chapter-5-q1 :refer :all]))
(deftest insertion-shifts-test
(is (= 2r10001001100 (insertion-shifts 2r10000000000 2r10011 2 6)))
(is (= 2r10001001111 (insertion-shifts 2r10000000011 2r10011 2 6)))
(is (= 2r10111001111 (in... | null | https://raw.githubusercontent.com/careercup/CtCI-6th-Edition-Clojure/ef151b94978af82fb3e0b1b0cd084d910870c52a/test/chapter_5/chapter_5_q1_test.clj | clojure | (ns chapter-5.chapter-5-q1-test
(:require [clojure.test :refer :all]
[chapter-5.chapter-5-q1 :refer :all]))
(deftest insertion-shifts-test
(is (= 2r10001001100 (insertion-shifts 2r10000000000 2r10011 2 6)))
(is (= 2r10001001111 (insertion-shifts 2r10000000011 2r10011 2 6)))
(is (= 2r10111001111 (in... | |
74f432fea2b90007ff21657d2be336d73eadbc585b105804275b03b919f96d5e | protz/mezzo | OCamlKeywords.ml | Copied from 's lexer.mll , version 4.00.0
let create_hashtable n elements =
let table = Hashtbl.create n in
List.iter (fun element ->
Hashtbl.add table element ()
) elements;
table
let keyword_table =
create_hashtable 149 [
"and";
"as";
"assert";
"begin";
"class";
"constraint"... | null | https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/compiler/OCamlKeywords.ml | ocaml | "parser"; | Copied from 's lexer.mll , version 4.00.0
let create_hashtable n elements =
let table = Hashtbl.create n in
List.iter (fun element ->
Hashtbl.add table element ()
) elements;
table
let keyword_table =
create_hashtable 149 [
"and";
"as";
"assert";
"begin";
"class";
"constraint"... |
842efc0305efed645ab6ada860b74871a4cef3dd7030806f39a6a33a5af5a7f5 | jxv/animate-preview | Loader.hs | module Animate.Preview.Loader where
import qualified Data.Map as Map
import qualified Data.Vector as V
import qualified SDL
import Control.Monad.IO.Class (MonadIO(..))
import Control.Applicative ((<|>))
import Control.Monad.Reader (asks)
import Control.Concurrent (modifyMVar_, readMVar)
import Data.Text.Conversions (t... | null | https://raw.githubusercontent.com/jxv/animate-preview/c5da38ed8cae0c558ff07833eb48a8e5831a2cc1/library/Animate/Preview/Loader.hs | haskell | delete previous sprite texture | module Animate.Preview.Loader where
import qualified Data.Map as Map
import qualified Data.Vector as V
import qualified SDL
import Control.Monad.IO.Class (MonadIO(..))
import Control.Applicative ((<|>))
import Control.Monad.Reader (asks)
import Control.Concurrent (modifyMVar_, readMVar)
import Data.Text.Conversions (t... |
20ee3fb9b37f1bd33492464ed8c137fc13b7a98701f2ee81d7dedcfda3b884f4 | SNePS/SNePS2 | snepshandler.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNEBR ; Base : 10 -*-
Copyright ( C ) 1984 - -2013 Research Foundation of
;; State University of New York
Version : $ I d : snepshandler.lisp , v 1.5 2013/08/28 19:07:24 shapiro Exp $
;; This file is part of SNePS.
$ BEGIN LICENSE... | null | https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/snebr/snepshandler.lisp | lisp | Syntax : Common - Lisp ; Package : SNEBR ; Base : 10 -*-
State University of New York
This file is part of SNePS.
you may
not use this file except in compliance with the License. You
may obtain a copy of the License at
. edu/sneps/Downloads/ubpl.pdf.
or implied. See the License for t... |
Copyright ( C ) 1984 - -2013 Research Foundation of
Version : $ I d : snepshandler.lisp , v 1.5 2013/08/28 19:07:24 shapiro Exp $
$ BEGIN LICENSE$
The contents of this file are subject to the University at
Software distributed under the License is distributed on an
" AS IS " basis , WITHOUT WARRANTY OF... |
9fa1f9de2919509fcc2bfa9f68893328a50b33174fabc344dcceb439f4639a4b | orionsbelt-battlegrounds/obb-rules | privatize.cljc | (ns obb-rules.privatize
"Functions that hide private data on games"
(:require [obb-rules.game :as game]
[obb-rules.board :as board]
[obb-rules.element :as element]))
(defmulti game
"Privatizes a board"
(fn [game & player] (keyword (game/state game))))
(defn- remove-element
"Removes a... | null | https://raw.githubusercontent.com/orionsbelt-battlegrounds/obb-rules/97fad6506eb81142f74f4722aca58b80d618bf45/src/obb_rules/privatize.cljc | clojure | (ns obb-rules.privatize
"Functions that hide private data on games"
(:require [obb-rules.game :as game]
[obb-rules.board :as board]
[obb-rules.element :as element]))
(defmulti game
"Privatizes a board"
(fn [game & player] (keyword (game/state game))))
(defn- remove-element
"Removes a... | |
364c272112a9204496da68bc8929bac7f66a7f45b8a028a797b2345ccbed40be | 314eter/ocaml-http2 | settings.ml | open S
type identifier = int
type value = int
type settings = int array
let header_table_size = 0x1
let enable_push = 0x2
let max_concurrent_streams = 0x3
let initial_window_size = 0x4
let max_frame_size = 0x5
let max_header_list_size = 0x6
let identifier_of_int id = id
let set settings id value =
match id with
... | null | https://raw.githubusercontent.com/314eter/ocaml-http2/5f54f92fd56827a538046316f50504a25a778fd0/src/settings.ml | ocaml | open S
type identifier = int
type value = int
type settings = int array
let header_table_size = 0x1
let enable_push = 0x2
let max_concurrent_streams = 0x3
let initial_window_size = 0x4
let max_frame_size = 0x5
let max_header_list_size = 0x6
let identifier_of_int id = id
let set settings id value =
match id with
... | |
afa77984d24bc975cf50322d71861c02040a9afa8f18331156999afa77b998b5 | Kakadu/fp2022 | typing.ml | * Copyright 2022 - 2023 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
module VarSet = struct
include Caml.Set.Make (Int)
let pp ppf s =
Format.fprintf ppf "[ ";
iter (Format.fprintf ppf "%d; ") s;
Format.fprintf ppf "]"
;;
end
type binder_set = VarSet.t [@@deriving show { with_path = f... | null | https://raw.githubusercontent.com/Kakadu/fp2022/0ecfd0a84158d9897c26d07108437e9036b92f05/OCamlPrintf/lib/typing.ml | ocaml | primitive (base) types | * Copyright 2022 - 2023 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
module VarSet = struct
include Caml.Set.Make (Int)
let pp ppf s =
Format.fprintf ppf "[ ";
iter (Format.fprintf ppf "%d; ") s;
Format.fprintf ppf "]"
;;
end
type binder_set = VarSet.t [@@deriving show { with_path = f... |
c0c7809a43b813083f07a1fe50730ab5eda06781729ec56182b93c5511cfb7fe | mirage/irmin-chunk | irmin_chunk.ml |
* Copyright ( c ) 2013 - 2015 < >
* Copyright ( c ) 2015 Allah < >
*
* 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 .
*
*... | null | https://raw.githubusercontent.com/mirage/irmin-chunk/f943944d8afd8642c552331c31b97adf1956f855/lib/irmin_chunk.ml | ocaml | An hanlder to the underlying database.
the size of chunks.
the maximum number of children a node can have.
the total number of blocks which are needed.
the number of useful bytes in the last block.
the number of data blocks
the number of tree nodes |
* Copyright ( c ) 2013 - 2015 < >
* Copyright ( c ) 2015 Allah < >
*
* 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 .
*
*... |
ca025d192a7d86cafb9ab453bb770f7f4d0188946495777d9cb8b3a6f543d570 | CBMM/tagging | APIDocs.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
module APIDocs where
import qualified Data.Text as T
import Data.Time
import Database.Groundhog.Core
import GHC.Int
import Servant
import Servant.Docs
import Tagging.Response
import Tagging.Sti... | null | https://raw.githubusercontent.com/CBMM/tagging/15f257394f3dda5baf6db0581a52d9c9f99e2abe/tagging-server/src/APIDocs.hs | haskell | # LANGUAGE OverloadedStrings #
toSample _ = Just True
toSample _ = Just () | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module APIDocs where
import qualified Data.Text as T
import Data.Time
import Database.Groundhog.Core
import GHC.Int
import Servant
import Servant.Docs
import Tagging.Response
import Tagging.Stimulus
import Tagging.User
import Ta... |
c1679c3ef930abc76d02fd2a62e1a5bd97b519bf8e9017161a333056fde08db6 | flora-pm/flora-server | OddJobSpec.hs | module Flora.OddJobSpec where
import Data.Aeson
import Data.UUID
import Distribution.Types.Version
import Test.Tasty
import Test.Tasty.HUnit
import Flora.Model.Job
import Flora.Model.Package.Types
import Flora.Model.Release.Types
-- TODO aeson roundtrip tests
spec :: TestTree
spec =
testGroup
"odd-job"
[ t... | null | https://raw.githubusercontent.com/flora-pm/flora-server/c214c0b5d5db71a8330eb69326284be5a4d5e858/test/Flora/OddJobSpec.hs | haskell | TODO aeson roundtrip tests | module Flora.OddJobSpec where
import Data.Aeson
import Data.UUID
import Distribution.Types.Version
import Test.Tasty
import Test.Tasty.HUnit
import Flora.Model.Job
import Flora.Model.Package.Types
import Flora.Model.Release.Types
spec :: TestTree
spec =
testGroup
"odd-job"
[ testCase "Readme aeson fixture"... |
ee67c8c471d66b47a80a38bbef77c0048569db5f9651535f64253d1a19632d27 | TDacik/Deadlock | CFG_utils.mli | Utilities for scanning and searching in Control Flow Graph that are not implemented in Frama - C.
* All functions use syntactic information ( mainly reachability ) only and are therefore
* under - approximations .
*
* Author : ( ) , 2020
* All functions use syntactic information (mainly reachabilit... | null | https://raw.githubusercontent.com/TDacik/Deadlock/4f6d39062f727983f6f6d52659c291731b3064b4/src/utils/CFG_utils.mli | ocaml | * Return all (possible unreachable) program statements satisfying given predicate.
* Return all (possible unreachable) program statements satisfying given predicate.
* Return all functions satisfying given predicate.
* Callsites of statement's englobing function.
* Callsites of statement's englobing function and of... | Utilities for scanning and searching in Control Flow Graph that are not implemented in Frama - C.
* All functions use syntactic information ( mainly reachability ) only and are therefore
* under - approximations .
*
* Author : ( ) , 2020
* All functions use syntactic information (mainly reachabilit... |
e7f2f70d5dea6798d64a537da5f4603f097ca4c3bf5f1177fe54662ebf442448 | tommaisey/aeon | hpz1.help.scm | ;; (hpz1 in)
Two point difference filter .
(audition (out 0 (hpz1 (mul (white-noise ar) 0.25))))
| null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/filters/hpz1.help.scm | scheme | (hpz1 in) |
Two point difference filter .
(audition (out 0 (hpz1 (mul (white-noise ar) 0.25))))
|
d62934f6bd5f3fef46962921b6f079be3eba540be900c05facfb8b539852d3e9 | lancelet/haskell-opencl-examples | Main.hs | # LANGUAGE QuasiQuotes #
|
Module : Main
Description : OpenCL Hello World Example
Copyright : ( c ) , 2017
License : :
Stability : experimental
Portability : POSIX + OpenCL
This is a Hello World OpenCL example that stores buffer data in vectors .
More information in this blog ... | null | https://raw.githubusercontent.com/lancelet/haskell-opencl-examples/3ee2598942467847610ff6e6e45b4564d685480b/app/01-hello-world/Main.hs | haskell | Describe the OpenCL Environment
Create a Context, Queue and a CLUtil OpenCLState
Create the Kernel
Set up memory
Buffers for input and output data.
since we're using CPU. The performance here may not be ideal, because
we're copying the buffer. However, it's safe, and not unduly nested.
Run the kernel
Get the r... | # LANGUAGE QuasiQuotes #
|
Module : Main
Description : OpenCL Hello World Example
Copyright : ( c ) , 2017
License : :
Stability : experimental
Portability : POSIX + OpenCL
This is a Hello World OpenCL example that stores buffer data in vectors .
More information in this blog ... |
e3a3e9b3b528b1f6f044dacaf96a83e00912f64188439c330a1f0e394075b68b | spurious/sagittarius-scheme-mirror | dbm.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
dbm.scm - generic DBM interface
;;;
Copyright ( c ) 2010 - 2013 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redist... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/dbm.scm | scheme | coding : utf-8 ; -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaime... | dbm.scm - generic DBM interface
Copyright ( c ) 2010 - 2013 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
the inte... |
1151e2c11e8cb844671d3020efe36e33c2b0388277754b61f7a2d86e0e483b11 | pfdietz/ansi-test | dotimes.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Jan 8 07:27:15 2005
Contains : Tests of DOTIMES
(deftest dotimes.1
(dotimes (i 10))
nil)
(deftest dotimes.2
(dotimes (i 10 'a))
a)
(deftest dotimes.3
(dotimes (i 10 (values))))
(deftest dotimes.3a
(dotimes (i 10 (values 'a 'b 'c)))
a b c... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/iteration/dotimes.lsp | lisp | -*- Mode: Lisp -*-
Implicit nil block has the right scope
Check there's an implicit tagbody
Check that at the time the result form is evaluated,
the index variable is set to the number of times the loop
was executed.
Check that the variable is not bound in the count form
Check special variable decls
Scope o... | Author :
Created : Sat Jan 8 07:27:15 2005
Contains : Tests of DOTIMES
(deftest dotimes.1
(dotimes (i 10))
nil)
(deftest dotimes.2
(dotimes (i 10 'a))
a)
(deftest dotimes.3
(dotimes (i 10 (values))))
(deftest dotimes.3a
(dotimes (i 10 (values 'a 'b 'c)))
a b c)
(deftest dotimes.4
... |
5245b0074d8cfd7080ed127b8707f852d97d59a1103707bb6dfe541c8ebab911 | nfrisby/invariant-functors | Invariant.hs | # LANGUAGE CPP #
#if !(MIN_VERSION_base(4,16,0)) || !(MIN_VERSION_transformers(0,6,0))
# OPTIONS_GHC -fno - warn - deprecations #
#endif
#define GHC_GENERICS_OK __GLASGOW_HASKELL__ >= 702
#if GHC_GENERICS_OK
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFa... | null | https://raw.githubusercontent.com/nfrisby/invariant-functors/ffe96dfa02cec4d40b54bfc30988656ea86257ed/src/Data/Functor/Invariant.hs | haskell | * @Invariant@
** @GHC.Generics@
$ghcgenerics
* @Invariant2@
base
array
bifunctors
comonad
containers
contravariant
profunctors
stm
tagged
transformers
unordered-containers
-----------------------------------------------------------------------------
The Invariant class
----------------------------------... | # LANGUAGE CPP #
#if !(MIN_VERSION_base(4,16,0)) || !(MIN_VERSION_transformers(0,6,0))
# OPTIONS_GHC -fno - warn - deprecations #
#endif
#define GHC_GENERICS_OK __GLASGOW_HASKELL__ >= 702
#if GHC_GENERICS_OK
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFa... |
4f1c2e9bace5b8a5a2c6e5d8fee325b6812d15389206ebc0332f68656af7ca29 | hurryabit/pukeko | Surface.hs | -- | AST generated by the parser.
module Pukeko.AST.Surface
( -- * Types
Package (..)
, Module (..)
, Decl (..)
, TyConDecl (..)
, TmConDecl (..)
, SignDecl (..)
, ClssDecl (..)
, InstDecl (..)
, ExtnDecl (..)
, InfxDecl (..)
, TypeAtom (..)
, Type (..)
, TypeCstr (..)
, TypeScheme (..)
... | null | https://raw.githubusercontent.com/hurryabit/pukeko/d11a101a41123c5151bcdd7dd2d0ef53c65483c2/src/Pukeko/AST/Surface.hs | haskell | | AST generated by the parser.
* Types
* Smart constructors
FIXME: Use a proper type to distinguish between 'type' and 'data'. | module Pukeko.AST.Surface
Package (..)
, Module (..)
, Decl (..)
, TyConDecl (..)
, TmConDecl (..)
, SignDecl (..)
, ClssDecl (..)
, InstDecl (..)
, ExtnDecl (..)
, InfxDecl (..)
, TypeAtom (..)
, Type (..)
, TypeCstr (..)
, TypeScheme (..)
, CoercionDir (..)
, Coercion (..)
, Bind (... |
968ff869b58a563debba3b5eaec10180662c06d29f5ca241b51efdb62f87f9f4 | kronkltd/jiksnu | group_membership_routes_test.clj | (ns jiksnu.modules.web.routes.group-membership-routes-test
(:require [ciste.sections.default :refer [uri]]
[clj-factory.core :refer [factory]]
[clojure.data.json :as json]
[jiksnu.mock :as mock]
jiksnu.modules.web.routes.group-membership-routes
[jiksnu.helpe... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/test/jiksnu/modules/web/routes/group_membership_routes_test.clj | clojure | (ns jiksnu.modules.web.routes.group-membership-routes-test
(:require [ciste.sections.default :refer [uri]]
[clj-factory.core :refer [factory]]
[clojure.data.json :as json]
[jiksnu.mock :as mock]
jiksnu.modules.web.routes.group-membership-routes
[jiksnu.helpe... | |
919bb2c95ba5c247aef1eb5ad1eee6de9bd10ea5c591363eb01b2fb62c892426 | mfoemmel/erlang-otp | test_server_line.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 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/test_server/src/test_server_line.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 2004 - 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(test_server_line).
-export([get_li... |
43d3b2f8a60bdba7403d00c7c6f3552d657caf3588bfef2fc605e39aa308da9b | callum-oakley/advent-of-code | 12.clj | (ns aoc.2015.12
(:require
[clojure.data.json :as json]
[clojure.test :refer [deftest are]]))
(def parse json/read-str)
(defn part-* [p v]
(cond
(number? v) v
(string? v) 0
(vector? v) (->> v (map #(part-* p %)) (apply +))
(map? v) (if (and (= 2 p) (some #{"red"} (vals v)))
0
... | null | https://raw.githubusercontent.com/callum-oakley/advent-of-code/fa79f6483157e3aeeb43dd8661ca5d308d203933/src/aoc/2015/12.clj | clojure | (ns aoc.2015.12
(:require
[clojure.data.json :as json]
[clojure.test :refer [deftest are]]))
(def parse json/read-str)
(defn part-* [p v]
(cond
(number? v) v
(string? v) 0
(vector? v) (->> v (map #(part-* p %)) (apply +))
(map? v) (if (and (= 2 p) (some #{"red"} (vals v)))
0
... | |
32fbfb40cf444af623e08d15b6b9afb8031c56c68ab5a0292dabc8ead5b617c1 | metosin/pohjavirta | websocket.clj | (ns pohjavirta.websocket
(:import [io.undertow.websockets WebSocketConnectionCallback]
[io.undertow.websockets.core AbstractReceiveListener
BufferedBinaryMessage
BufferedTextMessage
Close... | null | https://raw.githubusercontent.com/metosin/pohjavirta/022a44eec9109a0baf93827843eeba15265adea7/src/pohjavirta/websocket.clj | clojure | (ns pohjavirta.websocket
(:import [io.undertow.websockets WebSocketConnectionCallback]
[io.undertow.websockets.core AbstractReceiveListener
BufferedBinaryMessage
BufferedTextMessage
Close... | |
e16e200152d073f7087d16fbce89a846497bab7c1d5b8fcaa3df604e4334f729 | marcoheisig/adventofcode | day-23.lisp | (defpackage :adventofcode-2019-day-23
(:use :cl :intcode-computer))
(in-package :adventofcode-2019-day-23)
(defun solve-day-23-part-1 ()
(let* ((n 50)
(program (read-intcode-computer-program "input"))
(queues (make-array n))
(threads (make-array n)))
(loop for index below n do
... | null | https://raw.githubusercontent.com/marcoheisig/adventofcode/e96a0da17cd79f424af984ed2648b49ffdacb893/2019/day-23/day-23.lisp | lisp | (defpackage :adventofcode-2019-day-23
(:use :cl :intcode-computer))
(in-package :adventofcode-2019-day-23)
(defun solve-day-23-part-1 ()
(let* ((n 50)
(program (read-intcode-computer-program "input"))
(queues (make-array n))
(threads (make-array n)))
(loop for index below n do
... | |
463fdafe147cd92598bd9d8c4cc1eceaacdf1d4c2049c5aeae07d4e5226c2f94 | chshersh/iris | Settings.hs | |
Module : . Settings
Copyright : ( c ) 2022
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Experimental
Portability : Portable
Settings of a CLI app environment .
You 're encouraged to create a sepa... | null | https://raw.githubusercontent.com/chshersh/iris/c1597ee1b7e271d744e9460fccef2a46804e9ccf/src/Iris/Settings.hs | haskell | data data for your CLI arguments and CLI parser
custom application environment
CLI parser for Options
Custom app environment
Application name
Short app description
Long app description to appear in --help
How to print app version with the --version flag
data data for your CLI arguments and CLI parser
... | |
Module : . Settings
Copyright : ( c ) 2022
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Experimental
Portability : Portable
Settings of a CLI app environment .
You 're encouraged to create a sepa... |
1d0d06f3659519fda1acd5a48ffba2f47fed1df97fadcb2fe8f0ae7fbf856bc4 | snapframework/snap-auth | Auth.hs | |
This module provides simple and secure high - level authentication
functionality for Snap applications .
This module provides simple and secure high-level authentication
functionality for Snap applications.
-}
module Snap.Auth
(
-- * Higher Level Functions
-- $higherlevel
mkAuthCredentia... | null | https://raw.githubusercontent.com/snapframework/snap-auth/45294e8587ac21d864614df188898348704a4986/src/Snap/Auth.hs | haskell | * Higher Level Functions
$higherlevel
* MonadAuth Class
* Types
* Crypto Stuff You May Need
----------------------------------------------------------------------------
| External / end-user-facing identifier for a 'AuthUser'.
For example, this could be a (\"username\", \"john.doe\") pair submitted
through a ... | |
This module provides simple and secure high - level authentication
functionality for Snap applications .
This module provides simple and secure high-level authentication
functionality for Snap applications.
-}
module Snap.Auth
(
mkAuthCredentials
, performLogin
, performLogout
, curren... |
14cba2deb89e30e625622652ab415d43e6aeb0510b65b095978af4fea49b2c96 | luminus-framework/luminus-template | sassc.clj | (ns leiningen.new.sassc
(:require [leiningen.new.common :refer :all]))
;;On boot this can be run with the "sass" task.
(defn sassc-assets [{:keys [resource-path]}]
[[(str resource-path "/scss/screen.scss") "sassc/resources/scss/screen.scss"]])
(defn sassc-config [{:keys [resource-path]}]
{:sassc
[{:src ... | null | https://raw.githubusercontent.com/luminus-framework/luminus-template/3278aa727cef0a173ed3ca722dfd6afa6b4bbc8f/src/leiningen/new/sassc.clj | clojure | On boot this can be run with the "sass" task. | (ns leiningen.new.sassc
(:require [leiningen.new.common :refer :all]))
(defn sassc-assets [{:keys [resource-path]}]
[[(str resource-path "/scss/screen.scss") "sassc/resources/scss/screen.scss"]])
(defn sassc-config [{:keys [resource-path]}]
{:sassc
[{:src (str resource-path "/scss/screen.scss")
... |
96f00c3f5b11b2a7244ebc5955e7dc6390e3cce9ba87a9398f14036297ed6ba5 | nuprl/gradual-typing-performance | automata-adapted.rkt | #lang typed/racket/base
(provide
Payoff
Automaton
A
interact
)
(require
benchmark-util
"population-adapted.rkt"
)
(require/typed/check "automata.rkt"
[#:opaque Automaton automaton?]
;[set-current-state! (-> Automaton Name Void)]
[ set - states ! ( - > Automaton ( Vectorof state ) Void ) ]
(A (-> [Popul... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/issues/vector-ref-chap/automata-adapted.rkt | racket | [set-current-state! (-> Automaton Name Void)] | #lang typed/racket/base
(provide
Payoff
Automaton
A
interact
)
(require
benchmark-util
"population-adapted.rkt"
)
(require/typed/check "automata.rkt"
[#:opaque Automaton automaton?]
[ set - states ! ( - > Automaton ( Vectorof state ) Void ) ]
(A (-> [Population Automaton]))
(interact (-> Automaton Auto... |
846dacb10f5841ca3b564c23b381a4223094f36b53766aa466fb4e9070013ac1 | shirok/Gauche | null.scm | ;;;
;;; dbd.null - A database driver that does (almost) nothing
;;;
(define-module dbd.null
(use dbi)
(export dbd-null-test-result-set!))
(select-module dbd.null)
The null driver is mainly for testing dbi implementation .
;; It just stores information passed via driver API, and the
;; test routine will query it... | null | https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/lib/dbd/null.scm | scheme |
dbd.null - A database driver that does (almost) nothing
It just stores information passed via driver API, and the
test routine will query it later to see infos are passed
down to the driver correctly. |
(define-module dbd.null
(use dbi)
(export dbd-null-test-result-set!))
(select-module dbd.null)
The null driver is mainly for testing dbi implementation .
(define-class <null-driver> (<dbi-driver>)
())
(define-class <null-connection> (<dbi-connection>)
((attr-string :init-keyword :attr-string)
(attr-ali... |
ed804cadb488b5a64aec359c3eee06dbcbf44f2d709ad0842adc87fc831a9fcf | ocaml-ppx/ocamlformat | doc_comments.mli | * Manpages . See { ! . Manpage } .
type block =
[ `S of string
| `P of string
| `Pre of string
| `I of string * string
| `Noblank
| `Blocks of block list ]
include M with type t := t
* ipsum dolor sit amet , adipiscing elit , sed do
val escape : string -> string
(** [escape s] escapes [s] from the do... | null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/6c3e742ae5b659338cbdf307f0dbe40b1efca085/test/passing/tests/doc_comments.mli | ocaml | * [escape s] escapes [s] from the doc language.
* [subst b ~subst s], using [b], substitutes in [s] variables of the form
"$(doc)" by their [subst] definition. This leaves escapes and markup
directives $(markup,...) intact.
@raise Invalid_argument in case of illegal syntax.
* [doc_to_plain b ~subst s] us... | * Manpages . See { ! . Manpage } .
type block =
[ `S of string
| `P of string
| `Pre of string
| `I of string * string
| `Noblank
| `Blocks of block list ]
include M with type t := t
* ipsum dolor sit amet , adipiscing elit , sed do
val escape : string -> string
type title = string * int * string * ... |
f16331d401b8dc77a72214bb039b80af8adda868143333c41584e3888173a63f | brendanhay/amazonka | DescribeWorkspaceSnapshots.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workspaces/gen/Amazonka/WorkSpaces/DescribeWorkspaceSnapshots.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Amazonka.WorkSpaces.DescribeWorkspaceSnapshots
Stability : auto-generated
* Creating a Request
* Request Lenses
* Destructuring the Response
* Response Lenses
| /See:/ 'newDescribeWorkspaceSnapshots' smart constructor.
|
Create a value ... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
8eae65e17e4bc4ddf0d2fe5ba695ac0730e9ba371812316e9e95f50bcaa56601 | Copilot-Language/copilot-core | Dynamic.hs | --------------------------------------------------------------------------------
Copyright © 2011 National Institute of Aerospace / Galois , Inc.
--------------------------------------------------------------------------------
{-# LANGUAGE Safe #-}
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE Rank2Types #-}
... | null | https://raw.githubusercontent.com/Copilot-Language/copilot-core/a8b79da96b11da20c36c4d4e0624e234a4d04323/src/Copilot/Core/Type/Dynamic.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
# LANGUAGE Safe #
# LANGUAGE Rank2Types #
| An implementation of dynamic types using "Copilot.Core.Type.Equality".
The theory behind this technique is described... | Copyright © 2011 National Institute of Aerospace / Galois , Inc.
# LANGUAGE ExistentialQuantification #
* , and Swierstra , ,
ACM SIGPLAN Notices vol . 37 , p. 157 - 166 , 2002
module Copilot.Core.Type.Dynamic
( Dynamic (..)
, DynamicF (..)
, toDyn
, fromDyn
, toDynF
, fromDynF
) where
im... |
018573e56a8dc2eaa973e3918a52a6284ce8547b5629f10868e4a4325def7c59 | slyrus/mcclim-old | freetype-cffi.lisp | ;;; automatically generated, hand tweaked, do not regenerate.
(in-package :freetype)
(define-foreign-library libfreetype
(:unix (:or "libfreetype.so.6" "libfreetype"))
(t (:default "libfreetype")))
(use-foreign-library libfreetype)
(defmacro define-alien-type (&rest rest)
;; cffi seems to have a much simpler... | null | https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Experimental/freetype/freetype-cffi.lisp | lisp | automatically generated, hand tweaked, do not regenerate.
cffi seems to have a much simpler model of pointer
seems like pixel-mode- might possibly be an alias for this...
palette-mode-
(struct freetype::sub-glyph-))
this is a pointer to a pointer to a face-rec...
(define-alien-type freetype:char-map-rec
(str... |
(in-package :freetype)
(define-foreign-library libfreetype
(:unix (:or "libfreetype.so.6" "libfreetype"))
(t (:default "libfreetype")))
(use-foreign-library libfreetype)
(defmacro define-alien-type (&rest rest)
types ... [ 2006/05/23 : rpg ]
(cond ((and (= (length rest) 2)
(eq (car (second rest)) '*... |
d251fb40c15f10056692d3ce597b205de0ff05938516c28bffa55f93cd42fb21 | clojure-interop/google-cloud-clients | DatabaseClient.clj | (ns com.google.cloud.spanner.DatabaseClient
"Interface for all the APIs that are used to read/write data into a Cloud Spanner database. An
instance of this is tied to a specific database."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.spanner DatabaseClient]))
(defn write
"Write... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/DatabaseClient.clj | clojure |
if the mutations are not idempotent, this may lead to a failure
| (ns com.google.cloud.spanner.DatabaseClient
"Interface for all the APIs that are used to read/write data into a Cloud Spanner database. An
instance of this is tied to a specific database."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.spanner DatabaseClient]))
(defn write
"Write... |
8dae23ae1c1b108ffd18f0752bf910f9ac9f1e6d923a7e7c14d0ab57083374be | ejconlon/blanks | Scope.hs | # LANGUAGE UndecidableInstances #
module Blanks.Scope
( Scope (..)
, pattern ScopeBound
, pattern ScopeFree
, pattern ScopeAbstract
, pattern ScopeEmbed
, scopeBind
, scopeBindOpt
, scopeLift
, scopeBindFree
, scopeBindFree1
, scopeFillBound
, scopeFillBound1
, scopeUnBindFree
, scopeUnBind... | null | https://raw.githubusercontent.com/ejconlon/blanks/6266004207337029968f5150588a1d4e75e8d20e/src/Blanks/Scope.hs | haskell | | A simple wrapper for your expression functor that knows how to name-bind.
Create free variables is 'pure', bind them with '>>=', and list free variables with folds.
* Interface
| Substitution as a kind of monadic bind.
| Optional substitution as another kind of monadic bind.
| Lift an expression functor into th... | # LANGUAGE UndecidableInstances #
module Blanks.Scope
( Scope (..)
, pattern ScopeBound
, pattern ScopeFree
, pattern ScopeAbstract
, pattern ScopeEmbed
, scopeBind
, scopeBindOpt
, scopeLift
, scopeBindFree
, scopeBindFree1
, scopeFillBound
, scopeFillBound1
, scopeUnBindFree
, scopeUnBind... |
dd475e5429a994b7d3ff10dbf769ab2312bb29d5cf4660e55c0d872f705e712e | silky/quipper | PhaseTest.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
-- $ Test whether the quantum simulator works cor... | null | https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/tests/PhaseTest.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
======================================================================
$ Test whether the quantum simulator works correctly on a global
phase gate.
| This function should compute a Not gate. | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
import Quipper
import QuipperLib.Simulation
testcirc :: Qubit -> Circ Qubit
testcirc a = do
hadamard_at a
global_phase 1.0 `controlled` a
hadamard_at a
return a
main = do
b <- run_generic_io d testcirc False
putStrLn ("testc... |
2a39199dcf58bc3da6def3ddbcb9db67d3b7d4431fbe965b7e24bc32469824be | ghollisjr/cl-ana | common.lisp | Copyright by The HDF Group .
;;;; All rights reserved.
;;;;
This file is part of hdf5 - cffi .
The full hdf5 - cffi copyright notice , including terms governing
;;;; use, modification, and redistribution, is contained in the file COPYING,
;;;; which can be found at th... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/hdf-cffi/examples/common.lisp | lisp | All rights reserved.
use, modification, and redistribution, is contained in the file COPYING,
which can be found at the root of the source code distribution tree.
If you do not have access to this file, you may request a copy from
.
handles
list arguments expected
rank check
element checks
go
common string ... | Copyright by The HDF Group .
This file is part of hdf5 - cffi .
The full hdf5 - cffi copyright notice , including terms governing
(defpackage #:h5ex
(:documentation "hdf5-examples: Common helpers for hdf5-cffi examples.")
(:use #:cl)
(:export close-handle
... |
6fe35cc834e31685a38147180622b38325add5bbdebf00a311de8f714cff82fa | atolab/zenoh | zenoh_storages_be.mli |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | null | https://raw.githubusercontent.com/atolab/zenoh/32e311aae6be93c001fd725b4d918b2fb4e9713d/src/zenoh-storages/zenoh-storages-be/zenoh-storages-be-lib/zenoh_storages_be.mli | ocaml |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | |
011c0147e456bd0aca043379c753ab21dd9d111fc738aefd7d7fdc187210be38 | well-typed-lightbulbs/ocaml-esp32 | test.ml | (* TEST
*)
let test_not () =
assert (Bool.not false = true);
assert (Bool.not true = false);
()
let test_and () =
let wit = ref 0 in
assert (Bool.( && ) (incr wit; false) (incr wit; false) = false);
assert (!wit = 1); wit := 0;
assert (Bool.( && ) (incr wit; false) (incr wit; true) = false);
assert (!... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/lib-bool/test.ml | ocaml | TEST
|
let test_not () =
assert (Bool.not false = true);
assert (Bool.not true = false);
()
let test_and () =
let wit = ref 0 in
assert (Bool.( && ) (incr wit; false) (incr wit; false) = false);
assert (!wit = 1); wit := 0;
assert (Bool.( && ) (incr wit; false) (incr wit; true) = false);
assert (!wit = 1); w... |
5d0e751bb82327f69db0513406616416ddb7a1e5ea58664b80d035ffd6ce5989 | openmusic-project/OMChroma | expand-model.lisp | (in-package :om)
;;;===============================================================
;;; CR-CONTROL
;;; a structure for the specification of a matching between the CR-MODEL data with some classes of class-array
(defclass cr-ctrl (ompatchabs)
((tmpmodeldata :accessor tmpmodeldata :initform nil :initarg :tmp... | null | https://raw.githubusercontent.com/openmusic-project/OMChroma/5ded34f22b59a1a93ea7b87e182c9dbdfa95e047/sources/om6/cr-models/expand-model.lisp | lisp | ===============================================================
CR-CONTROL
a structure for the specification of a matching between the CR-MODEL data with some classes of class-array
(print "compiling control")
==================================================================
compatibility with the former cr-c... | (in-package :om)
(defclass cr-ctrl (ompatchabs)
((tmpmodeldata :accessor tmpmodeldata :initform nil :initarg :tmpmodeldata)))
(pushr 'cr-control *spec-new-boxes-types*)
(defmethod get-new-box-from-type ((type (eql 'cr-control)) position container)
(let* ((name (mk-unique-name container "CR-CONTROL-P... |
55fb8fe29283483f5019667101823256cd79f26aca79700d98f9cba55f42bdea | yariv/twoorl | twoorl_greek.erl | This file is part of Twoorl .
%%
%% Twoorl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) any later version.
%%
%% Twoorl is distributed in the ho... | null | https://raw.githubusercontent.com/yariv/twoorl/77b6bea2e29283d09a95d8db131b916e16d2960b/src/bundles/twoorl_greek.erl | erlang |
Twoorl is free software: you can redistribute it and/or modify
(at your option) any later version.
Twoorl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License f... | This file is part of Twoorl .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
along with . If not , see < / > .
-module(twoorl_greek).
-export([bundle... |
9738c6e44f48a6f48a554c59a2bc716401cfcd23a040f73bb5c04480794b3ef2 | TheRiver/L-MATH | matrix.lisp | (in-package #:l-math)
;;; L-MATH: a library for simple linear algebra.
Copyright ( C ) 2009 - 2011
;;;
;;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , o... | null | https://raw.githubusercontent.com/TheRiver/L-MATH/81f43d21ea0bc75f949fbdfb3701afbab4183d38/matrix.lisp | lisp | L-MATH: a library for simple linear algebra.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PA... | (in-package #:l-math)
Copyright ( C ) 2009 - 2011
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
Additional permission under GNU GPL version 3 section ... |
cc578dbd080a0ef44a5d4867950dd8cc56b00c295929e9fee8bbe5c0adab9083 | macourtney/drift | Drift.clj | (ns drift.Drift
(:require [drift.core :as core]
[drift.execute :as execute]
[drift.runner :as runner]
[drift.version :as version])
(:import [drift.listener_protocol ListenerProtocol])
(:gen-class
:methods [[init [java.util.List] Object]
[migrate [Long java.uti... | null | https://raw.githubusercontent.com/macourtney/drift/b5cf735ab41ff2c95b0b1d9cf990faa342353171/src/drift/Drift.clj | clojure | (ns drift.Drift
(:require [drift.core :as core]
[drift.execute :as execute]
[drift.runner :as runner]
[drift.version :as version])
(:import [drift.listener_protocol ListenerProtocol])
(:gen-class
:methods [[init [java.util.List] Object]
[migrate [Long java.uti... | |
0e953b1557e9145f8231b999589e804189c3cef977cfa16eab2d7c19a24fe2c4 | estatico/generic-override | Encode.hs | # LANGUAGE DefaultSignatures #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
{-# LANGUAGE TypeSynonymInstanc... | null | https://raw.githubusercontent.com/estatico/generic-override/dff5916468cedc55ba4a608436740b2d6feca318/generic-override/test/Encode.hs | haskell | # LANGUAGE TypeSynonymInstances #
| Create an overlapping instance to verify that overriding with
# OVERLAPPING # | # LANGUAGE DefaultSignatures #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances... |
ee8aa55cd785384d5c6909fd1f8469551c82bd5c8438c8f638bdbb8e043ac15e | ericlavigne/tic-tac-toe | minimax.cljc | (ns ai.minimax
(:require ai.game))
; evaluator is fn[game,perspective]->float
(defn evaluate-with-depth [game evaluator perspective depth]
(let [available (ai.game/available-moves game)]
(if (or (<= depth 0) (empty? available))
(evaluator game perspective)
(let [maximizing (= perspective (ai.game/n... | null | https://raw.githubusercontent.com/ericlavigne/tic-tac-toe/7cf9c533618d2763e5d9d332da380b91cf460195/src/ai/minimax.cljc | clojure | evaluator is fn[game,perspective]->float | (ns ai.minimax
(:require ai.game))
(defn evaluate-with-depth [game evaluator perspective depth]
(let [available (ai.game/available-moves game)]
(if (or (<= depth 0) (empty? available))
(evaluator game perspective)
(let [maximizing (= perspective (ai.game/next-player game))
possible-scor... |
d940c32edf825951cf5425c2788db13a898d0005707c30899cc2a07d275e2d4b | commercialhaskell/pantry | HTTP.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Pantry.HTTP
( module Export
, withResponse
, httpSink
, httpSinkChecked
) where
import Conduit
import Network.HTTP.Client as Export (parseRequest)
import Network.HTTP.Client as Export (par... | null | https://raw.githubusercontent.com/commercialhaskell/pantry/c7923fc963e36efd179ba301ac426139a9dc182d/src/Pantry/HTTP.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
module Pantry.HTTP
( module Export
, withResponse
, httpSink
, httpSinkChecked
) where
import Conduit
import Network.HTTP.Client as Export (parseRequest)
import Network.HTTP.Client as Export (parseUrlThrow)
import Networ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.