_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 |
|---|---|---|---|---|---|---|---|---|
a0df894dc74d14d6b1805ac64a0b734fcbf5f17d89df506d16bff5dc62519d03 | dbmcclain/vmath | simplex.lisp |
(in-package :vm)
(defun #1=simplex (errfn v &key nmax (tol 1d-6))
(let* ((dim (length v))
(verts (cons v
(loop for ix from 0 below dim collect
(let* ((vx (copy-seq v)))
(setf (aref vx ix) (* 1.1 (aref vx ix)))
... | null | https://raw.githubusercontent.com/dbmcclain/vmath/4f811af1a5ae80d864fbe9505054498d29f90e7a/simplex.lisp | lisp | check for convergence
compute centroid of vertices and reflect the worst vertex in the opposite
direction from there, starting from the centroid position
reflection is better so expand in same direction
is better?
contract in from centroid toward worst vertex
is better than worst?
shrink the simplex about the b... |
(in-package :vm)
(defun #1=simplex (errfn v &key nmax (tol 1d-6))
(let* ((dim (length v))
(verts (cons v
(loop for ix from 0 below dim collect
(let* ((vx (copy-seq v)))
(setf (aref vx ix) (* 1.1 (aref vx ix)))
... |
7b7663bd12688a4f9cba432456bbe295fed08faf270c7ce7ba82f43ce8374171 | progman1/genprintlib | input_handling.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/progman1/genprintlib/acc1e5cc46b9ce6191d0306f51337581c93ffe94/debugger/4.07.1/input_handling.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
OCaml port by and
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Unix
open Primitives
let active_files =
ref ([... |
48295926bb7c84bf71d0fe4333ccc67b9834542b1e48f0516b9be3bbbcf1534a | mark-watson/Clojure-AI-Book-Code | project.clj | (defproject python_interop_deeplearning "0.1.0-SNAPSHOT"
:description "Example using libpython-clj with the Python spaCy NLP library"
:url "-clj-examples"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:jvm-opts ["-Djdk.attach.allowAttachSelf"
"... | null | https://raw.githubusercontent.com/mark-watson/Clojure-AI-Book-Code/c68c71f671fc2bf75d95616348a9e04303d0da75/nlp_libpython/project.clj | clojure | (defproject python_interop_deeplearning "0.1.0-SNAPSHOT"
:description "Example using libpython-clj with the Python spaCy NLP library"
:url "-clj-examples"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:jvm-opts ["-Djdk.attach.allowAttachSelf"
"... | |
a3b1e6badcaf40f3fc3661a4aa94a641210a6c2d2476c24ffde4b61f50e5283e | turquoise-hexagon/euler | solution.scm | (import
(chicken fixnum)
(chicken sort)
(srfi 1)
(srfi 69))
(define-constant limit #e1e9)
(define (generate limit proc)
(let loop ((i 1) (acc '()))
(let ((_ (proc i)))
(if (fx> _ limit)
acc
(loop (fx+ i 1) (cons _ acc))))))
(define (palindrome? n)
(let loop ((i n) (acc 0))
(... | null | https://raw.githubusercontent.com/turquoise-hexagon/euler/55706a88df2869038d3b910d29f135776c7e3da7/src/spoilers/348/solution.scm | scheme | (import
(chicken fixnum)
(chicken sort)
(srfi 1)
(srfi 69))
(define-constant limit #e1e9)
(define (generate limit proc)
(let loop ((i 1) (acc '()))
(let ((_ (proc i)))
(if (fx> _ limit)
acc
(loop (fx+ i 1) (cons _ acc))))))
(define (palindrome? n)
(let loop ((i n) (acc 0))
(... | |
04c2ae0e3b9c20ff5fab01875b560b9a6ab6a01b20957f7590de0b1bbcde83bc | HugoPeters1024/hs-sleuth | Pure.hs | -- | Benchmarks various pure functions from the Text library
--
-- Tested in this benchmark:
--
-- * Most pure functions defined the string types
--
# LANGUAGE BangPatterns , CPP , GADTs , MagicHash #
# LANGUAGE DeriveGeneric , RecordWildCards #
# OPTIONS_GHC -fno - warn - orphans #
module Benchmarks.Pure
( initEnv... | null | https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/91aa2806ea71b7a26add3801383b3133200971a5/test-project/text-nofusion/benchmarks/haskell/Benchmarks/Pure.hs | haskell | | Benchmarks various pure functions from the Text library
Tested in this benchmark:
* Most pure functions defined the string types
Evaluate stuff before actually running the benchmark, we don't want to
count it here.
ByteString A
Lengths
Lines
, bgroup "concatMap"
]
| Split a bytestring in chunks
| ... | # LANGUAGE BangPatterns , CPP , GADTs , MagicHash #
# LANGUAGE DeriveGeneric , RecordWildCards #
# OPTIONS_GHC -fno - warn - orphans #
module Benchmarks.Pure
( initEnv
, benchmark
) where
import Control.DeepSeq (NFData (..))
import Control.Exception (evaluate)
import Test.Tasty.Bench (Benchmark, bgroup, be... |
cd34cd9e9651859aa9f2f6cab139582d6d670e310e69b80cbaa67e6d7b4d91cd | jackfirth/rebellion | definition-macro.rkt | #lang racket/base
(provide define-tuple-type)
(require (for-syntax racket/base
racket/sequence
rebellion/type/private/naming
(submod rebellion/type/tuple/binding
private-constructor)
rebellion/type/tuple/b... | null | https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/type/tuple/private/definition-macro.rkt | racket | @------------------------------------------------------------------------------ | #lang racket/base
(provide define-tuple-type)
(require (for-syntax racket/base
racket/sequence
rebellion/type/private/naming
(submod rebellion/type/tuple/binding
private-constructor)
rebellion/type/tuple/b... |
028dea0d27a2326c7f944e3bb277172d8c5865f6c6f47ac15b08dd6785c5e74c | ezrakilty/narc | Common.hs | module Database.Narc.Common where
type Tabname = String
type Field = String
| null | https://raw.githubusercontent.com/ezrakilty/narc/76310e6ac528fe038d8bdd4aa78fa8c555501fad/Database/Narc/Common.hs | haskell | module Database.Narc.Common where
type Tabname = String
type Field = String
| |
55e87d4c22188e02077e0bcb76c12575f1ba39dcd29a3c981188ff4dad94bb6f | fulcro-legacy/semantic-ui-wrapper | ui_portal.cljs | (ns fulcrologic.semantic-ui.addons.portal.ui-portal
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/addons/Portal/Portal" :default Portal]))
(def ui-portal
"A component that allows you to render children outside their parent.
Props:
- children (node): Pr... | null | https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/addons/portal/ui_portal.cljs | clojure | (ns fulcrologic.semantic-ui.addons.portal.ui-portal
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/addons/Portal/Portal" :default Portal]))
(def ui-portal
"A component that allows you to render children outside their parent.
Props:
- children (node): Pr... | |
8a3f22cb591b0555df5244971ba231cd3090ad47eb9bf3d5af4157ae3a266fe0 | parapluu/Concuerror | readers.erl | -module(readers).
-export([scenarios/0,test/0]).
scenarios() -> [{test, B, dpor} || B <- [0, 1, 2, 3, 4, 5, 6, 7]].
test() -> readers(6).
readers(N) ->
ets:new(tab, [public, named_table]),
Writer = fun() -> ets:insert(tab, {x, 42}) end,
Reader = fun(I) -> ets:lookup(tab, I), ets:lookup(tab, x) end,
s... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/bounding_tests/src/readers.erl | erlang | -module(readers).
-export([scenarios/0,test/0]).
scenarios() -> [{test, B, dpor} || B <- [0, 1, 2, 3, 4, 5, 6, 7]].
test() -> readers(6).
readers(N) ->
ets:new(tab, [public, named_table]),
Writer = fun() -> ets:insert(tab, {x, 42}) end,
Reader = fun(I) -> ets:lookup(tab, I), ets:lookup(tab, x) end,
s... | |
f37391a52c5d2b84fe1ff01b3a6351bfffc65606d935cbe212d6fafc7c237855 | morpheusgraphql/morpheus-graphql | API.hs | module Operation.API where
import Operation.Mutation ()
import Operation.Query ()
import Operation.Subscription () | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/1d3ab7e3bc723e29ef8bd2a0c818a03ae82ce8ad/examples/code-gen/src/Operation/API.hs | haskell | module Operation.API where
import Operation.Mutation ()
import Operation.Query ()
import Operation.Subscription () | |
784b8310524aa1acc98424e5f2ebc202418fcb00b6e3f50198c0479fe2139938 | Perry961002/SICP | exe4.16.scm | ; a)
(define (lookup-variable-value var env)
(define (env-loop env)
(define (scan vars vals)
(cond ((null? vars)
(env-loop (enclosing-environment env)))
((eq? var (car vars))
(if (eq? '*unassigned* (car vals))
(error ... | null | https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap4/exercise/exe4.16.scm | scheme | a)
b)
以一个过程体为参数,返回不包括内部定义的等价表达式
设置特殊符号'*unassigned*
对特殊变量赋值
改成写let形式
exps是所有的表达式,defines是内部定义式,rest-exps是其他表达式
c)
在 make-procedure 里面添加相当于在定义时就处理好内部定义了
具体采用哪种形式的定义,可以根据语言的使用场景来,如果 lambda 定义多而应用少,那么可以在 procedure-body 里面添加,
反之,可以在 make-procedure 里添加。 | (define (lookup-variable-value var env)
(define (env-loop env)
(define (scan vars vals)
(cond ((null? vars)
(env-loop (enclosing-environment env)))
((eq? var (car vars))
(if (eq? '*unassigned* (car vals))
(error "Can'... |
4ffe740a9a52c1d47dda337701415458cd63cfdee03966c25abda407c08ace47 | ppaml-op3/insomnia | InsomniaStages.hs | {-# LANGUAGE OverloadedStrings #-}
module Insomnia.Main.InsomniaStages where
import Control.Monad.Reader
import Data.Monoid (Monoid(..), (<>))
import qualified Data.Format as F
import qualified Pipes
import Insomnia.Main.Config
import Insomnia.Main.Monad
import Insomnia.Main.Stage
import Insomnia.Toplevel (Topleve... | null | https://raw.githubusercontent.com/ppaml-op3/insomnia/5fc6eb1d554e8853d2fc929a957c7edce9e8867d/src/Insomnia/Main/InsomniaStages.hs | haskell | # LANGUAGE OverloadedStrings # | module Insomnia.Main.InsomniaStages where
import Control.Monad.Reader
import Data.Monoid (Monoid(..), (<>))
import qualified Data.Format as F
import qualified Pipes
import Insomnia.Main.Config
import Insomnia.Main.Monad
import Insomnia.Main.Stage
import Insomnia.Toplevel (Toplevel)
import Insomnia.Typecheck as TC ... |
f94f36336aef0159a84c28da75b9c3ea416353557b4a7cb77855c31bb006d55d | Misterio77/aoc2022 | Shape.hs | module Shape where
data Shape = Rock | Paper | Scissors deriving (Eq)
toScore :: Shape -> Int
toScore Rock = 1
toScore Paper = 2
toScore Scissors = 3
fromChar :: Char -> Shape
fromChar 'A' = Rock
fromChar 'B' = Paper
fromChar 'C' = Scissors
fromChar 'X' = Rock
fromChar 'Y' = Paper
fromChar 'Z' = Scissors
fromChar x ... | null | https://raw.githubusercontent.com/Misterio77/aoc2022/eec09d01ba1e0fa921a737d5a2eb81dd602fadfd/src/day2/Shape.hs | haskell | module Shape where
data Shape = Rock | Paper | Scissors deriving (Eq)
toScore :: Shape -> Int
toScore Rock = 1
toScore Paper = 2
toScore Scissors = 3
fromChar :: Char -> Shape
fromChar 'A' = Rock
fromChar 'B' = Paper
fromChar 'C' = Scissors
fromChar 'X' = Rock
fromChar 'Y' = Paper
fromChar 'Z' = Scissors
fromChar x ... | |
aae38189aa183282322367bb77fb83621e9eca812978963332fde82789bac6e3 | input-output-hk/ouroboros-network | Degenerate.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
# LANGUAGE ViewPatterns ... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/437d7160079c83c4632fe0a42c596e5105c59a4d/ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/Degenerate.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE GADTs #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
* Pattern synonyms
------------------------------------------------------------------------------
Simple patterns
-------------------------------------------------------------------... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -Wno - orphans #
module Ouroboros.Consensus.HardFork.Combinator.Degenerate (
BlockConfig (DegenBlockConfig)
, BlockQuery (De... |
a8cd7c0b814f74939a8f6044b21577b64116b977e4bac98292dfc72ef2b7592f | mbj/stratosphere | Rec709SettingsProperty.hs | module Stratosphere.MediaLive.Channel.Rec709SettingsProperty (
Rec709SettingsProperty(..), mkRec709SettingsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.ResourceProperties
data Rec709SettingsProperty = Rec709SettingsProperty {}
mkRe... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/medialive/gen/Stratosphere/MediaLive/Channel/Rec709SettingsProperty.hs | haskell | module Stratosphere.MediaLive.Channel.Rec709SettingsProperty (
Rec709SettingsProperty(..), mkRec709SettingsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.ResourceProperties
data Rec709SettingsProperty = Rec709SettingsProperty {}
mkRe... | |
88ce963fbc5e0113f3e8534676c6816ae295ec01a19d1b047654daa8fd1654f9 | namenu/tfjs-cljs | macros.clj | (ns tfjs-cljs.macros)
(defn ->camelCase [s]
(let [s (clojure.string/split s #"-")]
(transduce (map clojure.string/capitalize) str (first s) (next s))))
(defmacro deftf [name]
(let [params (gensym)
cname (symbol "js" (->camelCase (str "tf." name)))]
`(defn ~name [& ~params]
(apply ~cname ~p... | null | https://raw.githubusercontent.com/namenu/tfjs-cljs/24d1b22c0be58c38d723dafad9734283d526564d/src/tfjs_cljs/macros.clj | clojure | (ns tfjs-cljs.macros)
(defn ->camelCase [s]
(let [s (clojure.string/split s #"-")]
(transduce (map clojure.string/capitalize) str (first s) (next s))))
(defmacro deftf [name]
(let [params (gensym)
cname (symbol "js" (->camelCase (str "tf." name)))]
`(defn ~name [& ~params]
(apply ~cname ~p... | |
8aa8610c32a5c6336e3276abf0ebc2e23d735c8d265a2e36268af5b44e70582b | qkrgud55/ocamlmulti | rawwidget.ml | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of OCaml
(* *)
, , and ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/otherlibs/labltk/support/rawwidget.ml | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of OCaml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
1487b6362aebecd95428925027831c6c5dd64aa4312a3a068400572947f2ca5c | tek/polysemy-hasql | ExistingColumn.hs | module Polysemy.Hasql.Data.ExistingColumn where
import Polysemy.Hasql.Data.DbType (Name)
data ExistingColumn =
ExistingColumn {
name :: Name,
ctype :: Text
}
deriving stock (Eq, Show, Ord)
| null | https://raw.githubusercontent.com/tek/polysemy-hasql/443ccf348bb8af0ec0543981d58af8aa26fc4c10/packages/hasql/lib/Polysemy/Hasql/Data/ExistingColumn.hs | haskell | module Polysemy.Hasql.Data.ExistingColumn where
import Polysemy.Hasql.Data.DbType (Name)
data ExistingColumn =
ExistingColumn {
name :: Name,
ctype :: Text
}
deriving stock (Eq, Show, Ord)
| |
7868074f5d7220ebaa0a7ceef78661c8c67763ce3fceec57010d0c98f568fdac | brendanhay/terrafomo | Provider.hs | -- This module is auto-generated.
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
# OPTIONS_GHC -fno - warn - unused - imports #
-- |
Module : . NewRelic . Provider
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Mainta... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-newrelic/gen/Terrafomo/NewRelic/Provider.hs | haskell | This module is auto-generated.
|
Stability : auto-generated
* NewRelic Specific Aliases
* NewRelic Configuration
^ @api_key@
- (Required)
- (Optional)
^ @infra_api_url@
- (Optional)
^ The minimal/required arguments.
| The required arguments for 'newProvider'.
^ (Required) |
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
# OPTIONS_GHC -fno - warn - unused - imports #
Module : . NewRelic . Provider
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
Portabi... |
1dcc694d91c2169aafd469b19a414c02bb726c6b987c96cb4bc8bc8ad34b6672 | zippy/anansi | commands.clj | (ns anansi.test.receptor.host-interface.commands
(:use [anansi.receptor.host-interface.commands] :reload)
(:use [anansi.ceptr])
(:use [anansi.receptor.host]
[anansi.receptor.scape])
(:use [midje.sweet])
(:use [clojure.test]
[clojure.contrib.io :only [writer]]))
(def some-interface-def (recep... | null | https://raw.githubusercontent.com/zippy/anansi/881aa279e5e7836f3002fc2ef7623f2ee1860c9a/test/anansi/test/receptor/host_interface/commands.clj | clojure | (ns anansi.test.receptor.host-interface.commands
(:use [anansi.receptor.host-interface.commands] :reload)
(:use [anansi.ceptr])
(:use [anansi.receptor.host]
[anansi.receptor.scape])
(:use [midje.sweet])
(:use [clojure.test]
[clojure.contrib.io :only [writer]]))
(def some-interface-def (recep... | |
190e40bf67623c5be0e71df4c97ab3dd3a88ada474febc1c53d69ee308cda1d1 | polyfy/polylith | m201_mismatching_parameters_test.clj | (ns polylith.clj.core.validator.m201-mismatching-parameters-test
(:require [clojure.test :refer :all]
[polylith.clj.core.util.interface.color :as color]
[polylith.clj.core.validator.m201-mismatching-parameters :as m201]))
(def interfaces [{:name "auth"
:definitions [{:name "... | null | https://raw.githubusercontent.com/polyfy/polylith/febea3d8a9b30a60397594dda3cb0f25154b8d8d/components/validator/test/polylith/clj/core/validator/m201_mismatching_parameters_test.clj | clojure | (ns polylith.clj.core.validator.m201-mismatching-parameters-test
(:require [clojure.test :refer :all]
[polylith.clj.core.util.interface.color :as color]
[polylith.clj.core.validator.m201-mismatching-parameters :as m201]))
(def interfaces [{:name "auth"
:definitions [{:name "... | |
80926029fb4c39c43d02db6c32d7fd6f54dedea4f2b0f3876603b43fd3bbfdda | lspitzner/brittany | Test509.hs | -- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
func =
[ (thing, take 10 alts) --TODO: select best ones
| (thing, _got, alts@(_ : _)) <- nosuchFooThing
, gast <- award
]
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test509.hs | haskell | brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
TODO: select best ones | func =
| (thing, _got, alts@(_ : _)) <- nosuchFooThing
, gast <- award
]
|
c74c9374610bd1fa5cd9012bc8012a11f23daecf867967c00daadc0a9d3d62dd | sneeuwballen/zipperposition | Ind_cst.ml |
* { 1 Inductive Constants and Cases }
Skolem constants of an inductive type , coversets , etc . required for
inductive reasoning .
Skolem constants of an inductive type, coversets, etc. required for
inductive reasoning. *)
open Logtk
module T = Term
exception InvalidDecl of string
exception No... | null | https://raw.githubusercontent.com/sneeuwballen/zipperposition/7f1455fbe2e7509907f927649c288141b1a3a247/src/prover/Ind_cst.ml | ocaml | the corresponding inductive type
sub-constant?
how many induction lead to this one?
declare as a skolem
declare new constant
constant --> not polymorphic
build coverset and constant, mutually recursive
special case: promotion from skolem to inductive const
return
constant
find inductive constant ca... |
* { 1 Inductive Constants and Cases }
Skolem constants of an inductive type , coversets , etc . required for
inductive reasoning .
Skolem constants of an inductive type, coversets, etc. required for
inductive reasoning. *)
open Logtk
module T = Term
exception InvalidDecl of string
exception No... |
fb7406b482e9830338148b16c81038f09b7bc2cfaa73210b964e30748803be2e | amnh/PCG | NonNegativeAverage.hs | -----------------------------------------------------------------------------
-- |
Module : Numeric .
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-----------------------------------------------... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/utility/src/Numeric/NonNegativeAverage.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveDataTypeable #
# L... | Module : Numeric .
Copyright : ( c ) 2015 - 2021 Ward Wheeler
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
module Numeric.NonNegativeAverage
( NonNegativeAverage()
, fromNonNegativeAverage
, fromNonNegativeValue
) where
import Control.DeepSeq
import Data.Binary
import Da... |
35e62afdbb61d1a4d6566ec464c93b2b079e75130849aa4fa894387ba7d17462 | softwarelanguageslab/maf | R5RS_rosetta_easter-4.scm | ; Changes:
* removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((easter (lambda (year)
(let* ((a (remainder year 19))
(b (quotient year 100))
(c (remainder year 100))
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_rosetta_easter-4.scm | scheme | Changes:
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
(letrec ((easter (lambda (year)
(let* ((a (remainder year 19))
(b (quotient year 100))
(c (remainder year 100))
(d (quotient b 4))
... |
0fd109deeaab5286cb2f67ca3c80df0745738a338ac95119ec87608c6a51673f | madnificent/jsown | packages.lisp | (defpackage :jsown-tests
(:use :common-lisp
:jsown
:fiveam)
(:export :test-all
:test-readers
:test-writers
:test-accessors))
(in-package :jsown-tests)
(def-suite test-all
:description "All tests made for jsown")
| null | https://raw.githubusercontent.com/madnificent/jsown/744c4407bef58dfa876d9da0b5c0205d869e7977/tests/packages.lisp | lisp | (defpackage :jsown-tests
(:use :common-lisp
:jsown
:fiveam)
(:export :test-all
:test-readers
:test-writers
:test-accessors))
(in-package :jsown-tests)
(def-suite test-all
:description "All tests made for jsown")
| |
bd142cc73b40290a42ccb100bd8b30763891289950b85e9e5b84f817442b32bb | DataHaskell/dh-core | Gapminder.hs | # LANGUAGE DeriveGeneric , OverloadedStrings ,
# OPTIONS_GHC -fno - warn - unused - imports #
|
Gapminder dataset - Life expectancy , GDP , population every five years per country
Source : < >
More information : -project.org/web/packages/gapminder/gapminder.pdf
Gapminder dataset - Life expectancy, GDP,... | null | https://raw.githubusercontent.com/DataHaskell/dh-core/2beb8740f27fa9683db70eb8d8424ee6c75d3e91/datasets/src/Numeric/Datasets/Gapminder.hs | haskell | # LANGUAGE DeriveGeneric , OverloadedStrings ,
# OPTIONS_GHC -fno - warn - unused - imports #
|
Gapminder dataset - Life expectancy , GDP , population every five years per country
Source : < >
More information : -project.org/web/packages/gapminder/gapminder.pdf
Gapminder dataset - Life expectancy, GDP,... | |
a944b16351f2120c6d88fd9c5e0ab23de5c47c5b9bf2ffa596adcdf80c5183da | rubenbarroso/EOPL | 2-unify.scm | (let ((time-stamp "Time-stamp: <2000-12-11 17:01:55 wand>"))
(eopl:printf
"2-unify.scm: terms, substitutions, unification ~a~%"
(substring time-stamp 13 29)))
;;;;;;;;;;;;;;;; syntax ;;;;;;;;;;;;;;;;
(define-datatype term term?
(var-term
(id symbol?))
(constant-term
(datum constant?))
(app-ter... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/interps/2-unify.scm | scheme | syntax ;;;;;;;;;;;;;;;;
substitutions ;;;;;;;;;;;;;;;;
basic interface
represent substs as fcns id -> term
next level
auxiliaries for unifier:
unification ;;;;;;;;;;;;;;;;
the unifier
-------------------- Junk below the line ------------------- | (let ((time-stamp "Time-stamp: <2000-12-11 17:01:55 wand>"))
(eopl:printf
"2-unify.scm: terms, substitutions, unification ~a~%"
(substring time-stamp 13 29)))
(define-datatype term term?
(var-term
(id symbol?))
(constant-term
(datum constant?))
(app-term
(terms (list-of term?))))
(defi... |
b1613df2de59883dc7d6162323cb049e410dda27995f91421569bc6b82a87e94 | lambdaisland/deep-diff2 | color.cljc | (ns lambdaisland.deep-diff2.puget.color
"Coloring multimethods to format text by adding markup.
#### Color Options
`:print-color`
When true, ouptut colored text from print functions.
`:color-markup`
- `:ansi` for color terminal text (default)
- `:html-inline` for inline-styled html
- `:html-classes... | null | https://raw.githubusercontent.com/lambdaisland/deep-diff2/2ef429227ac9986024e6c8f63ded9a88eb3fe9c2/src/lambdaisland/deep_diff2/puget/color.cljc | clojure | ## Coloring Multimethods
The default transformation when there's no markup specified is to return the
text unaltered. | (ns lambdaisland.deep-diff2.puget.color
"Coloring multimethods to format text by adding markup.
#### Color Options
`:print-color`
When true, ouptut colored text from print functions.
`:color-markup`
- `:ansi` for color terminal text (default)
- `:html-inline` for inline-styled html
- `:html-classes... |
0773a1c44196366bc6e0b9e9dbbf92c430c1ed79062ffd4a88c61e8f4cac0361 | ekmett/haskell | Type.hs | # language PatternSynonyms #
{-# language ExplicitNamespaces #-}
# language TemplateHaskell #
# language StandaloneKindSignatures #
# language FlexibleInstances #
# language DataKinds #
# language TypeApplications #
# language PolyKinds #
# language RoleAnnotations #
# language ViewPatterns #
# language GADTs #
# langu... | null | https://raw.githubusercontent.com/ekmett/haskell/37ad048531f5a3a13c6dfbf4772ee4325f0e4458/types/src/Data/Type.hs | haskell | # language ExplicitNamespaces #
|
Stability : experimental
Portability: non-portable
* Singleton types and reflection from singletons
* Reflection
* Singular types
makeMe
** 'Type'
** 'Constraint'
** 'Symbol'
* Lifting numerics
** @'Ptr' a@
** @'StablePtr' a@
* Singletons
** '(,)'
(,)
(,,)
(,,,)
(,,... | # language PatternSynonyms #
# language TemplateHaskell #
# language StandaloneKindSignatures #
# language FlexibleInstances #
# language DataKinds #
# language TypeApplications #
# language PolyKinds #
# language RoleAnnotations #
# language ViewPatterns #
# language GADTs #
# language MagicHash #
# OPTIONS_GHC -Wno -... |
58884bf975e0725a5a2b7b5bab46571a0f527ea14de77a114dc172a44321ca85 | kcsongor/generic-lens | Internal.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.GenericLens.Internal
Copyright : ( C ) 2020
-- License : BSD3
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
--
-- The library internals are exposed through th... | null | https://raw.githubusercontent.com/kcsongor/generic-lens/8e1fc7dcf444332c474fca17110d4bc554db08c8/generic-lens-core/src/Data/GenericLens/Internal.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.GenericLens.Internal
License : BSD3
Stability : experimental
Portability : non-portable
The library internals are exposed through this module. Please keep
in mind that everything here is subject to change ... | Copyright : ( C ) 2020
Maintainer : < >
module Data.GenericLens.Internal
( module Data.Generics.Internal.Families
, module Data.Generics.Internal.Families.Changing
, module Data.Generics.Internal.Families.Collect
, module Data.Generics.Internal.Families.Has
, module Data.Generics.Internal.V... |
6caf29aab00279862a15bb2561e44b1a311bb7fe77019741dfe5fcabb740863d | kframework/semantic-approaches | SmallStep.hs | module Language.Imp.Semantics.SmallStep
( runImpTrace
-- , execPgm
-- )
where
import Language.Imp.Syntax.Abstract
import Language.Imp.State
import SemanticModel.SmallStep
type ImpTrace = Trace ImpEnv
runImpTrace :: ImpTrace syntax -> [(syntax, ImpEnv)]
runImpTrace impTrace = runTrace emptyEnv impTrace
------... | null | https://raw.githubusercontent.com/kframework/semantic-approaches/6f64eac09e005fe4eae7141e3c0e0f5711da0647/haskell/semantic-styles/src/Language/Imp/Semantics/SmallStep.hs | haskell | , execPgm
)
------------
Programs --
--------------
Arithmetic --
lookup
addition
division
---------
Logic --
less than or equal to
and
not
--------------
Statements --
assignment
sequence
if then else
while | module Language.Imp.Semantics.SmallStep
( runImpTrace
where
import Language.Imp.Syntax.Abstract
import Language.Imp.State
import SemanticModel.SmallStep
type ImpTrace = Trace ImpEnv
runImpTrace :: ImpTrace syntax -> [(syntax, ImpEnv)]
runImpTrace impTrace = runTrace emptyEnv impTrace
The rule for programs is... |
a9d378309c2f581d480162455bc0ecc936b224c108cf150ee858c8162ebceed6 | modular-macros/ocaml-macros | ocamldep.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/tools/ocamldep.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Compenv
open Parsetree
module StringMap = Depend.StringMap
let ppf = Format.err_formatter
type fil... |
c12f0817faea7685e361d8213805f9d4c33bd2f6a826fed7f0aa68c2ed8503a2 | songyahui/AlgebraicEffect | build_path_prefix_map.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/songyahui/AlgebraicEffect/421afc58ed355f2ce1ada7e77733d7642c328815/parsing/build_path_prefix_map.ml | ocaml | ************************************************************************
OCaml
... | , projet , INRIA Saclay
Copyright 2017 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type path = string
type path_prefix = string
type error_message = string
let errorf fmt = Printf.ksprintf (fun err ... |
3f6563af34eb676a95c59ac6714b2a7e6b30d69956846350312dad22dcb5da89 | hjcapple/reading-sicp | exercise_3_61.scm | #lang racket
P232 - [ 练习 3.61 ]
(require "stream.scm")
(require "infinite_stream.scm")
(require "exercise_3_59.scm") ; for cosine-series、exp-series
for mul - series
(provide invert-unit-series)
(define (neg-stream s)
(scale-stream s -1))
(define (invert-unit-series s)
(cons-stream
1
(neg-stream (mul... | null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_3/exercise_3_61.scm | scheme | for cosine-series、exp-series
(1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
(1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) | #lang racket
P232 - [ 练习 3.61 ]
(require "stream.scm")
(require "infinite_stream.scm")
for mul - series
(provide invert-unit-series)
(define (neg-stream s)
(scale-stream s -1))
(define (invert-unit-series s)
(cons-stream
1
(neg-stream (mul-series (stream-cdr s) (invert-unit-series s)))))
(module* m... |
f6c760b6c01ccf0a49bd47d6b7e1cf95cfc2dcd26f8ec470694a0db04fb856af | vaclavsvejcar/headroom | TemplateRef.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
# LANGUAGE NoImplicitPrel... | null | https://raw.githubusercontent.com/vaclavsvejcar/headroom/3b20a89568248259d59f83f274f60f6e13d16f93/src/Headroom/Template/TemplateRef.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Headroom.Template.TemplateRef
Description : Representation of reference to template file
License : BSD-3-Clause
Maintainer :
Stability : experimental
Portability : POSIX
'TemplateRef' data type represents reference to template file,... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
# LANGUAGE NoImplicitPrelude #
Copyright : ( c ) 2019 - 2022
module Headroom.Tem... |
960ccf4b086f1aaeca54d1a381e530ed500fcb68793491b6fde17fdc112c3878 | WormBase/wormbase_rest | core.clj | (ns rest-api.classes.phenotype.core
(:require
[clojure.string :as str]
[datomic.api :as d]
[pseudoace.utils :as pace-utils]
[rest-api.classes.paper.core :as paper-core]
[rest-api.formatters.object :as obj]
[rest-api.formatters.object :as obj :refer [pack-obj]]))
(defn- create-pato-term [id label e... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/phenotype/core.clj | clojure | we should actually display all of them but catalyst template
not displaying nested array | (ns rest-api.classes.phenotype.core
(:require
[clojure.string :as str]
[datomic.api :as d]
[pseudoace.utils :as pace-utils]
[rest-api.classes.paper.core :as paper-core]
[rest-api.formatters.object :as obj]
[rest-api.formatters.object :as obj :refer [pack-obj]]))
(defn- create-pato-term [id label e... |
dfe4610299beee39c72be966444d806c813739bbfe59f4ad4efdc49100a16fa3 | alvatar/spheres | concurrency-termite.scm | (load (spheres/util test))
;;-------------------------------------------------------------------------------
;; Multiple-instance tests
Node 2
(define (spawn-gambit code #!key
(flags-string #f)
(verbose #f))
;; This is a hack transforming all ' into ` since they work in... | null | https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/test/concurrency-termite.scm | scheme | -------------------------------------------------------------------------------
Multiple-instance tests
This is a hack transforming all ' into ` since they work in all cases and makes
life easier when passed as a string with ' delimiters to bash
(debug (current-node))
------------------------------------------------... | (load (spheres/util test))
Node 2
(define (spawn-gambit code #!key
(flags-string #f)
(verbose #f))
(let ((quotes->semiquotes
(lambda (string)
(let ((length (string-length string))
(transformed (string-copy string)))
(let... |
27275183e5bc7e74df9610d1613079d7734ee5681e24c8f4f0681a6050e11e2f | bootstrapworld/curr | NW6.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname NWComplete) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decima... | null | https://raw.githubusercontent.com/bootstrapworld/curr/443015255eacc1c902a29978df0e3e8e8f3b9430/courses/reactive/resources/source-files/NW6.rkt | racket | about the language level of this file in a form that our tools can easily process.
DATA:
STARTING WORLD
GRAPHICS FUNCTIONS:
draw-world: world -> Image
UPDATING FUNCTIONS:
update-world: world -> world
KEY EVENTS:
keypress: world string -> world
make catY respond to key events
TESTS FOR COND:
off-left? : ... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname NWComplete) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
(require "Teachpacks/bootstrap-teachpack.rkt")
The World is t... |
5c36b0cbd3e8061ed4d96cee60b3babbb6410eb251b76bea690fb7b6d0ca6f78 | ocaml-multicore/tezos | lqt_fa12_repr.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_protocol/test/helpers/lqt_fa12_repr.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
60a9df88078993a8ad14320090e27185955d72148ec500004808b31181b356f9 | pirapira/coq2rust | cases.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/pretyping/cases.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Pattern-matching errors
**********... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Errors
open Util... |
afbd0fe348d85770444c32814081f3287b6629110a391a67dc0bd9fa9e77ef54 | inaka/elvis_core | pass_private_data_types.erl | -module(pass_private_data_types).
-record(my_rec, {a :: integer(), b :: integer(), c :: integer()}).
-opaque my_rec() :: #my_rec{}.
-export_type([my_rec/0]).
-export([hello/0]).
-spec hello() -> ok.
hello() ->
my_fun(#my_rec{a = 1, b = 2, c = 3}).
-spec my_fun(my_rec()) -> ok.
my_fun(_Rec) -> ok.
| null | https://raw.githubusercontent.com/inaka/elvis_core/c0993efbc9e2007ca0028232312753009862b2ac/test/examples/pass_private_data_types.erl | erlang | -module(pass_private_data_types).
-record(my_rec, {a :: integer(), b :: integer(), c :: integer()}).
-opaque my_rec() :: #my_rec{}.
-export_type([my_rec/0]).
-export([hello/0]).
-spec hello() -> ok.
hello() ->
my_fun(#my_rec{a = 1, b = 2, c = 3}).
-spec my_fun(my_rec()) -> ok.
my_fun(_Rec) -> ok.
| |
e6fa33f1cd040f8fd7e5eb774ecf0c7e09e21ce9a46b25afe62d138bd54c5359 | metabase/metabase | dashboard_detail.clj | (ns metabase-enterprise.audit-app.pages.dashboard-detail
"Detail page for a single dashboard."
(:require
[metabase-enterprise.audit-app.interface :as audit.i]
[metabase-enterprise.audit-app.pages.common :as common]
[metabase-enterprise.audit-app.pages.common.card-and-dashboard-detail :as card-and-dash-deta... | null | https://raw.githubusercontent.com/metabase/metabase/79b08ee8627ad2b3d4d7703e9aeb1a48db5d3493/enterprise/backend/src/metabase_enterprise/audit_app/pages/dashboard_detail.clj | clojure | Get views of a Dashboard broken out by a time `unit`, e.g. `day` or `day-of-week`.
Revision history for a specific Dashboard.
View log for a specific Dashboard.
Information about the Saved Questions (Cards) in this instance. | (ns metabase-enterprise.audit-app.pages.dashboard-detail
"Detail page for a single dashboard."
(:require
[metabase-enterprise.audit-app.interface :as audit.i]
[metabase-enterprise.audit-app.pages.common :as common]
[metabase-enterprise.audit-app.pages.common.card-and-dashboard-detail :as card-and-dash-deta... |
9a99aa30a0d9635ddfc51f1a412d5f23b61f672c67f709873037c461c84f2047 | jordanthayer/ocaml-search | three_queue_search_rev.ml | * Three queud search with reverse heuristics
Jordan - August 2009
Jordan - August 2009 *)
type 'a node = {
mutable est_f : float;
h : float;
d : float;
g : float;
depth : int;
rev_h : float;
rev_d : float;
mutable q_pos : int;
mutable fh_pos : int;
mutable geqe : 'a node;
data : 'a;
}
... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/optimistic/three_queue_search_rev.ml | ocaml | *** Utility functions ***
sort by fhat
break ties on low d
break ties on high g
* convenience ordering predicate
Verb.pe Verb.debug "Got Best fh\n";
Verb.pe Verb.debug "Got Best f\n";
Verb.pe Verb.debug "Got Best d\n";
Verb.pe Verb.debug "Got Best f\n";
***************************** Search **********************... | * Three queud search with reverse heuristics
Jordan - August 2009
Jordan - August 2009 *)
type 'a node = {
mutable est_f : float;
h : float;
d : float;
g : float;
depth : int;
rev_h : float;
rev_d : float;
mutable q_pos : int;
mutable fh_pos : int;
mutable geqe : 'a node;
data : 'a;
}
... |
9c7f396f59c0769b3897b15aac45baff017e2181aff71497917f33611c3ed288 | mathematical-systems/clml | classes.lisp | (in-package #:metabang-bind-test)
(defclass metabang-bind-class-1 ()
((a :initarg :a :accessor a)
(b :initarg :b :accessor b)
(c :initarg :c :accessor c)))
(defclass metabang-bind-class-2 (metabang-bind-class-1)
((d :initarg :d :accessor the-d)
(e :initarg :e :accessor e)))
(deftestsuite test-classes (... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/addons/metabang-bind/unit-tests/classes.lisp | lisp | (in-package #:metabang-bind-test)
(defclass metabang-bind-class-1 ()
((a :initarg :a :accessor a)
(b :initarg :b :accessor b)
(c :initarg :c :accessor c)))
(defclass metabang-bind-class-2 (metabang-bind-class-1)
((d :initarg :d :accessor the-d)
(e :initarg :e :accessor e)))
(deftestsuite test-classes (... | |
4742550ca00c2c7af7628157e5c9261f8b88594db83158788815e0ed8a7a48a8 | finnishtransportagency/harja | liikennetapahtumat.clj | (ns harja.kyselyt.kanavat.liikennetapahtumat
(:require [clojure.java.jdbc :as jdbc]
[clojure.spec.alpha :as s]
[clojure.set :as set]
[jeesql.core :refer [defqueries]]
[specql.core :as specql]
[specql.op :as op]
[specql.rel :as rel]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/40b3f90850b60b6add49b25a4ee7da4c71e963ff/src/clj/harja/kyselyt/kanavat/liikennetapahtumat.clj | clojure | Voi olla nil tai ""
Palauta luotu alus | (ns harja.kyselyt.kanavat.liikennetapahtumat
(:require [clojure.java.jdbc :as jdbc]
[clojure.spec.alpha :as s]
[clojure.set :as set]
[jeesql.core :refer [defqueries]]
[specql.core :as specql]
[specql.op :as op]
[specql.rel :as rel]
... |
7ec8f848e1a6f194b036aa2e815ca2da78d274067abf1d5768f1d8abf5eb4ea3 | cyppan/grape | restricts_fields.clj | (ns grape.hooks.restricts-fields
(:require [grape.schema :refer :all])
(:import (grape.schema Hidden)))
(def hooks
{:pre-read (fn [deps resource request query]
(let [query-fields (map keyword (vec (:fields query [])))
resource-fields (when-let [fields (:fields resource)] (into... | null | https://raw.githubusercontent.com/cyppan/grape/62488a335542fc58fc9126b8d5ff7fccdd16f1d7/src/grape/hooks/restricts_fields.clj | clojure | (ns grape.hooks.restricts-fields
(:require [grape.schema :refer :all])
(:import (grape.schema Hidden)))
(def hooks
{:pre-read (fn [deps resource request query]
(let [query-fields (map keyword (vec (:fields query [])))
resource-fields (when-let [fields (:fields resource)] (into... | |
7ab429217ec90f16cee30202492582985ad942d4edf4e30079a9303b24d18668 | Datomic/day-of-datomic | find_specification_examples.clj | Copyright ( c ) Cognitect , Inc. All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be... | null | https://raw.githubusercontent.com/Datomic/day-of-datomic/20c02d26fd2a12481903dd5347589456c74f8eeb/tutorial/find_specification_examples.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) Cognitect , Inc. All rights reserved .
(require
'[datomic.api :as d]
'[datomic.samples.repl :as repl])
(def conn (repl/scratch-conn))
(def db (d/db conn))
(d/q '[:find ?e ?v
:where [?e :db/ident ?v]]
db)
(d/q '[:find [?v ...]
:where [_ :db/ident ?v]]
db)
(d/q '[:find [... |
3a93ed185501bfb06e4e230082452e8bff6063be779d931fd81fad74367c9f19 | mfikes/fifth-postulate | ns372.cljs | (ns fifth-postulate.ns372)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns372.cljs | clojure | (ns fifth-postulate.ns372)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
99e5a683f0258975145a17da20b7e5eaadf01d8fc02aaf4167a194f8ce11bfb3 | huangz1990/SICP-answers | 26-tree.scm | 26-tree.scm
; constructor
(define (make-tree key value left-branch right-branch)
(list key value left-branch right-branch))
; selector
(define (tree-key tree)
(car tree))
(define (tree-value tree)
(cadr tree))
(define (tree-left-branch tree)
(caddr tree))
(define (tree-right-branch tree)
(c... | null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp3/code/26-tree.scm | scheme | constructor
selector
setter
operator
comparer | 26-tree.scm
(define (make-tree key value left-branch right-branch)
(list key value left-branch right-branch))
(define (tree-key tree)
(car tree))
(define (tree-value tree)
(cadr tree))
(define (tree-left-branch tree)
(caddr tree))
(define (tree-right-branch tree)
(cadddr tree))
(define (tr... |
1bef7fa6aaae902ed9a2a970acb4a098939d9aa74823795719022b064b8ba61f | atlas-engineer/closure | dep-acl.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: GLISP; -*-
;;; ---------------------------------------------------------------------------
Title : ACL-4.3 dependent stuff + fixups
Created : 1999 - 05 - 25 22:33
Author : < >
License : MIT style ( see below )
;;; ----------------------------------... | null | https://raw.githubusercontent.com/atlas-engineer/closure/539ce81dbcb5fb46e19818a9bb35eeaf86042219/src/glisp/dep-acl.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: GLISP; -*-
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associ... | Title : ACL-4.3 dependent stuff + fixups
Created : 1999 - 05 - 25 22:33
Author : < >
License : MIT style ( see below )
( c ) copyright 1998,1999 by
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , an... |
b859694d90a94ecc1a7a48e45a3724792e55ed81810f7c2236800995c1080046 | khasm-lang/khasmc | hash.ml | let main_tbl : (int, Ast.typesig) Hashtbl.t = Hashtbl.create ~random:true 100
let add_typ id typ = Hashtbl.add main_tbl id typ
let get_typ id = Hashtbl.find main_tbl id
let print_table () =
Hashtbl.iter
(fun x y ->
print_string (string_of_int x);
print_string ": ";
print_endline (Ast.pshow_type... | null | https://raw.githubusercontent.com/khasm-lang/khasmc/e190cad60ba66e701ad0ae9d288ddb9a55e63a12/lib/frontend/hash.ml | ocaml | let main_tbl : (int, Ast.typesig) Hashtbl.t = Hashtbl.create ~random:true 100
let add_typ id typ = Hashtbl.add main_tbl id typ
let get_typ id = Hashtbl.find main_tbl id
let print_table () =
Hashtbl.iter
(fun x y ->
print_string (string_of_int x);
print_string ": ";
print_endline (Ast.pshow_type... | |
8daf6dba5615ae7290cf5829bfcdd945a85a712b19b75407f18bc9efb4a1dda7 | gfngfn/SATySFi | pageInfo.ml |
open HorzBox
--
' embed_page_info pbinfo imhblst '
associates ' ImHorzHookPageBreak ( ... ) ' in ' imhblst ' with ' pbinfo ' , and
returns footnotes in ' imhblst '
--
'embed_page_info pbinfo imhblst'
associates 'ImHorzHookPageBreak(...)' in 'imhblst' with 'pbinfo', and
returns footnote... | null | https://raw.githubusercontent.com/gfngfn/SATySFi/9dbd61df0ab05943b3394830c371e927df45251a/src/backend/pageInfo.ml | ocaml |
open HorzBox
--
' embed_page_info pbinfo imhblst '
associates ' ImHorzHookPageBreak ( ... ) ' in ' imhblst ' with ' pbinfo ' , and
returns footnotes in ' imhblst '
--
'embed_page_info pbinfo imhblst'
associates 'ImHorzHookPageBreak(...)' in 'imhblst' with 'pbinfo', and
returns footnote... | |
74b334491580df9db2aaac513416673baac7081c155aaafdb65672ddb5e59335 | biocad/servant-openapi3 | Todo.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module Todo where
import Control.Lens
import ... | null | https://raw.githubusercontent.com/biocad/servant-openapi3/5eec55e6d0b091f8267060900d25ddcfad5df7a3/example/src/Todo.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
| The API of a Todo service.
| API for serving @swagger.json@.
| Combined API of a Todo service with Swagger document... | # LANGUAGE GeneralizedNewtypeDeriving #
module Todo where
import Control.Lens
import Data.Aeson
import Data.Aeson.Encode.Pretty (encodePretty)
import qualified Data.ByteString.Lazy.Char8 as BL8
import Data.OpenApi hiding (Server)
import Data.Proxy
impor... |
cfb074f3cb61de5e6b39689668389f05d37afe74cd8668aa9ad352dec1104a3d | 2600hz/kazoo | pqc_cb_phone_numbers.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc
@author
%%%
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 /.
%%%
%%% ... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_proper/src/pqc_cb_phone_numbers.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
,{'call', ?MODULE, 'reserve_number', [API, name(), phone_number()]}
if in another account | ( C ) 2010 - 2020 , 2600Hz
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(pqc_cb_phone_numbers).
-behaviour(proper_statem).
Crossbar API test functions
-export([summ... |
02178aba6dbd6dc3e0b1e39e1c883d9c45685a0a6d68be0e9a8c75e2b7bd9864 | melisgl/planet-wars | proxy-bot.lisp | (in-package :pw-proxy-bot)
(defun connection-refused (&optional arg)
(declare (ignore arg))
(pw-util:logmsg "Connection refused. Aborting...~%")
(pw-util:exit :status 111))
(defun proxy ()
(pw-util:with-reckless-exit
(pw-util:with-errors-logged (:exit-on-error-p t)
(setq pw-util:*verbose* t)
(... | null | https://raw.githubusercontent.com/melisgl/planet-wars/499742d5fb46edeb114f2996b01b0343cf42b76a/src/proxy-bot/proxy-bot.lisp | lisp | (in-package :pw-proxy-bot)
(defun connection-refused (&optional arg)
(declare (ignore arg))
(pw-util:logmsg "Connection refused. Aborting...~%")
(pw-util:exit :status 111))
(defun proxy ()
(pw-util:with-reckless-exit
(pw-util:with-errors-logged (:exit-on-error-p t)
(setq pw-util:*verbose* t)
(... | |
0be524f0511f17e49b592d8c9ad07467565532a3dadc09122c698c5ff5b9d0d4 | 3b/3bgl-shader | compiler.lisp | (in-package #:3bgl-shaders)
;;; passes
;;; +base pass (expand macros, symbol macros, etc)
;; (possibly combined with next pass, since it probably inherits from
;; walker that does expansion already)
;;; +extract top-level definitions
;;; +inline local functions?
;; has to happen after alpha conversion, si... | null | https://raw.githubusercontent.com/3b/3bgl-shader/5dd0207ef2d468e7caca2dd6df07b87fe839df88/compiler.lisp | lisp | passes
+base pass (expand macros, symbol macros, etc)
(possibly combined with next pass, since it probably inherits from
walker that does expansion already)
+extract top-level definitions
+inline local functions?
has to happen after alpha conversion, since free variables
in the local function b... | (in-package #:3bgl-shaders)
want to do , for libs and such )
first pass : expand macros , extract function definitions into environments
(defclass extract-functions (3bgl-glsl::glsl-walker)
())
(defvar *new-function-definitions*)
(defvar *new-type-definitions*)
(defvar *new-global-definitions*)
(defvar *... |
d2704d40a757921f21497d6b963c925cbe49b1951f2430c2591651f43a9279a7 | bitblaze-fuzzball/fuzzball | exec_influence.ml |
Copyright ( C ) BitBlaze , 2009 - 2013 , and copyright ( C ) 2010 Ensighta
Security Inc. All rights reserved .
Copyright (C) BitBlaze, 2009-2013, and copyright (C) 2010 Ensighta
Security Inc. All rights reserved.
*)
module V = Vine
open Exec_options
open Exec_exceptions
open Query_engine
open Options... | null | https://raw.githubusercontent.com/bitblaze-fuzzball/fuzzball/b9a617b45e68fa732f1357fedc08a2a10f87a62c/execution/exec_influence.ml | ocaml | This class is currently constructed before the command line
options that relate to the choice of solver are parsed. So we want
to delay constructing the query engine until it's needed. Using a
dummy object will satisfy OCaml's type system so that we don't
need a cumbersome option type.
He... |
Copyright ( C ) BitBlaze , 2009 - 2013 , and copyright ( C ) 2010 Ensighta
Security Inc. All rights reserved .
Copyright (C) BitBlaze, 2009-2013, and copyright (C) 2010 Ensighta
Security Inc. All rights reserved.
*)
module V = Vine
open Exec_options
open Exec_exceptions
open Query_engine
open Options... |
c9ab518b588333e1343aeb1cefc462797bb23e32997fffe607a7fb025f24b621 | monadbobo/ocaml-core | pre_sexp.ml | Sexp : Module for handling S - expressions ( I / O , etc . )
open Format
open Bigarray
include Type
exception Of_sexp_error of exn * t
type bigstring = (char, int8_unsigned_elt, c_layout) Array1.t
(* Default indentation level for human-readable conversions *)
let default_indent = ref 1
(* Escaping of strings... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/sexplib/lib/pre_sexp.ml | ocaml | Default indentation level for human-readable conversions
Escaping of strings used as atoms in S-expressions
Output of S-expressions to formatters
Buffer conversions
Output of S-expressions to I/O-channels
Output of S-expressions to file
The temp file functions in the OCaml Filename module do not support
... | Sexp : Module for handling S - expressions ( I / O , etc . )
open Format
open Bigarray
include Type
exception Of_sexp_error of exn * t
type bigstring = (char, int8_unsigned_elt, c_layout) Array1.t
let default_indent = ref 1
let must_escape str =
let len = String.length str in
len = 0 ||
let rec loop... |
da768cc5757bf6a335ddc3f8e44d8b7675e0fe5aa92e4b2f9c9466aba499e3a9 | threatgrid/ctim | valid_time_test.clj | (ns ctim.schemas.valid-time-test
(:require [clj-momo.lib.clj-time.core :as time]
[clojure.spec.alpha :as s]
[clojure.test :refer [deftest is testing use-fixtures]]
[ctim.schemas.judgement :as j]
[ctim.test-helpers.core :as th]
[ctim.examples.judgements :as e... | null | https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/test/ctim/schemas/valid_time_test.clj | clojure | (ns ctim.schemas.valid-time-test
(:require [clj-momo.lib.clj-time.core :as time]
[clojure.spec.alpha :as s]
[clojure.test :refer [deftest is testing use-fixtures]]
[ctim.schemas.judgement :as j]
[ctim.test-helpers.core :as th]
[ctim.examples.judgements :as e... | |
adda98bab8a055f9f40315230b639bd5fe124e547c0e7a9847ae8e97997860a8 | MinaProtocol/mina | js_util.ml | -- types and transformers for Javascript
open Js_of_ocaml
open Snark_params.Tick
open Mina_base
module Global_slot = Mina_numbers.Global_slot
module Memo = Signed_command_memo
let raise_js_error s =
Js_error.(raise_ @@ of_error (new%js Js.error_constr (Js.string s)))
type string_js = Js.js_string Js.t
type key... | null | https://raw.githubusercontent.com/MinaProtocol/mina/778f499316fe439a7a843f91cd3c6e05484b3f7d/src/app/client_sdk/js_util.ml | ocaml | -- types and transformers for Javascript
open Js_of_ocaml
open Snark_params.Tick
open Mina_base
module Global_slot = Mina_numbers.Global_slot
module Memo = Signed_command_memo
let raise_js_error s =
Js_error.(raise_ @@ of_error (new%js Js.error_constr (Js.string s)))
type string_js = Js.js_string Js.t
type key... | |
fe412d0063c68bc40d4c87f62d7c3ba315318e17697b855e213a2b4c11fb2e2f | e-bigmoon/haskell-blog | Quiz12.hs | #!/usr/bin/env stack
-- stack script --resolver lts-11.17
import Conduit
main:: IO ()
main = runConduit $ yieldMany [1..10] .| iterMC print .| sinkNull
| null | https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/quiz/Quiz12/Quiz12.hs | haskell | stack script --resolver lts-11.17 | #!/usr/bin/env stack
import Conduit
main:: IO ()
main = runConduit $ yieldMany [1..10] .| iterMC print .| sinkNull
|
e5ffa22931525566ccc6d419bda47aba9bbba274227c595111d1a26f3c764b6e | gafiatulin/codewars | MakeUpper.hs | MakeUpperCase
module MakeUpper where
import Data.Char (toUpper)
makeUpperCase :: String -> String
makeUpperCase = map toUpper
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/8%20kyu/MakeUpper.hs | haskell | MakeUpperCase
module MakeUpper where
import Data.Char (toUpper)
makeUpperCase :: String -> String
makeUpperCase = map toUpper
| |
e904462197026c101703ea900650c80ae64190dee114e89d2fcfb43d19308dd6 | goncalotomas/FMKe | fmke_gen_http_handler.erl | %% Default behaviour for a generic HTTP handler.
-module (fmke_gen_http_handler).
-include ("fmke_http.hrl").
-export ([init/3, handle_req/5, handle_reply/5]).
-callback init(Req::cowboy_req:req(), State::any()) -> {ok, cowboy_req:req(), any()}.
-callback handle_req(Method::binary(), HasBody::boolean(), Req::cowboy_... | null | https://raw.githubusercontent.com/goncalotomas/FMKe/654d3211ef57d841540e58033a397ce0f3dee0f7/src/fmke_gen_http_handler.erl | erlang | Default behaviour for a generic HTTP handler.
Every requests starts being processed at the init function, and processing is
identical throughout all modules that implement this behaviour, so this function
reduces code duplication.
Processing any request has a pattern that involves acquiring necessary parameters
f... | -module (fmke_gen_http_handler).
-include ("fmke_http.hrl").
-export ([init/3, handle_req/5, handle_reply/5]).
-callback init(Req::cowboy_req:req(), State::any()) -> {ok, cowboy_req:req(), any()}.
-callback handle_req(Method::binary(), HasBody::boolean(), Req::cowboy_req:req()) -> cowboy_req:req().
-callback perform... |
b9f70ad1b4863cfd91c833c914cd405ccebcaa26b1aa2d4629014d644e185e5a | brendanhay/terrafomo | Types.hs | -- This module was auto-generated. If it is modified, it will not be overwritten.
-- |
Module : . Spotinst . Types
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
-- Stability : auto-generated
Portability : non - portable ( GHC ... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-spotinst/src/Terrafomo/Spotinst/Types.hs | haskell | This module was auto-generated. If it is modified, it will not be overwritten.
|
Stability : auto-generated
import Formatting (Format, (%)) |
Module : . Spotinst . Types
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
Portability : non - portable ( GHC extensions )
module Terrafomo.Spotinst.Types where
import Data . Text ( Text )
import Terrafomo
import Terraf... |
d1988f251eb49b516ab29d5eead6b4072ba7048a9293f664cb2b11be90051e6c | haskell-jp/makeMistakesToLearnHaskell | no-main.hs | input <- getContents
putStr (unlines (reverse (lines input)))
| null | https://raw.githubusercontent.com/haskell-jp/makeMistakesToLearnHaskell/1174d5c6bb82e57622be8033607a4d049e30ae7e/test/assets/4/no-main.hs | haskell | input <- getContents
putStr (unlines (reverse (lines input)))
| |
38585783ee8e53029872b0b755b08e4d2ea840c9c08b21dbae2c59d24d040efa | geremih/xcljb | xtest.clj | This file is automatically generated . DO NOT MODIFY .
(clojure.core/ns
xcljb.gen.xtest
(:require xcljb.conn-ext xcljb.gen.xtest-types))
(def
-XCLJB
{:minor-version 1,
:major-version 2,
:header "xtest",
:extension-multiword false,
:extension-name "Test",
:extension-xname "XTEST"})
(def CURSOR {:curre... | null | https://raw.githubusercontent.com/geremih/xcljb/59e9ff795bf00595a3d46231a7bb4ec976852396/src/xcljb/gen/xtest.clj | clojure | Manually written. | This file is automatically generated . DO NOT MODIFY .
(clojure.core/ns
xcljb.gen.xtest
(:require xcljb.conn-ext xcljb.gen.xtest-types))
(def
-XCLJB
{:minor-version 1,
:major-version 2,
:header "xtest",
:extension-multiword false,
:extension-name "Test",
:extension-xname "XTEST"})
(def CURSOR {:curre... |
5b42d9cfc8691693cbed516e0dd92193587b405507466d26a70c94da65a59045 | cognitect-labs/vase | descriptor_test.clj | (ns com.cognitect.vase.descriptor-test
(:require [clojure.test :refer :all]
[io.pedestal.test :refer :all]
[com.cognitect.vase.test-helper :as helper]
[com.cognitect.vase.service-route-table :as srt]
[com.cognitect.vase.util :as util]
[com.cognitect.vase :as... | null | https://raw.githubusercontent.com/cognitect-labs/vase/d882bc8f28e8af2077b55c80e069aa2238f646b7/test/com/cognitect/vase/descriptor_test.clj | clojure | Use a string instead...VV | (ns com.cognitect.vase.descriptor-test
(:require [clojure.test :refer :all]
[io.pedestal.test :refer :all]
[com.cognitect.vase.test-helper :as helper]
[com.cognitect.vase.service-route-table :as srt]
[com.cognitect.vase.util :as util]
[com.cognitect.vase :as... |
91b9a34421b66bb5d98fb585c402390ccf69df097762b6936a5bf43d942dff62 | kazu-yamamoto/cab | Utils.hs | # LANGUAGE CPP #
module Distribution.Cab.Utils where
import Data.List
import Distribution.InstalledPackageInfo (InstalledPackageInfo)
import Distribution.Package (PackageName)
import Distribution.PackageDescription (GenericPackageDescription)
import Distribution.Simple.PackageIndex (PackageIndex)
import Distribution.... | null | https://raw.githubusercontent.com/kazu-yamamoto/cab/1480e1eb3dc057908e63359d32f5ae3fc951ef5c/Distribution/Cab/Utils.hs | haskell | |
>>> fromDotted "1.2.3"
[1,2,3]
|
>>> toDotted [1,2,3]
"1.2.3"
GenericPackageDescription | # LANGUAGE CPP #
module Distribution.Cab.Utils where
import Data.List
import Distribution.InstalledPackageInfo (InstalledPackageInfo)
import Distribution.Package (PackageName)
import Distribution.PackageDescription (GenericPackageDescription)
import Distribution.Simple.PackageIndex (PackageIndex)
import Distribution.... |
5eb83c545700b6e2281153e9bbd23ae4072d3b4cd645b05def24a56947c4fa67 | well-typed-lightbulbs/ocaml-esp32 | threadsigmask.ml | (* TEST
* hassysthreads
include systhreads
** not-windows
*** bytecode
*** native
*)
let stopped = ref false
(* This function is purposed to do some computations which allocate,
so that the corresponding thread is likely to handle signals if it
is allowed to. *)
let rec loop () =
let rec generate_list n =
... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/lib-systhreads/threadsigmask.ml | ocaml | TEST
* hassysthreads
include systhreads
** not-windows
*** bytecode
*** native
This function is purposed to do some computations which allocate,
so that the corresponding thread is likely to handle signals if it
is allowed to.
Install the signal handlers
Send signals to the current process. They should be... |
let stopped = ref false
let rec loop () =
let rec generate_list n =
let rec aux acc = function
| 0 -> acc
| n -> aux (float n :: acc) (n-1)
in
aux [] n
in
let long_list = generate_list 100000 in
let res = List.length (List.rev_map sin long_list) in
ignore (Sys.opaque_identity res)
l... |
55b7d71837f45b0450ed83768d3158b8390db1bd4f77d1e635665278539c818b | mzp/coq-ide-for-ios | envars.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/lib/envars.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
On win32, we add coqbin to the PATH... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This file gathers environme... |
a00b963df19d68ae820dcdd65b8a905ffe7d4bb82286a576f8844ab06c880b76 | alanzplus/EOPL | explicit-refs-read-print-ast.rkt | #lang eopl
(require "explicit-refs-spec.rkt")
(read-print-ast)
| null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch4/explicit-refs-read-print-ast.rkt | racket | #lang eopl
(require "explicit-refs-spec.rkt")
(read-print-ast)
| |
a37e5744674f3a5c958f77aeb49f44ebb512043ea38d60680afdb2cacda1aa6c | clash-lang/clash-compiler | BlockRam.hs | |
Copyright : ( C ) 2013 - 2016 , University of Twente ,
2016 - 2017 , Myrtle Software Ltd ,
2017 , Google Inc. ,
2021 - 2022 , QBayLogic B.V. ,
2022 , Google Inc. ,
License : BSD2 ( see the file LICENSE )
Maintain... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/53d32a6b063f17c8f3e637582624d3804c95a7cd/clash-prelude/src/Clash/Explicit/BlockRam.hs | haskell | ^ Register bank
^ ( Memory output , Current instruction )
Current instruction pointer
Decoder
ALU
next instruction
update registers
^ Read address
^ ( write address , data in )
^ data out
Compute GCD of 4 and 6
0 : = 4
1 : = 6
A : = 4
B : = 6
start
( a > b )
( b > a )
end
^ ( Regi... | |
Copyright : ( C ) 2013 - 2016 , University of Twente ,
2016 - 2017 , Myrtle Software Ltd ,
2017 , Google Inc. ,
2021 - 2022 , QBayLogic B.V. ,
2022 , Google Inc. ,
License : BSD2 ( see the file LICENSE )
Maintain... |
182d4c5544db2c80fb38b1aeeea24f33ec8058afc375788da5e68e0b4018eaea | restyled-io/restyled.io | ProfileSpec.hs | module Restyled.Handlers.ProfileSpec
( spec
) where
import Restyled.Test
import qualified Database.Persist as P
import qualified GitHub.Data as GH
import Restyled.Authorization (authRepoCacheKey)
import Restyled.GitHubOrg
import Restyled.Test.Graphula
spec :: Spec
spec = withApp $ do
describe "/profile" ... | null | https://raw.githubusercontent.com/restyled-io/restyled.io/134019dffb54f84bddb905e8e21131b4e33f7850/test/Restyled/Handlers/ProfileSpec.hs | haskell | module Restyled.Handlers.ProfileSpec
( spec
) where
import Restyled.Test
import qualified Database.Persist as P
import qualified GitHub.Data as GH
import Restyled.Authorization (authRepoCacheKey)
import Restyled.GitHubOrg
import Restyled.Test.Graphula
spec :: Spec
spec = withApp $ do
describe "/profile" ... | |
a92641a14b8bcf72b2bdd2462894d640be6c5e89504ed8314ea972746d2a010f | qfpl/propagator-examples | Sudoku4.hs | module Data.Propagator.Example.Sudoku4 where
import Control.Monad.ST (ST)
import Data.Foldable (toList, traverse_)
import Data.List (intercalate)
import Data.Propagator
import Data.Set (Set, (\\))
import qualified Data.Set as Set
data Number = One | Two | Three | Four deriving (Eq, Ord, Show)
newtype Square = Square... | null | https://raw.githubusercontent.com/qfpl/propagator-examples/93dbabdac1b06c8acee65c6e815c854bde07301e/src/Data/Propagator/Example/Sudoku4.hs | haskell | ??3?
?4??
??2? | module Data.Propagator.Example.Sudoku4 where
import Control.Monad.ST (ST)
import Data.Foldable (toList, traverse_)
import Data.List (intercalate)
import Data.Propagator
import Data.Set (Set, (\\))
import qualified Data.Set as Set
data Number = One | Two | Three | Four deriving (Eq, Ord, Show)
newtype Square = Square... |
268897a05b558d5212217396937c7fc0d513e7ded1a5ee4d18e1b13d68c2f030 | kawasima/darzana | project.clj | (defproject net.unit8.darzana/darzana "1.0.0-SNAPSHOT"
:description "A Backends for Frontends Tool"
:url ""
:license {:name "Eclipse Public License - v 1.0"
:url "-v10.html"
:distribution :repo
:comments "same as Clojure"}
:min-lein-version "2.0.0"
:dependencies [[org.cloju... | null | https://raw.githubusercontent.com/kawasima/darzana/4b37c8556f74219b707d23cb2d6dce70509a0c1b/project.clj | clojure | json | (defproject net.unit8.darzana/darzana "1.0.0-SNAPSHOT"
:description "A Backends for Frontends Tool"
:url ""
:license {:name "Eclipse Public License - v 1.0"
:url "-v10.html"
:distribution :repo
:comments "same as Clojure"}
:min-lein-version "2.0.0"
:dependencies [[org.cloju... |
f25937d71afbd5f7ecf5a782f5a35cfbefb09086babe7f53c45b2cdf406a5aed | rethab/h-gpgme | Gpgme.hs |
-- |
Module : Crypto . Gpgme
Copyright : ( c ) Reto Hablützel 2015
License : MIT
--
-- Maintainer :
-- Stability : experimental
-- Portability : untested
--
-- High Level Binding for GnuPG Made Easy (gpgme)
--
Most of these functions are a one - to - one translation
from GnuPG API with some... | null | https://raw.githubusercontent.com/rethab/h-gpgme/6af2391258cbf9c6b24afed78ecaad6ce4d5e04d/src/Crypto/Gpgme.hs | haskell | |
Maintainer :
Stability : experimental
Portability : untested
High Level Binding for GnuPG Made Easy (gpgme)
the API more convenient.
See the GnuPG manual for more information: <>
== Example (from the tests):
>
>Just enc <- withCtx "test/bob" "C" OpenPGP $ \bCtx -> runMaybeT $ do
> fromRig... |
Module : Crypto . Gpgme
Copyright : ( c ) Reto Hablützel 2015
License : MIT
Most of these functions are a one - to - one translation
from GnuPG API with some to make
> let alice_pub_fpr = " EAACEB8A "
> aPubKey < - MaybeT $ getKey bCtx alice_pub_fpr NoSecret
> decrypt aC... |
763b0ea82e2190fb0c5403164e6ab344cc14772135b4d80dcdce665d60c03d5e | behrica/casagemas | setup.clj | (ns org.scicloj.casagemas.setup
(:require [nextjournal.clerk :as clerk]
[nextjournal.clerk.tap]
[org.scicloj.casagemas]
[org.scicloj.casagemas.dataset]
[org.scicloj.casagemas.kroki]
[nextjournal.clerk.viewer :as v]))
(defn start-clerk! []
(println "Star... | null | https://raw.githubusercontent.com/behrica/casagemas/ba57339fda376943a673fa456b01f761e7d1d6da/src/org/scicloj/casagemas/setup.clj | clojure | :default | (ns org.scicloj.casagemas.setup
(:require [nextjournal.clerk :as clerk]
[nextjournal.clerk.tap]
[org.scicloj.casagemas]
[org.scicloj.casagemas.dataset]
[org.scicloj.casagemas.kroki]
[nextjournal.clerk.viewer :as v]))
(defn start-clerk! []
(println "Star... |
88fe6cb570415aa8d76afe3c71922d345ef88e2cefa213f21460a4a8cdac9d70 | code-iai/ros_emacs_utils | mezzano.lisp | ;;;;; -*- indent-tabs-mode: nil -*-
;;;
swank-mezzano.lisp --- SLIME backend for Mezzano
;;;
;;; This code has been placed in the Public Domain. All warranties are
;;; disclaimed.
;;;
Administrivia
(defpackage swank/mezzano
(:use cl swank/backend))
(in-package swank/mezzano)
;;; swank-mop
(import-swank-mop-... | null | https://raw.githubusercontent.com/code-iai/ros_emacs_utils/ab5cea686d582020c75881583beca7402fa9e7b8/slime_wrapper/slime/swank/mezzano.lisp | lisp | -*- indent-tabs-mode: nil -*-
This code has been placed in the Public Domain. All warranties are
disclaimed.
swank-mop
TCP server
Drop connections when they can't be handled.
Poke standard-input every now and then to keep the console alive.
Unix signals
????
Compilation
Debugging
Definitely don't allow ... | swank-mezzano.lisp --- SLIME backend for Mezzano
Administrivia
(defpackage swank/mezzano
(:use cl swank/backend))
(in-package swank/mezzano)
(import-swank-mop-symbols :mezzano.clos '(:class-default-initargs
:class-direct-default-initargs
... |
0058789d4032363a24c843122bf1d010b517f53d7e57ca0fc4984b131ef65f01 | LPCIC/matita | content.mli | Copyright ( C ) 2000 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of the GNU... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/content/content.mli | ocaml | decreasing arguments
paramsno
paramsno
inferrable, term
????
id
optional metasenv
actual object | Copyright ( C ) 2000 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of the GNU... |
b809c0b17f29f4c368b23878612f542402ed1faca5deb4083442bab394234cfa | ghc/nofib | Match.hs | -----------------------------------------------------------------------------
MATCHING
This module provides a ` match ' function which implements the famous unification
algorithm . It takes a pair of ` patterns ' , ie structures with variables in them ,
matches them against e... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/spectral/expert/Match.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
----------------------------------------------------------------------------}
function is used whenever a phrase contains variables about which
information may be kn... | MATCHING
This module provides a ` match ' function which implements the famous unification
algorithm . It takes a pair of ` patterns ' , ie structures with variables in them ,
matches them against each other , and extracts information about the values
which variables must ha... |
8c20d7c2e8daf7927f4d6c3c6550d6b0069ee7f16f8934d319e8066af6e7914b | hoplon/demos | contacts.clj | (ns app.contacts
(:require [app.handler :as handler]))
(def app handler/routes)
(def my-contacts
(atom #{{:first "Ben" :last "Bitdiddle" :email ""}
{:first "Alyssa" :middle-initial "P" :last "Hacker" :email ""}
{:first "Eva" :middle "Lu" :last "Ator" :email ""}
{:first "Louis" :last ... | null | https://raw.githubusercontent.com/hoplon/demos/50d613892db0624a4f0326c1427d82f5b8e2390f/ws-contacts/src/app/contacts.clj | clojure | (ns app.contacts
(:require [app.handler :as handler]))
(def app handler/routes)
(def my-contacts
(atom #{{:first "Ben" :last "Bitdiddle" :email ""}
{:first "Alyssa" :middle-initial "P" :last "Hacker" :email ""}
{:first "Eva" :middle "Lu" :last "Ator" :email ""}
{:first "Louis" :last ... | |
8d72e74a5f0ae8ac34fce4f2593e26aa609bcf5fed01185a5a32ce11451e8cea | furkan3ayraktar/clojure-polylith-realworld-example-app | store.clj | (ns clojure.realworld.user.store
(:require [clojure.java.jdbc :as jdbc]
[clojure.realworld.database.interface :as database]
[clojure.realworld.user.spec :as spec]
[clojure.spec.alpha :as s]
[honey.sql :as sql]))
(defn find-by [key value]
(let [query {:select [:*]
... | null | https://raw.githubusercontent.com/furkan3ayraktar/clojure-polylith-realworld-example-app/7703ee7af93887ea600d1c05e400255303a6ed47/components/user/src/clojure/realworld/user/store.clj | clojure | (ns clojure.realworld.user.store
(:require [clojure.java.jdbc :as jdbc]
[clojure.realworld.database.interface :as database]
[clojure.realworld.user.spec :as spec]
[clojure.spec.alpha :as s]
[honey.sql :as sql]))
(defn find-by [key value]
(let [query {:select [:*]
... | |
c36a482691c710b63e206a5234f0cd09e3f02d6375c1572fc96bbae36ecdd779 | acl2/acl2 | plans@useless-runes.lsp | (INTERSECTION-EQUAL-OF-CONS-IFF
(2068 6 (:DEFINITION SUBSETP-EQUAL))
(1638 18 (:REWRITE SUBSEQUENCEP-EQUAL-EQUAL-LEN))
(1158 101 (:REWRITE CONSP-FROM-LEN-CHEAP))
(1104 48 (:REWRITE NODE-LIST-P-TRUE-LISTP1))
(1044 24 (:DEFINITION TRUE-LISTP))
(654 54 (:REWRITE NODE-LIST-P-WHEN-NOT-CONSP))
(470 18 (:REWRITE SUBLIS... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/workshops/2020/coglio-westfold/drone-plan/.sys/plans%40useless-runes.lsp | lisp | (INTERSECTION-EQUAL-OF-CONS-IFF
(2068 6 (:DEFINITION SUBSETP-EQUAL))
(1638 18 (:REWRITE SUBSEQUENCEP-EQUAL-EQUAL-LEN))
(1158 101 (:REWRITE CONSP-FROM-LEN-CHEAP))
(1104 48 (:REWRITE NODE-LIST-P-TRUE-LISTP1))
(1044 24 (:DEFINITION TRUE-LISTP))
(654 54 (:REWRITE NODE-LIST-P-WHEN-NOT-CONSP))
(470 18 (:REWRITE SUBLIS... | |
e08df341273c25acbe47fe4003a247af413c7577a3c4f890da374f7129c3104f | coinmetrics/haskell-tools | JsonRpc.hs | # LANGUAGE OverloadedLists , OverloadedStrings #
module CoinMetrics.JsonRpc
( JsonRpc()
, newJsonRpc
, jsonRpcRequest
, nonJsonRpcRequest
) where
import qualified Data.Aeson as J
import qualified Data.Aeson.Types as J
import qualified Data.ByteString as B
import qualified Data.Text as T
import qualified Dat... | null | https://raw.githubusercontent.com/coinmetrics/haskell-tools/94d59497b6c4d829dd680df82c71fe607877ae76/coinmetrics/CoinMetrics/JsonRpc.hs | haskell | # LANGUAGE OverloadedLists , OverloadedStrings #
module CoinMetrics.JsonRpc
( JsonRpc()
, newJsonRpc
, jsonRpcRequest
, nonJsonRpcRequest
) where
import qualified Data.Aeson as J
import qualified Data.Aeson.Types as J
import qualified Data.ByteString as B
import qualified Data.Text as T
import qualified Dat... | |
09b2eef5be5730e0cabc5ef4c45d54ab4e7fbea3735c3e70a5905eeb4cca5af3 | Opetushallitus/ataru | autosave.cljs | (ns ataru.virkailija.autosave
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [re-frame.core :refer [subscribe]]
[ataru.cljs-util :refer [debounce]]
[cljs.core.match :refer-macros [match]]
[cljs.core.async :as a :refer [chan <! >! close! alts! timeout sli... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/cljs/ataru/virkailija/autosave.cljs | clojure | extra predicate for changing whether a change should be
propagated to the db
save right before exiting loop | (ns ataru.virkailija.autosave
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [re-frame.core :refer [subscribe]]
[ataru.cljs-util :refer [debounce]]
[cljs.core.match :refer-macros [match]]
[cljs.core.async :as a :refer [chan <! >! close! alts! timeout sli... |
9d6f5773cd6936ca1acefe7b311136dc237b1d326576dbe9a675d9d4f63cc6b0 | Convex-Dev/convex.cljc | key_pair.clj | (ns convex.recipe.key-pair
"Key pairs are essential, they are used by clients to sign transactions and by peers to sign
blocks of transactions.
This example shows how to create a key pair and store it securely in a PFX file.
Storing key pairs is always a sensitive topic. A PFX file allows storing one or s... | null | https://raw.githubusercontent.com/Convex-Dev/convex.cljc/effce7127933c0733a7ef00f4ede8fc83277ab28/module/recipe/src/main/clj/convex/recipe/key_pair.clj | clojure |
Example directory where key pair will be stored.
Each subsequent time, the key pair is always retrieved from that file.
Deleting that 'keystore.pfx' file in this directory will lose it forever.
Let us inspect the core ideas in `retrieve`.
Generating a key pair.
File for storing our "key store" capable of ... | (ns convex.recipe.key-pair
"Key pairs are essential, they are used by clients to sign transactions and by peers to sign
blocks of transactions.
This example shows how to create a key pair and store it securely in a PFX file.
Storing key pairs is always a sensitive topic. A PFX file allows storing one or s... |
c7f1edd29e4a80b1e8e87615a5947a4c910f3fe2153d1539514f698dcbfa3c67 | JacquesCarette/Drasil | TableOfAbbAndAcronyms.hs | -- | Standard code to make a table of abbreviations and acronyms.
module Drasil.Sections.TableOfAbbAndAcronyms
(tableAbbAccGen, tableAbbAccRef) where
import Language.Drasil
import Data.Drasil.Concepts.Documentation (abbreviation, fullForm, abbAcc)
import Control.Lens ((^.))
import Data.List (sortBy)
import Data.Fun... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/92dddf7a545ba5029f99ad5c5eddcd8dad56a2d8/code/drasil-docLang/lib/Drasil/Sections/TableOfAbbAndAcronyms.hs | haskell | | Standard code to make a table of abbreviations and acronyms.
| Helper function that gets the acronym out of an 'Idea'.
| The actual table creation function.
| Table of abbreviations and acronyms reference. | module Drasil.Sections.TableOfAbbAndAcronyms
(tableAbbAccGen, tableAbbAccRef) where
import Language.Drasil
import Data.Drasil.Concepts.Documentation (abbreviation, fullForm, abbAcc)
import Control.Lens ((^.))
import Data.List (sortBy)
import Data.Function (on)
select :: (Idea s) => [s] -> [(String, s)]
select [] =... |
a26d4869a01e2281a947c6e448ad90f9fb5b17c1119680a0b5ae542bc76430f2 | votinginfoproject/data-processor | sqlite_test.clj | (ns vip.data-processor.db.sqlite-test
(:require [vip.data-processor.db.sqlite :as sqlite]
[clojure.test :refer :all]
[vip.data-processor.validation.data-spec.v3-0 :as v3-0]))
(deftest column-names-test
(let [db (sqlite/temp-db "column-names-test" "3.0")]
(is (= ["state_id" "early_vote_s... | null | https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/db/sqlite_test.clj | clojure | (ns vip.data-processor.db.sqlite-test
(:require [vip.data-processor.db.sqlite :as sqlite]
[clojure.test :refer :all]
[vip.data-processor.validation.data-spec.v3-0 :as v3-0]))
(deftest column-names-test
(let [db (sqlite/temp-db "column-names-test" "3.0")]
(is (= ["state_id" "early_vote_s... | |
ba8f2a00fa7ddba0b33d1641e91368a2374e64b8735997a02376920c41ffb013 | haskellari/some | Church.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE Safe #-}
module Data.Some.Church (
Some(..),
mkSome,
mapSome,
withSomeM,
foldSome,
traverseSome,
) where
import Data.GADT.Internal
| null | https://raw.githubusercontent.com/haskellari/some/00e42322da777cba81a1afdbb701fe8bbe263f58/src/Data/Some/Church.hs | haskell | # LANGUAGE CPP #
# LANGUAGE Safe # | module Data.Some.Church (
Some(..),
mkSome,
mapSome,
withSomeM,
foldSome,
traverseSome,
) where
import Data.GADT.Internal
|
9533ef085d64f6b8e1c758e673e5756255ea8a0a3734fd7db883d380ce6e1933 | pashatsyganenko/main | 24022021.ml | let re = Str.regexp "[2-7]\\(0\\|2\\|4\\|6\\|8\\)$" ;;
let re = Str.regexp "[0-9]+\\.[0-9]+$" ;;
let re = Str.regexp "\\(\\(0\\.[0-9]+\\)\\|\\([1-9][0-9]*\\.[0-9+]\\)\\)$" ;;
let re = Str.regexp "\\(\\(0\\.[0-9]*[1-9]\\)\\|\\([1-9][0-9]*\\.[0-9]*[1-9]\\)\\)$" ;;
let re = Str.regexp "\\(\\(0\\.0\\)\\|\\([1-9][0-9]*\\.0\... | null | https://raw.githubusercontent.com/pashatsyganenko/main/3903ec183f62ead548de51086e7fa3ac4553587c/2021-10/24022021.ml | ocaml | let re = Str.regexp "[2-7]\\(0\\|2\\|4\\|6\\|8\\)$" ;;
let re = Str.regexp "[0-9]+\\.[0-9]+$" ;;
let re = Str.regexp "\\(\\(0\\.[0-9]+\\)\\|\\([1-9][0-9]*\\.[0-9+]\\)\\)$" ;;
let re = Str.regexp "\\(\\(0\\.[0-9]*[1-9]\\)\\|\\([1-9][0-9]*\\.[0-9]*[1-9]\\)\\)$" ;;
let re = Str.regexp "\\(\\(0\\.0\\)\\|\\([1-9][0-9]*\\.0\... | |
ff17b7f41a13753caa0126b2c5a6d20e98be109e10d2d0bc41b1739ede603264 | whamtet/ctmx | command.cljc | (ns ctmx.render.command)
;; when the hx-* endpoint is of the form endpoint:command
;; we shall split on the colon and add command to hx-vals
(defn- assoc-command [m verb]
(if-let [endpoint (m verb)]
(let [[endpoint command] (.split endpoint ":")]
(if command
(-> m
(update :hx-vals #(if... | null | https://raw.githubusercontent.com/whamtet/ctmx/45a635ecd5781a68d17bdc5c5e3905fbac32e81f/src/ctmx/render/command.cljc | clojure | when the hx-* endpoint is of the form endpoint:command
we shall split on the colon and add command to hx-vals | (ns ctmx.render.command)
(defn- assoc-command [m verb]
(if-let [endpoint (m verb)]
(let [[endpoint command] (.split endpoint ":")]
(if command
(-> m
(update :hx-vals #(if (string? %) % (assoc % :command command)))
(assoc verb endpoint))
m))
m))
(defn assoc-comm... |
c2a0ebac3639b1fc0651a16d244d4e23a0e717ddb72a902f07965e5bbfa5e38b | juxt/grab | eql_compile_test.clj |
(ns juxt.grab.eql-compile-test
(:require
[clojure.test :refer [deftest is]]
[juxt.grab.alpha.schema :as schema]
[juxt.grab.alpha.document :as doc]
[juxt.grab.alpha.parser :refer [parse]]
[juxt.grab.alpha.compile :refer [compile-root]]
[clojure.java.io :as io]))
(defn expected-errors [{::doc/keys ... | null | https://raw.githubusercontent.com/juxt/grab/63ca3fd6542705151ff6ef7127a79478cae12b2b/test/juxt/grab/eql_compile_test.clj | clojure |
(ns juxt.grab.eql-compile-test
(:require
[clojure.test :refer [deftest is]]
[juxt.grab.alpha.schema :as schema]
[juxt.grab.alpha.document :as doc]
[juxt.grab.alpha.parser :refer [parse]]
[juxt.grab.alpha.compile :refer [compile-root]]
[clojure.java.io :as io]))
(defn expected-errors [{::doc/keys ... | |
8d93e32eecd091f61f647e298cccd7bf74001f21f320bbbd0d82ae67dd243b8e | jasonjckn/snake3d | gen.clj | (ns gen)
(defn gen-cube []
(let [sq (fn [m z]
[{:vertex (m 1 1 z)} {:vertex (m -1 1 z)}
{:vertex (m -1 -1 z)} {:vertex (m 1 -1 z)}])
twosq (fn [m] (for [z [-1 1]] (sq m z)))]
(flatten
(for [f [#(vec [%1 %2 %3])
#(vec [%3 %2 %1])
#(vec [%2 %3... | null | https://raw.githubusercontent.com/jasonjckn/snake3d/e2bd88fbdec8f98c2ba16ead3b55011d55aae9b4/src/gen.clj | clojure | (ns gen)
(defn gen-cube []
(let [sq (fn [m z]
[{:vertex (m 1 1 z)} {:vertex (m -1 1 z)}
{:vertex (m -1 -1 z)} {:vertex (m 1 -1 z)}])
twosq (fn [m] (for [z [-1 1]] (sq m z)))]
(flatten
(for [f [#(vec [%1 %2 %3])
#(vec [%3 %2 %1])
#(vec [%2 %3... | |
9363e722ac0f393eabb3edf9b2bd496803cad0a23bf05ae1a100e49234770f0d | pallet/pallet | lift.clj | (ns pallet.task.lift
"Apply configuration."
(:require
[clojure.pprint :refer [print-table]]
[clojure.stacktrace :refer [print-cause-trace]]
[clojure.tools.logging :as logging]
[pallet.algo.fsmop :refer [complete? wait-for]]
[pallet.api :as api]
[pallet.api :refer [print-targets]]
[pallet.core.p... | null | https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/src/pallet/task/lift.clj | clojure | a symbol
a phase | (ns pallet.task.lift
"Apply configuration."
(:require
[clojure.pprint :refer [print-table]]
[clojure.stacktrace :refer [print-cause-trace]]
[clojure.tools.logging :as logging]
[pallet.algo.fsmop :refer [complete? wait-for]]
[pallet.api :as api]
[pallet.api :refer [print-targets]]
[pallet.core.p... |
9bc13d454b3ee7f4901fe1e2a5bbd782252fb4a6257c2b28f7c423449ee35fae | helium/erlang-dkg | dkg_worker.erl | -module(dkg_worker).
-behaviour(gen_server).
-export([
start_link/5,
start_round/1,
is_done/1,
dkg_status/1,
get_pubkey/1,
sign_share/2,
dec_share/2,
verify_signature_share/3,
combine_signature_shares/2,
verify_decryption_share/3,
combine_decryption_shares/3
]).
-export([i... | null | https://raw.githubusercontent.com/helium/erlang-dkg/a22b841ae6cb31b17e547a6f208e93fa35f04b7f/test/dkg_worker.erl | erlang | helper functions | -module(dkg_worker).
-behaviour(gen_server).
-export([
start_link/5,
start_round/1,
is_done/1,
dkg_status/1,
get_pubkey/1,
sign_share/2,
dec_share/2,
verify_signature_share/3,
combine_signature_shares/2,
verify_decryption_share/3,
combine_decryption_shares/3
]).
-export([i... |
6d5088e164d241c4ec0316944cb975338de2e20b83b5bf7804525dabfe19dbf8 | geremih/xcljb | xc_misc.clj | This file is automatically generated . DO NOT MODIFY .
(clojure.core/ns
xcljb.gen.xc-misc
(:require xcljb.conn-ext xcljb.gen.xc-misc-types))
(def
-XCLJB
{:minor-version 1,
:major-version 1,
:header "xc_misc",
:extension-multiword true,
:extension-name "XCMisc",
:extension-xname "XC-MISC"})
(clojure.c... | null | https://raw.githubusercontent.com/geremih/xcljb/59e9ff795bf00595a3d46231a7bb4ec976852396/src/xcljb/gen/xc_misc.clj | clojure | Manually written. | This file is automatically generated . DO NOT MODIFY .
(clojure.core/ns
xcljb.gen.xc-misc
(:require xcljb.conn-ext xcljb.gen.xc-misc-types))
(def
-XCLJB
{:minor-version 1,
:major-version 1,
:header "xc_misc",
:extension-multiword true,
:extension-name "XCMisc",
:extension-xname "XC-MISC"})
(clojure.c... |
39895acf45542cd66dedf3309c8a095bc718781d5b86c318cff587483d82cbf8 | carl-eastlund/dracula | debug.rkt | #lang scheme
(provide debug
dprintf
begin/debug
define/debug
define/private/debug
define/public/debug
define/override/debug
define/augment/debug
let/debug
let*/debug
letrec/debug
let-values/debug
let*-values/deb... | null | https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/private/scheme/debug.rkt | racket | #lang scheme
(provide debug
dprintf
begin/debug
define/debug
define/private/debug
define/public/debug
define/override/debug
define/augment/debug
let/debug
let*/debug
letrec/debug
let-values/debug
let*-values/deb... | |
e6a6b11453c2b51baae0f9305ff5418ea24e922f96cdcc9bf68d8b4644f9415e | cblp/notifaika | X.hs |
Notifaika reposts notifications
from different feeds to chats .
Copyright ( C ) 2015
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 L... | null | https://raw.githubusercontent.com/cblp/notifaika/db8f9b69d3417db337bce7fb44b2da8e0337a466/src/Data/Aeson/X.hs | haskell |
Notifaika reposts notifications
from different feeds to chats .
Copyright ( C ) 2015
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 L... | |
f92019a772130b6e97142d55ab70eff70f4f5038d42d27e36afb62b3a2a147bc | ku-fpg/hermit | GHC.hs | | Output the raw constructors . Helpful for writing pattern matching rewrites .
module HERMIT.PrettyPrinter.GHC
* GHC 's standard Pretty - Printer for GHC Core
externals
, pretty
, ppCoreTC
, ppModGuts
, ppCoreProg
, ppCoreBind
, ppCoreExpr
, ppCoreAlt
, ppKindOrType
, ppCoercion
)
where
i... | null | https://raw.githubusercontent.com/ku-fpg/hermit/3e7be430fae74a9e3860b8b574f36efbf9648dec/src/HERMIT/PrettyPrinter/GHC.hs | haskell | -------------------------------------------------------------------------
------------------------------------------------------------------------- | | Output the raw constructors . Helpful for writing pattern matching rewrites .
module HERMIT.PrettyPrinter.GHC
* GHC 's standard Pretty - Printer for GHC Core
externals
, pretty
, ppCoreTC
, ppModGuts
, ppCoreProg
, ppCoreBind
, ppCoreExpr
, ppCoreAlt
, ppKindOrType
, ppCoercion
)
where
i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.